ajhc- Haskell compiler that produce binary through C language

Safe HaskellNone




canBeBox :: (CanType (TypeOf a), CanType a, ~ * (TypeOf (TypeOf a)) E) => a -> BoolSource

eAp :: E -> E -> ESource

inferType :: (ContextMonad m, ContextOf m ~ String) => DataTable -> [(TVr, E)] -> E -> m ESource

Perform a full typecheck, evaluating type terms as necessary.

infertype :: CanTypeCheck a => DataTable -> a -> ESource

typecheck :: (CanTypeCheck a, Monad m) => DataTable -> a -> m ESource



:: Monad m 
=> (Id -> Maybe E)

function to look up values in the environment

-> [TVr]

vars which may be substituted

-> E

pattern to match

-> E

input expression

-> m [(TVr, E)] 

find substitution that will transform the left term into the right one, only substituting for the vars in the list

typeInfer :: DataTable -> E -> ESource

Determine type of term using full algorithm with substitutions. This should be used instead of typ when let-bound type variables exist or you wish a more thorough checking of types.

typeInfer' :: DataTable -> [(TVr, E)] -> E -> ESource