No title

Anonymous Coward 2018-03-07 18:42:11.972735 UTC

1{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE GADTs #-}
3
4class Foo a where
5 data FooValue a :: *
6
7data FooValueList where
8 MkFooValueList :: Foo a => [FooValue a] -> FooValueList
9
10emptyFooValueList :: FooValueList
11emptyFooValueList = MkFooValueList ([] :: Foo a => [FooValue a])
12
13
14-- No instance for (Foo a0) arising from a use of ‘MkFooValueList’
15-- In the expression: MkFooValueList ([] :: Foo a => [FooValue a])
16-- In an equation for ‘emptyFooValueList’:
17-- emptyFooValueList = MkFooValueList ([] :: Foo a => [FooValue a])