Commit 1b41ef08 authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Expose the dph packages automatically if -dph-* is set

parent 5ac94687
...@@ -1435,10 +1435,10 @@ dynamic_flags = [ ...@@ -1435,10 +1435,10 @@ dynamic_flags = [
------ DPH flags ---------------------------------------------------- ------ DPH flags ----------------------------------------------------
, Flag "fdph-seq" , Flag "fdph-seq"
(NoArg (upd (setDPHBackend DPHSeq))) (NoArg (setDPHBackend DPHSeq))
Supported Supported
, Flag "fdph-par" , Flag "fdph-par"
(NoArg (upd (setDPHBackend DPHPar))) (NoArg (setDPHBackend DPHPar))
Supported Supported
------ Compiler flags ----------------------------------------------- ------ Compiler flags -----------------------------------------------
...@@ -1873,9 +1873,15 @@ setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20 ...@@ -1873,9 +1873,15 @@ setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20
data DPHBackend = DPHPar data DPHBackend = DPHPar
| DPHSeq | DPHSeq
setDPHBackend :: DPHBackend -> DynFlags -> DynFlags setDPHBackend :: DPHBackend -> DynP ()
setDPHBackend backend dflags = dflags { dphBackend = backend } setDPHBackend backend
= do
upd $ \dflags -> dflags { dphBackend = backend }
exposePackage $ "dph-prim-" ++ suffix backend
exposePackage $ "dph-" ++ suffix backend
where
suffix DPHPar = "par"
suffix DPHSeq = "seq"
setMainIs :: String -> DynP () setMainIs :: String -> DynP ()
setMainIs arg setMainIs arg
......
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