Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. arbitraryAnyInput :: Network -> Ctx -> Bool -> Gen (SigInput, PrivateKey)

    haskoin-core Haskoin.Util.Arbitrary.Transaction

    Arbitrary SigInput.

  2. lawsCheckMany :: [(String, [Laws])] -> IO Bool

    hedgehog-classes Hedgehog.Classes

    A convenience function for checking many typeclass instances of multiple types.

    import Control.Applicative (liftA2)
    
    import Data.Map (Map)
    import Data.Set (Set)
    
    import qualified Data.List as List
    import qualified Data.Set as Set
    import qualified Data.Map as Map
    
    import qualified Hedgehog.Gen as Gen
    import qualified Hedgehog.Range as Range
    
    import Hedgehog (Gen)
    import Hedgehog.Classes
    
    -- Generate a small Set Int
    genSet :: Gen (Set Int)
    genSet = Set.fromList <$> (Gen.list (Range.linear 2 10) (Gen.int Range.constantBounded))
    
    -- Generate a small Map String Int
    genMap :: Gen (Map String Int)
    genMap = Map.fromList <$> (liftA2 List.zip genStrings genInts)
    where
    rng = Range.linear 2 6
    genStrings = Gen.list rng (Gen.string rng Gen.lower)
    genInts = Gen.list rng (Gen.int Range.constantBounded)
    
    commonLaws :: (Eq a, Monoid a, Show a) => Gen a -> [Laws]
    commonLaws p = [eqLaws p, monoidLaws p]
    
    tests :: [(String, [Laws])]
    tests =
    [ ("Set Int", commonLaws genSet)
    , ("Map String Int", commonLaws genMap)
    ]
    
    Now, in GHCi:
    >>> lawsCheckMany tests
    
    Testing properties for common typeclasses...
    
    -------------
    -- Set Int --
    -------------
    
    Eq: Transitive   ✓ interactive passed 100 tests.
    Eq: Symmetric   ✓ interactive passed 100 tests.
    Eq: Reflexive   ✓ interactive passed 100 tests.
    Eq: Negation   ✓ interactive passed 100 tests.
    Monoid: Left Identity   ✓ interactive passed 100 tests.
    Monoid: Right Identity   ✓ interactive passed 100 tests.
    Monoid: Associativity   ✓ interactive passed 100 tests.
    Monoid: Concatenation   ✓ interactive passed 100 tests.
    
    --------------------
    -- Map String Int --
    --------------------
    
    Eq: Transitive   ✓ interactive passed 100 tests.
    Eq: Symmetric   ✓ interactive passed 100 tests.
    Eq: Reflexive   ✓ interactive passed 100 tests.
    Eq: Negation   ✓ interactive passed 100 tests.
    Monoid: Left Identity   ✓ interactive passed 100 tests.
    Monoid: Right Identity   ✓ interactive passed 100 tests.
    Monoid: Associativity   ✓ interactive passed 100 tests.
    Monoid: Concatenation   ✓ interactive passed 100 tests.
    
    All tests succeeded
    True
    

  3. newtype SqlWhereAny

    hpqtypes-extras Database.PostgreSQL.PQTypes.SQL.Builder

    Type representing a set of conditions that are joined by OR. When no conditions are given, the result is FALSE.

  4. SqlWhereAny :: [SqlCondition] -> SqlWhereAny

    hpqtypes-extras Database.PostgreSQL.PQTypes.SQL.Builder

    No documentation available.

  5. sqlAny :: State SqlWhereAny () -> SQL

    hpqtypes-extras Database.PostgreSQL.PQTypes.SQL.Builder

    Run monad that joins all conditions using OR operator. When no conditions are given, the result is FALSE.

  6. sqlWhereAny :: (MonadState v m, SqlWhere v) => [State SqlWhereAll ()] -> m ()

    hpqtypes-extras Database.PostgreSQL.PQTypes.SQL.Builder

    Add a condition in the WHERE statement that holds if any of the given condition holds. These conditions are joined with OR operator. When no conditions are given, the result is FALSE.

  7. sqlWhereAnyWhere :: SqlWhereAny -> [SqlCondition]

    hpqtypes-extras Database.PostgreSQL.PQTypes.SQL.Builder

    No documentation available.

  8. sqlWhereEqualsAny :: (MonadState v m, SqlWhere v, Show a, ToSQL a) => SQL -> [a] -> m ()

    hpqtypes-extras Database.PostgreSQL.PQTypes.SQL.Builder

    Similar to sqlWhereIn, but uses ANY instead of SELECT UNNEST.

  9. ManyDisplay :: [Display] -> Display

    ihaskell IHaskell.Display

    No documentation available.

  10. many :: [Display] -> Display

    ihaskell IHaskell.Display

    Encode many displays into a single one. All will be output.

Page 195 of many | Previous | Next