[Haskell-beginners] How to design functions so they can be part of other larger systems?

Kim-Ee Yeoh ky3 at atamo.com
Mon Mar 25 01:01:47 CET 2013

On Mon, Mar 25, 2013 at 12:30 AM, Costello, Roger L. <costello at mitre.org> wrote:
> How do I design modules so that they may be part of other larger systems? Are there any articles that give guidelines on how to do this? What are your thoughts on how to do this?

For a rare piece of insight, you could start here:


There's also the following nugget here [1]:

"A language “is reusable” (to abuse language a bit) if code written in
that language can be easily reused.

This “obvious” statement is hiding something very important; namely,
reused how? For what? We are in an unfortunate situation in
programming: code is designed to be reused in a particular way, and if
you want to reuse it in a different way you are pretty much out of
luck. An OO widget library is designed for the addition of new types
of widgets, but if you want to reuse a program written in the library
on a new platform you are in for a lot of work. A functional drawing
library is designed so that you can transform and export your drawings
in an open-ended variety of ways, composing new ways out of old ones;
but if you need to draw a circle you have to build it out of lines,
even if there is a much better way to draw a circle on your target.
(This is essentially the expression problem)."

Many Haskellers take after Knuth: "I also must confess to a strong
bias against the fashion for reusable code. To me, “re-editable code”
is much, much better than an untouchable black box or toolkit."

Hence the proliferation of similar packages on Hackage.

[1] http://lukepalmer.wordpress.com/2011/09/15/my-paradigm-is-better-than-your-paradigm/

-- Kim-Ee

More information about the Beginners mailing list