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.
-
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.
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.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION :: SSLOptionHsOpenSSL 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.
robustSumVar :: Vector v Double => Double -> v Double -> Doublestatistics Statistics.Sample.Internal No documentation available.
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.
timeZoneSummerOnly :: TimeZone -> Booltime-compat Data.Time.LocalTime.Compat Is this time zone just persisting for the summer?
asumOf :: Alternative f => Getting (Endo (f a)) s (f a) -> s -> f adiagrams-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"
asum ≡ asumOf 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
msumOf :: MonadPlus m => Getting (Endo (m a)) s (m a) -> s -> m adiagrams-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"
msum ≡ msumOf 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
-
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.
-
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.