-- Initial generic-maybe.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ name: generic-maybe version: 0.3.0.0 synopsis: A generic version of Data.Maybe description: This module is a drop in replacement for 'Data.Maybe'. It generalizes the functions to any types that share the same \"sum of products\" view of 'Maybe'. . To use the module for you type, enable GHC's DeriveGeneric extension and derive a Generic instance for your type. . > import GHC.Generics > > data Result a = Success a | Fail > deriving (Show, Generic) . After which you can use the functions, like your type was 'Data.Maybe.Maybe' . >> fromMaybe 'a' Fail >'a' . >> fromMaybe 'a' $ Success 'b' >'b' homepage: https://github.com/jfischoff/generic-maybe license: BSD3 license-file: LICENSE author: Jonathan Fischoff maintainer: jonathangfischoff@gmail.com -- copyright: category: Generics build-type: Custom -- extra-source-files: cabal-version: >=1.10 -- You can disable the doctests test suite with -f-test-doctests flag test-doctests default: True manual: True -- You can disable the hlint test suite with -f-test-hlint -- Disabled until the LambdaCase extension is added src-exts flag test-hlint default: True manual: True library exposed-modules : Data.Generics.Maybe other-extensions: DeriveGeneric , TypeFamilies , TypeOperators , MultiParamTypeClasses , FunctionalDependencies , FlexibleContexts , FlexibleInstances , ScopedTypeVariables build-depends: base >=4.5 && < 4.7 , lens >=3.10 && < 5.0 , ghc-prim hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall test-suite doctests type: exitcode-stdio-1.0 main-is: doctests.hs ghc-options: -Wall -threaded hs-source-dirs: tests default-language: Haskell2010 if impl(ghc<7.6.1) buildable: False if !flag(test-doctests) buildable: False else build-depends: base, bytestring, containers, directory >= 1.0, deepseq, doctest >= 0.9.1, filepath, generic-deriving, mtl, nats, parallel, semigroups >= 0.9, simple-reflect >= 0.3.1, split, text, unordered-containers, vector if impl(ghc<7.6.1) ghc-options: -Werror test-suite hlint type: exitcode-stdio-1.0 main-is: hlint.hs -- ghc-options: -w -threaded -rtsopts -with-rtsopts=-N hs-source-dirs: tests default-language: Haskell2010 if !flag(test-hlint) buildable: False else build-depends: base, hlint >= 1.7 test-suite tasty type: exitcode-stdio-1.0 main-is: tasty.hs hs-source-dirs: tests, src default-language: Haskell2010 build-depends: base , lens >= 3.10 && < 5.0 , ghc-prim , deepseq , tasty >= 0.7 && < 0.8 , tasty-th >= 0.1.1 && < 0.2 , tasty-hunit >= 0.4.1 && < 0.5 , HUnit >= 1.2 && < 1.3