diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Blessings.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Blessings.hs b/src/Blessings.hs index 21fe3d8..56c1af0 100644 --- a/src/Blessings.hs +++ b/src/Blessings.hs @@ -5,7 +5,6 @@ module Blessings where import Control.Applicative import Data.List -import Data.Semigroup import Data.String import Data.Ix (inRange) @@ -37,11 +36,14 @@ instance Functor Blessings where instance Semigroup (Blessings a) where - (<>) = Append + t <> Empty = t + Empty <> t = t + Append t1 t2 <> Append t3 t4 = t1 <> t2 <> t3 <> t4 + Append t1 t2 <> t3 = t1 <> t2 <> t3 + t1 <> t2 = Append t1 t2 instance Monoid (Blessings a) where - mappend = Append mempty = Empty |