Rename `Representable0` to `Generic`.
[ghc-hetmet.git] / compiler / main / DynFlags.hs
index 3a10e02..ea10993 100644 (file)
@@ -342,7 +342,7 @@ data ExtensionFlag
    | Opt_DeriveFunctor
    | Opt_DeriveTraversable
    | Opt_DeriveFoldable
-   | Opt_DeriveRepresentable            -- Allow deriving Representable0/1
+   | Opt_DeriveGeneric            -- Allow deriving Generic/1
    | Opt_DefaultSignatures              -- Allow extra signatures for defmeths
    | Opt_Generics                       -- Generic deriving mechanism
 
@@ -1105,12 +1105,13 @@ parseDynamicFlags_ dflags0 args pkg_flags = do
   when (not (null errs)) $ ghcError $ errorsToGhcException errs
 
   let (pic_warns, dflags2)
-        | not (cTargetArch == X86_64 && cTargetOS == Linux) &&
+        | not (cTargetArch == X86_64 && (cTargetOS == Linux || cTargetOS == OSX)) &&
           (not opt_Static || opt_PIC) &&
           hscTarget dflags1 == HscLlvm
-        = ([L noSrcSpan $ "Warning: -fllvm is incompatible with -fPIC and -"
-                       ++ "dynamic on this platform;\n"
-                       ++ "         using " ++ showHscTargetFlag defaultObjectTarget ++ " instead"],
+        = ([L noSrcSpan $ "Warning: -fllvm is incompatible with -fPIC and "
+                       ++ "-dynamic on this platform;\n"
+                       ++ "         using "
+                       ++ showHscTargetFlag defaultObjectTarget ++ " instead"],
                 dflags1{ hscTarget = defaultObjectTarget })
         | otherwise = ([], dflags1)
 
@@ -1681,7 +1682,7 @@ xFlags = [
   ( "DeriveFunctor",                    Opt_DeriveFunctor, nop ),
   ( "DeriveTraversable",                Opt_DeriveTraversable, nop ),
   ( "DeriveFoldable",                   Opt_DeriveFoldable, nop ),
-  ( "DeriveRepresentable",              Opt_DeriveRepresentable, nop ),
+  ( "DeriveGeneric",                    Opt_DeriveGeneric, nop ),
   ( "DefaultSignatures",                Opt_DefaultSignatures, nop ),
   ( "TypeSynonymInstances",             Opt_TypeSynonymInstances, nop ),
   ( "FlexibleContexts",                 Opt_FlexibleContexts, nop ),
@@ -1750,7 +1751,7 @@ impliedFlags
     , (Opt_ParallelArrays, turnOn, Opt_ParallelListComp)
     -- The new behavior of the XGenerics flag is just to turn on these two flags
     , (Opt_Generics, turnOn, Opt_DefaultSignatures)
-    , (Opt_Generics, turnOn, Opt_DeriveRepresentable)
+    , (Opt_Generics, turnOn, Opt_DeriveGeneric)
   ]
 
 optLevelFlags :: [([Int], DynFlag)]
@@ -1866,7 +1867,7 @@ glasgowExtsFlags = [
            , Opt_DeriveFunctor
            , Opt_DeriveFoldable
            , Opt_DeriveTraversable
-           , Opt_DeriveRepresentable
+           , Opt_DeriveGeneric
            , Opt_FlexibleContexts
            , Opt_FlexibleInstances
            , Opt_ConstrainedClassMethods