it's very slick, and it works fine (barring some mildly annoying -Wunused-do-bind warnings), but i am totally mystified as to how the following parser figures out that "\"" means "please parse a " character":
parseStringLiteral :: Parser Text
parseStringLiteral = parseThenAdvance $ StringLiteral <$> do
"\""
text <- Megaparsec.takeWhileP (Just "character") (/= '"')
"\""
return text
my best guess is there's an instance for Text of some typeclass in Megaparsec that lets it treat a plain Text as a parser? i don't feel like i have enough context/instinct to dig deeper into this though... like, if this works, why does megaparsec even have the string combinator?

eggbug enjoyer