projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-09-16 13:03:37 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
deSugar
/
MatchLit.lhs
diff --git
a/ghc/compiler/deSugar/MatchLit.lhs
b/ghc/compiler/deSugar/MatchLit.lhs
index
01d1ed8
..
2be6e25
100644
(file)
--- a/
ghc/compiler/deSugar/MatchLit.lhs
+++ b/
ghc/compiler/deSugar/MatchLit.lhs
@@
-12,7
+12,6
@@
import {-# SOURCE #-} Match ( match )
import {-# SOURCE #-} DsExpr ( dsExpr )
import DsMonad
import {-# SOURCE #-} DsExpr ( dsExpr )
import DsMonad
-import DsCCall ( resultWrapper )
import DsUtils
import HsSyn ( HsLit(..), Pat(..), HsExpr(..) )
import DsUtils
import HsSyn ( HsLit(..), Pat(..), HsExpr(..) )
@@
-26,9
+25,7
@@
import PrelNames ( ratioTyConKey )
import Unique ( hasKey )
import Literal ( mkMachInt, Literal(..) )
import Maybes ( catMaybes )
import Unique ( hasKey )
import Literal ( mkMachInt, Literal(..) )
import Maybes ( catMaybes )
-import Type ( isUnLiftedType )
import Panic ( panic, assertPanic )
import Panic ( panic, assertPanic )
-import Maybe ( isJust )
import Ratio ( numerator, denominator )
\end{code}
import Ratio ( numerator, denominator )
\end{code}
@@
-64,11
+61,6
@@
dsLit (HsInt i) = returnDs (mkIntExpr i)
dsLit (HsIntPrim i) = returnDs (mkIntLit i)
dsLit (HsFloatPrim f) = returnDs (mkLit (MachFloat f))
dsLit (HsDoublePrim d) = returnDs (mkLit (MachDouble d))
dsLit (HsIntPrim i) = returnDs (mkIntLit i)
dsLit (HsFloatPrim f) = returnDs (mkLit (MachFloat f))
dsLit (HsDoublePrim d) = returnDs (mkLit (MachDouble d))
-dsLit (HsLitLit str ty)
- = resultWrapper ty `thenDs` \ (maybe_ty, wrap_fn) ->
- ASSERT( isJust maybe_ty )
- let (Just rep_ty) = maybe_ty in
- returnDs (wrap_fn (mkLit (MachLitLit str rep_ty)))
dsLit (HsRat r ty)
= mkIntegerExpr (numerator r) `thenDs` \ num ->
dsLit (HsRat r ty)
= mkIntegerExpr (numerator r) `thenDs` \ num ->
@@
-133,8
+125,6
@@
matchLiterals all_vars@(var:vars) eqns_info@(EqnInfo n ctx (LitPat literal : ps1
mk_core_lit (HsStringPrim s) = MachStr s
mk_core_lit (HsFloatPrim f) = MachFloat f
mk_core_lit (HsDoublePrim d) = MachDouble d
mk_core_lit (HsStringPrim s) = MachStr s
mk_core_lit (HsFloatPrim f) = MachFloat f
mk_core_lit (HsDoublePrim d) = MachDouble d
- mk_core_lit (HsLitLit s ty) = ASSERT(isUnLiftedType ty)
- MachLitLit s ty
mk_core_lit other = panic "matchLiterals:mk_core_lit:unhandled"
\end{code}
mk_core_lit other = panic "matchLiterals:mk_core_lit:unhandled"
\end{code}