Skip to content

Instantly share code, notes, and snippets.

@cdsmith
Created April 30, 2021 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdsmith/ca20492c3b290df99bc7828b701c599a to your computer and use it in GitHub Desktop.
Save cdsmith/ca20492c3b290df99bc7828b701c599a to your computer and use it in GitHub Desktop.
C:\Users\cdsmi\Haskell\hmock\test\TH.hs:33:1-27: Splicing declarations
makeMockable [t| MonadFoo3 |]
======>
instance Mockable MonadFoo3 where
data Action MonadFoo3 a_ax0if
where
Foo3 :: forall (a_ax0fo :: ghc-prim-0.6.1:GHC.Types.Type). Show a_ax0fo =>
a_ax0fo -> Action MonadFoo3 ()
data Matcher MonadFoo3 a_ax0ig
where Foo3_ :: (Predicate a_ax0fo) -> Matcher MonadFoo3 ()
showAction (Foo3 p_ax0ih) = unwords ["foo3", "_"]
showMatcher (Foo3_ p_ax0ii)
= unwords ["foo3", ("«" ++ (showPredicate p_ax0ii ++ "»"))]
match (Foo3_ p_ax0ij) (Foo3 a_ax0ik)
| (mismatches_ax0il == 0) = FullMatch Refl
| otherwise = PartialMatch mismatches_ax0il
where
mismatches_ax0il = length ((filter not) [...])
instance (Typeable m_ax0im, Monad m_ax0im) =>
MonadFoo3 (MockT m_ax0im) where
foo3 p_ax0in = mockMethod (Foo3 p_ax0in)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment