import {-# SOURCE #-} DsExpr ( dsExpr, dsLet )
-import HsSyn ( Stmt(..), HsExpr )
-import TcHsSyn ( TypecheckedStmt, TypecheckedHsExpr )
+import HsSyn ( Stmt(..) )
+import TcHsSyn ( TypecheckedStmt )
import DsHsSyn ( outPatType )
import CoreSyn
import CmdLineOpts ( opt_FoldrBuildOn )
import CoreUtils ( exprType, mkIfThenElse )
import Id ( idType )
-import Var ( Id, TyVar )
-import Type ( mkTyVarTy, mkForAllTy, mkFunTys, mkFunTy, Type )
-import TysPrim ( alphaTyVar, alphaTy )
-import TysWiredIn ( nilDataCon, consDataCon, listTyCon )
+import Var ( Id )
+import Type ( mkTyVarTy, mkFunTys, mkFunTy, Type )
+import TysPrim ( alphaTyVar )
+import TysWiredIn ( nilDataCon, consDataCon )
import Match ( matchSimply )
-import Unique ( foldrIdKey, buildIdKey )
-import Outputable
+import PrelNames ( foldrName, buildName )
\end{code}
List comprehensions may be desugared in one of two ways: ``ordinary''
dfListComp c n quals `thenDs` \ result ->
- dsLookupGlobalValue buildIdKey `thenDs` \ build_id ->
+ dsLookupGlobalValue buildName `thenDs` \ build_id ->
returnDs (Var build_id `App` Type elt_ty
`App` mkLams [n_tyvar, c, n] result)
\end{code}
matchSimply (Var x) ListCompMatch pat core_rest (Var b) `thenDs` \ core_expr ->
-- now build the outermost foldr, and return
- dsLookupGlobalValue foldrIdKey `thenDs` \ foldr_id ->
+ dsLookupGlobalValue foldrName `thenDs` \ foldr_id ->
returnDs (
Var foldr_id `App` Type x_ty
`App` Type b_ty