[Haskell-cafe] can this be done with stack?

Michael Snoyman michael at snoyman.com
Fri Jun 2 06:27:20 UTC 2017

Have you tried `stack ghc filename.hs`? Also, you could try the script
interpreter approach, with something like this:

#!/usr/bin/env stack
-- stack --resolver lts-8.12 script --compile
main = putStrLn "Hello World"

Running `stack filename.hs` will compile and run your file, and you can
reuse the resulting executable.

On Fri, Jun 2, 2017 at 9:03 AM, Dennis Raddle <dennis.raddle at gmail.com>

> Using stack, but I have a need to build lots of executables. **lots** and
> new ones all the time .. my application is music playback. I used to have a
> single executable for playing music, and used it for all compositions. I
> later found that I needed to do a lot of configuration specific to each
> composition, and that the most natural language for specifying all the data
> and functions specific to a composition was Haskell. That means I have a
> source file for every composition, in the same directory where I store that
> composition (as a Sibelius file). But a couple things. (1) they aren't in
> the stack tree, (2) I don't want to add every one of these to a cabal file.
> What is the best way to approach this goal?
> D
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20170602/f8490579/attachment.html>

More information about the Haskell-Cafe mailing list