-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.txt
311 lines (309 loc) · 28.8 KB
/
sample.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
% ghci Test.hs
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 8] Compiling Lens ( Lens.hs, interpreted )
[2 of 8] Compiling NatEncoded ( NatEncoded.hs, interpreted )
[3 of 8] Compiling Arrow ( Arrow.hs, interpreted )
[4 of 8] Compiling Pointed ( Pointed.hs, interpreted )
[5 of 8] Compiling Nat ( Nat.hs, interpreted )
[6 of 8] Compiling Transducer ( Transducer.hs, interpreted )
[7 of 8] Compiling Interpret ( Interpret.hs, interpreted )
[8 of 8] Compiling Test ( Test.hs, interpreted )
Ok, modules loaded: Nat, Test, Interpret, Transducer, Pointed, Arrow, NatEncoded, Lens.
*Test> test
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package QuickCheck-2.6 ... linking ... done.
[(\ x y -> x + y) 3 5] <- (Nothing,dd<4,2>)
[(\ x y -> x + y) 3] <- (Nothing,gdd<4,2>)
[\ x y -> x + y] <- (Nothing,ggdd<4,2>)
[\ x y -> x + y] -> (Nothing,dggdd<4,2>)
[\ x y -> x + y] <- (Nothing,dd<0,ggdd<4,2>>)
[\ y -> x + y] <- (Nothing,gdd<4,2>)
[\ y -> x + y] -> (Nothing,dgdd<4,2>)
[\ x y -> x + y] -> (Nothing,dd<0,gdgdd<4,2>>)
[\ x y -> x + y] <- (Nothing,dgdgdd<4,2>)
[\ x y -> x + y] -> (Nothing,gdgdd<4,2>)
[(\ x y -> x + y) 3] -> (Nothing,dgdd<4,2>)
[(\ x y -> x + y) 3] <- (Nothing,dd<0,gdd<4,2>>)
[\ x y -> x + y] <- (Nothing,gdd<0,gdd<4,2>>)
[\ x y -> x + y] -> (Nothing,dgdd<0,gdd<4,2>>)
[\ x y -> x + y] <- (Nothing,dd<0,gdd<0,gdd<4,2>>>)
[\ y -> x + y] <- (Nothing,dd<0,gdd<4,2>>)
[x + y] <- (Nothing,dd<4,2>)
[x + y] -> (Just "x",<4,2>)
[\ y -> x + y] -> (Just "x",<<0,4>,2>)
[\ x y -> x + y] -> (Nothing,dd<0,d<<0,4>,2>>)
[\ x y -> x + y] <- (Nothing,dd<0,d<<0,4>,3>>)
[\ y -> x + y] <- (Just "x",<<0,4>,3>)
[x + y] <- (Just "x",<4,3>)
[x + y] -> (Just "y",<<4,3>,0>)
[\ y -> x + y] -> (Nothing,dd<0,d<<4,3>,0>>)
[\ x y -> x + y] -> (Nothing,dd<0,gdd<0,d<<4,3>,0>>>)
[\ x y -> x + y] <- (Nothing,dgdd<0,d<<4,3>,0>>)
[\ x y -> x + y] -> (Nothing,gdd<0,d<<4,3>,0>>)
[(\ x y -> x + y) 3] -> (Nothing,dd<0,d<<4,3>,0>>)
[(\ x y -> x + y) 3] <- (Nothing,dd<0,d<<4,3>,5>>)
[\ x y -> x + y] <- (Nothing,gdd<0,d<<4,3>,5>>)
[\ x y -> x + y] -> (Nothing,dgdd<0,d<<4,3>,5>>)
[\ x y -> x + y] <- (Nothing,dd<0,gdd<0,d<<4,3>,5>>>)
[\ y -> x + y] <- (Nothing,dd<0,d<<4,3>,5>>)
[x + y] <- (Just "y",<<4,3>,5>)
[x + y] -> (Nothing,dd<4,8>)
[\ y -> x + y] -> (Nothing,dd<0,gdd<4,8>>)
[\ x y -> x + y] -> (Nothing,dd<0,gdd<0,gdd<4,8>>>)
[\ x y -> x + y] <- (Nothing,dgdd<0,gdd<4,8>>)
[\ x y -> x + y] -> (Nothing,gdd<0,gdd<4,8>>)
[(\ x y -> x + y) 3] -> (Nothing,dd<0,gdd<4,8>>)
[(\ x y -> x + y) 3] <- (Nothing,dgdd<4,8>)
[\ x y -> x + y] <- (Nothing,gdgdd<4,8>)
[\ x y -> x + y] -> (Nothing,dgdgdd<4,8>)
[\ x y -> x + y] <- (Nothing,dd<0,gdgdd<4,8>>)
[\ y -> x + y] <- (Nothing,dgdd<4,8>)
[\ y -> x + y] -> (Nothing,gdd<4,8>)
[\ x y -> x + y] -> (Nothing,dd<0,ggdd<4,8>>)
[\ x y -> x + y] <- (Nothing,dggdd<4,8>)
[\ x y -> x + y] -> (Nothing,ggdd<4,8>)
[(\ x y -> x + y) 3] -> (Nothing,gdd<4,8>)
[(\ x y -> x + y) 3 5] -> (Nothing,dd<4,8>)
8
*Test>
--------------------------------------------------------------------------------
*Test> testPaper
[(\ x -> (\ y z -> y + z) x x) (3 or 5)] <- (Nothing,dd<4,2>) @ (((),[_->((((),[_->((),[_->((),())])]),()),())]),Nothing)
[\ x -> (\ y z -> y + z) x x] <- (Nothing,gdd<4,2>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dgdd<4,2>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,gdd<4,2>) @ Nothing
[3] <- (Nothing,gdd<4,2>) @ ((),())
[3] -> (Nothing,dgdd<4,2>) @ ((),())
[5] <- (Nothing,gdd<4,2>) @ ((),())
[5] -> (Nothing,dgdd<4,2>) @ ((),())
[3 or 5] -> (Nothing,dgdd<4,2>) @ Just (Left ((),()))
[3 or 5] -> (Nothing,dgdd<4,2>) @ Just (Right ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dd<0,gdd<4,2>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ y z -> y + z) x x] <- (Nothing,dd<4,2>) @ ((((),[_->((),[_->((),())])]),()),())
[(\ y z -> y + z) x] <- (Nothing,gdd<4,2>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,ggdd<4,2>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dggdd<4,2>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,ggdd<4,2>) @ ()
[x (left)] -> (Nothing,dggdd<4,2>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,ggdd<4,2>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,gdd<4,2>) @ ((),[_->((),())])
[\ z -> y + z] -> (Nothing,dgdd<4,2>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,gdgdd<4,2>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dgdgdd<4,2>) @ ()
[x (left)] -> (Nothing,gdgdd<4,2>) @ ()
[\ y z -> y + z] <- (Nothing,dgdgdd<4,2>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,gdgdd<4,2>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,dgdd<4,2>) @ (((),[_->((),[_->((),())])]),())
[x (right)] <- (Nothing,gdd<4,2>) @ ()
[x (right)] -> (Nothing,dgdd<4,2>) @ ()
[(\ y z -> y + z) x] <- (Nothing,dd<0,gdd<4,2>>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,gdd<0,gdd<4,2>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dgdd<0,gdd<4,2>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,gdd<0,gdd<4,2>>) @ ()
[x (left)] -> (Nothing,dgdd<0,gdd<4,2>>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,gdd<0,gdd<4,2>>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,dd<0,gdd<4,2>>) @ ((),[_->((),())])
[y + z] <- (Nothing,dd<4,2>) @ ((),())
[y + z] -> (Just "y",<4,2>) @ ((),())
[\ z -> y + z] -> (Just "y",<<0,4>,2>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,d<<0,4>,2>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dd<<0,4>,2>) @ ()
[x (left)] -> (Just "x",<<0,4>,2>) @ ()
[(\ y z -> y + z) x] -> (Just "x",<d<0,4>,2>) @ (((),[_->((),[_->((),())])]),())
[(\ y z -> y + z) x x] -> (Just "x",<gd<0,4>,2>) @ ((((),[_->((),[_->((),())])]),()),())
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dd<0,d<gd<0,4>,2>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,dd<gd<0,4>,2>) @ Just (Left ((),()))
[3] <- (Nothing,dd<gd<0,4>,2>) @ ((),())
[3] -> (Nothing,dd<gd<0,4>,3>) @ ((),())
[3 or 5] -> (Nothing,dd<gd<0,4>,3>) @ Just (Left ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dd<0,d<gd<0,4>,3>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ y z -> y + z) x x] <- (Just "x",<gd<0,4>,3>) @ ((((),[_->((),[_->((),())])]),()),())
[(\ y z -> y + z) x] <- (Just "x",<d<0,4>,3>) @ (((),[_->((),[_->((),())])]),())
[x (left)] <- (Just "x",<<0,4>,3>) @ ()
[x (left)] -> (Nothing,dd<<0,4>,3>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,d<<0,4>,3>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Just "y",<<0,4>,3>) @ ((),[_->((),())])
[y + z] <- (Just "y",<4,3>) @ ((),())
[y + z] -> (Just "z",<<4,3>,0>) @ ((),())
[\ z -> y + z] -> (Nothing,dd<0,d<<4,3>,0>>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,gdd<0,d<<4,3>,0>>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dgdd<0,d<<4,3>,0>>) @ ()
[x (left)] -> (Nothing,gdd<0,d<<4,3>,0>>) @ ()
[\ y z -> y + z] <- (Nothing,dgdd<0,d<<4,3>,0>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,gdd<0,d<<4,3>,0>>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,dd<0,d<<4,3>,0>>) @ (((),[_->((),[_->((),())])]),())
[x (right)] <- (Nothing,dd<<4,3>,0>) @ ()
[x (right)] -> (Just "x",<<4,3>,0>) @ ()
[(\ y z -> y + z) x x] -> (Just "x",<d<4,3>,0>) @ ((((),[_->((),[_->((),())])]),()),())
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dd<0,d<d<4,3>,0>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,dd<d<4,3>,0>) @ Just (Left ((),()))
[3] <- (Nothing,dd<d<4,3>,0>) @ ((),())
[3] -> (Nothing,dd<d<4,3>,3>) @ ((),())
[3 or 5] -> (Nothing,dd<d<4,3>,3>) @ Just (Left ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dd<0,d<d<4,3>,3>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ y z -> y + z) x x] <- (Just "x",<d<4,3>,3>) @ ((((),[_->((),[_->((),())])]),()),())
[x (right)] <- (Just "x",<<4,3>,3>) @ ()
[x (right)] -> (Nothing,dd<<4,3>,3>) @ ()
[(\ y z -> y + z) x] <- (Nothing,dd<0,d<<4,3>,3>>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,gdd<0,d<<4,3>,3>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dgdd<0,d<<4,3>,3>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,gdd<0,d<<4,3>,3>>) @ ()
[x (left)] -> (Nothing,dgdd<0,d<<4,3>,3>>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,gdd<0,d<<4,3>,3>>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,dd<0,d<<4,3>,3>>) @ ((),[_->((),())])
[y + z] <- (Just "z",<<4,3>,3>) @ ((),())
[y + z] -> (Nothing,dd<4,6>) @ ((),())
[\ z -> y + z] -> (Nothing,dd<0,gdd<4,6>>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,gdd<0,gdd<4,6>>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dgdd<0,gdd<4,6>>) @ ()
[x (left)] -> (Nothing,gdd<0,gdd<4,6>>) @ ()
[\ y z -> y + z] <- (Nothing,dgdd<0,gdd<4,6>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,gdd<0,gdd<4,6>>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,dd<0,gdd<4,6>>) @ (((),[_->((),[_->((),())])]),())
[x (right)] <- (Nothing,dgdd<4,6>) @ ()
[x (right)] -> (Nothing,gdd<4,6>) @ ()
[(\ y z -> y + z) x] <- (Nothing,dgdd<4,6>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,gdgdd<4,6>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dgdgdd<4,6>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,gdgdd<4,6>) @ ()
[x (left)] -> (Nothing,dgdgdd<4,6>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,gdgdd<4,6>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,dgdd<4,6>) @ ((),[_->((),())])
[\ z -> y + z] -> (Nothing,gdd<4,6>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,ggdd<4,6>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dggdd<4,6>) @ ()
[x (left)] -> (Nothing,ggdd<4,6>) @ ()
[\ y z -> y + z] <- (Nothing,dggdd<4,6>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,ggdd<4,6>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,gdd<4,6>) @ (((),[_->((),[_->((),())])]),())
[(\ y z -> y + z) x x] -> (Nothing,dd<4,6>) @ ((((),[_->((),[_->((),())])]),()),())
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dd<0,gdd<4,6>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,dgdd<4,6>) @ Just (Left ((),()))
[3] <- (Nothing,dgdd<4,6>) @ ((),())
[3] -> (Nothing,gdd<4,6>) @ ((),())
[3 or 5] -> (Nothing,gdd<4,6>) @ Just (Left ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dgdd<4,6>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[\ x -> (\ y z -> y + z) x x] -> (Nothing,gdd<4,6>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dd<0,gdd<4,2>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ y z -> y + z) x x] <- (Nothing,dd<4,2>) @ ((((),[_->((),[_->((),())])]),()),())
[(\ y z -> y + z) x] <- (Nothing,gdd<4,2>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,ggdd<4,2>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dggdd<4,2>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,ggdd<4,2>) @ ()
[x (left)] -> (Nothing,dggdd<4,2>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,ggdd<4,2>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,gdd<4,2>) @ ((),[_->((),())])
[\ z -> y + z] -> (Nothing,dgdd<4,2>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,gdgdd<4,2>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dgdgdd<4,2>) @ ()
[x (left)] -> (Nothing,gdgdd<4,2>) @ ()
[\ y z -> y + z] <- (Nothing,dgdgdd<4,2>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,gdgdd<4,2>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,dgdd<4,2>) @ (((),[_->((),[_->((),())])]),())
[x (right)] <- (Nothing,gdd<4,2>) @ ()
[x (right)] -> (Nothing,dgdd<4,2>) @ ()
[(\ y z -> y + z) x] <- (Nothing,dd<0,gdd<4,2>>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,gdd<0,gdd<4,2>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dgdd<0,gdd<4,2>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,gdd<0,gdd<4,2>>) @ ()
[x (left)] -> (Nothing,dgdd<0,gdd<4,2>>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,gdd<0,gdd<4,2>>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,dd<0,gdd<4,2>>) @ ((),[_->((),())])
[y + z] <- (Nothing,dd<4,2>) @ ((),())
[y + z] -> (Just "y",<4,2>) @ ((),())
[\ z -> y + z] -> (Just "y",<<0,4>,2>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,d<<0,4>,2>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dd<<0,4>,2>) @ ()
[x (left)] -> (Just "x",<<0,4>,2>) @ ()
[(\ y z -> y + z) x] -> (Just "x",<d<0,4>,2>) @ (((),[_->((),[_->((),())])]),())
[(\ y z -> y + z) x x] -> (Just "x",<gd<0,4>,2>) @ ((((),[_->((),[_->((),())])]),()),())
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dd<0,d<gd<0,4>,2>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,dd<gd<0,4>,2>) @ Just (Right ((),()))
[5] <- (Nothing,dd<gd<0,4>,2>) @ ((),())
[5] -> (Nothing,dd<gd<0,4>,5>) @ ((),())
[3 or 5] -> (Nothing,dd<gd<0,4>,5>) @ Just (Right ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dd<0,d<gd<0,4>,5>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ y z -> y + z) x x] <- (Just "x",<gd<0,4>,5>) @ ((((),[_->((),[_->((),())])]),()),())
[(\ y z -> y + z) x] <- (Just "x",<d<0,4>,5>) @ (((),[_->((),[_->((),())])]),())
[x (left)] <- (Just "x",<<0,4>,5>) @ ()
[x (left)] -> (Nothing,dd<<0,4>,5>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,d<<0,4>,5>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Just "y",<<0,4>,5>) @ ((),[_->((),())])
[y + z] <- (Just "y",<4,5>) @ ((),())
[y + z] -> (Just "z",<<4,5>,0>) @ ((),())
[\ z -> y + z] -> (Nothing,dd<0,d<<4,5>,0>>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,gdd<0,d<<4,5>,0>>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dgdd<0,d<<4,5>,0>>) @ ()
[x (left)] -> (Nothing,gdd<0,d<<4,5>,0>>) @ ()
[\ y z -> y + z] <- (Nothing,dgdd<0,d<<4,5>,0>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,gdd<0,d<<4,5>,0>>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,dd<0,d<<4,5>,0>>) @ (((),[_->((),[_->((),())])]),())
[x (right)] <- (Nothing,dd<<4,5>,0>) @ ()
[x (right)] -> (Just "x",<<4,5>,0>) @ ()
[(\ y z -> y + z) x x] -> (Just "x",<d<4,5>,0>) @ ((((),[_->((),[_->((),())])]),()),())
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dd<0,d<d<4,5>,0>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,dd<d<4,5>,0>) @ Just (Right ((),()))
[5] <- (Nothing,dd<d<4,5>,0>) @ ((),())
[5] -> (Nothing,dd<d<4,5>,5>) @ ((),())
[3 or 5] -> (Nothing,dd<d<4,5>,5>) @ Just (Right ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dd<0,d<d<4,5>,5>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ y z -> y + z) x x] <- (Just "x",<d<4,5>,5>) @ ((((),[_->((),[_->((),())])]),()),())
[x (right)] <- (Just "x",<<4,5>,5>) @ ()
[x (right)] -> (Nothing,dd<<4,5>,5>) @ ()
[(\ y z -> y + z) x] <- (Nothing,dd<0,d<<4,5>,5>>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,gdd<0,d<<4,5>,5>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dgdd<0,d<<4,5>,5>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,gdd<0,d<<4,5>,5>>) @ ()
[x (left)] -> (Nothing,dgdd<0,d<<4,5>,5>>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,gdd<0,d<<4,5>,5>>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,dd<0,d<<4,5>,5>>) @ ((),[_->((),())])
[y + z] <- (Just "z",<<4,5>,5>) @ ((),())
[y + z] -> (Nothing,dd<4,10>) @ ((),())
[\ z -> y + z] -> (Nothing,dd<0,gdd<4,10>>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,gdd<0,gdd<4,10>>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dgdd<0,gdd<4,10>>) @ ()
[x (left)] -> (Nothing,gdd<0,gdd<4,10>>) @ ()
[\ y z -> y + z] <- (Nothing,dgdd<0,gdd<4,10>>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,gdd<0,gdd<4,10>>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,dd<0,gdd<4,10>>) @ (((),[_->((),[_->((),())])]),())
[x (right)] <- (Nothing,dgdd<4,10>) @ ()
[x (right)] -> (Nothing,gdd<4,10>) @ ()
[(\ y z -> y + z) x] <- (Nothing,dgdd<4,10>) @ (((),[_->((),[_->((),())])]),())
[\ y z -> y + z] <- (Nothing,gdgdd<4,10>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,dgdgdd<4,10>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,gdgdd<4,10>) @ ()
[x (left)] -> (Nothing,dgdgdd<4,10>) @ ()
[\ y z -> y + z] <- (Nothing,dd<0,gdgdd<4,10>>) @ ((),[_->((),[_->((),())])])
[\ z -> y + z] <- (Nothing,dgdd<4,10>) @ ((),[_->((),())])
[\ z -> y + z] -> (Nothing,gdd<4,10>) @ ((),[_->((),())])
[\ y z -> y + z] -> (Nothing,dd<0,ggdd<4,10>>) @ ((),[_->((),[_->((),())])])
[x (left)] <- (Nothing,dggdd<4,10>) @ ()
[x (left)] -> (Nothing,ggdd<4,10>) @ ()
[\ y z -> y + z] <- (Nothing,dggdd<4,10>) @ ((),[_->((),[_->((),())])])
[\ y z -> y + z] -> (Nothing,ggdd<4,10>) @ ((),[_->((),[_->((),())])])
[(\ y z -> y + z) x] -> (Nothing,gdd<4,10>) @ (((),[_->((),[_->((),())])]),())
[(\ y z -> y + z) x x] -> (Nothing,dd<4,10>) @ ((((),[_->((),[_->((),())])]),()),())
[\ x -> (\ y z -> y + z) x x] -> (Nothing,dd<0,gdd<4,10>>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[3 or 5] <- (Nothing,dgdd<4,10>) @ Just (Right ((),()))
[5] <- (Nothing,dgdd<4,10>) @ ((),())
[5] -> (Nothing,gdd<4,10>) @ ((),())
[3 or 5] -> (Nothing,gdd<4,10>) @ Just (Right ((),()))
[\ x -> (\ y z -> y + z) x x] <- (Nothing,dgdd<4,10>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[\ x -> (\ y z -> y + z) x x] -> (Nothing,gdd<4,10>) @ ((),[_->((((),[_->((),[_->((),())])]),()),())])
[(\ x -> (\ y z -> y + z) x x) (3 or 5)] -> (Nothing,dd<4,6>) @ (((),[_->((((),[_->((),[_->((),())])]),()),())]),Just (Left ((),())))
[(\ x -> (\ y z -> y + z) x x) (3 or 5)] -> (Nothing,dd<4,10>) @ (((),[_->((((),[_->((),[_->((),())])]),()),())]),Just (Right ((),())))
(6,(((),[_->((((),[_->((),[_->((),())])]),()),())]),Just (Left ((),()))))
(10,(((),[_->((((),[_->((),[_->((),())])]),()),())]),Just (Right ((),()))))
*Test>