X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Ftypecheck%2FTcClassDcl.lhs;h=2e7603b87c8b41ccddd0b555c0d26416d442030a;hb=19b44dcc5e5b9f92735fa99aa45dfaa94777177c;hp=7f6627359bc705ff350e5cd195ea5b1798a5a8af;hpb=17b297d97d327620ed6bfab942f8992b2446f1bf;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs index 7f66273..2e7603b 100644 --- a/compiler/typecheck/TcClassDcl.lhs +++ b/compiler/typecheck/TcClassDcl.lhs @@ -6,11 +6,11 @@ Typechecking class declarations \begin{code} -{-# OPTIONS_GHC -w #-} +{-# 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/WorkingConventions#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module TcClassDcl ( tcClassSigs, tcClassDecl2, @@ -60,6 +60,8 @@ import List import BasicTypes import Bag import FastString + +import Control.Monad \end{code} @@ -552,7 +554,7 @@ isInstDecl (SigOrigin (ClsSkol _)) = False -- The renamer just puts the selector ID as the binder in the method binding -- but we must use the method name; so we substitute it here. Crude but simple. find_bind sel_name meth_name binds - = foldlBag seqMaybe Nothing (mapBag f binds) + = foldlBag mplus Nothing (mapBag f binds) where f (L loc1 bind@(FunBind { fun_id = L loc2 op_name })) | op_name == sel_name = Just (L loc1 (bind { fun_id = L loc2 meth_name }))