diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T8603.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T8603.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T8603.hs b/testsuite/tests/typecheck/should_fail/T8603.hs index 90c1db3ad6..d17f246209 100644 --- a/testsuite/tests/typecheck/should_fail/T8603.hs +++ b/testsuite/tests/typecheck/should_fail/T8603.hs @@ -10,6 +10,10 @@ newtype RV a = RV { getPDF :: [(Rational,a)] } deriving (Show, Eq) instance Functor RV where fmap f = RV . map (\(x,y) -> (x, f y)) . getPDF +instance Applicative RV where + pure = return + (<*>) = ap + instance Monad RV where return x = RV [(1,x)] rv >>= f = RV $ @@ -29,4 +33,4 @@ testRVState1 = do prize <- lift uniform [1,2,3] return False --- lift :: (MonadTrans t, Monad m) => m a -> t m a
\ No newline at end of file +-- lift :: (MonadTrans t, Monad m) => m a -> t m a |