packages feed

text-show-0.7: text-show.cabal

name:                text-show
version:             0.7
synopsis:            Efficient conversion of values into Text
description:         @text-show@ offers a replacement for the @Show@ typeclass intended
                     for use with @Text@ instead of @String@s. This package was created
                     in the spirit of
                     @<http://hackage.haskell.org/package/bytestring-show bytestring-show>@.
                     .
                     At the moment, @text-show@ provides @Show@ instances for most data
                     types in the @<http://hackage.haskell.org/package/array array>@,
                     @<http://hackage.haskell.org/package/base base>@,
                     @<http://hackage.haskell.org/package/bytestring bytestring>@, and
                     @<http://hackage.haskell.org/package/text text>@ packages.
                     Therefore, much of the source code for @text-show@ consists of
                     borrowed code from those packages in order to ensure that the
                     behaviors of the two @Show@ typeclasses coincide.
                     .
                     For most uses, simply importing "Text.Show.Text"
                     will suffice:
                     .
                     @
                        module Main where
                        .
                        import Data.Text (Text)
                        import Prelude hiding (Show(..), print)
                        import Text.Show.Text
                        .
                        hello :: Text
                        hello = show (Just \"Hello, World!\")
                        .
                        main :: IO ()
                        main = print hello
                     @
                     .
                     If you desire it, there are also monomorphic versions of the @showb@
                     function available in the submodules of "Text.Show.Text". A naming
                     convention is present in which functions that show different values
                     depending on the precedence end with @Prec@ (e.g., @showbIntPrec@),
                     whereas functions that show the same values regardless of
                     precedence do not end with @Prec@ (e.g., @showbBool@).
                     .
                     Support for automatically deriving @Show@ instances can be found
                     in the "Text.Show.Text.TH" and "Text.Show.Text.Generic" modules.
                     If you don't know which one to use, use @Text.Show.Text.TH@.
homepage:            https://github.com/RyanGlScott/text-show
bug-reports:         https://github.com/RyanGlScott/text-show/issues
license:             BSD3
license-file:        LICENSE
author:              Ryan Scott
maintainer:          Ryan Scott <ryan.gl.scott@ku.edu>
stability:           Experimental
copyright:           (C) 2014-2015 Ryan Scott
category:            Text
build-type:          Simple
extra-source-files:  CHANGELOG.md, README.md, include/*.h
cabal-version:       >=1.10

source-repository head
  type:                git
  location:            git://github.com/RyanGlScott/text-show.git

library
  exposed-modules:     Text.Show.Text
                       Text.Show.Text.Debug.Trace
                       Text.Show.Text.Debug.Trace.TH
                       Text.Show.Text.TH
                       
                       Text.Show.Text.Control.Applicative
                       Text.Show.Text.Control.Concurrent
                       Text.Show.Text.Control.Exception
                       Text.Show.Text.Control.Monad.ST
                       Text.Show.Text.Data.Array
                       Text.Show.Text.Data.Bool
                       Text.Show.Text.Data.ByteString
                       Text.Show.Text.Data.Char
                       Text.Show.Text.Data.Complex
                       Text.Show.Text.Data.Data
                       Text.Show.Text.Data.Dynamic
                       Text.Show.Text.Data.Either
                       Text.Show.Text.Data.Fixed
                       Text.Show.Text.Data.Floating
                       Text.Show.Text.Data.Functor.Identity
                       Text.Show.Text.Data.Integral
                       Text.Show.Text.Data.List
                       Text.Show.Text.Data.Maybe
                       Text.Show.Text.Data.Monoid
                       Text.Show.Text.Data.Ord
                       Text.Show.Text.Data.Proxy
                       Text.Show.Text.Data.Ratio
                       Text.Show.Text.Data.Text
                       Text.Show.Text.Data.Tuple
                       Text.Show.Text.Data.Typeable
                       Text.Show.Text.Data.Version
                       Text.Show.Text.Data.Void
                       Text.Show.Text.Foreign.C.Types
                       Text.Show.Text.Foreign.Ptr
                       Text.Show.Text.Functions
                       Text.Show.Text.Numeric.Natural
                       Text.Show.Text.System.Exit
                       Text.Show.Text.System.IO
                       Text.Show.Text.System.Posix.Types
                       Text.Show.Text.Text.Read
  other-modules:       Text.Show.Text.Classes
                       Text.Show.Text.Control
                       Text.Show.Text.Data
                       Text.Show.Text.Data.Typeable.Utils
                       Text.Show.Text.Foreign
                       Text.Show.Text.GHC
                       Text.Show.Text.Instances
                       Text.Show.Text.Numeric
                       Text.Show.Text.System
                       Text.Show.Text.Text
                       Text.Show.Text.TH.Internal
                       Text.Show.Text.Utils
  build-depends:       array               >= 0.3     && < 0.6
                     , base                >= 4.2     && < 5
                     -- , containers          >= 0.1     && < 0.6
                     , bytestring          >= 0.9     && < 0.11
                     , ghc-prim
                     , semigroups          >= 0.16.1  && < 1
                     , text                >= 0.8     && < 1.3
                     , template-haskell    >= 2.4     && < 2.11
  hs-source-dirs:      src
  default-language:    Haskell2010
  ghc-options:         -Wall
  include-dirs:        include
  includes:            inline.h
                     , utils.h
  install-includes:    inline.h
                     , utils.h
  
  if impl(ghc >= 7.2)
    exposed-modules:   Text.Show.Text.Debug.Trace.Generic
                       Text.Show.Text.Generic
                       Text.Show.Text.GHC.Fingerprint
                       Text.Show.Text.GHC.Generics
    if !os(windows)
      exposed-modules: Text.Show.Text.GHC.Event
  
  if impl(ghc >= 7.4)
    exposed-modules:   Text.Show.Text.GHC.Stats
  
  if impl(ghc >= 7.6)
    exposed-modules:   Text.Show.Text.GHC.TypeLits
  
  if impl(ghc < 7.7)
    build-depends:     tagged              >= 0.4.4   && < 1
  
  if impl(ghc >= 7.8)
    exposed-modules:   Text.Show.Text.Data.Type.Coercion
                       Text.Show.Text.Data.Type.Equality
    
    if impl(ghc < 7.10)
      exposed-modules: Text.Show.Text.Data.OldTypeable
  else
    build-depends:     bytestring-builder

  if impl(ghc < 7.9)
    build-depends:     nats                >= 0.1     && < 2
                     , transformers        >= 0.2.1   && < 0.5
                     , void                >= 0.5     && < 1
  else
    build-depends:     integer-gmp         >= 1.0     && < 1.1
  
  if impl(ghc >= 7.10)
    exposed-modules:   Text.Show.Text.GHC.RTS.Flags
                       Text.Show.Text.GHC.StaticPtr

  if os(windows)
    exposed-modules:   Text.Show.Text.GHC.Conc.Windows

test-suite text-show-properties
  type:                exitcode-stdio-1.0
  main-is:             Properties.hs
  other-modules:       Derived
                       Instances.BaseAndFriends
                       Instances.Derived
                       Instances.Utils
                       Properties.BaseAndFriends
                       Properties.Builder
                       Properties.Derived
                       Properties.MkShow
                       Properties.Utils
  build-depends:       array                      >= 0.3   && < 0.6
                     , base                       >= 4.5   && < 5
                     , bytestring                 >= 0.9   && < 0.11
                     , ghc-prim
                     -- Needed to conditionally import Arbitrary Natural instance
                     , QuickCheck                 >= 2.5   && < 3
                     , quickcheck-instances       >= 0.1   && < 0.4
                     , silently                   >= 1.2.4 && < 1.3
                     , tasty                      >= 0.8   && < 0.11
                     , tasty-hunit                >= 0.8   && < 0.10
                     , tasty-quickcheck           >= 0.8   && < 0.9
                     , text                       >= 0.8   && < 1.3
                     , text-show                  == 0.7
  hs-source-dirs:      tests
  default-language:    Haskell2010
  ghc-options:         -Wall
  include-dirs:        include
  includes:            overlap.h
                     , utils.h
  install-includes:    overlap.h
                     , utils.h

  if impl(ghc < 7.7)
    build-depends:     tagged                     >= 0.4.4 && < 1

  if impl(ghc < 7.8)
    build-depends:     bytestring-builder

  if impl(ghc < 7.9)
    build-depends:     nats                       >= 0.1   && < 2
                     , transformers               >= 0.2.1 && < 0.5
                     , transformers-compat        >= 0.3   && < 1
                     , void                       >= 0.5   && < 1