diff options
Diffstat (limited to 'src/elab_env.sml')
-rw-r--r-- | src/elab_env.sml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/elab_env.sml b/src/elab_env.sml index 720b19da..0367e023 100644 --- a/src/elab_env.sml +++ b/src/elab_env.sml @@ -648,6 +648,7 @@ fun declBinds env (d, loc) = | DDatatype (x, n, xncs) => let val env = pushCNamedAs env x n (KType, loc) NONE + val env = pushDatatype env n xncs in foldl (fn ((x', n', NONE), env) => pushENamedAs env x' n' (CNamed n, loc) | ((x', n', SOME t), env) => pushENamedAs env x' n' (TFun (t, (CNamed n, loc)), loc)) @@ -657,6 +658,7 @@ fun declBinds env (d, loc) = let val t = (CModProj (m, ms, x'), loc) val env = pushCNamedAs env x n (KType, loc) (SOME t) + val env = pushDatatype env n xncs val t = (CNamed n, loc) in |