Changes between Version 22 and Version 23 of Commentary/Packages/GhcPackagesProposal


Ignore:
Timestamp:
Jul 6, 2006 10:35:24 PM (8 years ago)
Author:
brianh@…
Comment:

added suggestion to get rid of "from" keyword

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Packages/GhcPackagesProposal

    v22 v23  
    146146    import from "foo" M( x, y ) 
    147147}}} 
    148 Here the layout is explicit, but perhaps the layout rule could apply. 
     148Here the layout is explicit, but the braces and semicolons could be avoided by making use of the layout rule as usual. 
    149149 
    150150Indeed, we could allow this multiple form even for ordinary imports: 
     
    153153}}} 
    154154 
     155It is clear from the above examples that they keyword {{{from}}} is redundant - the presence of a string literal after the keyword {{{import}}} is sufficient to distinguish per-package imports from the ordinary shared-namespace imports, so the above could instead be written as 
     156{{{ 
     157    import "base" 
     158        Prelude hiding (length) 
     159        Control.Exception 
     160        qualified Data.List as List 
     161    import "foo" M( x, y ) 
     162 
     163    import 
     164           A(f) 
     165           B(g) 
     166           C(S,T) 
     167}}} 
     168 
     169