@@ -733,7 +733,7 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
733 -- Build the LHS as an "Infer", and pull out its type and
733 -- Build the LHS as an "Infer", and pull out its type and
734 -- pattern bindings
734 -- pattern bindings
735 i <- getIState
735 i <- getIState
736− let lhs = addImpl i lhs_in
736+ let lhs = addImplPat i lhs_in
737 logLvl 5 ("LHS: " ++ showImp True lhs)
737 logLvl 5 ("LHS: " ++ showImp True lhs)
738 ((lhs', dlhs, []), _) <-
738 ((lhs', dlhs, []), _) <-
739 tclift $ elaborate ctxt (MN 0 "patLHS") infP []
739 tclift $ elaborate ctxt (MN 0 "patLHS") infP []
@@ -831,18 +831,18 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
832 mkAux wname toplhs ns ns' (PClause fc n tm_in (w:ws) rhs wheres)
832 mkAux wname toplhs ns ns' (PClause fc n tm_in (w:ws) rhs wheres)
833 = do i <- getIState
833 = do i <- getIState
834− let tm = addImpl i tm_in
834+ let tm = addImplPat i tm_in
835 logLvl 2 ("Matching " ++ showImp True tm ++ " against " ++
835 logLvl 2 ("Matching " ++ showImp True tm ++ " against " ++
836 showImp True toplhs)
836 showImp True toplhs)
837 case matchClause i toplhs tm of
837 case matchClause i toplhs tm of
838− Left _ -> fail $ show fc ++ "with clause does not match top level"
838+ Left f -> fail $ show fc ++ ":with clause does not match top level"
839 Right mvars ->
839 Right mvars ->
840 do logLvl 3 ("Match vars : " ++ show mvars)
840 do logLvl 3 ("Match vars : " ++ show mvars)
841 lhs <- updateLHS n wname mvars ns ns' (fullApp tm) w
841 lhs <- updateLHS n wname mvars ns ns' (fullApp tm) w
842 return $ PClause fc wname lhs ws rhs wheres
842 return $ PClause fc wname lhs ws rhs wheres
843 mkAux wname toplhs ns ns' (PWith fc n tm_in (w:ws) wval withs)
843 mkAux wname toplhs ns ns' (PWith fc n tm_in (w:ws) wval withs)
844 = do i <- getIState
844 = do i <- getIState
845− let tm = addImpl i tm_in
845+ let tm = addImplPat i tm_in
846 logLvl 2 ("Matching " ++ showImp True tm ++ " against " ++
846 logLvl 2 ("Matching " ++ showImp True tm ++ " against " ++
847 showImp True toplhs)
847 showImp True toplhs)
848 withs' <- mapM (mkAuxC wname toplhs ns ns') withs
848 withs' <- mapM (mkAuxC wname toplhs ns ns') withs