X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FFastTypes.lhs;h=ace46e6e1b344830f4c8536cfc83de296f6d2f0b;hp=71a317b1c951490bade56baa02bed266d0030889;hb=c5b178be60a5a44abd2f4ddf8c399857678326e2;hpb=206b4dec78250efef3cd927d64dc6cbc54a16c3d diff --git a/compiler/utils/FastTypes.lhs b/compiler/utils/FastTypes.lhs index 71a317b..ace46e6 100644 --- a/compiler/utils/FastTypes.lhs +++ b/compiler/utils/FastTypes.lhs @@ -10,8 +10,15 @@ --it's only used in an appropriate pattern of efficiency. --(it also makes `let`s and `case`s stricter...) +-- | Fast integers, characters and pointer types for use in many parts of GHC module FastTypes ( - FastInt, _ILIT, iBox, iUnbox, + -- * FastInt + FastInt, + + -- ** Getting in and out of FastInt + _ILIT, iBox, iUnbox, + + -- ** Arithmetic on FastInt (+#), (-#), (*#), quotFastInt, negateFastInt, --quotRemFastInt is difficult because unboxed values can't --be tupled, but unboxed tuples aren't portable. Just use @@ -32,14 +39,27 @@ module FastTypes ( bitAndFastInt, bitOrFastInt, --add more operations to this file as you need them + -- * FastChar + FastChar, + + -- ** Getting in and out of FastChar + _CLIT, cBox, cUnbox, + + -- ** Operations on FastChar + fastOrd, fastChr, eqFastChar, --note, fastChr is "unsafe"Chr: it doesn't check for --character values above the range of Unicode - FastChar, _CLIT, cBox, cUnbox, fastOrd, fastChr, eqFastChar, - FastPtr, pBox, pUnbox, castFastPtr + -- * FastPtr + FastPtr, + + -- ** Getting in and out of FastPtr + pBox, pUnbox, + + -- ** Casting FastPtrs + castFastPtr ) where -#define COMPILING_FAST_STRING #include "HsVersions.h" #if defined(__GLASGOW_HASKELL__)