enumerate-0.2.2: enumerate all the values in a finite type (automatically)

Safe HaskellNone
LanguageHaskell2010

Enumerate.Orphans.Large

Contents

Description

orphan instances, of Enumerable, for large types (i.e. Word32 / Word64 / Int32 / Int64).

see:

(that are included for completeness, but not exported by default (i.e. by Enumerate). you probably want build-time instance-resolution errors instead of probable runtime non-termination).

Synopsis

Documentation

Orphan instances

Enumerable Int Source #

finite but too large.

>>> 1 + toInteger (maxBound::Int) - toInteger (minBound::Int)
...
Enumerable Int32 Source #

finite but too large. 2^64 is a few billion.

>>> 1 + toInteger (maxBound::Int32) - toInteger (minBound::Int32)
4294967296
Enumerable Int64 Source #

finite but too large. 2^64 is over a billion billion.

e.g. reifyFunction (which takes time linear in the domain) on a function of type (:: Int -> Bool), won't terminate anytime soon.

>>> 1 + toInteger (maxBound::Int64) - toInteger (minBound::Int64)
18446744000000000000
Enumerable Word Source # 
Enumerable Word32 Source # 
Enumerable Word64 Source #