Skip to content

Commit

Permalink
allow underscore in Id
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjoosten committed May 1, 2023
1 parent cce152a commit c42740a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ampersand/Basics/String.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ escapeIdentifier (Text1 c0 cs) =
-- characters of an identifier, a boolean is required that tells if this is the
-- first character.
isSafeIdChar :: Bool -> Char -> Bool
isSafeIdChar isFirst c = isLower c || isUpper c || (not isFirst && isAlphaNum c)
isSafeIdChar isFirst c = isLower c || isUpper c || (not isFirst && (isAlphaNum c || c == '_'))

toText1Unsafe :: Text -> Text1
toText1Unsafe txt = case T.uncons txt of
Expand Down

0 comments on commit c42740a

Please sign in to comment.