Skip re-typechecking the first non-empty union alternative (#1057)

For the deep-nested-large-record benchmark, this results in a
speedup of about 0.5–1%.
This commit is contained in:
Simon Jakobi 2019-07-03 18:57:05 +02:00 committed by mergify[bot]
parent e061f35c4c
commit c7e48bf497

View File

@ -546,7 +546,7 @@ typeWithA tpa = loop
then return ()
else Left (TypeError ctx e (AlternativeAnnotationMismatch k t c k0 t0 c0))
Dhall.Map.unorderedTraverseWithKey_ process kts
Dhall.Map.unorderedTraverseWithKey_ process (Dhall.Map.delete k0 kts)
return (Const c0)
loop ctx e@(UnionLit k v kts) = do