Haskell implementation of a simply-linked list