HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

  • PackageImpSpec-0.2.0.0
  • Exports31
  • LanguageHaskell2010
  • LicenceApache-2.0
  • SourceLifted.hs

Lifted Expectations

valueio :: IO a -> IO a

Enforce the type of expectation

Useful with polymorphic expectations that are defined below.

Example

Because shouldBeExpr is polymorphic in m, compiler will choke with a unification error. This is due to the fact that hspec's it expects a polymorphic Example.

it "MyTest" $ do
  "foo" `shouldBeExpr` "bar"

However, this is easily solved by io:

it "MyTest" $ io $ do
  "foo" `shouldBeExpr` "bar"

Common

typetype Selector a = a -> Bool

A Selector is a predicate; it can simultaneously constrain the type and value of an exception.

Custom

Either

Maybe