packages feed

elevator 0.2.1 → 0.2.2

raw patch · 2 files changed

+6/−5 lines, 2 filesdep ~extensible

Dependency ranges changed: extensible

Files

elevator.cabal view
@@ -1,5 +1,5 @@ name:                elevator
-version:             0.2.1
+version:             0.2.2
 synopsis:            Immediately lifts to a desired level
 description:         This package provides 'elevate' function which composes 'lift'-like transformations automatically.
 homepage:            https://github.com/fumieval/elevator
@@ -24,6 +24,6 @@ library
   exposed-modules:     Control.Elevator
   other-extensions:    TypeOperators, FlexibleContexts, FlexibleInstances, ConstraintKinds, TypeFamilies, DataKinds
-  build-depends:       base >= 4.7 && <5, transformers >= 0.3 && <0.5, extensible >= 0.2.6 && <0.3
+  build-depends:       base >= 4.7 && <5, transformers >= 0.3 && <0.5, extensible >= 0.3 && <0.4
   hs-source-dirs:      src
   default-language:    Haskell2010
src/Control/Elevator.hs view
@@ -34,6 +34,7 @@ import Data.Functor.Identity import Data.Extensible import Data.Extensible.Internal+import Data.Extensible.Internal.Rig (views) import Data.Extensible.Union import Data.Extensible.League import Control.Applicative@@ -62,7 +63,7 @@  -- | Lift a thing, automatically. elevate :: Elevate f g => f a -> g a-elevate = runGondola (hlookup membership stairs1)+elevate = views sector runGondola stairs1 {-# RULES "elevate/id" [~2] elevate = id #-} {-# INLINE[2] elevate #-} @@ -115,11 +116,11 @@  instance Generate xs => Tower (Union xs) where   type Floors (Union xs) = xs-  stairs = generate $ \pos -> Gondola $ Union . UnionAt pos . Flux id+  stairs = htabulate $ \pos -> Gondola $ Union . UnionAt pos . Flux id  instance Forall Functor xs => Tower (League xs) where   type Floors (League xs) = xs-  stairs = generateFor (Proxy :: Proxy Functor) $ \pos -> Gondola $ \f -> League $ UnionAt pos $ Fuse (<$>f)+  stairs = htabulateFor (Proxy :: Proxy Functor) $ \pos -> Gondola $ \f -> League $ UnionAt pos $ Fuse (<$>f)  instance (Monad m, Tower m) => Tower (Lazy.StateT s m) where   type Floors (Lazy.StateT s m) = Floors1 m