shithub: MicroHs

Download patch

ref: 7f88e8b5ff4566d73dde265f001172ef71abbd35
parent: bd6ab1354ae84408758de7c13c2be878865afd75
author: Lennart Augustsson <lennart@augustsson.net>
date: Sun Oct 29 14:00:39 EDT 2023

More classes, no instances yet.

--- /dev/null
+++ b/lib/Data/Monoid.hs
@@ -1,0 +1,8 @@
+module Data.Monoid(module Data.Monoid) where
+import Primitives
+import Data.Semigroup
+
+class Semigroup a => Monoid a where
+  mempty :: a
+  mappend :: a -> a -> a
+  mappend = (<>)
--- /dev/null
+++ b/lib/Data/Semigroup.hs
@@ -1,0 +1,6 @@
+module Data.Semigroup(Data.Semigroup) where
+import Primitive
+
+infixr 6 <>
+class Semigroup a where
+  (<>) :: a -> a -> a
--