git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use <> for the semigroup operation
commit8537e25bdc9b7b0487c1e3f06e2b6a0cdc072cac authorPhil Freeman <paf31@cantab.net> dateSun 6 Apr 2014, 13:42 (13 years ago) parent4974c03
2 files changed+11−6
examples/passing/Operators.purs+3−3 prelude/prelude.purs+8−3
examples/passing/Operators.purs+3−3
@@ -26,10 +26,10 @@ module Main where
2626
2727 test6 = ((\x -> x) `k` 2) 3
2828
29− (<>) :: String -> String -> String
30− (<>) = \s1 s2 -> s1 ++ s2
29+ (<+>) :: String -> String -> String
30+ (<+>) = \s1 s2 -> s1 ++ s2
3131
32− test7 = "Hello" <> "World!"
32+ test7 = "Hello" <+> "World!"
3333
3434 (@@) :: forall a b. (a -> b) -> a -> b
3535 (@@) = \f x -> f x
prelude/prelude.purs+8−3
@@ -332,10 +332,10 @@ module Prelude where
332332 (||) = boolOr
333333 not = boolNot
334334
335− infixr 5 ++
335+ infixr 5 <>
336336
337337 class Semigroup a where
338− (++) :: a -> a -> a
338+ (<>) :: a -> a -> a
339339
340340 foreign import concatString
341341 "function concatString(s1) {\
@@ -345,7 +345,12 @@ module Prelude where
345345 \}" :: String -> String -> String
346346
347347 instance semigroupString :: Semigroup String where
348− (++) = concatString
348+ (<>) = concatString
349+
350+ infixr 5 ++
351+
352+ (++) :: forall s. (Semigroup s) => s -> s -> s
353+ (++) = (<>)
349354
350355module Data.Eq where
351356