X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FParserCore.y;h=6d302fb03acf1d1cb54f5ff14cbadece99d8a91f;hp=1925dac46e18cd3f7a19ddcfe7a6edec4290bb05;hb=e79c9ce01d0ce4412bd4bcd99c8c728a6a2ec569;hpb=d33c0b24a0306cc57161b7ed7ff2510d0b017b11 diff --git a/compiler/parser/ParserCore.y b/compiler/parser/ParserCore.y index 1925dac..6d302fb 100644 --- a/compiler/parser/ParserCore.y +++ b/compiler/parser/ParserCore.y @@ -1,4 +1,11 @@ { +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module ParserCore ( parseCore ) where import IfaceSyn @@ -13,7 +20,6 @@ import Type ( Kind, ) import Name( Name, nameOccName, nameModule, mkExternalName ) import Module -import PackageConfig ( mainPackageId, stringToPackageId ) import ParserCoreUtils import LexCore import Literal @@ -346,7 +352,7 @@ eqTc (IfaceTc name) tycon = name == tyConName tycon -- are very limited (see the productions for 'ty', so the translation -- isn't hard toHsType :: IfaceType -> LHsType RdrName -toHsType (IfaceTyVar v) = noLoc $ HsTyVar (mkRdrUnqual (mkTyVarOcc v)) +toHsType (IfaceTyVar v) = noLoc $ HsTyVar (mkRdrUnqual (mkTyVarOccFS v)) toHsType (IfaceAppTy t1 t2) = noLoc $ HsAppTy (toHsType t1) (toHsType t2) toHsType (IfaceFunTy t1 t2) = noLoc $ HsFunTy (toHsType t1) (toHsType t2) toHsType (IfaceTyConApp (IfaceTc tc) ts) = foldl mkHsAppTy (noLoc $ HsTyVar (ifaceExtRdrName tc)) (map toHsType ts) @@ -378,7 +384,7 @@ ifaceArrow ifT1 ifT2 = IfaceFunTy ifT1 ifT2 ifaceEq ifT1 ifT2 = IfacePredTy (IfaceEqPred ifT1 ifT2) toHsTvBndr :: IfaceTvBndr -> LHsTyVarBndr RdrName -toHsTvBndr (tv,k) = noLoc $ KindedTyVar (mkRdrUnqual (mkTyVarOcc tv)) (toKind k) +toHsTvBndr (tv,k) = noLoc $ KindedTyVar (mkRdrUnqual (mkTyVarOccFS tv)) (toKind k) ifaceExtRdrName :: Name -> RdrName ifaceExtRdrName name = mkOrig (nameModule name) (nameOccName name)