Refactor PackageTarget back into StaticTarget
[ghc-hetmet.git] / compiler / parser / RdrHsSyn.lhs
index 49a0946..d18b8d8 100644 (file)
@@ -985,9 +985,10 @@ mkImport :: CCallConv
         -> P (HsDecl RdrName)
 mkImport cconv safety (L loc entity, v, ty)
   | cconv == PrimCallConv                      = do
-    let funcTarget = CFunction (StaticTarget entity)
-        importSpec = CImport PrimCallConv safety nilFS funcTarget
-    return (ForD (ForeignImport v ty importSpec))
+  let funcTarget = CFunction (StaticTarget entity Nothing)
+      importSpec = CImport PrimCallConv safety nilFS funcTarget
+  return (ForD (ForeignImport v ty importSpec))
+
   | otherwise = do
     case parseCImport cconv safety (mkExtName (unLoc v)) (unpackFS entity) of
       Nothing         -> parseError loc "Malformed entity string"
@@ -1022,7 +1023,7 @@ parseCImport cconv safety nm str =
    id_char  c = isAlphaNum c || c == '_'
 
    cimp nm = (ReadP.char '&' >> skipSpaces >> CLabel <$> cid)
-             +++ ((CFunction . StaticTarget) <$> cid)
+             +++ ((\c -> CFunction (StaticTarget c Nothing)) <$> cid)
           where 
             cid = return nm +++
                   (do c  <- satisfy (\c -> isAlpha c || c == '_')