Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

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

  1. class Enum a

    xmonad-contrib XMonad.Config.Prime

    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
    

  2. enum :: Enum a => Iso' Int a

    lens Control.Lens.Combinators

    This isomorphism can be used to convert to or from an instance of Enum.

    >>> LT^.from enum
    0
    
    >>> 97^.enum :: Char
    'a'
    
    Note: this is only an isomorphism from the numeric range actually used and it is a bit of a pleasant fiction, since there are questionable Enum instances for Double, and Float that exist solely for [1.0 .. 4.0] sugar and the instances for those and Integer don't cover all values in their range.

  3. enum :: Enum a => Iso' Int a

    lens Control.Lens.Iso

    This isomorphism can be used to convert to or from an instance of Enum.

    >>> LT^.from enum
    0
    
    >>> 97^.enum :: Char
    'a'
    
    Note: this is only an isomorphism from the numeric range actually used and it is a bit of a pleasant fiction, since there are questionable Enum instances for Double, and Float that exist solely for [1.0 .. 4.0] sugar and the instances for those and Integer don't cover all values in their range.

  4. enum :: (MonadGen m, Enum a) => a -> a -> m a

    hedgehog Hedgehog.Gen

    Generates an element from an enumeration. This generator shrinks towards the first argument. For example:

    enum 'a' 'z' :: Gen Char
    

  5. enum :: (MonadGen m, Enum a) => a -> a -> m a

    hedgehog Hedgehog.Internal.Gen

    Generates an element from an enumeration. This generator shrinks towards the first argument. For example:

    enum 'a' 'z' :: Gen Char
    

  6. enum :: Data val => [val] -> val

    cmdargs System.Console.CmdArgs.Implicit

    Flag: "I want several different flags to set this one field to different values." This annotation takes a type which is an enumeration, and provides multiple separate flags to set the field to each value. The first element in the list is used as the value of the field.

    data State = On | Off deriving Data
    data Mode = Mode {state :: State}
    cmdArgs $ Mode {state = enum [On &= help "Turn on",Off &= help "Turn off"]}
    --on   Turn on
    --off  Turn off
    
    This annotation can be used to allow multiple flags within a field:
    data Mode = Mode {state :: [State]}
    cmdArgs $ Mode {state = enum [[] &= ignore, [On] &= help "Turn on", [Off] &= help "Turn off"]}
    
    Now --on --off would produce Mode [On,Off].

  7. enum :: Enum a => Iso' Int a

    diagrams-lib Diagrams.Prelude

    This isomorphism can be used to convert to or from an instance of Enum.

    >>> LT^.from enum
    0
    
    >>> 97^.enum :: Char
    'a'
    
    Note: this is only an isomorphism from the numeric range actually used and it is a bit of a pleasant fiction, since there are questionable Enum instances for Double, and Float that exist solely for [1.0 .. 4.0] sugar and the instances for those and Integer don't cover all values in their range.

  8. enum :: String -> Name -> [Name] -> [(String, Integer)] -> DecsQ

    c-enum Foreign.C.Enum

    Write like the following.

    enum "Foo" ''Int [''Show, ''Read, ''Eq] [
    ("FooError", - 1),
    ("FooZero", 0),
    ("FooOne", 1),
    ("FooTwo", 2) ]
    
    Then you get like the following.
    newtype Foo = Foo Int deriving Eq
    
    pattern FooError :: Int -> Foo
    pattern FooError <- Foo (- 1) where
    FooError = Foo (- 1)
    
    pattern FooZero :: Int -> Foo
    ...
    
    
    instance Show Foo where
    showsPrec = ...
    
    instance Read Foo where
    readPrec = ...
    
    And you can read and show like the following.
    > Foo $ - 1
    FooError
    > FooTwo
    FooTwo
    > Foo 3
    Foo 3
    > read "Foo (- 1)" :: Foo
    FooError
    > read "FooOne" :: Foo
    FooOne
    

  9. enum :: GType

    glib System.Glib.GTypeConstants

    No documentation available.

  10. enum :: forall (m :: Type -> Type) . TypeName -> ResolverValue m

    morpheus-graphql-app Data.Morpheus.App.NamedResolvers

    No documentation available.

Page 10 of many | Previous | Next