Skip to content

Commit e25225a

Browse files
Harry Garroodbergmark
authored andcommitted
More complete test for FFI typesigs
1 parent 5b2e923 commit e25225a

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

tests/CorrectTypeSigFFI.hs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ module CorrectTypeSigFFI where
22

33
import FFI
44

5-
an_int = 0
6-
an_int :: Int
5+
int = 0
6+
int :: Int
77

8-
a_string = ffi "\"hello, world\""
9-
a_string :: String
8+
toplevel = ffi "\"one \""
9+
toplevel :: String
1010

11-
main = putStrLn a_string
11+
multipleToplevel, insideWhere :: String
12+
multipleToplevel = ffi "\"two \""
13+
14+
insideWhere = "three "
15+
-- where
16+
-- str :: String
17+
-- str = ffi "\"three \""
18+
19+
expression = "f" ++ (ffi "\"our\"" :: String)
20+
21+
main = putStrLn $ concat [toplevel, multipleToplevel, insideWhere, expression]

tests/CorrectTypeSigFFI.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hello, world
1+
one two three four

0 commit comments

Comments
 (0)