Hoogle Search

Within LTS Haskell 24.65 (ghc-9.10.3)

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

  1. uniformM :: (Uniform a, StatefulGen g m) => g -> m a

    mwc-probability System.Random.MWC.Probability

    Generates a value uniformly distributed over all possible values of that type. There is a default implementation via Generic:

    >>> :set -XDeriveGeneric -XDeriveAnyClass
    
    >>> import GHC.Generics (Generic)
    
    >>> import System.Random.Stateful
    
    >>> data MyBool = MyTrue | MyFalse deriving (Show, Generic, Finite, Uniform)
    
    >>> data Action = Code MyBool | Eat (Maybe Bool) | Sleep deriving (Show, Generic, Finite, Uniform)
    
    >>> gen <- newIOGenM (mkStdGen 42)
    
    >>> uniformListM 10 gen :: IO [Action]
    [Code MyTrue,Code MyTrue,Eat Nothing,Code MyFalse,Eat (Just False),Eat (Just True),Eat Nothing,Eat (Just False),Sleep,Code MyFalse]
    

  2. uniformR :: forall (m :: Type -> Type) a . (PrimMonad m, Variate a) => (a, a) -> Prob m a

    mwc-probability System.Random.MWC.Probability

    The uniform distribution over the provided interval.

    >>> sample (uniformR (0, 1)) gen
    0.44984153252922365
    

  3. uniformRM :: (UniformRange a, StatefulGen g m) => (a, a) -> g -> m a

    mwc-probability System.Random.MWC.Probability

    Generates a value uniformly distributed over the provided range, which is interpreted as inclusive in the lower and upper bound.

    • uniformRM (1 :: Int, 4 :: Int) generates values uniformly from the set <math>
    • uniformRM (1 :: Float, 4 :: Float) generates values uniformly from the set <math>
    The following law should hold to make the function always defined:
    uniformRM (a, b) = uniformRM (b, a)
    

  4. uniformVector :: (PrimMonad m, StatefulGen g m, Uniform a, Vector v a) => g -> Int -> m (v a)

    mwc-probability System.Random.MWC.Probability

    Generate a vector of pseudo-random variates. This is not necessarily faster than invoking uniform repeatedly in a loop, but it may be more convenient to use in some situations.

  5. acceptFork :: MonadIO m => Socket -> ((Socket, SockAddr) -> IO ()) -> m ThreadId

    network-simple Network.Simple.TCP

    Accept a single incoming connection and use it in a different thread. The connection socket is shut down and closed when done or in case of exceptions.

  6. data Information

    numeric-prelude Algebra.DimensionTerm

    No documentation available.

  7. Information :: Information

    numeric-prelude Algebra.DimensionTerm

    No documentation available.

  8. information :: Information

    numeric-prelude Algebra.DimensionTerm

    No documentation available.

  9. type Information a = T Information a

    numeric-prelude Number.DimensionTerm

    No documentation available.

  10. information :: a -> Information a

    numeric-prelude Number.DimensionTerm

    No documentation available.

Page 651 of many | Previous | Next