git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Rename prelude modules
commit11e49b2102266cf07bd4d07643d1de69bafbf40f authorGary Burgess <gary.burgess@gmail.com> dateFri 21 Feb 2014, 18:03 (13 years ago) parent4bb08df
1 file changed+40−40
prelude/prelude.purs+40−40
prelude/prelude.purs+40−40
@@ -356,7 +356,7 @@ module Prelude where
356356 \ };\
357357 \}" :: String -> String -> String
358358
359−module Monoid where
359+module Data.Monoid where
360360
361361 import Prelude
362362
@@ -372,16 +372,16 @@ module Monoid where
372372
373373 instance Monoid [a] where
374374 mempty = []
375− (<>) = Arrays.concat
375+ (<>) = Data.Array.concat
376376
377377 mconcat :: forall m. (Monoid m) => [m] -> m
378378 mconcat [] = mempty
379379 mconcat (m:ms) = m <> mconcat ms
380380
381−module Monad where
381+module Control.Monad where
382382
383383 import Prelude
384− import Arrays
384+ import Data.Array
385385
386386 replicateM :: forall m a. (Monad m) => Number -> m a -> m [a]
387387 replicateM 0 _ = return []
@@ -428,7 +428,7 @@ module Monad where
428428 when true m = m
429429 when false _ = return {}
430430
431−module Maybe where
431+module Data.Maybe where
432432
433433 import Prelude
434434
@@ -458,7 +458,7 @@ module Maybe where
458458 show (Just x) = "Just " ++ (show x)
459459 show Nothing = "Nothing"
460460
461−module Either where
461+module Data.Either where
462462
463463 import Prelude
464464
@@ -485,10 +485,10 @@ module Either where
485485 show (Left x) = "Left " ++ (show x)
486486 show (Right y) = "Right " ++ (show y)
487487
488−module Arrays where
488+module Data.Array where
489489
490490 import Prelude
491− import Maybe
491+ import Data.Maybe
492492
493493 head :: forall a. [a] -> a
494494 head (x : _) = x
@@ -648,10 +648,10 @@ module Arrays where
648648 empty = []
649649 (<|>) = concat
650650
651−module Tuples where
651+module Data.Tuple where
652652
653653 import Prelude
654− import Arrays
654+ import Data.Array
655655
656656 data Tuple a b = Tuple a b
657657
@@ -672,7 +672,7 @@ module Tuples where
672672 Tuple as bs -> Tuple (a : as) (b : bs)
673673 unzip [] = Tuple [] []
674674
675−module String where
675+module Data.String where
676676
677677 foreign import lengthS "function lengthS(s) {\
678678 \ return s.length;\
@@ -752,7 +752,7 @@ module String where
752752 \ return s.trim();\
753753 \}" :: String -> String
754754
755−module Regex where
755+module Data.String.Regex where
756756
757757 foreign import data Regex :: *
758758
@@ -907,7 +907,7 @@ module Math where
907907 foreign import sqrt1_2 "var sqrt1_2 = Math.SQRT1_2;" :: Number
908908 foreign import sqrt2 "var sqrt2 = Math.SQRT2;" :: Number
909909
910−module Eff where
910+module Control.Monad.Eff where
911911
912912 foreign import data Eff :: # ! -> * -> *
913913
@@ -936,29 +936,29 @@ module Eff where
936936 (>>=) = bindEff
937937
938938 foreign import untilE "function untilE(f) {\
939− \ return function() {\
940− \ while (!f()) { }\
941− \ return {};\
942− \ };\
939+ \ return function() {\
940+ \ while (!f()) { }\
941+ \ return {};\
942+ \ };\
943943 \}" :: forall e. Eff e Boolean -> Eff e {}
944944
945945 foreign import whileE "function whileE(f) {\
946− \ return function(a) {\
947− \ return function() {\
948− \ while (f()) {\
946+ \ return function(a) {\
947+ \ return function() {\
948+ \ while (f()) {\
949949 \ a();\
950950 \ }\
951− \ return {};\
951+ \ return {};\
952952 \ };\
953953 \ };\
954954 \}" :: forall e a. Eff e Boolean -> Eff e a -> Eff e {}
955955
956956 foreign import forE "function forE(lo) {\
957− \ return function(hi) {\
958− \ return function(f) {\
959− \ return function() {\
960− \ for (var i = lo; i < hi; i++) {\
961− \ f(i)();\
957+ \ return function(hi) {\
958+ \ return function(f) {\
959+ \ return function() {\
960+ \ for (var i = lo; i < hi; i++) {\
961+ \ f(i)();\
962962 \ }\
963963 \ };\
964964 \ };\
@@ -967,9 +967,9 @@ module Eff where
967967
968968
969969 foreign import foreachE "function foreachE(as) {\
970− \ return function(f) {\
971− \ for (var i = 0; i < as.length; i++) {\
972− \ f(as[i])();\
970+ \ return function(f) {\
971+ \ for (var i = 0; i < as.length; i++) {\
972+ \ f(as[i])();\
973973 \ }\
974974 \ };\
975975 \}" :: forall e a. [a] -> (a -> Eff e {}) -> Eff e {}
@@ -977,7 +977,7 @@ module Eff where
977977
978978module Random where
979979
980− import Eff
980+ import Control.Monad.Eff
981981
982982 foreign import data Random :: !
983983
@@ -985,9 +985,9 @@ module Random where
985985 \ return Math.random();\
986986 \}" :: forall e. Eff (random :: Random | e) Number
987987
988−module Errors where
988+module Control.Monad.Error where
989989
990− import Eff
990+ import Control.Monad.Eff
991991
992992 foreign import data Error :: * -> !
993993
@@ -1009,9 +1009,9 @@ module Errors where
10091009 \ };\
10101010 \}" :: forall e r a. (e -> Eff r a) -> Eff (err :: Error e | r) a -> Eff r a
10111011
1012−module IORef where
1012+module Data.IORef where
10131013
1014− import Eff
1014+ import Control.Monad.Eff
10151015
10161016 foreign import data Ref :: !
10171017
@@ -1052,10 +1052,10 @@ module IORef where
10521052 \ return f;\
10531053 \}" :: forall eff a. Eff (ref :: Ref | eff) a -> Eff eff a
10541054
1055−module Trace where
1055+module Debug.Trace where
10561056
10571057 import Prelude
1058− import Eff
1058+ import Control.Monad.Eff
10591059
10601060 foreign import data Trace :: !
10611061
@@ -1069,9 +1069,9 @@ module Trace where
10691069 print :: forall a r. (Prelude.Show a) => a -> Eff (trace :: Trace | r) {}
10701070 print o = trace (show o)
10711071
1072−module ST where
1072+module Control.Monad.ST where
10731073
1074− import Eff
1074+ import Control.Monad.Eff
10751075
10761076 foreign import data ST :: * -> !
10771077
@@ -1145,9 +1145,9 @@ module ST where
11451145 \ return f;\
11461146 \}" :: forall a r. (forall h. Eff (st :: ST h | r) (STArray h a)) -> Eff r [a]
11471147
1148−module Enum where
1148+module Data.Enum where
11491149
1150− import Maybe
1150+ import Data.Maybe
11511151
11521152 class Enum a where
11531153 toEnum :: Number -> Maybe a