output functions for HaskellModule

Unlike HaskellSource, HaskellModule is exported as an opaque datatype
because it would be too easy to accidentally break the invariant that
the extension and import lists match the source.