Allow '_' in label and meta names

This commit is contained in:
Joscha 2020-04-04 13:40:40 +00:00
parent c8b53d1a1f
commit 86dd243c11
2 changed files with 5 additions and 5 deletions

View file

@ -213,7 +213,7 @@ withSpan f = do
name :: Parser (Name Span)
name = fmap (uncurry Name) $ withSpan $ do
firstChar <- satisfy isLower <?> "lowercase character"
otherChars <- takeWhileP (Just "alphanumeric character") isAlphaNum
otherChars <- takeWhileP (Just "alphanumeric character or '_'") (\c -> isAlphaNum c || c == '_')
pure $ T.pack [firstChar] <> otherChars
number :: (Num a) => Parser a