packages feed

invertible 0.2.0.1 → 0.2.0.2

raw patch · 3 files changed

+1/−80 lines, 3 filesdep −HListdep ~basedep ~haskell-src-meta

Dependencies removed: HList

Dependency ranges changed: base, haskell-src-meta

Files

− Control/Invertible/Monoidal/HList.hs
@@ -1,35 +0,0 @@--- |--- Combine monoidal functors into HLists.-{-# LANGUAGE TypeOperators, DataKinds, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, TypeFamilies, UndecidableInstances #-}-module Control.Invertible.Monoidal.HList-  ( hConsI-  , (>:*<)-  , HSequenceI(..)-  ) where--import Prelude hiding (Functor(..), (<$>), fst, snd, id)-import qualified Data.HList as HL--import Data.Invertible.HList-import Control.Invertible.Monoidal---- |'HL.HCons' two monoidal functors.-hConsI :: Monoidal f => f a -> f (HL.HList l) -> f (HL.HList (a ': l))-hConsI = liftI2 hCons---- |Infix alias for 'hConsI'.-(>:*<) :: Monoidal f => f a -> f (HL.HList l) -> f (HL.HList (a ': l))-(>:*<) = hConsI--infixr 4 >:*<---- |A monoidal version of 'HL.HSequence': a heteogeneous version of 'sequenceMaybesI'.-class (Monoidal m, HL.SameLength a b) => HSequenceI m a b | a -> b, m b -> a where-  hSequenceI :: HL.HList a -> m (HL.HList b)--instance Monoidal m => HSequenceI m '[] '[] where-  hSequenceI _ = pureI HL.HNil--instance (m1 ~ m, Monoidal m, HSequenceI m as bs) => HSequenceI m (m1 a ': as) (a ': bs) where-  hSequenceI (HL.HCons a b) = a >:*< hSequenceI b-
− Data/Invertible/HList.hs
@@ -1,36 +0,0 @@--- |--- Bidirectional version of "Data.HList.HList".-{-# LANGUAGE DataKinds, QuasiQuotes, TypeOperators, FlexibleContexts #-}-module Data.Invertible.HList-  ( hCons-  , hReverse-  , hReverse_-  , hAppend-  , hZip-  ) where--import qualified Data.HList as HL-import Data.Proxy (Proxy(..))--import Data.Invertible.Bijection-import Data.Invertible.TH---- |(De)construct an list from a head and tail.-hCons :: (a, HL.HList l) <-> HL.HList (a ': l)-hCons = [biCase|(a, l) <-> HL.HCons a l|]---- |'HL.hReverse' the order of a list.-hReverse :: (HL.HReverse a b, HL.HReverse b a) => HL.HList a <-> HL.HList b-hReverse = HL.hReverse :<->: HL.hReverse---- |'HL.hReverse_' the order of a list.-hReverse_ :: (HL.HRevApp a '[] b, HL.HRevApp b '[] a) => HL.HList a <-> HL.HList b-hReverse_ = HL.hReverse_ :<->: HL.hReverse_---- |'HL.hAppend' (concatenate) or split two lists.-hAppend :: (HL.HAppendList a b, HL.HSplitAt n (HL.HAppendListR a b) a b) => (HL.HList a, HL.HList b) <-> HL.HList (HL.HAppendListR a b)-hAppend = uncurry HL.hAppendList :<->: HL.hSplitAt Proxy---- |'HL.hZip' two lists together.-hZip :: HL.HZipList a b l => (HL.HList a, HL.HList b) <-> HL.HList l-hZip = uncurry HL.hZipList :<->: HL.hUnzipList
invertible.cabal view
@@ -1,5 +1,5 @@ name:                invertible-version:             0.2.0.1+version:             0.2.0.2 synopsis:            bidirectional arrows, bijective functions, and invariant functors description:   Representations and operations for bidirectional arrows (total isomorphisms: an@@ -26,10 +26,6 @@   description: Support the arrows package   manual: True   default: False-flag HList-  description: Support the HList package-  manual: True-  default: True flag invariant   description: Support the invariant package   manual: True@@ -93,10 +89,6 @@    if flag(arrows)     build-depends: arrows-  if flag(HList)-    exposed-modules: Data.Invertible.HList-    exposed-modules: Control.Invertible.Monoidal.HList-    build-depends: HList == 0.4.*   if flag(invariant)     exposed-modules: Data.Invertible.Invariant     build-depends: invariant