[Haskell-cafe] Safe Haskell and instance coherence

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Thu Oct 11 15:30:41 CEST 2012

Hello Simon,

On Thu, Oct 11, 2012 at 11:24 AM, Simon Marlow <marlowsd at gmail.com> wrote:
> On 08/10/2012 20:11, Mikhail Glushenkov wrote:
>> I couldn't find anything on the interplay between orphan instances and
>> Safe Haskell both in the Haskell'12 paper and online. Is this
>> something that the authors of Safe Haskell are aware of/are intending
>> to fix?
> [...]
> I don't know what we should do about this.  Disallowing orphan instances
> seems a bit heavy-handed. David, Simon, any thoughts?

What about detecting duplicate instances at link time? We could put
information about all instances defined in a given module into the
.comment section of the corresponding .o file and then have a pre-link
step script extract this information from all .o files in the program
and check that there are no duplicate or conflicting instances.

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

More information about the Haskell-Cafe mailing list