-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL.txt
115 lines (78 loc) · 3.49 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
INSTALL:
This library contains the code as in the paper
Andreas Abel, Stephan Adelsberger, Anton Setzer: Interactive Programming in
Agda - Objects and Graphical User Interfaces
Journal of Functional Programming, 27, 2017.
doi: http://dx.doi.org/10.1017/S0956796816000319
author's copy: http://www.cs.swan.ac.uk/~csetzer/articles/ooAgda.pdf
bibtex: http://www.cs.swan.ac.uk/~csetzer/articles/ooAgda.bib
The code works with the most recent version of Agda version 2.5
(master branch from github, commit
"useefd12c778e095ee783eeb1f845fc1938ea360204").
The current agda code uses the haskell graphic library "wxhaskell" and
implements a small game, where a space ship can be moved with the arrow keys.
Please note: file path are set for linux/unix, for Windows adapt the file
"./examples/StateSized/GUI/ShipBitMap.agda".
Details:
- This version has been tested with Agda version 2.6.2-40e78a7
- Install agda from git:
git clone https://github.com/agda/agda.git
sudo cabal update
in the created directory
sudo cabal install --global
agda-mode setup
- Install Agda standard library version (latest master branch version,
tested with commit "545b94b81e4eb1d5a8b2b9f1083b12de5422d786")
from https://github.com/agda/agda-stdlib
git clone https://github.com/agda/agda-stdlib
(adaption of library files see below)
- If you want to write GUI programs such as the space ship example
you need to install wxWidgets and wxHaskell as follows,
otherwise (if you only want to work with objects in Agda or with console IO)
you can continue directly with "Set up the agda library files" below
- Install wxWidgets version 3.0.2
https://www.wxwidgets.org/
Follow the installation instructions in for the latest stable version
("Latest Stable Release: 3.0.2" not the development version)
Follow the instructions in
https://github.com/wxWidgets/wxWidgets/blob/v3.0.2/docs/readme.txt
and use the installation instructions for gtk,
with instructions in the downloaded version
at wxWidgets-3.1.0/docs/gtk/install.txt
(easiest to follow instructions "The simplest case")
- Install wxHaskell from github
https://github.com/wxHaskell/wxHaskell
(latest master branch version, tested with commit
"db2a571300b5810a7dadfe117744e5b9389e0c9b"")
Best is to clone
https://github.com/wxHaskell/wxHaskell
by using
git clone https://github.com/wxHaskell/wxHaskell
Then follow instructions at
install.txt
possibly replace there
cabal install
by
sudo cabal install
or
sudo cabal install --global
or
cabal install --global
- Set up the agda library files:
In "~/.agda/libraries" add the following three lines:
-----------
<absolute pathto Agda standard library>/agda-stdlib/standard-library.agda-lib
<absolute path to ooAgda>/ooAgda/src/ooAgda.agda-lib
<absolute path to ooAgda>/ooAgda/examples/ooAgdaExamples.agda-lib
----------
with the <paths> adapted to where your version of agda-stdlib
(Agda standard lib)
and of ooAgda is located
- For using the libraries in your code add a library file
containing as dependencies standard-library, ooAgdaExamples
into your code.
The helloworld example with an agda library file myExample.agda-lib
can be found in subdirectory exampleCode
For more information on the library files,
please refer to the changelog of Agda "2.5.1":
https://github.com/agda/agda/blob/master/CHANGELOG