[project @ 2004-08-13 13:04:50 by simonmar]
[ghc-hetmet.git] / ghc / compiler / parser / RdrHsSyn.lhs
index b011c39..781b085 100644 (file)
@@ -61,13 +61,12 @@ import Kind         ( liftedTypeKind )
 import HscTypes                ( GenAvailInfo(..) )
 import TysWiredIn      ( unitTyCon ) 
 import ForeignCall     ( CCallConv, Safety, CCallTarget(..), CExportSpec(..),
-                         DNCallSpec(..), DNKind(..))
+                         DNCallSpec(..), DNKind(..), CLabelString )
 import OccName         ( OccName, srcDataName, varName, isDataOcc, isTcOcc, 
                          occNameUserString, isValOcc )
 import BasicTypes      ( initialVersion, StrictnessMark(..) )
 import Module          ( ModuleName )
 import SrcLoc
-import CStrings                ( CLabelString )
 import CmdLineOpts     ( opt_InPackage )
 import OrdList         ( OrdList, fromOL )
 import Bag             ( Bag, emptyBag, snocBag, consBag, foldrBag )
@@ -273,17 +272,17 @@ hsIfaceCons NewType [con] -- newtype
 
 hsIfaceCon :: ConDecl RdrName -> IfaceConDecl
 hsIfaceCon (ConDecl lname ex_tvs ex_ctxt details)
-  = IfaceConDecl (get_occ lname)
+  = IfaceConDecl (get_occ lname) is_infix
                 (hsIfaceTvs ex_tvs)
                 (hsIfaceCtxt (unLoc ex_ctxt))
                 (map (hsIfaceLType . getBangType       . unLoc) args)
                 (map (hsStrictMark . getBangStrictness . unLoc) args)
                 flds
   where
-    (args, flds) = case details of
-                       PrefixCon args -> (args, [])
-                       InfixCon a1 a2 -> ([a1,a2], [])
-                       RecCon fs      -> (map snd fs, map (get_occ . fst) fs)
+    (is_infix, args, flds) = case details of
+                               PrefixCon args -> (False, args, [])
+                               InfixCon a1 a2 -> (True, [a1,a2], [])
+                               RecCon fs      -> (False, map snd fs, map (get_occ . fst) fs)
     get_occ lname = rdrNameOcc (unLoc lname)
 
 hsStrictMark :: HsBang -> StrictnessMark