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 = [
------ DPH flags ----------------------------------------------------
, Flag "fdph-seq"
(NoArg (upd (setDPHBackend DPHSeq)))
(NoArg (setDPHBackend DPHSeq))
Supported
, Flag "fdph-par"
(NoArg (upd (setDPHBackend DPHPar)))
(NoArg (setDPHBackend DPHPar))
Supported
------ Compiler flags -----------------------------------------------
......@@ -1873,9 +1873,15 @@ setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20
data DPHBackend = DPHPar
| DPHSeq
setDPHBackend :: DPHBackend -> DynFlags -> DynFlags
setDPHBackend backend dflags = dflags { dphBackend = backend }
setDPHBackend :: DPHBackend -> DynP ()
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 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