[Haskell-cafe] Promoting associated data types
eir at cis.upenn.edu
Mon Jun 29 11:44:22 UTC 2015
On Jun 28, 2015, at 7:11 PM, Kosyrev Serge <_deepfire at feelingofgreen.ru> wrote:
> Sadly, even this doesn't fly, because:
>> The first argument of a tuple should have kind '*', but 'a' has kind 'CatName'.
> ..which doesn't really change even if I replace the tuple with a product type
> within the CatEntry itself.
> Basically GHC refuses to constrain the kind of constructor argument types
> beyond the granularity provided by '*'.
> And so I wonder if this is one restriction among those that you aim to remove.. : -)
No -- this restriction leads to the best definition for tuples, in my opinion. Instead, you probably want a promoted tuple: put a ' before the open-parenthesis, and see if that works for you.
More information about the Haskell-Cafe