summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/ColInference6.hs
blob: 9273632e2bc53c5a8dcfb606ce531c8499df5717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE TypeFamilies #-}

module ColInference6  where 

type family Elem c

type instance Elem [e] = e

class Col c where
  toList :: c -> [Elem c]


sumCol c = sum . toList $ c