[project @ 2000-06-15 11:50:14 by simonmar]
authorsimonmar <unknown>
Thu, 15 Jun 2000 11:50:14 +0000 (11:50 +0000)
committersimonmar <unknown>
Thu, 15 Jun 2000 11:50:14 +0000 (11:50 +0000)
urk! the arity of a record selector Id didn't take into account any
dictionary arguments due to the context on the datatype...

(fixes bug on H/OpenGL reported by Sven)

ghc/compiler/basicTypes/MkId.lhs

index 3bf5e6f..2643dff 100644 (file)
@@ -409,7 +409,7 @@ mkRecordSelId tycon field_label unpack_id
                   mkFunTys dict_tys $  mkFunTy data_ty field_tau
       
     info = mkIdInfo (RecordSelId field_label)
-          `setArityInfo`       exactArity 1
+          `setArityInfo`       exactArity (1 + length dict_tys)
           `setUnfoldingInfo`   unfolding       
           `setCafInfo`         NoCafRefs
        -- ToDo: consider adding further IdInfo