blob: 282989f5b8d331201a62be09a537ceac49eeb5d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE TypeFamilies #-}
module T21158 where
type family F a
data T b = MkT { x :: [Int], y :: [F b] }
emptyT :: T b
emptyT = MkT [] []
foo1 :: [Int] -> T b
foo1 newx = emptyT { x = newx }
foo2 :: [Int] -> T b
foo2 newx = case emptyT of MkT x y -> MkT newx y
|