Skip to content

Commit a1b7c0e

Browse files
Maintenance: Add installation instructions for binary release
Add corresponding screenshots Embiggen .gitignore Add `Test.hs` needed for example worksheets
1 parent 8f820d0 commit a1b7c0e

File tree

7 files changed

+56
-13
lines changed

7 files changed

+56
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
*.DS_Store
22
.cabal-sandbox/
33
cabal.sandbox.config
4+
dist/
45
.stack-work
56
/.dist-buildwrapper
67
/.project
78
/.externalToolBuilders
89
*.sublime-workspace
910
node_modules
10-
/build
11+
/build

README.md

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@
99

1010
*HyperHaskell* is currently *Level α*.
1111

12-
[haskell]: https://haskell.org
13-
[ghc]: https://www.haskell.org/ghc/
14-
[electron]: http://electron.atom.io/
15-
[stack]: https://www.haskellstack.org
16-
1712
*HyperHaskell* looks like this:
1813

1914
<img src="docs/screenshots/worksheet-diagrams.png" height="500">
2015

2116
# Installation
2217

23-
HyperHaskell is currently in a pre-release state, you have to run it from source.
18+
[haskell]: https://haskell.org
19+
[ghc]: https://www.haskell.org/ghc/
20+
[electron]: http://electron.atom.io/
21+
[stack]: https://www.haskellstack.org
22+
[release]: ../../releases
2423

2524
## Overview
2625

26+
*HyperHaskell* is intended to be easy to install. The easiest way to install it is to download the binary distribution. This is explained in the next subsection. However, there is a pitfall which you have to know about, and which requires knowledge of the installation structure.
27+
2728
A HyperHaskell installation consists of two parts:
2829

2930
1. The graphical front-end.
@@ -35,21 +36,55 @@ A HyperHaskell installation consists of two parts:
3536
Consists of an executable `hyper-haskell-server`,
3637
written in Haskell using the [GHC API][ghc],
3738
and a library (module) `Hyper` for visualizing and pretty printing Haskell values.
38-
39+
3940
Both parts depend on several different Haskell packages.
4041
Unfortunately, the versions of the packages used to compile the executable
4142
and to compile the library have to be exactly the same.
42-
43+
4344
This is why, at the moment,
4445
the front-end does *not* come with the back-end executable included.
4546
Instead, the user is asked to install the `hyper-haskell-server` back-end
4647
into his or her own database of Haskell packages,
4748
and then tell the front-end about it.
4849
This way, the user is free to use different package or compiler versions.
4950

51+
## Installation of the binary distribution
52+
53+
Installation from the binary distribution follows the structure explained above.
54+
55+
1. [Download the graphical front-end from the latest release][release] und unpack it.
56+
57+
![App](docs/screenshots/app-osx.png)
58+
59+
*NOTE*: At the moment, I can only provide OS X binaries, because I don't have access to other architectures. Help is appreciated!
60+
61+
2. Install the back-end server
62+
63+
1. Make sure that you have a working installation of the [GHC][] Haskell compiler.
64+
65+
2. Install the back-end with Cabal by executing
66+
67+
cabal install hyper hyper-haskell-server
68+
69+
It is also recommended (but not necessary) that you install the additional
70+
support for other popular Haskell packages, e.g. the [Diagrams][] library by
71+
additionally executing
72+
73+
cabal install hyper-extra
74+
75+
3. Now you can start the front-end application and create a new worksheet, or open an existing one. Make sure that the "Interpreter Back-end" in the "Settings" section of the worksheet is set to "cabal". (The path field does not matter in this case.)
76+
77+
![Settings](docs/screenshots/settings-back-end-cabal.png)
78+
79+
It is also possible to use [Stack][] by using `stack install`, but that is not fully explained here, only to some extend below.
80+
81+
That's it! Happy hyper!
82+
83+
[diagrams]: https://github.com/diagrams
84+
5085
## Run from source
5186

52-
To run HyperHaskell from source, follow these steps:
87+
When developing HyperHaskell itself, it is also possible to run it from source. Follow these steps:
5388

5489
1. [Download and install Electron](http://electron.atom.io/releases/)
5590

@@ -68,7 +103,7 @@ To run HyperHaskell from source, follow these steps:
68103
ELECTRON=/Applications/Electron.app/Contents/MacOS/Electron
69104

70105
On Linux: ??
71-
106+
72107
On Windows: ??
73108

74109
4. Go into the root directory of this repository and type `make run`.
@@ -82,8 +117,8 @@ To run HyperHaskell from source, follow these steps:
82117
5. Use the *File* menu to open one of the example worksheets from the [worksheets](worksheets/) folder. Voilà!
83118

84119
You can also create a new worksheet, but note that you have to set the back-end path in the "Settings" section. The path is relative to the directory where the worksheet was saved. For instance, if you run a worksheet from the [worksheets](worksheets/) directory, the path `../haskell/stack.yaml` will point to the right `hyper-haskell-server` executable. Screenshot:
85-
86-
![Settings](docs/screenshots/settings-back-end.png)
120+
121+
![Settings](docs/screenshots/settings-back-end-stack.png)
87122

88123
Note that for this setting, the `stack` utility has to be in your path. You can also set an explicit path for this utility in the "Preferences…" menu item.
89124

docs/misc.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ How to create an .icns file on OS X?
7777

7878
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.
7979

80+
How to remove color profiles from images on OS X?
81+
-------------------------------------------------
82+
83+
sips -d profile --deleteColorManagementProperties *filename*
84+
85+
8086
Haskell path information
8187
------------------------
8288

docs/screenshots/app-osx.png

6.48 KB
Loading
5.41 KB
Loading

worksheets/Test.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello = "Hurray, we can load external source files!"

0 commit comments

Comments
 (0)