|
|
|
# Class Method Types
|
|
|
|
|
|
|
|
**[Ticket(s)](/search?q="ClassMethodTypes"&ticket=on)**
|
|
|
|
## Brief Explanation
|
|
|
|
|
|
|
|
|
|
|
|
In [ Haskell 98, s4.3.1](http://www.haskell.org/onlinereport/decls.html#class-decls), the signatures of methods in a class may contain constraints, but these constraints must not mention the argument of the type class. The following is illegal:
|
| ... | ... | @@ -16,3 +16,8 @@ The motivation was perhaps that without such constraints, class dictionaries cou |
|
|
|
|
|
|
|
However this restriction is not implemented by Hugs, following a suggestion of Mark Jones in
|
|
|
|
[ Typing Haskell in Haskell](http://www.cse.ogi.edu/~mpj/thih/), and can be turned off in GHC with `-fglasgow-exts`.
|
|
|
|
|
|
|
|
## Tickets
|
|
|
|
|
|
|
|
<table><tr><th>[\#17](https://gitlab.haskell.org//haskell/prime/issues/17)</th>
|
|
|
|
<td>relax restriction on signatures of class methods</td></tr></table> |
|
|
\ No newline at end of file |