Haskell: Difference between revisions
→Limitations: Add section on ghcup |
m Use lang=haskell for syntax highlight |
||
| Line 26: | Line 26: | ||
For simple scripts, you can directly use nix-shell to get a redistributable Haskell script that you can run on any Nix system with <code>./my-script.hs</code>: | For simple scripts, you can directly use nix-shell to get a redistributable Haskell script that you can run on any Nix system with <code>./my-script.hs</code>: | ||
<syntaxhighlight lang= | <syntaxhighlight lang=haskell> | ||
#!/usr/bin/env nix-shell | #!/usr/bin/env nix-shell | ||
#!nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (pkgs: [ pkgs.turtle ])" | #!nix-shell --pure -i runghc -p "haskellPackages.ghcWithPackages (pkgs: [ pkgs.turtle ])" | ||