projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add OutsideIn flag
[ghc-hetmet.git]
/
compiler
/
main
/
DynFlags.hs
diff --git
a/compiler/main/DynFlags.hs
b/compiler/main/DynFlags.hs
index
2e7e1fe
..
01cc7af
100644
(file)
--- a/
compiler/main/DynFlags.hs
+++ b/
compiler/main/DynFlags.hs
@@
-61,7
+61,12
@@
module DynFlags (
-- * Compiler configuration suitable for display to the user
Printable(..),
-- * Compiler configuration suitable for display to the user
Printable(..),
- compilerInfo, rtsIsProfiled
+ compilerInfo
+#ifdef GHCI
+-- Only in stage 2 can we be sure that the RTS
+-- exposes the appropriate runtime boolean
+ , rtsIsProfiled
+#endif
) where
#include "HsVersions.h"
) where
#include "HsVersions.h"
@@
-309,7
+314,8
@@
data ExtensionFlag
| Opt_RecordPuns
| Opt_ViewPatterns
| Opt_GADTs
| Opt_RecordPuns
| Opt_ViewPatterns
| Opt_GADTs
- | Opt_RelaxedPolyRec
+ | Opt_OutsideIn
+ | Opt_RelaxedPolyRec -- Deprecated
| Opt_NPlusKPatterns
| Opt_DoAndIfThenElse
| Opt_NPlusKPatterns
| Opt_DoAndIfThenElse
@@
-596,7
+602,6
@@
defaultObjectTarget
data DynLibLoader
= Deployable
data DynLibLoader
= Deployable
- | Wrapped (Maybe String)
| SystemDependent
deriving Eq
| SystemDependent
deriving Eq
@@
-928,9
+933,6
@@
parseDynLibLoaderMode f d =
case splitAt 8 f of
("deploy", "") -> d{ dynLibLoader = Deployable }
("sysdep", "") -> d{ dynLibLoader = SystemDependent }
case splitAt 8 f of
("deploy", "") -> d{ dynLibLoader = Deployable }
("sysdep", "") -> d{ dynLibLoader = SystemDependent }
- ("wrapped", "") -> d{ dynLibLoader = Wrapped Nothing }
- ("wrapped:", "hard") -> d{ dynLibLoader = Wrapped Nothing }
- ("wrapped:", flex) -> d{ dynLibLoader = Wrapped (Just flex) }
_ -> ghcError (CmdLineError ("Unknown dynlib loader: " ++ f))
setDumpPrefixForce f d = d { dumpPrefixForce = f}
_ -> ghcError (CmdLineError ("Unknown dynlib loader: " ++ f))
setDumpPrefixForce f d = d { dumpPrefixForce = f}
@@
-1020,6
+1022,7
@@
optLevelFlags
, ([2], Opt_LiberateCase)
, ([2], Opt_SpecConstr)
, ([2], Opt_LiberateCase)
, ([2], Opt_SpecConstr)
+ , ([2], Opt_RegsGraph)
-- , ([2], Opt_StaticArgumentTransformation)
-- Max writes: I think it's probably best not to enable SAT with -O2 for the
-- , ([2], Opt_StaticArgumentTransformation)
-- Max writes: I think it's probably best not to enable SAT with -O2 for the
@@
-1749,14
+1752,14
@@
impliedFlags
, (Opt_ExistentialQuantification, Opt_ExplicitForAll)
, (Opt_PolymorphicComponents, Opt_ExplicitForAll)
, (Opt_ExistentialQuantification, Opt_ExplicitForAll)
, (Opt_PolymorphicComponents, Opt_ExplicitForAll)
- , (Opt_GADTs, Opt_RelaxedPolyRec) -- We want type-sig variables to
+ , (Opt_GADTs, Opt_OutsideIn) -- We want type-sig variables to
-- be completely rigid for GADTs
-- be completely rigid for GADTs
- , (Opt_TypeFamilies, Opt_RelaxedPolyRec) -- Trac #2944 gives a nice example
+ , (Opt_TypeFamilies, Opt_OutsideIn) -- Trac #2944 gives a nice example
, (Opt_TypeFamilies, Opt_KindSignatures) -- Type families use kind signatures
-- all over the place
, (Opt_TypeFamilies, Opt_KindSignatures) -- Type families use kind signatures
-- all over the place
- , (Opt_ScopedTypeVariables, Opt_RelaxedPolyRec) -- Ditto for scoped type variables; see
+ , (Opt_ScopedTypeVariables, Opt_OutsideIn) -- Ditto for scoped type variables; see
-- Note [Scoped tyvars] in TcBinds
, (Opt_ImpredicativeTypes, Opt_RankNTypes)
-- Note [Scoped tyvars] in TcBinds
, (Opt_ImpredicativeTypes, Opt_RankNTypes)
@@
-1810,12
+1813,13
@@
glasgowExtsFlags = [
, Opt_GeneralizedNewtypeDeriving
, Opt_TypeFamilies ]
, Opt_GeneralizedNewtypeDeriving
, Opt_TypeFamilies ]
+#ifdef GHCI
-- Consult the RTS to find whether GHC itself has been built profiled
-- If so, you can't use Template Haskell
foreign import ccall unsafe "rts_isProfiled" rtsIsProfiledIO :: IO CInt
rtsIsProfiled :: Bool
-- Consult the RTS to find whether GHC itself has been built profiled
-- If so, you can't use Template Haskell
foreign import ccall unsafe "rts_isProfiled" rtsIsProfiledIO :: IO CInt
rtsIsProfiled :: Bool
-rtsIsProfiled = False -- unsafePerformIO rtsIsProfiledIO /= 0
+rtsIsProfiled = unsafePerformIO rtsIsProfiledIO /= 0
checkTemplateHaskellOk :: Bool -> DynP ()
checkTemplateHaskellOk turn_on
checkTemplateHaskellOk :: Bool -> DynP ()
checkTemplateHaskellOk turn_on
@@
-1823,6
+1827,12
@@
checkTemplateHaskellOk turn_on
= addErr "You can't use Template Haskell with a profiled compiler"
| otherwise
= return ()
= addErr "You can't use Template Haskell with a profiled compiler"
| otherwise
= return ()
+#else
+-- In stage 1 we don't know that the RTS has rts_isProfiled,
+-- so we simply say "ok". It doesn't matter because TH isn't
+-- available in stage 1 anyway.
+checkTemplateHaskellOk turn_on = return ()
+#endif
{- **********************************************************************
%* *
{- **********************************************************************
%* *