Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

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

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

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

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

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

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  4. enumLaws :: (Enum a, Eq a, Arbitrary a, Show a) => Proxy a -> Laws

    quickcheck-classes-base Test.QuickCheck.Classes.Base

    Tests the following properties:

    This only works for Enum types that are not bounded, meaning that succ and pred must be total. This means that these property tests work correctly for types like Integer but not for Int. Sadly, there is not a good way to test fromEnum and toEnum, since many types that have reasonable implementations for succ and pred have more inhabitants than Int does.

  5. enumTypeFrom :: IsEnumType a => a -> NS (K () :: [Type] -> Type) (Code a)

    generics-sop Generics.SOP

    Convert from an enum type to its sum representation.

  6. enumTypeTo :: IsEnumType a => NS (K () :: [Type] -> Type) (Code a) -> a

    generics-sop Generics.SOP

    Convert a sum representation to ihe original type.

  7. enumTypeFrom :: IsEnumType a => a -> NS (K () :: [Type] -> Type) (Code a)

    generics-sop Generics.SOP.Universe

    Convert from an enum type to its sum representation.

  8. enumTypeTo :: IsEnumType a => NS (K () :: [Type] -> Type) (Code a) -> a

    generics-sop Generics.SOP.Universe

    Convert a sum representation to ihe original type.

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

    relude Relude.Enum

    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]

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

    relude Relude.Enum

    Used in Haskell's translation of [n,n'..] with [n,n'..] = enumFromThen n n', a possible implementation being enumFromThen n n' = n : n' : worker (f x) (f x n'), worker s v = v : worker s (s v), x = fromEnum n' - fromEnum n and

    f n y
    | n > 0 = f (n - 1) (succ y)
    | n < 0 = f (n + 1) (pred y)
    | otherwise = y
    
    

    Examples

    • enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
    • enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound ::
      Int]

Page 45 of many | Previous | Next