Overlapping and incoherent instances
Krzysztof Skrzętnicki
gtener at gmail.com
Tue Jul 29 10:59:20 UTC 2014
I think it may also lead to cleaner code. I would rather write a single
section like this:
#if NEW_GHC
{-# bunch of OVERLAPPABLE declarations #-}
#endif
at the start of the file rather than have to insert a lot of CPP-guarded
pragmas later. But it may be seen as an editor/IDE issue and bikeshedding
on the whole.
--
Krzysztof
On Tue, Jul 29, 2014 at 12:48 PM, Johan Tibell <johan.tibell at gmail.com>
wrote:
> On Tue, Jul 29, 2014 at 12:37 PM, Daniel Trstenjak
> <daniel.trstenjak at gmail.com> wrote:
> >
> > On Tue, Jul 29, 2014 at 12:02:19PM +0200, Johan Tibell wrote:
> >> What's the rationale to not require
> >>
> >> {-# OVERLAPPING Show [Char] #-}
> >>
> >> here? Perhaps it's too annoying to have to repeat the types?
> >
> > This one might be written at the top of the file, so it would be easier
> > to overlook it, than having it directly at the instance declaration,
> > which seems to be one of the major points for OVERLAPPING and
> OVERLAPPABLE.
>
> The same could be said for e.g. INLINE. The extra flexibility is nice
> to have (e.g. because you can opt to put the pragma after the
> declaration, to de-emphasize it.)
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20140729/56c718a5/attachment-0001.html>
More information about the Glasgow-haskell-users
mailing list