Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

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

  1. arbitraryBoundedEnum :: (Bounded a, Enum a) => Gen a

    massiv-test Test.Massiv.Utils

    Generates an element of a bounded enumeration.

  2. chooseEnum :: Enum a => (a, a) -> Gen a

    massiv-test Test.Massiv.Utils

    A fast implementation of choose for enumerated types.

  3. coarbitraryEnum :: Enum a => a -> Gen b -> Gen b

    massiv-test Test.Massiv.Utils

    A coarbitrary implementation for enums.

  4. shrinkBoundedEnum :: (Bounded a, Enum a, Eq a) => a -> [a]

    massiv-test Test.Massiv.Utils

    Shrink an element of a bounded enumeration.

    Example

    data MyEnum = E0 | E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9
    deriving (Bounded, Enum, Eq, Ord, Show)
    
    >>> shrinkBoundedEnum E9
    [E0,E5,E7,E8]
    
    >>> shrinkBoundedEnum E5
    [E0,E3,E4]
    
    >>> shrinkBoundedEnum E0
    []
    

  5. class AsNumber t

    microlens-aeson Lens.Micro.Aeson

    Traverse into various number types.

  6. _Number :: AsNumber t => Traversal' t Scientific

    microlens-aeson Lens.Micro.Aeson

    >>> "[1, \"x\"]" ^? nth 0 . _Number
    Just 1.0
    
    >>> "[1, \"x\"]" ^? nth 1 . _Number
    Nothing
    

  7. type OpNum = Int

    mongoDB Database.MongoDB.Admin

    An operation indentifier.

  8. PortNumber :: PortNumber -> PortID

    mongoDB Database.MongoDB.Connection

    No documentation available.

  9. class Enum a

    prelude-compat Prelude2010

    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
    

  10. enumFrom :: Enum a => a -> [a]

    prelude-compat Prelude2010

    Used in Haskell's translation of [n..] with [n..] = enumFrom n, a possible implementation being enumFrom n = n : enumFrom (succ n).

    Examples

    • enumFrom 4 :: [Integer] = [4,5,6,7,...]
    • enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound ::
      Int]

Page 334 of many | Previous | Next