File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,11 @@ normalizeWithM ctx e0 = loop (Syntax.denote e0)
629
629
return $ case x' of
630
630
Field (Union ktsY) (Syntax. fieldSelectionLabel -> kY) ->
631
631
case Dhall.Map. lookup kY ktsY of
632
- Just _ -> TextLit (Chunks [] kY)
632
+ Just Nothing -> TextLit (Chunks [] kY)
633
+ _ -> ShowConstructor x'
634
+ App (Field (Union ktsY) (Syntax. fieldSelectionLabel -> kY)) _ ->
635
+ case Dhall.Map. lookup kY ktsY of
636
+ Just (Just _) -> TextLit (Chunks [] kY)
633
637
_ -> ShowConstructor x'
634
638
Some _ ->
635
639
TextLit (Chunks [] " Some" )
@@ -940,7 +944,14 @@ isNormalized e0 = loop (Syntax.denote e0)
940
944
RecordLit _ -> False
941
945
_ -> loop x && all loop t
942
946
ShowConstructor x -> loop x && case x of
943
- Field (Union _) _ -> False
947
+ Field (Union kts) (Syntax. fieldSelectionLabel -> k) ->
948
+ case Dhall.Map. lookup k kts of
949
+ Just Nothing -> False
950
+ _ -> True
951
+ App (Field (Union kts) (Syntax. fieldSelectionLabel -> k)) _ ->
952
+ case Dhall.Map. lookup k kts of
953
+ Just (Just _) -> False
954
+ _ -> True
944
955
Some _ -> False
945
956
App None _ -> False
946
957
_ -> True
You can’t perform that action at this time.
0 commit comments