packages feed

base91 1.0.0 → 1.0.1

raw patch · 2 files changed

+31/−2 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

+ Codec/Binary/Base91/Control.hs view
@@ -0,0 +1,29 @@+-- Copyright 2015 Alvaro J. Genial (http://alva.ro) -- see LICENSE.md for more.++{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}++module Codec.Binary.Base91.Control (Applicative' (..), Foldable' (..)) where++import Control.Applicative (Applicative, pure)+import Data.Foldable (Foldable, foldl')+import Data.Monoid (Monoid)++-- A version of 'Applicative' compatible with monomorphic containers.+class (Monoid a) => Applicative' a where+    type Item a :: *+    pure' :: Item a -> a++instance (Applicative a, Monoid (a i)) => Applicative' (a i) where+  type Item (a i) = i+  pure' = pure++-- A version of 'Foldable' compatible with monomorphic containers.+class Foldable' f where+    type Element f :: *+    fold' :: (x -> Element f -> x) -> x -> f -> x++instance (Foldable f) => Foldable' (f e) where+  type Element (f e) = e+  fold' = foldl'
base91.cabal view
@@ -1,5 +1,5 @@ Name:                  base91-Version:               1.0.0+Version:               1.0.1 Author:                Alvaro J. Genial Maintainer:            ajg Homepage:              https://github.com/ajg/base91@@ -24,7 +24,7 @@  Library   Build-Depends:       base >= 4 && < 5-  Exposed-Modules:     Codec.Binary.Base91, Codec.Binary.Base91.String+  Exposed-Modules:     Codec.Binary.Base91, Codec.Binary.Base91.Control, Codec.Binary.Base91.String    if flag(ByteString)     Build-Depends:     bytestring