blob: 270c92c37cb8610b3580682893ac5548d5db4359 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE RankNTypes, GADTs, KindSignatures #-}
module T14320
where
import Data.Kind (Type)
data Exp :: Type where
Lit :: (Int -> Exp)
newtype TypedExp :: Type -> Type where
TEGood :: forall a . (Exp -> (TypedExp a))
-- The presence of outer parentheses makes the `forall` nested, and
-- GADTs do not permit nested `forall`s.
--
newtype TypedExpToo :: Type -> Type where
TEBad :: (forall a . (Exp -> (TypedExpToo a)))
|