From: Mart Lubbers Date: Mon, 17 Feb 2020 10:03:09 +0000 (+0100) Subject: haskell, update X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=08a3bb31914819ac2c8123e435acd45eb87b3985;p=dotfiles.git haskell, update --- diff --git a/clean/.local/bin/install_clean.sh b/clean/.local/bin/install_clean.sh index c343572..2abd923 100755 --- a/clean/.local/bin/install_clean.sh +++ b/clean/.local/bin/install_clean.sh @@ -23,58 +23,6 @@ chmod +x "$CLEAN_HOME"/bin/cloogletags echo "Generating tags" cloogletags -a -c -d "$CLEAN_HOME"/lib -o "$CLEAN_HOME"/lib/tags 2>/dev/null -echo "Patching StdEnv for binumap" -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 - -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 - echo "Adding the iTasks-git environment" patch /opt/clean/etc/IDEEnvs <