Hoogle Search
Within LTS Haskell 24.39 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
iso8601DateFormat :: Maybe String -> Stringold-locale System.Locale Construct format string according to ISO-8601. The Maybe String argument allows to supply an optional time specification. E.g.:
iso8601DateFormat Nothing == "%Y-%m-%d" -- i.e. YYYY-MM-DD iso8601DateFormat (Just "%H:%M:%S") == "%Y-%m-%dT%H:%M:%S" -- i.e. YYYY-MM-DDTHH:MM:SS
-
old-locale System.Locale Format string according to RFC822.
-
aeson-pretty Data.Aeson.Encode.Pretty No documentation available.
confNumFormat :: Config -> NumberFormataeson-pretty Data.Aeson.Encode.Pretty No documentation available.
-
mwc-random System.Random.MWC The class of types for which a uniformly distributed value can be drawn from all possible values of the type.
-
mwc-random System.Random.MWC The class of types for which a uniformly distributed value can be drawn from a range.
uniform :: (Variate a, PrimMonad m) => Gen (PrimState m) -> m amwc-random System.Random.MWC Generate a single uniformly distributed random variate. The range of values produced varies by type:
- For fixed-width integral types, the type's entire range is used.
- For floating point numbers, the range (0,1] is used. Zero is explicitly excluded, to allow variates to be used in statistical calculations that require non-zero values (e.g. uses of the log function).
uniformM :: (Uniform a, StatefulGen g m) => g -> m amwc-random System.Random.MWC 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]
uniformR :: (Variate a, PrimMonad m) => (a, a) -> Gen (PrimState m) -> m amwc-random System.Random.MWC Generate single uniformly distributed random variable in a given range.
- For integral types inclusive range is used.
- For floating point numbers range (a,b] is used if one ignores rounding errors.
uniformRM :: (UniformRange a, StatefulGen g m) => (a, a) -> g -> m amwc-random System.Random.MWC 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>
uniformRM (a, b) = uniformRM (b, a)