summaryrefslogtreecommitdiffstats
path: root/src/Debris.hs
blob: 40b7deffd4c585ea7452454a7b07ebfefb95263d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{-# 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