fix parser binding order

This commit is contained in:
2026-05-16 20:16:10 -06:00
parent c58077e65a
commit 11bfd20e5d
2 changed files with 3 additions and 3 deletions

View File

@@ -52,8 +52,8 @@ parseSexps f = marshal . SexpLoc.parseSexps f . view lazy . encodeUtf8
nonEmptyGrammar :: Grammar p (NonEmpty x :- t) (List x :- x :- t)
nonEmptyGrammar = IGB.Iso
(\((x:|xs) :- t) -> xs :- x :- t)
(\(xs :- x :- t) -> (x:|xs) :- t)
(\((x:|xs) :- t) -> reverse xs :- x :- t)
(\(xs :- x :- t) -> (x :| reverse xs) :- t)
nonempty :: SexpGrammar a -> SexpGrammar (NonEmpty a)
nonempty a =