Hoogle Search

Within LTS Haskell 24.32 (ghc-9.10.3)

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

  1. enumFrom :: UpwardEnum a => a -> [a]

    prelude-safeenum Prelude.SafeEnum

    Return x followed by all it's successors, in order. The resulting list is always non-empty, since it includes x. If the resulting list is always finite, then the succeeds ordering is converse well-founded. In GHC, the default implementation is a "good producer" for list fusion.

  2. enumFromThen :: Enum a => a -> a -> [a]

    prelude-safeenum Prelude.SafeEnum

    Enumerate values with an inferred stride. The resulting list is always non-empty, since it includes x. Naturally, this should agree with enumFrom and enumDownFrom (assuming Eq a, by magic if need be):

    if succ x == Just y then enumFromThen x y == enumFrom x
    if pred x == Just y then enumFromThen x y == enumDownFrom x
    
    In the default implementation: if fromEnum fails on either argument, then the result is exactly [x]; and if toEnum fails on any of the enumerated integers, then the first failure terminates the enumeration. If either of these properties is inappropriate, then you should override the default. In GHC, the default implementation is a "good producer" for list fusion.

  3. enumFromThenTo :: Enum a => a -> a -> a -> [a]

    prelude-safeenum Prelude.SafeEnum

    Enumerate values with an inferred stride and a given limit. If x precedes y (and therefore we're enumerating forward) but x succeeds z (and therefore is past the limit), then the result is empty. Similarly, if x succeeds y (and therefore we're enumerating backward) but x precedes z (and therefore is past the limit), then the result is empty. Otherwise the result is non-empty since it contains x. Naturally, this should agree with enumFromTo and enumDownFromTo (assuming Eq a, by magic if need be):

    if succ x == Just y then enumFromThenTo x y z == enumFromTo x z
    if pred x == Just y then enumFromThenTo x y z == enumDownFromTo x z
    
    In the default implementation: if fromEnum fails on any argument, then the result is either [] or [x] (as appropriate); and if toEnum fails on any of the enumerated integers, then the first failure terminates the enumeration. If either of these properties is inappropriate, then you should override the default. In GHC, the default implementation is a "good producer" for list fusion.

  4. enumFromTo :: UpwardEnum a => a -> a -> [a]

    prelude-safeenum Prelude.SafeEnum

    Return the elements of enumFrom x, filtering out everything that succeeds z. If x succeeds z, then the resulting list is empty; otherwise, it is non-empty, since it includes x. In GHC, the default implementation is a "good producer" for list fusion.

  5. enumT :: (RealFloat prob, Ord a) => [Int] -> SpreadT prob a

    probability Numeric.Probability.Transition

    No documentation available.

  6. enumArgument :: MessageEnum a => Mod ArgumentFields a -> Parser a

    proto-lens-optparse Data.ProtoLens.Optparse

    Shorthand for a text-format enumbuf argument.

  7. enumOption :: MessageEnum a => Mod OptionFields a -> Parser a

    proto-lens-optparse Data.ProtoLens.Optparse

    Shorthand for a text-format enumbuf option.

  8. enumType :: (Functor f, HasField s "enumType" a) => LensLike' f s a

    proto-lens-protobuf-types Proto.Google.Protobuf.Descriptor_Fields

    No documentation available.

  9. enumvalue :: (Functor f, HasField s "enumvalue" a) => LensLike' f s a

    proto-lens-protobuf-types Proto.Google.Protobuf.Type_Fields

    No documentation available.

  10. enumFrom :: Enum a => a -> [a]

    verset Verset

    Used in Haskell's translation of [n..] with [n..] = enumFrom n, a possible implementation being enumFrom n = n : enumFrom (succ n).

    Examples

    • enumFrom 4 :: [Integer] = [4,5,6,7,...]
    • enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound ::
      Int]

Page 89 of many | Previous | Next