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.
pattern
GL_INVALID_ENUM :: GLenumOpenGLRaw Graphics.GL.Version20 No documentation available.
-
OpenGLRaw Graphics.GL.Version20 32bit enumerated binary integer value.
pattern
GL_INVALID_ENUM :: GLenumOpenGLRaw Graphics.GL.Version21 No documentation available.
-
OpenGLRaw Graphics.GL.Version21 32bit enumerated binary integer value.
timeNumOffset :: Parser (Expr s a)dhall Dhall.Parser.Expression Parse a numeric TimeZone This corresponds to the time-numoffset rule from the official grammar
fromEnum :: Enum a => a -> Intfoundation 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.
-
foundation Foundation Convert from an Int.
-
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.
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
-
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) :} FiniteEnumeration :: a -> FiniteEnumeration ageneric-data Generic.Data No documentation available.