summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/T14164.hs
blob: ccfabc07af5014f1709d0de74e24ba18c349b129 (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
module T14164 where

data G (x :: a) = GNil | GCons (G x)

type family F (xs :: [a]) (g :: G (z :: a)) = (res :: [a]) | res -> a where
  F (x:xs) GNil         = x:xs
  F (x:xs) (GCons rest) = x:F xs rest