X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=clean%2F.local%2Fbin%2Finstall_clean.sh;h=e9be47eb0659e1d8c82ce9a7e063cc3d790fbdd7;hb=HEAD;hp=745a9e110d1ad4c9539cedfca688864b00ccf207;hpb=32a0f89bc0eea5252e432f626d16b7ecdddcc97f;p=dotfiles.git diff --git a/clean/.local/bin/install_clean.sh b/clean/.local/bin/install_clean.sh index 745a9e1..e9be47e 100755 --- a/clean/.local/bin/install_clean.sh +++ b/clean/.local/bin/install_clean.sh @@ -1,107 +1,31 @@ -#!/bin/sh -cd /tmp -curl ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz | tar -xz -rm -rf /opt/clean -mv clean-bundle-complete /opt/clean +#!/bin/bash +set -e -patch /opt/clean/lib/StdEnv/StdGeneric.dcl <) - -+generic binumap a b | binumap b a :: a -> b -+derive binumap c -+derive binumap PAIR -+derive binumap EITHER -+derive binumap OBJECT -+derive binumap CONS -+derive binumap RECORD -+derive binumap FIELD -+derive binumap (->) -+ - // HACK: dictionaries for all generics. - // It works since all generic classes have only one method and do not inherit - // from other classes -EOPATCH +if [ $# -ne 1 ] +then + echo "Usage: $0 [x86|x64]" + exit 1 +fi -patch /opt/clean/lib/StdEnv/StdGeneric.icl <)|} _ ba fr _ f = comp3 fr f ba - -+binumap{|c|} x = x -+ -+binumap{|PAIR|} fx _ fy _ (PAIR x y) = PAIR (fx x) (fy y) -+ -+binumap{|EITHER|} fl _ fr _ (LEFT x) = LEFT (fl x) -+binumap{|EITHER|} fl _ fr _ (RIGHT x) = RIGHT (fr x) -+ -+binumap{|CONS|} fx _ (CONS x) = CONS (fx x) -+ -+binumap{|RECORD|} fx _ (RECORD x) = RECORD (fx x) -+ -+binumap{|FIELD|} fx _ (FIELD x) = FIELD (fx x) -+ -+binumap{|OBJECT|} fx _ (OBJECT x) = OBJECT (fx x) -+ -+binumap{|(->)|} _ ba fr _ f = comp3 fr f ba -+ - comp3 :: !(.a -> .b) u:(.c -> .a) !(.d -> .c) -> u:(.d -> .b) - comp3 f g h - | is_id f -EOPATCH +DISTRO="https://ftp.cs.ru.nl/Clean/builds/linux-$1/clean-bundle-complete-linux-$1-latest.tgz" +TAGS="https://gitlab.com/cloogle/periphery/cloogle-tags/-/jobs/artifacts/master/raw/cloogletags?job=build" +CLMMAN="https://gitlab.science.ru.nl/clean-and-itasks/clm/raw/master/clm.1" +CP2CG="https://gitlab.science.ru.nl/clean-and-itasks/cleanprof2callgrind/-/jobs/artifacts/master/raw/cleanprof2callgrind?job=test" +CLEAN_HOME="/opt/clean-$1" -patch /opt/clean/etc/IDEEnvs </dev/null