Skip to content

Commit 0e2a656

Browse files
Merge pull request #115 from chrisdone/cd/2026-04-19
2026-04-19 release
2 parents 69862de + 3a387a6 commit 0e2a656

6 files changed

Lines changed: 46 additions & 13 deletions

File tree

DIST

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Generate bindist:
2+
3+
arm64
4+
5+
hell scripts/static-build.hell --stack-arch aarch64-linux --filename hell-linux-arm64 --ghc-version ghc-9.8.2 --docker-container hell
6+
7+
amd64
8+
9+
hell scripts/static-build.hell --stack-arch x86_64-linux --filename hell-linux-amd64 --ghc-version ghc-9.8.2 --docker-container hell-amd64

docs/api/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/examples/index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,16 @@ <h2>15-type-classes.hell</h2><div class="sourceCode" id="cb1"><pre
162162
class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>main <span class="ot">=</span> <span class="kw">do</span></span>
163163
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> Text.putStrLn (<span class="dt">Show</span><span class="op">.</span><span class="fu">show</span> <span class="dv">123</span>)</span>
164164
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> Text.putStrLn (<span class="dt">Show</span><span class="op">.</span><span class="fu">show</span> <span class="dt">Bool</span><span class="op">.</span><span class="dt">True</span>)</span>
165-
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a></span>
166-
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> env <span class="ot">&lt;-</span> Environment.getEnvironment</span>
167-
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">Maybe</span><span class="op">.</span><span class="fu">maybe</span></span>
168-
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> (Text.putStrLn <span class="st">&quot;Seems the environment variable is not there.&quot;</span>)</span>
169-
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> (\path <span class="ot">-&gt;</span> Text.putStrLn (Text.concat [<span class="st">&quot;HOME is &quot;</span>, path]))</span>
170-
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> (List.lookup <span class="st">&quot;HOME&quot;</span> env)</span></code></pre></div>
165+
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> Text.putStrLn <span class="op">$</span> <span class="dt">Show</span><span class="op">.</span><span class="fu">show</span> <span class="op">$</span> <span class="dt">Eq</span><span class="op">.</span>eq <span class="dv">1</span> <span class="dv">1</span></span>
166+
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> Text.putStrLn <span class="op">$</span> <span class="dt">Show</span><span class="op">.</span><span class="fu">show</span> <span class="op">$</span> <span class="dt">Eq</span><span class="op">.</span>eq [<span class="dt">Maybe</span><span class="op">.</span><span class="dt">Just</span> <span class="dv">1</span>] [<span class="dt">Maybe</span><span class="op">.</span><span class="dt">Just</span> <span class="dv">2</span>]</span>
167+
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">IO</span><span class="op">.</span><span class="fu">print</span> [<span class="dt">Maybe</span><span class="op">.</span><span class="dt">Just</span> <span class="dv">1</span>, <span class="dt">Maybe</span><span class="op">.</span><span class="dt">Nothing</span>]</span>
168+
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">IO</span><span class="op">.</span><span class="fu">print</span> <span class="op">$</span> <span class="dt">Maybe</span><span class="op">.</span><span class="dt">Just</span> [<span class="dv">1</span>] <span class="op">&lt;&gt;</span> <span class="dt">Maybe</span><span class="op">.</span><span class="dt">Nothing</span></span>
169+
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a></span>
170+
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> env <span class="ot">&lt;-</span> Environment.getEnvironment</span>
171+
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">Maybe</span><span class="op">.</span><span class="fu">maybe</span></span>
172+
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> (Text.putStrLn <span class="st">&quot;Seems the environment variable is not there.&quot;</span>)</span>
173+
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> (\path <span class="ot">-&gt;</span> Text.putStrLn (Text.concat [<span class="st">&quot;HOME is &quot;</span>, path]))</span>
174+
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> (List.lookup <span class="st">&quot;HOME&quot;</span> env)</span></code></pre></div>
171175
<h2>16-if.hell</h2><div class="sourceCode" id="cb1"><pre
172176
class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>main <span class="ot">=</span> <span class="kw">do</span></span>
173177
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">if</span> List.and [<span class="dt">Eq</span><span class="op">.</span>eq (<span class="dt">Int</span><span class="op">.</span>plus <span class="dv">1</span> <span class="dv">1</span>) <span class="dv">2</span>,</span>

hell.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ author: Chris Done
1111
maintainer: Chris Done
1212
copyright: 2023 Chris Done
1313
license: BSD3
14+
license-file: LICENSE
1415
build-type: Simple
1516

1617
executable hell

scripts/static-build.hell

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1+
data Opts = Opts {
2+
arch :: Text,
3+
filename :: Text,
4+
ghc :: Text,
5+
container :: Text
6+
}
7+
options =
8+
(\arch filename ghc container -> Main.Opts { arch, filename, ghc, container })
9+
<$> Options.strOption (Option.long "stack-arch" <> Option.help "x86_64-linux or aarch64-linux")
10+
<*> Options.strOption (Option.long "filename" <> Option.help "e.g. hell-linux-amd64 or hell-linux-arm64")
11+
<*> Options.strOption (Option.long "ghc-version" <> Option.help "e.g. ghc-9.8.2")
12+
<*> Options.strOption (Option.long "docker-container" <> Option.help "e.g. hell or hell-amd64")
13+
114
main = do
2-
Process.runProcess_ (Process.proc "docker" ["exec", "hell", "stack", "build","--ghc-options", "-static -optl-static -fforce-recomp", "--force-dirty"])
3-
Directory.copyFile ".stack-work/dist/x86_64-linux/ghc-9.8.2/build/hell/hell" "hell-linux-x86-64bit"
4-
Process.runProcess_ (Process.proc "strip" ["hell-linux-x86-64bit"])
15+
opts <- Options.execParser (Options.info (Main.options <**> Options.helper) Options.fullDesc)
16+
let arch = Record.get @"arch" opts
17+
let filename = Record.get @"filename" opts
18+
let ghc = Record.get @"ghc" opts
19+
let container = Record.get @"container" opts
20+
let distPath = ".stack-work/dist/" <> arch <> "/" <> ghc <> "/build/hell/"
21+
22+
Process.runProcess_ (Process.proc "docker" ["exec", container, "stack", "build","--ghc-options", "-static -optl-static -fforce-recomp", "--force-dirty"])
23+
Directory.copyFile (distPath <> "/hell") filename
24+
Process.runProcess_ (Process.proc "docker" ["exec", container, "strip", filename])
525
pwd <- Directory.getCurrentDirectory
626
env <- Environment.getEnvironment
727
path <- Environment.getEnv "PATH"
@@ -11,8 +31,7 @@ main = do
1131
("PATH",
1232
Text.concat
1333
[pwd,
14-
"/.stack-work/dist/x86_64-linux/ghc-9.8.2/build/hell/",
15-
":",
34+
"/" <> distPath, ":",
1635
path])
1736
env) $
1837
Process.proc "hell" ["scripts/check.hell"]

src/Hell.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ commandParser =
164164

165165
-- | Version of Hell.
166166
hellVersion :: Text
167-
hellVersion = "2025-11-11"
167+
hellVersion = "2026-04-19"
168168

169169
-- | Dispatch on the command.
170170
dispatch :: Command -> IO ()

0 commit comments

Comments
 (0)