diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-07-26 09:30:26 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-07-26 09:30:26 +0200 |
commit | 494b764274be4db53499fa4eb7decacb93c7bbe9 (patch) | |
tree | c8966de4c992ef9755a310435500c475814eae96 /typecheck | |
parent | 0503dcb2998ab9dcd0f39e6f264f482a3d2cc7f7 (diff) |
Builtins is a Map
Diffstat (limited to 'typecheck')
-rw-r--r-- | typecheck/CC/Typecheck.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/typecheck/CC/Typecheck.hs b/typecheck/CC/Typecheck.hs index 8803a62..f61103e 100644 --- a/typecheck/CC/Typecheck.hs +++ b/typecheck/CC/Typecheck.hs @@ -193,7 +193,7 @@ inferList env (expr : exprs) = do runPass :: Context -> S.Program -> Either TCError T.Program runPass (Context _ (Builtins builtins)) prog = - let env = Env (Map.fromList [(name, generalise emptyEnv ty) | (name, ty) <- builtins]) + let env = Env (Map.map (generalise emptyEnv) builtins) in runTM (typeCheck env prog) typeCheck :: Env -> S.Program -> TM T.Program |