Hoogle Search

Within LTS Haskell 24.49 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. module GHC.Internal.Data.Enum

    The Enum and Bounded classes.

  2. class Enum a

    ghc-internal GHC.Internal.Data.Enum

    Class Enum defines operations on sequentially ordered types. The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details. For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
    where
    bound | fromEnum y >= fromEnum x = maxBound
    | otherwise                = minBound
    

  3. module GHC.Internal.Enum

    The Enum and Bounded classes.

  4. class Enum a

    ghc-internal GHC.Internal.Enum

    Class Enum defines operations on sequentially ordered types. The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details. For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
    where
    bound | fromEnum y >= fromEnum x = maxBound
    | otherwise                = minBound
    

  5. module Data.ProtoLens.Message.Enum

    This internal module provides functions used to define the various enumFrom* functions of Enum. We expect fromEnum to be an ordering homomorphism, that is:

    forall a b. Enum a b
    succ a == b => fromEnum a < fromEnum b
    
    Note that this homomorphism is most likely not surjective. Note further that one cannot assume:
    CANNOT BE ASSUMED !
    succ a == b => fromEnum a + 1 == fromEnum b
    
    The succ essor of a given message enum value A that's not maxBound is the enum value B whose fromEnum value is the one immediately after A's fromEnum value. That is, fromEnum determines order, but not distance. As an example, consider the enum in the test suite:
    enum Baz {
    BAZ1 = 1; BAZ2 = 2; BAZ3 = 4; BAZ4 = 6;
    BAZ5 = 7; BAZ6 = 9; BAZ7 = 10; BAZ8 = 12;
    }
    
    In this case, succ BAZ2 is BAZ3 despite their fromEnum values differing by 2. Further, [BAZ2, BAZ4 ..] or equivalently messageEnumFromThen BAZ2 BAZ4 is every other enum (i.e. a distance of 2) when taken as a list, i.e. [BAZ2, BAZ4, BAZ6, BAZ8] despite the fromEnum distances being [4, 3, 3]. That said, it is highly unwise to use any of the [a,b ..*] patterns or enumFromThen* functions since adding or removing enums values can cause previously functioning code to fail. I.e. removing BAZ3 in the above example makes the result equivalent fromEnum BAZ2 and the sequence now includes every enum value save BAZ1. This is all despite the fact that BAZ3 was never referenced.

  6. class Enum a

    protolude Protolude

    Class Enum defines operations on sequentially ordered types. The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details. For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
    where
    bound | fromEnum y >= fromEnum x = maxBound
    | otherwise                = minBound
    

  7. class Enum a

    protolude Protolude.Base

    Class Enum defines operations on sequentially ordered types. The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details. For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
    where
    bound | fromEnum y >= fromEnum x = maxBound
    | otherwise                = minBound
    

  8. Enum :: forall (stage :: Stage) . TypeName -> Value stage

    morpheus-graphql-core Data.Morpheus.Types.Internal.AST

    No documentation available.

  9. class Enum a

    numeric-prelude NumericPrelude

    Class Enum defines operations on sequentially ordered types. The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details. For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
    where
    bound | fromEnum y >= fromEnum x = maxBound
    | otherwise                = minBound
    

  10. class Enum a

    numeric-prelude NumericPrelude.Base

    Class Enum defines operations on sequentially ordered types. The enumFrom... methods are used in Haskell's translation of arithmetic sequences. Instances of Enum may be derived for any enumeration type (types whose constructors have no fields). The nullary constructors are assumed to be numbered left-to-right by fromEnum from 0 through n-1. See Chapter 10 of the Haskell Report for more details. For any type that is an instance of class Bounded as well as Enum, the following should hold:

    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
    where
    bound | fromEnum y >= fromEnum x = maxBound
    | otherwise                = minBound
    

Page 3 of many | Previous | Next