Re:Why do we need modules at all? (2011)
by chriswarbo on Sunday October 18, 2015 @05:55PM
(#10409961)
Modules serve a useful purpose in Haskell too, since they can hide "dangerous" functions, ie. ones which violate invariants (which can't/aren't enforced by types, for whatever reason) when called in particular ways. This is similar to private methods of a class.
Personally, I dislike hiding such functions completely, and usually expose them via a ".Inner" module (similar to Python exposing "private" things with _underscores)
Personally, I dislike hiding such functions completely, and usually expose them via a ".Inner" module (similar to Python exposing "private" things with _underscores)