You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
fst<$> runAssignment "magenta green green" (symbol Magenta*> many green <|> symbol Magenta*> many blue) (makeState [node Magenta07[], node Green813[], node Green1419[]])
61
+
`shouldBe`
62
+
Right [Out"green", Out"green"]
66
63
67
-
it "distributes through overlapping committed choices, dropping anonymous nodes & matching the left alternative"$
68
-
fst<$> runAssignment "magenta green" (symbol Magenta*> green <|> symbol Magenta*> blue) (makeState [node Magenta07[], node Green813[]])
69
-
`shouldBe`
70
-
Right (Out"green")
64
+
it "matches the empty list"$
65
+
fst<$> runAssignment "magenta" (symbol Magenta*>(Left<$> many green)<|> symbol Magenta*>(Right<$> many blue)) (makeState [node Magenta07[]])
66
+
`shouldBe`
67
+
Right (Left[])
71
68
72
-
it "distributes through overlapping committed choices, dropping anonymous nodes & matching the right alternative"$
73
-
fst<$> runAssignment "magenta blue" (symbol Magenta*> green <|> symbol Magenta*> blue) (makeState [node Magenta07[], node Blue812[]])
74
-
`shouldBe`
75
-
Right (Out"blue")
69
+
it "drops anonymous nodes & matches the left alternative"$
70
+
fst<$> runAssignment "magenta green" (symbol Magenta*> green <|> symbol Magenta*> blue) (makeState [node Magenta07[], node Green813[]])
71
+
`shouldBe`
72
+
Right (Out"green")
73
+
74
+
it "drops anonymous nodes & matches the right alternative"$
75
+
fst<$> runAssignment "magenta blue" (symbol Magenta*> green <|> symbol Magenta*> blue) (makeState [node Magenta07[], node Blue812[]])
76
+
`shouldBe`
77
+
Right (Out"blue")
76
78
77
79
it "alternates repetitions, matching the left alternative"$
78
80
fst<$> runAssignment "green green" (many green <|> many blue) (makeState [node Green05[], node Green611[]])
0 commit comments