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.
-
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:
- The calls succ maxBound and pred minBound should result in a runtime error.
- fromEnum and toEnum should give a runtime error if the result value is not representable in the result type. For example, toEnum 7 :: Bool is an error.
- enumFrom and enumFromThen should be defined with an implicit bound, thus:
enumFrom x = enumFromTo x maxBound enumFromThen x y = enumFromThenTo x y bound where bound | fromEnum y >= fromEnum x = maxBound | otherwise = minBound
-
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. -
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. enum :: (MonadGen m, Enum a) => a -> a -> m ahedgehog Hedgehog.Gen Generates an element from an enumeration. This generator shrinks towards the first argument. For example:
enum 'a' 'z' :: Gen Char
enum :: (MonadGen m, Enum a) => a -> a -> m ahedgehog Hedgehog.Internal.Gen Generates an element from an enumeration. This generator shrinks towards the first argument. For example:
enum 'a' 'z' :: Gen Char
enum :: Data val => [val] -> valcmdargs 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].-
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. enum :: String -> Name -> [Name] -> [(String, Integer)] -> DecsQc-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
-
glib System.Glib.GTypeConstants No documentation available.
enum :: forall (m :: Type -> Type) . TypeName -> ResolverValue mmorpheus-graphql-app Data.Morpheus.App.NamedResolvers No documentation available.