Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove no longer relevant comment from example #59

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,9 @@ <h2>09-processes.hell</h2><div class="sourceCode" id="cb1"><pre
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> Process.runProcess_ (Process.proc <span class="st">&quot;echo&quot;</span> [<span class="st">&quot;Hello, World!&quot;</span>])</span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="co">-- Explicit type signature, but you don&#39;t need this. Just for demo&#39;ing.</span></span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> config <span class="ot">=</span> Process.proc <span class="st">&quot;false&quot;</span> []</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> code <span class="ot">&lt;-</span> Process.runProcess config</span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> Text.putStrLn <span class="st">&quot;Done.&quot;</span></span></code></pre></div>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="kw">let</span> config <span class="ot">=</span> Process.proc <span class="st">&quot;false&quot;</span> []</span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> code <span class="ot">&lt;-</span> Process.runProcess config</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> Text.putStrLn <span class="st">&quot;Done.&quot;</span></span></code></pre></div>
<h2>10-current-directory.hell</h2><div class="sourceCode" id="cb1"><pre
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>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> dir <span class="ot">&lt;-</span> Directory.getCurrentDirectory</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h1>Hell: Shell scripting Haskell dialect</h1>
<li>It supports basic type-classes (Eq, Ord, Show, Monad), which are
needed for e.g. List.lookup and familiar equality things.</li>
<li>It does not support polytypes.</li>
<li>It use all the same names for things (List.lookup, Monad.forM,
<li>It uses all the same names for things (List.lookup, Monad.forM,
Async.race, etc.) that are already used in Haskell.</li>
</ul>

Expand Down
1 change: 0 additions & 1 deletion examples/09-processes.hell
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ main = do

Process.runProcess_ (Process.proc "echo" ["Hello, World!"])

-- Explicit type signature, but you don't need this. Just for demo'ing.
let config = Process.proc "false" []
code <- Process.runProcess config
Text.putStrLn "Done."
2 changes: 1 addition & 1 deletion src/Hell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ parseFile filePath = do
HSE.ParseOk binds -> Right binds

-- This should be quite efficient because it's essentially a pointer
-- increase. It leaves the \n so that line numbers are in tact.
-- increase. It leaves the \n so that line numbers are intact.
dropShebang :: Text -> Text
dropShebang t = Maybe.fromMaybe t do
rest <- Text.stripPrefix "#!" t
Expand Down