Skip to content

Commit

Permalink
Merge pull request #68 from alexhumphreys/fix/show-union
Browse files Browse the repository at this point in the history
Fix `show` union
  • Loading branch information
alexhumphreys authored May 23, 2021
2 parents 01e6cf4 + 9cb2886 commit 1e509e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Idrall/Expr.idr
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ mutual
show (EAssert x) = "(EAssert " ++ show x ++ ")"
show (ERecord x) = "(ERecord " ++ show x ++ ")"
show (ERecordLit x) = "(ERecordLit " ++ show x ++ ")"
show (EUnion x) = "(EUnion " ++ show x ++ ")"
show (EUnion x) = "(EUnion $ " ++ show x ++ ")"
show (ECombine x y) = "(ECombine " ++ show x ++ " " ++ show y ++ ")"
show (ECombineTypes x y) = "(ECombineTypes " ++ show x ++ " " ++ show y ++ ")"
show (EPrefer x y) = "(EPrefer " ++ show x ++ " " ++ show y ++ ")"
Expand Down
4 changes: 2 additions & 2 deletions tests/idrall/idrall005/expected
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,9 @@ AlphaEquivError:(VWith (VNaturalLit 2) [(MkFieldName "a")] (VNaturalLit 3))
(VNaturalLit 3)
Testing: ("../../../dhall-lang/tests/normalization/success", "WithRecordValue")
Testing: ("../../../dhall-lang/tests/normalization/success", "remoteSystems")
AlphaEquivError:(VTextAppend (VTextLit (MkVChunks [(" ", (VMerge (VRecordLit $ fromList [((MkFieldName "None"), (VField (VVar "x" 0) (MkFieldName "host"))), ((MkFieldName "Some"), (VLambda VText (MkClosure "user" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ETextLit MkChunks [("", (EVar "user" 0)), ("@", (EField (EVar "x" 0) (MkFieldName "host")))] ""))))]) (VField (VVar "x" 0) (MkFieldName "user")) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "platforms")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextAppend (ETextAppend (EVar "element" 0) (ETextLit MkChunks [] ",")) (EVar "result" 0)))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VField (VVar "x" 0) (MkFieldName "key"))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "cores"))))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "speedFactor"))))), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "supportedFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextAppend (ETextAppend (EVar "element" 0) (ETextLit MkChunks [] ",")) (EVar "result" 0)))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "mandatoryFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextAppend (ETextAppend (EVar "element" 0) (ETextLit MkChunks [] ",")) (EVar "result" 0)))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing))] "\n ")) (VVar "y" 0))
AlphaEquivError:(VTextAppend (VTextLit (MkVChunks [(" ", (VMerge (VRecordLit $ fromList [((MkFieldName "None"), (VField (VVar "x" 0) (MkFieldName "host"))), ((MkFieldName "Some"), (VLambda VText (MkClosure "user" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ETextLit MkChunks [("", (EVar "user" 0)), ("@", (EField (EVar "x" 0) (MkFieldName "host")))] ""))))]) (VField (VVar "x" 0) (MkFieldName "user")) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "platforms")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextAppend (ETextAppend (EVar "element" 0) (ETextLit MkChunks [] ",")) (EVar "result" 0)))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VField (VVar "x" 0) (MkFieldName "key"))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "cores"))))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "speedFactor"))))), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "supportedFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextAppend (ETextAppend (EVar "element" 0) (ETextLit MkChunks [] ",")) (EVar "result" 0)))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "mandatoryFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextAppend (ETextAppend (EVar "element" 0) (ETextLit MkChunks [] ",")) (EVar "result" 0)))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing))] "\n ")) (VVar "y" 0))
not alpha equivalent to:
(VTextLit (MkVChunks [(" ", (VMerge (VRecordLit $ fromList [((MkFieldName "None"), (VField (VVar "x" 0) (MkFieldName "host"))), ((MkFieldName "Some"), (VLambda VText (MkClosure "user" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ETextLit MkChunks [("", (EVar "user" 0)), ("@", (EField (EVar "x" 0) (MkFieldName "host")))] ""))))]) (VField (VVar "x" 0) (MkFieldName "user")) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "platforms")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextLit MkChunks [("", (EVar "element" 0)), (",", (EVar "result" 0))] ""))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VField (VVar "x" 0) (MkFieldName "key"))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "cores"))))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "speedFactor"))))), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "supportedFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextLit MkChunks [("", (EVar "element" 0)), (",", (EVar "result" 0))] ""))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "mandatoryFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextLit MkChunks [("", (EVar "element" 0)), (",", (EVar "result" 0))] ""))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), ("\n ", (VVar "y" 0))] ""))
(VTextLit (MkVChunks [(" ", (VMerge (VRecordLit $ fromList [((MkFieldName "None"), (VField (VVar "x" 0) (MkFieldName "host"))), ((MkFieldName "Some"), (VLambda VText (MkClosure "user" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ETextLit MkChunks [("", (EVar "user" 0)), ("@", (EField (EVar "x" 0) (MkFieldName "host")))] ""))))]) (VField (VVar "x" 0) (MkFieldName "user")) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "platforms")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextLit MkChunks [("", (EVar "element" 0)), (",", (EVar "result" 0))] ""))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VField (VVar "x" 0) (MkFieldName "key"))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "cores"))))), (" ", (VIntegerShow (VNaturalToInteger (VField (VVar "x" 0) (MkFieldName "speedFactor"))))), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "supportedFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextLit MkChunks [("", (EVar "element" 0)), (",", (EVar "result" 0))] ""))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), (" ", (VMerge (VRecordLit $ fromList [((MkFieldName "Empty"), (VTextLit (MkVChunks [] ""))), ((MkFieldName "NonEmpty"), (VLambda VText (MkClosure "result" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (EVar "result" 0))))]) (VListFold VText (VField (VVar "x" 0) (MkFieldName "mandatoryFeatures")) (VUnion fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)]) (VLambda VText (MkClosure "element" (Extend (Extend (Extend Empty "xs" (VVar "xs" 0)) "x" (VVar "x" 0)) "y" (VVar "y" 0)) (ELam status (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (EMerge (ERecordLit fromList [((MkFieldName "Empty"), (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (EVar "element" 0))), ((MkFieldName "NonEmpty"), (ELam result EText (EApp (EField (EUnion $ fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just EText)]) (MkFieldName "NonEmpty")) (ETextLit MkChunks [("", (EVar "element" 0)), (",", (EVar "result" 0))] ""))))]) (EVar "status" 0) Nothing)))) (VInject fromList [((MkFieldName "Empty"), Nothing), ((MkFieldName "NonEmpty"), Just VText)] (MkFieldName "Empty") Nothing)) Nothing)), ("\n ", (VVar "y" 0))] ""))
Result:
Pass: 221
Fail: 48
Expand Down

0 comments on commit 1e509e1

Please sign in to comment.