Fix double vars
This commit is contained in:
parent
343be08a4a
commit
aa1ff630a5
1 changed files with 2 additions and 4 deletions
|
|
@ -100,7 +100,7 @@ typecheckBind (Bind name vars rhs) = do
|
||||||
-- Γ ⊢ f xs = e ↓ Α → B ⊣ Δ
|
-- Γ ⊢ f xs = e ↓ Α → B ⊣ Δ
|
||||||
Just t -> do
|
Just t -> do
|
||||||
(rhs', _) <- check (foldr EAbs rhs vars) t
|
(rhs', _) <- check (foldr EAbs rhs vars) t
|
||||||
pure (T.Bind (coerce name, t) (coerce vars') (rhs', t))
|
pure (T.Bind (coerce name, t) [] (rhs', t))
|
||||||
where
|
where
|
||||||
vars' = zip vars $ getVars t
|
vars' = zip vars $ getVars t
|
||||||
|
|
||||||
|
|
@ -111,9 +111,7 @@ typecheckBind (Bind name vars rhs) = do
|
||||||
(e, t) <- infer $ foldr EAbs rhs vars
|
(e, t) <- infer $ foldr EAbs rhs vars
|
||||||
t' <- applyEnv t
|
t' <- applyEnv t
|
||||||
e' <- applyEnvExp e
|
e' <- applyEnvExp e
|
||||||
let rhs' = skipLambdas (length vars) e'
|
pure (T.Bind (coerce name, t') [] (e', t'))
|
||||||
vars' = zip vars $ getVars t'
|
|
||||||
pure (T.Bind (coerce name, t') (coerce vars') (rhs', t'))
|
|
||||||
env <- gets env
|
env <- gets env
|
||||||
unless (isComplete env) err
|
unless (isComplete env) err
|
||||||
putEnv Empty
|
putEnv Empty
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue