Fix a typo.
[ghc-hetmet.git] / compiler / deSugar / DsExpr.lhs
index e90a556..23db23f 100644 (file)
@@ -52,6 +52,8 @@ import Util
 import Bag
 import Outputable
 import FastString
+
+import Data.Maybe
 \end{code}
 
 
@@ -190,12 +192,16 @@ dsLExpr :: LHsExpr Id -> DsM CoreExpr
 #if defined(GHCI)
 dsLExpr (L loc expr@(HsWrap w (HsVar v)))
     | idName v `elem` [breakpointName, breakpointCondName, breakpointAutoName]
+    , WpTyApp ty <- simpWrapper w
     = do areBreakpointsEnabled <- breakpoints_enabled
          if areBreakpointsEnabled
            then do
-              L _ breakpointExpr <- mkBreakpointExpr loc v
+              L _ breakpointExpr <- mkBreakpointExpr loc v ty
               dsLExpr (L loc $ HsWrap w breakpointExpr)
            else putSrcSpanDs loc $ dsExpr expr
+       where simpWrapper (WpCompose w1 WpHole) = w1
+             simpWrapper (WpCompose WpHole w1) = w1
+             simpWrapper w = w
 #endif
 
 dsLExpr (L loc e) = putSrcSpanDs loc $ dsExpr e
@@ -207,7 +213,7 @@ dsExpr (HsVar var)                = returnDs (Var var)
 dsExpr (HsIPVar ip)                  = returnDs (Var (ipNameName ip))
 dsExpr (HsLit lit)                   = dsLit lit
 dsExpr (HsOverLit lit)               = dsOverLit lit
-dsExpr (HsWrap co_fn e)     = dsCoercion co_fn (dsExpr e)
+dsExpr (HsWrap co_fn e)       = dsCoercion co_fn (dsExpr e)
 
 dsExpr (NegApp expr neg_expr) 
   = do { core_expr <- dsLExpr expr