mitchellwrosen / dohaskell

Tagged Haskell learning resources index
http://www.dohaskell.com
BSD 3-Clause "New" or "Revised" License
22 stars 6 forks source link

"Recently added" sort order for resources. #4

Closed duplode closed 9 years ago

duplode commented 9 years ago

A "recently added" sort order provides a cheap way of knowing what is new at dohaskell by combining it with the "list all" option. Note that I implemented this in the laziest way possible -- there is no reverse "earliest added" option, and the comparison is based on mere resource ids.

mitchellwrosen commented 9 years ago

Great! I haven't touched this code in over a year so it might take a bit before I can get everything pushed live (do I even have my EC2 key? ugh...).

I have one suggestion: can you go back to a full case-analysis of SortBy rather than using a catch-all? I'd rather have the duplicated RHS and the compiler error when another SortBy gets added.

duplode commented 9 years ago

can you go back to a full case-analysis of SortBy rather than using a catch-all?

Sure thing. I have amended the commit.