Hoogle Search

Within Stackage Nightly 2026-06-28 (ghc-9.12.4)

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

  1. setmapped :: (Eq b, Hashable b) => Setter (HashSet a) (HashSet b) a b

    optics-extra Data.HashSet.Optics

    This Setter can be used to change the type of a HashSet by mapping the elements to new values. Sadly, you can't create a valid Traversal for a HashSet, but you can manipulate it by reading using folded and reindexing it via setmapped.

    >>> over setmapped (+1) (HashSet.fromList [1,2,3,4])
    fromList [2,3,4,5]
    

  2. setGen :: forall a (ins :: [Type]) (out :: [Type]) . Typeable a => Gen a -> Registry ins out -> Registry ins out

    registry-hedgehog Data.Registry.Hedgehog

    Set a specific generator on the registry the value of a generator in a given registry

  3. setOf :: Ord a => Gen a -> Gen (Set a)

    registry-hedgehog Data.Registry.Hedgehog

    Create a default generator for a small set of elements

  4. setOfMinMax :: Ord a => Int -> Int -> Gen a -> Gen (Set a)

    registry-hedgehog Data.Registry.Hedgehog

    Create a default generator for a set with a minimum and a maximum number of elements The implementation uses Gen.filter to make sure that the elements are unique

  5. setDuplication :: MonadQuery m => Duplication -> m ()

    relational-query Database.Relational.Monad.Class

    Specify duplication.

  6. setResponse :: HttpStatusCode -> Declare (Definitions Schema) Response -> Swagger -> Swagger

    swagger2 Data.Swagger.Operation

    Set response for all operations. This will also update global schema definitions. If the response already exists it will be overwritten.

    setResponse = setResponseFor allOperations
    
    Example:
    >>> let api = (mempty :: Swagger) & paths .~ IOHM.fromList [("/user", mempty & get ?~ mempty)]
    
    >>> let res = declareResponse (Proxy :: Proxy Day)
    
    >>> encode $ api & setResponse 200 res
    "{\"swagger\":\"2.0\",\"info\":{\"title\":\"\",\"version\":\"\"},\"paths\":{\"/user\":{\"get\":{\"responses\":{\"200\":{\"description\":\"\",\"schema\":{\"$ref\":\"#/definitions/Day\"}}}}}},\"definitions\":{\"Day\":{\"example\":\"2016-07-22\",\"format\":\"date\",\"type\":\"string\"}}}"
    
    See also setResponseWith.

  7. setResponseFor :: Traversal' Swagger Operation -> HttpStatusCode -> Declare (Definitions Schema) Response -> Swagger -> Swagger

    swagger2 Data.Swagger.Operation

    Set response for specified operations. This will also update global schema definitions. If the response already exists it will be overwritten. See also setResponseForWith.

  8. setResponseForWith :: Traversal' Swagger Operation -> (Response -> Response -> Response) -> HttpStatusCode -> Declare (Definitions Schema) Response -> Swagger -> Swagger

    swagger2 Data.Swagger.Operation

    Set or update response for specified operations. This will also update global schema definitions. If the response already exists, but it can't be dereferenced (invalid $ref), then just the new response is used. See also setResponseFor.

  9. setResponseWith :: (Response -> Response -> Response) -> HttpStatusCode -> Declare (Definitions Schema) Response -> Swagger -> Swagger

    swagger2 Data.Swagger.Operation

    Set or update response for all operations. This will also update global schema definitions. If the response already exists, but it can't be dereferenced (invalid $ref), then just the new response is used.

    setResponseWith = setResponseForWith allOperations
    
    See also setResponse.

  10. setEra :: Era Rational -> Active a -> Active a

    active Data.Active

    Set the era of an Active value. Note that this will change a constant Active into a dynamic one which happens to have the same value at all times.

Page 68 of many | Previous | Next