template-haskell-natural-1.0.0.0
Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.Natural.Syntax.Expr.Typed.Builder

Synopsis

Documentation

newtype TypedExprBuilder s (prevArgs :: [Type]) (args :: [Type]) (res :: k) a Source #

Constructors

MkTEB 

Fields

unsafeUntyped :: forall {k1} {k2} s (step :: k1) (step1 :: k1) a (args0 :: [Type]) (args :: [Type]) (res :: k2). Builder s step step1 a -> TypedExprBuilder s args0 args res a Source #

data Returns a Source #

Constructors

Unknown 
Returns a 

Util type families

type family (args :: [a]) :> (arg :: a) :: [a] where ... Source #

Adds an argument at the end of an args list (snoc)

Equations

('[] :: [k]) :> (a :: k) = '[a] 
(arg ': args :: [a1]) :> (a2 :: a1) = arg ': (args :> a2) 

type family (args0 :: [a]) :++: (args1 :: [a]) :: [a] where ... Source #

Merges two args lists

Equations

('[] :: [a]) :++: (args1 :: [a]) = args1 
(arg ': args0 :: [a]) :++: (args1 :: [a]) = arg ': (args0 :++: args1) 

type family (args :: [Type]) :~> res where ... Source #

Builds the final arrow type from a list of args and a Returns

Equations

('[] :: [Type]) :~> (Returns a) = a 
(arg ': args) :~> (Returns a) = arg -> args :~> Returns a