[Haskell-cafe] Announcement: Data.ISO3166_CountryCodes version 0.1

John Millikin jmillikin at gmail.com
Sat Apr 24 19:56:22 EDT 2010


Thanks for the library! I'm sure it will be very useful for people
dealing with internationalized applications / libraries. I have a few
suggestions, which might make your library easier to use and maintain.

First, it's very common to include generated files in the tarball.
This allows users to install the package, without installing 3rd-party
utilities, or downloading (possibly varying) versions from external
websites. As your library is currently written, two users who install
it might end up with dramatically different modules, depending on the
contents of < http://www.iso.org/iso/iso3166_en_code_lists.txt >.

Second, since the module is based on an external data set, a
date-based version might more appropriate. "Version 0.1" means
nothing, but "version 2010.4.24" indicates when the given version was
generated. Alternatively, you can use a hybrid system to indicate both
stability and the date -- such as 0.1.20100424.

Third, if you'd like your module to be widely used in the Haskell
community, the BSD3 or MIT license would be more appropriate. For
technical reasons, the GPL and LGPL are essentially equivalent for
Haskell packages. For political reasons, choosing the GPL will reduce
your user market to free-software users. This isn't *necessarily* bad
-- all of my large projects are GPL'd -- but be aware that your choice
will heavily limit how many people use your library.

Fourth, consider storing your code in a version control system (like
Darcs[1]), and publishing it on a website like Patch-Tag[2]. This
enables people to contribute patches more easily. I've already checked
it in as a branch[3] -- either branch mine, or create your own trunk.

Finally, instead of using a Makefile to build the library or
documentation, consider using the cabal-install utility[4]. It's much
more common for a library to use "cabal build" or "cabal haddock" than
custom make commands, and external tools (such as Hackage) will work
better.

Excepting the licensing change (which is your decision), all of these
suggestions are implemented/published in my Darcs branch. If you opt
to change the license, you may use any license you want for the code
I've added / modified.

[1] http://darcs.net/
[2] http://patch-tag.com/
[3] http://patch-tag.com/r/jmillikin/iso3166-country-codes/home
[4] http://hackage.haskell.org/package/cabal-install

On Sat, Apr 24, 2010 at 09:19, Jon Fairbairn <jon.fairbairn at cl.cam.ac.uk> wrote:
> Just uploaded to hackage.
>
> Package providing datatype generated from the ISO3166 country code
> list.
>
> This was originally part of my Typeful HTMLs stuff, but I
> thought it deserved a wider audience. I think anything that uses
> country codes should use this datatype!
>
>
> As this is my first attempt at using cabal and uploading to
> hackage, expect errors and omissions.
>
> In particular, as I didn't want it to depend on template
> haskell, the build process generates the module's source file,
> which means that that file shouldn't be in the tarball. Cabal
> complains that it's missing if it's not there, so I created an
> empty .hsc file to shut it up. I'm sure this is not the right
> way, so I'd be glad to hear what is.
>
> --
> Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk
> http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html  (updated 2009-01-31)
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list