Re: [Haskell-cafe] Coercing numeric and string constants

2009-11-16 Thread Lennart Augustsson
Try with -XExtendedDefaulingRules. On Mon, Nov 16, 2009 at 6:33 AM, Mark Lentczner ma...@glyphic.com wrote: I'm looking for a good way to handle a library interface that accepts both strings and numbers in particular argument positions: Start with the following definitions. I've defined

[Haskell-cafe] Coercing numeric and string constants

2009-11-15 Thread Mark Lentczner
I'm looking for a good way to handle a library interface that accepts both strings and numbers in particular argument positions: Start with the following definitions. I've defined ResourceTree as a class here since the details don't matter. data Segment = Key String | Index Int deriving