@@ -527,13 +527,16 @@ elab ist info pattern tm
527527 pimp (MN 0 "B") Placeholder,
528528 pexp l, pexp r]))
529529 elab' (PDPair fc l@(PRef _ n) t r)
530− = try (elab' (PApp fc (PRef fc sigmaTy)
530+ = case t of
531+ Placeholder -> try asType asValue
532+ _ -> asType
533+ where asType = elab' (PApp fc (PRef fc sigmaTy)
531534 [pexp t,
532− pexp (PLam n Placeholder r)]))
533− (elab' (PApp fc (PRef fc existsCon)
534− [pimp (MN 0 "a") t,
535− pimp (MN 0 "P") Placeholder,
536− pexp l, pexp r]))
535+ pexp (PLam n Placeholder r)])
536+ asValue = elab' (PApp fc (PRef fc existsCon)
537+ [pimp (MN 0 "a") t,
538+ pimp (MN 0 "P") Placeholder,
539+ pexp l, pexp r])
537540 elab' (PDPair fc l t r) = elab' (PApp fc (PRef fc existsCon)
538541 [pimp (MN 0 "a") t,
539542 pimp (MN 0 "P") Placeholder,
@@ -559,7 +562,9 @@ elab ist info pattern tm
559562 elab' (PPi _ n ty sc)
560563 = do attack; tyn <- unique_hole (MN 0 "ty")
561564 claim tyn (RSet 0)
562− n' <- unique_hole n
565+ n' <- case n of
566+ MN _ _ -> unique_hole n
567+ _ -> return n
563568 forall n' (Var tyn)
564569 focus tyn
565570 elabE ty