Added regression test for bug in C code generation.

This commit is contained in:
Fabian Thorand 2014-09-25 00:03:37 +02:00
parent c50d7c5b6d
commit 10662e8a70
3 changed files with 13 additions and 0 deletions

1
test/reg052/expected Normal file
View File

@ -0,0 +1 @@
42

8
test/reg052/reg052.idr Normal file
View File

@ -0,0 +1,8 @@
impure_op : Bits64 -> IO Bits64
impure_op foo = return $ foo + 1
impure_int : IO Int
impure_int = return 41
main : IO ()
main = impure_int >>= impure_op . prim__zextInt_B64 >>= print

4
test/reg052/run Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
idris $@ -o reg052 reg052.idr
./reg052
rm -f reg052 *.ibc