packages feed

polysemy-extra 0.2.0.0 → 0.2.1.0

raw patch · 3 files changed

+29/−23 lines, 3 filesdep ~containersdep ~polysemy

Dependency ranges changed: containers, polysemy

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for polysemy-extra +## v0.2.1.0++* Add explicit import lists.+ ## v0.2.0.0  * Remove `runKVStoreAsKVStore` and `runKVStoreAsKVStoreSem` and move to `polysemy-kvstore`.
polysemy-extra.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-extra-version:        0.2.0.0+version:        0.2.1.0 synopsis:       Extra Input and Output functions for polysemy. category:       Polysemy author:         Daniel Firth@@ -20,7 +20,7 @@  source-repository head   type: git-  location: https://gitlab.com/homotopic-tech/polysemy-extra+  location: https://gitlab.homotopic.tech/haskell/polysemy-extra  library   exposed-modules:@@ -29,10 +29,10 @@       Paths_polysemy_extra   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 && <5-    , containers >=0.4.0.0 && <0.7-    , polysemy >=1.4.0.0 && <1.7+    , containers >=0.5 && <0.7+    , polysemy >=1.4 && <1.8     , polysemy-kvstore >=0.1.2.0 && <0.2   default-language: Haskell2010
src/Polysemy/Extra.hs view
@@ -1,13 +1,13 @@ {-# LANGUAGE AllowAmbiguousTypes #-}-{-# LANGUAGE BlockArguments #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE GADTs #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE PolyKinds #-}-{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE BlockArguments      #-}+{-# LANGUAGE DataKinds           #-}+{-# LANGUAGE GADTs               #-}+{-# LANGUAGE LambdaCase          #-}+{-# LANGUAGE PolyKinds           #-}+{-# LANGUAGE RankNTypes          #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeApplications #-}-{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE TypeApplications    #-}+{-# LANGUAGE TypeOperators       #-}  -- | -- Module      : Polysemy.Extra@@ -51,14 +51,16 @@   ) where -import Control.Arrow-import Data.Map as Map-import Polysemy-import Polysemy.Input-import Polysemy.Internal-import Polysemy.Internal.Union-import Polysemy.KVStore-import Polysemy.Output+import           Control.Arrow           ((>>>))+import           Data.Map                as Map (Map, toList)+import           Polysemy                (Members, Sem, interpret, raise2Under,+                                          raise3Under, raiseUnder)+import           Polysemy.Input          (Input (Input), input, runInputConst)+import           Polysemy.Internal       (hoistSem, subsumeUsing)+import           Polysemy.Internal.Union (ElemOf (Here, There), Union (Union),+                                          hoist)+import           Polysemy.KVStore        (KVStore, writeKV)+import           Polysemy.Output         (Output (Output), output)  -- | Run an `Output` (`Map` k v) as a `KVStore` by writing the values to -- the keys.@@ -223,7 +225,7 @@ raise4Under :: forall e5 e1 e2 e3 e4 r a. Sem (e1 ': e2 ': e3 ': e4 ': r) a -> Sem (e1 ': e2 ': e3 ': e4 ': e5 ': r) a raise4Under = hoistSem $ hoist raise4Under . weaken4Under   where-    weaken4Under :: forall m x. Union (e1 : e2 : e3 : e4 : r) m x -> Union (e1 : e2 : e3 : e4 : e5 : r) m x+    weaken4Under :: forall m x. Union (e1 ': e2 ': e3 ': e4 ': r) m x -> Union (e1 ': e2 ': e3 ': e4 ': e5 ': r) m x     weaken4Under (Union Here a) = Union Here a     weaken4Under (Union (There Here) a) = Union (There Here) a     weaken4Under (Union (There (There Here)) a) = Union (There (There Here)) a