-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [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.
- Loading branch information
1 parent
90bf2de
commit 844ea28
Showing
6 changed files
with
102 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Nothing | ||
True | ||
Just 10 | ||
"abcd" | ||
"ABCD" | ||
"refc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
. ../../testutils.sh | ||
|
||
idris2 --cg refc -o test Test.idr > /dev/null | ||
./build/exec/test |