Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

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

  1. 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].

  2. enum_ :: (Data c, Data f) => (c -> f) -> [Annotate Ann] -> Annotate Ann

    cmdargs System.Console.CmdArgs.Implicit

    Like enum, but using the pure annotations.

  3. enum# :: [a] -> a

    cmdargs System.Console.CmdArgs.Quote

    Version of enum without a Data context, only to be used within cmdArgsQuote.

  4. class TypedObject a => BoxedEnum a

    haskell-gi-base Data.GI.Base.BasicTypes

    Enums with an associated GType.

  5. get_enum :: Ptr GValue -> IO CUInt

    haskell-gi-base Data.GI.Base.GValue

    No documentation available.

  6. set_enum :: Ptr GValue -> CUInt -> IO ()

    haskell-gi-base Data.GI.Base.GValue

    No documentation available.

  7. constructObjectPropertyEnum :: (Enum a, BoxedEnum a) => String -> a -> IO (GValueConstruct o)

    haskell-gi-base Data.GI.Base.Properties

    No documentation available.

  8. getObjectPropertyEnum :: (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b

    haskell-gi-base Data.GI.Base.Properties

    No documentation available.

  9. setObjectPropertyEnum :: (GObject a, Enum b, BoxedEnum b) => a -> String -> b -> IO ()

    haskell-gi-base Data.GI.Base.Properties

    No documentation available.

  10. class Enum a

    haskell-gi-base Data.GI.Base.ShortPrelude

    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 169 of many | Previous | Next