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.
-
blaze-html Text.Blaze.XHtml5 Combinator for the <aside> element. Example:
aside $ span $ toHtml "foo"
Result:<aside><span>foo</span></aside>
-
blaze-html Text.Blaze.XHtml5 Combinator for the <video> element. Example:
video $ span $ toHtml "foo"
Result:<video><span>foo</span></video>
formnovalidate :: AttributeValue -> Attributeblaze-html Text.Blaze.XHtml5.Attributes Combinator for the formnovalidate attribute. Example:
div ! formnovalidate "bar" $ "Hello."
Result:<div formnovalidate="bar">Hello.</div>
hidden :: AttributeValue -> Attributeblaze-html Text.Blaze.XHtml5.Attributes Combinator for the hidden attribute. Example:
div ! hidden "bar" $ "Hello."
Result:<div hidden="bar">Hello.</div>
novalidate :: AttributeValue -> Attributeblaze-html Text.Blaze.XHtml5.Attributes Combinator for the novalidate attribute. Example:
div ! novalidate "bar" $ "Hello."
Result:<div novalidate="bar">Hello.</div>
oninvalid :: AttributeValue -> Attributeblaze-html Text.Blaze.XHtml5.Attributes Combinator for the oninvalid attribute. Example:
div ! oninvalid "bar" $ "Hello."
Result:<div oninvalid="bar">Hello.</div>
onpagehide :: AttributeValue -> Attributeblaze-html Text.Blaze.XHtml5.Attributes Combinator for the onpagehide attribute. Example:
div ! onpagehide "bar" $ "Hello."
Result:<div onpagehide="bar">Hello.</div>
width :: AttributeValue -> Attributeblaze-html Text.Blaze.XHtml5.Attributes Combinator for the width attribute. Example:
div ! width "bar" $ "Hello."
Result:<div width="bar">Hello.</div>
-
Testing utilities for the validity library Note: There are companion instance packages for this library:
-
GenValid exists to make tests involving Validity types easier and speed up the generation of data for them. To implement tests for this datatype, we would have to be able to generate both primes. We could do this with a generator like this one:
(Prime <$> 'arbitrary') `suchThat` isValid
However, this is tedious and inefficient, as well as quite naive (because arbitrary tends to use very naive generators). The GenValid type class allows you to specify how to (efficiently) generate valid data of the given type to allow for easier and quicker testing. The default implementation of GenValid already gives you a generator and shrinking function for free:instance GenValid Prime
For example, to generate primes, we don't have to consider even numbers other than 2. A more efficient implementation could then look as follows:instance GenValid Prime where genValid = Prime <$> (oneof [ pure 2 , ((\y -> 2 * abs y + 1) <$> arbitrary) `suchThat` isPrime) ])
Typical examples of tests involving validity could look as follows:it "succeeds when given valid input" $ do forAllValid $ \input -> myFunction input `shouldSatisfy` isRight
it "produces valid output when it succeeds" $ do forAllValid $ \input -> case myFunction input of Nothing -> return () -- Can happen Just output -> output `shouldSatisfy` isValid
Definitely also look at the companion packages for more info on how to use this package.