Skip to content

Commit

Permalink
Prepare 0.3 version
Browse files Browse the repository at this point in the history
Also fixes #7 (add hashable instance).
  • Loading branch information
phadej authored and anton-k committed Jul 17, 2020
1 parent 3a53a1d commit e09ad07
Show file tree
Hide file tree
Showing 4 changed files with 413 additions and 94 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This Travis job script has been generated by a script via
#
# haskell-ci 'data-fix.cabal'
# haskell-ci '--doctest' 'data-fix.cabal'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.10.1
# version: 0.10.2
#
version: ~> 1.0
language: c
Expand Down Expand Up @@ -97,6 +97,7 @@ install:
- cat $CABALHOME/config
- rm -fv cabal.project cabal.project.local cabal.project.freeze
- travis_retry ${CABAL} v2-update -v
- if [ $HCNUMVER -ge 80000 ] ; then ${CABAL} v2-install $WITHCOMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.17' ; fi
# Generate cabal.project
- rm -rf cabal.project cabal.project.local cabal.project.freeze
- touch cabal.project
Expand Down Expand Up @@ -141,6 +142,8 @@ script:
# Building with tests and benchmarks...
# build & run tests, build benchmarks
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
# Doctest...
- if [ $HCNUMVER -ge 80000 ] ; then (cd ${PKGDIR_data_fix} && doctest src/) ; fi
# cabal check...
- (cd ${PKGDIR_data_fix} && ${CABAL} -vnormal check)
# haddock...
Expand All @@ -149,5 +152,5 @@ script:
- rm -f cabal.project.local
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all

# REGENDATA ("0.10.1",["data-fix.cabal"])
# REGENDATA ("0.10.2",["--doctest","data-fix.cabal"])
# EOF
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 0.3.0

- Rename `cata`, `ana` and `hylo` into `foldFix`, `unfoldFix` and `refold.
Old names are now deprecated, and will be eventually removed.
Similarly, rename monadic variants.
- Add `hoistFix` and `hoistFix'` function.
- Add `Hashable` and `NFData` instance.
Latter is available only with `deepseq >=1.4.3.0`,
which provides `NFData1` type-class
- Change `Eq`, `Ord`, `Show` and `Read` instances to use
`Eq1`, `Ord1`, `Show1` and `Read1` instances of a base functor.
- Add least and greatest fixed point types, `Mu` and `Nu`.
- Drop requirement for `Applicative m` in monadic combinators,
`Monad m` is enough.
- Remove `~>` alias for `refold` (`hylo`).
- Extend the GHC support window.
There is nothing magical in this package.
- Mark `Data.Fix` as Trustworthy (Safe Haskell)
- Make `refold` (and `refoldM`) more efficient.
This results in different effect ordering for `refoldM`.
51 changes: 38 additions & 13 deletions data-fix.cabal
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Name: data-fix
Version: 0.2.1
Version: 0.3.0
Cabal-Version: >= 1.10
License: BSD3
License-file: LICENSE
Author: Anton Kholomiov
Author: Anton Kholomiov, Edward Kmett, Oleg Grenrus
Maintainer: <[email protected]>
Category: Data
Synopsis: Fixpoint data types
Expand All @@ -16,28 +16,53 @@ Description:

Stability: Experimental

Homepage: https://github.com/anton-k/data-fix
Bug-Reports: https://github.com/anton-k/data-fix/issues
Homepage: https://github.com/spell-music/data-fix
Bug-Reports: https://github.com/spell-music/data-fix/issues

Tested-With:
GHC ==7.10.3
GHC ==7.2.2
|| ==7.4.2
|| ==7.6.3
|| ==7.8.4
|| ==7.10.3
|| ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
|| ==8.8.3
|| ==8.10.1

extra-source-files:
CHANGELOG.md

Source-repository head
Type: git
Location: https://github.com/anton-k/data-fix
Location: https://github.com/spell-music/data-fix

library
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
exposed-modules: Data.Fix

if impl(ghc >=8.0)
ghc-options: -Wno-trustworthy-safe

if impl(ghc >=8.4)
ghc-options:
-Wincomplete-uni-patterns -Wincomplete-record-updates
-Wredundant-constraints -Widentities -Wmissing-export-lists

Library
Default-Language: Haskell2010
Build-depends: base >= 4.8, base < 5
Hs-source-dirs: src/
build-depends:
base >=4.4 && <4.15
, deepseq >=1.3.0.0 && <1.5
, hashable >=1.2.7.0 && <1.4

ghc-options: -Wall
if impl(ghc <7.6)
-- for GHC.Generics
build-depends: ghc-prim

Exposed-modules:
Data.Fix
if !impl(ghc >=8.0)
build-depends:
transformers >=0.3 && <0.6
, transformers-compat >=0.6.5 && <0.7
Loading

0 comments on commit e09ad07

Please sign in to comment.