@@ -118,11 +118,11 @@ compile Eof !err !success = go
118
118
compile (Literal txt) ! err ! success = go
119
119
where
120
120
go acc oc t =
121
- let next = Text. take (Text. size txt) t
122
- in if next == txt
121
+ let candidate = Text. take (Text. size txt) t
122
+ in if candidate == txt
123
123
then
124
124
let t' = Text. drop (Text. size txt) t
125
- in case Text. unsnoc next of
125
+ in case Text. unsnoc candidate of
126
126
Just (_, c) -> success acc (Just c) t'
127
127
Nothing -> success acc oc t'
128
128
else
@@ -135,7 +135,7 @@ compile (Char Any) !err !success = go
135
135
compile (CaptureAs t p) ! err ! success = go
136
136
where
137
137
err' _ _ _ acc0 c0 t0 = err acc0 c0 t0
138
- success' _ _ rem acc0 c0 _ = success (pushCapture t acc0) c0 rem
138
+ success' _ cr rem acc0 _ _ = success (pushCapture t acc0) cr rem
139
139
compiled = compile p err' success'
140
140
go acc c t = compiled acc c t acc c t
141
141
compile (Capture (Many _ (Char Any ))) ! _ ! success = \ acc c t ->
@@ -145,7 +145,7 @@ compile (Capture (Many _ (Char Any))) !_ !success = \acc c t ->
145
145
compile (Capture c) ! err ! success = go
146
146
where
147
147
err' _ _ _ acc0 c0 t0 = err acc0 c0 t0
148
- success' _ _ rem acc0 c0 t0 = success (pushCapture (Text. take (Text. size t0 - Text. size rem ) t0) acc0) c0 rem
148
+ success' _ cr rem acc0 _ t0 = success (pushCapture (Text. take (Text. size t0 - Text. size rem ) t0) acc0) cr rem
149
149
compiled = compile c err' success'
150
150
go acc c t = compiled acc c t acc c t
151
151
compile (Or p1 p2) err success = cp1
0 commit comments