annotate a02/agda-install.ind @ 296:2f113cac060b

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 31 Dec 2021 14:36:44 +0900
parents 26407ce19d66
children 407684f806e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 -title: Agda の install の方法
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Homebrew を使うのが良いそうです。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 brew install agda
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 GHCが入ってないなら、
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 brew install ghc
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 install 先がどこかは、
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
14 /usr/local/Cellar/agda/2.6.1/lib/agda
127
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 などになるので、
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
18 brew install の指示通りに ~/.agda に以下のファイルを置きます
127
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 defaults libraries
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 defaults の中には
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 standard-library
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 libraries の中には
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 /usr/local/Cellar/agda/2.5.2/lib/agda/standard-library.agda-lib
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
141
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
29 --VS-code
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
30
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
31 plugin から agda-mode を探して install
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
32
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
33 test.agda を作って
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
34
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
35 module test where
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
36 open import Data.Nat
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
37 a : ?
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
38 a = 1
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
39
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
40 として C-C C-L が通れば Ok
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
41
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
42 --Emacs
b3f05cd08d24 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 138
diff changeset
43
163
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
44 Emacs を先に入れます。
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
45
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
46 brew tap caskroom/cask
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
47 brew cask install emacs
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
48
127
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 ~/.emacs.d/init.el に以下のファイルを置きます。あるいは自分のinit.el に適当に追加します。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 中のpathは正しいものに置き換えます。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 <a href="init.el"> init.el </a>
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 GUI 側で使わないと文字化けすることがあるようです。Terminal で使いたい時には、
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 <a href="https://github.com/hamano/locale-eaw"> locale eaw </a>
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 が必要です。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 Emacs から使うので、Emacs も勉強しよう。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
138
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 127
diff changeset
62 <a href="http://ie.u-ryukyu.ac.jp/%7Ekono/howto/mule.html"> Emacs の使い方 </a>
127
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 C-C control と C を同時に押す
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 M-X esc を押してから X を押す
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 C-X C-F で、Agda1.agda file を開けます。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 M-X help-for-help M で、Agda のコマンドの一覧が出ます。C-X o で buffer を切り替えて読みます。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70
163
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 141
diff changeset
71 Space Emacs というのもあるらしい。
127
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 --vim
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 <a ref="https://github.com/derekelkins/agda-vim"> agda-vim</a>
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 が使えます。
0e8a0e50ed26 add some files
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78