Changes between Version 9 and Version 10 of NoImplicitPreludeImport


Ignore:
Timestamp:
May 28, 2013 2:23:35 PM (2 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NoImplicitPreludeImport

    v9 v10  
    103103base package, but not put a `Prelude` module in any of the new packages.
    104104Code moving to the new split packages would then need to import other
    105 modules instead.
     105modules instead. It may make sense to keep some very common things, such
     106as the `Show` class (which is necessary whenever you want to define a
     107datatype deriving `Show`) in a module with a more generic name, such as
     108`Core` or `Base`. The name `Prelude` could also be used for this, but
     109another name may sound more natural.
     110
     111=== Desugaring ===
     112
     113Currently, various pieces of Haskell syntax are desugared into
     114expressions that reference entities in the `Prelude`. Note that it is
     115not required that the entities are in scope, e.g.
     116{{{
     117import Prelude (IO, return)
     118
     119main :: IO ()
     120main = do return ()
     121          return ()
     122}}}
     123is valid even though `(>>)` is not in scope.
     124
     125Therefore no change is necessary if the implicit import of Prelude
     126is dropped. If the module is also removed, then the report will have
     127to refer to the entities in other locations for its desugaring.
    106128
    107129=== Backwards compatibility ===