diff options
Diffstat (limited to 'testsuite/tests/polykinds/T22379a.hs')
-rw-r--r-- | testsuite/tests/polykinds/T22379a.hs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T22379a.hs b/testsuite/tests/polykinds/T22379a.hs new file mode 100644 index 0000000000..d4caa01048 --- /dev/null +++ b/testsuite/tests/polykinds/T22379a.hs @@ -0,0 +1,31 @@ +{-# LANGUAGE Haskell2010 #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE TypeFamilies #-} +module Bug where + +import Data.Kind +import Data.Proxy (Proxy) + +data Delayed (env :: Type) (c :: Type) +data Handler (a :: Type) +data Router (a :: Type) + +-- class decl, then type decl + +class HasServer api where + type ServerT api (m :: Type -> Type) :: Type + + route :: + Proxy api + -> Delayed env (Server api) + -> Router env + + hoistServerWithContext + :: Proxy api + -> (forall x. m x -> n x) + -> ServerT api m + -> ServerT api n + +type Server aqi = ServerT aqi Handler + |