Print infix function definitions correctly in HsSyn
[ghc-hetmet.git] / compiler / deSugar / DsBinds.lhs
index 242cca8..0469b48 100644 (file)
@@ -89,8 +89,9 @@ dsHsBind auto_scc rest (VarBind var expr)
     addDictScc var core_expr   `thenDs` \ core_expr' ->
     returnDs ((var, core_expr') : rest)
 
-dsHsBind auto_scc rest (FunBind { fun_id = L _ fun, fun_matches = matches, fun_co_fn = co_fn, fun_tick = tick })
-  = matchWrapper (FunRhs (idName fun)) matches         `thenDs` \ (args, body) ->
+dsHsBind auto_scc rest (FunBind { fun_id = L _ fun, fun_matches = matches, 
+                                 fun_co_fn = co_fn, fun_tick = tick, fun_infix = inf })
+  = matchWrapper (FunRhs (idName fun) inf) matches     `thenDs` \ (args, body) ->
     mkOptTickBox tick body                             `thenDs` \ body' ->
     dsCoercion co_fn (return (mkLams args body'))      `thenDs` \ rhs ->
     returnDs ((fun,rhs) : rest)