Awesome! I was looking forward to cabal run
scripts caching:
$ cat ./script.hs
#!/usr/bin/env cabal
{- cabal:
build-depends: base
, shell-conduit
default-extensions:
-}
import Data.Conduit.Shell
main :: IO ()
main = run $ do
pacman "-Q" $| wc "-l"
date
$ time ./script.hs
1390
Fri 12 Aug 09:55:37 CEST 2022
./script.hs 0.56s user 0.14s system 99% cpu 0.712 total
$ time ./script.hs
1390
Fri 12 Aug 09:55:39 CEST 2022
./script.hs 0.03s user 0.02s system 96% cpu 0.053 total