GHC rewrite rules for class operations & laws

Ben Gamari ben at
Thu Dec 29 14:50:00 UTC 2016

On December 28, 2016 7:27:20 PM EST, Conal Elliott <conal at> wrote:
>Hi, George. Yes, please do add a task, hopefully to serve as a
>anchor until the issues and path forward are clearer. From my
>class methods are among the most natural and useful candidates for
>rules, since they tend to have associated laws, many (but not all) of
>are helpful in optimization. The alternative I know (and am using) is
>fairly inconvenient: replicating entire APIs just in order to delay
>inlining long enough to apply rules.
Indeed, we could eliminate several hundred lines of boilerplate in GHC if we could lift this restriction. 


- Ben 

More information about the Glasgow-haskell-users mailing list