Skip to content

Commit

Permalink
Remove 8-bit type constraint for character/string literals.
Browse files Browse the repository at this point in the history
This makes it possible to use wider character types to represent
Unicode code points beyond the first 256.

See #863.
  • Loading branch information
Brian Huffman committed Aug 11, 2020
1 parent 3bec6cd commit ad9fed2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Cryptol/TypeCheck/Infer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,10 @@ desugarLiteral lit =
in P.EAppT fracPrim [ arg numerator, arg denominator, rnd ]

P.ECChar c ->
number [ ("val", P.TNum (toInteger (fromEnum c)))
, ("rep", tBits (8 :: Integer)) ]
number [ ("val", P.TNum (toInteger (fromEnum c))) ]

P.ECString s ->
P.ETyped (P.EList [ P.ELit (P.ECChar c) | c <- s ])
(P.TSeq P.TWild (P.TSeq (P.TNum 8) P.TBit))
P.EList [ P.ELit (P.ECChar c) | c <- s ]



Expand Down

0 comments on commit ad9fed2

Please sign in to comment.