@DsMonad@: monadery used in desugaring
\begin{code}
+{-# OPTIONS_GHC -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/WorkingConventions#Warnings
+-- for details
+
module DsMonad (
DsM, mappM, mapAndUnzipM,
initDs, initDsTc, returnDs, thenDs, listDs, fixDs, mapAndUnzipDs,
UniqSupply, newUniqueSupply,
getDOptsDs, getGhcModeDs, doptDs,
dsLookupGlobal, dsLookupGlobalId, dsLookupTyCon, dsLookupDataCon,
+ dsLookupClass,
DsMetaEnv, DsMetaVal(..), dsLookupMetaEnv, dsExtendMetaEnv,
import Bag
import DataCon
import TyCon
+import Class
import Id
import Module
import Var
import OccName
import DynFlags
import ErrUtils
-import Bag
-import OccName
import Data.IORef
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}