[Haskell-cafe] Obscure instances for Obscure types

2007-04-26 Thread Neil Mitchell
Hi I currently maintain two libraries, TagSoup which defines the Tag data type, and BinaryDefer, which defines the BinaryDefer class. If I wanted to include an instance for BinaryDefer Tag, where would I put it? Putting it in either library introduces an artificial dependency on the other.

Re: [Haskell-cafe] Obscure instances for Obscure types

2007-04-26 Thread Nicolas Frisby
I've had a similar question, which I think boiled down to a compilation issue. Consider packages A and B that can be defined independently. But, just as Neil pointed out, perhaps A and B could also interact beyond their basic definition. My naive idea is that A would compile the simple

Re: [Haskell-cafe] Obscure instances for Obscure types

2007-04-26 Thread Dan Weston
Taking a lesson from relational databases, I'd put it in 5-normal form: a separate module importing its two dependencies. Don't forget the 2nd law of thermodynamics: no 4-line file will stay 4 lines long after repeated code iterations. You might as well plan for the inevitable. If it's too

Re: [Haskell-cafe] Obscure instances for Obscure types

2007-04-26 Thread Neil Mitchell
Hi Dan, Don't forget the 2nd law of thermodynamics: no 4-line file will stay 4 lines long after repeated code iterations. You might as well plan for the inevitable. If this library is for the extra interactions available when using a libary with 2 classes (thats all BinaryDefer is likely to

Re: [Haskell-cafe] Obscure instances for Obscure types

2007-04-26 Thread Robin Green
On Fri, 27 Apr 2007 00:40:33 +0100 Neil Mitchell [EMAIL PROTECTED] wrote: If it's too annoying to wait for that inevitability, try commenting the hell out of it until it has a respectable number of lines. Comments are for people who can't sense what their code does from the indentation