X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FdeSugar%2FDsMonad.lhs;h=7af07557ed403d834882ee543b77d1b5db2434ab;hb=16dc208aaad7aadaea970e47b8055d7d7f8781e5;hp=577a0d822ddf15497ec2801bc269af572c97fb43;hpb=367b0590cc0d8ba3d1561c85b366a183b8a71d24;p=ghc-hetmet.git diff --git a/compiler/deSugar/DsMonad.lhs b/compiler/deSugar/DsMonad.lhs index 577a0d8..7af0755 100644 --- a/compiler/deSugar/DsMonad.lhs +++ b/compiler/deSugar/DsMonad.lhs @@ -6,6 +6,13 @@ @DsMonad@: monadery used in desugaring \begin{code} +{-# 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 DsMonad ( DsM, mappM, mapAndUnzipM, initDs, initDsTc, returnDs, thenDs, listDs, fixDs, mapAndUnzipDs, @@ -20,6 +27,7 @@ module DsMonad ( UniqSupply, newUniqueSupply, getDOptsDs, getGhcModeDs, doptDs, dsLookupGlobal, dsLookupGlobalId, dsLookupTyCon, dsLookupDataCon, + dsLookupClass, DsMetaEnv, DsMetaVal(..), dsLookupMetaEnv, dsExtendMetaEnv, @@ -43,6 +51,7 @@ import HscTypes import Bag import DataCon import TyCon +import Class import Id import Module import Var @@ -55,8 +64,6 @@ import NameEnv import OccName import DynFlags import ErrUtils -import Bag -import OccName import Data.IORef @@ -316,6 +323,11 @@ dsLookupDataCon :: Name -> DsM DataCon dsLookupDataCon name = dsLookupGlobal name `thenDs` \ thing -> returnDs (tyThingDataCon thing) + +dsLookupClass :: Name -> DsM Class +dsLookupClass name + = dsLookupGlobal name `thenDs` \ thing -> + returnDs (tyThingClass thing) \end{code} \begin{code}