summary history branches tags files
commit:30b046520fe69011c0ac2a1e6fbb38dbd4a82034
author:avh4
committer:avh4
date:Sun Jan 22 12:11:52 2023 -0800
parents:21ba0039c783d1637688a2f3245d5c1837a8c845
Run a command with typed-process
diff --git a/dev/go.sh b/dev/go.sh
line changes: +3/-0
index 0000000..eecdedd
--- /dev/null
+++ b/dev/go.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+exec runghc --ghc-arg='-threaded' sizer.hs

diff --git a/shell.nix b/shell.nix
line changes: +3/-4
index 1fea958..06a3cf1
--- a/shell.nix
+++ b/shell.nix
@@ -4,10 +4,9 @@ let
   ghc = "ghc92";
   haskellPackages = pkgs.haskell.packages.${ghc};
 
-in haskellPackages.shellFor {
-  packages = p: [ ];
-  buildInputs = [
-    haskellPackages.cabal-install
+in pkgs.mkShell {
+  nativeBuildInputs = [
+    (haskellPackages.ghcWithPackages (p: with p; [ typed-process ]))
     haskellPackages.ghcid
     haskellPackages.haskell-language-server
 

diff --git a/sizer.hs b/sizer.hs
line changes: +8/-0
index 0000000..edb1b2a
--- /dev/null
+++ b/sizer.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+import System.Process.Typed (runProcess_)
+
+main :: IO ()
+main = do
+  runProcess_ "false"
+