Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
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 offThis 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.
enum :: (Text -> Maybe a) -> Value apostgresql-binary PostgreSQL.Binary.Decoding Given a partial mapping from text to value, produces a decoder of that value.