@@ -158,20 +158,20 @@ elab ist info pattern opts fn tm
159 elabE :: (Bool, Bool, Bool) -> PTerm -> ElabD ()
159 elabE :: (Bool, Bool, Bool) -> PTerm -> ElabD ()
160 elabE ina t =
160 elabE ina t =
161−-- do g <- goal
161+ --do g <- goal
162−-- trace ("Elaborating " ++ show t ++ " : " ++ show g) $
162+ --trace ("Elaborating " ++ show t ++ " : " ++ show g) $
163 do ct <- insertCoerce ina t
163 do ct <- insertCoerce ina t
164 t' <- insertLazy ct
164 t' <- insertLazy ct
165 g <- goal
165 g <- goal
166 tm <- get_term
166 tm <- get_term
167 ps <- get_probs
167 ps <- get_probs
168 hs <- get_holes
168 hs <- get_holes
169−-- trace ("Elaborating " ++ show t' ++ " in " ++ show g
169+ --trace ("Elaborating " ++ show t' ++ " in " ++ show g
170−-- -- ++ "\n" ++ show tm
170+ -- ++ "\n" ++ show tm
171−-- ++ "\nholes " ++ show hs
171+ -- ++ "\nholes " ++ show hs
172−-- ++ "\nproblems " ++ show ps
172+ -- ++ "\nproblems " ++ show ps
173−-- ++ "\n-----------\n") $
173+ -- ++ "\n-----------\n") $
174−-- trace ("ELAB " ++ show t') $
174+ --trace ("ELAB " ++ show t') $
175 let fc = fileFC "Force"
175 let fc = fileFC "Force"
176 handleError forceErr
176 handleError forceErr
177 (elab' ina t')
177 (elab' ina t')
@@ -694,7 +694,6 @@ elab ist info pattern opts fn tm
694 mkDelay (PAlternative b xs) = PAlternative b (map mkDelay xs)
694 mkDelay (PAlternative b xs) = PAlternative b (map mkDelay xs)
695 mkDelay t = let fc = fileFC "Delay" in
695 mkDelay t = let fc = fileFC "Delay" in
696 addImpl ist (PApp fc (PRef fc (sUN "Delay")) [pexp t])
696 addImpl ist (PApp fc (PRef fc (sUN "Delay")) [pexp t])
699 insertCoerce ina t =
698 insertCoerce ina t =
700 do ty <- goal
699 do ty <- goal
@@ -737,8 +736,8 @@ elab ist info pattern opts fn tm
738 | otherwise = elabArg argName holeName t
737 | otherwise = elabArg argName holeName t
739 where elabArg argName holeName t =
738 where elabArg argName holeName t =
740− reflectFunctionErrors ist f argName $
739+ do now_elaborating fc f argName
741− do hs <- get_holes
740+ hs <- get_holes
742 tm <- get_term
741 tm <- get_term
743 -- No coercing under an explicit Force (or it can Force/Delay
742 -- No coercing under an explicit Force (or it can Force/Delay
744 -- recursively!)
743 -- recursively!)
@@ -748,6 +747,7 @@ elab ist info pattern opts fn tm
748 case holeName `elem` hs of
747 case holeName `elem` hs of
749 True -> do focus holeName; elab ina t; return failed
748 True -> do focus holeName; elab ina t; return failed
750 False -> return failed
749 False -> return failed
750+ done_elaborating_arg f argName
751 elabArgs ist ina failed fc r f ns force args
751 elabArgs ist ina failed fc r f ns force args
753-- | Perform error reflection for function applicaitons with specific error handlers
753-- | Perform error reflection for function applicaitons with specific error handlers