packages feed

polysemy-several 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+24/−15 lines, 3 filesdep ~basedep ~polysemyPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, polysemy

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Changelog for polysemy-severl +## v0.1.1.0++* Add StandaloneKindSignatures.+* Add explicit import lists.+ ## v0.1.0.0  * Imported `Polysemy.Several` from polysemy-zoo.
polysemy-several.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.34.7. -- -- see: https://github.com/sol/hpack  name:           polysemy-several-version:        0.1.0.0+version:        0.1.1.0 synopsis:       Run several effects at once, taken from the polysemy-zoo. description:    Run several effects at once, taken from the polysemy-zoo. category:       Polysemy@@ -21,7 +21,7 @@  source-repository head   type: git-  location: https://gitlab.com/homotopic-tech/polysemy-several+  location: https://gitlab.homotopic.tech/haskell/polysemy-several  library   exposed-modules:@@ -30,8 +30,8 @@       Paths_polysemy_several   hs-source-dirs:       src-  ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints+  ghc-options: -Weverything -Wno-all-missed-specialisations -Wno-implicit-prelude -Wno-monomorphism-restriction -Wno-missing-local-signatures -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module -Wno-orphans -Wno-safe -Wno-unsafe   build-depends:-      base >=4.7 && <4.16-    , polysemy >=1.3.0.0 && <1.7+      base >=4.7 && <4.18+    , polysemy >=1.3.0.0 && <1.8   default-language: Haskell2010
src/Polysemy/Several.hs view
@@ -1,9 +1,10 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE DataKinds                #-}+{-# LANGUAGE GADTs                    #-}+{-# LANGUAGE PolyKinds                #-}+{-# LANGUAGE RankNTypes               #-}+{-# LANGUAGE StandaloneKindSignatures #-}+{-# LANGUAGE TypeFamilies             #-}+{-# LANGUAGE TypeOperators            #-}  module Polysemy.Several   ( HList (..),@@ -13,8 +14,8 @@   ) where -import Data.Kind-import Polysemy+import           Data.Kind (Type)+import           Polysemy  (Sem)  ------------------------------------------------------------------------------ @@ -24,6 +25,7 @@ -- > 1 ::: "test" ::: True ::: HNil infixr 5 ::: +type HList :: [Type] -> Type data HList a where   HNil :: HList '[]   (:::) :: a -> HList (b :: [Type]) -> HList (a ': b)@@ -35,6 +37,7 @@ -- -- > TypeMap Reader [Int, String, False] -- > [Reader Int, Reader String, Reader Bool]+type TypeMap :: (a -> b) -> [a] -> [b] type family TypeMap (f :: a -> b) (xs :: [a]) where   TypeMap _ '[] = '[]   TypeMap f (x ': xs) = f x ': TypeMap f xs@@ -45,6 +48,7 @@ -- -- > Append [Int, String] [Bool] -- > [Int, String, Bool]+type Append :: [t] -> [t] -> [t] type family Append (a :: [t]) (b :: [t]) where   Append '[] b = b   Append (a ': as) b = a ': Append as b@@ -72,4 +76,4 @@   Sem (Append (TypeMap e t) r) a ->   Sem r a runSeveral f (a ::: as) = runSeveral f as . f a-runSeveral _ HNil = id+runSeveral _ HNil       = id