Browse files

Fix type errors in tests

  • Loading branch information...
1 parent c57ce7d commit 229494a9bd90972d73d2b7b35ab2a878e124912d @bergmark bergmark committed Oct 29, 2012
Showing with 7 additions and 10 deletions.
  1. +1 −0 tests/namedFieldPuns.hs
  2. +5 −10 tests/nums.hs
  3. +1 −0 tests/recordWildCards.hs
View
1 tests/namedFieldPuns.hs
@@ -6,6 +6,7 @@ import Language.Fay.FFI
import Language.Fay.Prelude
data SomeRec = SomeRec { a :: Integer, b :: Integer } | Y | X
+instance Foreign SomeRec
fun :: SomeRec -> SomeRec
fun SomeRec{a} = SomeRec{a=a+1, b=10}
View
15 tests/nums.hs
@@ -1,15 +1,10 @@
-
-
module Nums where
-import Language.Fay.FFI
-import Language.Fay.Prelude
-
-negNum = -10
-
-main = Fay ()
-main = print negNum
+import Language.Fay.FFI
+import Language.Fay.Prelude
+main :: Fay ()
+main = print (-10 :: Double)
-print :: (Num a) => a -> Fay ()
+print :: Foreign f => f -> Fay ()
print = ffi "console.log(%1)"
View
1 tests/recordWildCards.hs
@@ -7,6 +7,7 @@ import Language.Fay.FFI
import Language.Fay.Prelude
data C = C { a :: Int, b :: Int, c :: Int, d :: Int }
+instance Foreign C
data X = X { foo :: Int } | Y { foo :: Int }

0 comments on commit 229494a

Please sign in to comment.