[Haskell-cafe] Partially applied type synonyms
anthony.d.clayden at gmail.com
Fri Oct 8 03:33:07 UTC 2021
> I was surprised to find the below code doesn't typecheck even with
-XLiberalTypeSynonyms. Am I missing something or is this really not
Reading the error message would help:
* The type synonym `Foo' should have 2 arguments, but has been given 1
-XLiberalTypeSynonyms relaxes the 'saturated application' rule a little
"You can apply a type synonym to a partially applied type synonym:"
But that isn't what you're doing. The docs say that still
" ... malformedness ... * Partially-applied type synonym."
Type Synonyms are not functions. Think of them as 'macro' expansions.
Possibly your `Bar` could be a type synonym, taking `(Foo Maybe)` as an
argument in the `instance Eq`. What type is it exactly that you want to
derive an instance for?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe