many updates
[dotfiles.git] / clean / .local / bin / install_clean.sh
1 #!/bin/sh
2 cd /tmp
3 curl ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz | tar -xz
4 rm -rf /opt/clean
5 mv clean-bundle-complete /opt/clean
6
7 patch /opt/clean/lib/StdEnv/StdGeneric.dcl <<EOPATCH
8 --- StdGeneric.dcl 2018-12-17 02:43:55.000000000 +0100
9 +++ StdGeneric.dcl 2018-12-17 11:06:09.196234236 +0100
10 @@ -64,6 +64,16 @@
11 derive bimap FIELD
12 derive bimap (->)
13
14 +generic binumap a b | binumap b a :: a -> b
15 +derive binumap c
16 +derive binumap PAIR
17 +derive binumap EITHER
18 +derive binumap OBJECT
19 +derive binumap CONS
20 +derive binumap RECORD
21 +derive binumap FIELD
22 +derive binumap (->)
23 +
24 // HACK: dictionaries for all generics.
25 // It works since all generic classes have only one method and do not inherit
26 // from other classes
27 EOPATCH
28
29 patch /opt/clean/lib/StdEnv/StdGeneric.icl <<EOPATCH
30 --- StdGeneric.icl 2018-12-17 02:43:55.000000000 +0100
31 +++ StdGeneric.icl 2018-12-17 11:06:09.196234236 +0100
32 @@ -21,6 +21,23 @@
33
34 bimap{|(->)|} _ ba fr _ f = comp3 fr f ba
35
36 +binumap{|c|} x = x
37 +
38 +binumap{|PAIR|} fx _ fy _ (PAIR x y) = PAIR (fx x) (fy y)
39 +
40 +binumap{|EITHER|} fl _ fr _ (LEFT x) = LEFT (fl x)
41 +binumap{|EITHER|} fl _ fr _ (RIGHT x) = RIGHT (fr x)
42 +
43 +binumap{|CONS|} fx _ (CONS x) = CONS (fx x)
44 +
45 +binumap{|RECORD|} fx _ (RECORD x) = RECORD (fx x)
46 +
47 +binumap{|FIELD|} fx _ (FIELD x) = FIELD (fx x)
48 +
49 +binumap{|OBJECT|} fx _ (OBJECT x) = OBJECT (fx x)
50 +
51 +binumap{|(->)|} _ ba fr _ f = comp3 fr f ba
52 +
53 comp3 :: !(.a -> .b) u:(.c -> .a) !(.d -> .c) -> u:(.d -> .b)
54 comp3 f g h
55 | is_id f
56 EOPATCH
57
58 patch /opt/clean/etc/IDEEnvs <<EOPATCH
59 --- IDEEnvs 2018-12-17 11:58:48.876039159 +0100
60 +++ IDEEnvs 2018-12-17 12:00:52.384066455 +0100
61 @@ -35,13 +35,44 @@
62 Path: {Application}/lib/StdEnv
63 Path: {Application}/lib/Dynamics
64 Path: {Application}/lib/TCPIP
65 + Path: {Application}/lib/Gast
66 Path: {Application}/lib/Platform
67 Path: {Application}/lib/Platform/Deprecated/Generics
68 + Path: {Application}/lib/Platform/Deprecated/ArgEnv
69 + Path: {Application}/lib/Platform/Deprecated/MersenneTwister
70 Path: {Application}/lib/Platform/Deprecated/StdLib
71 Path: {Application}/lib/Sapl
72 Path: {Application}/lib/GraphCopy
73 Path: {Application}/lib/iTasks
74 - EnvironmentCompiler: lib/exe/cocl::-dynamics -sapl
75 + EnvironmentCompiler: lib/exe/cocl:-h 500m -s 20m:-dynamics -sapl
76 + EnvironmentCodeGen: lib/exe/cg
77 + EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
78 + EnvironmentDynLink: lib/exe/linker
79 + EnvironmentVersion: 920
80 + EnvironmentRedirect: False
81 + EnvironmentCompileMethod: Pers
82 + EnvironmentProcessor: I386
83 + Environment64BitProcessor: True
84 + Environment
85 + EnvironmentName: iTasks-git
86 + EnvironmentPaths
87 + Path: {Application}/lib/StdEnv
88 + Path: {Application}/lib/Dynamics
89 + Path: {Application}/lib/TCPIP
90 + Path: {Application}/lib/Sapl
91 + Path: {Application}/lib/GraphCopy
92 + Path: {Application}/lib/Gast
93 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/Platform-x86
94 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Posix
95 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux
96 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux-64
97 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent
98 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/Generics
99 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
100 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/ArgEnv
101 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/MersenneTwister
102 + Path: /home/mrl/projects/clean/iTasks-SDK/Libraries
103 + EnvironmentCompiler: lib/exe/cocl:-h 500m -s 20m:-dynamics -sapl
104 EnvironmentCodeGen: lib/exe/cg
105 EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
106 EnvironmentDynLink: lib/exe/linker
107 EOPATCH