X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FConvert.lhs;h=8b64c981d9a3f5f17fc289ca24caa91b6912e4a3;hp=9bae01e84d4e11142aaece2bbe4324fd16796297;hb=9d0c8f842e35dde3d570580cf62a32779f66a6de;hpb=ab1d5052de53479377c961d1e966f0cf0b82c592 diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs index 9bae01e..8b64c98 100644 --- a/compiler/hsSyn/Convert.lhs +++ b/compiler/hsSyn/Convert.lhs @@ -83,8 +83,8 @@ instance Monad CvtM where initCvt :: SrcSpan -> CvtM a -> Either Message a initCvt loc (CvtM m) = m loc -force :: a -> CvtM a -force a = a `seq` return a +force :: a -> CvtM () +force a = a `seq` return () failWith :: Message -> CvtM a failWith m = CvtM (\_ -> Left full_msg) @@ -817,9 +817,10 @@ tconName n = cvtName OccName.tcClsName n cvtName :: OccName.NameSpace -> TH.Name -> CvtM RdrName cvtName ctxt_ns (TH.Name occ flavour) | not (okOcc ctxt_ns occ_str) = failWith (badOcc ctxt_ns occ_str) - | otherwise = force (thRdrName ctxt_ns occ_str flavour) + | otherwise = force rdr_name >> return rdr_name where occ_str = TH.occString occ + rdr_name = thRdrName ctxt_ns occ_str flavour okOcc :: OccName.NameSpace -> String -> Bool okOcc _ [] = False