summaryrefslogtreecommitdiffstats
path: root/src/Debris.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Debris.hs')
-rw-r--r--src/Debris.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Debris.hs b/src/Debris.hs
new file mode 100644
index 0000000..40b7def
--- /dev/null
+++ b/src/Debris.hs
@@ -0,0 +1,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