{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- | 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 @repr@ at parsing time -- as done with 'Forall_Repr_with_Context'; -- it is mainly here for the sake of curiosity. module Language.Symantic.Repr.Dup where -- | Interpreter's data. data Dup repr1 repr2 a = Dup { dup1 :: repr1 a , dup2 :: repr2 a }