mirror of
https://github.com/kowainik/relude.git
synced 2024-10-05 16:57:30 +03:00
Prepare release 1.1.0.0 (#409)
* Prepare release 1.1.0.0 * Use GHC 8.10.7 with stack
This commit is contained in:
parent
9cc1f9c647
commit
b2fccefa4b
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
commit-message:
|
||||
prefix: "GA"
|
||||
include: "scope"
|
||||
labels:
|
||||
- "CI"
|
||||
- "dependencies"
|
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@ -22,12 +22,14 @@ jobs:
|
||||
- "8.4.4"
|
||||
- "8.6.5"
|
||||
- "8.8.4"
|
||||
- "8.10.4"
|
||||
- "9.0.1"
|
||||
- "8.10.7"
|
||||
- "9.0.2"
|
||||
- "9.2.2"
|
||||
exclude:
|
||||
- os: macOS-latest
|
||||
ghc: 9.0.1
|
||||
ghc: 9.0.2
|
||||
- os: macOS-latest
|
||||
ghc: 8.10.7
|
||||
- os: macOS-latest
|
||||
ghc: 8.8.4
|
||||
- os: macOS-latest
|
||||
@ -38,7 +40,9 @@ jobs:
|
||||
ghc: 8.2.2
|
||||
|
||||
- os: windows-latest
|
||||
ghc: 9.0.1
|
||||
ghc: 9.0.2
|
||||
- os: windows-latest
|
||||
ghc: 8.10.7
|
||||
- os: windows-latest
|
||||
ghc: 8.8.4
|
||||
- os: windows-latest
|
||||
@ -51,7 +55,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: haskell/actions/setup@v1
|
||||
- uses: haskell/actions/setup@v1.2
|
||||
id: setup-haskell-cabal
|
||||
name: Setup Haskell
|
||||
with:
|
||||
@ -66,7 +70,7 @@ jobs:
|
||||
run: |
|
||||
cabal freeze
|
||||
|
||||
- uses: actions/cache@v2.1.3
|
||||
- uses: actions/cache@v3
|
||||
name: Cache ~/.cabal/store
|
||||
with:
|
||||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
|
||||
@ -93,19 +97,19 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
stack: ["2.5"]
|
||||
ghc: ["8.10.4"]
|
||||
stack: ["2.7"]
|
||||
ghc: ["8.10.7"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: haskell/actions/setup@v1
|
||||
- uses: haskell/actions/setup@v1.2
|
||||
name: Setup Haskell Stack
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
stack-version: ${{ matrix.stack }}
|
||||
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v3
|
||||
name: Cache ~/.stack
|
||||
with:
|
||||
path: ~/.stack
|
||||
|
33
.headroom.yaml
Normal file
33
.headroom.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
## This is the configuration file for Headroom.
|
||||
## See https://github.com/vaclavsvejcar/headroom for more details.
|
||||
version: 0.4.0.0
|
||||
|
||||
run-mode: replace
|
||||
|
||||
source-paths:
|
||||
- src/
|
||||
|
||||
excluded-paths: []
|
||||
|
||||
template-paths:
|
||||
- https://raw.githubusercontent.com/kowainik/org/main/headroom-templates/haskell.mustache
|
||||
|
||||
variables:
|
||||
author: Kowainik
|
||||
email: xrom.xkov@gmail.com
|
||||
_haskell_module_copyright: "(c) {{ _current_year }} {{ author }}"
|
||||
|
||||
license-headers:
|
||||
haskell:
|
||||
put-after: ["^{-#"]
|
||||
margin-bottom-code: 1
|
||||
margin-top-code: 1
|
||||
block-comment:
|
||||
starts-with: ^{- \|
|
||||
ends-with: (?<!#)-}$
|
||||
|
||||
post-process:
|
||||
update-copyright:
|
||||
enabled: true
|
||||
config:
|
||||
selected-authors-only: ["{{ author }}"]
|
24
CHANGELOG.md
24
CHANGELOG.md
@ -3,16 +3,32 @@
|
||||
`relude` uses [PVP Versioning][1].
|
||||
The changelog is available [on GitHub][2].
|
||||
|
||||
## Unreleased
|
||||
## 1.1.0.0 — Jun 9, 2022
|
||||
|
||||
* [#388](https://github.com/kowainik/relude/issues/388):
|
||||
Support GHC-9.2.
|
||||
* [#363](https://github.com/kowainik/relude/issues/363):
|
||||
Remove the `Option` type, reexported from `Data.Semigroup`
|
||||
(which was removed in `base-4.16`, GHC 9.2)
|
||||
|
||||
**Migration guide:** Use `Maybe` instead of `Option`.
|
||||
|
||||
* Remove Option from Data.Semigroup (which was removed from base in base 4.16)
|
||||
* [#372](https://github.com/kowainik/relude/issues/372):
|
||||
Warn on usages of `readFileText`, `readFileLText`, `readFile` and `readFile'`.
|
||||
* Support `hashable ^>=1.4`
|
||||
* Switch benchmarks from `criterion` to `tasty-bench`.
|
||||
|
||||
> _NOTE:_ This is a **breaking change** if you build with `-Werror`
|
||||
> and use the above functions. Use `readFileBS` / `readFileLBS`
|
||||
> instead to convert to `Text` / `LText` / `String` using
|
||||
> `decodeUtf8` and similar functions.
|
||||
|
||||
* [#394](https://github.com/kowainik/relude/issues/394):
|
||||
Support `hashable-1.4`.
|
||||
* [#408](https://github.com/kowainik/relude/issues/408):
|
||||
Switch benchmarks from `criterion` to `tasty-bench`.
|
||||
* [#404](https://github.com/kowainik/relude/issues/404):
|
||||
Fix condidion for `ordNubOn`, `intNub`, `intNubOn` export for `Relude.Nub` module.
|
||||
Use min version of `containers-0.6.0` instead of min version of GHC `8.4`.
|
||||
* Minor documentation improvements and fixes.
|
||||
|
||||
## 1.0.0.1 — Mar 15, 2021
|
||||
|
||||
|
29
README.md
29
README.md
@ -117,6 +117,11 @@ blog post by [Type Classes](https://typeclasses.com/) that highlights
|
||||
|
||||
* [No implicit Prelude](https://typeclasses.com/ghc/no-implicit-prelude)
|
||||
|
||||
For guiding development principles behind `relude` and comparison with
|
||||
`base`, check out the following talk:
|
||||
|
||||
* [![Introduction to `relude` — an alternative Haskell prelude](https://img.youtube.com/vi/qwAmiJ5M_zM/0.jpg)](https://www.youtube.com/watch?v=qwAmiJ5M_zM)
|
||||
|
||||
## Structure of this tutorial
|
||||
|
||||
This tutorial has several parts:
|
||||
@ -226,8 +231,8 @@ version: 0.0.0.0
|
||||
|
||||
library
|
||||
exposed-modules: Example
|
||||
build-depends: base >= 4.10 && < 4.13
|
||||
, relude ^>= 1.0.0.0
|
||||
build-depends: base >= 4.14 && < 4.17
|
||||
, relude ^>= 1.1.0.0
|
||||
|
||||
mixins: base hiding (Prelude)
|
||||
, relude (Relude as Prelude)
|
||||
@ -681,7 +686,7 @@ For the latest `relude` version, this can be achieved by executing the following
|
||||
two commands on your CI:
|
||||
|
||||
```yaml
|
||||
curl https://raw.githubusercontent.com/kowainik/relude/v1.0.0.0/.hlint.yaml -o .hlint-relude.yaml
|
||||
curl https://raw.githubusercontent.com/kowainik/relude/v1.1.0.0/.hlint.yaml -o .hlint-relude.yaml
|
||||
curl -sSL https://raw.github.com/ndmitchell/neil/master/misc/travis.sh | sh -s -- hlint -h .hlint-relude.yaml .
|
||||
```
|
||||
|
||||
@ -749,17 +754,15 @@ alternative preludes. It's also relatively small, but:
|
||||
|
||||
Note, that we are using custom `hlint` setting which are `Relude` specific. To
|
||||
keep it up to date don't forget to reflect your changes in this file. We are
|
||||
using `Dhall` to maintain the configurations. To use it follow the steps below.
|
||||
using `Dhall` to maintain the configurations (lang version 22.0.0). To
|
||||
use it follow the steps below.
|
||||
|
||||
First time:
|
||||
|
||||
```shell
|
||||
$ cabal v2-install dhall-yaml
|
||||
$ cabal v2-install dhall-yaml-1.2.10
|
||||
```
|
||||
|
||||
Dhall 16.0.0 is required, so make sure that the previous command installed
|
||||
`dhall-yaml` >= 1.2.5.
|
||||
|
||||
To generate `hlint` file:
|
||||
|
||||
```shell
|
||||
@ -791,3 +794,13 @@ Then draw the graph only for the library dependencies:
|
||||
```shell
|
||||
cabal-plan dot --root lib:relude | dot -Tpng -o relude-dependency-graph.png
|
||||
```
|
||||
|
||||
### Updating license headers
|
||||
|
||||
Install the `headroom` tool and run it from this repository:
|
||||
|
||||
```shell
|
||||
cabal v2-install headroom-0.4.3.0
|
||||
headroom run
|
||||
rg "SPDX-License-Identifier : MPL-2.0" --files-with-matches src/ | xargs sed -i 's/SPDX-License-Identifier : MPL-2.0/SPDX-License-Identifier : MIT/g'
|
||||
```
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 477 KiB After Width: | Height: | Size: 516 KiB |
19
relude.cabal
19
relude.cabal
@ -1,6 +1,6 @@
|
||||
cabal-version: 3.0
|
||||
name: relude
|
||||
version: 1.0.0.1
|
||||
version: 1.1.0.0
|
||||
synopsis: Safe, performant, user-friendly and lightweight Haskell Standard Library
|
||||
description:
|
||||
@__relude__@ is an alternative prelude library. If you find the default
|
||||
@ -95,8 +95,8 @@ tested-with: GHC == 8.2.2
|
||||
GHC == 8.4.4
|
||||
GHC == 8.6.5
|
||||
GHC == 8.8.4
|
||||
GHC == 8.10.4
|
||||
GHC == 9.0.1
|
||||
GHC == 8.10.7
|
||||
GHC == 9.0.2
|
||||
GHC == 9.2.2
|
||||
|
||||
|
||||
@ -122,6 +122,11 @@ common common-options
|
||||
ghc-options: -Wmissing-deriving-strategies
|
||||
if impl(ghc >= 8.10)
|
||||
ghc-options: -Wunused-packages
|
||||
if impl(ghc >= 9.0)
|
||||
ghc-options: -Winvalid-haddock
|
||||
if impl(ghc >= 9.2)
|
||||
ghc-options: -Wredundant-bang-patterns
|
||||
-Woperator-whitespace
|
||||
|
||||
|
||||
default-language: Haskell2010
|
||||
@ -223,14 +228,14 @@ library
|
||||
|
||||
|
||||
build-depends: bytestring >= 0.10 && < 0.12
|
||||
, containers >= 0.5.7 && < 0.7
|
||||
, containers >= 0.5.10 && < 0.7
|
||||
, deepseq ^>= 1.4
|
||||
, ghc-prim >= 0.4.0.0 && < 0.9
|
||||
, hashable >= 1.2 && < 1.5
|
||||
, mtl ^>= 2.2
|
||||
, stm >= 2.4 && < 2.6
|
||||
, text ^>= 1.2
|
||||
, transformers ^>= 0.5
|
||||
, text >= 1.2 && < 2.1
|
||||
, transformers >= 0.5 && < 0.7
|
||||
, unordered-containers >= 0.2.7 && < 0.3
|
||||
|
||||
|
||||
@ -258,7 +263,7 @@ test-suite relude-doctest
|
||||
main-is: Doctest.hs
|
||||
|
||||
build-depends: relude
|
||||
, doctest < 0.19
|
||||
, doctest ^>= 0.20
|
||||
, Glob
|
||||
|
||||
ghc-options: -threaded
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Applicative
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Base
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Bool
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Bool.Guard
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Bool.Reexport
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Container
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -4,9 +4,10 @@
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Container.One
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Container.Reexport
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -17,9 +17,10 @@
|
||||
#endif
|
||||
|
||||
{- |
|
||||
Module : Relude.Debug
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
@ -254,13 +255,13 @@ error handling mechanism.
|
||||
>>> error "oops"
|
||||
*** Exception: oops
|
||||
CallStack (from HasCallStack):
|
||||
error, called at src\\Relude\\Debug.hs:288:11 in ...
|
||||
error, called at src\\Relude\\Debug.hs:289:11 in ...
|
||||
...
|
||||
#else
|
||||
>>> error "oops"
|
||||
*** Exception: oops
|
||||
CallStack (from HasCallStack):
|
||||
error, called at src/Relude/Debug.hs:288:11 in ...
|
||||
error, called at src/Relude/Debug.hs:289:11 in ...
|
||||
...
|
||||
#endif
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.DeepSeq
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2021 Kowainik
|
||||
Module : Relude.Enum
|
||||
Copyright : (c) 2021-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -9,9 +9,10 @@
|
||||
#endif
|
||||
|
||||
{- |
|
||||
Module : Relude.Exception
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,8 +1,9 @@
|
||||
{- |
|
||||
Copyright: (c) 2019-2021 Kowainik
|
||||
Module : Relude.Extra
|
||||
Copyright : (c) 2019-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
This module exports all extra-related stuff.
|
||||
|
@ -1,10 +1,11 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Bifunctor
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Useful combinators for bifunctors inside functors. This set of functions is
|
||||
|
@ -1,10 +1,11 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.CallStack
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Contains useful functions to work with GHC callstack.
|
||||
|
@ -1,10 +1,11 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Enum
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Mini @bounded-enum@ framework inside @relude@.
|
||||
|
@ -2,10 +2,11 @@
|
||||
{-# LANGUAGE BangPatterns #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Foldable
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Contains utility functions for working with tuples.
|
||||
|
@ -8,11 +8,12 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Extra.Foldable1
|
||||
Copyright : (c) 2011-2015 Edward Kmett
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
'Foldable1' is a typeclass like 'Data.Foldable.Foldable' but for non-empty
|
||||
|
@ -2,10 +2,11 @@
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Group
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Polymorphic grouping functions.
|
||||
|
@ -2,11 +2,12 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Extra.Lens
|
||||
Copyright : (c) 2012-2016 Edward Kmett
|
||||
(c) 2019-2021 Kowainik
|
||||
(c) 2019-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
@since 0.5.0
|
||||
@ -158,7 +159,6 @@ you used @Relude.Extra.Lens@ in.
|
||||
- [lens](https://hackage.haskell.org/package/lens)
|
||||
- [microlens](https://hackage.haskell.org/package/microlens)
|
||||
- [lens tutorial](http://hackage.haskell.org/package/lens-tutorial-1.0.3/docs/Control-Lens-Tutorial.html)
|
||||
|
||||
-}
|
||||
|
||||
module Relude.Extra.Lens
|
||||
|
@ -2,10 +2,11 @@
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Map
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Contains implementation of polymorphic type classes for data types 'Set' and
|
||||
|
@ -2,10 +2,11 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Newtype
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Functions to ease work with @newtypes@.
|
||||
|
@ -2,10 +2,11 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Tuple
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Contains utility functions for working with tuples.
|
||||
|
@ -9,10 +9,11 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Extra.Type
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability: Experimental
|
||||
Stability : Stable
|
||||
Portability : Portable
|
||||
|
||||
Contains useful utilities to work with Types.
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.File
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Foldable
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -8,9 +8,10 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Foldable.Fold
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -2,7 +2,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Foldable.Reexport
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Function
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Functor
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -2,9 +2,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Functor.Fmap
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -2,9 +2,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Functor.Reexport
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Lifted
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
@ -58,7 +59,6 @@ __main__ = __do__
|
||||
x <- 'getLine'
|
||||
'print' x
|
||||
@
|
||||
|
||||
-}
|
||||
|
||||
module Relude.Lifted
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Lifted.Concurrent
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2020-2021 Kowainik
|
||||
Module : Relude.Lifted.Env
|
||||
Copyright : (c) 2020-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Lifted.Exit
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -2,9 +2,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Lifted.File
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2020-2021 Kowainik
|
||||
Module : Relude.Lifted.Handle
|
||||
Copyright : (c) 2020-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Lifted.IORef
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Lifted.Terminal
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.List
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -6,9 +6,10 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.List.NonEmpty
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.List.Reexport
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Monad
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -3,9 +3,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Monad.Either
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Monad.Maybe
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Monad.Reexport
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Monad.Trans
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -8,9 +8,10 @@
|
||||
#endif
|
||||
|
||||
{- |
|
||||
Module : Relude.Monoid
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
@ -37,8 +38,8 @@ import Data.Monoid (Ap (..))
|
||||
#endif
|
||||
import Data.Monoid (All (..), Alt (..), Any (..), Dual (..), Endo (..), First (..), Last (..),
|
||||
Monoid (..), Product (..), Sum (..))
|
||||
import Data.Semigroup (Semigroup (sconcat, stimes, (<>)), WrappedMonoid, cycle1,
|
||||
mtimesDefault, stimesIdempotent, stimesIdempotentMonoid, stimesMonoid)
|
||||
import Data.Semigroup (Semigroup (sconcat, stimes, (<>)), WrappedMonoid, cycle1, mtimesDefault,
|
||||
stimesIdempotent, stimesIdempotentMonoid, stimesMonoid)
|
||||
|
||||
import Relude.Bool.Reexport (Bool (..))
|
||||
import Relude.Monad.Reexport (Maybe, fromMaybe)
|
||||
|
@ -2,9 +2,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Nub
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,7 +1,8 @@
|
||||
{-# LANGUAGE Trustworthy #-}
|
||||
|
||||
{- |
|
||||
Copyright: (c) 2018-2021 Kowainik
|
||||
Module : Relude.Numeric
|
||||
Copyright : (c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -4,9 +4,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Print
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.String
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
@ -36,7 +37,6 @@ The table below represents the @relude@ concept of conversion between the follow
|
||||
+-----------------------+---------------------+--------------+--------------+--------------------+------------------------+--------------------------+
|
||||
| __'ShortByteString'__ | 'decodeUtf8' | 'decodeUtf8' | 'fromShort' | 'decodeUtf8' |@'toLazy' . 'fromShort'@| ~ |
|
||||
+-----------------------+---------------------+--------------+--------------+--------------------+------------------------+--------------------------+
|
||||
|
||||
-}
|
||||
|
||||
module Relude.String
|
||||
|
@ -10,9 +10,10 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.String.Conversion
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
@ -100,8 +101,14 @@ class ConvertUtf8 a b where
|
||||
>>> decodeUtf8 @Text @ByteString "\208\208\176\209\130\208\176\208\186"
|
||||
"\65533\65533\1090\1072\1082"
|
||||
#endif
|
||||
|
||||
#if MIN_VERSION_text(2,0,0)
|
||||
>>> decodeUtf8Strict @Text @ByteString "\208\208\176\209\130\208\176\208\186"
|
||||
Left Cannot decode byte '\xd0': Data.Text.Internal.Encoding: Invalid UTF-8 stream
|
||||
#else
|
||||
>>> decodeUtf8Strict @Text @ByteString "\208\208\176\209\130\208\176\208\186"
|
||||
Left Cannot decode byte '\xd0': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream
|
||||
#endif
|
||||
-}
|
||||
decodeUtf8Strict :: b -> Either T.UnicodeException a
|
||||
|
||||
|
@ -7,9 +7,10 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.String.Reexport
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1,9 +1,10 @@
|
||||
{-# LANGUAGE Unsafe #-}
|
||||
|
||||
{- |
|
||||
Module : Relude.Unsafe
|
||||
Copyright : (c) 2016 Stephen Diehl
|
||||
(c) 2016-2018 Serokell
|
||||
(c) 2018-2021 Kowainik
|
||||
(c) 2018-2022 Kowainik
|
||||
SPDX-License-Identifier : MIT
|
||||
Maintainer : Kowainik <xrom.xkov@gmail.com>
|
||||
Stability : Stable
|
||||
|
@ -1 +1,4 @@
|
||||
resolver: lts-17.5
|
||||
resolver: lts-18.28
|
||||
|
||||
extra-deps:
|
||||
- doctest-0.20.0@sha256:fd56edde124a92d42c42c74333f0ae74532329d15a6c63d578cbb51f4e7cfd34,7121
|
Loading…
Reference in New Issue
Block a user