ekmett / reducers

Semigroups, specialized containers and a general map/reduce framework
http://hackage.haskell.org/package/reducers
Other
46 stars 11 forks source link

SPECIALIZE pragmas #2

Closed dmwit closed 13 years ago

dmwit commented 13 years ago

Apparently, in GHC 7.3 (and possibly in earlier versions -- I didn't investigate), putting a SPECIALIZE pragma inside a class definition block attempts to specialize the default implementation (only). This is a bit nonsense if there's no default implementation. So here's a patch that lifts the pragmas out of the class definition block to the top-level.