1{-# LANGUAGE TypeFamilyDependencies #-}
2{-# LANGUAGE TypeInType #-}
3{-# LANGUAGE TypeOperators #-}
4module T14164 where
5
6data G (x :: a) = GNil | GCons (G x)
7
8type family F (xs :: [a]) (g :: G (z :: a)) = (res :: [a]) | res -> a where
9  F (x:xs) GNil         = x:xs
10  F (x:xs) (GCons rest) = x:F xs rest
11
12