@@ -51,17 +51,17 @@ isType ctxt env tm = isType' (normalise ctxt env tm)
51 | otherwise = fail (showEnv env tm ++ " is not a Type")
51 | otherwise = fail (showEnv env tm ++ " is not a Type")
53recheck :: Context -> Env -> Raw -> Term -> TC (Term, Type, UCs)
53recheck :: Context -> Env -> Raw -> Term -> TC (Term, Type, UCs)
54−recheck = recheck_borrowing []
54+recheck = recheck_borrowing False []
56−recheck_borrowing :: [Name] -> Context -> Env -> Raw -> Term ->
56+recheck_borrowing :: Bool -> [Name] -> Context -> Env -> Raw -> Term ->
57 TC (Term, Type, UCs)
57 TC (Term, Type, UCs)
58−recheck_borrowing bs ctxt env tm orig
58+recheck_borrowing uniq_check bs ctxt env tm orig
59 = let v = next_tvar ctxt in
59 = let v = next_tvar ctxt in
60 case runStateT (check' False ctxt env tm) (v, []) of -- holes banned
60 case runStateT (check' False ctxt env tm) (v, []) of -- holes banned
61 Error (IncompleteTerm _) -> Error $ IncompleteTerm orig
61 Error (IncompleteTerm _) -> Error $ IncompleteTerm orig
62 Error e -> Error e
62 Error e -> Error e
63 OK ((tm, ty), constraints) ->
63 OK ((tm, ty), constraints) ->
64− do checkUnique bs ctxt env tm
64+ do when uniq_check $ checkUnique bs ctxt env tm
65 return (tm, ty, constraints)
65 return (tm, ty, constraints)
67check :: Context -> Env -> Raw -> TC (Term, Type)
67check :: Context -> Env -> Raw -> TC (Term, Type)