mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
844ea28149
* - [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.
25 lines
392 B
Idris
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
|
|
|
|
|
|
|