{-# LANGUAGE ExistentialQuantification #-}
module Debris ( Debris(..)
, SomeDebris(..)
) where
import Tank
class Show a => Debris a where
collideTank :: a -> Tank -> Tank
data SomeDebris = forall a. Debris a => SomeDebris a
instance Show SomeDebris
where
show (SomeDebris a) = show a
instance Debris SomeDebris
where
collideTank (SomeDebris a) = collideTank a