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 <<EOPATCH
---- StdGeneric.dcl 2018-12-17 02:43:55.000000000 +0100
-+++ StdGeneric.dcl 2018-12-17 11:06:09.196234236 +0100
-@@ -64,6 +64,16 @@
- derive bimap FIELD
- derive bimap (->)
-
-+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 <<EOPATCH
---- StdGeneric.icl 2018-12-17 02:43:55.000000000 +0100
-+++ StdGeneric.icl 2018-12-17 11:06:09.196234236 +0100
-@@ -21,6 +21,23 @@
-
- bimap{|(->)|} _ 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 <<EOPATCH
--- IDEEnvs.orig 2019-11-19 08:13:53.243123284 +0100