import Data.Typeable

import Data.Maybe



class Play on where




-- | Children are defined as the top-most items of type to
--   /starting at the root/.
class (Typeable from, Typeable to, Play to) => PlayEx from to where


-- | Children are defined as the top-most items of type to
--   /starting beneath the root/.
class (Typeable from, Typeable to, Play to) => PlayAll from to where


instance PlayAll a b => PlayEx a b where




-- * The Operations


everythingEx :: PlayEx from to => from -> [to]
everythingEx = undefined



data Expr  =  Val  Int         -- a literal value

           deriving (Eq, Show)


typename_Expr = mkTyCon "Expr"
instance Typeable Expr where




instance Play Expr where

instance (Typeable a, Play a) => PlayAll Expr a where
    
data Foo a = Foo a


instance Typeable1 Foo where
instance Typeable a => Typeable (Foo a) where 

test = everythingEx (Foo (Val 1))


instance (PlayAll a (Foo a)) => Play (Foo a) where


instance (Typeable b, Play (Foo a), PlayAll a b) => PlayAll (Foo a) b where

