recursion 1.2.1.0 → 1.2.1.1
raw patch · 3 files changed
+20/−1 lines, 3 files
Files
- CHANGELOG.md +4/−0
- recursion.cabal +1/−1
- src/Control/Recursion.hs +15/−0
CHANGELOG.md view
@@ -1,5 +1,9 @@ # recursion +## 1.2.1.1++* Performance improvements+ ## 1.2.1.0 * Add `chema`, `scolio`, and `dendro`
recursion.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: recursion-version: 1.2.1.0+version: 1.2.1.1 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale
src/Control/Recursion.hs view
@@ -252,6 +252,21 @@ -> s -> t hoist = cata . (embed .)+{-# NOINLINE [0] hoist #-}++hoistMu :: (forall a. f a -> g a) -> Mu f -> Mu g+hoistMu eta (Mu f) = Mu (f . (. eta))++hoistNu :: (forall a. f a -> g a) -> Nu f -> Nu g+hoistNu n (Nu f x) = Nu (n . f) x++{-# RULES+ "hoist/hoistMu" forall (eta :: forall a. f a -> f a) (f :: forall a. (f a -> a) -> a). hoist eta (Mu f) = hoistMu eta (Mu f);+ #-}++{-# RULES+ "hoist/hoistNu" forall (eta :: forall a. f a -> f a) (f :: a -> f a) x. hoist eta (Nu f x) = hoistNu eta (Nu f x);+ #-} refix :: (Recursive s, Corecursive t, Base s ~ Base t) => s -> t refix = cata embed