|
Re: no non-typevariable in instance declarations: msg#00055lang.haskell.general
Tue, 14 Nov 2000 16:17:48 -0200, José Romildo Malaquias <romildo@xxxxxxxxxxxxxxxxxx> pisze: > But this is not relevant to my question. Removing the instance > declaration > > instance C Integer where > ty _ = "Integer" > > from the program (so that there is no instance overlapping now) > does not help. In this case your instance would be the only one possible (any other would overlap) and it could be equally well written as a plain function. Actually Haskell 98 has more severe restriction than non-overlapping instances. The instance head must be a type constructor applied to as many distinct type variables as needed to let the kinds match. "instance Foo [Int]" is as non-standard as "instance Foo a". -- __("< Marcin Kowalczyk * qrczak@xxxxxxxxxx http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Haskell T-Shirt Contest: 00055, John Peterson |
|---|---|
| Next by Date: | Re: no non-typevariable in instance declarations: 00055, Jeffrey R. Lewis |
| Previous by Thread: | Re: no non-typevariable in instance declarationsi: 00055, José Romildo Malaquias |
| Next by Thread: | Re: no non-typevariable in instance declarations: 00055, José Romildo Malaquias |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |