PUBLIC
PUBLIC
Indeed, I am using 9.0.1. I’ll try upgrading. Thanks!
From: Simon Peyton Jones <simonpj@microsoft.com>
Sent: Wednesday, October 6, 2021 6:12 PM
To: Erdi, Gergo <Gergo.Erdi@sc.com>
Cc: Montelatici, Raphael Laurent <Raphael.Montelatici@sc.com>; GHC <ghc-devs@haskell.org>
Subject: [External] RE: Specialisation doesn't kick in (RE: Instantiation of overloaded definition *in Core*)
Grego,
Yes I think that should auto-specialise.
Which version of GHC are you using? Do you have this patch?
commit ef0135934fe32da5b5bb730dbce74262e23e72e8
Author: Simon Peyton Jones
simonpj@microsoft.com
Date: Thu Apr 8 22:42:31 2021 +0100
Make the specialiser handle polymorphic specialisation
Here’s why I ask. The call
$fMonadIO_$c>> = \ (@a) (@b) -> $dm>> @IO $fMonadIO @a @b
indeed applies $dm>> to $fMonadIO, but it also applies it to a and b. In the version of GHC you have, maybe that stops the call from floating up to the definition site, and being used to specialise it.
Can you make a repro case without your plugin?
Simon
PS: I am leaving Microsoft at the end of November 2021, at which point
simonpj@microsoft.com will cease to work. Use
simon.peytonjones@gmail.com instead. (For now, it just forwards to
simonpj@microsoft.com.)