1 {-# OPTIONS_GHC -XModalTypes -ddump-types -XNoMonoPatBinds #-}
2 module IsomorphismForCodeTypes
5 --------------------------------------------------------------------------------
6 -- Taha-Sheard "isomorphism for code types"
8 back :: forall a b c. (<[b]>@a -> <[c]>@a) -> <[ b->c ]>@a
9 back = \f -> <[ \x -> ~~(f <[x]>) ]>
11 forth :: forall a b c. <[b->c]>@a -> (<[b]>@a -> <[c]>@a)
12 forth = \f -> \x -> <[ ~~f ~~x ]>