name:          universe-base
version:       1.1.1
synopsis:      A class for finite and recursively enumerable types.
description:
  A class for finite and recursively enumerable types and some helper functions for enumerating them.
  .
  @
  class Universe a where universe :: [a]
  class Universe a => Finite a where universeF :: [a]; universeF = universe
  @
  .
  This is slim package definiting only the type-classes and instances
  for types in GHC boot libraries.
  For more instances check @universe-instances-*@ packages.

homepage:      https://github.com/dmwit/universe
license:       BSD3
license-file:  LICENSE
author:        Daniel Wagner
maintainer:    me@dmwit.com
copyright:     2014 Daniel Wagner
category:      Data
build-type:    Simple
cabal-version: >=1.10
extra-source-files: changelog
tested-with:
  GHC ==8.8.1 || ==8.6.4 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2 || ==7.0.4

source-repository head
  type:     git
  location: https://github.com/dmwit/universe

source-repository this
  type:     git
  location: https://github.com/dmwit/universe
  tag:      base-1.1

library
  default-language: Haskell2010
  hs-source-dirs:   src
  exposed-modules:
    Data.Universe.Class
    Data.Universe.Helpers

  if impl(ghc >= 7.2)
    exposed-modules:
      Data.Universe.Generic
    if impl(ghc <7.6)
      build-depends:
        ghc-prim

  other-extensions:
    BangPatterns
    CPP
    GADTs
    ScopedTypeVariables
    TypeFamilies

  build-depends:
      base          >=4.3     && <4.13
    , containers    >=0.4.0.0 && <0.7
    , tagged        >=0.8.4   && <0.9
    , transformers  >=0.3.0.0 && <0.6

  if impl(ghc >=7.10.3)
    build-depends: transformers >=0.4.2.0

  if !impl(ghc >=7.10.3)
    build-depends: transformers-compat >=0.6.1 && <0.7

  if !impl(ghc >=7.10)
    build-depends:
        nats  >=1.1.2 && <1.2
      , void  >=0.7.2 && <0.8

  if !impl(ghc >=8.0)
    build-depends: semigroups >=0.18.2 && <0.20

  if impl(ghc >=7.4)
    cpp-options:      -DDEFAULT_SIGNATURES
    other-extensions: DefaultSignatures

test-suite tests
  default-language: Haskell2010
  other-extensions: ScopedTypeVariables
  type:             exitcode-stdio-1.0
  main-is:          Tests.hs
  hs-source-dirs:   tests
  ghc-options:      -Wall
  build-depends:
      base
    , containers
    , QuickCheck     >=2.8.2 && <2.14
    , universe-base

  if !impl(ghc >=7.10)
    build-depends:
        nats