Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class HeapWords a where
- heapSizeMb ∷ Int → Int
- heapSizeKb ∷ Int → Int
- heapWords0 ∷ Int
- heapWords1 ∷ HeapWords a ⇒ a → Int
- heapWords2 ∷ (HeapWords a1, HeapWords a) ⇒ a → a1 → Int
- heapWords3 ∷ (HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → Int
- heapWords4 ∷ (HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → Int
- heapWords5 ∷ (HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → Int
- heapWords6 ∷ (HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → Int
- heapWords7 ∷ (HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → Int
- heapWords8 ∷ (HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → Int
- heapWords9 ∷ (HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → Int
- heapWords10 ∷ (HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → Int
- heapWords11 ∷ (HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → a10 → Int
- heapWords12 ∷ (HeapWords a11, HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → a10 → a11 → Int
- heapWords13 ∷ (HeapWords a12, HeapWords a11, HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → a10 → a11 → a12 → Int
- heapWordsUArray ∷ (Ix i, IArray a e) ⇒ Int → a i e → Int
- heapWordsUVector ∷ Unbox e ⇒ Int → Vector e → Int
- heapWordsUnpacked ∷ HeapWords a ⇒ a → Int
Documentation
class HeapWords a where Source #
Size in the heap of values, in words (to get the size in bytes multiply by 4 on a 32-bit machine or 8 on a 64-bit machine)
Instances
heapSizeMb ∷ Int → Int Source #
These functions assume a 64-bit architecture
heapSizeKb ∷ Int → Int Source #
These functions assume a 64-bit architecture
heapWords0 ∷ Int Source #
heapWords1 ∷ HeapWords a ⇒ a → Int Source #
heapWords4 ∷ (HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → Int Source #
heapWords5 ∷ (HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → Int Source #
heapWords6 ∷ (HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → Int Source #
heapWords7 ∷ (HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → Int Source #
heapWords8 ∷ (HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → Int Source #
heapWords9 ∷ (HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → Int Source #
heapWords10 ∷ (HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → Int Source #
heapWords11 ∷ (HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → a10 → Int Source #
heapWords12 ∷ (HeapWords a11, HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → a10 → a11 → Int Source #
heapWords13 ∷ (HeapWords a12, HeapWords a11, HeapWords a10, HeapWords a9, HeapWords a8, HeapWords a7, HeapWords a6, HeapWords a5, HeapWords a4, HeapWords a3, HeapWords a2, HeapWords a1, HeapWords a) ⇒ a → a1 → a2 → a3 → a4 → a5 → a6 → a7 → a8 → a9 → a10 → a11 → a12 → Int Source #
heapWordsUnpacked ∷ HeapWords a ⇒ a → Int Source #
Calculate the number of heap words used by a field unpacked within another constructor.
This function simply subtracts 2 from the heapWords
result of its
parameter, since in the case of an unpacked field we _do not_ have to use:
- a word for the pointer to the inner structure.
- a word for the constructor that is being unpacked.