Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / indexed-types / should_compile / T3017.hs
1 {-# LANGUAGE TypeFamilies #-}
2
3 -- #3017
4
5 module Foo where
6 class Coll c where
7 type Elem c
8 empty :: c
9 insert :: Elem c -> c -> c
10
11 data ListColl a = L [a]
12 instance Coll (ListColl a) where
13 type Elem (ListColl a) = a
14 empty = L []
15 insert x (L xs) = L (x:xs)
16
17 emptyL :: ListColl a
18 emptyL = empty
19
20 test2 c = insert (0, 0) c