summaryrefslogtreecommitdiffhomepage
path: root/Memory.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Memory.hs')
-rw-r--r--Memory.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Memory.hs b/Memory.hs
new file mode 100644
index 0000000..963acf7
--- /dev/null
+++ b/Memory.hs
@@ -0,0 +1,9 @@
+module Memory where
+
+-- | Class of things whose size in memory is known.
+--
+-- (This can be an approximate size, but should be no larger than the
+-- memory used to reprecent the thing.)
+class DataSize t where
+ -- ^ Size in bytes
+ dataSize :: t -> Integer