1 {-# LANGUAGE NoImplicitPrelude #-}
2 {-# OPTIONS_GHC -fno-warn-tabs #-}
4 module Hcompta.Expr.Dup where
6 -- | Data type to duplicate an expression
7 -- in order to evaluate it with different interpreters.
16 -- * Whenever we use a value, we have to duplicate it first,
17 -- to leave the other copy for different interpreters
19 print (ev x1) >> return x2
20 where (x1, x2) = duplicate x