[Haskell-cafe] {-# SPECIALIZE foo @Bar #-} ?

Ganesh Sittampalam ganesh at earth.li
Mon Jul 8 13:49:49 UTC 2019


On 08/07/2019 10:50, Johannes Waldmann wrote:

> with pragma SPECIALIZE,
> I find it tedious to repeat the type declaration.
> (It's a burden for maintenance and readability.)
> 
> 
> Could we use type-application syntax instead?

There's an inactive GHC proposal for this:

https://github.com/ghc-proposals/ghc-proposals/pull/15

Also a bit of discussion on this StackOverflow question:

https://stackoverflow.com/questions/39379531/how-do-i-specialise-with-an-explicit-type-application

Cheers,

Ganesh


More information about the Haskell-Cafe mailing list