@@ -484,16 +484,17 @@ apply_elab n args =
484 mkMN (NS n ns) = NS (mkMN n) ns
484 mkMN (NS n ns) = NS (mkMN n) ns
486-- If the goal is not a Pi-type, invent some names and make it a pi type
486-- If the goal is not a Pi-type, invent some names and make it a pi type
487−checkPiGoal :: Elab' aux ()
487+checkPiGoal :: Name -> Elab' aux ()
488−checkPiGoal = do g <- goal
488+checkPiGoal n
489 case g of
490 case g of
490 Bind _ (Pi _) _ -> return ()
491 Bind _ (Pi _) _ -> return ()
491− _ -> do a <- unique_hole (MN 0 "argTy")
492+ _ -> do a <- unique_hole (MN 0 "pargTy")
492− b <- unique_hole (MN 0 "retTy")
493+ b <- unique_hole (MN 0 "pretTy")
493− f <- unique_hole (MN 0 "f")
494+ f <- unique_hole (MN 0 "pf")
494 claim a RType
495 claim a RType
495 claim b RType
496 claim b RType
496− claim f (RBind (MN 0 "aX") (Pi (Var a)) (Var b))
497+ claim f (RBind n (Pi (Var a)) (Var b))
497 movelast a
498 movelast a
498 movelast b
499 movelast b
499 fill (Var f)
500 fill (Var f)