Commit 9c966bfa authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Add -fdph-this

parent 44ee866e
......@@ -1440,6 +1440,9 @@ dynamic_flags = [
, Flag "fdph-par"
(NoArg (setDPHBackend DPHPar))
Supported
, Flag "fdph-this"
(NoArg (setDPHBackend DPHThis))
Supported
------ Compiler flags -----------------------------------------------
......@@ -1872,16 +1875,18 @@ setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20
data DPHBackend = DPHPar
| DPHSeq
| DPHThis
deriving(Eq, Ord, Enum, Show)
setDPHBackend :: DPHBackend -> DynP ()
setDPHBackend backend
= do
upd $ \dflags -> dflags { dphBackend = backend }
exposePackage $ "dph-prim-" ++ suffix backend
exposePackage $ "dph-" ++ suffix backend
mapM_ exposePackage (dph_packages backend)
where
suffix DPHPar = "par"
suffix DPHSeq = "seq"
dph_packages DPHThis = []
dph_packages DPHPar = ["dph-prim-par", "dph-par"]
dph_packages DPHSeq = ["dph-prim-seq", "dph-seq"]
setMainIs :: String -> DynP ()
setMainIs arg
......
......@@ -53,6 +53,7 @@ vectorise backend hsc_env _ _ guts
backendPackage DPHSeq = dphSeqPackageId
backendPackage DPHPar = dphParPackageId
backendPackage DPHThis = thisPackage dflags
vectModule :: ModGuts -> VM ModGuts
vectModule guts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment