Commit c9ac9de7 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #11552

parent fac0efc3
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module T11552 where
newtype MaybeT m a =
MaybeT { runMaybeT :: m (Maybe a) }
instance (Functor m) => Functor (MaybeT m) where
fmap f (MaybeT ma) =
MaybeT $ (fmap . fmap) f ma
instance forall f . (Applicative f) => Applicative (MaybeT f) where
pure :: a -> MaybeT f a
pure x = MaybeT (pure (pure x))
(<*>) :: forall a b . Applicative f => MaybeT f (a -> b) -> MaybeT f a -> MaybeT f b
(MaybeT fab) <*> (MaybeT mma) =
let fab' :: f (Maybe (a -> b))
fab' = fab
in MaybeT $ undefined
...@@ -504,3 +504,4 @@ test('T11397', normal, compile, ['']) ...@@ -504,3 +504,4 @@ test('T11397', normal, compile, [''])
test('T11458', normal, compile, ['']) test('T11458', normal, compile, [''])
test('T11516', expect_broken(11516), compile, ['']) test('T11516', expect_broken(11516), compile, [''])
test('T11524', normal, compile, ['']) test('T11524', normal, compile, [''])
test('T11552', normal, compile, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment