| otherwise = y
compare a b = cmpFS a b
+instance Show FastString where
+ show fs = show (unpackFS fs)
+
lengthFS :: FastString -> Int
lengthFS (FastString _ l# _) = I# l#
lengthFS (UnicodeStr _ s) = length s
ppr w])
instance Outputable FastString where
- ppr fs = text (unpackFS fs) -- Prints an unadorned string,
- -- no double quotes or anything
+ ppr fs = ftext fs -- Prints an unadorned string,
+ -- no double quotes or anything
instance Outputable PackageId where
ppr pid = text (packageIdString pid)
pprHsString :: FastString -> SDoc
pprHsString fs = text (show (unpackFS fs))
-
-instance Show FastString where
- showsPrec p fs = showsPrecSDoc p (ppr fs)
\end{code}