You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tidying up: represent PureScript strings as sequence of Word16
Changes:
* Expand tests for string edge-cases
* Remove use of `show` while printing errors
* Remove `codePoints` from the export list of Language.PureScript.PSString
* Fix an issue with derived Generic instances where colliding Idents
were being generated
* Change CoreFn/ToJSON so that invalid JSON strings (i.e. invalid
UTF-16) will not be generated, since relatively few JSON parsers can
cope with it (e.g. aeson)
* Various function renaming and rearranging to better match
existing conventions inside the compiler.
Unfortunately we are forced to break the CoreFn JSON format with this
change, as there is no way of generating strings that reliably parse to
the value we want if strings are allowed to include invalid UTF-16.
The CoreFn JSON changes in the following ways:
* String literals are now generated as arrays of integers, where each
integer is between 0 and 0xFFFF and represents one UTF-16 code unit
(were previously generated as JSON strings).
* Record literals are now generated as an array of pairs (two-element
arrays), where the first element is the key, generated as an array of
code units just like string literals, and the second element is the
value.
0 commit comments