git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #439 from purescript/eff-unit
1919253Phil Freeman
examples/passing/Superclasses3.purs+2−2
@@ -5,12 +5,12 @@ import Debug.Trace
5import Control.Monad.Eff
5import Control.Monad.Eff
6
6
7class (Monad m) <= MonadWriter w m where
7class (Monad m) <= MonadWriter w m where
8− tell :: w -> m {}
8+ tell :: w -> m Unit
9
9
10testFunctor :: forall m. (Monad m) => m Number -> m Number
10testFunctor :: forall m. (Monad m) => m Number -> m Number
11testFunctor n = (+) 1 <$> n
11testFunctor n = (+) 1 <$> n
12
12
13−test :: forall w m. (Monad m, MonadWriter w m) => w -> m {}
13+test :: forall w m. (Monad m, MonadWriter w m) => w -> m Unit
14test w = do
14test w = do
15 tell w
15 tell w
16 tell w
16 tell w
prelude/prelude.purs+6−6
@@ -642,7 +642,7 @@ module Control.Monad.Eff where
642 \ while (!f()) { }\
642 \ while (!f()) { }\
643 \ return {};\
643 \ return {};\
644 \ };\
644 \ };\
645− \}" :: forall e. Eff e Boolean -> Eff e {}
645+ \}" :: forall e. Eff e Boolean -> Eff e Unit
646
646
647 foreign import whileE "function whileE(f) {\
647 foreign import whileE "function whileE(f) {\
648 \ return function(a) {\
648 \ return function(a) {\
@@ -653,7 +653,7 @@ module Control.Monad.Eff where
653 \ return {};\
653 \ return {};\
654 \ };\
654 \ };\
655 \ };\
655 \ };\
656− \}" :: forall e a. Eff e Boolean -> Eff e a -> Eff e {}
656+ \}" :: forall e a. Eff e Boolean -> Eff e a -> Eff e Unit
657
657
658 foreign import forE "function forE(lo) {\
658 foreign import forE "function forE(lo) {\
659 \ return function(hi) {\
659 \ return function(hi) {\
@@ -665,7 +665,7 @@ module Control.Monad.Eff where
665 \ };\
665 \ };\
666 \ };\
666 \ };\
667 \ };\
667 \ };\
668− \}" :: forall e. Number -> Number -> (Number -> Eff e {}) -> Eff e {}
668+ \}" :: forall e. Number -> Number -> (Number -> Eff e Unit) -> Eff e Unit
669
669
670
670
671 foreign import foreachE "function foreachE(as) {\
671 foreign import foreachE "function foreachE(as) {\
@@ -674,7 +674,7 @@ module Control.Monad.Eff where
674 \ f(as[i])();\
674 \ f(as[i])();\
675 \ }\
675 \ }\
676 \ };\
676 \ };\
677− \}" :: forall e a. [a] -> (a -> Eff e {}) -> Eff e {}
677+ \}" :: forall e a. [a] -> (a -> Eff e Unit) -> Eff e Unit
678
678
679module Control.Monad.Eff.Unsafe where
679module Control.Monad.Eff.Unsafe where
680
680
@@ -696,9 +696,9 @@ module Debug.Trace where
696 \ console.log(s);\
696 \ console.log(s);\
697 \ return {};\
697 \ return {};\
698 \ };\
698 \ };\
699− \}" :: forall r. String -> Eff (trace :: Trace | r) {}
699+ \}" :: forall r. String -> Eff (trace :: Trace | r) Unit
700
700
701− print :: forall a r. (Show a) => a -> Eff (trace :: Trace | r) {}
701+ print :: forall a r. (Show a) => a -> Eff (trace :: Trace | r) Unit
702 print o = trace (show o)
702 print o = trace (show o)
703
703
704module Control.Monad.ST where
704module Control.Monad.ST where