Commit c06d51eb authored by simonpj's avatar simonpj
Browse files

[project @ 2000-10-31 10:04:41 by simonpj]

Error in TcDeriv
parent 7c068ace
...@@ -309,12 +309,13 @@ makeDerivEqns this_mod tycons ...@@ -309,12 +309,13 @@ makeDerivEqns this_mod tycons
= case chk_out clas tycon of = case chk_out clas tycon of
Just err -> addErrTc err `thenNF_Tc_` Just err -> addErrTc err `thenNF_Tc_`
returnNF_Tc Nothing returnNF_Tc Nothing
Nothing -> newDFunName this_mod clas tyvar_tys locn `thenNF_Tc` \ dfun_name -> Nothing -> newDFunName this_mod clas [ty] locn `thenNF_Tc` \ dfun_name ->
returnNF_Tc (Just (dfun_name, clas, tycon, tyvars, constraints)) returnNF_Tc (Just (dfun_name, clas, tycon, tyvars, constraints))
where where
clas_key = classKey clas clas_key = classKey clas
tyvars = tyConTyVars tycon -- ToDo: Do we need new tyvars ??? tyvars = tyConTyVars tycon
tyvar_tys = mkTyVarTys tyvars tyvar_tys = mkTyVarTys tyvars
ty = mkTyConApp tycon tyvar_tys
data_cons = tyConDataCons tycon data_cons = tyConDataCons tycon
locn = getSrcLoc tycon locn = getSrcLoc tycon
......
...@@ -46,7 +46,7 @@ import Module ( Module ) ...@@ -46,7 +46,7 @@ import Module ( Module )
import Name ( Name, isLocallyDefined, import Name ( Name, isLocallyDefined,
toRdrName, nameEnvElts, lookupNameEnv, toRdrName, nameEnvElts, lookupNameEnv,
) )
import TyCon ( tyConGenInfo, isClassTyCon ) import TyCon ( tyConGenInfo )
import Maybes ( thenMaybe ) import Maybes ( thenMaybe )
import Util import Util
import BasicTypes ( EP(..), Fixity ) import BasicTypes ( EP(..), Fixity )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment