This repository has been archived on 2025-03-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
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