Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
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.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.
fromEnum :: Enum a => a -> Maybe Intprelude-safeenum Prelude.SafeEnum Convert to an Int.
toEnum :: Enum a => Int -> Maybe aprelude-safeenum Prelude.SafeEnum Convert from an Int.
class Storable a =>
FixedNumeric aprimitive-serial Data.PrimitiveSerial No documentation available.
enum :: Fractional prob => [Int] -> Spread prob aprobability Numeric.Probability.Distribution No documentation available.
enum :: (C prob obj, Floating prob) => [Int] -> Spread obj aprobability Numeric.Probability.Object No documentation available.
enum :: RealFloat prob => [Int] -> SpreadC prob aprobability Numeric.Probability.Transition No documentation available.
enumT :: (RealFloat prob, Ord a) => [Int] -> SpreadT prob aprobability Numeric.Probability.Transition No documentation available.
enumArgument :: MessageEnum a => Mod ArgumentFields a -> Parser aproto-lens-optparse Data.ProtoLens.Optparse Shorthand for a text-format enumbuf argument.