Last active
August 29, 2015 14:28
-
-
Save JoeyEremondi/e98944952a9217541c1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Canonicalize.hs | |
declaration | |
:: Env.Environment | |
-> D.ValidDecl | |
-> Result.ResultErr D.CanonicalDecl | |
expression | |
:: Env.Environment | |
-> Valid.Expr | |
-> Result.ResultErr Canonical.Expr | |
--Canonicalize.Environment | |
data Environment = Env | |
{ _home :: Module.Name | |
, _values :: Dict Var.Canonical | |
, _adts :: Dict Var.Canonical | |
, _aliases :: Dict (Var.Canonical, [String], Type.Canonical) | |
, _patterns :: Dict (Var.Canonical, Int) | |
} | |
addPattern :: P.Pattern ann var -> Environment -> Environment | |
--Canonicalize.Variable | |
variable :: R.Region -> Env.Environment -> String -> Result.ResultErr Var.Canonical | |
--Type.Constrain.Expression | |
constrain | |
:: Env.Environment | |
-> Canonical.Expr | |
-> Type | |
-> IO TypeConstraint | |
--Type.constrain.Pattern | |
constrain | |
:: Env.Environment | |
-> P.CanonicalPattern | |
-> Type | |
-> IO Fragment | |
--Type.Solve | |
solve :: TypeConstraint -> ExceptT [A.Located Error.Error] IO TS.SolverState | |
actuallySolve :: TypeConstraint -> StateT TS.SolverState IO () | |
--Type.Environment | |
data Environment = Environment | |
{ constructor :: Map.Map String (IO (Int, [Variable], [Type], Type)) | |
, types :: TypeDict | |
, value :: TypeDict | |
} | |
--AST.Variable | |
toString :: a -> String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment