[Haskell-beginners] How to structure a "speaking" fuzzy clock?

Kamil Stachowski kamil.stachowski at gmail.com
Sun Jan 16 15:16:46 CET 2011


Hello,

I am writing a program, the main purpose of which is to print fuzzy time in
a casual manner, e.g. "ten to eleven" rather than "10:52". Considering my
(lack of) programming experience, I got pretty far with it with the help of
D. Fischer and B. Yorgey; you can take a look at the results at
https://github.com/caminoix/fuzzytime.

However, I also have another purpose, and that is to better learn Haskell. I
can't help the feeling that my solution might perhaps work, but is
nevertheless ugly, naive or just un-Haskell.

Therefore, I would like to ask you how you would structure such a program.
I'm not asking for an implementation, just a general idea, such as "a
datatype to keep the fuzzy time, deriving Show with a set of separate
functions for different languages".

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110116/4ee8960b/attachment.htm>


More information about the Beginners mailing list