File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ import Type.Data.RowList (RLProxy(..))
29
29
-- | `<>` is used to combine individual results, and `mempty` gives the result
30
30
-- | of folding an empty collection of elements.
31
31
-- |
32
+ -- | ### Newtypes for Monoid
33
+ -- |
32
34
-- | Some types (e.g. `Int`, `Boolean`) can implement multiple law-abiding
33
35
-- | instances for `Monoid`. For example, `<>` could be `+` and `mempty` could
34
36
-- | be `0`. Likewise, `<>` could be `*` and `mempty` could be `1`.
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import Type.Data.RowList (RLProxy(..))
21
21
-- | concatenation. Another example is `List a`, with `(<>)` defined as
22
22
-- | list concatenation.
23
23
-- |
24
+ -- | ### Newtypes for Semigroup
25
+ -- |
24
26
-- | There are two other ways to implement an instance for this type class
25
27
-- | regardless of which type is used. These instances can be used by
26
28
-- | wrapping the values in one of the two newtypes below:
You can’t perform that action at this time.
0 commit comments