expand semigroup
This commit is contained in:
@@ -29,6 +29,17 @@ mconcat :: Monoid a => [a] -> a
|
|||||||
Semigroup
|
Semigroup
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
(<>) :: Semigroup a => a -> a -> a
|
||||||
|
```
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
sconcat :: Semigroup a => NonEmpty a -> a
|
||||||
|
```
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
stimes :: (Semigroup a, Integral b) => b -> a -> a
|
||||||
|
```
|
||||||
|
|
||||||
```haskell
|
```haskell
|
||||||
option :: b -> (a -> b) -> Option a -> b
|
option :: b -> (a -> b) -> Option a -> b
|
||||||
@@ -57,3 +68,6 @@ stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
|
|||||||
```haskell
|
```haskell
|
||||||
mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
|
mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
|
||||||
```
|
```
|
||||||
|
|
||||||
|
NonEmpty
|
||||||
|
---------
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ import Data.Functor.Identity as X
|
|||||||
|
|
||||||
#if ( __GLASGOW_HASKELL__ >= 800 )
|
#if ( __GLASGOW_HASKELL__ >= 800 )
|
||||||
import Data.Monoid as X
|
import Data.Monoid as X
|
||||||
|
import Data.List.NonEmpty as X (
|
||||||
|
NonEmpty(..)
|
||||||
|
, nonEmpty
|
||||||
|
)
|
||||||
import Data.Semigroup as X (
|
import Data.Semigroup as X (
|
||||||
Semigroup(sconcat, stimes)
|
Semigroup(sconcat, stimes)
|
||||||
, WrappedMonoid
|
, WrappedMonoid
|
||||||
|
|||||||
Reference in New Issue
Block a user