@@ -277,7 +277,8 @@ elabClauses info fc opts n_in cs = let n = liftname info n_in in
277 -- question: CAFs in where blocks?
277 -- question: CAFs in where blocks?
278 tclift $ tfail $ (At fc (NoTypeDecl n))
278 tclift $ tfail $ (At fc (NoTypeDecl n))
279 [ty] -> return ty
279 [ty] -> return ty
280− pats_in <- mapM (elabClause info (TCGen `elem` opts)) cs
280+ pats_in <- mapM (elabClause info (TCGen `elem` opts))
281 -- if the return type of 'ty' is collapsible, the optimised version should
282 -- if the return type of 'ty' is collapsible, the optimised version should
282 -- just do nothing
283 -- just do nothing
283 ist <- get
284 ist <- get
@@ -439,14 +440,15 @@ checkPossible info fc tcgen fname lhs_in
439-- trace (show (delab' i lhs_tm True) ++ "\n" ++ show lhs) $ return (not b)
440-- trace (show (delab' i lhs_tm True) ++ "\n" ++ show lhs) $ return (not b)
440 Error _ -> return False
441 Error _ -> return False
442−elabClause :: ElabInfo -> Bool -> PClause -> Idris (Either Term (Term, Term))
443+elabClause :: ElabInfo -> Bool -> (Int, PClause) ->
444+ Idris (Either Term (Term, Term))
443−elabClause info tcgen (PClause fc fname lhs_in [] PImpossible [])
445+elabClause info tcgen (_, PClause fc fname lhs_in [] PImpossible [])
444 = do b <- checkPossible info fc tcgen fname lhs_in
446 = do b <- checkPossible info fc tcgen fname lhs_in
445 case b of
447 case b of
446 True -> fail $ show fc ++ ":" ++ show lhs_in ++ " is a possible case"
448 True -> fail $ show fc ++ ":" ++ show lhs_in ++ " is a possible case"
447 False -> do ptm <- mkPatTm lhs_in
449 False -> do ptm <- mkPatTm lhs_in
448 return (Left ptm)
450 return (Left ptm)
449−elabClause info tcgen (PClause fc fname lhs_in withs rhs_in whereblock)
451+elabClause info tcgen (cnum, PClause fc fname lhs_in withs rhs_in whereblock)
450 = do ctxt <- getContext
452 = do ctxt <- getContext
451 -- Build the LHS as an "Infer", and pull out its type and
453 -- Build the LHS as an "Infer", and pull out its type and
452 -- pattern bindings
454 -- pattern bindings
@@ -503,7 +505,7 @@ elabClause info tcgen (PClause fc fname lhs_in withs rhs_in whereblock)
503 checkInferred fc (delab' i crhs True) rhs
505 checkInferred fc (delab' i crhs True) rhs
504 return $ Right (clhs, crhs)
506 return $ Right (clhs, crhs)
506− decorate x = UN (show x ++ "#" ++ show fname)
508+ decorate x = UN (show x ++ "#" ++ show cnum ++ "#" ++ show fname)
507 pinfo ns ps i
509 pinfo ns ps i
508 = let ds = concatMap declared ps
510 = let ds = concatMap declared ps
509 newps = params info ++ ns
511 newps = params info ++ ns
@@ -517,7 +519,7 @@ elabClause info tcgen (PClause fc fname lhs_in withs rhs_in whereblock)
517 -- _ -> MN i (show n)) . l
519 -- _ -> MN i (show n)) . l
520−elabClause info tcgen (PWith fc fname lhs_in withs wval_in withblock)
522+elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
521 = do ctxt <- getContext
523 = do ctxt <- getContext
522 -- Build the LHS as an "Infer", and pull out its type and
524 -- Build the LHS as an "Infer", and pull out its type and
523 -- pattern bindings
525 -- pattern bindings