Skip to content

Instantly share code, notes, and snippets.

@aycanirican
Created August 9, 2010 12:45
Show Gist options
  • Select an option

  • Save aycanirican/515365 to your computer and use it in GitHub Desktop.

Select an option

Save aycanirican/515365 to your computer and use it in GitHub Desktop.
{-# LANGUAGE TypeFamilies #-}
module JS.Ann where
-- | annotated fixpoint combinator
data FixA (a ∷ (* → *) → (* → *))
(f ∷ (* → *))
= InA { outa ∷ a f (FixA a f) }
| InF { outf ∷ f (FixA a f) }
-- | Identity annotation
newtype Id f a = Id {unId ∷ f a } deriving Show
-- | Identity annotation fixpoint combinator
type Fix f = FixA Id f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment