dunai
: should Haskell's Prelude
be imported by default?
#352
ivanperez-keera
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This issue is an attempt at starting a discussion about whether we should import Haskell's
Prelude
by default.A lot of the issues that we've had over the years in terms of backwards compatibility have had to do with conditional imports of elements from the
Prelude
based on the version ofbase
/GHC we were working with. Given how Haskell's prelude changes, I would expect similar issues in the future.I've just ran a little experiment where I've disabled the
Prelude
, and use of CPP to select imports conditionally has been reduced to 1 place and could be completely eliminated. It builds correctly with all GHC versions (see build log here). Most modules do not import anything from the prelude, and the only ones I've left are those in which the imports would come otherwise from modules in theGHC.*
hierarchy, which IMO is not where they should be if those entities are defined in the Haskell report:The branch with that experimental work will be for now at:
https://github.com/ivanperez-keera/dunai/tree/develop-no-implicit-prelude
Beta Was this translation helpful? Give feedback.
All reactions