1module Main where
2
3import Prelude
4
5import Effect.Console (log)
6import Effect.Uncurried (EffectFn3, mkEffectFn7, runEffectFn3, runEffectFn7)
7import Test.Assert (assert)
8
9testBothWays = do
10  res <- (runEffectFn7 $ mkEffectFn7 \x1 x2 x3 x4 x5 x6 x7 -> pure 42) 1 2 3 4 5 6 7
11  assert $ res == 42
12
13foreign import add3 :: EffectFn3 String String String String
14
15testRunFn = do
16  str <- runEffectFn3 add3 "a" "b" "c"
17  assert $ str == "abc"
18
19main = do
20  testBothWays
21  testRunFn
22  log "Done"
23