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. getBoolByIndex :: Int -> [Bool] -> Bool

    real-dice RealDice.Manipulate.GetValueFromRNGTable

    Gets a boolean value from a list by index, looping back to the beginning if the index is out of bounds After looping over the list once, we flip the values of the elements so that we can use an odd list length while still having an even distribution of True and False values This is used to get an element from a randomized table of booleans

    Examples

    >>> getBoolByIndex 2 [True, False, False, True, True]
    False
    
    >>> getBoolByIndex 5 [True, False, False, True, True]
    False
    
    >>> getBoolByIndex 6 [True, False, False, True, True]
    True
    
    >>> getBoolByIndex (-1337) [True, False, True, False, True]
    False
    

  2. randomizeWithCustomBools :: [Int] -> [Bool] -> [Int]

    real-dice RealDice.Manipulate.RandomizeList

    Randomizes the order of a list of integers using a custom list of booleans

    Examples

    >>> randomizeWithCustomBools [1, 2, 3, 4, 5] [True, False, False, True, True]
    [5,4,1,2,3]
    

  3. data RBool

    rec-def Data.Recursive.Bool

    Like Bool, but admits recursive definitions, preferring the least solution.

  4. module Data.Recursive.DualBool

    The type RDualBool is like Bool, but allows recursive definitions:

    >>> :{
    let x = RDB.true
    y = x RDB.&& z
    z = y RDB.|| RDB.false
    in RDB.get x
    :}
    True
    
    This finds the greatest solution, i.e. prefers True over False:
    >>> :{
    let x = x RDB.&& y
    y = y RDB.&& x
    in (RDB.get x, RDB.get y)
    :}
    (True,True)
    
    Use RBool from Data.Recursive.Bool if you want the least solution.

  5. data RDualBool

    rec-def Data.Recursive.DualBool

    Like Bool, but admits recursive definitions, preferring the greatest solution.

  6. newtype RBool

    rec-def Data.Recursive.Internal

    Like Bool, but admits recursive definitions, preferring the least solution.

  7. RBool :: Purify P2 -> RBool

    rec-def Data.Recursive.Internal

    No documentation available.

  8. newtype RDualBool

    rec-def Data.Recursive.Internal

    Like Bool, but admits recursive definitions, preferring the greatest solution.

  9. RDualBool :: Purify P2 -> RDualBool

    rec-def Data.Recursive.Internal

    No documentation available.

  10. withBool :: String -> (Bool -> Parser a) -> Value -> Parser a

    safe-json Data.Aeson.Safe

    withBool expected f value applies f to the Bool when value is a Boolean and fails otherwise.

    Error message example

    withBool "MyType" f (String "oops")
    -- Error: "parsing MyType failed, expected Boolean, but encountered String"
    

Page 166 of many | Previous | Next