On 19 July 2010 23:14, Thomas Schilling wrote:
> I would be interested in a case where it actually *is* a good idea to
> use such contexts.
If you don't have kind signatures, you can use them as a hack to
change the inferred kind for an EmptyDataDecl
"""
-- a has kind *
data Foo a
"""
"""
class
Christian Maeder schrieb:
> Ian Lynagh schrieb:
[...]
>> http://hackage.haskell.org/trac/haskell-prime/wiki/NoDatatypeContexts
>
> I'm for this proposal, although I've got an example where I need this
> context, namely for DrIFT to derive a proper context for instances.
>
> DrIFT doesn't know
Hello all,
> DrIFT cannot derive the Read (or our deserialization) instance without
> the "Ord symbol =>" context.
That's because DrIFT is simply copying this context to the Read instance,
right? Perhaps the best way to do it would be to copy the context of the
Read instance for Set and use that
José Pedro Magalhães schrieb:
> Hello all,
>
>> DrIFT cannot derive the Read (or our deserialization) instance without
>> the "Ord symbol =>" context.
>
> That's because DrIFT is simply copying this context to the Read
> instance, right? Perhaps the best way to do it would be to copy the
> contex
H98 and H2010 allow a context to be given for datatypes, e.g. the
"Eq a" in
data Eq a => Foo a = Constr a
I have made a proposal to remove support for that context (ticket
#139).
Although I would prefer that contexts of datatypes did the right and
useful thing, in the absence of a propo
On Tue, Jul 20, 2010 at 07:47:34PM +0100, Malcolm Wallace wrote:
> As Igloo notes, GADTs are a more viable way to achieve the storing of
> the dictionary within the constructor, e.g.
>
> data OrdTree a where
> Leaf :: a -> OrdTree a
> Branch :: Ord a => OrdTree a ->
On Tue, Jul 13, 2010 at 01:52:36PM +0100, Simon Marlow wrote:
>
> Yes, Ian Lynagh implemented your algorithm in GHC (with several tweaks
> to implement some of the darker corner cases, I believe). There's also
> -XAlternativeLayoutRuleTransitional but I'm not sure what that does.
It adds a co