[Haskell-cafe] Possible extension to Haskell overloading behavior

Chris Smith cdsmith at gmail.com
Wed Jul 10 01:09:20 CEST 2013


This is working now.  Trying to use -XRebindableSyntax with
-XImplicitPrelude seems to not work (Prelude is still not loaded) when the
exposed Prelude is from base, but it works fine when the Prelude is from a
different package.  Counterintuitive, but it does everything I need it to.
Thanks for the suggestion!
On Jul 9, 2013 4:20 PM, "Aleksey Khudyakov" <alexey.skladnoy at gmail.com>
wrote:

> On 10.07.2013 01:13, Chris Smith wrote:
>
>> Ugh... I take back the never mind.  So if I replace Prelude with an
>> alternate definition, but don't use RebindableSyntax, and then hide
>> the base package, GHC still uses fromInteger and such from base even
>> though it should be inaccessible.  But if I do use RebindableSyntax,
>> then the end-user has to add 'import Prelude' to the top of their
>> code.  Am I missing something?
>>
>>  If base is hidden GHCi refuses to start becaus it can't import Prelude
> (with -XNoImplicitPrelude it starts just fine).
>
> According to documentation GHC will use whatever fromInteger is in scope.
> But I never used extension in such way.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130709/12eda294/attachment.htm>


More information about the Haskell-Cafe mailing list