gitlab-ci: Move hadrian-ghc-in-ghci job first
[ghc.git] / testsuite / tests / typecheck / should_compile / T4952.hs
1 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
2 {-# LANGUAGE UndecidableInstances,
3 MultiParamTypeClasses,
4 KindSignatures,
5 FlexibleInstances,
6 FunctionalDependencies #-}
7
8 module Storage.Hashed.Monad () where
9
10 import Control.Applicative (Applicative(..))
11 import Data.Kind (Type)
12
13 class Monad m => TreeRO m where
14 withDirectory :: (MonadError e m) => Int -> m a -> m a
15 expandTo :: (MonadError e m) => Int -> m Int
16
17 instance (Monad m, MonadError e m) => TreeRO (M m) where
18 expandTo = undefined
19 withDirectory dir _ = do
20 _ <- expandTo dir
21 undefined
22
23 data M (m :: Type -> Type) a
24
25 instance Functor (M m) where
26 fmap = undefined
27
28 instance Applicative (M m) where
29 pure = undefined
30 (<*>) = undefined
31
32 instance Monad m => Monad (M m) where
33 (>>=) = undefined
34 return = undefined
35
36 instance MonadError e m => MonadError e (M m)
37
38 class Monad m => MonadError e m | m -> e