Changes between Version 18 and Version 19 of SafeHaskell


Ignore:
Timestamp:
Jan 14, 2011 10:16:58 AM (3 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SafeHaskell

    v18 v19  
    4141== Module trust == 
    4242 
     43--------------- 
     44'''SLPJ comment.'''  This section seems over-complicated.  For one thing it appears to define two terms: "trustable" and "trusted", and I can't tell if they are the same or not.  Second, the definitions seem over complicated. MOreover it mixes specification and implementation. Here's an alternative attempt: 
     45 
     46 * A module is '''trusted''' iff it was compiled with `-XSafe` or `-XTrustworthy`. 
     47 * A '''trusted package''' is one that is declared trusted by command-line flags (using the rules you give below).  But a module in an untrusted package can still be a trusted module (see above). 
     48 * A '''safe import declaration''' is one that  
     49   * Imports a '''trusted module''' module, or 
     50   * Imports a module from a '''trusted package''' 
     51 * In a module compiled with `-XSafe`, you may use only '''safe import declarations''' 
     52 * In module compiled with `-XTrustworthy`, any import declaration marked "`safe`" must be a '''safe import declaration'''. 
     53 
     54'''End of SLPJ comment''' 
     55------------------- 
     56 
    4357Recall that a safe import of a module M fails unless M is trusted.  M is trusted when two conditions hold: 
    4458