[Haskell-cafe] Obscure instances for Obscure types
ndmitchell at gmail.com
Thu Apr 26 19:40:33 EDT 2007
> 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 ever have)
and 1 data structure (thats all TagSoup is likely to ever have) I get
2 possible instances - and not a lot of scope for growth.
> 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 :-) That and Haddock doesn't let you comment instances in
any way that shows up, so all my beautiful comments would be lost.
> Neil Mitchell wrote:
> > 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. Putting it in a separate libary makes the library about 4
> > lines long and is just annoying. Putting it in the individual
> > application(s) is exactly what libraries were designed to avoid.
> > Is there a solution?
> > Thanks
> > Neil
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe