@@ -505,6 +505,7 @@ elab ist info emode opts fn tm
505 showHd (PApp _ (PRef _ _ n) _) = return n
505 showHd (PApp _ (PRef _ _ n) _) = return n
506 showHd (PRef _ _ n) = return n
506 showHd (PRef _ _ n) = return n
507 showHd (PApp _ h _) = showHd h
507 showHd (PApp _ h _) = showHd h
508+ showHd (PHidden h) = showHd h
508 showHd x = getNameFrom (sMN 0 "_") -- We probably should do something better than this here
509 showHd x = getNameFrom (sMN 0 "_") -- We probably should do something better than this here
510 doPrune as =
511 doPrune as =
@@ -1292,11 +1293,16 @@ elab ist info emode opts fn tm
1292 -- Delay dotted things to the end, then when we elaborate them
1293 -- Delay dotted things to the end, then when we elaborate them
1293 -- we can check the result against what was inferred
1294 -- we can check the result against what was inferred
1294 movelast h
1295 movelast h
1296+ (h' : hs) <- get_holes
1297+ -- If we're at the end anyway, do it now
1298+ if h == h' then elabHidden h
1299+ else delayElab 10 $ elabHidden h
1295− delayElab 10 $ do hs <- get_holes
1301+ elabHidden h = do hs <- get_holes
1296− when (h `elem` hs) $ do
1302+ when (h `elem` hs) $ do
1297− focus h
1303+ focus h
1298− dotterm
1304+ dotterm
1299− elab' ina fc t
1305+ elab' ina fc t
1300 elab' ina fc (PRunElab fc' tm ns) =
1306 elab' ina fc (PRunElab fc' tm ns) =
1301 do unless (ElabReflection `elem` idris_language_extensions ist) $
1307 do unless (ElabReflection `elem` idris_language_extensions ist) $
1302 lift $ tfail $ At fc' (Msg "You must turn on the ElabReflection extension to use %runElab")
1308 lift $ tfail $ At fc' (Msg "You must turn on the ElabReflection extension to use %runElab")