Skip to content

Instantly share code, notes, and snippets.

@bananabrick
Created July 6, 2020 06:06
Show Gist options
  • Save bananabrick/1bd000b9188314a69e38fbe6ca30ad74 to your computer and use it in GitHub Desktop.
Save bananabrick/1bd000b9188314a69e38fbe6ca30ad74 to your computer and use it in GitHub Desktop.
alphaNumUnder :: Parser String
-- Parser for string alphanumeric + '_' characters.
alphaNumUnder = consume $ many $ alphaNumChar <|> single '_'
variable :: Parser String
variable = (:) <$> letterChar <*> alphaNumUnder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment