1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2024-12-18 16:51:51 +03:00
Idris2/tests/chez/reg001/numbers.idr
Edwin Brady a972778eab Add test script
They don't all pass yet, for minor reasons. Coming shortly...
Unfortunately the startup overhead for chez is really noticeable here!
2020-05-19 18:25:18 +01:00

22 lines
664 B
Idris

-- the commented-out cases are still wrong,
-- but fixing them as well would make other tests fail for mysterious reasons
-- see https://github.com/edwinb/Idris2/pull/281
main : IO ()
main = do
printLn $ 3
printLn $ 4.2
printLn $ "1.2"
printLn $ cast {to = Int} 4.8
printLn $ cast {to = Integer} 1.2
printLn $ cast {to = String} 2.7
-- printLn $ cast {to = Int} "1.2"
-- printLn $ cast {to = Integer} "2.7"
printLn $ cast {to = Double} "5.9"
printLn $ (the Int 6 `div` the Int 3)
printLn $ (the Integer 6 `div` the Integer 3)
printLn $ (cast {to = Int} "6.6" `div` cast "3.9")
-- printLn $ (cast {to = Integer} "6.6" `div` cast "3.9")