git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Rename prelude modules
11e49b2Gary Burgess
prelude/prelude.purs+40−40
@@ -356,7 +356,7 @@ module Prelude where
356 \ };\
356 \ };\
357 \}" :: String -> String -> String
357 \}" :: String -> String -> String
358
358
359−module Monoid where
359+module Data.Monoid where
360
360
361 import Prelude
361 import Prelude
362
362
@@ -372,16 +372,16 @@ module Monoid where
372
372
373 instance Monoid [a] where
373 instance Monoid [a] where
374 mempty = []
374 mempty = []
375− (<>) = Arrays.concat
375+ (<>) = Data.Array.concat
376
376
377 mconcat :: forall m. (Monoid m) => [m] -> m
377 mconcat :: forall m. (Monoid m) => [m] -> m
378 mconcat [] = mempty
378 mconcat [] = mempty
379 mconcat (m:ms) = m <> mconcat ms
379 mconcat (m:ms) = m <> mconcat ms
380
380
381−module Monad where
381+module Control.Monad where
382
382
383 import Prelude
383 import Prelude
384− import Arrays
384+ import Data.Array
385
385
386 replicateM :: forall m a. (Monad m) => Number -> m a -> m [a]
386 replicateM :: forall m a. (Monad m) => Number -> m a -> m [a]
387 replicateM 0 _ = return []
387 replicateM 0 _ = return []
@@ -428,7 +428,7 @@ module Monad where
428 when true m = m
428 when true m = m
429 when false _ = return {}
429 when false _ = return {}
430
430
431−module Maybe where
431+module Data.Maybe where
432
432
433 import Prelude
433 import Prelude
434
434
@@ -458,7 +458,7 @@ module Maybe where
458 show (Just x) = "Just " ++ (show x)
458 show (Just x) = "Just " ++ (show x)
459 show Nothing = "Nothing"
459 show Nothing = "Nothing"
460
460
461−module Either where
461+module Data.Either where
462
462
463 import Prelude
463 import Prelude
464
464
@@ -485,10 +485,10 @@ module Either where
485 show (Left x) = "Left " ++ (show x)
485 show (Left x) = "Left " ++ (show x)
486 show (Right y) = "Right " ++ (show y)
486 show (Right y) = "Right " ++ (show y)
487
487
488−module Arrays where
488+module Data.Array where
489
489
490 import Prelude
490 import Prelude
491− import Maybe
491+ import Data.Maybe
492
492
493 head :: forall a. [a] -> a
493 head :: forall a. [a] -> a
494 head (x : _) = x
494 head (x : _) = x
@@ -648,10 +648,10 @@ module Arrays where
648 empty = []
648 empty = []
649 (<|>) = concat
649 (<|>) = concat
650
650
651−module Tuples where
651+module Data.Tuple where
652
652
653 import Prelude
653 import Prelude
654− import Arrays
654+ import Data.Array
655
655
656 data Tuple a b = Tuple a b
656 data Tuple a b = Tuple a b
657
657
@@ -672,7 +672,7 @@ module Tuples where
672 Tuple as bs -> Tuple (a : as) (b : bs)
672 Tuple as bs -> Tuple (a : as) (b : bs)
673 unzip [] = Tuple [] []
673 unzip [] = Tuple [] []
674
674
675−module String where
675+module Data.String where
676
676
677 foreign import lengthS "function lengthS(s) {\
677 foreign import lengthS "function lengthS(s) {\
678 \ return s.length;\
678 \ return s.length;\
@@ -752,7 +752,7 @@ module String where
752 \ return s.trim();\
752 \ return s.trim();\
753 \}" :: String -> String
753 \}" :: String -> String
754
754
755−module Regex where
755+module Data.String.Regex where
756
756
757 foreign import data Regex :: *
757 foreign import data Regex :: *
758
758
@@ -907,7 +907,7 @@ module Math where
907 foreign import sqrt1_2 "var sqrt1_2 = Math.SQRT1_2;" :: Number
907 foreign import sqrt1_2 "var sqrt1_2 = Math.SQRT1_2;" :: Number
908 foreign import sqrt2 "var sqrt2 = Math.SQRT2;" :: Number
908 foreign import sqrt2 "var sqrt2 = Math.SQRT2;" :: Number
909
909
910−module Eff where
910+module Control.Monad.Eff where
911
911
912 foreign import data Eff :: # ! -> * -> *
912 foreign import data Eff :: # ! -> * -> *
913
913
@@ -936,29 +936,29 @@ module Eff where
936 (>>=) = bindEff
936 (>>=) = bindEff
937
937
938 foreign import untilE "function untilE(f) {\
938 foreign import untilE "function untilE(f) {\
939− \ return function() {\
939+ \ return function() {\
940− \ while (!f()) { }\
940+ \ while (!f()) { }\
941− \ return {};\
941+ \ return {};\
942− \ };\
942+ \ };\
943 \}" :: forall e. Eff e Boolean -> Eff e {}
943 \}" :: forall e. Eff e Boolean -> Eff e {}
944
944
945 foreign import whileE "function whileE(f) {\
945 foreign import whileE "function whileE(f) {\
946− \ return function(a) {\
946+ \ return function(a) {\
947− \ return function() {\
947+ \ return function() {\
948− \ while (f()) {\
948+ \ while (f()) {\
949 \ a();\
949 \ a();\
950 \ }\
950 \ }\
951− \ return {};\
951+ \ return {};\
952 \ };\
952 \ };\
953 \ };\
953 \ };\
954 \}" :: forall e a. Eff e Boolean -> Eff e a -> Eff e {}
954 \}" :: forall e a. Eff e Boolean -> Eff e a -> Eff e {}
955
955
956 foreign import forE "function forE(lo) {\
956 foreign import forE "function forE(lo) {\
957− \ return function(hi) {\
957+ \ return function(hi) {\
958− \ return function(f) {\
958+ \ return function(f) {\
959− \ return function() {\
959+ \ return function() {\
960− \ for (var i = lo; i < hi; i++) {\
960+ \ for (var i = lo; i < hi; i++) {\
961− \ f(i)();\
961+ \ f(i)();\
962 \ }\
962 \ }\
963 \ };\
963 \ };\
964 \ };\
964 \ };\
@@ -967,9 +967,9 @@ module Eff where
967
967
968
968
969 foreign import foreachE "function foreachE(as) {\
969 foreign import foreachE "function foreachE(as) {\
970− \ return function(f) {\
970+ \ return function(f) {\
971− \ for (var i = 0; i < as.length; i++) {\
971+ \ for (var i = 0; i < as.length; i++) {\
972− \ f(as[i])();\
972+ \ f(as[i])();\
973 \ }\
973 \ }\
974 \ };\
974 \ };\
975 \}" :: forall e a. [a] -> (a -> Eff e {}) -> Eff e {}
975 \}" :: forall e a. [a] -> (a -> Eff e {}) -> Eff e {}
@@ -977,7 +977,7 @@ module Eff where
977
977
978module Random where
978module Random where
979
979
980− import Eff
980+ import Control.Monad.Eff
981
981
982 foreign import data Random :: !
982 foreign import data Random :: !
983
983
@@ -985,9 +985,9 @@ module Random where
985 \ return Math.random();\
985 \ return Math.random();\
986 \}" :: forall e. Eff (random :: Random | e) Number
986 \}" :: forall e. Eff (random :: Random | e) Number
987
987
988−module Errors where
988+module Control.Monad.Error where
989
989
990− import Eff
990+ import Control.Monad.Eff
991
991
992 foreign import data Error :: * -> !
992 foreign import data Error :: * -> !
993
993
@@ -1009,9 +1009,9 @@ module Errors where
1009 \ };\
1009 \ };\
1010 \}" :: forall e r a. (e -> Eff r a) -> Eff (err :: Error e | r) a -> Eff r a
1010 \}" :: forall e r a. (e -> Eff r a) -> Eff (err :: Error e | r) a -> Eff r a
1011
1011
1012−module IORef where
1012+module Data.IORef where
1013
1013
1014− import Eff
1014+ import Control.Monad.Eff
1015
1015
1016 foreign import data Ref :: !
1016 foreign import data Ref :: !
1017
1017
@@ -1052,10 +1052,10 @@ module IORef where
1052 \ return f;\
1052 \ return f;\
1053 \}" :: forall eff a. Eff (ref :: Ref | eff) a -> Eff eff a
1053 \}" :: forall eff a. Eff (ref :: Ref | eff) a -> Eff eff a
1054
1054
1055−module Trace where
1055+module Debug.Trace where
1056
1056
1057 import Prelude
1057 import Prelude
1058− import Eff
1058+ import Control.Monad.Eff
1059
1059
1060 foreign import data Trace :: !
1060 foreign import data Trace :: !
1061
1061
@@ -1069,9 +1069,9 @@ module Trace where
1069 print :: forall a r. (Prelude.Show a) => a -> Eff (trace :: Trace | r) {}
1069 print :: forall a r. (Prelude.Show a) => a -> Eff (trace :: Trace | r) {}
1070 print o = trace (show o)
1070 print o = trace (show o)
1071
1071
1072−module ST where
1072+module Control.Monad.ST where
1073
1073
1074− import Eff
1074+ import Control.Monad.Eff
1075
1075
1076 foreign import data ST :: * -> !
1076 foreign import data ST :: * -> !
1077
1077
@@ -1145,9 +1145,9 @@ module ST where
1145 \ return f;\
1145 \ return f;\
1146 \}" :: forall a r. (forall h. Eff (st :: ST h | r) (STArray h a)) -> Eff r [a]
1146 \}" :: forall a r. (forall h. Eff (st :: ST h | r) (STArray h a)) -> Eff r [a]
1147
1147
1148−module Enum where
1148+module Data.Enum where
1149
1149
1150− import Maybe
1150+ import Data.Maybe
1151
1151
1152 class Enum a where
1152 class Enum a where
1153 toEnum :: Number -> Maybe a
1153 toEnum :: Number -> Maybe a