
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?
On Tue, Jul 9, 2013 at 1:51 PM, Chris Smith
Oh, never mind. In this case, I guess I don't need an extension at all!
On Tue, Jul 9, 2013 at 1:47 PM, Chris Smith
wrote: Oh, yes. That looks great! Also seems to work with OverloadedStrings in the natural way in GHC 7.6, although that isn't documented.
Now if only it didn't force NoImplicitPrelude, since I really want to -hide-package base and -package my-other-prelude. Even adding -XImplicitPrelude doesn't help.
On Tue, Jul 9, 2013 at 11:46 AM, Aleksey Khudyakov
wrote: On 08.07.2013 23:54, Chris Smith wrote:
So I've been thinking about something, and I'm curious whether anyone (in particular, people involved with GHC) think this is a worthwhile idea.
I'd like to implement an extension to GHC to offer a different behavior for literals with polymorphic types. The current behavior is something like:
Probably RebidableSyntax[1] could work for you. From description it allows to change meaning of literals.
[1] http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/syntax-extns.html#reb...
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe