@@ -49,7 +49,7 @@ elabType info syn fc n ty' = {- let ty' = piBind (params info) ty_in
4949 ds <- checkDef fc ((n, nty):defer)
5050 addIBC (IBCDef n)
5151 addDeferred ds
52− mapM_ (elabDecl' info) is
52+ mapM_ (elabCaseBlock info) is
5353
5454elabData :: ElabInfo -> SyntaxInfo -> FC -> PData -> Idris ()
5555elabData info syn fc (PDatadecl n t_in dcons)
@@ -63,7 +63,7 @@ elabData info syn fc (PDatadecl n t_in dcons)
6363 (erun fc (build i info False n t))
6464 def' <- checkDef fc defer
6565 addDeferred def'
66− mapM_ (elabDecl' info) is
66+ mapM_ (elabCaseBlock info) is
6767 (cty, _) <- recheckC ctxt fc [] t'
6868 logLvl 2 $ "---> " ++ show cty
6969 updateContext (addTyDecl n cty) -- temporary, to check cons
@@ -85,7 +85,7 @@ elabCon info syn (n, t_in, fc)
8585 logLvl 2 $ "Rechecking " ++ show t'
8686 def' <- checkDef fc defer
8787 addDeferred def'
88− mapM_ (elabDecl' info) is
88+ mapM_ (elabCaseBlock info) is
8989 ctxt <- getContext
9090 (cty, _) <- recheckC ctxt fc [] t'
9191 logLvl 2 $ "---> " ++ show n ++ " : " ++ show cty
@@ -95,8 +95,8 @@ elabCon info syn (n, t_in, fc)
9595elabClauses :: ElabInfo -> FC -> FnOpts -> Name -> [PClause] -> Idris ()
9696elabClauses info fc opts n_in cs_in = let n = liftname info n_in in
9797 do let cs = genClauses cs_in
98− solveDeferred n
9998 pats_in <- mapM (elabClause info fc (TCGen `elem` opts)) cs
99+ solveDeferred n
100100 let pats = mapMaybe id pats_in
101101 logLvl 3 (showSep "\n" (map (\ (l,r) ->
102102 show l ++ " = " ++
@@ -192,7 +192,7 @@ elabClause info fc tcgen (PClause fname lhs_in withs rhs_in whereblock)
192192 when (not (null defer)) $ iLOG $ "DEFERRED " ++ show defer
193193 def' <- checkDef fc defer
194194 addDeferred def'
195− mapM_ (elabDecl' info) is
195+ mapM_ (elabCaseBlock info) is
196196 ctxt <- getContext
197197 logLvl 5 $ "Rechecking"
198198 (crhs, crhsty) <- recheckC ctxt fc [] rhs'
@@ -242,7 +242,7 @@ elabClause info fc tcgen (PWith fname lhs_in withs wval_in withblock)
242242 return (tt, d, is))
243243 def' <- checkDef fc defer
244244 addDeferred def'
245− mapM_ (elabDecl' info) is
245+ mapM_ (elabCaseBlock info) is
246246 (cwval, cwvalty) <- recheckC ctxt fc [] (getInferTerm wval')
247247 logLvl 3 ("With type " ++ show cwvalty ++ "\nRet type " ++ show ret_ty)
248248 windex <- getName
@@ -278,7 +278,7 @@ elabClause info fc tcgen (PWith fname lhs_in withs wval_in withblock)
278278 return (tt, d, is))
279279 def' <- checkDef fc defer
280280 addDeferred def'
281− mapM_ (elabDecl' info) is
281+ mapM_ (elabCaseBlock info) is
282282 (crhs, crhsty) <- recheckC ctxt fc [] rhs'
283283 return $ Just (clhs, crhs)
284284 where
@@ -585,6 +585,9 @@ elabDecl' info (PInstance s f cs n ps t ds)
585585 elabInstance info s f cs n ps t ds
586586elabDecl' info (PDirective i) = i
587587
588+elabCaseBlock info d@(PClauses f o n ps)
589+ = elabDecl' info d
590+
588591-- elabDecl' info (PImport i) = loadModule i
589592
590593