git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Make example throw
commita9dc2820133daa60d9c9ee7825cef294e2134d2f authorPhil Freeman <paf31@cantab.net> dateWed 10 Dec 2014, 18:22 (12 years ago) parent18d0159
1 file changed+11−2
examples/passing/CaseInDo.purs+11−2
examples/passing/CaseInDo.purs+11−2
@@ -3,9 +3,18 @@ module Main where
33import Debug.Trace
44import Control.Monad.Eff
55
6−main = do
6+foreign import doIt "function doIt() { global.flag = true; }" :: forall eff. Eff eff Unit
7+
8+foreign import get "function get() { return global.flag; }" :: forall eff. Eff eff Boolean
9+
10+set = do
711 trace "Testing..."
812 case 0 of
9− 0 -> trace "Done"
13+ 0 -> doIt
1014 _ -> return unit
1115
16+main = do
17+ set
18+ b <- get
19+ case b of
20+ true -> trace "Done"