packages feed

conversion-bytestring (empty) → 1.0.0.0

raw patch · 5 files changed

+153/−0 lines, 5 filesdep +base-preludedep +bytestringdep +conversionsetup-changed

Dependencies added: base-prelude, bytestring, conversion

Files

+ CHANGELOG.md view
+ LICENSE view
@@ -0,0 +1,22 @@+Copyright (c) 2015, Nikita Volkov++Permission is hereby granted, free of charge, to any person+obtaining a copy of this software and associated documentation+files (the "Software"), to deal in the Software without+restriction, including without limitation the rights to use,+copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the+Software is furnished to do so, subject to the following+conditions:++The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR+OTHER DEALINGS IN THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ conversion-bytestring.cabal view
@@ -0,0 +1,56 @@+name:+  conversion-bytestring+version:+  1.0.0.0+synopsis:+  "Conversion" instances for the "bytestring" library+category:+  Control, Data, Conversion+homepage:+  https://github.com/nikita-volkov/conversion-bytestring +bug-reports:+  https://github.com/nikita-volkov/conversion-bytestring/issues +author:+  Nikita Volkov <nikita.y.volkov@mail.ru>+maintainer:+  Nikita Volkov <nikita.y.volkov@mail.ru>+copyright:+  (c) 2015, Nikita Volkov+license:+  MIT+license-file:+  LICENSE+build-type:+  Simple+cabal-version:+  >=1.10+extra-source-files:+  CHANGELOG.md+++source-repository head+  type:+    git+  location:+    git://github.com/nikita-volkov/conversion-bytestring.git+++library+  hs-source-dirs:+    library+  ghc-options:+    -funbox-strict-fields+  default-extensions:+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, ImpredicativeTypes, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples+  default-language:+    Haskell2010+  other-modules:+  exposed-modules:+    Conversion.ByteString+  build-depends:+    -- +    bytestring >= 0.10 && < 0.11,+    -- +    conversion == 1.*,+    --+    base-prelude >= 0.1.19 && < 0.2
+ library/Conversion/ByteString.hs view
@@ -0,0 +1,73 @@+module Conversion.ByteString () where++import BasePrelude+import Conversion+import qualified Data.ByteString as BS+import qualified Data.ByteString.Lazy as BL+import qualified Data.ByteString.Builder as BB+++instance Conversion BS.ByteString [Word8] where+  {-# INLINE convert #-}+  convert = BS.unpack++instance Conversion BS.ByteString BL.ByteString where+  {-# INLINE convert #-}+  convert = BL.fromStrict++instance Conversion BS.ByteString BB.Builder where+  {-# INLINE convert #-}+  convert = BB.byteString+++instance Conversion BL.ByteString [Word8] where+  {-# INLINE convert #-}+  convert = BL.unpack++instance Conversion BL.ByteString BS.ByteString where+  {-# INLINE convert #-}+  convert = BL.toStrict++instance Conversion BL.ByteString BB.Builder where+  {-# INLINE convert #-}+  convert = BB.lazyByteString+++instance Conversion BB.Builder [Word8] where+  {-# INLINE convert #-}+  convert = convert . BB.toLazyByteString++instance Conversion BB.Builder BS.ByteString where+  {-# INLINE convert #-}+  convert = convert . BB.toLazyByteString++instance Conversion BB.Builder BL.ByteString where+  {-# INLINE convert #-}+  convert = BB.toLazyByteString+++instance Conversion [Word8] BS.ByteString where+  {-# INLINE convert #-}+  convert = BS.pack++instance Conversion [Word8] BL.ByteString where+  {-# INLINE convert #-}+  convert = BL.pack++instance Conversion [Word8] BB.Builder where+  {-# INLINE convert #-}+  convert = foldMap BB.word8+++instance Conversion Word8 BS.ByteString where+  {-# INLINE convert #-}+  convert = BS.singleton++instance Conversion Word8 BL.ByteString where+  {-# INLINE convert #-}+  convert = BL.singleton++instance Conversion Word8 BB.Builder where+  {-# INLINE convert #-}+  convert = BB.word8+