mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
19 lines
425 B
Idris
19 lines
425 B
Idris
import Language.JSON
|
|
|
|
import Data.List
|
|
import Data.String
|
|
|
|
main : IO ()
|
|
main = printLn $ filter (not . roundTrips) chars
|
|
where chars : List Int
|
|
chars = [0 .. 55295]
|
|
|
|
roundTrips : Int -> Bool
|
|
roundTrips n =
|
|
let s = singleton $ chr n
|
|
v = JString s
|
|
in case parse (show v) of
|
|
Just (JString x) => x == s
|
|
_ => False
|
|
|