This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
htanks/src/Debris.hs
2010-03-15 14:46:14 +01:00

21 lines
419 B
Haskell

{-# 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