Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / partial-sigs / should_compile / NamedWildcardsAsTyVars.hs
1 {-# LANGUAGE TypeFamilies, NamedWildCards, PolyKinds #-}
2
3 -- All declarations below are accepted when the NamedWildCards extension is not
4 -- enabled and the identifiers starting with _ are parsed as type variables.
5 -- They should remain valid when the extension is on.
6 --
7 -- See #11098 and comments in #10982
8
9 module NamedWildcardsAsTyVars where
10
11 type Synonym _a = _a -> _a
12
13 data A a _b = ACon a a Int
14
15 data B _a b = BCon _a (_a, Bool)
16
17 type family C a b where
18 C _a _b = _a -> _a
19
20 type family D a b where
21 D _a b = _a -> (_a, Int)
22
23 data family E a b
24 data instance E a _b = ECon a (a, Int)
25
26 data family F a b
27 data instance F _a b = FCon _a _a Bool
28
29 class G _a where
30 gfoo :: _a -> _a
31
32 instance G Int where
33 gfoo = (*2)
34
35 type family H a b where
36 H _a _a = Int
37 H _a _b = Bool
38
39 hfoo :: H String String
40 hfoo = 10
41
42 hbar :: H String Int
43 hbar = False
44
45 type family I (_a :: k) where
46 I _t = Int