X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FFastString.lhs;h=7d43dc128314bb919a9aedea05621dadf4c7e613;hb=21dcb917858ecc6a851f05815ecd6a097e3b7a9d;hp=5651cec3f46b0dede285e559e81e8c5883c590f9;hpb=e48618c7132ee7954c6a869d4cc007f1f854c302;p=ghc-hetmet.git diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index 5651cec..7d43dc1 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -2,16 +2,24 @@ % (c) The University of Glasgow, 1997-2006 % \begin{code} +{-# OPTIONS -fno-warn-unused-imports #-} +-- XXX GHC 6.9 seems to be confused by unpackCString# being used only in +-- a RULE + +{-# OPTIONS_GHC -O -funbox-strict-fields #-} +-- We always optimise this, otherwise performance of a non-optimised +-- compiler is severely affected + {- FastString: A compact, hash-consed, representation of character strings. Comparison is O(1), and you can get a Unique from them. - Generated by the FSLIT macro + Generated by fsLit Turn into SDoc with Outputable.ftext LitString: Just a wrapper for the Addr# of a C string (Ptr CChar). Practically no operations Outputing them is fast - Generated by the SLIT macro + Generated by sLit Turn into SDoc with Outputable.ptext Use LitString unless you want the facilities of FastString @@ -573,10 +581,6 @@ pokeCAString ptr str = in go str 0 -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 602 -peekCAStringLen = peekCStringLen -#endif - {-# NOINLINE sLit #-} sLit :: String -> LitString sLit x = mkLitString x