text-binary (empty) → 0.1.0
raw patch · 4 files changed
+77/−0 lines, 4 filesdep +basedep +binarydep +textsetup-changed
Dependencies added: base, binary, text
Files
- Data/Text/Binary.hs +18/−0
- LICENSE +26/−0
- Setup.lhs +4/−0
- text-binary.cabal +29/−0
+ Data/Text/Binary.hs view
@@ -0,0 +1,18 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++module Data.Text.Binary where++import Control.Applicative ((<$>))+import qualified Data.Text as T+import qualified Data.Text.Encoding as T+import qualified Data.Text.Lazy as L+import qualified Data.Text.Lazy.Encoding as L+import Data.Binary++instance Binary T.Text where+ put = put . T.encodeUtf8+ get = T.decodeUtf8 <$> get++instance Binary L.Text where+ put = put . L.encodeUtf8+ get = L.decodeUtf8 <$> get
+ LICENSE view
@@ -0,0 +1,26 @@+Copyright (c) 2012, Jakub Waszczuk+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.lhs view
@@ -0,0 +1,4 @@+#! /usr/bin/env runhaskell++> import Distribution.Simple+> main = defaultMain
+ text-binary.cabal view
@@ -0,0 +1,29 @@+name: text-binary+version: 0.1.0+synopsis: Binary instances for text types+description: + The library provides binary instances for strict and lazy text types.+license: BSD3+license-file: LICENSE+cabal-version: >= 1.6+author: Jakub Waszczuk+maintainer: waszczuk.kuba@gmail.com+stability: provisional+category: Data+homepage: https://github.com/kawu/text-binary+build-type: Simple++library+ build-depends:+ base >= 4 && < 5+ , text+ , binary++ exposed-modules:+ Data.Text.Binary++ ghc-options: -Wall++source-repository head+ type: git+ location: git://github.com/kawu/text-binary.git