What is the purpose for XNoImplicitPrelude?

Ghci on acid identifies c . gchi

:set -XNoImplicitPrelude 

What are the potential benefits / reasons that may arise for this?

+5
source share
1 answer

There is no other way to completely avoid importing Prelude. Even seemingly effective

 import Prelude () 

which is an explicit import (therefore, overrides implicit) and does not define names, nevertheless puts a bunch of class instances in scope, which may be undesirable.

Preventing standard foreplay is completely useful when you want to play with alternative foreplay; or when you want to overload the syntax with other GHC extensions; or in other niche situations. Avoiding foreplay can also be useful if you plan to use many functions that are called the same as those specified in the prelude and would like to avoid qualifying them everywhere (although in many such situations a smaller number of import Prelude () would be sufficient) .

+12
source

Source: https://habr.com/ru/post/1208484/


All Articles