Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Interpreter to duplicate the representation of an expression in order to evaluate it with different interpreters.
NOTE: this is a more verbose, less clear,
and maybe less efficient alternative
to maintaining the universal polymorphism of term
at parsing time as done with Term
;
it is mainly here for the sake of curiosity.
- data Dup term1 term2 a = Dup {}
- dup0 :: (cl r, cl s) => (forall term. cl term => term a) -> Dup r s a
- dup1 :: (cl r, cl s) => (forall term. cl term => term a -> term b) -> Dup r s a -> Dup r s b
- dup2 :: (cl r, cl s) => (forall term. cl term => term a -> term b -> term c) -> Dup r s a -> Dup r s b -> Dup r s c
- dup3 :: (cl r, cl s) => (forall term. cl term => term a -> term b -> term c -> term d) -> Dup r s a -> Dup r s b -> Dup r s c -> Dup r s d
Documentation
data Dup term1 term2 a Source #
Interpreter's data.
(Sym_Lambda r1, Sym_Lambda r2) => Sym_Lambda (Dup r1 r2) Source # | |
dup1 :: (cl r, cl s) => (forall term. cl term => term a -> term b) -> Dup r s a -> Dup r s b Source #