packages feed

verbosity (empty) → 0.1.0.0

raw patch · 6 files changed

+252/−0 lines, 6 filesdep +basedep +binarydep +data-default-classsetup-changed

Dependencies added: base, binary, data-default-class, ghc-prim

Files

+ ChangeLog.md view
@@ -0,0 +1,12 @@+# ChangeLog / ReleaseNotes+++## Version 0.1.0.0++* First public release.+* Uploaded to [Hackage][]: <http://hackage.haskell.org/package/verbosity-0.1.0.0>+++[Hackage]:+  http://hackage.haskell.org/+  "HackageDB (or just Hackage) is a collection of releases of Haskell packages."
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) 2015, Peter Trško++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.++    * Neither the name of Peter Trško nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++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.
+ README.md view
@@ -0,0 +1,24 @@+# verbosity++[![Hackage](http://img.shields.io/hackage/v/verbosity.svg)][Hackage: verbosity]+[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/verbosity.svg)](http://packdeps.haskellers.com/reverse/verbosity)+[![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)][Haskell.org]+[![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)][tl;dr Legal: BSD3]++[![Build](https://travis-ci.org/trskop/verbosity.svg)](https://travis-ci.org/trskop/verbosity)+++# Description++Simple enum that encodes application verbosity with various useful instances.+++[Hackage: verbosity]:+  http://hackage.haskell.org/package/verbosity+  "verbosity package on Hackage"+[Haskell.org]:+  http://www.haskell.org+  "The Haskell Programming Language"+[tl;dr Legal: BSD3]:+  https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29+  "BSD 3-Clause License (Revised)"
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ src/Data/Verbosity.hs view
@@ -0,0 +1,99 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE NoImplicitPrelude #-}++#ifdef DERIVE_DATA_TYPEABLE+{-# LANGUAGE DeriveDataTypeable #-}+#endif++#ifdef DERIVE_GHC_GENERICS+{-# LANGUAGE DeriveGeneric #-}+#endif++-- |+-- Module:       $HEADER$+-- Description:  Verbosity enum.+-- Copyright:    (c) 2015, Peter Trško+-- License:      BSD3+--+-- Maintainer:   peter.trsko@gmail.com+-- Stability:    experimental+-- Portability:  CPP, NoImplicitPrelude, DeriveDataTypeable (optional),+--               DeriveGeneric (optional)+--+-- Simple enum that encodes application 'Verbosity'.+module Data.Verbosity (Verbosity(..))+  where++import Prelude+    ( Bounded+#ifdef DECLARE_BINARY_INSTANCE+    , Enum(fromEnum, toEnum)+    , fromIntegral+#else+    , Enum+#endif+    )++import Data.Eq (Eq)+import Data.Ord (Ord)+import Text.Show (Show)+import Text.Read (Read)++#ifdef DERIVE_DATA_TYPEABLE+import Data.Data (Data, Typeable)+#endif++#ifdef DERIVE_GHC_GENERICS+import GHC.Generics (Generic)+#endif++#ifdef DECLARE_BINARY_INSTANCE+import Control.Applicative ((<$>))+import Data.Function ((.))++import Data.Binary (Binary(get, put), getWord8, putWord8)+#endif++#ifdef DECLARE_DEFAULT_INSTANCE+import Data.Default.Class (Default(def))+#endif+++data Verbosity+    = Silent+    -- ^ Don't print any messages.+    | Normal+    -- ^ Print only important messages. (default)+    | Verbose+    -- ^ Print anything that comes in to mind.+    | Annoying+    -- ^ Print debugging/tracing information.+  deriving+    ( Bounded+    , Enum+    , Eq+    , Ord+    , Read+    , Show+#ifdef DERIVE_GHC_GENERICS+    , Generic+#endif+#ifdef DERIVE_DATA_TYPEABLE+    , Data+    , Typeable+#endif+    )++#ifdef DECLARE_DEFAULT_INSTANCE+-- | @'def' = 'Normal'@+instance Default Verbosity where+    def = Normal+#endif++#ifdef DECLARE_BINARY_INSTANCE+-- Encoded as byte in range+-- ['fromEnum' v | v <- ['Prelude.minBound'..'Prelude.maxBound' :: 'Verbosity']+instance Binary Verbosity where+    get = toEnum . fromIntegral <$> getWord8+    put = putWord8 . fromIntegral . fromEnum+#endif
+ verbosity.cabal view
@@ -0,0 +1,85 @@+name:                   verbosity+version:                0.1.0.0+synopsis:               Simple enum that encodes application verbosity.+description:+  Simple enum that encodes application verbosity with various useful instances.++homepage:               https://github.com/trskop/verbosity+bug-reports:            https://github.com/trskop/verbosity/issues+license:                BSD3+license-file:           LICENSE+author:                 Peter Trško+maintainer:             peter.trsko@gmail.com+copyright:              (c) 2015, Peter Trško+category:               Data+build-type:             Simple+cabal-version:          >=1.10++extra-source-files:     ChangeLog.md, README.md++flag pedantic+  description:          Pass additional warning flags to GHC.+  default:              False+  manual:               True++flag data-typeable+  description:          Derive instances for Data and Typeable type classes.+  default:              True++flag ghc-generics+  description:          Derive instances for Data and Typeable type classes.+  default:              True++flag binary+  description:          Derive instances for Binary type class.+  default:              True++flag data-default+  description:          Derive instances for Default type class.+  default:              True++library+  hs-source-dirs:       src+  exposed-modules:      Data.Verbosity++  default-language:     Haskell2010+  other-extensions:+      CPP+    , NoImplicitPrelude+    , DeriveDataTypeable+    -- ^ With -fdata-typeable+    , DeriveGeneric+    -- ^ With -fghc-generics++  build-depends:        base >=4 && <5+  ghc-options:          -Wall -fwarn-tabs++  if flag(pedantic)+    ghc-options:        -fwarn-implicit-prelude -fwarn-missing-import-lists++  if flag(ghc-generics)+    cpp-options:        -DDERIVE_GHC_GENERICS++    -- GHC.Generics moved from ghc-prim to base with GHC 7.6 release.+    if impl(ghc >=7.2 && <7.6)+      build-depends:    ghc-prim++  if flag(data-typeable)+    cpp-options:        -DDERIVE_DATA_TYPEABLE++  if flag(binary)+    build-depends:      binary >=0.5 && <0.8+    cpp-options:        -DDECLARE_BINARY_INSTANCE++  if flag(data-default)+    build-depends:      data-default-class ==0.0.*+    cpp-options:        -DDECLARE_DEFAULT_INSTANCE++source-repository head+  type:                 git+  location:             git://github.com/trskop/verbosity++source-repository this+  type:                 git+  location:             git://github.com/trskop/verbosity.git+  tag:                  v0.1.0.0