name: data-default-instances-new-base
version: 0.0.1
synopsis:
Default instances for types in newer versions of base package.
description:
Orphan instances for @Default@ type class, which is defined in package
<https://hackage.haskell.org/package/data-default-class data-default-class>.
.
In addition to instances reexported from
<https://hackage.haskell.org/package/data-default-instances-base data-default-instances-base>
package, following @Default@ instances are provided:
.
> instance Default a => Default (Const a b) where
> def = Const def
>
> instance Monad m => Default (Kleisli m a b) where
> def = Kleisli return
>
> instance Default Version where
> def = Version [] []
.
Following instances are available only for base >= 4.7.0.0:
.
> instance Default (Proxy a) where
> def = Proxy
>
> instance Default SomeNat where
> def = SomeNat (Proxy :: Proxy 0)
>
> instance Default SomeNat where
> def = SomeSymbol (Proxy :: Proxy "")
.
Following instances are available only for base >= 4.8.0.0:
.
> instance Alternative f => Default (Alt f a) where
> def = Alt empty
>
> instance Default a => Default (Identity a) where
> def = Identity def
>
> instance Default Natural where
> def = 0
.
Following instances are available only for base >= 4.9.0.0:
.
> instance Default a => Default (NonEmpty a) where
> def = def :| []
>
> instance Bounded a => Default (Min a) where
> def = minBound
>
> instance Bounded a => Default (Max a) where
> def = maxBound
>
> instance Default (Option a) where
> def = Option Nothing
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.Base.New
-- other-modules:
default-language: Haskell2010
other-extensions: CPP, NoImplicitPrelude, DataKinds
build-depends:
base >=4 && <5
-- ^ Probably even lower version of base could be supported.
, data-default-class ==0.0.*
, data-default-instances-base ==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: new-base-v0.0.1