diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-12-19 10:32:09 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-12-19 10:32:09 +0000 |
commit | 650f76fe29394adac14fd59cafe72cec3125daf5 (patch) | |
tree | 950e9429fa7715c1a207b87d1536c93688af2779 /compiler/deSugar | |
parent | b5853125ca6a5637647d0b0f2d6271cbf219b337 (diff) | |
parent | 909d52e20405bf18b5fb337e64318112bb553cd8 (diff) | |
download | haskell-650f76fe29394adac14fd59cafe72cec3125daf5.tar.gz |
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Diffstat (limited to 'compiler/deSugar')
-rw-r--r-- | compiler/deSugar/Check.lhs | 2 | ||||
-rw-r--r-- | compiler/deSugar/DsBinds.lhs | 2 | ||||
-rw-r--r-- | compiler/deSugar/MatchLit.lhs | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs index ad590ae8d8..7736aa69ed 100644 --- a/compiler/deSugar/Check.lhs +++ b/compiler/deSugar/Check.lhs @@ -445,7 +445,7 @@ get_lit :: Pat id -> Maybe HsLit get_lit (LitPat lit) = Just lit get_lit (NPat (OverLit { ol_val = HsIntegral i}) mb _) = Just (HsIntPrim (mb_neg negate mb i)) get_lit (NPat (OverLit { ol_val = HsFractional f }) mb _) = Just (HsFloatPrim (mb_neg negateFractionalLit mb f)) -get_lit (NPat (OverLit { ol_val = HsIsString s }) _ _) = Just (HsStringPrim (fastStringToFastBytes s)) +get_lit (NPat (OverLit { ol_val = HsIsString s }) _ _) = Just (HsStringPrim (fastStringToByteString s)) get_lit _ = Nothing mb_neg :: (a -> a) -> Maybe b -> a -> a diff --git a/compiler/deSugar/DsBinds.lhs b/compiler/deSugar/DsBinds.lhs index 1e3eb2d8c4..4b7f8c0dd4 100644 --- a/compiler/deSugar/DsBinds.lhs +++ b/compiler/deSugar/DsBinds.lhs @@ -776,7 +776,7 @@ dsEvTerm (EvSuperClass d n) dsEvTerm (EvDelayedError ty msg) = return $ Var errorId `mkTyApps` [ty] `mkApps` [litMsg] where errorId = rUNTIME_ERROR_ID - litMsg = Lit (MachStr (fastStringToFastBytes msg)) + litMsg = Lit (MachStr (fastStringToByteString msg)) dsEvTerm (EvLit l) = case l of diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs index f6207f1a13..80f2124d1f 100644 --- a/compiler/deSugar/MatchLit.lhs +++ b/compiler/deSugar/MatchLit.lhs @@ -133,7 +133,7 @@ hsLitKey _ (HsCharPrim c) = MachChar c hsLitKey _ (HsStringPrim s) = MachStr s hsLitKey _ (HsFloatPrim f) = MachFloat (fl_value f) hsLitKey _ (HsDoublePrim d) = MachDouble (fl_value d) -hsLitKey _ (HsString s) = MachStr (fastStringToFastBytes s) +hsLitKey _ (HsString s) = MachStr (fastStringToByteString s) hsLitKey _ l = pprPanic "hsLitKey" (ppr l) hsOverLitKey :: OutputableBndr a => HsOverLit a -> Bool -> Literal @@ -145,7 +145,7 @@ litValKey (HsIntegral i) False = MachInt i litValKey (HsIntegral i) True = MachInt (-i) litValKey (HsFractional r) False = MachFloat (fl_value r) litValKey (HsFractional r) True = MachFloat (negate (fl_value r)) -litValKey (HsIsString s) neg = ASSERT( not neg) MachStr (fastStringToFastBytes s) +litValKey (HsIsString s) neg = ASSERT( not neg) MachStr (fastStringToByteString s) \end{code} %************************************************************************ @@ -263,7 +263,7 @@ matchLiterals (var:vars) ty sub_groups wrap_str_guard eq_str (MachStr s, mr) = do { -- We now have to convert back to FastString. Perhaps there -- should be separate MachBytes and MachStr constructors? - s' <- liftIO $ mkFastStringFastBytes s + s' <- liftIO $ mkFastStringByteString s ; lit <- mkStringExprFS s' ; let pred = mkApps (Var eq_str) [Var var, lit] ; return (mkGuardedMatchResult pred mr) } |