Skip to content

Instantly share code, notes, and snippets.

@dmwit
Created December 13, 2019 18:16
Show Gist options
  • Save dmwit/bd93424fa26e8aeb2dd0b4b30723ddf5 to your computer and use it in GitHub Desktop.
Save dmwit/bd93424fa26e8aeb2dd0b4b30723ddf5 to your computer and use it in GitHub Desktop.
< dmwit> Okay, so "graphical" characters are allowed, which means letters (lower- and upper-case), symbols, punctuation, decimal digits, and a handful of one-off exceptions.
< dmwit> PrivateUse doesn't qualify as any of those categories. (And you can use generalCategory to check any particular character you want to know about.)
< dmwit> The relevant production in the Report is "graphic" at https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-160002.2
< geekosaur> yeh. I actually consider this a ghc wart; it should allow PrivateUse in literals. I end up using escapes in my config
< dmwit> > nub $ generalCategory <$> [minBound..]
<+lambdabot> [Control,Space,OtherPunctuation,CurrencySymbol,OpenPunctuation,ClosePunctuat...
< geekosaur> maybe a Haskell wart if the Report specs this; there's no good reason a Char or String literal shouldn't allow any valid Unicode character
< geekosaur> (note that this does not mean allowing PrivateUse anywhere else in a lexical Haskell setting, ecept maybe comments)
< geekosaur> ubuntu in particular puts some useful stuff in the private use areas of its standard fonts
< dmwit> Yeah, the Report should probably just list the characters that *aren't* allowed because they're too special. Newlines, double quotes, backspaces, maybe one or two others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment