Antoine Latter wrote:
As the error says, compiling with the flag '-XFlexibleInstances' will
make the message go away.
You can also add a language pragma to the top of your source file:
{-# LANGUAGE FlexibleInstances #-}
Antoine
When I enable that flag, I then also have to enable
On Wed, 2011-02-23 at 08:42 -0600, Kurt Stutsman wrote:
When I was reviewing the Haskell language specification on haskell.org,
it certainly looked like what I was doing was supported by the language.
I found some comments on GHC's site about the reasoning behind these
flags, but I couldn't
On Wednesday 23 February 2011 15:42:46, Kurt Stutsman wrote:
Antoine Latter wrote:
As the error says, compiling with the flag '-XFlexibleInstances' will
make the message go away.
You can also add a language pragma to the top of your source file:
{-# LANGUAGE FlexibleInstances #-}
Daniel Fischer wrote:
No, it's not. The language report says an instance head must have the form
(tyCon a1 ... an),
where tyCon is a type constructor and a1 ... an are *distinct* type
variables (appropriate in number so that the head has the correct kind).
In instance (Enum e) = Test e
On 23 February 2011 15:40, Kurt Stutsman kstuts...@gmail.com wrote:
instance Enum e = Serializable e where
get mask = {- convert mask to Int and then to a BitSet -}
put bitset = {- convert BitSet to Int and then to String -}
I looks like all you need is for objects to be enumerable, i.e
Hi,
On 02/23/2011 04:40 PM, Kurt Stutsman wrote:
[...]
Test is actually a kind of Serializable class. I don't want to
restrict it to only working with Enums, which is what your
OverlappingInstances seems to address. Is there a better way for doing
what I am trying to do?
Example:
import
Stephen Tetley wrote:
On 23 February 2011 15:40, Kurt Stutsman kstuts...@gmail.com wrote:
instance Enum e = Serializable e where
get mask = {- convert mask to Int and then to a BitSet -}
put bitset = {- convert BitSet to Int and then to String -}
I looks like all you need is for
From Kurt Stutsman kstuts...@gmail.com on Wed, February 23, 2011 9:40:09 AM
Daniel Fischer wrote:
No, it's not. The language report says an instance head must have the form
(tyCon a1 ... an),
where tyCon is a type constructor and a1 ... an are *distinct* type
variables
On 23 February 2011 13:10, Kurt Stutsman kstuts...@gmail.com wrote:
I am trying to create an instance of a class for data types deriving from
Enum. When I try to specify this through a context on the instance
definition, I get an error. When I do something similar with a function, it
seems to
Ivan Lazar Miljenovic wrote:
On 23 February 2011 13:10, Kurt Stutsman kstuts...@gmail.com wrote:
I am trying to create an instance of a class for data types deriving from
Enum. When I try to specify this through a context on the instance
definition, I get an error. When I do something
On Tue, Feb 22, 2011 at 8:37 PM, Kurt Stutsman kstuts...@gmail.com wrote:
Ivan Lazar Miljenovic wrote:
On 23 February 2011 13:10, Kurt Stutsman kstuts...@gmail.com wrote:
I am trying to create an instance of a class for data types deriving from
Enum. When I try to specify this through a
11 matches
Mail list logo