You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request updates the `pkg-darwin` recipe.
This pull request also attempts to provide a better way to provision a
Haskell package environment, but ends up documenting the current lack of
success with GHC [package environments][package-env] instead.
[package-env]:
https://ghc.gitlab.haskell.org/ghc/doc/users_guide/packages.html#package-environments
Note that `curl` will not, by default, add a newline to the end of the received request; this may screw up the terminal. However, the option `-w '\n'` will add said newline. To make it a default, use the `~/.curlrc` file [[StackOverflow]][12849584].
This document records snippets of information that are useful for developing HyperHaskell.
21
5
6
+
Haskell
7
+
=======
22
8
23
9
How does GHCi evaluate expressions on the prompt?
24
10
-------------------------------------------------
@@ -72,17 +58,6 @@ Fortunately, a Google search reveals that the relevant code is actually containe
72
58
In other words, GHC tries to typecheck the expression at the prompt in different contexts, and uses the first plan that works.
73
59
74
60
75
-
How to create an .icns file on OS X?
76
-
------------------------------------
77
-
78
-
Application icons on OS X are stored in `.icns` files. There is a command line utility called `iconutil` that is supposed to be able to create such files, but unfortunately, it only creates garbled icons for me. No idea why. Online converters seem to work fine.
@@ -122,8 +97,10 @@ For my setup, a minimal environment is given by
122
97
HOME=/Users/hgz \
123
98
stack exec -- hyper-haskell-server
124
99
100
+
JavaScript
101
+
==========
125
102
126
-
Node.js -- External Processes
103
+
Node.js — External Processes
127
104
-----------------------------
128
105
129
106
We can run external processes and read their `stdout`. Example:
@@ -135,4 +112,76 @@ We can run external processes and read their `stdout`. Example:
135
112
env : newEnv(),
136
113
}).stdout.trim()
137
114
138
-
Note that most UNIX utilities will traditionally emit a newline at the end of the output, and we use `trim()` to get rid of it.
115
+
Note that most UNIX utilities will traditionally emit a newline at the end of the output, and we use `trim()` to get rid of it.
116
+
117
+
118
+
Cabal and GHC package environments
119
+
----------------------------------
120
+
121
+
A working installation of the HyperHaskell interpreter backend consists of two things:
122
+
123
+
1. The interpreter executable `hyper-haskell-server`, linked against a compilation A of the `hyper` package.
124
+
2. A package database that contains this compilation A of the `hyper` package. This database needs to be in scope when running the interpreter excutable.
125
+
126
+
How to provision these?
127
+
128
+
As of December 2024, it seemed like GHC [package environments][package-env] might be useful to provision the above setup, but unfortunately, this does not work.
129
+
130
+
The following command will install the package `hyper` into the package environment `PKG_ENV`:
By using the same package environment `PKG_ENV`, we make sure that both the interpreter exectuable and the package environment refer to the same compilation of the `hyper` package.
143
+
144
+
Unfortunately, the two commands above do not produce a working setup: `cabal install --lib` does [not install dependencies][cabal-issue-6263], and the GHC API as used by `hyper-haskell-server` is unable to handle that; I get error messages of the form
hypr-xtr-0.2.0.1-71ddd09d is unusable due to missing dependencies:
149
+
[…]
150
+
```
151
+
152
+
(The "missing dependency" appears to be present in the package database, and `ghci` is able to handle the situation, but the use of the GHC API by `hyper-haskell-server` is not.)
153
+
154
+
To summarize, as of December 2024, I can't get GHC package environments to yield a working installation of the HyperHaskell interpreter backend.
Note that `curl` will not, by default, add a newline to the end of the received request; this may screw up the terminal. However, the option `-w '\n'` will add said newline. To make it a default, use the `~/.curlrc` file [[StackOverflow]][12849584].
Application icons on OS X are stored in `.icns` files. There is a command line utility called `iconutil` that is supposed to be able to create such files, but unfortunately, it only creates garbled icons for me. No idea why. Online converters seem to work fine.
0 commit comments