id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,testcase,blockedby,blocking,related,differential
672,INLINE pragmas for default methods don't work,simonpj,simonpj,"This should work:
{{{
class C a where
f :: (a -> a) -> [a] -> [a]
{-# INLINE f #-}
f g xs = reverse (map g (reverse xs))
instance C Int
}}}
Now calling 'f' at Int should inline the code in the default method. Currently it doesn't, because we get
{{{
dmf a d g xs = ...
rec { dCInt = dmf Int dCInt }
}}}
and since dmf is applied to only one arg, but has arity 3, it isn't inlined, which is a bit silly.
If the class has more than one method, everythign works fine. (But I did fix a bug in {{{TcClassDecl}}} which prevented it working find in 6.4.)",bug,closed,normal,6.6,Compiler,6.4.1,fixed,,,Unknown/Multiple,Unknown/Multiple,,,,,,