@@ -192,22 +192,22 @@ lex tmap str = let (ts, (l, c, str')) = tokenise 0 0 [] tmap (mkStr str) in
192192||| Recognise a specific character
193193export
194194is : Char -> Lexer
195−is x = Pred (==x)
195+is x = pred (==x)
196196
197197||| Recognise anything but the given character
198198export
199199isNot : Char -> Lexer
200−isNot x = Pred (/=x)
200+isNot x = pred (/=x)
201201
202202||| Recognise a character case-insensitively
203203export
204204like : Char -> Lexer
205−like x = Pred (\y => toUpper x == toUpper y)
205+like x = pred (\y => toUpper x == toUpper y)
206206
207207||| Recognise anything but the given character case-insensitively
208208export
209209notLike : Char -> Lexer
210−notLike x = Pred (\y => toUpper x /= toUpper y)
210+notLike x = pred (\y => toUpper x /= toUpper y)
211211
212212||| Recognise a specific string.
213213||| Fails if the string is empty.
@@ -227,7 +227,7 @@ approx str = case map like (unpack str) of
227227||| to consume input
228228export
229229opt : Lexer -> Recognise False
230−opt l = l <|> Empty
230+opt l = l <|> empty
231231
232232||| Recognise a sequence of at least one sub-lexers
233233export
@@ -244,7 +244,7 @@ many l = opt (some l)
244244||| if one of the options succeeds. Fails if the foldable is empty.
245245export
246246choice : Foldable t => t Lexer -> Lexer
247−choice xs = foldr Alt Fail xs
247+choice xs = foldr (<|>) fail xs
248248
249249||| Repeat the sub-lexer `l` zero or more times until the lexer
250250||| `stopBefore` is encountered. `stopBefore` will not be consumed.
@@ -281,7 +281,7 @@ atLeast (S min) l = l <+> atLeast min l
281281||| consume input.
282282export
283283atMost : (max : Nat) -> (l : Lexer) -> Recognise False
284−atMost Z _ = Empty
284+atMost Z _ = empty
285285atMost (S k) l = atMost k l <+> opt l
286286
287287||| Recognise a sub-lexer repeated between `min` and `max` times. Fails
@@ -289,7 +289,7 @@ atMost (S k) l = atMost k l <+> opt l
289289export
290290between : (min : Nat) -> (max : Nat) -> (l : Lexer) -> Recognise (min > 0)
291291between Z max l = atMost max l
292−between (S min) Z _ = Fail
292+between (S min) Z _ = fail
293293between (S min) (S max) l = l <+> between min max l
294294
295295||| Recognise exactly `count` repeated occurrences of a sub-lexer.
@@ -301,7 +301,7 @@ exactly n l = between n n l
301301||| Recognise any character
302302export
303303any : Lexer
304−any = Pred (const True)
304+any = pred (const True)
305305
306306||| Recognise any character if the sub-lexer `l` fails.
307307export