git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use <> for the semigroup operation
8537e25Phil Freeman
examples/passing/Operators.purs+3−3
@@ -26,10 +26,10 @@ module Main where
26
26
27 test6 = ((\x -> x) `k` 2) 3
27 test6 = ((\x -> x) `k` 2) 3
28
28
29− (<>) :: String -> String -> String
29+ (<+>) :: String -> String -> String
30− (<>) = \s1 s2 -> s1 ++ s2
30+ (<+>) = \s1 s2 -> s1 ++ s2
31
31
32− test7 = "Hello" <> "World!"
32+ test7 = "Hello" <+> "World!"
33
33
34 (@@) :: forall a b. (a -> b) -> a -> b
34 (@@) :: forall a b. (a -> b) -> a -> b
35 (@@) = \f x -> f x
35 (@@) = \f x -> f x
prelude/prelude.purs+8−3
@@ -332,10 +332,10 @@ module Prelude where
332 (||) = boolOr
332 (||) = boolOr
333 not = boolNot
333 not = boolNot
334
334
335− infixr 5 ++
335+ infixr 5 <>
336
336
337 class Semigroup a where
337 class Semigroup a where
338− (++) :: a -> a -> a
338+ (<>) :: a -> a -> a
339
339
340 foreign import concatString
340 foreign import concatString
341 "function concatString(s1) {\
341 "function concatString(s1) {\
@@ -345,7 +345,12 @@ module Prelude where
345 \}" :: String -> String -> String
345 \}" :: String -> String -> String
346
346
347 instance semigroupString :: Semigroup String where
347 instance semigroupString :: Semigroup String where
348− (++) = concatString
348+ (<>) = concatString
349+
350+ infixr 5 ++
351+
352+ (++) :: forall s. (Semigroup s) => s -> s -> s
353+ (++) = (<>)
349
354
350module Data.Eq where
355module Data.Eq where
351
356