Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 85e3e2e

Browse files
committed
Enable RTS options for additional commands
Resolves #65
1 parent 0563deb commit 85e3e2e

File tree

3 files changed

+2321
-3
lines changed

3 files changed

+2321
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ There is also [a more complete example](#full-example) that makes use of all the
3434

3535
Refer to the PureScript [compiler usage](https://github.com/purescript/purescript/wiki/Language-Guide:-Getting-Started#compiler-usage) section of the Github wiki for additional details on the behaviour of each option below.
3636

37-
Options can be passed to the Haskell runtime system for `purs` by passing a `--purs-rts-flags` argument to `gulp`. Any values that follow this flag will be passed through to the runtime. There is no need to include `+RTS`/`-RTS` options as these are inserted automatically. See [the GHC documentation](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime-control.html#rts-opts-cmdline) for information on the available RTS options.
37+
Options can be passed to the Haskell runtime system for `purs` by passing a `--purs-rts-flags` argument to `gulp`. Any values that follow this flag will be passed through to the runtime. There is no need to include `+RTS`/`-RTS` options as these are inserted automatically. See [the GHC documentation](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html#setting-rts-options-on-the-command-line) for information on the available RTS options.
3838

3939
### `purescript.compile(options)`
4040

src/GulpPurescript/Plugin.purs

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ resolve cmd args = catchError primary fallback
113113

114114
execute :: forall eff. String -> Array String -> Aff (Effects eff) String
115115
execute cmd args = do
116-
Tuple cmd' args' <- resolve pursCommand ([cmd] <> args)
116+
Tuple cmd' args' <- resolve pursCommand ([cmd] <> args <> rtsOpts)
117117
result <- spawn cmd' args'
118118
pure result
119119

120120
compile :: forall eff. Foreign -> Eff (Effects eff) (ReadableStream Unit)
121121
compile opts = mkReadableStreamFromAff $ do
122122
output <- handleRead
123-
(execute compileCommand <<< (_ <> rtsOpts))
123+
(execute compileCommand)
124124
(compileOptions opts)
125125
if null output
126126
then pure unit

0 commit comments

Comments
 (0)