flocc-pffb

Stabilityexperimental
Maintainerdeveloper@flocc.net
Safe HaskellNone

Compiler.Types2.TypeParser

Description

For more information please see http://www.flocc.net/

Synopsis

Documentation

parseTypes :: Monad m => String -> StateT IdxSet m [TypeDec]

type TypeDec = (String, IdxTree, [(String, Idx)], TyTerm)

The return type of the parse

typeDecToScheme :: TypeDec -> TyScheme

Returns the type scheme of a type declaration

numberTypes :: Monad m => [TypeDec] -> StateT IdxSet m [(Idx, TypeDec)]

Number all types in a type dec list

typeNameMap :: [(Idx, TypeDec)] -> [(String, Idx)]

Return a map of names to type env indices

typeEnv :: [(Idx, TypeDec)] -> [(Idx, TyScheme)]

Return a map of type indices to type schemes

typeDecsToSchemeExEnv :: [(Idx, TypeDec)] -> [(Idx, TySchemeEx)]

typeDecsToSchemeEnv takes an associative list of type declarations |and returns an associative lift of SchemeEx values.

generateNamedSchemeEnv :: [TypeDec] -> [(String, TyScheme)]

Returns a named list of type schemes.

generateNamedSchemeExEnv :: [TypeDec] -> [(String, TySchemeEx)]

Returns a named list of type scheme ex's.