Hoogle Search

Within LTS Haskell 24.60 (ghc-9.10.3)

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

  1. pattern GL_INVALID_ENUM :: GLenum

    OpenGLRaw Graphics.GL.Version20

    No documentation available.

  2. type GLenum = Word32

    OpenGLRaw Graphics.GL.Version20

    32bit enumerated binary integer value.

  3. pattern GL_INVALID_ENUM :: GLenum

    OpenGLRaw Graphics.GL.Version21

    No documentation available.

  4. type GLenum = Word32

    OpenGLRaw Graphics.GL.Version21

    32bit enumerated binary integer value.

  5. timeNumOffset :: Parser (Expr s a)

    dhall Dhall.Parser.Expression

    Parse a numeric TimeZone This corresponds to the time-numoffset rule from the official grammar

  6. fromEnum :: Enum a => a -> Int

    foundation Foundation

    Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.

  7. toEnum :: Enum a => Int -> a

    foundation Foundation

    Convert from an Int.

  8. data FiniteEnum

    generic-data Generic.Data

    Extends the StandardEnum option for GEnum to allow all constructors to have arbitrary many fields. Each field type must be an instance of both Enum and Bounded. Avoid fields of types Int and Word.

    Details

    Two restrictions require the user's attention:
    • The Enum instances of the field types need to start enumerating from 0. In particular, Int is an unfit field type, because the enumeration of the negative values starts before 0.
    • There can only be up to maxBound :: Int values (because the implementation represents the cardinality explicitly as an Int). This restriction makes Word an invalid field type as well. Notably, it is insufficient for each individual field types to stay below this limit. Instead it applies to the generic type as a whole.
    Elements are numbered by toEnum, from 0 up to (cardinality - 1). The resulting ordering matches the generic Ord instance defined by gcompare. The values from different constructors are enumerated sequentially.
    data Example = C0 Bool Bool | C1 Bool
    deriving (Eq, Ord, Show, Generic)
    
    cardinality = 6  -- 2    * 2    + 2
    -- Bool * Bool | Bool
    
    enumeration =
    [ C0 False False
    , C0 False  True
    , C0  True False
    , C0  True  True
    , C1 False
    , C1 True
    ]
    
    enumeration == map gtoFiniteEnum [0 .. 5]
    [0 .. 5] == map gfromFiniteEnum enumeration
    

  9. newtype FiniteEnumeration a

    generic-data Generic.Data

    Type with Enum instance derived via Generic with FiniteEnum option. This allows deriving Enum for types whose constructors have fields. Some caution is advised; see details in FiniteEnum.

    Example

    >>> :{
    data Booool = Booool Bool Bool
    deriving Generic
    deriving (Enum, Bounded) via (FiniteEnumeration Booool)
    :}
    

  10. FiniteEnumeration :: a -> FiniteEnumeration a

    generic-data Generic.Data

    No documentation available.

Page 153 of many | Previous | Next