Idris2/tests/refc/prims/Test.idr
Hattori, Hiroki 844ea28149
- [RefC] delete unnecessary conversion to keep code simply. (#3176)
* - [RefC] delete unnecessary conversion to keep code simply.
- [RefC] rename some C functions to confliction safe.

* make the linter feels good.

* Get me a job as a linter slave.

* [RefC] Added hard fail for unsupported primitives.

* Fix typo.
2024-01-14 11:17:34 -06:00

25 lines
392 B
Idris

module Test
import Data.IOArray
import Data.IORef
import System.Info
main : IO ()
main = do
do
arr <- newArray {elem=Int} 10
printLn !(readArray arr 0)
printLn !(writeArray arr 1 10)
printLn !(readArray arr 1)
do
ref <- newIORef "abcd"
printLn !(readIORef ref)
writeIORef ref "ABCD"
printLn !(readIORef ref)
do
-- printLn os
printLn codegen