Disabling the prelude
- In Haskell source files
- In GHCi
There are some reasons you might not want the entire contents of the prelude to be implicitly present everywhere:
- If you are a learner and you want to reimplement parts of
basefor exercise, and you need to avoid creating name clashes with the things that are already defined in
- If you are an opinionated expert and you dislike many of the things in
- If you are using the
RebindableSyntaxextension, which automatically disables the implicit prelude.
In this article, we discuss how to use either
NoImplicitPrelude or an
import statement to remove the prelude from scope.