summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs
blob: 03147242d87ffece5d96daaa01d019f97710ec87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{-# LANGUAGE NoImplicitForAll, GADTs, DeriveAnyClass #-}

module RnNoImplicitForAll where

import GHC.Types

f :: a -> a
f = undefined

type T :: k -> Type
data T k

data G a where
  MkG :: a -> Maybe b -> G (Either Int b)

rightTrue = Right True :: Either a Bool

munit :: forall m a . Monad m => m a
munit = pure undefined
{-# SPECIALISE munit :: IO a #-}

class C a b

data TD deriving (C a)

instance Show a => Show (Maybe a)

type family F a

type instance F (Maybe a) = Int

{-# RULES "name" forall (x :: Maybe a). foo x = 5 #-}

foo x = 5

id (a :: t) = t