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.

  1. package dependent-sum

    Dependent sum type A dependent sum is a generalization of a particular way of thinking about the Either type. Either a b can be thought of as a 2-tuple (tag, value), where the value of the tag determines the type of the value. In particular, either tag = Left and value :: a or tag = Right and value :: b. This package allows you to define your own dependent sum types by using your own "tag" types.

  2. data DSum (tag :: k -> Type) (f :: k -> Type)

    dependent-sum Data.Dependent.Sum

    A basic dependent sum type where the first component is a tag that specifies the type of the second. For example, think of a GADT such as:

    data Tag a where
    AString :: Tag String
    AnInt   :: Tag Int
    Rec     :: Tag (DSum Tag Identity)
    
    Then we can write expressions where the RHS of (:=>) has different types depending on the Tag constructor used. Here are some expressions of type DSum Tag Identity:
    AString :=> Identity "hello!"
    AnInt   :=> Identity 42
    
    Often, the f we choose has an Applicative instance, and we can use the helper function (==>). The following expressions all have the type Applicative f => DSum Tag f:
    AString ==> "hello!"
    AnInt   ==> 42
    
    We can write functions that consume DSum Tag f values by matching, such as:
    toString :: DSum Tag Identity -> String
    toString (AString :=> Identity str) = str
    toString (AnInt   :=> Identity int) = show int
    toString (Rec     :=> Identity sum) = toString sum
    
    The (:=>) constructor and (==>) helper are chosen to resemble the (key => value) construction for dictionary entries in many dynamic languages. The :=> and ==> operators have very low precedence and bind to the right, making repeated use of these operators behave as you'd expect:
    -- Parses as: Rec ==> (AnInt ==> (3 + 4))
    -- Has type: Applicative f => DSum Tag f
    Rec ==> AnInt ==> 3 + 4
    
    The precedence of these operators is just above that of $, so foo bar $ AString ==> "eep" is equivalent to foo bar (AString ==> "eep"). To use the Eq, Ord, Read, and Show instances for DSum tag f, you will need an ArgDict instance for your tag type. Use deriveArgDict from the constraints-extras package to generate this instance.

  3. SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION :: SSLOption

    HsOpenSSL OpenSSL.Session

    When performing renegotiation as a server, always start a new session (i.e., session resumption requests are only accepted in the initial handshake). This option is not needed for clients.

  4. robustSumVar :: Vector v Double => Double -> v Double -> Double

    statistics Statistics.Sample.Internal

    No documentation available.

  5. wilcoxonRankSums :: (Ord a, Unbox a) => Vector a -> Vector a -> (Double, Double)

    statistics Statistics.Test.MannWhitneyU

    The Wilcoxon Rank Sums Test. This test calculates the sum of ranks for the given two samples. The samples are ordered, and assigned ranks (ties are given their average rank), then these ranks are summed for each sample. The return value is (W₁, W₂) where W₁ is the sum of ranks of the first sample and W₂ is the sum of ranks of the second sample. This test is trivially transformed into the Mann-Whitney U test. You will probably want to use mannWhitneyU and the related functions for testing significance, but this function is exposed for completeness.

  6. timeZoneSummerOnly :: TimeZone -> Bool

    time-compat Data.Time.LocalTime.Compat

    Is this time zone just persisting for the summer?

  7. asumOf :: Alternative f => Getting (Endo (f a)) s (f a) -> s -> f a

    diagrams-lib Diagrams.Prelude

    The sum of a collection of actions, generalizing concatOf.

    >>> asumOf both ("hello","world")
    "helloworld"
    
    >>> asumOf each (Nothing, Just "hello", Nothing)
    Just "hello"
    
    asumasumOf folded
    
    asumOf :: Alternative f => Getter s (f a)     -> s -> f a
    asumOf :: Alternative f => Fold s (f a)       -> s -> f a
    asumOf :: Alternative f => Lens' s (f a)      -> s -> f a
    asumOf :: Alternative f => Iso' s (f a)       -> s -> f a
    asumOf :: Alternative f => Traversal' s (f a) -> s -> f a
    asumOf :: Alternative f => Prism' s (f a)     -> s -> f a
    

  8. msumOf :: MonadPlus m => Getting (Endo (m a)) s (m a) -> s -> m a

    diagrams-lib Diagrams.Prelude

    The sum of a collection of actions, generalizing concatOf.

    >>> msumOf both ("hello","world")
    "helloworld"
    
    >>> msumOf each (Nothing, Just "hello", Nothing)
    Just "hello"
    
    msummsumOf folded
    
    msumOf :: MonadPlus m => Getter s (m a)     -> s -> m a
    msumOf :: MonadPlus m => Fold s (m a)       -> s -> m a
    msumOf :: MonadPlus m => Lens' s (m a)      -> s -> m a
    msumOf :: MonadPlus m => Iso' s (m a)       -> s -> m a
    msumOf :: MonadPlus m => Traversal' s (m a) -> s -> m a
    msumOf :: MonadPlus m => Prism' s (m a)     -> s -> m a
    

  9. resumeRecoverAll :: (MonadIO m, MonadMask m) => RetryStatus -> RetryPolicyM m -> (RetryStatus -> m a) -> m a

    retry Control.Retry

    A variant of recoverAll that allows specifying the initial RetryStatus so that a recovering operation may pick up where it left off in regards to its retry policy.

  10. resumeRecovering :: (MonadIO m, MonadMask m) => RetryStatus -> RetryPolicyM m -> [RetryStatus -> Handler m Bool] -> (RetryStatus -> m a) -> m a

    retry Control.Retry

    A variant of recovering that allows specifying the initial RetryStatus so that a recovering operation may pick up where it left off in regards to its retry policy.

Page 106 of many | Previous | Next