Changes between Version 56 and Version 57 of SafeHaskell


Ignore:
Timestamp:
Jul 22, 2011 12:04:49 AM (4 years ago)
Author:
dterei
Comment:

Add note on how Data.Typeable is handled

Legend:

Unmodified
Added
Removed
Modified
  • SafeHaskell

    v56 v57  
    197197 
    198198    * '''Disallowed completely''': `GeneralizedNewtypeDeriving`, `TemplateHaskell` 
    199     * '''Restricted functionality''': `OverlappingInstances`, `ForeignFunctionInterface`, {{{RULES}}} 
     199    * '''Restricted functionality''': `OverlappingInstances`, `ForeignFunctionInterface`, {{{RULES}}}, `Data.Typeable` 
    200200      * See [#RestrictedandDisabledGHCHaskellFeatures Restricted Features below] 
    201201    * '''Doesn't Matter''': all remaining flags. 
     
    210210 
    211211 * {{{OverlappingInstances}}}: This extension can be used to violate semantic consistency, because malicious code could redefine a type instance (by containing a more specific instance definition) in a way that changes the behaviour of code importing the untrusted module. The extension is not disabled for a module M compiled with `-XSafe` but restricted. While M can defined overlapping instance declarations, they can only be used in M. If in a module N that imports M, at a call site that uses a type-class function there is a choice of which instance to use (i.e overlapping) and the most specific choice is from M (or any other Safe compiled module), then compilation will fail. It is irrelevant if module N is considered Safe, or Trustworthy or neither. 
     212 
     213 * {{{Data.Typeable}}}: We allow instances of `Data.Typeable` to be derived but we don't allow hand crafted instances. Derived instances are machine generated by GHC and should be perfectly safe but hand crafted ones can lie about their type and allow unsafe coercions between types. This is in the spirit of the original design of SYB. 
    212214 
    213215In the Safe language dialect we disable completely the following Haskell language features: