Merge branch 'master' into type-nats
authorIavor S. Diatchki <diatchki@galois.com>
Mon, 20 Jun 2011 17:31:59 +0000 (10:31 -0700)
committerIavor S. Diatchki <diatchki@galois.com>
Mon, 20 Jun 2011 17:31:59 +0000 (10:31 -0700)
Conflicts:
compiler/main/DynFlags.hs
compiler/parser/Lexer.x

1  2 
compiler/iface/BinIface.hs
compiler/iface/IfaceSyn.lhs
compiler/iface/TcIface.lhs
compiler/main/DynFlags.hs
compiler/parser/Lexer.x
compiler/parser/Parser.y.pp
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcSMonad.lhs
compiler/typecheck/TcSplice.lhs

Simple merge
Simple merge
Simple merge
@@@ -1721,33 -1864,32 +1865,33 @@@ xFlags = 
      \ turn_on -> if not turn_on 
                   then deprecate "You can't turn off RelaxedPolyRec any more"
                   else return () ),
-   ( "ExtendedDefaultRules",             Opt_ExtendedDefaultRules, nop ),
-   ( "ImplicitParams",                   Opt_ImplicitParams, nop ),
-   ( "ScopedTypeVariables",              Opt_ScopedTypeVariables, nop ),
+   ( "ExtendedDefaultRules",             AlwaysAllowed, Opt_ExtendedDefaultRules, nop ),
+   ( "ImplicitParams",                   AlwaysAllowed, Opt_ImplicitParams, nop ),
+   ( "ScopedTypeVariables",              AlwaysAllowed, Opt_ScopedTypeVariables, nop ),
  
-   ( "PatternSignatures",                Opt_ScopedTypeVariables, 
+   ( "PatternSignatures",                AlwaysAllowed, Opt_ScopedTypeVariables, 
      deprecatedForExtension "ScopedTypeVariables" ),
  
-   ( "UnboxedTuples",                    Opt_UnboxedTuples, nop ),
-   ( "StandaloneDeriving",               Opt_StandaloneDeriving, nop ),
-   ( "DeriveDataTypeable",               Opt_DeriveDataTypeable, nop ),
-   ( "DeriveFunctor",                    Opt_DeriveFunctor, nop ),
-   ( "DeriveTraversable",                Opt_DeriveTraversable, nop ),
-   ( "DeriveFoldable",                   Opt_DeriveFoldable, nop ),
-   ( "DeriveGeneric",                    Opt_DeriveGeneric, nop ),
-   ( "DefaultSignatures",                Opt_DefaultSignatures, nop ),
-   ( "TypeSynonymInstances",             Opt_TypeSynonymInstances, nop ),
-   ( "FlexibleContexts",                 Opt_FlexibleContexts, nop ),
-   ( "FlexibleInstances",                Opt_FlexibleInstances, nop ),
-   ( "ConstrainedClassMethods",          Opt_ConstrainedClassMethods, nop ),
-   ( "MultiParamTypeClasses",            Opt_MultiParamTypeClasses, nop ),
-   ( "FunctionalDependencies",           Opt_FunctionalDependencies, nop ),
-   ( "GeneralizedNewtypeDeriving",       Opt_GeneralizedNewtypeDeriving, nop ),
-   ( "OverlappingInstances",             Opt_OverlappingInstances, nop ),
-   ( "UndecidableInstances",             Opt_UndecidableInstances, nop ),
-   ( "IncoherentInstances",              Opt_IncoherentInstances, nop ),
-   ( "PackageImports",                   Opt_PackageImports, nop ),
-   ( "TypeNaturals",                     Opt_TypeNaturals, nop)
+   ( "UnboxedTuples",                    AlwaysAllowed, Opt_UnboxedTuples, nop ),
+   ( "StandaloneDeriving",               AlwaysAllowed, Opt_StandaloneDeriving, nop ),
+   ( "DeriveDataTypeable",               AlwaysAllowed, Opt_DeriveDataTypeable, nop ),
+   ( "DeriveFunctor",                    AlwaysAllowed, Opt_DeriveFunctor, nop ),
+   ( "DeriveTraversable",                AlwaysAllowed, Opt_DeriveTraversable, nop ),
+   ( "DeriveFoldable",                   AlwaysAllowed, Opt_DeriveFoldable, nop ),
+   ( "DeriveGeneric",                    AlwaysAllowed, Opt_DeriveGeneric, nop ),
+   ( "DefaultSignatures",                AlwaysAllowed, Opt_DefaultSignatures, nop ),
+   ( "TypeSynonymInstances",             AlwaysAllowed, Opt_TypeSynonymInstances, nop ),
+   ( "FlexibleContexts",                 AlwaysAllowed, Opt_FlexibleContexts, nop ),
+   ( "FlexibleInstances",                AlwaysAllowed, Opt_FlexibleInstances, nop ),
+   ( "ConstrainedClassMethods",          AlwaysAllowed, Opt_ConstrainedClassMethods, nop ),
+   ( "MultiParamTypeClasses",            AlwaysAllowed, Opt_MultiParamTypeClasses, nop ),
+   ( "FunctionalDependencies",           AlwaysAllowed, Opt_FunctionalDependencies, nop ),
+   ( "GeneralizedNewtypeDeriving",       AlwaysAllowed, Opt_GeneralizedNewtypeDeriving, nop ),
+   ( "OverlappingInstances",        RestrictedFunction, Opt_OverlappingInstances, nop ),
+   ( "UndecidableInstances",             AlwaysAllowed, Opt_UndecidableInstances, nop ),
+   ( "IncoherentInstances",              AlwaysAllowed, Opt_IncoherentInstances, nop ),
 -  ( "PackageImports",                   AlwaysAllowed, Opt_PackageImports, nop )
++  ( "PackageImports",                   AlwaysAllowed, Opt_PackageImports, nop ),
++  ( "TypeNaturals",                     AlwaysAllowed, Opt_TypeNaturals, nop)
    ]
  
  defaultFlags :: [DynFlag]
@@@ -1807,8 -1807,8 +1807,10 @@@ relaxedLayoutBit :: In
  relaxedLayoutBit = 24
  nondecreasingIndentationBit :: Int
  nondecreasingIndentationBit = 25
- typeNaturalsBit = 26
+ safeHaskellBit :: Int
+ safeHaskellBit = 26
 +typeNaturalsBit :: Int
++typeNaturalsBit = 27
  
  always :: Int -> Bool
  always           _     = True
@@@ -1906,7 -1904,7 +1908,8 @@@ mkPState flags buf loc 
                 .|. alternativeLayoutRuleBit `setBitIf` xopt Opt_AlternativeLayoutRule flags
                 .|. relaxedLayoutBit  `setBitIf` xopt Opt_RelaxedLayout flags
                 .|. nondecreasingIndentationBit `setBitIf` xopt Opt_NondecreasingIndentation flags
+                .|. safeHaskellBit    `setBitIf` safeHaskellOn flags
 +               .|. typeNaturalsBit `setBitIf` xopt Opt_TypeNaturals flags
        --
        setBitIf :: Int -> Bool -> Int
        b `setBitIf` cond | cond      = bit b
Simple merge
Simple merge
Simple merge
Simple merge