packages feed

data-default-instances-unordered-containers (empty) → 0.0.1

raw patch · 6 files changed

+201/−0 lines, 6 filesdep +data-default-classdep +unordered-containerssetup-changed

Dependencies added: data-default-class, unordered-containers

Files

+ ChangeLog.md view
@@ -0,0 +1,13 @@+# ChangeLog / ReleaseNotes+++## Version 0.0.1++* First public release.+* Uploaded to [Hackage][]: <http://hackage.haskell.org/package/data-default-instances-unordered-containers-0.0.1>++++[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-2016, 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,58 @@+# data-default-instances-unordered-containers++[![Hackage](http://img.shields.io/hackage/v/data-default-instances-unordered-containers.svg)][data-default-instances-unordered-containers]+[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/data-default-instances-unordered-containers.svg)](http://packdeps.haskellers.com/reverse/data-default-instances-unordered-containers)+[![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/data-default-extra.svg)](https://travis-ci.org/trskop/data-default-extra)+++# Description++`Default` instances for types defined in [unordered-containers][] package:++```Haskell+instance Default (HashMap k v) where+    def = HashMap.empty++instance Default (HashSet a) where+    def = HashSet.empty+```++This package is intended to be used in conjunction with [data-default][]+package or directly with [data-default-class][] package.+++## License++The BSD 3-Clause License, see [LICENSE][] file for details.+++## Contributions++Contributions, pull requests and bug reports are welcome! Please don't be+afraid to contact author using GitHub or by e-mail.+++[data-default]:+  https://hackage.haskell.org/package/data-default+  "Hackage: data-default"+[data-default-class]:+  https://hackage.haskell.org/package/data-default-class+  "Hackage: data-default-class"+[data-default-instances-unordered-containers]:+  https://hackage.haskell.org/package/data-default-instances-unordered-containers+  "Package data-default-instances-unordered-containers on Hackage"+[Haskell.org]:+  http://www.haskell.org+  "The Haskell Programming Language"+[LICENSE]:+  https://github.com/trskop/data-default-extra/blob/master/instances-unordered-containers/LICENSE+  "License of data-default-instances-unordered-containers package."+[tl;dr Legal: BSD3]:+  https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29+  "BSD 3-Clause License (Revised)"+[unordered-containers]:+  https://hackage.haskell.org/package/unordered-containers+  "Hackage: unordered-containers"
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ data-default-instances-unordered-containers.cabal view
@@ -0,0 +1,53 @@+name:                   data-default-instances-unordered-containers+version:                0.0.1+synopsis:               Default instances for unordered-containers.+description:+  Orphan instances for @Default@ type class, which is defined in package+  <https://hackage.haskell.org/package/data-default-class data-default-class>.+  .+  Following @Default@ instances are provided:+  .+  > instance Default (HashMap k v) where+  >     def = empty+  >+  > instance Default (HashSet a) where+  >     def = empty++homepage:               https://github.com/trskop/data-default-extra+bug-reports:            https://github.com/trskop/data-default-extra/issues+license:                BSD3+license-file:           LICENSE+author:                 Peter Trško+maintainer:             peter.trsko@gmail.com+copyright:              (c) 2015-2016, Peter Trško+category:               Data+build-type:             Simple+cabal-version:          >=1.10++extra-source-files:+    ChangeLog.md+  , README.md++library+  hs-source-dirs:       src+  exposed-modules:      Data.Default.Instances.UnorderedContainers++  default-language:     Haskell2010+  other-extensions:     NoImplicitPrelude++  build-depends:+      unordered-containers >=0.1.3 && <0.3+    -- ^ Version 0.1.3 is the first one that introduced HashSet.++    , data-default-class ==0.0.*++  ghc-options:          -Wall -fwarn-tabs++source-repository head+  type:                 git+  location:             git://github.com/trskop/data-default-extra.git++source-repository this+  type:                 git+  location:             git://github.com/trskop/data-default-extra.git+  tag:                  unordered-containers-v0.0.1
+ src/Data/Default/Instances/UnorderedContainers.hs view
@@ -0,0 +1,45 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}+-- |+-- Module:       $HEADER$+-- Description:  Default instances for HashMap and HashSet.+-- Copyright:    (c) 2015, Peter Trško+-- License:      BSD3+--+-- Maintainer:   peter.trsko@gmail.com+-- Stability:    experimental+-- Portability:  NoImplicitPrelude+--+-- 'Default' instances for 'HashMap' and 'HashSet' from+-- <https://hackage.haskell.org/package/unordered-containers unordered-containers>+-- package.+module Data.Default.Instances.UnorderedContainers+    ( -- $providedInstances+    )+  where++import Data.HashMap.Strict (HashMap)+import qualified Data.HashMap.Strict as HashMap (empty)+import Data.HashSet (HashSet)+import qualified Data.HashSet as HashSet (empty)++import Data.Default.Class (Default(def))+++instance Default (HashMap k v) where+    def = HashMap.empty++instance Default (HashSet a) where+    def = HashSet.empty++-- $providedInstances+--+-- Following instances are provided:+--+-- @+-- instance 'Default' ('HashMap' k v) where+--     'def' = 'HashMap.empty'+--+-- instance 'Default' ('HashSet' a) where+--     'def' = 'HashSet.empty'+-- @