Hoogle Search

Within LTS Haskell 24.18 (ghc-9.10.3)

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

  1. setRestrictionLevel :: MSpoof -> RestrictionLevel -> IO ()

    text-icu Data.Text.ICU.Spoof

    Configure the restriction level of a spoof checker.

  2. setBit :: Bits a => a -> Int -> a

    ghc-internal GHC.Internal.Data.Bits

    x `setBit` i is the same as x .|. bit i

  3. setComp :: Strategy r => Comp -> Array r ix e -> Array r ix e

    massiv Data.Massiv.Array

    Set computation strategy for this array

    Example

    >>> :set -XTypeApplications
    
    >>> import Data.Massiv.Array
    
    >>> a = singleton @DL @Ix1 @Int 0
    
    >>> a
    Array DL Seq (Sz1 1)
    [ 0 ]
    
    >>> setComp (ParN 6) a -- use 6 capabilities
    Array DL (ParN 6) (Sz1 1)
    [ 0 ]
    

  4. setComp :: Strategy r => Comp -> Array r ix e -> Array r ix e

    massiv Data.Massiv.Core

    Set computation strategy for this array

    Example

    >>> :set -XTypeApplications
    
    >>> import Data.Massiv.Array
    
    >>> a = singleton @DL @Ix1 @Int 0
    
    >>> a
    Array DL Seq (Sz1 1)
    [ 0 ]
    
    >>> setComp (ParN 6) a -- use 6 capabilities
    Array DL (ParN 6) (Sz1 1)
    [ 0 ]
    

  5. setDim' :: (HasCallStack, Index ix) => ix -> Dim -> Int -> ix

    massiv Data.Massiv.Core.Index

    Change the value of a specific dimension within the index. See setDimM for a safer version and setDimension for a type safe version.

    Examples

    >>> setDim' (2 :> 3 :> 4 :. 5) 3 10
    2 :> 10 :> 4 :. 5
    

  6. setDimM :: (Index ix, MonadThrow m) => ix -> Dim -> Int -> m ix

    massiv Data.Massiv.Core.Index

    Set the value for an index at specified dimension.

  7. setDimension :: forall ix (n :: Natural) . IsIndexDimension ix n => ix -> Dimension n -> Int -> ix

    massiv Data.Massiv.Core.Index

    Type safe way to set value of index at a particular dimension.

    Examples

    >>> setDimension (2 :> 3 :> 4 :. 5) Dim4 10
    10 :> 3 :> 4 :. 5
    

  8. setSzM :: (MonadThrow m, Index ix) => Sz ix -> Dim -> Sz Int -> m (Sz ix)

    massiv Data.Massiv.Core.Index

    Same as setDimM, but for Sz

    Example

    >>> import Data.Massiv.Core.Index
    
    >>> setSzM (Sz2 2 3) 2 (Sz1 1) :: IO Sz2
    Sz (1 :. 3)
    
    >>> setSzM (Sz2 2 3) 3 (Sz1 1) :: IO Sz2
    *** Exception: IndexDimensionException: (Dim 3) for (2 :. 3)
    

  9. setResponse :: HttpStatusCode -> Declare (Definitions Schema) Response -> OpenApi -> OpenApi

    openapi3 Data.OpenApi.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 :: OpenApi) & paths .~ IOHM.fromList [("/user", mempty & get ?~ mempty)]
    
    >>> let res = declareResponse "application/json" (Proxy :: Proxy Day)
    
    >>> BSL.putStrLn $ encodePretty $ api & setResponse 200 res
    {
    "components": {
    "schemas": {
    "Day": {
    "example": "2016-07-22",
    "format": "date",
    "type": "string"
    }
    }
    },
    "info": {
    "title": "",
    "version": ""
    },
    "openapi": "3.0.0",
    "paths": {
    "/user": {
    "get": {
    "responses": {
    "200": {
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/Day"
    }
    }
    },
    "description": ""
    }
    }
    }
    }
    }
    }
    
    See also setResponseWith.

  10. setResponseFor :: Traversal' OpenApi Operation -> HttpStatusCode -> Declare (Definitions Schema) Response -> OpenApi -> OpenApi

    openapi3 Data.OpenApi.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.

Page 44 of many | Previous | Next