@@ -318,6 +318,7 @@ elab ist info emode opts fn tm
318 g <- goal
318 g <- goal
319 case g of
319 case g of
320 TType _ -> elab' ina (Just fc) (PRef fc unitTy)
320 TType _ -> elab' ina (Just fc) (PRef fc unitTy)
321+ UType _ -> elab' ina (Just fc) (PRef fc unitTy)
321 _ -> elab' ina (Just fc) (PRef fc unitCon)
322 _ -> elab' ina (Just fc) (PRef fc unitCon)
322 elab' ina fc (PResolveTC (FC "HACK" _ _)) -- for chasing parent classes
323 elab' ina fc (PResolveTC (FC "HACK" _ _)) -- for chasing parent classes
323 = do g <- goal; resolveTC False 5 g fn ist
324 = do g <- goal; resolveTC False 5 g fn ist
@@ -353,13 +354,32 @@ elab ist info emode opts fn tm
353 elab' ina _ (PPair fc _ l r)
354 elab' ina _ (PPair fc _ l r)
354 = do hnf_compute
355 = do hnf_compute
355 g <- goal
356 g <- goal
357+ let (tc, _) = unApply g
356 case g of
358 case g of
357 TType _ -> elab' ina (Just fc) (PApp fc (PRef fc pairTy)
359 TType _ -> elab' ina (Just fc) (PApp fc (PRef fc pairTy)
358 [pexp l,pexp r])
360 [pexp l,pexp r])
361+ UType _ -> elab' ina (Just fc) (PApp fc (PRef fc upairTy)
364+ P _ n _ | n == upairTy
359− _ -> elab' ina (Just fc) (PApp fc (PRef fc pairCon)
365+ -> elab' ina (Just fc) (PApp fc (PRef fc upairCon)
360 [pimp (sUN "A") Placeholder False,
366 [pimp (sUN "A") Placeholder False,
361 pimp (sUN "B") Placeholder False,
367 pimp (sUN "B") Placeholder False,
362 pexp l, pexp r])
368 pexp l, pexp r])
369+ _ -> elab' ina (Just fc) (PApp fc (PRef fc pairCon)
370+ [pimp (sUN "A") Placeholder False,
371+ pimp (sUN "B") Placeholder False,
373+-- _ -> try' (elab' ina (Just fc) (PApp fc (PRef fc pairCon)
374+-- [pimp (sUN "A") Placeholder False,
375+-- pimp (sUN "B") Placeholder False,
377+-- (elab' ina (Just fc) (PApp fc (PRef fc upairCon)
378+-- [pimp (sUN "A") Placeholder False,
379+-- pimp (sUN "B") Placeholder False,
363 elab' ina _ (PDPair fc p l@(PRef _ n) t r)
383 elab' ina _ (PDPair fc p l@(PRef _ n) t r)
364 = case t of
384 = case t of
365 Placeholder ->
385 Placeholder ->