@@ -579,7 +579,8 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
579579 -- If we're inferring metavariables in the type, don't recheck,
580580 -- because we're only doing this to try to work out those metavariables
581581 (clhs_c, clhsty) <- if not inf
582− then recheckC fc id [] lhs_tm
582+ then recheckC_borrowing False (PEGenerated `notElem` opts)
583+ [] fc id [] lhs_tm
583584 else return (lhs_tm, lhs_ty)
584585 let clhs = normalise ctxt [] clhs_c
585586 let borrowed = borrowedNames [] clhs
@@ -681,14 +682,16 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
681682 logLvl 6 $ " ==> " ++ show (forget rhs')
682683
683684 (crhs, crhsty) <- if not inf
684− then recheckC_borrowing True borrowed fc id [] rhs'
685+ then recheckC_borrowing True (PEGenerated `notElem` opts)
686+ borrowed fc id [] rhs'
685687 else return (rhs', clhsty)
686688 logLvl 6 $ " ==> " ++ showEnvDbg [] crhsty ++ " against " ++ showEnvDbg [] clhsty
687689 ctxt <- getContext
688690 let constv = next_tvar ctxt
689691 case LState.runStateT (convertsC ctxt [] crhsty clhsty) (constv, []) of
690− OK (_, cs) -> do addConstraints fc cs
691− logLvl 6 $ "CONSTRAINTS ADDED: " ++ show cs
692+ OK (_, cs) -> when (PEGenerated `notElem` opts) $ do
693+ addConstraints fc cs
694+ logLvl 6 $ "CONSTRAINTS ADDED: " ++ show cs ++ "\n" ++ show (clhsty, crhsty)
692695 return ()
693696 Error e -> ierror (At fc (CantUnify False (clhsty, Nothing) (crhsty, Nothing) e [] 0))
694697 i <- getIState