]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Repr/Dup.hs
Foldable, Num
[haskell/symantic.git] / Language / Symantic / Repr / Dup.hs
1 {-# LANGUAGE FlexibleContexts #-}
2 {-# LANGUAGE FlexibleInstances #-}
3 {-# LANGUAGE MultiParamTypeClasses #-}
4 {-# LANGUAGE NoImplicitPrelude #-}
5 {-# LANGUAGE TypeFamilies #-}
6 {-# LANGUAGE UndecidableInstances #-}
7 -- | Interpreter to duplicate the representation of an expression
8 -- in order to evaluate it with different interpreters.
9 --
10 -- NOTE: this is a more verbose, less clear,
11 -- and maybe less efficient alternative
12 -- to maintaining the universal polymorphism of @repr@ at parsing time
13 -- as done with 'Forall_Repr_with_Context';
14 -- it is mainly here for the sake of curiosity.
15 module Language.Symantic.Repr.Dup where
16
17 -- | Interpreter's data.
18 data Repr_Dup repr1 repr2 a
19 = Repr_Dup
20 { repr_dup_1 :: repr1 a
21 , repr_dup_2 :: repr2 a
22 }