@@ -38,9 +38,9 @@ module Prelude where
39 (#) :: forall a b. a -> (a -> b) -> b
39 (#) :: forall a b. a -> (a -> b) -> b
40 (#) x f = f x
40 (#) x f = f x
42 infixr 6 :
42 infixr 6 :
44 (:) :: forall a. a -> [a] -> [a]
44 (:) :: forall a. a -> [a] -> [a]
45 (:) = cons
45 (:) = cons
@@ -73,6 +73,20 @@ module Prelude where
73 instance showNumber :: Show Number where
73 instance showNumber :: Show Number where
74 show = showNumberImpl
74 show = showNumberImpl
76+ foreign import showArrayImpl
77+ "function showArrayImpl (f) {\
78+ \ return function (xs) {\
80+ \ for (var i = 0, l = xs.length; i < l; i++) {\
83+ \ return '[' + ss.join(',') + ']';\
85+ \}" :: forall a. (a -> String) -> [a] -> String
87+ instance showArray :: (Show a) => Show [a] where
88+ show = showArrayImpl show
76 infixl 4 <$>
90 infixl 4 <$>
78 class Functor f where
92 class Functor f where
@@ -388,7 +402,7 @@ module Data.Eq where
388 instance eqRef :: Eq (Ref a) where
402 instance eqRef :: Eq (Ref a) where
389 (==) = liftRef refEq
403 (==) = liftRef refEq
390 (/=) = liftRef refIneq
404 (/=) = liftRef refIneq
392module Prelude.Unsafe where
406module Prelude.Unsafe where
394 foreign import unsafeIndex
408 foreign import unsafeIndex