packages feed

hOpenPGP 2.1 → 2.2

raw patch · 7 files changed

+24/−19 lines, 7 filesdep +ixset-typeddep −ixsetdep ~basedep ~time

Dependencies added: ixset-typed

Dependencies removed: ixset

Dependency ranges changed: base, time

Files

Codec/Encryption/OpenPGP/Signatures.hs view
@@ -23,8 +23,8 @@ import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.Either (lefts, rights)-import Data.IxSet ((@=))-import qualified Data.IxSet as IxSet+import Data.IxSet.Typed ((@=))+import qualified Data.IxSet.Typed as IxSet import Data.List.NonEmpty (NonEmpty(..)) import Data.Text (Text) import Data.Time.Clock (UTCTime(..), diffUTCTime)
Codec/Encryption/OpenPGP/Types.hs view
@@ -3,6 +3,7 @@ -- This software is released under the terms of the Expat license. -- (See the LICENSE file). +{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-}@@ -32,7 +33,7 @@ import Data.Char (toLower, toUpper) import Data.Data (Data) import Data.Hashable (Hashable(..))-import Data.IxSet (IxSet)+import Data.IxSet.Typed (IxSet) import Data.List (unfoldr) import Data.List.NonEmpty (NonEmpty) import qualified Data.List.NonEmpty as NE@@ -1197,7 +1198,8 @@  instance A.ToJSON TK -type Keyring = IxSet TK+type KeyringIxs = '[EightOctetKeyId, TwentyOctetFingerprint, Text]+type Keyring = IxSet KeyringIxs TK  class Packet a where     data PacketType a :: *
Data/Conduit/OpenPGP/Keyring.hs view
@@ -11,7 +11,7 @@  import Data.Conduit import qualified Data.Conduit.List as CL-import Data.IxSet (empty, insert)+import Data.IxSet.Typed (empty, insert)  import Codec.Encryption.OpenPGP.KeyringParser (finalizeParsing, parseAChunk, parseTK) import Codec.Encryption.OpenPGP.Types
Data/Conduit/OpenPGP/Keyring/Instances.hs view
@@ -3,6 +3,10 @@ -- This software is released under the terms of the Expat license. -- (See the LICENSE file). +{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeSynonymInstances #-}+ module Data.Conduit.OpenPGP.Keyring.Instances ( ) where @@ -14,18 +18,17 @@ import Data.Either (rights) import Data.Function (on) import qualified Data.HashMap.Lazy as HashMap-import Data.IxSet (Indexable(..), ixSet, ixFun)+import Data.IxSet.Typed (Indexable(..), ixList, ixFun) import Data.List (nub, sort) import qualified Data.Map as Map import Data.Semigroup ((<>), Semigroup) import Data.Text (Text) -instance Indexable TK where-    empty = ixSet-                [ ixFun getEOKIs-                , ixFun getTOFs-                , ixFun getUIDs-                ]+instance Indexable KeyringIxs TK where+    indices = ixList+                (ixFun getEOKIs)+                (ixFun getTOFs)+                (ixFun getUIDs)  getEOKIs :: TK -> [EightOctetKeyId] getEOKIs tk = rights (map eightOctetKeyID (tk ^.. biplate :: [PKPayload]))
bench/mark.hs view
@@ -10,7 +10,7 @@ import Control.Monad.Trans.Resource (runResourceT) import Data.Conduit.Serialization.Binary (conduitGet) import Data.Conduit.OpenPGP.Keyring (conduitToTKs, sinkKeyringMap)-import qualified Data.IxSet as IxSet+import qualified Data.IxSet.Typed as IxSet import Data.Binary (get)  import qualified Data.Conduit as DC
hOpenPGP.cabal view
@@ -1,5 +1,5 @@ Name:                hOpenPGP-Version:             2.1+Version:             2.2 Synopsis:            native Haskell implementation of OpenPGP (RFC4880) Description:         native Haskell implementation of OpenPGP (RFC4880) Homepage:            http://floss.scru.org/hOpenPGP/@@ -193,7 +193,7 @@                , errors                , hashable                , incremental-parser-               , ixset                 >= 1.0+               , ixset-typed                , lens                  >= 3.0                , monad-loops                , nettle@@ -244,7 +244,7 @@                , errors                , hashable                , incremental-parser-               , ixset                 >= 1.0+               , ixset-typed                , lens                  >= 3.0                , monad-loops                , nettle@@ -297,7 +297,7 @@                , errors                , hashable                , incremental-parser-               , ixset                 >= 1.0+               , ixset-typed                , lens                  >= 3.0                , monad-loops                , nettle@@ -328,4 +328,4 @@ source-repository this   type:     git   location: git://git.debian.org/users/clint/hOpenPGP.git-  tag:      v2.1+  tag:      v2.2
tests/suite.hs view
@@ -29,7 +29,7 @@ import Data.Conduit.OpenPGP.Decrypt (conduitDecrypt) import Data.Conduit.OpenPGP.Keyring (conduitToTKs, conduitToTKsDropping, sinkKeyringMap) import Data.Conduit.OpenPGP.Verify (conduitVerify)-import Data.IxSet ((@=), getOne)+import Data.IxSet.Typed ((@=), getOne) import Data.Maybe (isJust) import Data.Binary (get, put) import Data.Binary.Get (runGetOrFail, Get)