nix-book/source/recipes/haskell-nixpkg/shell/main.adoc0
2023-11-28 16:13:05 +00:00

25 lines
324 B
Text

= In `shell.nix`
[source,nix,linenums]
.shell.nix
....
include::shell.nix[]
....
Here's a short Haskell program that uses it.
[source,haskell,linenums]
.Main.hs
....
include::Main.hs[]
....
Here's a demonstration using the program.
....
$# echo '$ nix-shell'
$# nix-shell --run bash <<EOL
$ runghc Main.hs
$# EOL
....