@@ -258,6 +258,10 @@ checkUnique borrowed ctxt env tm
258 chkBinders env (Bind n b t)
258 chkBinders env (Bind n b t)
259 = do chkBinderName env n b
259 = do chkBinderName env n b
260 chkBinders ((n, b) : env) t
260 chkBinders ((n, b) : env) t
261+ chkBinders env (binderTy b)
263+ Let t v -> chkBinders env v
261 chkBinders env t = return ()
265 chkBinders env t = return ()
263 chkBinderName :: Env -> Name -> Binder Term ->
267 chkBinderName :: Env -> Name -> Binder Term ->
@@ -275,10 +279,6 @@ checkUnique borrowed ctxt env tm
275 UType AllTypes -> do ns <- get
279 UType AllTypes -> do ns <- get
276 put ((n, (Once, AllTypes)) : ns)
280 put ((n, (Once, AllTypes)) : ns)
277 _ -> return ()
281 _ -> return ()
278− chkBinders env (binderTy b)
280− Let t v -> chkBinders env v
283 chkName n
283 chkName n
284 = do ns <- get
284 = do ns <- get