@@ -484,16 +484,17 @@ apply_elab n args =
484484 mkMN (NS n ns) = NS (mkMN n) ns
485485
486486-- If the goal is not a Pi-type, invent some names and make it a pi type
487−checkPiGoal :: Elab' aux ()
488−checkPiGoal = do g <- goal
487+checkPiGoal :: Name -> Elab' aux ()
488+checkPiGoal n
489+ = do g <- goal
489490 case g of
490491 Bind _ (Pi _) _ -> return ()
491− _ -> do a <- unique_hole (MN 0 "argTy")
492− b <- unique_hole (MN 0 "retTy")
493− f <- unique_hole (MN 0 "f")
492+ _ -> do a <- unique_hole (MN 0 "pargTy")
493+ b <- unique_hole (MN 0 "pretTy")
494+ f <- unique_hole (MN 0 "pf")
494495 claim a RType
495496 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))
497498 movelast a
498499 movelast b
499500 fill (Var f)