diff --git a/103/lib/ag/HS/AbsSyn.ag b/103/lib/ag/HS/AbsSyn.ag
--- a/103/lib/ag/HS/AbsSyn.ag
+++ b/103/lib/ag/HS/AbsSyn.ag
@@ -255,6 +255,9 @@
     | ExcludeIfTarget
     	range					: Range
     	targetNames				: {[String]}
+    | CHR
+    	range					: Range
+    	chrRules				: {String}
 
 SET AllPragma
   = Pragma Pragmas
diff --git a/103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi b/103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi
Binary files a/103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi and b/103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi differ
diff --git a/103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config b/103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config
--- a/103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config
+++ b/103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config
@@ -1,2 +1,2 @@
 exposed-modules: Data.Array
-build-depends: uhcbase-1.1.9.3 base-3.0.0.0
+build-depends: uhcbase-1.1.9.4 base-3.0.0.0
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi
Binary files a/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi and b/103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi differ
diff --git a/103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config b/103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config
--- a/103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config
+++ b/103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config
@@ -1,2 +1,2 @@
 exposed-modules: Control.Applicative Control.Arrow Control.Category Control.Monad.Fix Control.Monad.Instances Control.Monad.ST.Lazy Control.Monad.ST Data.Bool Data.Complex Data.Dynamic Data.Eq Data.Foldable Data.Function Data.Ix Data.Monoid Data.Ord Data.Ratio Data.String Data.Traversable Numeric Prelude System.Console.GetOpt System.Environment System.Exit Text.ParserCombinators.ReadP Text.ParserCombinators.ReadPrec Text.Read.Lex Text.Read Text.Show.Functions Text.Show
-build-depends: uhcbase-1.1.9.3
+build-depends: uhcbase-1.1.9.4
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.bcrr
deleted file mode 100644
# file too large to diff: 103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.bcrr
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.bcrr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.bcrr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.bcrr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.cr b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.cr
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.cr and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.hi b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.hi
deleted file mode 100644
Binary files a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.hi and /dev/null differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/CTypes.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/CTypes.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/CTypes.h
+++ /dev/null
@@ -1,231 +0,0 @@
-{- --------------------------------------------------------------------------
-// Dirty CPP hackery for CTypes/CTypesISO
-//
-// (c) The FFI task force, 2000
-// --------------------------------------------------------------------------
--}
-
-#ifndef CTYPES__H
-#define CTYPES__H
-
-#include "Typeable.h"
-
-{-
-// As long as there is no automatic derivation of classes for newtypes we resort
-// to extremely dirty cpp-hackery.   :-P   Some care has to be taken when the
-// macros below are modified, otherwise the layout rule will bite you.
--}
-
---  // A hacked version for GHC follows the Haskell 98 version...
-#ifndef __GLASGOW_HASKELL__
-
-#define NEWTYPE_TYPE_NODERIVING(T,B) \
-newtype T = T B ; 
-
-#define NEWTYPE_TYPE(T,B) \
-newtype T = T B deriving (Eq, Ord) ; 
-
-#define ARITHMETIC_TYPE_INSTANCES(T,C,S,B) \
-INSTANCE_NUM(T) ; \
-INSTANCE_REAL(T) ; \
-INSTANCE_READ(T,B) ; \
-INSTANCE_SHOW(T,B) ; \
-INSTANCE_ENUM(T) ; \
-INSTANCE_STORABLE(T) ; \
-INSTANCE_TYPEABLE0(T,C,S) ;
-
-#define INTEGRAL_TYPE_INSTANCES(T,C,S,B) \
-INSTANCE_BOUNDED(T) ; \
-INSTANCE_INTEGRAL(T) ; \
-INSTANCE_BITS(T)
-
-#define ARITHMETIC_TYPE(T,C,S,B) \
-NEWTYPE_TYPE(T,B) ; \
-ARITHMETIC_TYPE_INSTANCES(T,C,S,B) ;
-
-#define INTEGRAL_TYPE(T,C,S,B) \
-ARITHMETIC_TYPE(T,C,S,B) ; \
-INTEGRAL_TYPE_INSTANCES(T,C,S,B)
-
-#define FLOATING_TYPE(T,C,S,B) \
-ARITHMETIC_TYPE(T,C,S,B) ; \
-INSTANCE_FRACTIONAL(T) ; \
-INSTANCE_FLOATING(T) ; \
-INSTANCE_REALFRAC(T) ; \
-INSTANCE_REALFLOAT(T)
-
-#ifndef __GLASGOW_HASKELL__
-#define fakeMap map
-#endif
-
-#define INSTANCE_READ(T,B) \
-instance Read T where { \
-   readsPrec p s = fakeMap (\(x, t) -> (T x, t)) (readsPrec p s) }
-
-#define INSTANCE_SHOW(T,B) \
-instance Show T where { \
-   showsPrec p (T x) = showsPrec p x }
-
-#define INSTANCE_NUM(T) \
-instance Num T where { \
-   (T i) + (T j) = T (i + j) ; \
-   (T i) - (T j) = T (i - j) ; \
-   (T i) * (T j) = T (i * j) ; \
-   negate  (T i) = T (negate i) ; \
-   abs     (T i) = T (abs    i) ; \
-   signum  (T i) = T (signum i) ; \
-   fromInteger x = T (fromInteger x) }
-
-#define INSTANCE_EQ(T) \
-instance Eq T where { \
-   (T x1) == (T x2) = x1 == x2 }
-
-#define INSTANCE_ORD(T) \
-instance Ord T where { \
-   (T x1) `compare` (T x2) = x1 `compare` x2 }
-
-#define INSTANCE_BOUNDED(T) \
-instance Bounded T where { \
-   minBound = T minBound ; \
-   maxBound = T maxBound }
-
-#define INSTANCE_ENUM(T) \
-instance Enum T where { \
-   succ           (T i)             = T (succ i) ; \
-   pred           (T i)             = T (pred i) ; \
-   toEnum               x           = T (toEnum x) ; \
-   fromEnum       (T i)             = fromEnum i ; \
-   enumFrom       (T i)             = fakeMap T (enumFrom i) ; \
-   enumFromThen   (T i) (T j)       = fakeMap T (enumFromThen i j) ; \
-   enumFromTo     (T i) (T j)       = fakeMap T (enumFromTo i j) ; \
-   enumFromThenTo (T i) (T j) (T k) = fakeMap T (enumFromThenTo i j k) }
-
-#define INSTANCE_REAL(T) \
-instance Real T where { \
-   toRational (T i) = toRational i }
-
-#define INSTANCE_INTEGRAL(T) \
-instance Integral T where { \
-   (T i) `quot`    (T j) = T (i `quot` j) ; \
-   (T i) `rem`     (T j) = T (i `rem`  j) ; \
-   (T i) `div`     (T j) = T (i `div`  j) ; \
-   (T i) `mod`     (T j) = T (i `mod`  j) ; \
-   (T i) `quotRem` (T j) = let (q,r) = i `quotRem` j in (T q, T r) ; \
-   (T i) `divMod`  (T j) = let (d,m) = i `divMod`  j in (T d, T m) ; \
-   toInteger (T i)       = toInteger i }
-
-#define INSTANCE_BITS(T) \
-instance Bits T where { \
-  (T x) .&.     (T y)   = T (x .&.   y) ; \
-  (T x) .|.     (T y)   = T (x .|.   y) ; \
-  (T x) `xor`   (T y)   = T (x `xor` y) ; \
-  complement    (T x)   = T (complement x) ; \
-  shift         (T x) n = T (shift x n) ; \
-  rotate        (T x) n = T (rotate x n) ; \
-  bit                 n = T (bit n) ; \
-  setBit        (T x) n = T (setBit x n) ; \
-  clearBit      (T x) n = T (clearBit x n) ; \
-  complementBit (T x) n = T (complementBit x n) ; \
-  testBit       (T x) n = testBit x n ; \
-  bitSize       (T x)   = bitSize x ; \
-  isSigned      (T x)   = isSigned x }
-
-#define INSTANCE_FRACTIONAL(T) \
-instance Fractional T where { \
-   (T x) / (T y)  = T (x / y) ; \
-   recip   (T x)  = T (recip x) ; \
-   fromRational r = T (fromRational r) }
-
-#define INSTANCE_FLOATING(T) \
-instance Floating T where { \
-   pi                    = pi ; \
-   exp   (T x)           = T (exp   x) ; \
-   log   (T x)           = T (log   x) ; \
-   sqrt  (T x)           = T (sqrt  x) ; \
-   (T x) **        (T y) = T (x ** y) ; \
-   (T x) `logBase` (T y) = T (x `logBase` y) ; \
-   sin   (T x)           = T (sin   x) ; \
-   cos   (T x)           = T (cos   x) ; \
-   tan   (T x)           = T (tan   x) ; \
-   asin  (T x)           = T (asin  x) ; \
-   acos  (T x)           = T (acos  x) ; \
-   atan  (T x)           = T (atan  x) ; \
-   sinh  (T x)           = T (sinh  x) ; \
-   cosh  (T x)           = T (cosh  x) ; \
-   tanh  (T x)           = T (tanh  x) ; \
-   asinh (T x)           = T (asinh x) ; \
-   acosh (T x)           = T (acosh x) ; \
-   atanh (T x)           = T (atanh x) }
-
-#define INSTANCE_REALFRAC(T) \
-instance RealFrac T where { \
-   properFraction (T x) = let (m,y) = properFraction x in (m, T y) ; \
-   truncate (T x) = truncate x ; \
-   round    (T x) = round x ; \
-   ceiling  (T x) = ceiling x ; \
-   floor    (T x) = floor x }
-
-#define INSTANCE_REALFLOAT(T) \
-instance RealFloat T where { \
-   floatRadix     (T x) = floatRadix x ; \
-   floatDigits    (T x) = floatDigits x ; \
-   floatRange     (T x) = floatRange x ; \
-   decodeFloat    (T x) = decodeFloat x ; \
-   encodeFloat m n      = T (encodeFloat m n) ; \
-   exponent       (T x) = exponent x ; \
-   significand    (T x) = T (significand  x) ; \
-   scaleFloat n   (T x) = T (scaleFloat n x) ; \
-   isNaN          (T x) = isNaN x ; \
-   isInfinite     (T x) = isInfinite x ; \
-   isDenormalized (T x) = isDenormalized x ; \
-   isNegativeZero (T x) = isNegativeZero x ; \
-   isIEEE         (T x) = isIEEE x ; \
-   (T x) `atan2`  (T y) = T (x `atan2` y) }
-
-#define INSTANCE_STORABLE(T) \
-instance Storable T where { \
-   sizeOf    (T x)       = sizeOf x ; \
-   alignment (T x)       = alignment x ; \
-   peekElemOff a i       = liftM T (peekElemOff (castPtr a) i) ; \
-   pokeElemOff a i (T x) = pokeElemOff (castPtr a) i x }
-
-#else /* __GLASGOW_HASKELL__ */
-
---  // GHC can derive any class for a newtype, so we make use of that here...
-
-#define ARITHMETIC_CLASSES  Eq,Ord,Num,Enum,Storable,Real
-#define INTEGRAL_CLASSES Bounded,Integral,Bits
-#define FLOATING_CLASSES Fractional,Floating,RealFrac,RealFloat
-
-#define ARITHMETIC_TYPE(T,C,S,B) \
-newtype T = T B deriving (ARITHMETIC_CLASSES); \
-INSTANCE_READ(T,B); \
-INSTANCE_SHOW(T,B); \
-INSTANCE_TYPEABLE0(T,C,S) ;
-
-#define INTEGRAL_TYPE(T,C,S,B) \
-newtype T = T B deriving (ARITHMETIC_CLASSES, INTEGRAL_CLASSES); \
-INSTANCE_READ(T,B); \
-INSTANCE_SHOW(T,B); \
-INSTANCE_TYPEABLE0(T,C,S) ;
-
-#define FLOATING_TYPE(T,C,S,B) \
-newtype T = T B deriving (ARITHMETIC_CLASSES, FLOATING_CLASSES); \
-INSTANCE_READ(T,B); \
-INSTANCE_SHOW(T,B); \
-INSTANCE_TYPEABLE0(T,C,S) ;
-
-#define INSTANCE_READ(T,B) \
-instance Read T where { \
-   readsPrec            = unsafeCoerce# (readsPrec :: Int -> ReadS B); \
-   readList             = unsafeCoerce# (readList  :: ReadS [B]); }
-
-#define INSTANCE_SHOW(T,B) \
-instance Show T where { \
-   showsPrec            = unsafeCoerce# (showsPrec :: Int -> B -> ShowS); \
-   show                 = unsafeCoerce# (show :: B -> String); \
-   showList             = unsafeCoerce# (showList :: [B] -> ShowS); }
-
-#endif /* __GLASGOW_HASKELL__ */
-
-#endif
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBase.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBase.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBase.h
+++ /dev/null
@@ -1,757 +0,0 @@
-/* -----------------------------------------------------------------------------
- *
- * (c) The University of Glasgow 2001-2004
- *
- * Definitions for package `base' which are visible in Haskell land.
- *
- * Adapted for use in EHC
- *
- * ---------------------------------------------------------------------------*/
-
-#ifndef __HSBASE_H__
-#define __HSBASE_H__
-
-#include "HsBaseConfig.h"
-#ifdef __UHC_BUILDS_O__
-#include "rts.h"
-#endif
-
-/* ultra-evil... */
-#undef PACKAGE_BUGREPORT
-#undef PACKAGE_NAME
-#undef PACKAGE_STRING
-#undef PACKAGE_TARNAME
-#undef PACKAGE_VERSION
-
-/* Needed to get the macro version of errno on some OSs (eg. Solaris).
-   We must do this, because these libs are only compiled once, but
-   must work in both single-threaded and multi-threaded programs. */
-#define _REENTRANT 1
-
-#ifndef __UHC__
-#include "HsFFI.h"
-#endif /* !__UHC__ */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-#if HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-#if HAVE_SIGNAL_H
-#include <signal.h>
-/* Ultra-ugly: OpenBSD uses broken macros for sigemptyset and sigfillset (missing casts) */
-#if __OpenBSD__
-#undef sigemptyset
-#undef sigfillset
-#endif
-#endif
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#if HAVE_STRING_H
-#include <string.h>
-#endif
-#if HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-#if HAVE_UTIME_H
-#include <utime.h>
-#endif
-#if HAVE_SYS_UTSNAME_H
-#include <sys/utsname.h>
-#endif
-#if HAVE_GETTIMEOFDAY
-#  if HAVE_SYS_TIME_H
-#   include <sys/time.h>
-#  endif
-#elif HAVE_GETCLOCK
-# if HAVE_SYS_TIMERS_H
-#  define POSIX_4D9 1
-#  include <sys/timers.h>
-# endif
-#endif
-#if HAVE_TIME_H
-#include <time.h>
-#endif
-#if HAVE_SYS_TIMEB_H
-#include <sys/timeb.h>
-#endif
-#if HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-#if HAVE_SYS_TIMES_H
-#include <sys/times.h>
-#endif
-#if HAVE_WINSOCK_H && defined(__MINGW32__)
-#include <winsock.h>
-#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#if HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#elif HAVE_STDINT_H
-# include <stdint.h>
-#endif
-
-#if !defined(__MINGW32__) && !defined(irix_HOST_OS)
-# if HAVE_SYS_RESOURCE_H
-#  include <sys/resource.h>
-# endif
-#endif
-
-#if !HAVE_GETRUSAGE && HAVE_SYS_SYSCALL_H
-# include <sys/syscall.h>
-# if defined(SYS_GETRUSAGE)	/* hpux_HOST_OS */
-#  define getrusage(a, b)  syscall(SYS_GETRUSAGE, a, b)
-#  define HAVE_GETRUSAGE 1
-# endif
-#endif
-
-/* For System */
-#if HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#if HAVE_VFORK_H
-#include <vfork.h>
-#endif
-
-#ifndef __UHC__
-#include "dirUtils.h"
-#endif
-#ifndef __UHC__
-#include "WCsubst.h"
-#endif /* !__UHC__ */
-
-#if defined(__MINGW32__)
-/* in Win32Utils.c */
-extern void maperrno (void);
-extern HsWord64 getUSecOfDay(void);
-#endif
-
-#if defined(__MINGW32__)
-#include <io.h>
-#include <fcntl.h>
-#include <shlobj.h>
-#include <share.h>
-#endif
-
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-/* in inputReady.c */
-extern int fdReady(int fd, int write, int msecs, int isSock);
-
-#ifndef __UHC__
-/* in Signals.c */
-extern HsInt nocldstop;
-#endif /* !__UHC__ */
-
-#ifndef __UHC__
-/* -----------------------------------------------------------------------------
-   64-bit operations, defined in longlong.c
-   -------------------------------------------------------------------------- */
-
-#ifdef SUPPORT_LONG_LONGS
-
-HsBool hs_gtWord64 (HsWord64, HsWord64);
-HsBool hs_geWord64 (HsWord64, HsWord64);
-HsBool hs_eqWord64 (HsWord64, HsWord64);
-HsBool hs_neWord64 (HsWord64, HsWord64);
-HsBool hs_ltWord64 (HsWord64, HsWord64);
-HsBool hs_leWord64 (HsWord64, HsWord64);
-
-HsBool hs_gtInt64 (HsInt64, HsInt64);
-HsBool hs_geInt64 (HsInt64, HsInt64);
-HsBool hs_eqInt64 (HsInt64, HsInt64);
-HsBool hs_neInt64 (HsInt64, HsInt64);
-HsBool hs_ltInt64 (HsInt64, HsInt64);
-HsBool hs_leInt64 (HsInt64, HsInt64);
-
-HsWord64 hs_remWord64  (HsWord64, HsWord64);
-HsWord64 hs_quotWord64 (HsWord64, HsWord64);
-
-HsInt64 hs_remInt64    (HsInt64, HsInt64);
-HsInt64 hs_quotInt64   (HsInt64, HsInt64);
-HsInt64 hs_negateInt64 (HsInt64);
-HsInt64 hs_plusInt64   (HsInt64, HsInt64);
-HsInt64 hs_minusInt64  (HsInt64, HsInt64);
-HsInt64 hs_timesInt64  (HsInt64, HsInt64);
-
-HsWord64 hs_and64  (HsWord64, HsWord64);
-HsWord64 hs_or64   (HsWord64, HsWord64);
-HsWord64 hs_xor64  (HsWord64, HsWord64);
-HsWord64 hs_not64  (HsWord64);
-
-HsWord64 hs_uncheckedShiftL64   (HsWord64, HsInt);
-HsWord64 hs_uncheckedShiftRL64  (HsWord64, HsInt);
-HsInt64  hs_uncheckedIShiftL64  (HsInt64, HsInt);
-HsInt64  hs_uncheckedIShiftRA64 (HsInt64, HsInt);
-HsInt64  hs_uncheckedIShiftRL64 (HsInt64, HsInt);
-
-HsInt64  hs_intToInt64    (HsInt);
-HsInt    hs_int64ToInt    (HsInt64);
-HsWord64 hs_int64ToWord64 (HsInt64);
-HsWord64 hs_wordToWord64  (HsWord);
-HsWord   hs_word64ToWord  (HsWord64);
-HsInt64  hs_word64ToInt64 (HsWord64);
-
-HsWord64 hs_integerToWord64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);
-HsInt64  hs_integerToInt64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);
-
-#endif /* SUPPORT_LONG_LONGS */
-#endif /* !__UHC__ */
-
-/* -----------------------------------------------------------------------------
-   INLINE functions.
-
-   These functions are given as inlines here for when compiling via C,
-   but we also generate static versions into the cbits library for
-   when compiling to native code.
-   -------------------------------------------------------------------------- */
-
-#ifndef INLINE
-# if defined(_MSC_VER)
-#  define INLINE extern __inline
-# else
-#  define INLINE static inline
-# endif
-#endif
-
-INLINE int __hscore_get_errno(void) { return errno; }
-INLINE void __hscore_set_errno(int e) { errno = e; }
-
-#if !defined(_MSC_VER)
-INLINE int __hscore_s_isreg(mode_t m)  { return S_ISREG(m);  }
-INLINE int __hscore_s_isdir(mode_t m)  { return S_ISDIR(m);  }
-INLINE int __hscore_s_isfifo(mode_t m) { return S_ISFIFO(m); }
-INLINE int __hscore_s_isblk(mode_t m)  { return S_ISBLK(m);  }
-INLINE int __hscore_s_ischr(mode_t m)  { return S_ISCHR(m);  }
-#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
-INLINE int __hscore_s_issock(mode_t m) { return S_ISSOCK(m); }
-#endif
-#endif
-
-#if ( !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) ) || defined(__CYGWIN__)
-INLINE int
-__hscore_sigemptyset( sigset_t *set )
-{ return sigemptyset(set); }
-
-INLINE int
-__hscore_sigfillset( sigset_t *set )
-{ return sigfillset(set); }
-
-INLINE int
-__hscore_sigaddset( sigset_t * set, int s )
-{ return sigaddset(set,s); }
-
-INLINE int
-__hscore_sigdelset( sigset_t * set, int s )
-{ return sigdelset(set,s); }
-
-INLINE int
-__hscore_sigismember( sigset_t * set, int s )
-{ return sigismember(set,s); }
-#endif
-
-INLINE void *
-__hscore_memcpy_dst_off( char *dst, int dst_off, char *src, size_t sz )
-{ return memcpy(dst+dst_off, src, sz); }
-
-INLINE void *
-__hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz )
-{ return memcpy(dst, src+src_off, sz); }
-
-INLINE HsBool
-__hscore_supportsTextMode()
-{
-#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
-  return HS_BOOL_FALSE;
-#else
-  return HS_BOOL_TRUE;
-#endif
-}
-
-INLINE HsInt
-__hscore_bufsiz()
-{
-  return BUFSIZ;
-}
-
-INLINE int
-__hscore_seek_cur()
-{
-  return SEEK_CUR;
-}
-
-INLINE int
-__hscore_o_binary()
-{
-#if defined(_MSC_VER)
-  return O_BINARY;
-#else
-  return CONST_O_BINARY;
-#endif
-}
-
-INLINE int
-__hscore_o_rdonly()
-{
-#ifdef O_RDONLY
-  return O_RDONLY;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_wronly( void )
-{
-#ifdef O_WRONLY
-  return O_WRONLY;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_rdwr( void )
-{
-#ifdef O_RDWR
-  return O_RDWR;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_append( void )
-{
-#ifdef O_APPEND
-  return O_APPEND;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_creat( void )
-{
-#ifdef O_CREAT
-  return O_CREAT;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_excl( void )
-{
-#ifdef O_EXCL
-  return O_EXCL;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_trunc( void )
-{
-#ifdef O_TRUNC
-  return O_TRUNC;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_noctty( void )
-{
-#ifdef O_NOCTTY
-  return O_NOCTTY;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_o_nonblock( void )
-{
-#ifdef O_NONBLOCK
-  return O_NONBLOCK;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_seek_set( void )
-{
-  return SEEK_SET;
-}
-
-INLINE int
-__hscore_seek_end( void )
-{
-  return SEEK_END;
-}
-
-INLINE int
-__hscore_ftruncate( int fd, off_t where )
-{
-#if defined(HAVE_FTRUNCATE)
-  return ftruncate(fd,where);
-#elif defined(HAVE__CHSIZE)
-  return _chsize(fd,where);
-#else
-// ToDo: we should use _chsize_s() on Windows which allows a 64-bit
-// offset, but it doesn't seem to be available from mingw at this time 
-// --SDM (01/2008)
-#error at least ftruncate or _chsize functions are required to build
-#endif
-}
-
-#ifndef __UHC__
-INLINE int
-__hscore_setmode( int fd, HsBool toBin )
-{
-#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
-  return setmode(fd,(toBin == HS_BOOL_TRUE) ? _O_BINARY : _O_TEXT);
-#else
-  return 0;
-#endif
-}
-#endif /* !__UHC__ */
-
-#if __GLASGOW_HASKELL__
-
-INLINE int
-__hscore_PrelHandle_write( int fd, void *ptr, HsInt off, int sz )
-{
-  return write(fd,(char *)ptr + off, sz);
-}
-
-INLINE int
-__hscore_PrelHandle_read( int fd, void *ptr, HsInt off, int sz )
-{
-  return read(fd,(char *)ptr + off, sz);
-
-}
-
-#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
-INLINE int
-__hscore_PrelHandle_send( int fd, void *ptr, HsInt off, int sz )
-{
-    return send(fd,(char *)ptr + off, sz, 0);
-}
-
-INLINE int
-__hscore_PrelHandle_recv( int fd, void *ptr, HsInt off, int sz )
-{
-    return recv(fd,(char *)ptr + off, sz, 0);
-}
-#endif
-
-#endif /* __GLASGOW_HASKELL__ */
-
-INLINE int
-__hscore_mkdir( char *pathName, int mode )
-{
-#if ( defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) ) && !defined(__CYGWIN__)
-  return mkdir(pathName);
-#else
-  return mkdir(pathName,mode);
-#endif
-}
-
-INLINE int
-__hscore_lstat( const char *fname, struct stat *st )
-{
-#if HAVE_LSTAT
-  return lstat(fname, st);
-#else
-  return stat(fname, st);
-#endif
-}
-
-INLINE char *
-__hscore_d_name( struct dirent* d )
-{
-  return (d->d_name);
-}
-
-INLINE int
-__hscore_end_of_dir( void )
-{
-  return READDIR_ERRNO_EOF;
-}
-
-INLINE void
-__hscore_free_dirent(struct dirent *dEnt)
-{
-#if HAVE_READDIR_R
-  free(dEnt);
-#endif
-}
-
-#if defined(__MINGW32__)
-// We want the versions of stat/fstat/lseek that use 64-bit offsets,
-// and you have to ask for those explicitly.  Unfortunately there
-// doesn't seem to be a 64-bit version of truncate/ftruncate, so while
-// hFileSize and hSeek will work with large files, hSetFileSize will not.
-#define stat(file,buf)       _stati64(file,buf)
-#define fstat(fd,buf)        _fstati64(fd,buf)
-typedef struct _stati64 struct_stat;
-typedef off64_t stsize_t;
-#else
-typedef struct stat struct_stat;
-typedef off_t stsize_t;
-#endif
-
-INLINE HsInt
-__hscore_sizeof_stat( void )
-{
-  return sizeof(struct_stat);
-}
-
-INLINE time_t __hscore_st_mtime ( struct_stat* st ) { return st->st_mtime; }
-INLINE stsize_t __hscore_st_size  ( struct_stat* st ) { return st->st_size; }
-#if !defined(_MSC_VER)
-INLINE mode_t __hscore_st_mode  ( struct_stat* st ) { return st->st_mode; }
-INLINE dev_t  __hscore_st_dev  ( struct_stat* st ) { return st->st_dev; }
-INLINE ino_t  __hscore_st_ino  ( struct_stat* st ) { return st->st_ino; }
-#endif
-
-#if HAVE_TERMIOS_H
-INLINE tcflag_t __hscore_lflag( struct termios* ts ) { return ts->c_lflag; }
-
-INLINE void
-__hscore_poke_lflag( struct termios* ts, tcflag_t t ) { ts->c_lflag = t; }
-
-INLINE unsigned char*
-__hscore_ptr_c_cc( struct termios* ts )
-{ return (unsigned char*) &ts->c_cc; }
-
-INLINE HsInt
-__hscore_sizeof_termios( void )
-{
-#ifndef __MINGW32__
-  return sizeof(struct termios);
-#else
-  return 0;
-#endif
-}
-#endif
-
-//sizeof_sigset_t is also use on windows systems which define tcflat_t. Why exclude it?
-// #if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)
-INLINE HsInt
-__hscore_sizeof_sigset_t( void )
-{
-  return sizeof(sigset_t);
-}
-// #endif
-
-INLINE int
-__hscore_echo( void )
-{
-#ifdef ECHO
-  return ECHO;
-#else
-  return 0;
-#endif
-
-}
-
-INLINE int
-__hscore_tcsanow( void )
-{
-#ifdef TCSANOW
-  return TCSANOW;
-#else
-  return 0;
-#endif
-
-}
-
-INLINE int
-__hscore_icanon( void )
-{
-#ifdef ICANON
-  return ICANON;
-#else
-  return 0;
-#endif
-}
-
-INLINE int __hscore_vmin( void )
-{
-#ifdef VMIN
-  return VMIN;
-#else
-  return 0;
-#endif
-}
-
-INLINE int __hscore_vtime( void )
-{
-#ifdef VTIME
-  return VTIME;
-#else
-  return 0;
-#endif
-}
-
-INLINE int __hscore_sigttou( void )
-{
-#ifdef SIGTTOU
-  return SIGTTOU;
-#else
-  return 0;
-#endif
-}
-
-INLINE int __hscore_sig_block( void )
-{
-#ifdef SIG_BLOCK
-  return SIG_BLOCK;
-#else
-  return 0;
-#endif
-}
-
-INLINE int __hscore_sig_setmask( void )
-{
-#ifdef SIG_SETMASK
-  return SIG_SETMASK;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_f_getfl( void )
-{
-#ifdef F_GETFL
-  return F_GETFL;
-#else
-  return 0;
-#endif
-}
-
-INLINE int
-__hscore_f_setfl( void )
-{
-#ifdef F_SETFL
-  return F_SETFL;
-#else
-  return 0;
-#endif
-}
-
-// defined in rts/RtsStartup.c.
-extern void* __hscore_get_saved_termios(int fd);
-extern void __hscore_set_saved_termios(int fd, void* ts);
-
-INLINE int __hscore_hs_fileno (FILE *f) { return fileno (f); }
-
-INLINE int __hscore_open(char *file, int how, mode_t mode) {
-#ifdef __MINGW32__
-	if ((how & O_WRONLY) || (how & O_RDWR) || (how & O_APPEND))
-	  return _sopen(file,how,_SH_DENYRW,mode);
-	else
-	  return _sopen(file,how,_SH_DENYWR,mode);
-#else
-	return open(file,how,mode);
-#endif
-}
-
-// These are wrapped because on some OSs (eg. Linux) they are
-// macros which redirect to the 64-bit-off_t versions when large file
-// support is enabled.
-//
-#if defined(__MINGW32__)
-INLINE off64_t __hscore_lseek(int fd, off64_t off, int whence) {
-	return (_lseeki64(fd,off,whence));
-}
-#else
-INLINE off_t __hscore_lseek(int fd, off_t off, int whence) {
-	return (lseek(fd,off,whence));
-}
-#endif
-
-INLINE HsInt __hscore_stat(char *file, struct_stat *buf) {
-	return (stat(file,buf));
-}
-
-INLINE HsInt __hscore_fstat(int fd, struct_stat *buf) {
-	return (fstat(fd,buf));
-}
-
-// select-related stuff
-
-#if !defined(__MINGW32__)
-INLINE int  hsFD_SETSIZE(void) { return FD_SETSIZE; }
-INLINE int  hsFD_ISSET(int fd, fd_set *fds) { return FD_ISSET(fd, fds); }
-INLINE void hsFD_SET(int fd, fd_set *fds) { FD_SET(fd, fds); }
-INLINE HsInt sizeof_fd_set(void) { return sizeof(fd_set); }
-extern void hsFD_ZERO(fd_set *fds);
-#endif
-
-// gettimeofday()-related
-
-#if !defined(__MINGW32__)
-
-INLINE HsInt sizeofTimeVal(void) { return sizeof(struct timeval); }
-
-INLINE HsWord64 getUSecOfDay(void)
-{
-    struct timeval tv;
-    gettimeofday(&tv, (struct timezone *) NULL);
-    // Don't forget to cast *before* doing the arithmetic, otherwise
-    // the arithmetic happens at the type of tv_sec, which is probably
-    // only 'int'.
-    return ((HsWord64)tv.tv_sec * 1000000 + (HsWord64)tv.tv_usec);
-}
-
-INLINE void setTimevalTicks(struct timeval *p, HsWord64 usecs)
-{
-    p->tv_sec  = usecs / 1000000;
-    p->tv_usec = usecs % 1000000;
-}
-#endif /* !defined(__MINGW32__) */
-
-/* ToDo: write a feature test that doesn't assume 'environ' to
- *    be in scope at link-time. */
-extern char** environ;
-INLINE char **__hscore_environ() { return environ; }
-
-/* lossless conversions between pointers and integral types */
-INLINE void *    __hscore_from_uintptr(uintptr_t n) { return (void *)n; }
-INLINE void *    __hscore_from_intptr (intptr_t n)  { return (void *)n; }
-INLINE uintptr_t __hscore_to_uintptr  (void *p)     { return (uintptr_t)p; }
-INLINE intptr_t  __hscore_to_intptr   (void *p)     { return (intptr_t)p; }
-
-void errorBelch2(const char*s, char *t);
-void debugBelch2(const char*s, char *t);
-
-#endif /* __HSBASE_H__ */
-
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBaseConfig.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBaseConfig.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBaseConfig.h
+++ /dev/null
@@ -1,944 +0,0 @@
-/* ehclib/uhcbase/include/HsBaseConfig.h.  Generated from HsBaseConfig.h.in by configure.  */
-#ifndef HSBASECONFIG_H
-#define HSBASECONFIG_H
-
-#include "MachDeps.h"
-
-/********************************************************************/
-/**** Sizes                                                      ****/
-/********************************************************************/
-
-#if SIZEOF_INTPTR_T == 8
-#define HTYPE_INTPTR_T 			Int64
-#define HTYPE_UINTPTR_T 		Word64
-#else
-#define HTYPE_INTPTR_T 			Int32
-#define HTYPE_UINTPTR_T 		Word32
-#endif
-
-/* also here: typedef int sig_atomic_t
- */
-#if SIZEOF_INT == 8
-#define HTYPE_INT 				Int64
-#define HTYPE_UNSIGNED_INT 		Word64
-#define HTYPE_SIG_ATOMIC_T 		Word64
-#else
-#define HTYPE_INT 				Int32
-#define HTYPE_UNSIGNED_INT 		Word32
-#define HTYPE_SIG_ATOMIC_T 		Word32
-#endif
-
-#if SIZEOF_LONG == 8
-#define HTYPE_LONG 				Int64
-#define HTYPE_UNSIGNED_LONG 	Word64
-#else
-#define HTYPE_LONG 				Int32
-#define HTYPE_UNSIGNED_LONG 	Word32
-#endif
-
-#if SIZEOF_VOID_P == 8
-#define HTYPE_PTRDIFF_T 		Int64
-#else
-#define HTYPE_PTRDIFF_T 		Int32
-#endif
-
-#if SIZEOF_CLOCK_T == 8
-#define HTYPE_CLOCK_T 			Word64
-#else
-#define HTYPE_CLOCK_T 			Word32
-#endif
-
-#if SIZEOF_TIME_T == 8
-#define HTYPE_TIME_T 			Word64
-#else
-#define HTYPE_TIME_T 			Word32
-#endif
-
-#if SIZEOF_USECONDS_T == 8
-#define HTYPE_USECONDS_T 		Word64
-#else
-#define HTYPE_USECONDS_T 		Word32
-#endif
-
-#if SIZEOF_SIZE_T == 8
-#define HTYPE_SIZE_T 			Word64
-#else
-#define HTYPE_SIZE_T 			Word32
-#endif
-
-#if SIZEOF_WCHAR_T == 1
-#define HTYPE_WCHAR_T 			Word8
-#elif SIZEOF_WCHAR_T == 2
-#define HTYPE_WCHAR_T 			Word16
-#else
-#define HTYPE_WCHAR_T 			Word32
-#endif
-
-
-
-/* Define to Haskell type for char */
-#define HTYPE_CHAR Int8
-
-/* Define to Haskell type for double */
-#define HTYPE_DOUBLE Double
-
-/* Define to Haskell type for float */
-#define HTYPE_FLOAT Float
-
-/* Define to Haskell type for intmax_t */
-#define HTYPE_INTMAX_T Int64
-
-/* Define to Haskell type for long long */
-#define HTYPE_LONG_LONG Int64
-
-/* Define to Haskell type for short */
-#define HTYPE_SHORT Int16
-
-/* Define to Haskell type for signed char */
-#define HTYPE_SIGNED_CHAR Int8
-
-/* Define to Haskell type for uintmax_t */
-#define HTYPE_UINTMAX_T Word64
-
-/* Define to Haskell type for unsigned char */
-#define HTYPE_UNSIGNED_CHAR Word8
-
-/* Define to Haskell type for unsigned long long */
-#define HTYPE_UNSIGNED_LONG_LONG Word64
-
-/* Define to Haskell type for unsigned short */
-#define HTYPE_UNSIGNED_SHORT Word16
-
-
-
-/********************************************************************/
-/**** System tupes                                               ****/
-/********************************************************************/
-
-#ifdef SIZEOF_DEV_T
-# if SIZEOF_DEV_T == 8
-#  define HTYPE_DEV_T 			Word64
-# elif SIZEOF_DEV_T == 4
-#  define HTYPE_DEV_T 			Word32
-# elif SIZEOF_DEV_T == 2
-#  define HTYPE_DEV_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_INO_T
-# if SIZEOF_INO_T == 8
-#  define HTYPE_INO_T 			Word64
-# elif SIZEOF_INO_T == 4
-#  define HTYPE_INO_T 			Word32
-# elif SIZEOF_INO_T == 2
-#  define HTYPE_INO_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_MODE_T
-# if SIZEOF_MODE_T == 8
-#  define HTYPE_MODE_T 			Word64
-# elif SIZEOF_MODE_T == 4
-#  define HTYPE_MODE_T 			Word32
-# elif SIZEOF_MODE_T == 2
-#  define HTYPE_MODE_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_OFF_T
-# if SIZEOF_OFF_T == 8
-#  define HTYPE_OFF_T 			Word64
-# elif SIZEOF_OFF_T == 4
-#  define HTYPE_OFF_T 			Word32
-# elif SIZEOF_OFF_T == 2
-#  define HTYPE_OFF_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_PID_T
-# if SIZEOF_PID_T == 8
-#  define HTYPE_PID_T 			Word64
-# elif SIZEOF_PID_T == 4
-#  define HTYPE_PID_T 			Word32
-# elif SIZEOF_PID_T == 2
-#  define HTYPE_PID_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_SSIZE_T
-# if SIZEOF_SSIZE_T == 8
-#  define HTYPE_SSIZE_T 			Word64
-# elif SIZEOF_SSIZE_T == 4
-#  define HTYPE_SSIZE_T 			Word32
-# elif SIZEOF_SSIZE_T == 2
-#  define HTYPE_SSIZE_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_GID_T
-# if SIZEOF_GID_T == 8
-#  define HTYPE_GID_T 			Word64
-# elif SIZEOF_GID_T == 4
-#  define HTYPE_GID_T 			Word32
-# elif SIZEOF_GID_T == 2
-#  define HTYPE_GID_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_NLINK_T
-# if SIZEOF_NLINK_T == 8
-#  define HTYPE_NLINK_T 			Word64
-# elif SIZEOF_NLINK_T == 4
-#  define HTYPE_NLINK_T 			Word32
-# elif SIZEOF_NLINK_T == 2
-#  define HTYPE_NLINK_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_UID_T
-# if SIZEOF_UID_T == 8
-#  define HTYPE_UID_T 			Word64
-# elif SIZEOF_UID_T == 4
-#  define HTYPE_UID_T 			Word32
-# elif SIZEOF_UID_T == 2
-#  define HTYPE_UID_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_CC_T
-# if SIZEOF_CC_T == 8
-#  define HTYPE_CC_T 			Word64
-# elif SIZEOF_CC_T == 4
-#  define HTYPE_CC_T 			Word32
-# elif SIZEOF_CC_T == 2
-#  define HTYPE_CC_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_SPEED_T
-# if SIZEOF_SPEED_T == 8
-#  define HTYPE_SPEED_T 			Word64
-# elif SIZEOF_SPEED_T == 4
-#  define HTYPE_SPEED_T 			Word32
-# elif SIZEOF_SPEED_T == 2
-#  define HTYPE_SPEED_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_TCFLAG_T
-# if SIZEOF_TCFLAG_T == 8
-#  define HTYPE_TCFLAG_T 			Word64
-# elif SIZEOF_TCFLAG_T == 4
-#  define HTYPE_TCFLAG_T 			Word32
-# elif SIZEOF_TCFLAG_T == 2
-#  define HTYPE_TCFLAG_T 			Word16
-# else
-# endif
-#endif
-
-#ifdef SIZEOF_RLIM_T
-# if SIZEOF_RLIM_T == 8
-#  define HTYPE_RLIM_T 			Word64
-# elif SIZEOF_RLIM_T == 4
-#  define HTYPE_RLIM_T 			Word32
-# elif SIZEOF_RLIM_T == 2
-#  define HTYPE_RLIM_T 			Word16
-# else
-# endif
-#endif
-
-/********************************************************************/
-/**** Presence of include files                                  ****/
-/********************************************************************/
-
-#define HAVE_DIRENT_H 1
-#define HAVE_ERRNO_H 1
-#define HAVE_FCNTL_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_RESOURCE_H 1
-#define HAVE_SYS_SELECT_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYS_SYSCALL_H 1
-#define HAVE_SYS_TIME_H 1
-#define HAVE_SYS_TIMEB_H 1
-/* #undef HAVE_SYS_TIMERS_H */
-#define HAVE_SYS_TIMES_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_UTSNAME_H 1
-#define HAVE_SYS_WAIT_H 1
-#define HAVE_TERMIOS_H 1
-#define HAVE_TIME_H 1
-#define HAVE_UNISTD_H 1
-#define HAVE_UTIME_H 1
-/* #undef HAVE_VFORK_H */
-#define HAVE_WCTYPE_H 1
-/* #undef HAVE_WINDOWS_H */
-/* #undef HAVE_WINSOCK_H */
-
-/* #undef HAVE__CHSIZE */
-#define HAVE_FTRUNCATE 1
-/* #undef HAVE_GETCLOCK */
-#define HAVE_GETRUSAGE 1
-#define HAVE_GETTIMEOFDAY 1
-#define HAVE_LSTAT 1
-#define HAVE_READDIR_R 1
-
-/********************************************************************/
-/**** Runtime types                                              ****/
-/********************************************************************/
-
-#ifdef __UHC_BUILDS_O__
-
-#if defined(__UHC_TARGET_BC__) || defined(__UHC_TARGET_C__)
-// # define HsBool				Word
-// # define HsInt				Word
-// # define HsWord64			Word64
-// # define HsWord32			Word32
-// # define HsWord16			Word16
-// # define HsWord8			Word8
-// # ifdef __UHC_TARGET_BC__
-// #  define HS_BOOL_FALSE		gb_False
-// #  define HS_BOOL_TRUE		gb_True
-// # else
-// #  define HS_BOOL_FALSE		0
-// #  define HS_BOOL_TRUE		1
-// # endif
-#endif /* __UHC_TARGET_BC__ */
-
-#endif /* __UHC_BUILDS_O__ */
-
-/********************************************************************/
-/**** Read dir EOF error                                         ****/
-/********************************************************************/
-
-/* See remarks in GHC, libraries/base/aclocal.m4: MinGW platform returns non 0 value. We ignore that */
-#define	READDIR_ERRNO_EOF	0
-
-/********************************************************************/
-/**** C errors                                                   ****/
-/********************************************************************/
-
-/* (1) Assume errno.h is already included */
-/* (2) Error codes like EADV are not present on all platforms, so a dummy value is provided, this should be done for all codes */
-
-/* The value of E2BIG. */
-#if !defined(E2BIG)
-#define E2BIG 10000
-#endif
-#define CONST_E2BIG E2BIG
-
-/* The value of EACCES. */
-#if !defined(EACCES)
-#define EACCES 10000
-#endif
-#define CONST_EACCES EACCES
-
-/* The value of EADDRINUSE. */
-#if !defined(EADDRINUSE)
-#define EADDRINUSE 10000
-#endif
-#define CONST_EADDRINUSE EADDRINUSE
-
-/* The value of EADDRNOTAVAIL. */
-#define CONST_EADDRNOTAVAIL EADDRNOTAVAIL
-
-/* The value of EADV. */
-#if !defined(EADV)
-#define EADV 10000
-#endif
-#define CONST_EADV EADV
-
-/* The value of EAFNOSUPPORT. */
-#if !defined(EAFNOSUPPORT)
-#define EAFNOSUPPORT 10000
-#endif
-#define CONST_EAFNOSUPPORT EAFNOSUPPORT
-
-/* The value of EAGAIN. */
-#if !defined(EAGAIN)
-#define EAGAIN 10000
-#endif
-#define CONST_EAGAIN EAGAIN
-
-/* The value of EALREADY. */
-#if !defined(EALREADY)
-#define EALREADY 10000
-#endif
-#define CONST_EALREADY EALREADY
-
-/* The value of EBADF. */
-#if !defined(EBADF)
-#define EBADF 10000
-#endif
-#define CONST_EBADF EBADF
-
-/* The value of EBADMSG. */
-#if !defined(EBADMSG)
-#define EBADMSG 10000
-#endif
-#define CONST_EBADMSG EBADMSG
-
-/* The value of EBADRPC. */
-#if !defined(EBADRPC)
-#define EBADRPC 10000
-#endif
-#define CONST_EBADRPC EBADRPC
-
-/* The value of EBUSY. */
-#if !defined(EBUSY)
-#define EBUSY 10000
-#endif
-#define CONST_EBUSY EBUSY
-
-/* The value of ECHILD. */
-#if !defined(ECHILD)
-#define ECHILD 10000
-#endif
-#define CONST_ECHILD ECHILD
-
-/* The value of ECOMM. */
-#if !defined(ECOMM)
-#define ECOMM 10000
-#endif
-#define CONST_ECOMM ECOMM
-
-/* The value of ECONNABORTED. */
-#if !defined(ECONNABORTED)
-#define ECONNABORTED 10000
-#endif
-#define CONST_ECONNABORTED ECONNABORTED
-
-/* The value of ECONNREFUSED. */
-#if !defined(ECONNREFUSED)
-#define ECONNREFUSED 10000
-#endif
-#define CONST_ECONNREFUSED ECONNREFUSED
-
-/* The value of ECONNRESET. */
-#if !defined(ECONNRESET)
-#define ECONNRESET 10000
-#endif
-#define CONST_ECONNRESET ECONNRESET
-
-/* The value of EDEADLK. */
-#if !defined(EDEADLK)
-#define EDEADLK 10000
-#endif
-#define CONST_EDEADLK EDEADLK
-
-/* The value of EDESTADDRREQ. */
-#if !defined(EDESTADDRREQ)
-#define EDESTADDRREQ 10000
-#endif
-#define CONST_EDESTADDRREQ EDESTADDRREQ
-
-/* The value of EDIRTY. */
-#if !defined(EDIRTY)
-#define EDIRTY 10000
-#endif
-#define CONST_EDIRTY EDIRTY
-
-/* The value of EDOM. */
-#if !defined(EDOM)
-#define EDOM 10000
-#endif
-#define CONST_EDOM EDOM
-
-/* The value of EDQUOT. */
-#if !defined(EDQUOT)
-#define EDQUOT 10000
-#endif
-#define CONST_EDQUOT EDQUOT
-
-/* The value of EEXIST. */
-#if !defined(EEXIST)
-#define EEXIST 10000
-#endif
-#define CONST_EEXIST EEXIST
-
-/* The value of EFAULT. */
-#if !defined(EFAULT)
-#define EFAULT 10000
-#endif
-#define CONST_EFAULT EFAULT
-
-/* The value of EFBIG. */
-#if !defined(EFBIG)
-#define EFBIG 10000
-#endif
-#define CONST_EFBIG EFBIG
-
-/* The value of EFTYPE. */
-#if !defined(EFTYPE)
-#define EFTYPE 10000
-#endif
-#define CONST_EFTYPE EFTYPE
-
-/* The value of EHOSTDOWN. */
-#if !defined(EHOSTDOWN)
-#define EHOSTDOWN 10000
-#endif
-#define CONST_EHOSTDOWN EHOSTDOWN
-
-/* The value of EHOSTUNREACH. */
-#if !defined(EHOSTUNREACH)
-#define EHOSTUNREACH 10000
-#endif
-#define CONST_EHOSTUNREACH EHOSTUNREACH
-
-/* The value of EIDRM. */
-#if !defined(EIDRM)
-#define EIDRM 10000
-#endif
-#define CONST_EIDRM EIDRM
-
-/* The value of EILSEQ. */
-#if !defined(EILSEQ)
-#define EILSEQ 10000
-#endif
-#define CONST_EILSEQ EILSEQ
-
-/* The value of EINPROGRESS. */
-#if !defined(EINPROGRESS)
-#define EINPROGRESS 10000
-#endif
-#define CONST_EINPROGRESS EINPROGRESS
-
-/* The value of EINTR. */
-#if !defined(EINTR)
-#define EINTR 10000
-#endif
-#define CONST_EINTR EINTR
-
-/* The value of EINVAL. */
-#if !defined(EINVAL)
-#define EINVAL 10000
-#endif
-#define CONST_EINVAL EINVAL
-
-/* The value of EIO. */
-#if !defined(EIO)
-#define EIO 10000
-#endif
-#define CONST_EIO EIO
-
-/* The value of EISCONN. */
-#if !defined(EISCONN)
-#define EISCONN 10000
-#endif
-#define CONST_EISCONN EISCONN
-
-/* The value of EISDIR. */
-#if !defined(EISDIR)
-#define EISDIR 10000
-#endif
-#define CONST_EISDIR EISDIR
-
-/* The value of ELOOP. */
-#if !defined(ELOOP)
-#define ELOOP 10000
-#endif
-#define CONST_ELOOP ELOOP
-
-/* The value of EMFILE. */
-#if !defined(EMFILE)
-#define EMFILE 10000
-#endif
-#define CONST_EMFILE EMFILE
-
-/* The value of EMLINK. */
-#if !defined(EMLINK)
-#define EMLINK 10000
-#endif
-#define CONST_EMLINK EMLINK
-
-/* The value of EMSGSIZE. */
-#if !defined(EMSGSIZE)
-#define EMSGSIZE 10000
-#endif
-#define CONST_EMSGSIZE EMSGSIZE
-
-/* The value of EMULTIHOP. */
-#if !defined(EMULTIHOP)
-#define EMULTIHOP 10000
-#endif
-#define CONST_EMULTIHOP EMULTIHOP
-
-/* The value of ENAMETOOLONG. */
-#if !defined(ENAMETOOLONG)
-#define ENAMETOOLONG 10000
-#endif
-#define CONST_ENAMETOOLONG ENAMETOOLONG
-
-/* The value of ENETDOWN. */
-#if !defined(ENETDOWN)
-#define ENETDOWN 10000
-#endif
-#define CONST_ENETDOWN ENETDOWN
-
-/* The value of ENETRESET. */
-#if !defined(ENETRESET)
-#define ENETRESET 10000
-#endif
-#define CONST_ENETRESET ENETRESET
-
-/* The value of ENETUNREACH. */
-#if !defined(ENETUNREACH)
-#define ENETUNREACH 10000
-#endif
-#define CONST_ENETUNREACH ENETUNREACH
-
-/* The value of ENFILE. */
-#if !defined(ENFILE)
-#define ENFILE 10000
-#endif
-#define CONST_ENFILE ENFILE
-
-/* The value of ENOBUFS. */
-#if !defined(ENOBUFS)
-#define ENOBUFS 10000
-#endif
-#define CONST_ENOBUFS ENOBUFS
-
-/* The value of ENOCIGAR. */
-#if !defined(ENOCIGAR)
-#define ENOCIGAR 10000
-#endif
-#define CONST_ENOCIGAR ENOCIGAR
-
-/* The value of ENODATA. */
-#if !defined(ENODATA)
-#define ENODATA 10000
-#endif
-#define CONST_ENODATA ENODATA
-
-/* The value of ENODEV. */
-#if !defined(ENODEV)
-#define ENODEV 10000
-#endif
-#define CONST_ENODEV ENODEV
-
-/* The value of ENOENT. */
-#if !defined(ENOENT)
-#define ENOENT 10000
-#endif
-#define CONST_ENOENT ENOENT
-
-/* The value of ENOEXEC. */
-#if !defined(ENOEXEC)
-#define ENOEXEC 10000
-#endif
-#define CONST_ENOEXEC ENOEXEC
-
-/* The value of ENOLCK. */
-#if !defined(ENOLCK)
-#define ENOLCK 10000
-#endif
-#define CONST_ENOLCK ENOLCK
-
-/* The value of ENOLINK. */
-#if !defined(ENOLINK)
-#define ENOLINK 10000
-#endif
-#define CONST_ENOLINK ENOLINK
-
-/* The value of ENOMEM. */
-#if !defined(ENOMEM)
-#define ENOMEM 10000
-#endif
-#define CONST_ENOMEM ENOMEM
-
-/* The value of ENOMSG. */
-#if !defined(ENOMSG)
-#define ENOMSG 10000
-#endif
-#define CONST_ENOMSG ENOMSG
-
-/* The value of ENONET. */
-#if !defined(ENONET)
-#define ENONET 10000
-#endif
-#define CONST_ENONET ENONET
-
-/* The value of ENOPROTOOPT. */
-#if !defined(ENOPROTOOPT)
-#define ENOPROTOOPT 10000
-#endif
-#define CONST_ENOPROTOOPT ENOPROTOOPT
-
-/* The value of ENOSPC. */
-#if !defined(ENOSPC)
-#define ENOSPC 10000
-#endif
-#define CONST_ENOSPC ENOSPC
-
-/* The value of ENOSR. */
-#if !defined(ENOSR)
-#define ENOSR 10000
-#endif
-#define CONST_ENOSR ENOSR
-
-/* The value of ENOSTR. */
-#if !defined(ENOSTR)
-#define ENOSTR 10000
-#endif
-#define CONST_ENOSTR ENOSTR
-
-/* The value of ENOSYS. */
-#if !defined(ENOSYS)
-#define ENOSYS 10000
-#endif
-#define CONST_ENOSYS ENOSYS
-
-/* The value of ENOTBLK. */
-#if !defined(ENOTBLK)
-#define ENOTBLK 10000
-#endif
-#define CONST_ENOTBLK ENOTBLK
-
-/* The value of ENOTCONN. */
-#if !defined(ENOTCONN)
-#define ENOTCONN 10000
-#endif
-#define CONST_ENOTCONN ENOTCONN
-
-/* The value of ENOTDIR. */
-#if !defined(ENOTDIR)
-#define ENOTDIR 10000
-#endif
-#define CONST_ENOTDIR ENOTDIR
-
-/* The value of ENOTEMPTY. */
-#if !defined(ENOTEMPTY)
-#define ENOTEMPTY 10000
-#endif
-#define CONST_ENOTEMPTY ENOTEMPTY
-
-/* The value of ENOTSOCK. */
-#if !defined(ENOTSOCK)
-#define ENOTSOCK 10000
-#endif
-#define CONST_ENOTSOCK ENOTSOCK
-
-/* The value of ENOTTY. */
-#if !defined(ENOTTY)
-#define ENOTTY 10000
-#endif
-#define CONST_ENOTTY ENOTTY
-
-/* The value of ENXIO. */
-#if !defined(ENXIO)
-#define ENXIO 10000
-#endif
-#define CONST_ENXIO ENXIO
-
-/* The value of EOPNOTSUPP. */
-#if !defined(EOPNOTSUPP)
-#define EOPNOTSUPP 10000
-#endif
-#define CONST_EOPNOTSUPP EOPNOTSUPP
-
-/* The value of EPERM. */
-#if !defined(EPERM)
-#define EPERM 10000
-#endif
-#define CONST_EPERM EPERM
-
-/* The value of EPFNOSUPPORT. */
-#if !defined(EPFNOSUPPORT)
-#define EPFNOSUPPORT 10000
-#endif
-#define CONST_EPFNOSUPPORT EPFNOSUPPORT
-
-/* The value of EPIPE. */
-#if !defined(EPIPE)
-#define EPIPE 10000
-#endif
-#define CONST_EPIPE EPIPE
-
-/* The value of EPROCLIM. */
-#if !defined(EPROCLIM)
-#define EPROCLIM 10000
-#endif
-#define CONST_EPROCLIM EPROCLIM
-
-/* The value of EPROCUNAVAIL. */
-#if !defined(EPROCUNAVAIL)
-#define EPROCUNAVAIL 10000
-#endif
-#define CONST_EPROCUNAVAIL EPROCUNAVAIL
-
-/* The value of EPROGMISMATCH. */
-#if !defined(EPROGMISMATCH)
-#define EPROGMISMATCH 10000
-#endif
-#define CONST_EPROGMISMATCH EPROGMISMATCH
-
-/* The value of EPROGUNAVAIL. */
-#if !defined(EPROGUNAVAIL)
-#define EPROGUNAVAIL 10000
-#endif
-#define CONST_EPROGUNAVAIL EPROGUNAVAIL
-
-/* The value of EPROTO. */
-#if !defined(EPROTO)
-#define EPROTO 10000
-#endif
-#define CONST_EPROTO EPROTO
-
-/* The value of EPROTONOSUPPORT. */
-#if !defined(EPROTONOSUPPORT)
-#define EPROTONOSUPPORT 10000
-#endif
-#define CONST_EPROTONOSUPPORT EPROTONOSUPPORT
-
-/* The value of EPROTOTYPE. */
-#if !defined(EPROTOTYPE)
-#define EPROTOTYPE 10000
-#endif
-#define CONST_EPROTOTYPE EPROTOTYPE
-
-/* The value of ERANGE. */
-#if !defined(ERANGE)
-#define ERANGE 10000
-#endif
-#define CONST_ERANGE ERANGE
-
-/* The value of EREMCHG. */
-#if !defined(EREMCHG)
-#define EREMCHG 10000
-#endif
-#define CONST_EREMCHG EREMCHG
-
-/* The value of EREMOTE. */
-#if !defined(EREMOTE)
-#define EREMOTE 10000
-#endif
-#define CONST_EREMOTE EREMOTE
-
-/* The value of EROFS. */
-#if !defined(EROFS)
-#define EROFS 10000
-#endif
-#define CONST_EROFS EROFS
-
-/* The value of ERPCMISMATCH. */
-#if !defined(ERPCMISMATCH)
-#define ERPCMISMATCH 10000
-#endif
-#define CONST_ERPCMISMATCH ERPCMISMATCH
-
-/* The value of ERREMOTE. */
-#if !defined(ERREMOTE)
-#define ERREMOTE 10000
-#endif
-#define CONST_ERREMOTE ERREMOTE
-
-/* The value of ESHUTDOWN. */
-#if !defined(ESHUTDOWN)
-#define ESHUTDOWN 10000
-#endif
-#define CONST_ESHUTDOWN ESHUTDOWN
-
-/* The value of ESOCKTNOSUPPORT. */
-#if !defined(ESOCKTNOSUPPORT)
-#define ESOCKTNOSUPPORT 10000
-#endif
-#define CONST_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
-
-/* The value of ESPIPE. */
-#if !defined(ESPIPE)
-#define ESPIPE 10000
-#endif
-#define CONST_ESPIPE ESPIPE
-
-/* The value of ESRCH. */
-#if !defined(ESRCH)
-#define ESRCH 10000
-#endif
-#define CONST_ESRCH ESRCH
-
-/* The value of ESRMNT. */
-#if !defined(ESRMNT)
-#define ESRMNT 10000
-#endif
-#define CONST_ESRMNT ESRMNT
-
-/* The value of ESTALE. */
-#if !defined(ESTALE)
-#define ESTALE 10000
-#endif
-#define CONST_ESTALE ESTALE
-
-/* The value of ETIME. */
-#if !defined(ETIME)
-#define ETIME 10000
-#endif
-#define CONST_ETIME ETIME
-
-/* The value of ETIMEDOUT. */
-#if !defined(ETIMEDOUT)
-#define ETIMEDOUT 10000
-#endif
-#define CONST_ETIMEDOUT ETIMEDOUT
-
-/* The value of ETOOMANYREFS. */
-#if !defined(ETOOMANYREFS)
-#define ETOOMANYREFS 10000
-#endif
-#define CONST_ETOOMANYREFS ETOOMANYREFS
-
-/* The value of ETXTBSY. */
-#if !defined(ETXTBSY)
-#define ETXTBSY 10000
-#endif
-#define CONST_ETXTBSY ETXTBSY
-
-/* The value of EUSERS. */
-#if !defined(EUSERS)
-#define EUSERS 10000
-#endif
-#define CONST_EUSERS EUSERS
-
-/* The value of EWOULDBLOCK. */
-#if !defined(EWOULDBLOCK)
-#define EWOULDBLOCK 10000
-#endif
-#define CONST_EWOULDBLOCK EWOULDBLOCK
-
-/* The value of EXDEV. */
-#if !defined(EXDEV)
-#define EXDEV 10000
-#endif
-#define CONST_EXDEV EXDEV
-
-/* The value of O_BINARY. */
-#if !defined(O_BINARY)
-#define O_BINARY 10000
-#endif
-#define CONST_O_BINARY O_BINARY
-
-/* The value of SIGINT. */
-#if !defined(SIGINT)
-#define SIGINT 10000
-#endif
-#define CONST_SIGINT SIGINT
-
-
-#endif
-
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/IntLikeInstance.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/IntLikeInstance.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/IntLikeInstance.h
+++ /dev/null
@@ -1,242 +0,0 @@
-{- --------------------------------------------------------------------------
-// Macros to help make various instances for Int like types (Int8, ...).
-//
-// Primitives are defined by 2 forms of macros:
-//  - starting with PRIMS_  : name of Haskell function and primitive is the same
-//  - starting with PRIMS2_ : name of primitive is given explicitly, to allow sharing between primitives
-// --------------------------------------------------------------------------
--}
-
--- define conversion primitives
-#define PRIMS_CONVERSION_INTEGER(tycon,primIntegerTo,primToInteger) \
-foreign import prim primIntegerTo :: Integer -> tycon ; \
-foreign import prim primToInteger :: tycon -> Integer 
-
-#define PRIMS2_CONVERSION_INTEGER(tycon,primIntegerTo,primIntegerToNm,primToInteger,primToIntegerNm) \
-foreign import prim primIntegerToNm primIntegerTo :: Integer -> tycon ; \
-foreign import prim primToIntegerNm primToInteger :: tycon -> Integer 
-
-#define PRIMS_CONVERSION_INT(tycon,primIntTo,primToInt) \
-foreign import prim primIntTo     :: Int -> tycon ; \
-foreign import prim primToInt     :: tycon -> Int 
-
-
--- define Eq primitives
-#define PRIMS_EQ(tycon,primEq,primNe) \
-foreign import prim primEq      :: tycon -> tycon -> Bool ; \
-foreign import prim primNe      :: tycon -> tycon -> Bool 
-
-#define PRIMS2_EQ(tycon,primEq,primEqNm,primNe,primNeNm) \
-foreign import prim primEqNm primEq     :: tycon -> tycon -> Bool ; \
-foreign import prim primNeNm primNe     :: tycon -> tycon -> Bool
-
-
--- define Eq instance
-#define INSTANCE_EQ(tycon,primEq,primNe) \
-instance Eq tycon where \
-  { (==) = primEq ; \
-  	(/=) = primNe \
-  }
-
-
--- define Ord primitives
-
-#define PRIMS_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \
-foreign import prim primCmp     :: tycon -> tycon -> Ordering ; \
-foreign import prim primLt      :: tycon -> tycon -> Bool ; \
-foreign import prim primGt      :: tycon -> tycon -> Bool ; \
-foreign import prim primLe      :: tycon -> tycon -> Bool ; \
-foreign import prim primGe      :: tycon -> tycon -> Bool 
-
-#define PRIMS2_ORD(tycon,primCmp,primCmpNm,primLt,primLtNm,primGt,primGtNm,primLe,primLeNm,primGe,primGeNm) \
-foreign import prim primCmpNm primCmp     :: tycon -> tycon -> Ordering ; \
-foreign import prim primLtNm primLt      :: tycon -> tycon -> Bool ; \
-foreign import prim primGtNm primGt      :: tycon -> tycon -> Bool ; \
-foreign import prim primLeNm primLe      :: tycon -> tycon -> Bool ; \
-foreign import prim primGeNm primGe      :: tycon -> tycon -> Bool 
-
-
--- define Ord instance
-
-#define INSTANCE_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \
-instance Ord tycon where \
-  { compare = primCmp \
-  ; (<) = primLt \
-  ; (>) = primGt \
-  ; (<=) = primLe \
-  ; (>=) = primGe \
-  }
-
-
--- define Bounded primitives
-#define PRIMS_BOUNDED(tycon,primMin,primMax) \
-foreign import prim primMin     :: tycon ; \
-foreign import prim primMax     :: tycon 
-
-
--- define Bounded instance
-#define INSTANCE_BOUNDED(tycon,primMin,primMax) \
-instance Bounded tycon where \
-  { minBound = primMin \
-  ; maxBound = primMax \
-  }
-
-
--- define Num primitives
-#define PRIMS_NUM(tycon,primAdd,primSub,primMul,primNeg) \
-foreign import prim primAdd       :: tycon -> tycon -> tycon ; \
-foreign import prim primSub       :: tycon -> tycon -> tycon ; \
-foreign import prim primMul       :: tycon -> tycon -> tycon ; \
-foreign import prim primNeg       :: tycon -> tycon 
-
-#define PRIMS2_NUM(tycon,primAdd,primAddNm,primSub,primSubNm,primMul,primMulNm,primNeg,primNegNm) \
-foreign import prim primAddNm 			primAdd       :: tycon -> tycon -> tycon ; \
-foreign import prim primSubNm 			primSub       :: tycon -> tycon -> tycon ; \
-foreign import prim primMulNm 			primMul       :: tycon -> tycon -> tycon ; \
-foreign import prim primNegNm 			primNeg       :: tycon -> tycon 
-
-
--- define Num instance
-#define INSTANCE_NUM(tycon,primAdd,primSub,primMul,primNeg,primIntegerTo,primIntTo) \
-instance Num tycon where \
-  { (+)         = primAdd \
-  ; (-)         = primSub \
-  ; (*)         = primMul \
-  ; negate      = primNeg \
-  ; fromInteger = primIntegerTo \
-  ; fromInt     = primIntTo \
-  ; abs         = absReal \
-  ; signum      = signumReal \
-  }
-
-
--- define Enum instance
-#define INSTANCE_ENUM(tycon,primToEnum,primFromEnum) \
-instance Enum tycon where \
-  { succ           = boundedSucc \
-  ; pred           = boundedPred \
-  ; toEnum         = primToEnum \
-  ; fromEnum       = primFromEnum \
-  ; enumFrom       = boundedEnumFrom \
-  ; enumFromTo     = boundedEnumFromTo \
-  ; enumFromThen   = boundedEnumFromThen \
-  ; enumFromThenTo = boundedEnumFromThenTo \
-  }
-
-
--- define Real instance
-#define INSTANCE_REAL(tycon) \
-instance Real tycon where \
-  { toRational x = toInteger x % 1 \
-  }
-
-
--- define Integral primitives
-#define PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) \
-foreign import prim primDiv       :: tycon -> tycon -> tycon ; \
-foreign import prim primMod       :: tycon -> tycon -> tycon ; \
-foreign import prim primQuot      :: tycon -> tycon -> tycon ; \
-foreign import prim primRem       :: tycon -> tycon -> tycon 
-
-#define PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primRemNm) \
-foreign import prim primDivNm 			primDiv       :: tycon -> tycon -> tycon ; \
-foreign import prim primModNm 			primMod       :: tycon -> tycon -> tycon ; \
-foreign import prim primQuotNm 			primQuot      :: tycon -> tycon -> tycon ; \
-foreign import prim primRemNm 			primRem       :: tycon -> tycon -> tycon 
-
-#define PRIMS_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem) \
-PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) ; \
-foreign import prim primDivMod    :: tycon -> tycon -> (tycon,tycon) ; \
-foreign import prim primQuotRem   :: tycon -> tycon -> (tycon,tycon) 
-
-#define PRIMS2_INTEGRAL2(tycon,primDiv,primDivNm,primMod,primModNm,primDivMod,primDivModNm,primQuot,primQuotNm,primRem,primRemNm,primQuotRem,primQuotRemNm) \
-PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primQuotRemNm) ; \
-foreign import prim primDivModNm 	primDivMod    :: tycon -> tycon -> (tycon,tycon) ; \
-foreign import prim primQuotRemNm 	primQuotRem   :: tycon -> tycon -> (tycon,tycon) 
-
-
--- define Integral instance, assume default for divMod
-#define INSTANCE_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem,primToInteger,primToInt) \
-instance Integral tycon where \
-  { quotRem d m \
-              = (primQuot d m, primRem d m) \
-  ; div       = primDiv \
-  ; quot      = primQuot \
-  ; rem       = primRem \
-  ; mod       = primMod \
-  ; toInteger = primToInteger \
-  ; toInt     = primToInt \
-  }
-
-#define INSTANCE_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem,primToInteger,primToInt) \
-instance Integral tycon where \
-  { divMod    = primDivMod \
-  ; quotRem   = primQuotRem \
-  ; div       = primDiv \
-  ; quot      = primQuot \
-  ; rem       = primRem \
-  ; mod       = primMod \
-  ; toInteger = primToInteger \
-  ; toInt     = primToInt \
-  }
-
-
--- define Show instance
-#define INSTANCE_SHOW(tycon) \
-instance Show tycon where \
-  { show = show . toInteger \
-  }
-
-
--- define Read instance
-#define INSTANCE_READ(tycon) \
-instance Read tycon where \
-  { readsPrec p = readSigned readDec \
-  }
-
-
--- define Bits primitives
-#define PRIMS_BITLOGIC(tycon,primAnd,primOr,primXor) \
-foreign import prim primAnd       	:: tycon -> tycon -> tycon ; \
-foreign import prim primOr       	:: tycon -> tycon -> tycon ; \
-foreign import prim primXor      	:: tycon -> tycon -> tycon
-
-#define PRIMS_BITSHIFT(tycon,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \
-foreign import prim primComplement	:: tycon -> tycon ; \
-foreign import prim primShiftLeft  	:: tycon -> Int -> tycon ; \
-foreign import prim primShiftRight 	:: tycon -> Int -> tycon ; \
-foreign import prim primRotateLeft  :: tycon -> Int -> tycon ; \
-foreign import prim primRotateRight :: tycon -> Int -> tycon
-
-#define PRIMS2_BITLOGIC(tycon,primAnd,primAndNm,primOr,primOrNm,primXor,primXorNm) \
-foreign import prim primAndNm       	primAnd       	:: tycon -> tycon -> tycon ; \
-foreign import prim primOrNm       		primOr       	:: tycon -> tycon -> tycon ; \
-foreign import prim primXorNm      		primXor      	:: tycon -> tycon -> tycon
-
-#define PRIMS2_BITSHIFT(tycon,primComplement,primComplementNm,primShiftLeft,primShiftLeftNm,primShiftRight,primShiftRightNm,primRotateLeft,primRotateLeftNm,primRotateRight,primRotateRightNm) \
-foreign import prim primComplementNm	primComplement	:: tycon -> tycon ; \
-foreign import prim primShiftLeftNm  	primShiftLeft  	:: tycon -> Int -> tycon ; \
-foreign import prim primShiftRightNm 	primShiftRight 	:: tycon -> Int -> tycon ; \
-foreign import prim primRotateLeftNm  	primRotateLeft  :: tycon -> Int -> tycon ; \
-foreign import prim primRotateRightNm 	primRotateRight :: tycon -> Int -> tycon
-
--- define Bits instance
-#define INSTANCE_BITS1(tycon,size,signed,primAnd,primOr,primXor,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \
-instance Bits tycon where \
-  { (.&.)   	= primAnd \
-  ; (.|.)   	= primOr \
-  ; xor	   		= primXor \
-  ; complement  = primComplement \
-  ; shiftL      = primShiftLeft \
-  ; shiftR      = primShiftRight \
-  ; rotateL     = primRotateLeft \
-  ; rotateR     = primRotateRight \
-  ; bitSize _   = size \
-  ; isSigned _  = signed \
-  }
-
-
-
-
-
-
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/MachDeps.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/MachDeps.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/MachDeps.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ehclib/uhcbase/include/MachDeps.h.  Generated from MachDeps.h.in by configure.  */
-#ifndef MACHDEPS_H
-#define MACHDEPS_H
-
-#define SIZEOF_INTPTR_T 8
-#define SIZEOF_CHAR 1
-#define SIZEOF_SHORT 2
-#define SIZEOF_INT 4
-#define SIZEOF_LONG 8
-#define SIZEOF_LONG_LONG 8
-#define SIZEOF_FLOAT 4
-#define SIZEOF_DOUBLE 8
-#define SIZEOF_UNSIGNED_CHAR 1
-#define SIZEOF_UNSIGNED_SHORT 2
-#define SIZEOF_UNSIGNED_INT 4
-#define SIZEOF_UNSIGNED_LONG 8
-#define SIZEOF_UNSIGNED_LONG_LONG 8
-#define SIZEOF_VOID_P 8
-
-#define SIZEOF_DEV_T 4
-#define SIZEOF_INO_T 8
-#define SIZEOF_OFF_T 8
-#define SIZEOF_MODE_T 2
-#define SIZEOF_PID_T 4
-#define SIZEOF_SSIZE_T 8
-#define SIZEOF_GID_T 4
-#define SIZEOF_NLINK_T 2
-#define SIZEOF_UID_T 4
-#define SIZEOF_RLIM_T 8
-#define SIZEOF_CLOCK_T 8
-#define SIZEOF_TIME_T 8
-#define SIZEOF_SIZE_T 8
-#define SIZEOF_WCHAR_T 4
-
-#define SIZEOF_CC_T 1
-#define SIZEOF_SPEED_T 8
-#define SIZEOF_TCFLAG_T 8
-
-#define ALIGNOF_INTPTR_T 8
-#define ALIGNOF_CHAR 1
-#define ALIGNOF_SHORT 2
-#define ALIGNOF_INT 4
-#define ALIGNOF_LONG 8
-#define ALIGNOF_LONG_LONG 8
-#define ALIGNOF_FLOAT 4
-#define ALIGNOF_DOUBLE 8
-#define ALIGNOF_UNSIGNED_CHAR 1
-#define ALIGNOF_UNSIGNED_SHORT 2
-#define ALIGNOF_UNSIGNED_INT 4
-#define ALIGNOF_UNSIGNED_LONG 8
-#define ALIGNOF_UNSIGNED_LONG_LONG 8
-#define ALIGNOF_VOID_P 8
-
-#define ALIGNOF_UINT8_T 1
-#define ALIGNOF_UINT16_T 2
-#define ALIGNOF_UINT32_T 4
-#define ALIGNOF_UINT64_T 8
-
-#if SIZEOF_INTPTR_T == 8
-#define USE_64_BITS 1
-#define USE_32_BITS 0
-#else
-#define USE_64_BITS 0
-#define USE_32_BITS 1
-#endif
-
-#ifdef __UHC_TARGET_BC__
-#define BITSIZEOF_WORDTAG		1
-#else
-#define BITSIZEOF_WORDTAG		0
-#endif
-
-#define SIZEOF_HSCHAR           SIZEOF_INTPTR_T
-#define ALIGNMENT_HSCHAR        ALIGNOF_UINT32_T
-
-#define SIZEOF_HSINT            SIZEOF_INTPTR_T
-#define ALIGNMENT_HSINT         ALIGNOF_INTPTR_T
-
-#define SIZEOF_HSWORD			SIZEOF_INTPTR_T
-#define ALIGNMENT_HSWORD		ALIGNOF_INTPTR_T
-
-#define SIZEOF_HSDOUBLE			SIZEOF_DOUBLE
-#define ALIGNMENT_HSDOUBLE		ALIGNOF_DOUBLE
-
-#define SIZEOF_HSFLOAT			SIZEOF_FLOAT
-#define ALIGNMENT_HSFLOAT		ALIGNOF_FLOAT
-
-#define SIZEOF_HSPTR            SIZEOF_VOID_P
-#define ALIGNMENT_HSPTR         ALIGNOF_VOID_P
-
-#define SIZEOF_HSFUNPTR         SIZEOF_VOID_P
-#define ALIGNMENT_HSFUNPTR      ALIGNOF_VOID_P
-
-#define SIZEOF_HSFOREIGNPTR     SIZEOF_VOID_P
-#define ALIGNMENT_HSFOREIGNPTR  ALIGNOF_VOID_P
-
-#define SIZEOF_HSSTABLEPTR      SIZEOF_VOID_P
-#define ALIGNMENT_HSSTABLEPTR   ALIGNOF_VOID_P
-
-#define SIZEOF_INT8             8
-#define ALIGNMENT_INT8          ALIGNOF_UINT8_T
-
-#define SIZEOF_WORD8            8
-#define ALIGNMENT_WORD8         ALIGNOF_UINT8_T
-
-#define SIZEOF_INT16            16
-#define ALIGNMENT_INT16         ALIGNOF_UINT16_T
-
-#define SIZEOF_WORD16           16
-#define ALIGNMENT_WORD16        ALIGNOF_UINT16_T
-
-#define SIZEOF_INT32            32
-#define ALIGNMENT_INT32         ALIGNOF_UINT32_T
-
-#define SIZEOF_WORD32           32
-#define ALIGNMENT_WORD32        ALIGNOF_UINT32_T
-
-#define SIZEOF_INT64            64
-#define ALIGNMENT_INT64         ALIGNOF_UINT64_T
-
-#define SIZEOF_WORD64           64
-#define ALIGNMENT_WORD64        ALIGNOF_UINT64_T
-
-
-#endif
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/TupleInstance.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/TupleInstance.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/TupleInstance.h
+++ /dev/null
@@ -1,147 +0,0 @@
-{- --------------------------------------------------------------------------
-// Macros to help make various instances for tuples.
-// A kind of poor mans deriving.
-//
-// --------------------------------------------------------------------------
--}
-
-#define	COMMA	,
-
-{- --------------------------------------------------------------------------
-// 2 tuple, 1 unary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
-instance (clscon a, clscon b) => clscon (a,b) where \
-  { op1 op1preArg (a,b) op1postArg \
-      = pre \
-            op1subop a \
-        sep op1subop b \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// 3 tuple, 1 unary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
-instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \
-  { op1 op1preArg (a,b,c) op1postArg \
-      = pre \
-            op1subop a \
-        sep op1subop b \
-        sep op1subop c \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// 4 tuple, 1 unary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
-instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \
-  { op1 op1preArg (a,b,c,d) op1postArg \
-      = pre \
-            op1subop a \
-        sep op1subop b \
-        sep op1subop c \
-        sep op1subop d \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// 5 tuple, 1 unary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
-instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \
-  { op1 op1preArg (a,b,c,d,e) op1postArg \
-      = pre \
-            op1subop a \
-        sep op1subop b \
-        sep op1subop c \
-        sep op1subop d \
-        sep op1subop e \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// Set of 2..n tuple, 1 unary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE_UNOP1_INSTANCES(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
-{ TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\
-  TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\
-  TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\
-  TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
-}
-
-{- --------------------------------------------------------------------------
-// 2 tuple, 1 binary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
-instance (clscon a, clscon b) => clscon (a,b) where \
-  { (a1,b1) op1 (a2,b2) \
-      = pre \
-            a1 op1subop a2 \
-        sep b1 op1subop b2 \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// 3 tuple, 1 binary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
-instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \
-  { (a1,b1,c1) op1 (a2,b2,c2) \
-      = pre \
-            a1 op1subop a2 \
-        sep b1 op1subop b2 \
-        sep c1 op1subop c2 \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// 4 tuple, 1 binary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
-instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \
-  { (a1,b1,c1,d1) op1 (a2,b2,c2,d2) \
-      = pre \
-            a1 op1subop a2 \
-        sep b1 op1subop b2 \
-        sep c1 op1subop c2 \
-        sep d1 op1subop d2 \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// 5 tuple, 1 binary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
-instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \
-  { (a1,b1,c1,d1,e1) op1 (a2,b2,c2,d2,e2) \
-      = pre \
-            a1 op1subop a2 \
-        sep b1 op1subop b2 \
-        sep c1 op1subop c2 \
-        sep d1 op1subop d2 \
-        sep e1 op1subop e2 \
-        post \
-  }
-
-{- --------------------------------------------------------------------------
-// Set of 2..n tuple, 1 binary op
-// --------------------------------------------------------------------------
--}
-#define TUPLE_BINOP1_INSTANCES(clscon,op1,op1subop,pre,sep,post) \
-{ TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\
-  TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\
-  TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\
-  TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
-}
-
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/Typeable.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/Typeable.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/Typeable.h
+++ /dev/null
@@ -1,149 +0,0 @@
-{- --------------------------------------------------------------------------
-// Macros to help make Typeable instances.
-//
-// INSTANCE_TYPEABLEn(tc,tcname,"tc") defines
-//
-//	instance Typeable/n/ tc
-//	instance Typeable a => Typeable/n-1/ (tc a)
-//	instance (Typeable a, Typeable b) => Typeable/n-2/ (tc a b)
-//	...
-//	instance (Typeable a1, ..., Typeable an) => Typeable (tc a1 ... an)
-// --------------------------------------------------------------------------
--}
-
-#ifndef TYPEABLE_H
-#define TYPEABLE_H
-
-#define INSTANCE_TYPEABLE0(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable tycon where { typeOf _ = mkTyConApp tcname [] }
-
-#ifdef __GLASGOW_HASKELL__
-
---  // For GHC, the extra instances follow from general instance declarations
---  // defined in Data.Typeable.
-
-#define INSTANCE_TYPEABLE1(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }
-
-#define INSTANCE_TYPEABLE2(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }
-
-#define INSTANCE_TYPEABLE3(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }
-
-#define INSTANCE_TYPEABLE4(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }
-
-#define INSTANCE_TYPEABLE5(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }
-
-#define INSTANCE_TYPEABLE6(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }
-
-#define INSTANCE_TYPEABLE7(tycon,tcname,str) \
-tcname :: TyCon; \
-tcname = mkTyCon str; \
-instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }
-
-#else /* !__GLASGOW_HASKELL__ */
-
-#define INSTANCE_TYPEABLE1(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable (tycon a) where { typeOf = typeOfDefault }
-
-#define INSTANCE_TYPEABLE2(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable1 (tycon a) where { \
-  typeOf1 = typeOf1Default }; \
-instance (Typeable a, Typeable b) => Typeable (tycon a b) where { \
-  typeOf = typeOfDefault }
-
-#define INSTANCE_TYPEABLE3(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable2 (tycon a) where { \
-  typeOf2 = typeOf2Default }; \
-instance (Typeable a, Typeable b) => Typeable1 (tycon a b) where { \
-  typeOf1 = typeOf1Default }; \
-instance (Typeable a, Typeable b, Typeable c) => Typeable (tycon a b c) where { \
-  typeOf = typeOfDefault }
-
-#define INSTANCE_TYPEABLE4(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable3 (tycon a) where { \
-  typeOf3 = typeOf3Default }; \
-instance (Typeable a, Typeable b) => Typeable2 (tycon a b) where { \
-  typeOf2 = typeOf2Default }; \
-instance (Typeable a, Typeable b, Typeable c) => Typeable1 (tycon a b c) where { \
-  typeOf1 = typeOf1Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable (tycon a b c d) where { \
-  typeOf = typeOfDefault }
-
-#define INSTANCE_TYPEABLE5(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable4 (tycon a) where { \
-  typeOf4 = typeOf4Default }; \
-instance (Typeable a, Typeable b) => Typeable3 (tycon a b) where { \
-  typeOf3 = typeOf3Default }; \
-instance (Typeable a, Typeable b, Typeable c) => Typeable2 (tycon a b c) where { \
-  typeOf2 = typeOf2Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable1 (tycon a b c d) where { \
-  typeOf1 = typeOf1Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable (tycon a b c d e) where { \
-  typeOf = typeOfDefault }
-
-#define INSTANCE_TYPEABLE6(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable5 (tycon a) where { \
-  typeOf5 = typeOf5Default }; \
-instance (Typeable a, Typeable b) => Typeable4 (tycon a b) where { \
-  typeOf4 = typeOf4Default }; \
-instance (Typeable a, Typeable b, Typeable c) => Typeable3 (tycon a b c) where { \
-  typeOf3 = typeOf3Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable2 (tycon a b c d) where { \
-  typeOf2 = typeOf2Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable1 (tycon a b c d e) where { \
-  typeOf1 = typeOf1Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable (tycon a b c d e f) where { \
-  typeOf = typeOfDefault }
-
-#define INSTANCE_TYPEABLE7(tycon,tcname,str) \
-tcname = mkTyCon str; \
-instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }; \
-instance Typeable a => Typeable6 (tycon a) where { \
-  typeOf6 = typeOf6Default }; \
-instance (Typeable a, Typeable b) => Typeable5 (tycon a b) where { \
-  typeOf5 = typeOf5Default }; \
-instance (Typeable a, Typeable b, Typeable c) => Typeable4 (tycon a b c) where { \
-  typeOf4 = typeOf4Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable3 (tycon a b c d) where { \
-  typeOf3 = typeOf3Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable2 (tycon a b c d e) where { \
-  typeOf2 = typeOf2Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable1 (tycon a b c d e f) where { \
-  typeOf1 = typeOf1Default }; \
-instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f, Typeable g) => Typeable (tycon a b c d e f g) where { \
-  typeOf = typeOfDefault }
-
-#endif /* !__GLASGOW_HASKELL__ */
-
-#endif
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/dirUtils.h b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/dirUtils.h
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/dirUtils.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* 
- * (c) The University of Glasgow 2002
- *
- * Directory Runtime Support
- */
-#ifndef __DIRUTILS_H__
-#define __DIRUTILS_H__
-
-extern int __hscore_readdir(DIR *dirPtr, struct dirent **pDirEnt);
-
-#endif /* __DIRUTILS_H__ */
diff --git a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/installed-pkg-config b/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/installed-pkg-config
deleted file mode 100644
--- a/103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/installed-pkg-config
+++ /dev/null
@@ -1,2 +0,0 @@
-exposed-modules: Control.Monad Data.Bits Data.Char Data.Either Data.Int Data.IORef Data.List Data.Maybe Data.Typeable Data.Word Debug.Trace Foreign.C.Error Foreign.C.String Foreign.C.Types Foreign.C Foreign.ForeignPtr Foreign.Marshal.Alloc Foreign.Marshal.Array Foreign.Marshal.Error Foreign.Marshal.Pool Foreign.Marshal.Utils Foreign.Marshal Foreign.Ptr Foreign.StablePtr Foreign.Storable Foreign System.IO.Error System.IO.Fix System.IO.Unsafe System.IO System.Posix.Internals System.Posix.Types UHC.Array UHC.Base UHC.Bits UHC.Bounded UHC.BoxArray UHC.ByteArray UHC.Char UHC.Conc UHC.Enum UHC.Eq UHC.Float UHC.ForeignPtr UHC.GC UHC.Generics.Tuple UHC.Generics UHC.Handle UHC.Int UHC.IO UHC.IOBase UHC.Ix UHC.LazyST UHC.MutVar UHC.MVar UHC.OldException UHC.OldIO UHC.Ord UHC.Prims UHC.Ptr UHC.Read UHC.Real UHC.Run UHC.Show UHC.ST UHC.StablePtr UHC.StackTrace UHC.Storable UHC.STRef UHC.Types UHC.Weak UHC.WeakPtr UHC.Word Unsafe.Coerce
-build-depends: 
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.bcrr
new file mode 100644
# file too large to diff: 103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.bcrr
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.bcrr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.bcrr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.bcrr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.cr b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.cr
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.cr differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.hi b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.hi
new file mode 100644
Binary files /dev/null and b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.hi differ
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/CTypes.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/CTypes.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/CTypes.h
@@ -0,0 +1,231 @@
+{- --------------------------------------------------------------------------
+// Dirty CPP hackery for CTypes/CTypesISO
+//
+// (c) The FFI task force, 2000
+// --------------------------------------------------------------------------
+-}
+
+#ifndef CTYPES__H
+#define CTYPES__H
+
+#include "Typeable.h"
+
+{-
+// As long as there is no automatic derivation of classes for newtypes we resort
+// to extremely dirty cpp-hackery.   :-P   Some care has to be taken when the
+// macros below are modified, otherwise the layout rule will bite you.
+-}
+
+--  // A hacked version for GHC follows the Haskell 98 version...
+#ifndef __GLASGOW_HASKELL__
+
+#define NEWTYPE_TYPE_NODERIVING(T,B) \
+newtype T = T B ; 
+
+#define NEWTYPE_TYPE(T,B) \
+newtype T = T B deriving (Eq, Ord) ; 
+
+#define ARITHMETIC_TYPE_INSTANCES(T,C,S,B) \
+INSTANCE_NUM(T) ; \
+INSTANCE_REAL(T) ; \
+INSTANCE_READ(T,B) ; \
+INSTANCE_SHOW(T,B) ; \
+INSTANCE_ENUM(T) ; \
+INSTANCE_STORABLE(T) ; \
+INSTANCE_TYPEABLE0(T,C,S) ;
+
+#define INTEGRAL_TYPE_INSTANCES(T,C,S,B) \
+INSTANCE_BOUNDED(T) ; \
+INSTANCE_INTEGRAL(T) ; \
+INSTANCE_BITS(T)
+
+#define ARITHMETIC_TYPE(T,C,S,B) \
+NEWTYPE_TYPE(T,B) ; \
+ARITHMETIC_TYPE_INSTANCES(T,C,S,B) ;
+
+#define INTEGRAL_TYPE(T,C,S,B) \
+ARITHMETIC_TYPE(T,C,S,B) ; \
+INTEGRAL_TYPE_INSTANCES(T,C,S,B)
+
+#define FLOATING_TYPE(T,C,S,B) \
+ARITHMETIC_TYPE(T,C,S,B) ; \
+INSTANCE_FRACTIONAL(T) ; \
+INSTANCE_FLOATING(T) ; \
+INSTANCE_REALFRAC(T) ; \
+INSTANCE_REALFLOAT(T)
+
+#ifndef __GLASGOW_HASKELL__
+#define fakeMap map
+#endif
+
+#define INSTANCE_READ(T,B) \
+instance Read T where { \
+   readsPrec p s = fakeMap (\(x, t) -> (T x, t)) (readsPrec p s) }
+
+#define INSTANCE_SHOW(T,B) \
+instance Show T where { \
+   showsPrec p (T x) = showsPrec p x }
+
+#define INSTANCE_NUM(T) \
+instance Num T where { \
+   (T i) + (T j) = T (i + j) ; \
+   (T i) - (T j) = T (i - j) ; \
+   (T i) * (T j) = T (i * j) ; \
+   negate  (T i) = T (negate i) ; \
+   abs     (T i) = T (abs    i) ; \
+   signum  (T i) = T (signum i) ; \
+   fromInteger x = T (fromInteger x) }
+
+#define INSTANCE_EQ(T) \
+instance Eq T where { \
+   (T x1) == (T x2) = x1 == x2 }
+
+#define INSTANCE_ORD(T) \
+instance Ord T where { \
+   (T x1) `compare` (T x2) = x1 `compare` x2 }
+
+#define INSTANCE_BOUNDED(T) \
+instance Bounded T where { \
+   minBound = T minBound ; \
+   maxBound = T maxBound }
+
+#define INSTANCE_ENUM(T) \
+instance Enum T where { \
+   succ           (T i)             = T (succ i) ; \
+   pred           (T i)             = T (pred i) ; \
+   toEnum               x           = T (toEnum x) ; \
+   fromEnum       (T i)             = fromEnum i ; \
+   enumFrom       (T i)             = fakeMap T (enumFrom i) ; \
+   enumFromThen   (T i) (T j)       = fakeMap T (enumFromThen i j) ; \
+   enumFromTo     (T i) (T j)       = fakeMap T (enumFromTo i j) ; \
+   enumFromThenTo (T i) (T j) (T k) = fakeMap T (enumFromThenTo i j k) }
+
+#define INSTANCE_REAL(T) \
+instance Real T where { \
+   toRational (T i) = toRational i }
+
+#define INSTANCE_INTEGRAL(T) \
+instance Integral T where { \
+   (T i) `quot`    (T j) = T (i `quot` j) ; \
+   (T i) `rem`     (T j) = T (i `rem`  j) ; \
+   (T i) `div`     (T j) = T (i `div`  j) ; \
+   (T i) `mod`     (T j) = T (i `mod`  j) ; \
+   (T i) `quotRem` (T j) = let (q,r) = i `quotRem` j in (T q, T r) ; \
+   (T i) `divMod`  (T j) = let (d,m) = i `divMod`  j in (T d, T m) ; \
+   toInteger (T i)       = toInteger i }
+
+#define INSTANCE_BITS(T) \
+instance Bits T where { \
+  (T x) .&.     (T y)   = T (x .&.   y) ; \
+  (T x) .|.     (T y)   = T (x .|.   y) ; \
+  (T x) `xor`   (T y)   = T (x `xor` y) ; \
+  complement    (T x)   = T (complement x) ; \
+  shift         (T x) n = T (shift x n) ; \
+  rotate        (T x) n = T (rotate x n) ; \
+  bit                 n = T (bit n) ; \
+  setBit        (T x) n = T (setBit x n) ; \
+  clearBit      (T x) n = T (clearBit x n) ; \
+  complementBit (T x) n = T (complementBit x n) ; \
+  testBit       (T x) n = testBit x n ; \
+  bitSize       (T x)   = bitSize x ; \
+  isSigned      (T x)   = isSigned x }
+
+#define INSTANCE_FRACTIONAL(T) \
+instance Fractional T where { \
+   (T x) / (T y)  = T (x / y) ; \
+   recip   (T x)  = T (recip x) ; \
+   fromRational r = T (fromRational r) }
+
+#define INSTANCE_FLOATING(T) \
+instance Floating T where { \
+   pi                    = pi ; \
+   exp   (T x)           = T (exp   x) ; \
+   log   (T x)           = T (log   x) ; \
+   sqrt  (T x)           = T (sqrt  x) ; \
+   (T x) **        (T y) = T (x ** y) ; \
+   (T x) `logBase` (T y) = T (x `logBase` y) ; \
+   sin   (T x)           = T (sin   x) ; \
+   cos   (T x)           = T (cos   x) ; \
+   tan   (T x)           = T (tan   x) ; \
+   asin  (T x)           = T (asin  x) ; \
+   acos  (T x)           = T (acos  x) ; \
+   atan  (T x)           = T (atan  x) ; \
+   sinh  (T x)           = T (sinh  x) ; \
+   cosh  (T x)           = T (cosh  x) ; \
+   tanh  (T x)           = T (tanh  x) ; \
+   asinh (T x)           = T (asinh x) ; \
+   acosh (T x)           = T (acosh x) ; \
+   atanh (T x)           = T (atanh x) }
+
+#define INSTANCE_REALFRAC(T) \
+instance RealFrac T where { \
+   properFraction (T x) = let (m,y) = properFraction x in (m, T y) ; \
+   truncate (T x) = truncate x ; \
+   round    (T x) = round x ; \
+   ceiling  (T x) = ceiling x ; \
+   floor    (T x) = floor x }
+
+#define INSTANCE_REALFLOAT(T) \
+instance RealFloat T where { \
+   floatRadix     (T x) = floatRadix x ; \
+   floatDigits    (T x) = floatDigits x ; \
+   floatRange     (T x) = floatRange x ; \
+   decodeFloat    (T x) = decodeFloat x ; \
+   encodeFloat m n      = T (encodeFloat m n) ; \
+   exponent       (T x) = exponent x ; \
+   significand    (T x) = T (significand  x) ; \
+   scaleFloat n   (T x) = T (scaleFloat n x) ; \
+   isNaN          (T x) = isNaN x ; \
+   isInfinite     (T x) = isInfinite x ; \
+   isDenormalized (T x) = isDenormalized x ; \
+   isNegativeZero (T x) = isNegativeZero x ; \
+   isIEEE         (T x) = isIEEE x ; \
+   (T x) `atan2`  (T y) = T (x `atan2` y) }
+
+#define INSTANCE_STORABLE(T) \
+instance Storable T where { \
+   sizeOf    (T x)       = sizeOf x ; \
+   alignment (T x)       = alignment x ; \
+   peekElemOff a i       = liftM T (peekElemOff (castPtr a) i) ; \
+   pokeElemOff a i (T x) = pokeElemOff (castPtr a) i x }
+
+#else /* __GLASGOW_HASKELL__ */
+
+--  // GHC can derive any class for a newtype, so we make use of that here...
+
+#define ARITHMETIC_CLASSES  Eq,Ord,Num,Enum,Storable,Real
+#define INTEGRAL_CLASSES Bounded,Integral,Bits
+#define FLOATING_CLASSES Fractional,Floating,RealFrac,RealFloat
+
+#define ARITHMETIC_TYPE(T,C,S,B) \
+newtype T = T B deriving (ARITHMETIC_CLASSES); \
+INSTANCE_READ(T,B); \
+INSTANCE_SHOW(T,B); \
+INSTANCE_TYPEABLE0(T,C,S) ;
+
+#define INTEGRAL_TYPE(T,C,S,B) \
+newtype T = T B deriving (ARITHMETIC_CLASSES, INTEGRAL_CLASSES); \
+INSTANCE_READ(T,B); \
+INSTANCE_SHOW(T,B); \
+INSTANCE_TYPEABLE0(T,C,S) ;
+
+#define FLOATING_TYPE(T,C,S,B) \
+newtype T = T B deriving (ARITHMETIC_CLASSES, FLOATING_CLASSES); \
+INSTANCE_READ(T,B); \
+INSTANCE_SHOW(T,B); \
+INSTANCE_TYPEABLE0(T,C,S) ;
+
+#define INSTANCE_READ(T,B) \
+instance Read T where { \
+   readsPrec            = unsafeCoerce# (readsPrec :: Int -> ReadS B); \
+   readList             = unsafeCoerce# (readList  :: ReadS [B]); }
+
+#define INSTANCE_SHOW(T,B) \
+instance Show T where { \
+   showsPrec            = unsafeCoerce# (showsPrec :: Int -> B -> ShowS); \
+   show                 = unsafeCoerce# (show :: B -> String); \
+   showList             = unsafeCoerce# (showList :: [B] -> ShowS); }
+
+#endif /* __GLASGOW_HASKELL__ */
+
+#endif
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBase.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBase.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBase.h
@@ -0,0 +1,757 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The University of Glasgow 2001-2004
+ *
+ * Definitions for package `base' which are visible in Haskell land.
+ *
+ * Adapted for use in EHC
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef __HSBASE_H__
+#define __HSBASE_H__
+
+#include "HsBaseConfig.h"
+#ifdef __UHC_BUILDS_O__
+#include "rts.h"
+#endif
+
+/* ultra-evil... */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+/* Needed to get the macro version of errno on some OSs (eg. Solaris).
+   We must do this, because these libs are only compiled once, but
+   must work in both single-threaded and multi-threaded programs. */
+#define _REENTRANT 1
+
+#ifndef __UHC__
+#include "HsFFI.h"
+#endif /* !__UHC__ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+#if HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#if HAVE_SIGNAL_H
+#include <signal.h>
+/* Ultra-ugly: OpenBSD uses broken macros for sigemptyset and sigfillset (missing casts) */
+#if __OpenBSD__
+#undef sigemptyset
+#undef sigfillset
+#endif
+#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+#if HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#if HAVE_UTIME_H
+#include <utime.h>
+#endif
+#if HAVE_SYS_UTSNAME_H
+#include <sys/utsname.h>
+#endif
+#if HAVE_GETTIMEOFDAY
+#  if HAVE_SYS_TIME_H
+#   include <sys/time.h>
+#  endif
+#elif HAVE_GETCLOCK
+# if HAVE_SYS_TIMERS_H
+#  define POSIX_4D9 1
+#  include <sys/timers.h>
+# endif
+#endif
+#if HAVE_TIME_H
+#include <time.h>
+#endif
+#if HAVE_SYS_TIMEB_H
+#include <sys/timeb.h>
+#endif
+#if HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+#if HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+#if HAVE_WINSOCK_H && defined(__MINGW32__)
+#include <winsock.h>
+#endif
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#if HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#elif HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#if !defined(__MINGW32__) && !defined(irix_HOST_OS)
+# if HAVE_SYS_RESOURCE_H
+#  include <sys/resource.h>
+# endif
+#endif
+
+#if !HAVE_GETRUSAGE && HAVE_SYS_SYSCALL_H
+# include <sys/syscall.h>
+# if defined(SYS_GETRUSAGE)	/* hpux_HOST_OS */
+#  define getrusage(a, b)  syscall(SYS_GETRUSAGE, a, b)
+#  define HAVE_GETRUSAGE 1
+# endif
+#endif
+
+/* For System */
+#if HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#if HAVE_VFORK_H
+#include <vfork.h>
+#endif
+
+#ifndef __UHC__
+#include "dirUtils.h"
+#endif
+#ifndef __UHC__
+#include "WCsubst.h"
+#endif /* !__UHC__ */
+
+#if defined(__MINGW32__)
+/* in Win32Utils.c */
+extern void maperrno (void);
+extern HsWord64 getUSecOfDay(void);
+#endif
+
+#if defined(__MINGW32__)
+#include <io.h>
+#include <fcntl.h>
+#include <shlobj.h>
+#include <share.h>
+#endif
+
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+/* in inputReady.c */
+extern int fdReady(int fd, int write, int msecs, int isSock);
+
+#ifndef __UHC__
+/* in Signals.c */
+extern HsInt nocldstop;
+#endif /* !__UHC__ */
+
+#ifndef __UHC__
+/* -----------------------------------------------------------------------------
+   64-bit operations, defined in longlong.c
+   -------------------------------------------------------------------------- */
+
+#ifdef SUPPORT_LONG_LONGS
+
+HsBool hs_gtWord64 (HsWord64, HsWord64);
+HsBool hs_geWord64 (HsWord64, HsWord64);
+HsBool hs_eqWord64 (HsWord64, HsWord64);
+HsBool hs_neWord64 (HsWord64, HsWord64);
+HsBool hs_ltWord64 (HsWord64, HsWord64);
+HsBool hs_leWord64 (HsWord64, HsWord64);
+
+HsBool hs_gtInt64 (HsInt64, HsInt64);
+HsBool hs_geInt64 (HsInt64, HsInt64);
+HsBool hs_eqInt64 (HsInt64, HsInt64);
+HsBool hs_neInt64 (HsInt64, HsInt64);
+HsBool hs_ltInt64 (HsInt64, HsInt64);
+HsBool hs_leInt64 (HsInt64, HsInt64);
+
+HsWord64 hs_remWord64  (HsWord64, HsWord64);
+HsWord64 hs_quotWord64 (HsWord64, HsWord64);
+
+HsInt64 hs_remInt64    (HsInt64, HsInt64);
+HsInt64 hs_quotInt64   (HsInt64, HsInt64);
+HsInt64 hs_negateInt64 (HsInt64);
+HsInt64 hs_plusInt64   (HsInt64, HsInt64);
+HsInt64 hs_minusInt64  (HsInt64, HsInt64);
+HsInt64 hs_timesInt64  (HsInt64, HsInt64);
+
+HsWord64 hs_and64  (HsWord64, HsWord64);
+HsWord64 hs_or64   (HsWord64, HsWord64);
+HsWord64 hs_xor64  (HsWord64, HsWord64);
+HsWord64 hs_not64  (HsWord64);
+
+HsWord64 hs_uncheckedShiftL64   (HsWord64, HsInt);
+HsWord64 hs_uncheckedShiftRL64  (HsWord64, HsInt);
+HsInt64  hs_uncheckedIShiftL64  (HsInt64, HsInt);
+HsInt64  hs_uncheckedIShiftRA64 (HsInt64, HsInt);
+HsInt64  hs_uncheckedIShiftRL64 (HsInt64, HsInt);
+
+HsInt64  hs_intToInt64    (HsInt);
+HsInt    hs_int64ToInt    (HsInt64);
+HsWord64 hs_int64ToWord64 (HsInt64);
+HsWord64 hs_wordToWord64  (HsWord);
+HsWord   hs_word64ToWord  (HsWord64);
+HsInt64  hs_word64ToInt64 (HsWord64);
+
+HsWord64 hs_integerToWord64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);
+HsInt64  hs_integerToInt64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da);
+
+#endif /* SUPPORT_LONG_LONGS */
+#endif /* !__UHC__ */
+
+/* -----------------------------------------------------------------------------
+   INLINE functions.
+
+   These functions are given as inlines here for when compiling via C,
+   but we also generate static versions into the cbits library for
+   when compiling to native code.
+   -------------------------------------------------------------------------- */
+
+#ifndef INLINE
+# if defined(_MSC_VER)
+#  define INLINE extern __inline
+# else
+#  define INLINE static inline
+# endif
+#endif
+
+INLINE int __hscore_get_errno(void) { return errno; }
+INLINE void __hscore_set_errno(int e) { errno = e; }
+
+#if !defined(_MSC_VER)
+INLINE int __hscore_s_isreg(mode_t m)  { return S_ISREG(m);  }
+INLINE int __hscore_s_isdir(mode_t m)  { return S_ISDIR(m);  }
+INLINE int __hscore_s_isfifo(mode_t m) { return S_ISFIFO(m); }
+INLINE int __hscore_s_isblk(mode_t m)  { return S_ISBLK(m);  }
+INLINE int __hscore_s_ischr(mode_t m)  { return S_ISCHR(m);  }
+#if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
+INLINE int __hscore_s_issock(mode_t m) { return S_ISSOCK(m); }
+#endif
+#endif
+
+#if ( !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32) ) || defined(__CYGWIN__)
+INLINE int
+__hscore_sigemptyset( sigset_t *set )
+{ return sigemptyset(set); }
+
+INLINE int
+__hscore_sigfillset( sigset_t *set )
+{ return sigfillset(set); }
+
+INLINE int
+__hscore_sigaddset( sigset_t * set, int s )
+{ return sigaddset(set,s); }
+
+INLINE int
+__hscore_sigdelset( sigset_t * set, int s )
+{ return sigdelset(set,s); }
+
+INLINE int
+__hscore_sigismember( sigset_t * set, int s )
+{ return sigismember(set,s); }
+#endif
+
+INLINE void *
+__hscore_memcpy_dst_off( char *dst, int dst_off, char *src, size_t sz )
+{ return memcpy(dst+dst_off, src, sz); }
+
+INLINE void *
+__hscore_memcpy_src_off( char *dst, char *src, int src_off, size_t sz )
+{ return memcpy(dst, src+src_off, sz); }
+
+INLINE HsBool
+__hscore_supportsTextMode()
+{
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
+  return HS_BOOL_FALSE;
+#else
+  return HS_BOOL_TRUE;
+#endif
+}
+
+INLINE HsInt
+__hscore_bufsiz()
+{
+  return BUFSIZ;
+}
+
+INLINE int
+__hscore_seek_cur()
+{
+  return SEEK_CUR;
+}
+
+INLINE int
+__hscore_o_binary()
+{
+#if defined(_MSC_VER)
+  return O_BINARY;
+#else
+  return CONST_O_BINARY;
+#endif
+}
+
+INLINE int
+__hscore_o_rdonly()
+{
+#ifdef O_RDONLY
+  return O_RDONLY;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_wronly( void )
+{
+#ifdef O_WRONLY
+  return O_WRONLY;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_rdwr( void )
+{
+#ifdef O_RDWR
+  return O_RDWR;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_append( void )
+{
+#ifdef O_APPEND
+  return O_APPEND;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_creat( void )
+{
+#ifdef O_CREAT
+  return O_CREAT;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_excl( void )
+{
+#ifdef O_EXCL
+  return O_EXCL;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_trunc( void )
+{
+#ifdef O_TRUNC
+  return O_TRUNC;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_noctty( void )
+{
+#ifdef O_NOCTTY
+  return O_NOCTTY;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_o_nonblock( void )
+{
+#ifdef O_NONBLOCK
+  return O_NONBLOCK;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_seek_set( void )
+{
+  return SEEK_SET;
+}
+
+INLINE int
+__hscore_seek_end( void )
+{
+  return SEEK_END;
+}
+
+INLINE int
+__hscore_ftruncate( int fd, off_t where )
+{
+#if defined(HAVE_FTRUNCATE)
+  return ftruncate(fd,where);
+#elif defined(HAVE__CHSIZE)
+  return _chsize(fd,where);
+#else
+// ToDo: we should use _chsize_s() on Windows which allows a 64-bit
+// offset, but it doesn't seem to be available from mingw at this time 
+// --SDM (01/2008)
+#error at least ftruncate or _chsize functions are required to build
+#endif
+}
+
+#ifndef __UHC__
+INLINE int
+__hscore_setmode( int fd, HsBool toBin )
+{
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
+  return setmode(fd,(toBin == HS_BOOL_TRUE) ? _O_BINARY : _O_TEXT);
+#else
+  return 0;
+#endif
+}
+#endif /* !__UHC__ */
+
+#if __GLASGOW_HASKELL__
+
+INLINE int
+__hscore_PrelHandle_write( int fd, void *ptr, HsInt off, int sz )
+{
+  return write(fd,(char *)ptr + off, sz);
+}
+
+INLINE int
+__hscore_PrelHandle_read( int fd, void *ptr, HsInt off, int sz )
+{
+  return read(fd,(char *)ptr + off, sz);
+
+}
+
+#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
+INLINE int
+__hscore_PrelHandle_send( int fd, void *ptr, HsInt off, int sz )
+{
+    return send(fd,(char *)ptr + off, sz, 0);
+}
+
+INLINE int
+__hscore_PrelHandle_recv( int fd, void *ptr, HsInt off, int sz )
+{
+    return recv(fd,(char *)ptr + off, sz, 0);
+}
+#endif
+
+#endif /* __GLASGOW_HASKELL__ */
+
+INLINE int
+__hscore_mkdir( char *pathName, int mode )
+{
+#if ( defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32) ) && !defined(__CYGWIN__)
+  return mkdir(pathName);
+#else
+  return mkdir(pathName,mode);
+#endif
+}
+
+INLINE int
+__hscore_lstat( const char *fname, struct stat *st )
+{
+#if HAVE_LSTAT
+  return lstat(fname, st);
+#else
+  return stat(fname, st);
+#endif
+}
+
+INLINE char *
+__hscore_d_name( struct dirent* d )
+{
+  return (d->d_name);
+}
+
+INLINE int
+__hscore_end_of_dir( void )
+{
+  return READDIR_ERRNO_EOF;
+}
+
+INLINE void
+__hscore_free_dirent(struct dirent *dEnt)
+{
+#if HAVE_READDIR_R
+  free(dEnt);
+#endif
+}
+
+#if defined(__MINGW32__)
+// We want the versions of stat/fstat/lseek that use 64-bit offsets,
+// and you have to ask for those explicitly.  Unfortunately there
+// doesn't seem to be a 64-bit version of truncate/ftruncate, so while
+// hFileSize and hSeek will work with large files, hSetFileSize will not.
+#define stat(file,buf)       _stati64(file,buf)
+#define fstat(fd,buf)        _fstati64(fd,buf)
+typedef struct _stati64 struct_stat;
+typedef off64_t stsize_t;
+#else
+typedef struct stat struct_stat;
+typedef off_t stsize_t;
+#endif
+
+INLINE HsInt
+__hscore_sizeof_stat( void )
+{
+  return sizeof(struct_stat);
+}
+
+INLINE time_t __hscore_st_mtime ( struct_stat* st ) { return st->st_mtime; }
+INLINE stsize_t __hscore_st_size  ( struct_stat* st ) { return st->st_size; }
+#if !defined(_MSC_VER)
+INLINE mode_t __hscore_st_mode  ( struct_stat* st ) { return st->st_mode; }
+INLINE dev_t  __hscore_st_dev  ( struct_stat* st ) { return st->st_dev; }
+INLINE ino_t  __hscore_st_ino  ( struct_stat* st ) { return st->st_ino; }
+#endif
+
+#if HAVE_TERMIOS_H
+INLINE tcflag_t __hscore_lflag( struct termios* ts ) { return ts->c_lflag; }
+
+INLINE void
+__hscore_poke_lflag( struct termios* ts, tcflag_t t ) { ts->c_lflag = t; }
+
+INLINE unsigned char*
+__hscore_ptr_c_cc( struct termios* ts )
+{ return (unsigned char*) &ts->c_cc; }
+
+INLINE HsInt
+__hscore_sizeof_termios( void )
+{
+#ifndef __MINGW32__
+  return sizeof(struct termios);
+#else
+  return 0;
+#endif
+}
+#endif
+
+//sizeof_sigset_t is also use on windows systems which define tcflat_t. Why exclude it?
+// #if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_WIN32)
+INLINE HsInt
+__hscore_sizeof_sigset_t( void )
+{
+  return sizeof(sigset_t);
+}
+// #endif
+
+INLINE int
+__hscore_echo( void )
+{
+#ifdef ECHO
+  return ECHO;
+#else
+  return 0;
+#endif
+
+}
+
+INLINE int
+__hscore_tcsanow( void )
+{
+#ifdef TCSANOW
+  return TCSANOW;
+#else
+  return 0;
+#endif
+
+}
+
+INLINE int
+__hscore_icanon( void )
+{
+#ifdef ICANON
+  return ICANON;
+#else
+  return 0;
+#endif
+}
+
+INLINE int __hscore_vmin( void )
+{
+#ifdef VMIN
+  return VMIN;
+#else
+  return 0;
+#endif
+}
+
+INLINE int __hscore_vtime( void )
+{
+#ifdef VTIME
+  return VTIME;
+#else
+  return 0;
+#endif
+}
+
+INLINE int __hscore_sigttou( void )
+{
+#ifdef SIGTTOU
+  return SIGTTOU;
+#else
+  return 0;
+#endif
+}
+
+INLINE int __hscore_sig_block( void )
+{
+#ifdef SIG_BLOCK
+  return SIG_BLOCK;
+#else
+  return 0;
+#endif
+}
+
+INLINE int __hscore_sig_setmask( void )
+{
+#ifdef SIG_SETMASK
+  return SIG_SETMASK;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_f_getfl( void )
+{
+#ifdef F_GETFL
+  return F_GETFL;
+#else
+  return 0;
+#endif
+}
+
+INLINE int
+__hscore_f_setfl( void )
+{
+#ifdef F_SETFL
+  return F_SETFL;
+#else
+  return 0;
+#endif
+}
+
+// defined in rts/RtsStartup.c.
+extern void* __hscore_get_saved_termios(int fd);
+extern void __hscore_set_saved_termios(int fd, void* ts);
+
+INLINE int __hscore_hs_fileno (FILE *f) { return fileno (f); }
+
+INLINE int __hscore_open(char *file, int how, mode_t mode) {
+#ifdef __MINGW32__
+	if ((how & O_WRONLY) || (how & O_RDWR) || (how & O_APPEND))
+	  return _sopen(file,how,_SH_DENYRW,mode);
+	else
+	  return _sopen(file,how,_SH_DENYWR,mode);
+#else
+	return open(file,how,mode);
+#endif
+}
+
+// These are wrapped because on some OSs (eg. Linux) they are
+// macros which redirect to the 64-bit-off_t versions when large file
+// support is enabled.
+//
+#if defined(__MINGW32__)
+INLINE off64_t __hscore_lseek(int fd, off64_t off, int whence) {
+	return (_lseeki64(fd,off,whence));
+}
+#else
+INLINE off_t __hscore_lseek(int fd, off_t off, int whence) {
+	return (lseek(fd,off,whence));
+}
+#endif
+
+INLINE HsInt __hscore_stat(char *file, struct_stat *buf) {
+	return (stat(file,buf));
+}
+
+INLINE HsInt __hscore_fstat(int fd, struct_stat *buf) {
+	return (fstat(fd,buf));
+}
+
+// select-related stuff
+
+#if !defined(__MINGW32__)
+INLINE int  hsFD_SETSIZE(void) { return FD_SETSIZE; }
+INLINE int  hsFD_ISSET(int fd, fd_set *fds) { return FD_ISSET(fd, fds); }
+INLINE void hsFD_SET(int fd, fd_set *fds) { FD_SET(fd, fds); }
+INLINE HsInt sizeof_fd_set(void) { return sizeof(fd_set); }
+extern void hsFD_ZERO(fd_set *fds);
+#endif
+
+// gettimeofday()-related
+
+#if !defined(__MINGW32__)
+
+INLINE HsInt sizeofTimeVal(void) { return sizeof(struct timeval); }
+
+INLINE HsWord64 getUSecOfDay(void)
+{
+    struct timeval tv;
+    gettimeofday(&tv, (struct timezone *) NULL);
+    // Don't forget to cast *before* doing the arithmetic, otherwise
+    // the arithmetic happens at the type of tv_sec, which is probably
+    // only 'int'.
+    return ((HsWord64)tv.tv_sec * 1000000 + (HsWord64)tv.tv_usec);
+}
+
+INLINE void setTimevalTicks(struct timeval *p, HsWord64 usecs)
+{
+    p->tv_sec  = usecs / 1000000;
+    p->tv_usec = usecs % 1000000;
+}
+#endif /* !defined(__MINGW32__) */
+
+/* ToDo: write a feature test that doesn't assume 'environ' to
+ *    be in scope at link-time. */
+extern char** environ;
+INLINE char **__hscore_environ() { return environ; }
+
+/* lossless conversions between pointers and integral types */
+INLINE void *    __hscore_from_uintptr(uintptr_t n) { return (void *)n; }
+INLINE void *    __hscore_from_intptr (intptr_t n)  { return (void *)n; }
+INLINE uintptr_t __hscore_to_uintptr  (void *p)     { return (uintptr_t)p; }
+INLINE intptr_t  __hscore_to_intptr   (void *p)     { return (intptr_t)p; }
+
+void errorBelch2(const char*s, char *t);
+void debugBelch2(const char*s, char *t);
+
+#endif /* __HSBASE_H__ */
+
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBaseConfig.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBaseConfig.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBaseConfig.h
@@ -0,0 +1,944 @@
+/* ehclib/uhcbase/include/HsBaseConfig.h.  Generated from HsBaseConfig.h.in by configure.  */
+#ifndef HSBASECONFIG_H
+#define HSBASECONFIG_H
+
+#include "MachDeps.h"
+
+/********************************************************************/
+/**** Sizes                                                      ****/
+/********************************************************************/
+
+#if SIZEOF_INTPTR_T == 8
+#define HTYPE_INTPTR_T 			Int64
+#define HTYPE_UINTPTR_T 		Word64
+#else
+#define HTYPE_INTPTR_T 			Int32
+#define HTYPE_UINTPTR_T 		Word32
+#endif
+
+/* also here: typedef int sig_atomic_t
+ */
+#if SIZEOF_INT == 8
+#define HTYPE_INT 				Int64
+#define HTYPE_UNSIGNED_INT 		Word64
+#define HTYPE_SIG_ATOMIC_T 		Word64
+#else
+#define HTYPE_INT 				Int32
+#define HTYPE_UNSIGNED_INT 		Word32
+#define HTYPE_SIG_ATOMIC_T 		Word32
+#endif
+
+#if SIZEOF_LONG == 8
+#define HTYPE_LONG 				Int64
+#define HTYPE_UNSIGNED_LONG 	Word64
+#else
+#define HTYPE_LONG 				Int32
+#define HTYPE_UNSIGNED_LONG 	Word32
+#endif
+
+#if SIZEOF_VOID_P == 8
+#define HTYPE_PTRDIFF_T 		Int64
+#else
+#define HTYPE_PTRDIFF_T 		Int32
+#endif
+
+#if SIZEOF_CLOCK_T == 8
+#define HTYPE_CLOCK_T 			Word64
+#else
+#define HTYPE_CLOCK_T 			Word32
+#endif
+
+#if SIZEOF_TIME_T == 8
+#define HTYPE_TIME_T 			Word64
+#else
+#define HTYPE_TIME_T 			Word32
+#endif
+
+#if SIZEOF_USECONDS_T == 8
+#define HTYPE_USECONDS_T 		Word64
+#else
+#define HTYPE_USECONDS_T 		Word32
+#endif
+
+#if SIZEOF_SIZE_T == 8
+#define HTYPE_SIZE_T 			Word64
+#else
+#define HTYPE_SIZE_T 			Word32
+#endif
+
+#if SIZEOF_WCHAR_T == 1
+#define HTYPE_WCHAR_T 			Word8
+#elif SIZEOF_WCHAR_T == 2
+#define HTYPE_WCHAR_T 			Word16
+#else
+#define HTYPE_WCHAR_T 			Word32
+#endif
+
+
+
+/* Define to Haskell type for char */
+#define HTYPE_CHAR Int8
+
+/* Define to Haskell type for double */
+#define HTYPE_DOUBLE Double
+
+/* Define to Haskell type for float */
+#define HTYPE_FLOAT Float
+
+/* Define to Haskell type for intmax_t */
+#define HTYPE_INTMAX_T Int64
+
+/* Define to Haskell type for long long */
+#define HTYPE_LONG_LONG Int64
+
+/* Define to Haskell type for short */
+#define HTYPE_SHORT Int16
+
+/* Define to Haskell type for signed char */
+#define HTYPE_SIGNED_CHAR Int8
+
+/* Define to Haskell type for uintmax_t */
+#define HTYPE_UINTMAX_T Word64
+
+/* Define to Haskell type for unsigned char */
+#define HTYPE_UNSIGNED_CHAR Word8
+
+/* Define to Haskell type for unsigned long long */
+#define HTYPE_UNSIGNED_LONG_LONG Word64
+
+/* Define to Haskell type for unsigned short */
+#define HTYPE_UNSIGNED_SHORT Word16
+
+
+
+/********************************************************************/
+/**** System tupes                                               ****/
+/********************************************************************/
+
+#ifdef SIZEOF_DEV_T
+# if SIZEOF_DEV_T == 8
+#  define HTYPE_DEV_T 			Word64
+# elif SIZEOF_DEV_T == 4
+#  define HTYPE_DEV_T 			Word32
+# elif SIZEOF_DEV_T == 2
+#  define HTYPE_DEV_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_INO_T
+# if SIZEOF_INO_T == 8
+#  define HTYPE_INO_T 			Word64
+# elif SIZEOF_INO_T == 4
+#  define HTYPE_INO_T 			Word32
+# elif SIZEOF_INO_T == 2
+#  define HTYPE_INO_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_MODE_T
+# if SIZEOF_MODE_T == 8
+#  define HTYPE_MODE_T 			Word64
+# elif SIZEOF_MODE_T == 4
+#  define HTYPE_MODE_T 			Word32
+# elif SIZEOF_MODE_T == 2
+#  define HTYPE_MODE_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_OFF_T
+# if SIZEOF_OFF_T == 8
+#  define HTYPE_OFF_T 			Word64
+# elif SIZEOF_OFF_T == 4
+#  define HTYPE_OFF_T 			Word32
+# elif SIZEOF_OFF_T == 2
+#  define HTYPE_OFF_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_PID_T
+# if SIZEOF_PID_T == 8
+#  define HTYPE_PID_T 			Word64
+# elif SIZEOF_PID_T == 4
+#  define HTYPE_PID_T 			Word32
+# elif SIZEOF_PID_T == 2
+#  define HTYPE_PID_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_SSIZE_T
+# if SIZEOF_SSIZE_T == 8
+#  define HTYPE_SSIZE_T 			Word64
+# elif SIZEOF_SSIZE_T == 4
+#  define HTYPE_SSIZE_T 			Word32
+# elif SIZEOF_SSIZE_T == 2
+#  define HTYPE_SSIZE_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_GID_T
+# if SIZEOF_GID_T == 8
+#  define HTYPE_GID_T 			Word64
+# elif SIZEOF_GID_T == 4
+#  define HTYPE_GID_T 			Word32
+# elif SIZEOF_GID_T == 2
+#  define HTYPE_GID_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_NLINK_T
+# if SIZEOF_NLINK_T == 8
+#  define HTYPE_NLINK_T 			Word64
+# elif SIZEOF_NLINK_T == 4
+#  define HTYPE_NLINK_T 			Word32
+# elif SIZEOF_NLINK_T == 2
+#  define HTYPE_NLINK_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_UID_T
+# if SIZEOF_UID_T == 8
+#  define HTYPE_UID_T 			Word64
+# elif SIZEOF_UID_T == 4
+#  define HTYPE_UID_T 			Word32
+# elif SIZEOF_UID_T == 2
+#  define HTYPE_UID_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_CC_T
+# if SIZEOF_CC_T == 8
+#  define HTYPE_CC_T 			Word64
+# elif SIZEOF_CC_T == 4
+#  define HTYPE_CC_T 			Word32
+# elif SIZEOF_CC_T == 2
+#  define HTYPE_CC_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_SPEED_T
+# if SIZEOF_SPEED_T == 8
+#  define HTYPE_SPEED_T 			Word64
+# elif SIZEOF_SPEED_T == 4
+#  define HTYPE_SPEED_T 			Word32
+# elif SIZEOF_SPEED_T == 2
+#  define HTYPE_SPEED_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_TCFLAG_T
+# if SIZEOF_TCFLAG_T == 8
+#  define HTYPE_TCFLAG_T 			Word64
+# elif SIZEOF_TCFLAG_T == 4
+#  define HTYPE_TCFLAG_T 			Word32
+# elif SIZEOF_TCFLAG_T == 2
+#  define HTYPE_TCFLAG_T 			Word16
+# else
+# endif
+#endif
+
+#ifdef SIZEOF_RLIM_T
+# if SIZEOF_RLIM_T == 8
+#  define HTYPE_RLIM_T 			Word64
+# elif SIZEOF_RLIM_T == 4
+#  define HTYPE_RLIM_T 			Word32
+# elif SIZEOF_RLIM_T == 2
+#  define HTYPE_RLIM_T 			Word16
+# else
+# endif
+#endif
+
+/********************************************************************/
+/**** Presence of include files                                  ****/
+/********************************************************************/
+
+#define HAVE_DIRENT_H 1
+#define HAVE_ERRNO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_SIGNAL_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_STRING_H 1
+#define HAVE_SYS_RESOURCE_H 1
+#define HAVE_SYS_SELECT_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_SYSCALL_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TIMEB_H 1
+/* #undef HAVE_SYS_TIMERS_H */
+#define HAVE_SYS_TIMES_H 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_UTSNAME_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_TERMIOS_H 1
+#define HAVE_TIME_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_UTIME_H 1
+/* #undef HAVE_VFORK_H */
+#define HAVE_WCTYPE_H 1
+/* #undef HAVE_WINDOWS_H */
+/* #undef HAVE_WINSOCK_H */
+
+/* #undef HAVE__CHSIZE */
+#define HAVE_FTRUNCATE 1
+/* #undef HAVE_GETCLOCK */
+#define HAVE_GETRUSAGE 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_LSTAT 1
+#define HAVE_READDIR_R 1
+
+/********************************************************************/
+/**** Runtime types                                              ****/
+/********************************************************************/
+
+#ifdef __UHC_BUILDS_O__
+
+#if defined(__UHC_TARGET_BC__) || defined(__UHC_TARGET_C__)
+// # define HsBool				Word
+// # define HsInt				Word
+// # define HsWord64			Word64
+// # define HsWord32			Word32
+// # define HsWord16			Word16
+// # define HsWord8			Word8
+// # ifdef __UHC_TARGET_BC__
+// #  define HS_BOOL_FALSE		gb_False
+// #  define HS_BOOL_TRUE		gb_True
+// # else
+// #  define HS_BOOL_FALSE		0
+// #  define HS_BOOL_TRUE		1
+// # endif
+#endif /* __UHC_TARGET_BC__ */
+
+#endif /* __UHC_BUILDS_O__ */
+
+/********************************************************************/
+/**** Read dir EOF error                                         ****/
+/********************************************************************/
+
+/* See remarks in GHC, libraries/base/aclocal.m4: MinGW platform returns non 0 value. We ignore that */
+#define	READDIR_ERRNO_EOF	0
+
+/********************************************************************/
+/**** C errors                                                   ****/
+/********************************************************************/
+
+/* (1) Assume errno.h is already included */
+/* (2) Error codes like EADV are not present on all platforms, so a dummy value is provided, this should be done for all codes */
+
+/* The value of E2BIG. */
+#if !defined(E2BIG)
+#define E2BIG 10000
+#endif
+#define CONST_E2BIG E2BIG
+
+/* The value of EACCES. */
+#if !defined(EACCES)
+#define EACCES 10000
+#endif
+#define CONST_EACCES EACCES
+
+/* The value of EADDRINUSE. */
+#if !defined(EADDRINUSE)
+#define EADDRINUSE 10000
+#endif
+#define CONST_EADDRINUSE EADDRINUSE
+
+/* The value of EADDRNOTAVAIL. */
+#define CONST_EADDRNOTAVAIL EADDRNOTAVAIL
+
+/* The value of EADV. */
+#if !defined(EADV)
+#define EADV 10000
+#endif
+#define CONST_EADV EADV
+
+/* The value of EAFNOSUPPORT. */
+#if !defined(EAFNOSUPPORT)
+#define EAFNOSUPPORT 10000
+#endif
+#define CONST_EAFNOSUPPORT EAFNOSUPPORT
+
+/* The value of EAGAIN. */
+#if !defined(EAGAIN)
+#define EAGAIN 10000
+#endif
+#define CONST_EAGAIN EAGAIN
+
+/* The value of EALREADY. */
+#if !defined(EALREADY)
+#define EALREADY 10000
+#endif
+#define CONST_EALREADY EALREADY
+
+/* The value of EBADF. */
+#if !defined(EBADF)
+#define EBADF 10000
+#endif
+#define CONST_EBADF EBADF
+
+/* The value of EBADMSG. */
+#if !defined(EBADMSG)
+#define EBADMSG 10000
+#endif
+#define CONST_EBADMSG EBADMSG
+
+/* The value of EBADRPC. */
+#if !defined(EBADRPC)
+#define EBADRPC 10000
+#endif
+#define CONST_EBADRPC EBADRPC
+
+/* The value of EBUSY. */
+#if !defined(EBUSY)
+#define EBUSY 10000
+#endif
+#define CONST_EBUSY EBUSY
+
+/* The value of ECHILD. */
+#if !defined(ECHILD)
+#define ECHILD 10000
+#endif
+#define CONST_ECHILD ECHILD
+
+/* The value of ECOMM. */
+#if !defined(ECOMM)
+#define ECOMM 10000
+#endif
+#define CONST_ECOMM ECOMM
+
+/* The value of ECONNABORTED. */
+#if !defined(ECONNABORTED)
+#define ECONNABORTED 10000
+#endif
+#define CONST_ECONNABORTED ECONNABORTED
+
+/* The value of ECONNREFUSED. */
+#if !defined(ECONNREFUSED)
+#define ECONNREFUSED 10000
+#endif
+#define CONST_ECONNREFUSED ECONNREFUSED
+
+/* The value of ECONNRESET. */
+#if !defined(ECONNRESET)
+#define ECONNRESET 10000
+#endif
+#define CONST_ECONNRESET ECONNRESET
+
+/* The value of EDEADLK. */
+#if !defined(EDEADLK)
+#define EDEADLK 10000
+#endif
+#define CONST_EDEADLK EDEADLK
+
+/* The value of EDESTADDRREQ. */
+#if !defined(EDESTADDRREQ)
+#define EDESTADDRREQ 10000
+#endif
+#define CONST_EDESTADDRREQ EDESTADDRREQ
+
+/* The value of EDIRTY. */
+#if !defined(EDIRTY)
+#define EDIRTY 10000
+#endif
+#define CONST_EDIRTY EDIRTY
+
+/* The value of EDOM. */
+#if !defined(EDOM)
+#define EDOM 10000
+#endif
+#define CONST_EDOM EDOM
+
+/* The value of EDQUOT. */
+#if !defined(EDQUOT)
+#define EDQUOT 10000
+#endif
+#define CONST_EDQUOT EDQUOT
+
+/* The value of EEXIST. */
+#if !defined(EEXIST)
+#define EEXIST 10000
+#endif
+#define CONST_EEXIST EEXIST
+
+/* The value of EFAULT. */
+#if !defined(EFAULT)
+#define EFAULT 10000
+#endif
+#define CONST_EFAULT EFAULT
+
+/* The value of EFBIG. */
+#if !defined(EFBIG)
+#define EFBIG 10000
+#endif
+#define CONST_EFBIG EFBIG
+
+/* The value of EFTYPE. */
+#if !defined(EFTYPE)
+#define EFTYPE 10000
+#endif
+#define CONST_EFTYPE EFTYPE
+
+/* The value of EHOSTDOWN. */
+#if !defined(EHOSTDOWN)
+#define EHOSTDOWN 10000
+#endif
+#define CONST_EHOSTDOWN EHOSTDOWN
+
+/* The value of EHOSTUNREACH. */
+#if !defined(EHOSTUNREACH)
+#define EHOSTUNREACH 10000
+#endif
+#define CONST_EHOSTUNREACH EHOSTUNREACH
+
+/* The value of EIDRM. */
+#if !defined(EIDRM)
+#define EIDRM 10000
+#endif
+#define CONST_EIDRM EIDRM
+
+/* The value of EILSEQ. */
+#if !defined(EILSEQ)
+#define EILSEQ 10000
+#endif
+#define CONST_EILSEQ EILSEQ
+
+/* The value of EINPROGRESS. */
+#if !defined(EINPROGRESS)
+#define EINPROGRESS 10000
+#endif
+#define CONST_EINPROGRESS EINPROGRESS
+
+/* The value of EINTR. */
+#if !defined(EINTR)
+#define EINTR 10000
+#endif
+#define CONST_EINTR EINTR
+
+/* The value of EINVAL. */
+#if !defined(EINVAL)
+#define EINVAL 10000
+#endif
+#define CONST_EINVAL EINVAL
+
+/* The value of EIO. */
+#if !defined(EIO)
+#define EIO 10000
+#endif
+#define CONST_EIO EIO
+
+/* The value of EISCONN. */
+#if !defined(EISCONN)
+#define EISCONN 10000
+#endif
+#define CONST_EISCONN EISCONN
+
+/* The value of EISDIR. */
+#if !defined(EISDIR)
+#define EISDIR 10000
+#endif
+#define CONST_EISDIR EISDIR
+
+/* The value of ELOOP. */
+#if !defined(ELOOP)
+#define ELOOP 10000
+#endif
+#define CONST_ELOOP ELOOP
+
+/* The value of EMFILE. */
+#if !defined(EMFILE)
+#define EMFILE 10000
+#endif
+#define CONST_EMFILE EMFILE
+
+/* The value of EMLINK. */
+#if !defined(EMLINK)
+#define EMLINK 10000
+#endif
+#define CONST_EMLINK EMLINK
+
+/* The value of EMSGSIZE. */
+#if !defined(EMSGSIZE)
+#define EMSGSIZE 10000
+#endif
+#define CONST_EMSGSIZE EMSGSIZE
+
+/* The value of EMULTIHOP. */
+#if !defined(EMULTIHOP)
+#define EMULTIHOP 10000
+#endif
+#define CONST_EMULTIHOP EMULTIHOP
+
+/* The value of ENAMETOOLONG. */
+#if !defined(ENAMETOOLONG)
+#define ENAMETOOLONG 10000
+#endif
+#define CONST_ENAMETOOLONG ENAMETOOLONG
+
+/* The value of ENETDOWN. */
+#if !defined(ENETDOWN)
+#define ENETDOWN 10000
+#endif
+#define CONST_ENETDOWN ENETDOWN
+
+/* The value of ENETRESET. */
+#if !defined(ENETRESET)
+#define ENETRESET 10000
+#endif
+#define CONST_ENETRESET ENETRESET
+
+/* The value of ENETUNREACH. */
+#if !defined(ENETUNREACH)
+#define ENETUNREACH 10000
+#endif
+#define CONST_ENETUNREACH ENETUNREACH
+
+/* The value of ENFILE. */
+#if !defined(ENFILE)
+#define ENFILE 10000
+#endif
+#define CONST_ENFILE ENFILE
+
+/* The value of ENOBUFS. */
+#if !defined(ENOBUFS)
+#define ENOBUFS 10000
+#endif
+#define CONST_ENOBUFS ENOBUFS
+
+/* The value of ENOCIGAR. */
+#if !defined(ENOCIGAR)
+#define ENOCIGAR 10000
+#endif
+#define CONST_ENOCIGAR ENOCIGAR
+
+/* The value of ENODATA. */
+#if !defined(ENODATA)
+#define ENODATA 10000
+#endif
+#define CONST_ENODATA ENODATA
+
+/* The value of ENODEV. */
+#if !defined(ENODEV)
+#define ENODEV 10000
+#endif
+#define CONST_ENODEV ENODEV
+
+/* The value of ENOENT. */
+#if !defined(ENOENT)
+#define ENOENT 10000
+#endif
+#define CONST_ENOENT ENOENT
+
+/* The value of ENOEXEC. */
+#if !defined(ENOEXEC)
+#define ENOEXEC 10000
+#endif
+#define CONST_ENOEXEC ENOEXEC
+
+/* The value of ENOLCK. */
+#if !defined(ENOLCK)
+#define ENOLCK 10000
+#endif
+#define CONST_ENOLCK ENOLCK
+
+/* The value of ENOLINK. */
+#if !defined(ENOLINK)
+#define ENOLINK 10000
+#endif
+#define CONST_ENOLINK ENOLINK
+
+/* The value of ENOMEM. */
+#if !defined(ENOMEM)
+#define ENOMEM 10000
+#endif
+#define CONST_ENOMEM ENOMEM
+
+/* The value of ENOMSG. */
+#if !defined(ENOMSG)
+#define ENOMSG 10000
+#endif
+#define CONST_ENOMSG ENOMSG
+
+/* The value of ENONET. */
+#if !defined(ENONET)
+#define ENONET 10000
+#endif
+#define CONST_ENONET ENONET
+
+/* The value of ENOPROTOOPT. */
+#if !defined(ENOPROTOOPT)
+#define ENOPROTOOPT 10000
+#endif
+#define CONST_ENOPROTOOPT ENOPROTOOPT
+
+/* The value of ENOSPC. */
+#if !defined(ENOSPC)
+#define ENOSPC 10000
+#endif
+#define CONST_ENOSPC ENOSPC
+
+/* The value of ENOSR. */
+#if !defined(ENOSR)
+#define ENOSR 10000
+#endif
+#define CONST_ENOSR ENOSR
+
+/* The value of ENOSTR. */
+#if !defined(ENOSTR)
+#define ENOSTR 10000
+#endif
+#define CONST_ENOSTR ENOSTR
+
+/* The value of ENOSYS. */
+#if !defined(ENOSYS)
+#define ENOSYS 10000
+#endif
+#define CONST_ENOSYS ENOSYS
+
+/* The value of ENOTBLK. */
+#if !defined(ENOTBLK)
+#define ENOTBLK 10000
+#endif
+#define CONST_ENOTBLK ENOTBLK
+
+/* The value of ENOTCONN. */
+#if !defined(ENOTCONN)
+#define ENOTCONN 10000
+#endif
+#define CONST_ENOTCONN ENOTCONN
+
+/* The value of ENOTDIR. */
+#if !defined(ENOTDIR)
+#define ENOTDIR 10000
+#endif
+#define CONST_ENOTDIR ENOTDIR
+
+/* The value of ENOTEMPTY. */
+#if !defined(ENOTEMPTY)
+#define ENOTEMPTY 10000
+#endif
+#define CONST_ENOTEMPTY ENOTEMPTY
+
+/* The value of ENOTSOCK. */
+#if !defined(ENOTSOCK)
+#define ENOTSOCK 10000
+#endif
+#define CONST_ENOTSOCK ENOTSOCK
+
+/* The value of ENOTTY. */
+#if !defined(ENOTTY)
+#define ENOTTY 10000
+#endif
+#define CONST_ENOTTY ENOTTY
+
+/* The value of ENXIO. */
+#if !defined(ENXIO)
+#define ENXIO 10000
+#endif
+#define CONST_ENXIO ENXIO
+
+/* The value of EOPNOTSUPP. */
+#if !defined(EOPNOTSUPP)
+#define EOPNOTSUPP 10000
+#endif
+#define CONST_EOPNOTSUPP EOPNOTSUPP
+
+/* The value of EPERM. */
+#if !defined(EPERM)
+#define EPERM 10000
+#endif
+#define CONST_EPERM EPERM
+
+/* The value of EPFNOSUPPORT. */
+#if !defined(EPFNOSUPPORT)
+#define EPFNOSUPPORT 10000
+#endif
+#define CONST_EPFNOSUPPORT EPFNOSUPPORT
+
+/* The value of EPIPE. */
+#if !defined(EPIPE)
+#define EPIPE 10000
+#endif
+#define CONST_EPIPE EPIPE
+
+/* The value of EPROCLIM. */
+#if !defined(EPROCLIM)
+#define EPROCLIM 10000
+#endif
+#define CONST_EPROCLIM EPROCLIM
+
+/* The value of EPROCUNAVAIL. */
+#if !defined(EPROCUNAVAIL)
+#define EPROCUNAVAIL 10000
+#endif
+#define CONST_EPROCUNAVAIL EPROCUNAVAIL
+
+/* The value of EPROGMISMATCH. */
+#if !defined(EPROGMISMATCH)
+#define EPROGMISMATCH 10000
+#endif
+#define CONST_EPROGMISMATCH EPROGMISMATCH
+
+/* The value of EPROGUNAVAIL. */
+#if !defined(EPROGUNAVAIL)
+#define EPROGUNAVAIL 10000
+#endif
+#define CONST_EPROGUNAVAIL EPROGUNAVAIL
+
+/* The value of EPROTO. */
+#if !defined(EPROTO)
+#define EPROTO 10000
+#endif
+#define CONST_EPROTO EPROTO
+
+/* The value of EPROTONOSUPPORT. */
+#if !defined(EPROTONOSUPPORT)
+#define EPROTONOSUPPORT 10000
+#endif
+#define CONST_EPROTONOSUPPORT EPROTONOSUPPORT
+
+/* The value of EPROTOTYPE. */
+#if !defined(EPROTOTYPE)
+#define EPROTOTYPE 10000
+#endif
+#define CONST_EPROTOTYPE EPROTOTYPE
+
+/* The value of ERANGE. */
+#if !defined(ERANGE)
+#define ERANGE 10000
+#endif
+#define CONST_ERANGE ERANGE
+
+/* The value of EREMCHG. */
+#if !defined(EREMCHG)
+#define EREMCHG 10000
+#endif
+#define CONST_EREMCHG EREMCHG
+
+/* The value of EREMOTE. */
+#if !defined(EREMOTE)
+#define EREMOTE 10000
+#endif
+#define CONST_EREMOTE EREMOTE
+
+/* The value of EROFS. */
+#if !defined(EROFS)
+#define EROFS 10000
+#endif
+#define CONST_EROFS EROFS
+
+/* The value of ERPCMISMATCH. */
+#if !defined(ERPCMISMATCH)
+#define ERPCMISMATCH 10000
+#endif
+#define CONST_ERPCMISMATCH ERPCMISMATCH
+
+/* The value of ERREMOTE. */
+#if !defined(ERREMOTE)
+#define ERREMOTE 10000
+#endif
+#define CONST_ERREMOTE ERREMOTE
+
+/* The value of ESHUTDOWN. */
+#if !defined(ESHUTDOWN)
+#define ESHUTDOWN 10000
+#endif
+#define CONST_ESHUTDOWN ESHUTDOWN
+
+/* The value of ESOCKTNOSUPPORT. */
+#if !defined(ESOCKTNOSUPPORT)
+#define ESOCKTNOSUPPORT 10000
+#endif
+#define CONST_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
+
+/* The value of ESPIPE. */
+#if !defined(ESPIPE)
+#define ESPIPE 10000
+#endif
+#define CONST_ESPIPE ESPIPE
+
+/* The value of ESRCH. */
+#if !defined(ESRCH)
+#define ESRCH 10000
+#endif
+#define CONST_ESRCH ESRCH
+
+/* The value of ESRMNT. */
+#if !defined(ESRMNT)
+#define ESRMNT 10000
+#endif
+#define CONST_ESRMNT ESRMNT
+
+/* The value of ESTALE. */
+#if !defined(ESTALE)
+#define ESTALE 10000
+#endif
+#define CONST_ESTALE ESTALE
+
+/* The value of ETIME. */
+#if !defined(ETIME)
+#define ETIME 10000
+#endif
+#define CONST_ETIME ETIME
+
+/* The value of ETIMEDOUT. */
+#if !defined(ETIMEDOUT)
+#define ETIMEDOUT 10000
+#endif
+#define CONST_ETIMEDOUT ETIMEDOUT
+
+/* The value of ETOOMANYREFS. */
+#if !defined(ETOOMANYREFS)
+#define ETOOMANYREFS 10000
+#endif
+#define CONST_ETOOMANYREFS ETOOMANYREFS
+
+/* The value of ETXTBSY. */
+#if !defined(ETXTBSY)
+#define ETXTBSY 10000
+#endif
+#define CONST_ETXTBSY ETXTBSY
+
+/* The value of EUSERS. */
+#if !defined(EUSERS)
+#define EUSERS 10000
+#endif
+#define CONST_EUSERS EUSERS
+
+/* The value of EWOULDBLOCK. */
+#if !defined(EWOULDBLOCK)
+#define EWOULDBLOCK 10000
+#endif
+#define CONST_EWOULDBLOCK EWOULDBLOCK
+
+/* The value of EXDEV. */
+#if !defined(EXDEV)
+#define EXDEV 10000
+#endif
+#define CONST_EXDEV EXDEV
+
+/* The value of O_BINARY. */
+#if !defined(O_BINARY)
+#define O_BINARY 10000
+#endif
+#define CONST_O_BINARY O_BINARY
+
+/* The value of SIGINT. */
+#if !defined(SIGINT)
+#define SIGINT 10000
+#endif
+#define CONST_SIGINT SIGINT
+
+
+#endif
+
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/IntLikeInstance.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/IntLikeInstance.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/IntLikeInstance.h
@@ -0,0 +1,242 @@
+{- --------------------------------------------------------------------------
+// Macros to help make various instances for Int like types (Int8, ...).
+//
+// Primitives are defined by 2 forms of macros:
+//  - starting with PRIMS_  : name of Haskell function and primitive is the same
+//  - starting with PRIMS2_ : name of primitive is given explicitly, to allow sharing between primitives
+// --------------------------------------------------------------------------
+-}
+
+-- define conversion primitives
+#define PRIMS_CONVERSION_INTEGER(tycon,primIntegerTo,primToInteger) \
+foreign import prim primIntegerTo :: Integer -> tycon ; \
+foreign import prim primToInteger :: tycon -> Integer 
+
+#define PRIMS2_CONVERSION_INTEGER(tycon,primIntegerTo,primIntegerToNm,primToInteger,primToIntegerNm) \
+foreign import prim primIntegerToNm primIntegerTo :: Integer -> tycon ; \
+foreign import prim primToIntegerNm primToInteger :: tycon -> Integer 
+
+#define PRIMS_CONVERSION_INT(tycon,primIntTo,primToInt) \
+foreign import prim primIntTo     :: Int -> tycon ; \
+foreign import prim primToInt     :: tycon -> Int 
+
+
+-- define Eq primitives
+#define PRIMS_EQ(tycon,primEq,primNe) \
+foreign import prim primEq      :: tycon -> tycon -> Bool ; \
+foreign import prim primNe      :: tycon -> tycon -> Bool 
+
+#define PRIMS2_EQ(tycon,primEq,primEqNm,primNe,primNeNm) \
+foreign import prim primEqNm primEq     :: tycon -> tycon -> Bool ; \
+foreign import prim primNeNm primNe     :: tycon -> tycon -> Bool
+
+
+-- define Eq instance
+#define INSTANCE_EQ(tycon,primEq,primNe) \
+instance Eq tycon where \
+  { (==) = primEq ; \
+  	(/=) = primNe \
+  }
+
+
+-- define Ord primitives
+
+#define PRIMS_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \
+foreign import prim primCmp     :: tycon -> tycon -> Ordering ; \
+foreign import prim primLt      :: tycon -> tycon -> Bool ; \
+foreign import prim primGt      :: tycon -> tycon -> Bool ; \
+foreign import prim primLe      :: tycon -> tycon -> Bool ; \
+foreign import prim primGe      :: tycon -> tycon -> Bool 
+
+#define PRIMS2_ORD(tycon,primCmp,primCmpNm,primLt,primLtNm,primGt,primGtNm,primLe,primLeNm,primGe,primGeNm) \
+foreign import prim primCmpNm primCmp     :: tycon -> tycon -> Ordering ; \
+foreign import prim primLtNm primLt      :: tycon -> tycon -> Bool ; \
+foreign import prim primGtNm primGt      :: tycon -> tycon -> Bool ; \
+foreign import prim primLeNm primLe      :: tycon -> tycon -> Bool ; \
+foreign import prim primGeNm primGe      :: tycon -> tycon -> Bool 
+
+
+-- define Ord instance
+
+#define INSTANCE_ORD(tycon,primCmp,primLt,primGt,primLe,primGe) \
+instance Ord tycon where \
+  { compare = primCmp \
+  ; (<) = primLt \
+  ; (>) = primGt \
+  ; (<=) = primLe \
+  ; (>=) = primGe \
+  }
+
+
+-- define Bounded primitives
+#define PRIMS_BOUNDED(tycon,primMin,primMax) \
+foreign import prim primMin     :: tycon ; \
+foreign import prim primMax     :: tycon 
+
+
+-- define Bounded instance
+#define INSTANCE_BOUNDED(tycon,primMin,primMax) \
+instance Bounded tycon where \
+  { minBound = primMin \
+  ; maxBound = primMax \
+  }
+
+
+-- define Num primitives
+#define PRIMS_NUM(tycon,primAdd,primSub,primMul,primNeg) \
+foreign import prim primAdd       :: tycon -> tycon -> tycon ; \
+foreign import prim primSub       :: tycon -> tycon -> tycon ; \
+foreign import prim primMul       :: tycon -> tycon -> tycon ; \
+foreign import prim primNeg       :: tycon -> tycon 
+
+#define PRIMS2_NUM(tycon,primAdd,primAddNm,primSub,primSubNm,primMul,primMulNm,primNeg,primNegNm) \
+foreign import prim primAddNm 			primAdd       :: tycon -> tycon -> tycon ; \
+foreign import prim primSubNm 			primSub       :: tycon -> tycon -> tycon ; \
+foreign import prim primMulNm 			primMul       :: tycon -> tycon -> tycon ; \
+foreign import prim primNegNm 			primNeg       :: tycon -> tycon 
+
+
+-- define Num instance
+#define INSTANCE_NUM(tycon,primAdd,primSub,primMul,primNeg,primIntegerTo,primIntTo) \
+instance Num tycon where \
+  { (+)         = primAdd \
+  ; (-)         = primSub \
+  ; (*)         = primMul \
+  ; negate      = primNeg \
+  ; fromInteger = primIntegerTo \
+  ; fromInt     = primIntTo \
+  ; abs         = absReal \
+  ; signum      = signumReal \
+  }
+
+
+-- define Enum instance
+#define INSTANCE_ENUM(tycon,primToEnum,primFromEnum) \
+instance Enum tycon where \
+  { succ           = boundedSucc \
+  ; pred           = boundedPred \
+  ; toEnum         = primToEnum \
+  ; fromEnum       = primFromEnum \
+  ; enumFrom       = boundedEnumFrom \
+  ; enumFromTo     = boundedEnumFromTo \
+  ; enumFromThen   = boundedEnumFromThen \
+  ; enumFromThenTo = boundedEnumFromThenTo \
+  }
+
+
+-- define Real instance
+#define INSTANCE_REAL(tycon) \
+instance Real tycon where \
+  { toRational x = toInteger x % 1 \
+  }
+
+
+-- define Integral primitives
+#define PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) \
+foreign import prim primDiv       :: tycon -> tycon -> tycon ; \
+foreign import prim primMod       :: tycon -> tycon -> tycon ; \
+foreign import prim primQuot      :: tycon -> tycon -> tycon ; \
+foreign import prim primRem       :: tycon -> tycon -> tycon 
+
+#define PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primRemNm) \
+foreign import prim primDivNm 			primDiv       :: tycon -> tycon -> tycon ; \
+foreign import prim primModNm 			primMod       :: tycon -> tycon -> tycon ; \
+foreign import prim primQuotNm 			primQuot      :: tycon -> tycon -> tycon ; \
+foreign import prim primRemNm 			primRem       :: tycon -> tycon -> tycon 
+
+#define PRIMS_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem) \
+PRIMS_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem) ; \
+foreign import prim primDivMod    :: tycon -> tycon -> (tycon,tycon) ; \
+foreign import prim primQuotRem   :: tycon -> tycon -> (tycon,tycon) 
+
+#define PRIMS2_INTEGRAL2(tycon,primDiv,primDivNm,primMod,primModNm,primDivMod,primDivModNm,primQuot,primQuotNm,primRem,primRemNm,primQuotRem,primQuotRemNm) \
+PRIMS2_INTEGRAL1(tycon,primDiv,primDivNm,primMod,primModNm,primQuot,primQuotNm,primRem,primQuotRemNm) ; \
+foreign import prim primDivModNm 	primDivMod    :: tycon -> tycon -> (tycon,tycon) ; \
+foreign import prim primQuotRemNm 	primQuotRem   :: tycon -> tycon -> (tycon,tycon) 
+
+
+-- define Integral instance, assume default for divMod
+#define INSTANCE_INTEGRAL1(tycon,primDiv,primMod,primQuot,primRem,primToInteger,primToInt) \
+instance Integral tycon where \
+  { quotRem d m \
+              = (primQuot d m, primRem d m) \
+  ; div       = primDiv \
+  ; quot      = primQuot \
+  ; rem       = primRem \
+  ; mod       = primMod \
+  ; toInteger = primToInteger \
+  ; toInt     = primToInt \
+  }
+
+#define INSTANCE_INTEGRAL2(tycon,primDiv,primMod,primDivMod,primQuot,primRem,primQuotRem,primToInteger,primToInt) \
+instance Integral tycon where \
+  { divMod    = primDivMod \
+  ; quotRem   = primQuotRem \
+  ; div       = primDiv \
+  ; quot      = primQuot \
+  ; rem       = primRem \
+  ; mod       = primMod \
+  ; toInteger = primToInteger \
+  ; toInt     = primToInt \
+  }
+
+
+-- define Show instance
+#define INSTANCE_SHOW(tycon) \
+instance Show tycon where \
+  { show = show . toInteger \
+  }
+
+
+-- define Read instance
+#define INSTANCE_READ(tycon) \
+instance Read tycon where \
+  { readsPrec p = readSigned readDec \
+  }
+
+
+-- define Bits primitives
+#define PRIMS_BITLOGIC(tycon,primAnd,primOr,primXor) \
+foreign import prim primAnd       	:: tycon -> tycon -> tycon ; \
+foreign import prim primOr       	:: tycon -> tycon -> tycon ; \
+foreign import prim primXor      	:: tycon -> tycon -> tycon
+
+#define PRIMS_BITSHIFT(tycon,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \
+foreign import prim primComplement	:: tycon -> tycon ; \
+foreign import prim primShiftLeft  	:: tycon -> Int -> tycon ; \
+foreign import prim primShiftRight 	:: tycon -> Int -> tycon ; \
+foreign import prim primRotateLeft  :: tycon -> Int -> tycon ; \
+foreign import prim primRotateRight :: tycon -> Int -> tycon
+
+#define PRIMS2_BITLOGIC(tycon,primAnd,primAndNm,primOr,primOrNm,primXor,primXorNm) \
+foreign import prim primAndNm       	primAnd       	:: tycon -> tycon -> tycon ; \
+foreign import prim primOrNm       		primOr       	:: tycon -> tycon -> tycon ; \
+foreign import prim primXorNm      		primXor      	:: tycon -> tycon -> tycon
+
+#define PRIMS2_BITSHIFT(tycon,primComplement,primComplementNm,primShiftLeft,primShiftLeftNm,primShiftRight,primShiftRightNm,primRotateLeft,primRotateLeftNm,primRotateRight,primRotateRightNm) \
+foreign import prim primComplementNm	primComplement	:: tycon -> tycon ; \
+foreign import prim primShiftLeftNm  	primShiftLeft  	:: tycon -> Int -> tycon ; \
+foreign import prim primShiftRightNm 	primShiftRight 	:: tycon -> Int -> tycon ; \
+foreign import prim primRotateLeftNm  	primRotateLeft  :: tycon -> Int -> tycon ; \
+foreign import prim primRotateRightNm 	primRotateRight :: tycon -> Int -> tycon
+
+-- define Bits instance
+#define INSTANCE_BITS1(tycon,size,signed,primAnd,primOr,primXor,primComplement,primShiftLeft,primShiftRight,primRotateLeft,primRotateRight) \
+instance Bits tycon where \
+  { (.&.)   	= primAnd \
+  ; (.|.)   	= primOr \
+  ; xor	   		= primXor \
+  ; complement  = primComplement \
+  ; shiftL      = primShiftLeft \
+  ; shiftR      = primShiftRight \
+  ; rotateL     = primRotateLeft \
+  ; rotateR     = primRotateRight \
+  ; bitSize _   = size \
+  ; isSigned _  = signed \
+  }
+
+
+
+
+
+
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/MachDeps.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/MachDeps.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/MachDeps.h
@@ -0,0 +1,125 @@
+/* ehclib/uhcbase/include/MachDeps.h.  Generated from MachDeps.h.in by configure.  */
+#ifndef MACHDEPS_H
+#define MACHDEPS_H
+
+#define SIZEOF_INTPTR_T 8
+#define SIZEOF_CHAR 1
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_LONG 8
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF_FLOAT 4
+#define SIZEOF_DOUBLE 8
+#define SIZEOF_UNSIGNED_CHAR 1
+#define SIZEOF_UNSIGNED_SHORT 2
+#define SIZEOF_UNSIGNED_INT 4
+#define SIZEOF_UNSIGNED_LONG 8
+#define SIZEOF_UNSIGNED_LONG_LONG 8
+#define SIZEOF_VOID_P 8
+
+#define SIZEOF_DEV_T 4
+#define SIZEOF_INO_T 8
+#define SIZEOF_OFF_T 8
+#define SIZEOF_MODE_T 2
+#define SIZEOF_PID_T 4
+#define SIZEOF_SSIZE_T 8
+#define SIZEOF_GID_T 4
+#define SIZEOF_NLINK_T 2
+#define SIZEOF_UID_T 4
+#define SIZEOF_RLIM_T 8
+#define SIZEOF_CLOCK_T 8
+#define SIZEOF_TIME_T 8
+#define SIZEOF_SIZE_T 8
+#define SIZEOF_WCHAR_T 4
+
+#define SIZEOF_CC_T 1
+#define SIZEOF_SPEED_T 8
+#define SIZEOF_TCFLAG_T 8
+
+#define ALIGNOF_INTPTR_T 8
+#define ALIGNOF_CHAR 1
+#define ALIGNOF_SHORT 2
+#define ALIGNOF_INT 4
+#define ALIGNOF_LONG 8
+#define ALIGNOF_LONG_LONG 8
+#define ALIGNOF_FLOAT 4
+#define ALIGNOF_DOUBLE 8
+#define ALIGNOF_UNSIGNED_CHAR 1
+#define ALIGNOF_UNSIGNED_SHORT 2
+#define ALIGNOF_UNSIGNED_INT 4
+#define ALIGNOF_UNSIGNED_LONG 8
+#define ALIGNOF_UNSIGNED_LONG_LONG 8
+#define ALIGNOF_VOID_P 8
+
+#define ALIGNOF_UINT8_T 1
+#define ALIGNOF_UINT16_T 2
+#define ALIGNOF_UINT32_T 4
+#define ALIGNOF_UINT64_T 8
+
+#if SIZEOF_INTPTR_T == 8
+#define USE_64_BITS 1
+#define USE_32_BITS 0
+#else
+#define USE_64_BITS 0
+#define USE_32_BITS 1
+#endif
+
+#ifdef __UHC_TARGET_BC__
+#define BITSIZEOF_WORDTAG		1
+#else
+#define BITSIZEOF_WORDTAG		0
+#endif
+
+#define SIZEOF_HSCHAR           SIZEOF_INTPTR_T
+#define ALIGNMENT_HSCHAR        ALIGNOF_UINT32_T
+
+#define SIZEOF_HSINT            SIZEOF_INTPTR_T
+#define ALIGNMENT_HSINT         ALIGNOF_INTPTR_T
+
+#define SIZEOF_HSWORD			SIZEOF_INTPTR_T
+#define ALIGNMENT_HSWORD		ALIGNOF_INTPTR_T
+
+#define SIZEOF_HSDOUBLE			SIZEOF_DOUBLE
+#define ALIGNMENT_HSDOUBLE		ALIGNOF_DOUBLE
+
+#define SIZEOF_HSFLOAT			SIZEOF_FLOAT
+#define ALIGNMENT_HSFLOAT		ALIGNOF_FLOAT
+
+#define SIZEOF_HSPTR            SIZEOF_VOID_P
+#define ALIGNMENT_HSPTR         ALIGNOF_VOID_P
+
+#define SIZEOF_HSFUNPTR         SIZEOF_VOID_P
+#define ALIGNMENT_HSFUNPTR      ALIGNOF_VOID_P
+
+#define SIZEOF_HSFOREIGNPTR     SIZEOF_VOID_P
+#define ALIGNMENT_HSFOREIGNPTR  ALIGNOF_VOID_P
+
+#define SIZEOF_HSSTABLEPTR      SIZEOF_VOID_P
+#define ALIGNMENT_HSSTABLEPTR   ALIGNOF_VOID_P
+
+#define SIZEOF_INT8             8
+#define ALIGNMENT_INT8          ALIGNOF_UINT8_T
+
+#define SIZEOF_WORD8            8
+#define ALIGNMENT_WORD8         ALIGNOF_UINT8_T
+
+#define SIZEOF_INT16            16
+#define ALIGNMENT_INT16         ALIGNOF_UINT16_T
+
+#define SIZEOF_WORD16           16
+#define ALIGNMENT_WORD16        ALIGNOF_UINT16_T
+
+#define SIZEOF_INT32            32
+#define ALIGNMENT_INT32         ALIGNOF_UINT32_T
+
+#define SIZEOF_WORD32           32
+#define ALIGNMENT_WORD32        ALIGNOF_UINT32_T
+
+#define SIZEOF_INT64            64
+#define ALIGNMENT_INT64         ALIGNOF_UINT64_T
+
+#define SIZEOF_WORD64           64
+#define ALIGNMENT_WORD64        ALIGNOF_UINT64_T
+
+
+#endif
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/TupleInstance.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/TupleInstance.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/TupleInstance.h
@@ -0,0 +1,147 @@
+{- --------------------------------------------------------------------------
+// Macros to help make various instances for tuples.
+// A kind of poor mans deriving.
+//
+// --------------------------------------------------------------------------
+-}
+
+#define	COMMA	,
+
+{- --------------------------------------------------------------------------
+// 2 tuple, 1 unary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
+instance (clscon a, clscon b) => clscon (a,b) where \
+  { op1 op1preArg (a,b) op1postArg \
+      = pre \
+            op1subop a \
+        sep op1subop b \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// 3 tuple, 1 unary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
+instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \
+  { op1 op1preArg (a,b,c) op1postArg \
+      = pre \
+            op1subop a \
+        sep op1subop b \
+        sep op1subop c \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// 4 tuple, 1 unary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
+instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \
+  { op1 op1preArg (a,b,c,d) op1postArg \
+      = pre \
+            op1subop a \
+        sep op1subop b \
+        sep op1subop c \
+        sep op1subop d \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// 5 tuple, 1 unary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
+instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \
+  { op1 op1preArg (a,b,c,d,e) op1postArg \
+      = pre \
+            op1subop a \
+        sep op1subop b \
+        sep op1subop c \
+        sep op1subop d \
+        sep op1subop e \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// Set of 2..n tuple, 1 unary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE_UNOP1_INSTANCES(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
+{ TUPLE2_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\
+  TUPLE3_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\
+  TUPLE4_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) ;\
+  TUPLE5_UNOP1_INSTANCE(clscon,op1,op1preArg,op1postArg,op1subop,pre,sep,post) \
+}
+
+{- --------------------------------------------------------------------------
+// 2 tuple, 1 binary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
+instance (clscon a, clscon b) => clscon (a,b) where \
+  { (a1,b1) op1 (a2,b2) \
+      = pre \
+            a1 op1subop a2 \
+        sep b1 op1subop b2 \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// 3 tuple, 1 binary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
+instance (clscon a, clscon b, clscon c) => clscon (a,b,c) where \
+  { (a1,b1,c1) op1 (a2,b2,c2) \
+      = pre \
+            a1 op1subop a2 \
+        sep b1 op1subop b2 \
+        sep c1 op1subop c2 \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// 4 tuple, 1 binary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
+instance (clscon a, clscon b, clscon c, clscon d) => clscon (a,b,c,d) where \
+  { (a1,b1,c1,d1) op1 (a2,b2,c2,d2) \
+      = pre \
+            a1 op1subop a2 \
+        sep b1 op1subop b2 \
+        sep c1 op1subop c2 \
+        sep d1 op1subop d2 \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// 5 tuple, 1 binary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
+instance (clscon a, clscon b, clscon c, clscon d, clscon e) => clscon (a,b,c,d,e) where \
+  { (a1,b1,c1,d1,e1) op1 (a2,b2,c2,d2,e2) \
+      = pre \
+            a1 op1subop a2 \
+        sep b1 op1subop b2 \
+        sep c1 op1subop c2 \
+        sep d1 op1subop d2 \
+        sep e1 op1subop e2 \
+        post \
+  }
+
+{- --------------------------------------------------------------------------
+// Set of 2..n tuple, 1 binary op
+// --------------------------------------------------------------------------
+-}
+#define TUPLE_BINOP1_INSTANCES(clscon,op1,op1subop,pre,sep,post) \
+{ TUPLE2_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\
+  TUPLE3_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\
+  TUPLE4_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) ;\
+  TUPLE5_BINOP1_INSTANCE(clscon,op1,op1subop,pre,sep,post) \
+}
+
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/Typeable.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/Typeable.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/Typeable.h
@@ -0,0 +1,149 @@
+{- --------------------------------------------------------------------------
+// Macros to help make Typeable instances.
+//
+// INSTANCE_TYPEABLEn(tc,tcname,"tc") defines
+//
+//	instance Typeable/n/ tc
+//	instance Typeable a => Typeable/n-1/ (tc a)
+//	instance (Typeable a, Typeable b) => Typeable/n-2/ (tc a b)
+//	...
+//	instance (Typeable a1, ..., Typeable an) => Typeable (tc a1 ... an)
+// --------------------------------------------------------------------------
+-}
+
+#ifndef TYPEABLE_H
+#define TYPEABLE_H
+
+#define INSTANCE_TYPEABLE0(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable tycon where { typeOf _ = mkTyConApp tcname [] }
+
+#ifdef __GLASGOW_HASKELL__
+
+--  // For GHC, the extra instances follow from general instance declarations
+--  // defined in Data.Typeable.
+
+#define INSTANCE_TYPEABLE1(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }
+
+#define INSTANCE_TYPEABLE2(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }
+
+#define INSTANCE_TYPEABLE3(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }
+
+#define INSTANCE_TYPEABLE4(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }
+
+#define INSTANCE_TYPEABLE5(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }
+
+#define INSTANCE_TYPEABLE6(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }
+
+#define INSTANCE_TYPEABLE7(tycon,tcname,str) \
+tcname :: TyCon; \
+tcname = mkTyCon str; \
+instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }
+
+#else /* !__GLASGOW_HASKELL__ */
+
+#define INSTANCE_TYPEABLE1(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable1 tycon where { typeOf1 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable (tycon a) where { typeOf = typeOfDefault }
+
+#define INSTANCE_TYPEABLE2(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable2 tycon where { typeOf2 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable1 (tycon a) where { \
+  typeOf1 = typeOf1Default }; \
+instance (Typeable a, Typeable b) => Typeable (tycon a b) where { \
+  typeOf = typeOfDefault }
+
+#define INSTANCE_TYPEABLE3(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable3 tycon where { typeOf3 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable2 (tycon a) where { \
+  typeOf2 = typeOf2Default }; \
+instance (Typeable a, Typeable b) => Typeable1 (tycon a b) where { \
+  typeOf1 = typeOf1Default }; \
+instance (Typeable a, Typeable b, Typeable c) => Typeable (tycon a b c) where { \
+  typeOf = typeOfDefault }
+
+#define INSTANCE_TYPEABLE4(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable4 tycon where { typeOf4 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable3 (tycon a) where { \
+  typeOf3 = typeOf3Default }; \
+instance (Typeable a, Typeable b) => Typeable2 (tycon a b) where { \
+  typeOf2 = typeOf2Default }; \
+instance (Typeable a, Typeable b, Typeable c) => Typeable1 (tycon a b c) where { \
+  typeOf1 = typeOf1Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable (tycon a b c d) where { \
+  typeOf = typeOfDefault }
+
+#define INSTANCE_TYPEABLE5(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable5 tycon where { typeOf5 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable4 (tycon a) where { \
+  typeOf4 = typeOf4Default }; \
+instance (Typeable a, Typeable b) => Typeable3 (tycon a b) where { \
+  typeOf3 = typeOf3Default }; \
+instance (Typeable a, Typeable b, Typeable c) => Typeable2 (tycon a b c) where { \
+  typeOf2 = typeOf2Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable1 (tycon a b c d) where { \
+  typeOf1 = typeOf1Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable (tycon a b c d e) where { \
+  typeOf = typeOfDefault }
+
+#define INSTANCE_TYPEABLE6(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable6 tycon where { typeOf6 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable5 (tycon a) where { \
+  typeOf5 = typeOf5Default }; \
+instance (Typeable a, Typeable b) => Typeable4 (tycon a b) where { \
+  typeOf4 = typeOf4Default }; \
+instance (Typeable a, Typeable b, Typeable c) => Typeable3 (tycon a b c) where { \
+  typeOf3 = typeOf3Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable2 (tycon a b c d) where { \
+  typeOf2 = typeOf2Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable1 (tycon a b c d e) where { \
+  typeOf1 = typeOf1Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable (tycon a b c d e f) where { \
+  typeOf = typeOfDefault }
+
+#define INSTANCE_TYPEABLE7(tycon,tcname,str) \
+tcname = mkTyCon str; \
+instance Typeable7 tycon where { typeOf7 _ = mkTyConApp tcname [] }; \
+instance Typeable a => Typeable6 (tycon a) where { \
+  typeOf6 = typeOf6Default }; \
+instance (Typeable a, Typeable b) => Typeable5 (tycon a b) where { \
+  typeOf5 = typeOf5Default }; \
+instance (Typeable a, Typeable b, Typeable c) => Typeable4 (tycon a b c) where { \
+  typeOf4 = typeOf4Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d) => Typeable3 (tycon a b c d) where { \
+  typeOf3 = typeOf3Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e) => Typeable2 (tycon a b c d e) where { \
+  typeOf2 = typeOf2Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f) => Typeable1 (tycon a b c d e f) where { \
+  typeOf1 = typeOf1Default }; \
+instance (Typeable a, Typeable b, Typeable c, Typeable d, Typeable e, Typeable f, Typeable g) => Typeable (tycon a b c d e f g) where { \
+  typeOf = typeOfDefault }
+
+#endif /* !__GLASGOW_HASKELL__ */
+
+#endif
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/dirUtils.h b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/dirUtils.h
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/dirUtils.h
@@ -0,0 +1,11 @@
+/* 
+ * (c) The University of Glasgow 2002
+ *
+ * Directory Runtime Support
+ */
+#ifndef __DIRUTILS_H__
+#define __DIRUTILS_H__
+
+extern int __hscore_readdir(DIR *dirPtr, struct dirent **pDirEnt);
+
+#endif /* __DIRUTILS_H__ */
diff --git a/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/installed-pkg-config b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/installed-pkg-config
new file mode 100644
--- /dev/null
+++ b/103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/installed-pkg-config
@@ -0,0 +1,2 @@
+exposed-modules: Control.Monad Data.Bits Data.Char Data.Either Data.Int Data.IORef Data.List Data.Maybe Data.Typeable Data.Word Debug.Trace Foreign.C.Error Foreign.C.String Foreign.C.Types Foreign.C Foreign.ForeignPtr Foreign.Marshal.Alloc Foreign.Marshal.Array Foreign.Marshal.Error Foreign.Marshal.Pool Foreign.Marshal.Utils Foreign.Marshal Foreign.Ptr Foreign.StablePtr Foreign.Storable Foreign System.IO.Error System.IO.Fix System.IO.Unsafe System.IO System.Posix.Internals System.Posix.Types UHC.Array UHC.Base UHC.Bits UHC.Bounded UHC.BoxArray UHC.ByteArray UHC.Char UHC.Conc UHC.Enum UHC.Eq UHC.Float UHC.ForeignPtr UHC.GC UHC.Generics.Tuple UHC.Generics UHC.Handle UHC.Int UHC.IO UHC.IOBase UHC.Ix UHC.LazyST UHC.MutVar UHC.MVar UHC.OldException UHC.OldIO UHC.Ord UHC.Prims UHC.Ptr UHC.Read UHC.Real UHC.Run UHC.Show UHC.ST UHC.StablePtr UHC.StackTrace UHC.Storable UHC.STRef UHC.Types UHC.Weak UHC.WeakPtr UHC.Word Unsafe.Coerce
+build-depends: 
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,15 @@
 # Changelog
 
+## 1.1.9.4 - 20160521
+
+- [compatibility] with ghc 8.0.1
+- [type system] Ongoing work for CHR based type system
+- [uhc-util] Ongoing sync with uhc-util
+- [compiler driver] check for writeability of directory is now on dest dir, not src dir
+- [pragmas] bangpatterns pragma turned off by default
+- [pragmas] bangpatterns pragma propagation to parser fixed
+- [options] fixed -O0 option
+
 ## 1.1.9.3 - 20160219
 
 - [libs] Updated version lowerbound for hashable and fclabels, via uhc-util
diff --git a/src/UHC/Light/Compiler/Base/Common.hs b/src/UHC/Light/Compiler/Base/Common.hs
--- a/src/UHC/Light/Compiler/Base/Common.hs
+++ b/src/UHC/Light/Compiler/Base/Common.hs
@@ -120,9 +120,11 @@
 
 
 {-# LINE 92 "src/ehc/Base/Common.chs" #-}
+#if __GLASGOW_HASKELL__ < 800
 deriving instance Generic Version
+#endif
 
-{-# LINE 103 "src/ehc/Base/Common.chs" #-}
+{-# LINE 105 "src/ehc/Base/Common.chs" #-}
 ppHsnEscapeWith :: Char -> (Char -> Bool) -> (String -> Bool) -> (HsName -> Bool) -> HsName -> (PP_Doc,Bool)
 ppHsnEscapeWith escChar okChars notOkStr leaveAsIs n = flip ST.runState False $ do
     let shown = hsnShow' showUIDParseable show (\s -> "{" ++ s ++ "}") "." "``" n
@@ -168,32 +170,32 @@
                         let s = foldr (\c r -> if c `Set.member` escapeeChars then '$':c:r else c:r) [] name
                          in  pp ('$':s)
 
-{-# LINE 154 "src/ehc/Base/Common.chs" #-}
+{-# LINE 156 "src/ehc/Base/Common.chs" #-}
 newtype PredOccId
   = PredOccId
       { poiId       :: UID
       }
   deriving (Show,Eq,Ord)
 
-{-# LINE 162 "src/ehc/Base/Common.chs" #-}
+{-# LINE 164 "src/ehc/Base/Common.chs" #-}
 mkPrId :: UID -> PredOccId
 mkPrId u = PredOccId u
 
 poiHNm :: PredOccId -> HsName
 poiHNm = uidHNm . poiId
 
-{-# LINE 170 "src/ehc/Base/Common.chs" #-}
+{-# LINE 172 "src/ehc/Base/Common.chs" #-}
 mkPrIdCHR :: UID -> PredOccId
 mkPrIdCHR = mkPrId
 
-{-# LINE 175 "src/ehc/Base/Common.chs" #-}
+{-# LINE 177 "src/ehc/Base/Common.chs" #-}
 emptyPredOccId :: PredOccId
 emptyPredOccId = mkPrId uidStart
 
-{-# LINE 184 "src/ehc/Base/Common.chs" #-}
+{-# LINE 186 "src/ehc/Base/Common.chs" #-}
 type VarPPMp = Map.Map UID PP_Doc
 
-{-# LINE 192 "src/ehc/Base/Common.chs" #-}
+{-# LINE 194 "src/ehc/Base/Common.chs" #-}
 ppAppTop :: PP arg => (HsName,arg) -> [arg] -> PP_Doc -> PP_Doc
 ppAppTop (conNm,con) argL dflt
   =  if       (  hsnIsArrow conNm
@@ -207,12 +209,12 @@
      else if  hsnIsRow   conNm  then  ppListSep (hsnORow >|< con) hsnCRow "," argL
                                 else  dflt
 
-{-# LINE 213 "src/ehc/Base/Common.chs" #-}
+{-# LINE 215 "src/ehc/Base/Common.chs" #-}
 ppAppTop' :: PP arg => (HsName,arg) -> [arg] -> [Bool] -> PP_Doc -> PP_Doc
 ppAppTop' cc@(conNm,_) [_,a] [True,_] _ | hsnIsArrow conNm || hsnIsPrArrow conNm    = pp a
 ppAppTop' cc argL _ dflt                                                            = ppAppTop cc argL dflt
 
-{-# LINE 219 "src/ehc/Base/Common.chs" #-}
+{-# LINE 221 "src/ehc/Base/Common.chs" #-}
 ppCon :: HsName -> PP_Doc
 ppCon nm =  if    hsnIsProd nm
             then  ppParens (text (replicate (hsnProdArity nm - 1) ','))
@@ -221,17 +223,17 @@
 ppCmt :: PP_Doc -> PP_Doc
 ppCmt p = "{-" >#< p >#< "-}"
 
-{-# LINE 229 "src/ehc/Base/Common.chs" #-}
+{-# LINE 231 "src/ehc/Base/Common.chs" #-}
 ppSemi :: PP x => x -> PP_Doc
 ppSemi = (>|< ";")
 
-{-# LINE 234 "src/ehc/Base/Common.chs" #-}
+{-# LINE 236 "src/ehc/Base/Common.chs" #-}
 
 ppSpaced :: PP a => [a] -> PP_Doc
 ppSpaced = ppListSep "" "" " "
 
 
-{-# LINE 241 "src/ehc/Base/Common.chs" #-}
+{-# LINE 243 "src/ehc/Base/Common.chs" #-}
 ppFld :: String -> Maybe HsName -> HsName -> PP_Doc -> PP_Doc -> PP_Doc
 ppFld sep positionalNm nm nmPP f
   = case positionalNm of
@@ -244,7 +246,7 @@
 mkPPAppFun :: HsName -> PP_Doc -> PP_Doc
 mkPPAppFun = mkPPAppFun' "|"
 
-{-# LINE 255 "src/ehc/Base/Common.chs" #-}
+{-# LINE 257 "src/ehc/Base/Common.chs" #-}
 mkExtAppPP' :: String -> (HsName,PP_Doc,[PP_Doc]) -> (HsName,PP_Doc,[PP_Doc],PP_Doc) -> (PP_Doc,[PP_Doc])
 mkExtAppPP' sep (funNm,funNmPP,funPPL) (argNm,argNmPP,argPPL,argPP)
   =  if hsnIsRec funNm || hsnIsSum funNm
@@ -254,19 +256,19 @@
 mkExtAppPP :: (HsName,PP_Doc,[PP_Doc]) -> (HsName,PP_Doc,[PP_Doc],PP_Doc) -> (PP_Doc,[PP_Doc])
 mkExtAppPP = mkExtAppPP' "|"
 
-{-# LINE 271 "src/ehc/Base/Common.chs" #-}
+{-# LINE 273 "src/ehc/Base/Common.chs" #-}
 ppPair :: (PP a, PP b) => (a,b) -> PP_Doc
 ppPair (x,y) = ppParens (pp x >|< "," >|< pp y)
 
-{-# LINE 281 "src/ehc/Base/Common.chs" #-}
+{-# LINE 283 "src/ehc/Base/Common.chs" #-}
 ppFM :: (PP k,PP v) => Map.Map k v -> PP_Doc
 ppFM = ppAssocL . Map.toList
 
-{-# LINE 286 "src/ehc/Base/Common.chs" #-}
+{-# LINE 288 "src/ehc/Base/Common.chs" #-}
 ppListV :: PP a => [a] -> PP_Doc
 ppListV = vlist . map pp
 
-{-# LINE 295 "src/ehc/Base/Common.chs" #-}
+{-# LINE 297 "src/ehc/Base/Common.chs" #-}
 putCompileMsg :: Verbosity -> Verbosity -> String -> Maybe String -> HsName -> FPath -> IO ()
 putCompileMsg v optsVerbosity msg mbMsg2 modNm fNm
   = if optsVerbosity >= v
@@ -275,7 +277,7 @@
             }
     else return ()
 
-{-# LINE 305 "src/ehc/Base/Common.chs" #-}
+{-# LINE 307 "src/ehc/Base/Common.chs" #-}
 writePP ::  (a -> PP_Doc) -> a -> FPath -> IO ()
 writePP f text fp = writeToFile (show.f $ text) fp
 
@@ -290,7 +292,7 @@
 writeToFile = writeToFile' False
 
 
-{-# LINE 330 "src/ehc/Base/Common.chs" #-}
+{-# LINE 332 "src/ehc/Base/Common.chs" #-}
 data ParNeed =  ParNotNeeded | ParNeededLow | ParNeeded | ParNeededHigh | ParOverrideNeeded
                 deriving (Eq,Ord)
 
@@ -307,13 +309,13 @@
               | otherwise           =  (ParNeeded,repeat ParNeededHigh)
      in   pr
 
-{-# LINE 352 "src/ehc/Base/Common.chs" #-}
+{-# LINE 354 "src/ehc/Base/Common.chs" #-}
 ppParNeed :: PP p => ParNeed -> ParNeed -> p -> PP_Doc
 ppParNeed locNeed globNeed p
   = par (pp p)
   where par = if globNeed > locNeed then ppParens else id
 
-{-# LINE 363 "src/ehc/Base/Common.chs" #-}
+{-# LINE 365 "src/ehc/Base/Common.chs" #-}
 -- | Expressions in a CBound position optionally may be labelled
 data CLbl
   = CLbl_None
@@ -330,36 +332,36 @@
 clbl _ f _ (CLbl_Nm  n) = f n
 clbl _ _ f (CLbl_Tag t) = f t
 
-{-# LINE 381 "src/ehc/Base/Common.chs" #-}
+{-# LINE 383 "src/ehc/Base/Common.chs" #-}
 instance PP CLbl where
   pp = clbl empty pp pp
 
-{-# LINE 390 "src/ehc/Base/Common.chs" #-}
+{-# LINE 392 "src/ehc/Base/Common.chs" #-}
 data Unbox
   = Unbox_FirstField
   | Unbox_Tag         !Int
   | Unbox_None
 
-{-# LINE 401 "src/ehc/Base/Common.chs" #-}
+{-# LINE 403 "src/ehc/Base/Common.chs" #-}
 unions :: Eq a => [[a]] -> [a]
 unions = foldr union []
 
-{-# LINE 406 "src/ehc/Base/Common.chs" #-}
+{-# LINE 408 "src/ehc/Base/Common.chs" #-}
 listCombineUniq :: Eq a => [[a]] -> [a]
 listCombineUniq = nub . concat
 
-{-# LINE 411 "src/ehc/Base/Common.chs" #-}
+{-# LINE 413 "src/ehc/Base/Common.chs" #-}
 replicateBy :: [a] -> b -> [b]
 replicateBy l e = replicate (length l) e
 
-{-# LINE 420 "src/ehc/Base/Common.chs" #-}
+{-# LINE 422 "src/ehc/Base/Common.chs" #-}
 strPadLeft :: Char -> Int -> String -> String
 strPadLeft c n s = replicate (n - length s) c ++ s
 
 strBlankPad :: Int -> String -> String
 strBlankPad n s = s ++ replicate (n - length s) ' '
 
-{-# LINE 440 "src/ehc/Base/Common.chs" #-}
+{-# LINE 442 "src/ehc/Base/Common.chs" #-}
 data Verbosity
   = VerboseQuiet		-- nothing at all
   | VerboseMinimal
@@ -368,12 +370,12 @@
   | VerboseDebug
   deriving (Eq,Ord,Enum)
 
-{-# LINE 454 "src/ehc/Base/Common.chs" #-}
+{-# LINE 456 "src/ehc/Base/Common.chs" #-}
 data CHRScoped
   = CHRScopedInstOnly | CHRScopedMutualSuper | CHRScopedAll
   deriving (Eq,Ord)
 
-{-# LINE 464 "src/ehc/Base/Common.chs" #-}
+{-# LINE 466 "src/ehc/Base/Common.chs" #-}
 data CompilePoint
   = CompilePoint_Imports
   | CompilePoint_Parse
@@ -383,7 +385,7 @@
   | CompilePoint_All
   deriving (Eq,Ord,Show)
 
-{-# LINE 481 "src/ehc/Base/Common.chs" #-}
+{-# LINE 483 "src/ehc/Base/Common.chs" #-}
 data Fixity
   = Fixity_Infix | Fixity_Infixr | Fixity_Infixl
   deriving (Eq,Ord,Show,Enum)
@@ -393,15 +395,15 @@
   pp Fixity_Infixl = pp "infixl"
   pp Fixity_Infixr = pp "infixr"
 
-{-# LINE 492 "src/ehc/Base/Common.chs" #-}
+{-# LINE 494 "src/ehc/Base/Common.chs" #-}
 fixityMaxPrio :: Int
 fixityMaxPrio = 9
 
-{-# LINE 497 "src/ehc/Base/Common.chs" #-}
+{-# LINE 499 "src/ehc/Base/Common.chs" #-}
 fixityAppPrio :: Int
 fixityAppPrio = fixityMaxPrio + 1
 
-{-# LINE 506 "src/ehc/Base/Common.chs" #-}
+{-# LINE 508 "src/ehc/Base/Common.chs" #-}
 data InstVariant
   = InstNormal | InstDefault
   | InstDeriving InstDerivingFrom
@@ -410,7 +412,7 @@
 instance PP InstVariant where
   pp = pp . show
 
-{-# LINE 518 "src/ehc/Base/Common.chs" #-}
+{-# LINE 520 "src/ehc/Base/Common.chs" #-}
 -- | Either a deriving combined from a datatype directly or a standalone
 data InstDerivingFrom
   = InstDerivingFrom_Datatype
@@ -420,7 +422,7 @@
 instance PP InstDerivingFrom where
   pp = pp . show
 
-{-# LINE 533 "src/ehc/Base/Common.chs" #-}
+{-# LINE 535 "src/ehc/Base/Common.chs" #-}
 type NmLev = Int
 
 nmLevAbsent, nmLevBuiltin, nmLevOutside, nmLevModule :: NmLev
@@ -430,7 +432,7 @@
 nmLevModule  =  0
 
 
-{-# LINE 554 "src/ehc/Base/Common.chs" #-}
+{-# LINE 556 "src/ehc/Base/Common.chs" #-}
 -- Assumption: tokTpIsInt (genTokTp t) == True
 tokMkInt :: Token -> Int
 tokMkInt t
@@ -442,28 +444,28 @@
 tokMkStr :: Token -> String
 tokMkStr = tokenVal
 
-{-# LINE 572 "src/ehc/Base/Common.chs" #-}
+{-# LINE 574 "src/ehc/Base/Common.chs" #-}
 tokMkQName :: Token -> HsName
 tokMkQName t
   = case genTokTp t of
       Just tp | tokTpIsInt tp -> mkHNmPos $ tokMkInt t
       _                       -> mkHNm $ map hsnFromString $ tokenVals t
 
-{-# LINE 582 "src/ehc/Base/Common.chs" #-}
+{-# LINE 584 "src/ehc/Base/Common.chs" #-}
 tokMkQNames :: [Token] -> [HsName]
 tokMkQNames = map tokMkQName
 
 instance HSNM Token where
   mkHNm = tokMkQName
 
-{-# LINE 594 "src/ehc/Base/Common.chs" #-}
+{-# LINE 596 "src/ehc/Base/Common.chs" #-}
 hsnLclSupplyWith :: HsName -> [HsName]
 hsnLclSupplyWith n = map (\i -> hsnSuffix n $ "_" ++ show i) [1..]
 
 hsnLclSupply :: [HsName]
 hsnLclSupply = hsnLclSupplyWith (hsnFromString "")
 
-{-# LINE 606 "src/ehc/Base/Common.chs" #-}
+{-# LINE 608 "src/ehc/Base/Common.chs" #-}
 splitByRadix :: (Integral b) => Int -> Int -> b -> (Int,[Int])
 splitByRadix len radix num
   = ( fromIntegral $ signum num
@@ -479,19 +481,19 @@
                  (abs num)
         difflen = len - length repr
 
-{-# LINE 623 "src/ehc/Base/Common.chs" #-}
+{-# LINE 625 "src/ehc/Base/Common.chs" #-}
 strHex :: (Show a, Integral a) => Int -> a -> String
 strHex prec x
   = replicate (prec - length h) '0' ++ h
   where h = showHex x []
 
-{-# LINE 634 "src/ehc/Base/Common.chs" #-}
+{-# LINE 636 "src/ehc/Base/Common.chs" #-}
 data Backend
   = BackendGrinByteCode
   | BackendSilly
   deriving (Eq, Ord)
 
-{-# LINE 645 "src/ehc/Base/Common.chs" #-}
+{-# LINE 647 "src/ehc/Base/Common.chs" #-}
 data VarUIDHsName
   = VarUIDHs_Name       { vunmId :: !UID, vunmNm' :: !HsName }
   | VarUIDHs_UID        { vunmId :: !UID }
@@ -503,12 +505,12 @@
 vunmNm (VarUIDHs_UID  i  ) = mkHNm i
 vunmNm _                   = panic "Common.assnmNm"
 
-{-# LINE 658 "src/ehc/Base/Common.chs" #-}
+{-# LINE 660 "src/ehc/Base/Common.chs" #-}
 vunmMbVar :: VarUIDHsName -> Maybe UID
 vunmMbVar (VarUIDHs_Var v) = Just v
 vunmMbVar _                = Nothing
 
-{-# LINE 664 "src/ehc/Base/Common.chs" #-}
+{-# LINE 666 "src/ehc/Base/Common.chs" #-}
 instance Show VarUIDHsName where
   show (VarUIDHs_Name _ n) = show n
   show (VarUIDHs_UID  i  ) = show i
@@ -517,7 +519,7 @@
 instance PP VarUIDHsName where
   pp a = pp $ show a
 
-{-# LINE 678 "src/ehc/Base/Common.chs" #-}
+{-# LINE 680 "src/ehc/Base/Common.chs" #-}
 withLkupLiftCyc2 :: (t -> Maybe UID) -> (t -> UIDS) -> (UID -> Maybe t) -> x -> (UIDS -> t -> x) -> (t -> x) -> UIDS -> UID -> x
 withLkupLiftCyc2 get noVisit lookup dflt yes no vsVisited v
   = case lookup v of
@@ -525,7 +527,7 @@
         -> yes (Set.insert v $ Set.union (noVisit t) vsVisited) t
       _ -> dflt
 
-{-# LINE 687 "src/ehc/Base/Common.chs" #-}
+{-# LINE 689 "src/ehc/Base/Common.chs" #-}
 withLkupLiftCyc1 :: (t -> Maybe UID) -> (t -> UIDS) -> (UID -> Maybe t) -> (UIDS -> t -> x) -> (t -> x) -> UIDS -> t -> x
 withLkupLiftCyc1 get noVisit lookup yes no vsVisited t
   = maybe dflt (withLkupLiftCyc2 get noVisit lookup dflt yes no vsVisited) $ get t
@@ -539,7 +541,7 @@
 withLkupLift get
   = withLkupChkVisitLift get (const Set.empty)
 
-{-# LINE 702 "src/ehc/Base/Common.chs" #-}
+{-# LINE 704 "src/ehc/Base/Common.chs" #-}
 lookupLiftCyc1 :: (x -> Maybe UID) -> (UID -> Maybe x) -> x' -> (x->x') -> x -> x'
 lookupLiftCyc1 get lookup dflt found x
   = lk Set.empty dflt found x
@@ -549,17 +551,17 @@
 lookupLiftCyc2 get lookup dflt found x
   = maybe dflt (\x -> lookupLiftCyc1 get lookup (found x) found x) $ lookup x
 
-{-# LINE 713 "src/ehc/Base/Common.chs" #-}
+{-# LINE 715 "src/ehc/Base/Common.chs" #-}
 lookupLiftCycMb1 :: (x -> Maybe UID) -> (UID -> Maybe x) -> x -> Maybe x
 lookupLiftCycMb1 get lookup x = lookupLiftCyc1 get lookup Nothing Just x
 
 lookupLiftCycMb2 :: (x -> Maybe UID) -> (UID -> Maybe x) -> UID -> Maybe x
 lookupLiftCycMb2 get lookup x = lookupLiftCyc2 get lookup Nothing Just x
 
-{-# LINE 725 "src/ehc/Base/Common.chs" #-}
+{-# LINE 727 "src/ehc/Base/Common.chs" #-}
 data Presence = Present | Absent deriving (Eq,Ord,Show)
 
-{-# LINE 757 "src/ehc/Base/Common.chs" #-}
+{-# LINE 759 "src/ehc/Base/Common.chs" #-}
 data AlwaysEq a = AlwaysEq { unAlwaysEq :: a }
 
 instance Eq (AlwaysEq a) where
@@ -578,60 +580,63 @@
   hashWithSalt salt _ = hashWithSalt salt (12345 :: Int) -- arbitarry, but constant
 
 
-{-# LINE 781 "src/ehc/Base/Common.chs" #-}
+{-# LINE 783 "src/ehc/Base/Common.chs" #-}
 type PkgName = String
 
 emptyPkgName = ""
 
-{-# LINE 791 "src/ehc/Base/Common.chs" #-}
+{-# LINE 793 "src/ehc/Base/Common.chs" #-}
 -- | How to do linking/packaging
 data LinkingStyle
   = LinkingStyle_None			-- ^ no linking (e.g. indicated by --compile-only flag)
   | LinkingStyle_Exec			-- ^ executable linking
   | LinkingStyle_Pkg			-- ^ package linking
-  deriving (Eq,Ord,Enum,Bounded)
+  deriving (Eq, Ord, Show, Enum, Bounded, Generic)
 
+instance Hashable LinkingStyle
 
-{-# LINE 831 "src/ehc/Base/Common.chs" #-}
+
+
+{-# LINE 836 "src/ehc/Base/Common.chs" #-}
 metaLevTy, metaLevKi, metaLevSo :: MetaLev
 metaLevTy  = metaLevVal + 1
 metaLevKi  = metaLevTy  + 1
 metaLevSo  = metaLevKi  + 1
 
-{-# LINE 842 "src/ehc/Base/Common.chs" #-}
+{-# LINE 847 "src/ehc/Base/Common.chs" #-}
 -- | Use as variable id
 type VarId    = UID
 type VarIdS   = Set.Set UID
 
-{-# LINE 852 "src/ehc/Base/Common.chs" #-}
+{-# LINE 857 "src/ehc/Base/Common.chs" #-}
 uidHNm :: UID -> HsName
 uidHNm = mkHNm -- hsnFromString . show
 
-{-# LINE 857 "src/ehc/Base/Common.chs" #-}
+{-# LINE 862 "src/ehc/Base/Common.chs" #-}
 uidQualHNm :: HsName -> UID -> HsName
 uidQualHNm modnm uid =
                         hsnPrefixQual modnm $
                         uidHNm uid
 
 
-{-# LINE 875 "src/ehc/Base/Common.chs" #-}
+{-# LINE 880 "src/ehc/Base/Common.chs" #-}
 data SrcConst
   = SrcConst_Int    Integer
   | SrcConst_Char   Char
   | SrcConst_Ratio  Integer Integer
   deriving (Eq,Show,Ord)
 
-{-# LINE 887 "src/ehc/Base/Common.chs" #-}
+{-# LINE 892 "src/ehc/Base/Common.chs" #-}
 fmap2Tuple :: Functor f => snd -> f x -> f (x,snd)
 fmap2Tuple snd = fmap (\x -> (x,snd))
 
-{-# LINE 896 "src/ehc/Base/Common.chs" #-}
+{-# LINE 901 "src/ehc/Base/Common.chs" #-}
 -- | Shorthand for if
 if' :: Bool -> a -> a -> a
 if' c t e = if c then t else e
 {-# INLINE if' #-}
 
-{-# LINE 907 "src/ehc/Base/Common.chs" #-}
+{-# LINE 912 "src/ehc/Base/Common.chs" #-}
 -- | Variation of `when` where Boolean condition is computed in a monad
 whenM :: Monad m => m Bool -> m () -> m ()
 whenM c m = do
@@ -659,7 +664,7 @@
 {-# INLINE ifM' #-}
 
 
-{-# LINE 936 "src/ehc/Base/Common.chs" #-}
+{-# LINE 941 "src/ehc/Base/Common.chs" #-}
 -- | Variation of `maybe` where the maybe is computed in a monad. See also `maybeM'`
 maybeM :: Monad m => m (Maybe a) -> m b -> (a -> m b) -> m b
 maybeM mmaybe mnothing mjust = mmaybe >>= maybe mnothing mjust
@@ -700,7 +705,7 @@
 unlessJustM :: Monad m => m (Maybe a) -> m () -> m ()
 unlessJustM mmaybe = maybeM' mmaybe (\_ -> return ())
 
-{-# LINE 982 "src/ehc/Base/Common.chs" #-}
+{-# LINE 987 "src/ehc/Base/Common.chs" #-}
 genNmMap :: Ord x => (String->s) -> [x] -> Map.Map x s -> (Map.Map x s, [s])
 genNmMap mk xs m
   = (m',reverse ns)
@@ -715,7 +720,7 @@
         ch x | x < 26    = [chr $ ord 'a' + x]
              | otherwise = let (q,r) = x `quotRem` 26 in ch q ++ ch r
 
-{-# LINE 1002 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1007 "src/ehc/Base/Common.chs" #-}
 data MaybeOk a
   = JustOk  a
   | NotOk   String
@@ -737,7 +742,7 @@
 maybeOk _ j (JustOk x) = j x
 maybeOk n _ (NotOk  x) = n x
 
-{-# LINE 1029 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1034 "src/ehc/Base/Common.chs" #-}
 -- | Abstract graph visit, over arbitrary structures
 graphVisit
   :: (Ord node)
@@ -757,7 +762,7 @@
                                      unvisited3          = unionUnvisited (newUnvisited `Set.difference` visited') unvisited2
                                  in  v ((visited',unvisited3),thr')
 
-{-# LINE 1054 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1059 "src/ehc/Base/Common.chs" #-}
 data KnownPrim
   =
     -- platform Int
@@ -796,17 +801,17 @@
   | KnownPrim_Mul64
   deriving (Show,Eq,Enum,Bounded)
 
-{-# LINE 1100 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1105 "src/ehc/Base/Common.chs" #-}
 instance PP KnownPrim where
   pp = pp . show
 
-{-# LINE 1105 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1110 "src/ehc/Base/Common.chs" #-}
 allKnownPrimMp :: Map.Map String KnownPrim
 allKnownPrimMp
   = Map.fromList [ (drop prefixLen $ show t, t) | t <- [ minBound .. maxBound ] ]
   where prefixLen = length "KnownPrim_"
 
-{-# LINE 1120 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1125 "src/ehc/Base/Common.chs" #-}
 str2stMpWithOmitShow :: (Enum opt, Bounded opt, Eq opt) => (opt -> String) -> [opt] -> Map.Map String opt
 str2stMpWithOmitShow shw omits = Map.fromList [ (shw o, o) | o <- [minBound .. maxBound] \\ omits ]
 
@@ -822,10 +827,10 @@
 showStr2stMp :: Map.Map String opt -> String
 showStr2stMp = concat . intersperse " " . Map.keys
 
-{-# LINE 1141 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1146 "src/ehc/Base/Common.chs" #-}
 deriving instance Typeable KnownPrim
 
-{-# LINE 1145 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1150 "src/ehc/Base/Common.chs" #-}
 deriving instance Typeable VarUIDHsName
 
 deriving instance Typeable TagDataInfo
@@ -843,7 +848,7 @@
 deriving instance Typeable CLbl
 
 
-{-# LINE 1168 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1173 "src/ehc/Base/Common.chs" #-}
 instance Binary KnownPrim where
   put = putEnum8
   get = getEnum8
@@ -856,11 +861,11 @@
   sput (TagDataInfo a b) = sput a >> sput b
   sget = liftM2 TagDataInfo sget sget
 
-{-# LINE 1182 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1187 "src/ehc/Base/Common.chs" #-}
 instance Serialize VarUIDHsName
 instance Serialize CLbl
 
-{-# LINE 1209 "src/ehc/Base/Common.chs" #-}
+{-# LINE 1214 "src/ehc/Base/Common.chs" #-}
 instance Binary Fixity where
   put = putEnum8
   get = getEnum8
diff --git a/src/UHC/Light/Compiler/Base/Pragma.hs b/src/UHC/Light/Compiler/Base/Pragma.hs
--- a/src/UHC/Light/Compiler/Base/Pragma.hs
+++ b/src/UHC/Light/Compiler/Base/Pragma.hs
@@ -15,7 +15,7 @@
 import Control.Monad
 import UHC.Light.Compiler.Opts.CommandLine
 
-{-# LINE 30 "src/ehc/Base/Pragma.chs" #-}
+{-# LINE 33 "src/ehc/Base/Pragma.chs" #-}
 -- | Data type representing pragmas.
 --   The names of the constructors must begin with "Pragma_", the string used in the map allSimplePragmaMp.
 data Pragma
@@ -42,10 +42,15 @@
   | Pragma_ExcludeIfTarget
       { pragmaExcludeTargets   		:: [Target]
       }
+{-
+  | Pragma_CHR              			    -- CHR rules
+      { pragmaCHR   			    :: String
+      }
+-}
   deriving (Eq,Ord,Show,Typeable,Generic)
 
 
-{-# LINE 63 "src/ehc/Base/Pragma.chs" #-}
+{-# LINE 69 "src/ehc/Base/Pragma.chs" #-}
 -- | All pragmas not requiring further arguments, these are accepted as LANGUAGE pragma when included in this map.
 allSimplePragmaMp :: Map.Map String Pragma
 allSimplePragmaMp
@@ -77,17 +82,17 @@
 showAllSimplePragmas
   = showAllSimplePragmas' " "
 
-{-# LINE 100 "src/ehc/Base/Pragma.chs" #-}
+{-# LINE 106 "src/ehc/Base/Pragma.chs" #-}
 pragmaIsExcludeTarget :: Target -> Pragma -> Bool
 pragmaIsExcludeTarget t (Pragma_ExcludeIfTarget ts) = t `elem` ts
 pragmaIsExcludeTarget _ _                           = False
 
-{-# LINE 106 "src/ehc/Base/Pragma.chs" #-}
+{-# LINE 112 "src/ehc/Base/Pragma.chs" #-}
 pragmaInvolvesCmdLine :: Pragma -> Bool
 pragmaInvolvesCmdLine (Pragma_CPP         ) = True
 pragmaInvolvesCmdLine (Pragma_OptionsUHC _) = True
 pragmaInvolvesCmdLine _                     = False
 
-{-# LINE 117 "src/ehc/Base/Pragma.chs" #-}
+{-# LINE 123 "src/ehc/Base/Pragma.chs" #-}
 instance Serialize Pragma
 
diff --git a/src/UHC/Light/Compiler/CHR/Constraint.hs b/src/UHC/Light/Compiler/CHR/Constraint.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/CHR/Constraint.hs
+++ /dev/null
@@ -1,320 +0,0 @@
-{-# LANGUAGE CPP #-}
-
-module UHC.Light.Compiler.CHR.Constraint
-( Constraint, Constraint' (..)
-, cnstrReducablePart
-, CHRIntermediateUntilAssume
-, mkProve, mkAssume, mkReduction
-, gathPredLToProveCnstrMp, gathPredLToAssumeCnstrMp
-, predOccCnstrMpLiftScope
-, RedHowAnnotation (..)
-, ByScopeRedHow (..)
-, UnresolvedTrace' (..), UnresolvedTrace
-, cnstrMpFromList
-, ConstraintToInfoTraceMp
-, cnstrTraceMpSingleton, cnstrTraceMpElimTrace, cnstrTraceMpFromList
-, ConstraintToInfoMap
-, emptyCnstrMp
-, cnstrMpUnion, cnstrMpUnions
-, mkProveConstraint, mkAssumeConstraint, mkAssumeConstraint'
-, rhaMbId )
-where
-import UHC.Light.Compiler.Base.Common
-import UHC.Light.Compiler.Ty
-import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Key
-import UHC.Util.TreeTrie
-import UHC.Light.Compiler.Substitutable
-import UHC.Util.Pretty as PP
-import UHC.Util.Utils
-import qualified Data.Set as Set
-import qualified Data.Map as Map
-import UHC.Light.Compiler.VarMp
-import Control.Monad
-import UHC.Util.Binary
-import UHC.Util.Serialize
-import UHC.Light.Compiler.Opts.Base
-
-
-
-
-{-# LINE 38 "src/ehc/CHR/Constraint.chs" #-}
-type instance CHRMatchableKey VarMp = Key
-
-{-# LINE 46 "src/ehc/CHR/Constraint.chs" #-}
--- | A Constraint is abstracted over the exact predicate, but differentiates on the role: to prove, can be assumed, and side effect of reduction
-data Constraint' p info
-  = Prove           { cnstrPred :: !p }             -- proof obligation
-  | Assume          { cnstrPred :: !p }             -- assumed constraint
-  | Reduction                                       -- 'side effect', residual info used by (e.g.) codegeneration
-                    { cnstrPred :: !p               -- the pred to which reduction was done
-                    , cnstrInfo :: !info            -- additional reduction specific info w.r.t. codegeneration
-                    , cnstrFromPreds :: ![p]        -- the preds from which reduction was done
-                    , cnstrVarMp :: VarMp           -- additional bindings for type (etc.) variables, i.e. improving substitution
-                    }
-  deriving (Eq, Ord, Show, Generic)
-
-type Constraint = Constraint' CHRPredOcc RedHowAnnotation
-
-type instance TTKey (Constraint' p info) = TTKey p
-
-{-# LINE 66 "src/ehc/CHR/Constraint.chs" #-}
-#if __GLASGOW_HASKELL__ >= 708
-deriving instance Typeable  Constraint'
-#else
-deriving instance Typeable2 Constraint'
-#endif
-
-{-# LINE 74 "src/ehc/CHR/Constraint.chs" #-}
--- | Dissection of Constraint, including reconstruction function
-cnstrReducablePart :: Constraint' p info -> Maybe (String,p,p->Constraint' p info)
-cnstrReducablePart (Prove  p) = Just ("Prf",p,Prove)
-cnstrReducablePart (Assume p) = Just ("Ass",p,Assume)
-cnstrReducablePart _          = Nothing
-
-{-# LINE 82 "src/ehc/CHR/Constraint.chs" #-}
-instance (CHRMatchable env p s, TTKey p ~ Key) => CHRMatchable env (Constraint' p info) s where
-  chrMatchTo env s c1 c2
-    = do { (_,p1,_) <- cnstrReducablePart c1
-         ; (_,p2,_) <- cnstrReducablePart c2
-         ; chrMatchTo env s p1 p2
-         }
-
-{-# LINE 91 "src/ehc/CHR/Constraint.chs" #-}
-instance (TTKeyable p, TTKey p ~ Key) => TTKeyable (Constraint' p info) where
-  -- type TTKey (Constraint' p info) = Key
-  toTTKey' o c -- = maybe [] (\(s,p,_) -> ttkAdd (TT1K_One $ Key_Str s) [toTTKey' o p]) $ cnstrReducablePart c
-    = case cnstrReducablePart c of
-        Just (s,p,_) -> ttkAdd' (TT1K_One $ Key_Str s) cs
-                     where (_,cs) = toTTKeyParentChildren' o p
-        _            -> panic "TTKeyable (Constraint' p info).toTTKey'" -- ttkEmpty
-
-{-# LINE 101 "src/ehc/CHR/Constraint.chs" #-}
-type instance ExtrValVarKey (Constraint' p info) = ExtrValVarKey p
-
-instance (VarExtractable p) => VarExtractable (Constraint' p info) where
-  varFreeSet c
-    = case cnstrReducablePart c of
-        Just (_,p,_) -> varFreeSet p
-        _            -> Set.empty
-
-instance (VarUpdatable p s,VarUpdatable info s) => VarUpdatable (Constraint' p info) s where
-  varUpd s      (Prove     p       ) = Prove      (varUpd s p)
-  varUpd s      (Assume    p       ) = Assume     (varUpd s p)
-  varUpd s      r@(Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=ps})
-                                     = r {cnstrPred=varUpd s p, cnstrInfo=varUpd s i, cnstrFromPreds=map (varUpd s) ps}
-
-{-# LINE 121 "src/ehc/CHR/Constraint.chs" #-}
--- | intermediate structure for holding constraint and related info until it can safely be assumed
-type CHRIntermediateUntilAssume = (CHRPredOcc,(PredScope,ConstraintToInfoTraceMp))
-
-{-# LINE 126 "src/ehc/CHR/Constraint.chs" #-}
-mkProve :: CHRPredOcc -> Constraint
-mkProve = Prove
-
-mkAssume :: CHRPredOcc -> Constraint
-mkAssume = Assume
-
-mkReduction :: CHRPredOcc -> RedHowAnnotation -> [CHRPredOcc] -> Constraint
-mkReduction p i ps
-  = Reduction p i ps
-              varlookupEmpty
-
-{-# LINE 159 "src/ehc/CHR/Constraint.chs" #-}
-mkProveConstraint :: Range -> Pred -> UID -> PredScope -> (Constraint,RedHowAnnotation)
-mkProveConstraint r pr i sc =  (mkProve (mkCHRPredOccRng r pr sc),RedHow_ProveObl i sc)
-
-mkAssumeConstraint'' :: Range -> Pred -> VarUIDHsName -> PredScope -> (Constraint,RedHowAnnotation)
-mkAssumeConstraint'' r pr vun sc =  (mkAssume (mkCHRPredOccRng r pr sc),RedHow_Assumption vun sc)
-
-mkAssumeConstraint' :: Range -> Pred -> UID -> HsName -> PredScope -> (Constraint,RedHowAnnotation)
-mkAssumeConstraint' r pr i n sc =  mkAssumeConstraint'' r pr (VarUIDHs_Name i n) sc
-
-mkAssumeConstraint :: Range -> Pred -> UID -> PredScope -> (Constraint,RedHowAnnotation)
-mkAssumeConstraint r pr i sc =  mkAssumeConstraint'' r pr (VarUIDHs_UID i) sc
-
-{-# LINE 177 "src/ehc/CHR/Constraint.chs" #-}
-gathPredLToProveCnstrMp :: [PredOcc] -> ConstraintToInfoMap
-gathPredLToProveCnstrMp l = cnstrMpFromList [ rngLift (poRange po) mkProveConstraint (poPr po) (poId po) (poScope po) | po <- l ]
-
-gathPredLToAssumeCnstrMp :: [PredOcc] -> ConstraintToInfoMap
-gathPredLToAssumeCnstrMp l = cnstrMpFromList [ rngLift (poRange po) mkAssumeConstraint (poPr po) (poId po) (poScope po) | po <- l ]
-
-{-# LINE 185 "src/ehc/CHR/Constraint.chs" #-}
--- | Lift predicate occurrences to new scope, used to lift unproven predicates to an outer scope.
-predOccCnstrMpLiftScope :: PredScope -> ConstraintToInfoMap -> ConstraintToInfoMap
-predOccCnstrMpLiftScope sc
-  = Map.mapKeysWith (++) c . Map.map (map i)
-  where c (Prove o@(CHRPredOcc {cpoCxt=cx}))
-            = mkProve (o {cpoCxt = cx {cpocxScope = sc}})
-        c x = x
-        i (RedHow_ProveObl id _)
-            = RedHow_ProveObl id sc
-        i x = x
-
-{-# LINE 202 "src/ehc/CHR/Constraint.chs" #-}
-data RedHowAnnotation
-  =  RedHow_ByInstance    !HsName  !Pred  !PredScope		-- inst name, for pred, in scope
-  |  RedHow_BySuperClass  !HsName  !Int   !CTag						-- field name, offset, tag info of dict
-  |  RedHow_ProveObl      !UID  !PredScope
-  |  RedHow_Assumption    !VarUIDHsName  !PredScope
-  |  RedHow_ByScope		  !ByScopeRedHow							-- variant, for distinguishing during debugging
-  |  RedHow_ByLabel       !Label !LabelOffset !PredScope
-  |  RedHow_Lambda        !UID !PredScope
-  deriving
-    ( Eq, Ord
-    , Typeable
-    , Generic
-    )
-
-{-# LINE 233 "src/ehc/CHR/Constraint.chs" #-}
-rhaMbId :: RedHowAnnotation -> Maybe UID
-rhaMbId (RedHow_ProveObl i _) = Just i
-rhaMbId _                     = Nothing
-
-{-# LINE 239 "src/ehc/CHR/Constraint.chs" #-}
-instance Show RedHowAnnotation where
-  show = showPP . pp
-
-{-# LINE 244 "src/ehc/CHR/Constraint.chs" #-}
-instance PP RedHowAnnotation where
-  pp (RedHow_ByInstance   s p sc)       =    "inst"   >#< {- ppParens (vm >#< "`varUpd`") >#< -} ppParensCommas [pp p, pp s, pp sc]
-  pp (RedHow_BySuperClass s _ _ )       =    "super"  >#< s
-  pp (RedHow_ProveObl     i   sc)       =    "prove"  >#< i >#< sc
-  pp (RedHow_Assumption   vun sc)       =    "assume" >#< ppParensCommas [pp vun, pp sc]
-  pp (RedHow_ByScope      v     )       =    "scope"  >|< ppParens v
-  pp (RedHow_ByLabel      l o sc)       =    "label"  >#< l >|< "@" >|< o >|< sc
-  pp (RedHow_Lambda       i   sc)       =    "lambda" >#< i >#< sc
-
-{-# LINE 272 "src/ehc/CHR/Constraint.chs" #-}
-data ByScopeRedHow
-  = ByScopeRedHow_Prove							-- scope reduction based on Prove
-  | ByScopeRedHow_Assume						-- scope reduction based on Assume
-  | ByScopeRedHow_Other (AlwaysEq String)		-- other reason
-  deriving
-    ( Eq, Ord
-    , Typeable, Generic
-    )
-
--- equality plays no role ??
-{-
-instance Eq ByScopeRedHow where
-  _ == _ = True
-
-instance Ord ByScopeRedHow where
-  _ `compare` _ = EQ
--}
-
-instance Show ByScopeRedHow where
-  show ByScopeRedHow_Prove     = "prv"
-  show ByScopeRedHow_Assume    = "ass"
-  show (ByScopeRedHow_Other s) = show s
-
-instance PP ByScopeRedHow where
-  pp = pp . show
-
-{-# LINE 306 "src/ehc/CHR/Constraint.chs" #-}
--- | The trace of an unresolved predicate
-data UnresolvedTrace' p info
-  = UnresolvedTrace_None									-- no trace required when all is resolved
-  | UnresolvedTrace_Red										-- ok reduction, with failure deeper down
-      { utraceRedFrom		:: p
-      , utraceInfoTo2From	:: info
-      , utraceRedTo			:: [UnresolvedTrace' p info]
-      }
-  | UnresolvedTrace_Fail									-- failed reduction
-      { utraceRedFrom		:: p
-      -- , utraceInfoTo2From	:: info
-      , utraceRedTo			:: [UnresolvedTrace' p info]
-      }
-  | UnresolvedTrace_Overlap									-- choice could not be made
-      { utraceRedFrom		:: p
-      , utraceRedChoices	:: [(info,[UnresolvedTrace' p info])]
-      }
-  deriving Show
-
-type UnresolvedTrace = UnresolvedTrace' CHRPredOcc RedHowAnnotation
-
-instance Eq p => Eq (UnresolvedTrace' p info) where
-  t1 == t2 = True -- utraceRedFrom t1 == utraceRedFrom t2
-
-instance (PP p, PP info) => PP (UnresolvedTrace' p info) where
-  pp x = case x of
-  		   UnresolvedTrace_None 			-> PP.empty
-  		   UnresolvedTrace_Red 		p i us 	-> p >|< ":" >#< i >-< indent 2 (vlist $ map pp us)
-  		   UnresolvedTrace_Fail 	p   us  -> p >|< ": FAIL" >-< indent 2 (vlist $ map pp us)
-  		   UnresolvedTrace_Overlap 	p uss 	-> p >|< ": OVERLAP" >-< indent 2 (vlist $ map (\(i,u) -> i >-< indent 2 (vlist $ map pp u)) uss)
-
-{-# LINE 343 "src/ehc/CHR/Constraint.chs" #-}
--- | Map from constraint to something
-type ConstraintMp'' p info x = Map.Map (Constraint' p info) [x]
-type ConstraintMp'         x = ConstraintMp'' CHRPredOcc RedHowAnnotation x
-
-{-# LINE 349 "src/ehc/CHR/Constraint.chs" #-}
-cnstrMpSingletonL :: Constraint -> [x] -> ConstraintMp' x
-cnstrMpSingletonL c xs = Map.singleton c xs
-
-cnstrMpSingleton :: Constraint -> x -> ConstraintMp' x
-cnstrMpSingleton c x = cnstrMpSingletonL c [x]
-
-cnstrMpFromList :: [(Constraint,x)] -> ConstraintMp' x
-cnstrMpFromList l = Map.fromListWith (++) [ (c,[x]) | (c,x) <- l ]
-
-cnstrMpMap :: (x -> y) -> ConstraintMp' x -> ConstraintMp' y
-cnstrMpMap f = Map.map (map f)
-
-{-# LINE 363 "src/ehc/CHR/Constraint.chs" #-}
--- type ConstraintToInfoTraceMp' p info = ConstraintMp'' p info (info,[UnresolvedTrace' p info])
-
--- | Map from constraint to info + trace
-type ConstraintToInfoTraceMp = ConstraintMp' (RedHowAnnotation,[UnresolvedTrace])
-
-{-# LINE 370 "src/ehc/CHR/Constraint.chs" #-}
-cnstrTraceMpFromList :: [(Constraint,(RedHowAnnotation,[UnresolvedTrace]))] -> ConstraintToInfoTraceMp
-cnstrTraceMpFromList = cnstrMpFromList
-
-cnstrTraceMpSingleton :: Constraint -> RedHowAnnotation -> [UnresolvedTrace] -> ConstraintToInfoTraceMp
-cnstrTraceMpSingleton c i ts = cnstrMpSingleton c (i,ts)
-
-cnstrTraceMpElimTrace :: ConstraintToInfoTraceMp -> ConstraintToInfoMap
-cnstrTraceMpElimTrace = cnstrMpMap fst
-
-cnstrTraceMpLiftTrace :: ConstraintToInfoMap -> ConstraintToInfoTraceMp
-cnstrTraceMpLiftTrace = cnstrMpMap (\x -> (x,[]))
-
-{-# LINE 384 "src/ehc/CHR/Constraint.chs" #-}
--- type ConstraintToInfoMap'     p info = ConstraintMp'' p info info
-
--- | Map from constraint to info
-type ConstraintToInfoMap = ConstraintMp' RedHowAnnotation
-
-{-# LINE 391 "src/ehc/CHR/Constraint.chs" #-}
-emptyCnstrMp :: ConstraintMp' x
-emptyCnstrMp = Map.empty
-
-{-# LINE 396 "src/ehc/CHR/Constraint.chs" #-}
-cnstrMpUnion :: ConstraintMp' x -> ConstraintMp' x -> ConstraintMp' x
-cnstrMpUnion = Map.unionWith (++)
-
-cnstrMpUnions :: [ConstraintMp' x] -> ConstraintMp' x
-cnstrMpUnions = Map.unionsWith (++)
-
-{-# LINE 408 "src/ehc/CHR/Constraint.chs" #-}
-instance IsConstraint (Constraint' p info) where
-  cnstrRequiresSolve (Reduction {}) = False
-  cnstrRequiresSolve _              = True
-
-{-# LINE 418 "src/ehc/CHR/Constraint.chs" #-}
-instance (PP p, PP info) => PP (Constraint' p info) where
-  pp (Prove     p     ) = "Prove"  >#< p
-  pp (Assume    p     ) = "Assume" >#< p
-  pp (Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=ps})
-                        = "Red"    >#< p >#< "<" >#< i >#< "<" >#< ppBracketsCommas ps
-
-{-# LINE 430 "src/ehc/CHR/Constraint.chs" #-}
-instance (Serialize p, Serialize i) => Serialize (Constraint' p i)
-
-{-# LINE 446 "src/ehc/CHR/Constraint.chs" #-}
-instance Serialize ByScopeRedHow
-instance Serialize RedHowAnnotation
-
diff --git a/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Constraint.hs b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Constraint.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Constraint.hs
@@ -0,0 +1,328 @@
+{-# LANGUAGE CPP #-}
+
+module UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+( Constraint, Constraint' (..)
+, cnstrReducablePart
+, CHRIntermediateUntilAssume
+, mkProve, mkAssume, mkReduction
+, gathPredLToProveCnstrMp, gathPredLToAssumeCnstrMp
+, predOccCnstrMpLiftScope
+, RedHowAnnotation (..)
+, ByScopeRedHow (..)
+, UnresolvedTrace' (..), UnresolvedTrace
+, cnstrMpFromList
+, ConstraintToInfoTraceMp
+, cnstrTraceMpSingleton, cnstrTraceMpElimTrace, cnstrTraceMpFromList
+, ConstraintToInfoMap
+, emptyCnstrMp
+, cnstrMpUnion, cnstrMpUnions
+, mkProveConstraint, mkAssumeConstraint, mkAssumeConstraint'
+, rhaMbId )
+where
+import UHC.Light.Compiler.Base.Common
+import UHC.Light.Compiler.Ty
+import UHC.Util.CHR
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+import UHC.Util.TreeTrie
+import UHC.Light.Compiler.Substitutable
+import UHC.Util.Pretty as PP
+import UHC.Util.Utils
+import qualified Data.Set as Set
+import qualified Data.Map as Map
+import UHC.Light.Compiler.VarMp
+import Control.Monad
+import UHC.Util.Binary
+import UHC.Util.Serialize
+import UHC.Light.Compiler.Opts.Base
+
+
+
+
+{-# LINE 38 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+type instance CHRMatchableKey VarMp = Key
+
+{-# LINE 46 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- | A Constraint is abstracted over the exact predicate, but differentiates on the role: to prove, can be assumed, and side effect of reduction
+data Constraint' p info
+  = Prove           { cnstrPred :: !p }             -- proof obligation
+  | Assume          { cnstrPred :: !p }             -- assumed constraint
+  | Reduction                                       -- 'side effect', residual info used by (e.g.) codegeneration
+                    { cnstrPred :: !p               -- the pred to which reduction was done
+                    , cnstrInfo :: !info            -- additional reduction specific info w.r.t. codegeneration
+                    , cnstrFromPreds :: ![p]        -- the preds from which reduction was done
+                    , cnstrVarMp :: VarMp           -- additional bindings for type (etc.) variables, i.e. improving substitution
+                    }
+  deriving (Eq, Ord, Show, Generic)
+
+type Constraint = Constraint' CHRPredOcc RedHowAnnotation
+
+type instance TTKey (Constraint' p info) = TTKey p
+type instance TrTrKey (Constraint' p info) = TTKey p
+
+{-# LINE 67 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+#if __GLASGOW_HASKELL__ >= 708
+deriving instance Typeable  Constraint'
+#else
+deriving instance Typeable2 Constraint'
+#endif
+
+{-# LINE 75 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- | Dissection of Constraint, including reconstruction function
+cnstrReducablePart :: Constraint' p info -> Maybe (String,p,p->Constraint' p info)
+cnstrReducablePart (Prove  p) = Just ("Prf",p,Prove)
+cnstrReducablePart (Assume p) = Just ("Ass",p,Assume)
+cnstrReducablePart _          = Nothing
+
+{-# LINE 83 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance (CHRMatchable env p s, TTKey p ~ Key) => CHRMatchable env (Constraint' p info) s where
+  chrMatchTo env s c1 c2
+    = do { (_,p1,_) <- cnstrReducablePart c1
+         ; (_,p2,_) <- cnstrReducablePart c2
+         ; chrMatchTo env s p1 p2
+         }
+  -- chrBuiltinSolve e s x = Nothing
+
+{-
+-- not yet supported
+instance (CHREmptySubstitution s, VarLookupCmb s s) => CHRBuiltinSolvable env (Constraint' p info) s where
+  chrBuiltinSolve e s x = Nothing
+-}
+
+{-# LINE 99 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance (TTKeyable p, TTKey p ~ Key) => TTKeyable (Constraint' p info) where
+  -- type TTKey (Constraint' p info) = Key
+  toTTKey' o c -- = maybe [] (\(s,p,_) -> ttkAdd (TT1K_One $ Key_Str s) [toTTKey' o p]) $ cnstrReducablePart c
+    = case cnstrReducablePart c of
+        Just (s,p,_) -> ttkAdd' (TT1K_One $ Key_Str s) cs
+                     where (_,cs) = toTTKeyParentChildren' o p
+        _            -> panic "TTKeyable (Constraint' p info).toTTKey'" -- ttkEmpty
+
+{-# LINE 109 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+type instance ExtrValVarKey (Constraint' p info) = ExtrValVarKey p
+
+instance (VarExtractable p) => VarExtractable (Constraint' p info) where
+  varFreeSet c
+    = case cnstrReducablePart c of
+        Just (_,p,_) -> varFreeSet p
+        _            -> Set.empty
+
+instance (VarUpdatable p s,VarUpdatable info s) => VarUpdatable (Constraint' p info) s where
+  varUpd s      (Prove     p       ) = Prove      (varUpd s p)
+  varUpd s      (Assume    p       ) = Assume     (varUpd s p)
+  varUpd s      r@(Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=ps})
+                                     = r {cnstrPred=varUpd s p, cnstrInfo=varUpd s i, cnstrFromPreds=map (varUpd s) ps}
+
+{-# LINE 129 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- | intermediate structure for holding constraint and related info until it can safely be assumed
+type CHRIntermediateUntilAssume = (CHRPredOcc,(PredScope,ConstraintToInfoTraceMp))
+
+{-# LINE 134 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+mkProve :: CHRPredOcc -> Constraint
+mkProve = Prove
+
+mkAssume :: CHRPredOcc -> Constraint
+mkAssume = Assume
+
+mkReduction :: CHRPredOcc -> RedHowAnnotation -> [CHRPredOcc] -> Constraint
+mkReduction p i ps
+  = Reduction p i ps
+              varlookupEmpty
+
+{-# LINE 167 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+mkProveConstraint :: Range -> Pred -> UID -> PredScope -> (Constraint,RedHowAnnotation)
+mkProveConstraint r pr i sc =  (mkProve (mkCHRPredOccRng r pr sc),RedHow_ProveObl i sc)
+
+mkAssumeConstraint'' :: Range -> Pred -> VarUIDHsName -> PredScope -> (Constraint,RedHowAnnotation)
+mkAssumeConstraint'' r pr vun sc =  (mkAssume (mkCHRPredOccRng r pr sc),RedHow_Assumption vun sc)
+
+mkAssumeConstraint' :: Range -> Pred -> UID -> HsName -> PredScope -> (Constraint,RedHowAnnotation)
+mkAssumeConstraint' r pr i n sc =  mkAssumeConstraint'' r pr (VarUIDHs_Name i n) sc
+
+mkAssumeConstraint :: Range -> Pred -> UID -> PredScope -> (Constraint,RedHowAnnotation)
+mkAssumeConstraint r pr i sc =  mkAssumeConstraint'' r pr (VarUIDHs_UID i) sc
+
+{-# LINE 185 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+gathPredLToProveCnstrMp :: [PredOcc] -> ConstraintToInfoMap
+gathPredLToProveCnstrMp l = cnstrMpFromList [ rngLift (poRange po) mkProveConstraint (poPr po) (poId po) (poScope po) | po <- l ]
+
+gathPredLToAssumeCnstrMp :: [PredOcc] -> ConstraintToInfoMap
+gathPredLToAssumeCnstrMp l = cnstrMpFromList [ rngLift (poRange po) mkAssumeConstraint (poPr po) (poId po) (poScope po) | po <- l ]
+
+{-# LINE 193 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- | Lift predicate occurrences to new scope, used to lift unproven predicates to an outer scope.
+predOccCnstrMpLiftScope :: PredScope -> ConstraintToInfoMap -> ConstraintToInfoMap
+predOccCnstrMpLiftScope sc
+  = Map.mapKeysWith (++) c . Map.map (map i)
+  where c (Prove o@(CHRPredOcc {cpoCxt=cx}))
+            = mkProve (o {cpoCxt = cx {cpocxScope = sc}})
+        c x = x
+        i (RedHow_ProveObl id _)
+            = RedHow_ProveObl id sc
+        i x = x
+
+{-# LINE 210 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+data RedHowAnnotation
+  =  RedHow_ByInstance    !HsName  !Pred  !PredScope		-- inst name, for pred, in scope
+  |  RedHow_BySuperClass  !HsName  !Int   !CTag						-- field name, offset, tag info of dict
+  |  RedHow_ProveObl      !UID  !PredScope
+  |  RedHow_Assumption    !VarUIDHsName  !PredScope
+  |  RedHow_ByScope		  !ByScopeRedHow							-- variant, for distinguishing during debugging
+  |  RedHow_ByLabel       !Label !LabelOffset !PredScope
+  |  RedHow_Lambda        !UID !PredScope
+  deriving
+    ( Eq, Ord
+    , Typeable
+    , Generic
+    )
+
+{-# LINE 241 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+rhaMbId :: RedHowAnnotation -> Maybe UID
+rhaMbId (RedHow_ProveObl i _) = Just i
+rhaMbId _                     = Nothing
+
+{-# LINE 247 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance Show RedHowAnnotation where
+  show = showPP . pp
+
+{-# LINE 252 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance PP RedHowAnnotation where
+  pp (RedHow_ByInstance   s p sc)       =    "inst"   >#< {- ppParens (vm >#< "`varUpd`") >#< -} ppParensCommas [pp p, pp s, pp sc]
+  pp (RedHow_BySuperClass s _ _ )       =    "super"  >#< s
+  pp (RedHow_ProveObl     i   sc)       =    "prove"  >#< i >#< sc
+  pp (RedHow_Assumption   vun sc)       =    "assume" >#< ppParensCommas [pp vun, pp sc]
+  pp (RedHow_ByScope      v     )       =    "scope"  >|< ppParens v
+  pp (RedHow_ByLabel      l o sc)       =    "label"  >#< l >|< "@" >|< o >|< sc
+  pp (RedHow_Lambda       i   sc)       =    "lambda" >#< i >#< sc
+
+{-# LINE 280 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+data ByScopeRedHow
+  = ByScopeRedHow_Prove							-- scope reduction based on Prove
+  | ByScopeRedHow_Assume						-- scope reduction based on Assume
+  | ByScopeRedHow_Other (AlwaysEq String)		-- other reason
+  deriving
+    ( Eq, Ord
+    , Typeable, Generic
+    )
+
+-- equality plays no role ??
+{-
+instance Eq ByScopeRedHow where
+  _ == _ = True
+
+instance Ord ByScopeRedHow where
+  _ `compare` _ = EQ
+-}
+
+instance Show ByScopeRedHow where
+  show ByScopeRedHow_Prove     = "prv"
+  show ByScopeRedHow_Assume    = "ass"
+  show (ByScopeRedHow_Other s) = show s
+
+instance PP ByScopeRedHow where
+  pp = pp . show
+
+{-# LINE 314 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- | The trace of an unresolved predicate
+data UnresolvedTrace' p info
+  = UnresolvedTrace_None									-- no trace required when all is resolved
+  | UnresolvedTrace_Red										-- ok reduction, with failure deeper down
+      { utraceRedFrom		:: p
+      , utraceInfoTo2From	:: info
+      , utraceRedTo			:: [UnresolvedTrace' p info]
+      }
+  | UnresolvedTrace_Fail									-- failed reduction
+      { utraceRedFrom		:: p
+      -- , utraceInfoTo2From	:: info
+      , utraceRedTo			:: [UnresolvedTrace' p info]
+      }
+  | UnresolvedTrace_Overlap									-- choice could not be made
+      { utraceRedFrom		:: p
+      , utraceRedChoices	:: [(info,[UnresolvedTrace' p info])]
+      }
+  deriving Show
+
+type UnresolvedTrace = UnresolvedTrace' CHRPredOcc RedHowAnnotation
+
+instance Eq p => Eq (UnresolvedTrace' p info) where
+  t1 == t2 = True -- utraceRedFrom t1 == utraceRedFrom t2
+
+instance (PP p, PP info) => PP (UnresolvedTrace' p info) where
+  pp x = case x of
+  		   UnresolvedTrace_None 			-> PP.empty
+  		   UnresolvedTrace_Red 		p i us 	-> p >|< ":" >#< i >-< indent 2 (vlist $ map pp us)
+  		   UnresolvedTrace_Fail 	p   us  -> p >|< ": FAIL" >-< indent 2 (vlist $ map pp us)
+  		   UnresolvedTrace_Overlap 	p uss 	-> p >|< ": OVERLAP" >-< indent 2 (vlist $ map (\(i,u) -> i >-< indent 2 (vlist $ map pp u)) uss)
+
+{-# LINE 351 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- | Map from constraint to something
+type ConstraintMp'' p info x = Map.Map (Constraint' p info) [x]
+type ConstraintMp'         x = ConstraintMp'' CHRPredOcc RedHowAnnotation x
+
+{-# LINE 357 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+cnstrMpSingletonL :: Constraint -> [x] -> ConstraintMp' x
+cnstrMpSingletonL c xs = Map.singleton c xs
+
+cnstrMpSingleton :: Constraint -> x -> ConstraintMp' x
+cnstrMpSingleton c x = cnstrMpSingletonL c [x]
+
+cnstrMpFromList :: [(Constraint,x)] -> ConstraintMp' x
+cnstrMpFromList l = Map.fromListWith (++) [ (c,[x]) | (c,x) <- l ]
+
+cnstrMpMap :: (x -> y) -> ConstraintMp' x -> ConstraintMp' y
+cnstrMpMap f = Map.map (map f)
+
+{-# LINE 371 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- type ConstraintToInfoTraceMp' p info = ConstraintMp'' p info (info,[UnresolvedTrace' p info])
+
+-- | Map from constraint to info + trace
+type ConstraintToInfoTraceMp = ConstraintMp' (RedHowAnnotation,[UnresolvedTrace])
+
+{-# LINE 378 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+cnstrTraceMpFromList :: [(Constraint,(RedHowAnnotation,[UnresolvedTrace]))] -> ConstraintToInfoTraceMp
+cnstrTraceMpFromList = cnstrMpFromList
+
+cnstrTraceMpSingleton :: Constraint -> RedHowAnnotation -> [UnresolvedTrace] -> ConstraintToInfoTraceMp
+cnstrTraceMpSingleton c i ts = cnstrMpSingleton c (i,ts)
+
+cnstrTraceMpElimTrace :: ConstraintToInfoTraceMp -> ConstraintToInfoMap
+cnstrTraceMpElimTrace = cnstrMpMap fst
+
+cnstrTraceMpLiftTrace :: ConstraintToInfoMap -> ConstraintToInfoTraceMp
+cnstrTraceMpLiftTrace = cnstrMpMap (\x -> (x,[]))
+
+{-# LINE 392 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+-- type ConstraintToInfoMap'     p info = ConstraintMp'' p info info
+
+-- | Map from constraint to info
+type ConstraintToInfoMap = ConstraintMp' RedHowAnnotation
+
+{-# LINE 399 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+emptyCnstrMp :: ConstraintMp' x
+emptyCnstrMp = Map.empty
+
+{-# LINE 404 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+cnstrMpUnion :: ConstraintMp' x -> ConstraintMp' x -> ConstraintMp' x
+cnstrMpUnion = Map.unionWith (++)
+
+cnstrMpUnions :: [ConstraintMp' x] -> ConstraintMp' x
+cnstrMpUnions = Map.unionsWith (++)
+
+{-# LINE 416 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance IsConstraint (Constraint' p info) where
+  cnstrRequiresSolve (Reduction {}) = False
+  cnstrRequiresSolve _              = True
+
+{-# LINE 426 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance (PP p, PP info) => PP (Constraint' p info) where
+  pp (Prove     p     ) = "Prove"  >#< p
+  pp (Assume    p     ) = "Assume" >#< p
+  pp (Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=ps})
+                        = "Red"    >#< p >#< "<" >#< i >#< "<" >#< ppBracketsCommas ps
+
+{-# LINE 438 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance (Serialize p, Serialize i) => Serialize (Constraint' p i)
+
+{-# LINE 454 "src/ehc/CHR/CtxtRedOnly/Constraint.chs" #-}
+instance Serialize ByScopeRedHow
+instance Serialize RedHowAnnotation
+
diff --git a/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Guard.hs b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Guard.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Guard.hs
@@ -0,0 +1,43 @@
+module UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+( Guard (..) )
+where
+import UHC.Util.CHR
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+import UHC.Util.Pretty
+import UHC.Light.Compiler.Base.Common
+import UHC.Light.Compiler.Ty
+import Control.Monad
+import UHC.Util.Binary
+import UHC.Util.Serialize
+
+
+
+{-# LINE 39 "src/ehc/CHR/CtxtRedOnly/Guard.chs" #-}
+data Guard
+  = HasStrictCommonScope    PredScope PredScope PredScope                   -- have strict/proper common scope?
+  | IsVisibleInScope        PredScope PredScope                             -- is visible in 2nd scope?
+  | NotEqualScope           PredScope PredScope                             -- scopes are unequal
+  | EqualScope              PredScope PredScope                             -- scopes are equal
+  | IsStrictParentScope     PredScope PredScope PredScope                   -- parent scope of each other?
+  | NonEmptyRowLacksLabel   Ty LabelOffset Ty Label                         -- non empty row does not have label?, yielding its position + rest
+  deriving (Typeable, Generic)
+
+{-# LINE 60 "src/ehc/CHR/CtxtRedOnly/Guard.chs" #-}
+ppGuard :: Guard -> PP_Doc
+ppGuard (HasStrictCommonScope   sc1 sc2 sc3) = ppParensCommas' [sc1 >#< "<" >#< sc2,sc1 >#< "<=" >#< sc3]
+ppGuard (IsStrictParentScope    sc1 sc2 sc3) = ppParens (sc1 >#< "==" >#< sc2 >#< "/\\" >#< sc2 >#< "/=" >#< sc3)
+ppGuard (IsVisibleInScope       sc1 sc2    ) = sc1 >#< "`visibleIn`" >#< sc2
+ppGuard (NotEqualScope          sc1 sc2    ) = sc1 >#< "/=" >#< sc2
+ppGuard (EqualScope             sc1 sc2    ) = sc1 >#< "==" >#< sc2
+ppGuard (NonEmptyRowLacksLabel  r o t l    ) = ppParens (t >#< "==" >#< ppParens (r >#< "| ...")) >#< "\\" >#< l >|< "@" >|< o
+
+{-# LINE 79 "src/ehc/CHR/CtxtRedOnly/Guard.chs" #-}
+instance Show Guard where
+  show _ = "CHR Guard"
+
+instance PP Guard where
+  pp = ppGuard
+
+{-# LINE 91 "src/ehc/CHR/CtxtRedOnly/Guard.chs" #-}
+instance Serialize Guard
+
diff --git a/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Instances.hs b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Instances.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Instances.hs
@@ -0,0 +1,189 @@
+module UHC.Light.Compiler.CHR.CtxtRedOnly.Instances
+( module UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint, module UHC.Light.Compiler.CHR.CtxtRedOnly.Guard )
+where
+import UHC.Util.CHR
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import qualified Data.Map as Map
+import qualified Data.Set as Set
+import Data.Maybe
+import UHC.Util.Pretty
+import UHC.Util.AGraph
+import UHC.Light.Compiler.Base.Common
+import UHC.Light.Compiler.Base.TermLike
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.VarMp
+import UHC.Light.Compiler.Substitutable
+import UHC.Light.Compiler.Ty.FitsInCommon2
+import UHC.Light.Compiler.Ty.FitsIn
+import UHC.Light.Compiler.Ty.TreeTrieKey
+import UHC.Light.Compiler.Base.HsName.Builtin
+import Control.Monad
+import UHC.Util.Binary
+import UHC.Util.Serialize
+
+
+
+{-# LINE 42 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+type instance ExtrValVarKey ConstraintToInfoMap = TyVarId
+
+instance VarExtractable ConstraintToInfoMap where
+  varFreeSet        x = Set.unions [ varFreeSet k | k <- Map.keys x ]
+
+instance VarUpdatable ConstraintToInfoMap VarMp where
+  varUpd s x = Map.mapKeysWith (++) (varUpd s) x
+
+type instance ExtrValVarKey Guard = TyVarId
+
+instance VarExtractable Guard where
+  varFreeSet        (HasStrictCommonScope   p1 p2 p3) = Set.unions $ map varFreeSet [p1,p2,p3]
+  varFreeSet        (IsStrictParentScope    p1 p2 p3) = Set.unions $ map varFreeSet [p1,p2,p3]
+  varFreeSet        (IsVisibleInScope       p1 p2   ) = Set.unions $ map varFreeSet [p1,p2]
+  varFreeSet        (NotEqualScope          p1 p2   ) = Set.unions $ map varFreeSet [p1,p2]
+  varFreeSet        (EqualScope             p1 p2   ) = Set.unions $ map varFreeSet [p1,p2]
+  varFreeSet        (NonEmptyRowLacksLabel  r o t l ) = Set.unions [varFreeSet r,varFreeSet o,varFreeSet t,varFreeSet l]
+
+instance VarUpdatable Guard VarMp where
+  varUpd s (HasStrictCommonScope   p1 p2 p3) = HasStrictCommonScope   (s `varUpd` p1) (s `varUpd` p2) (s `varUpd` p3)
+  varUpd s (IsStrictParentScope    p1 p2 p3) = IsStrictParentScope    (s `varUpd` p1) (s `varUpd` p2) (s `varUpd` p3)
+  varUpd s (IsVisibleInScope       p1 p2   ) = IsVisibleInScope       (s `varUpd` p1) (s `varUpd` p2)
+  varUpd s (NotEqualScope          p1 p2   ) = NotEqualScope          (s `varUpd` p1) (s `varUpd` p2)
+  varUpd s (EqualScope             p1 p2   ) = EqualScope             (s `varUpd` p1) (s `varUpd` p2)
+  varUpd s (NonEmptyRowLacksLabel  r o t l ) = NonEmptyRowLacksLabel  (s `varUpd` r)  (s `varUpd` o)  (s `varUpd` t)  (s `varUpd` l)
+
+{-# LINE 85 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+type instance ExtrValVarKey VarUIDHsName = TyVarId
+
+instance VarExtractable VarUIDHsName where
+  varFreeSet          (VarUIDHs_Var i)  = Set.singleton i
+  varFreeSet          _                 = Set.empty
+
+-- instance VarUpdatable VarUIDHsName VarMp where
+instance (VarLookup m, VarLookupKey m ~ ImplsVarId, VarLookupVal m ~ VarMpInfo) => VarUpdatable VarUIDHsName m where
+  varUpd s a                   = maybe a id $ varmpAssNmLookupAssNmCyc a s
+
+{-# LINE 97 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+type instance ExtrValVarKey RedHowAnnotation = TyVarId
+
+instance VarExtractable RedHowAnnotation where
+  varFreeSet        (RedHow_Assumption   vun sc)  = Set.unions [varFreeSet vun,varFreeSet sc]
+  varFreeSet        (RedHow_ByLabel      l o sc)  = Set.unions [varFreeSet l,varFreeSet o,varFreeSet sc]
+  varFreeSet        _                             = Set.empty
+
+instance VarUpdatable RedHowAnnotation VarMp where
+  varUpd s (RedHow_Assumption   vun sc)  = RedHow_Assumption (varUpd s vun) (varUpd s sc)
+  varUpd s (RedHow_ByLabel      l o sc)  = RedHow_ByLabel (varUpd s l) (varUpd s o) (varUpd s sc)
+  varUpd _ x                             = x
+
+{-# LINE 122 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHREmptySubstitution VarMp where
+  chrEmptySubst = emptyVarMp
+
+
+{-# LINE 132 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHRMatchable FIIn Pred VarMp where
+  chrMatchTo fi subst pr1 pr2
+    = do { (_,subst') <- fitPredIntoPred (fi {fiVarMp = subst |+> fiVarMp fi}) pr1 pr2
+         ; return subst'
+         }
+
+{-# LINE 140 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHRMatchable FIIn CHRPredOccCxt VarMp where
+  chrMatchTo e subst (CHRPredOccCxt_Scope1 sc1) (CHRPredOccCxt_Scope1 sc2) = chrMatchTo e subst sc1 sc2
+
+instance CHRMatchable FIIn PredScope VarMp where
+  chrMatchTo _ subst (PredScope_Var v1) sc2@(PredScope_Var v2) | v1 == v2    = Just emptyVarMp
+  chrMatchTo e subst (PredScope_Var v1) sc2                    | isJust mbSc = chrMatchTo e subst (fromJust mbSc) sc2
+                                                                             where mbSc = varmpScopeLookup v1 subst
+  chrMatchTo e subst sc1                    (PredScope_Var v2) | isJust mbSc = chrMatchTo e subst sc1 (fromJust mbSc)
+                                                                             where mbSc = varmpScopeLookup v2 subst
+  chrMatchTo _ subst _                      (PredScope_Var v2)               = Nothing
+  chrMatchTo _ subst (PredScope_Var v1) sc2                                  = Just $ v1 `varmpScopeUnit` sc2
+  chrMatchTo _ subst (PredScope_Lev l1)     (PredScope_Lev l2) | l1 == l2    = Just emptyVarMp
+  chrMatchTo _ subst _                  _                                    = Nothing
+
+{-# LINE 156 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHRMatchable FIIn CHRPredOcc VarMp where
+  chrMatchTo fi subst po1 po2
+    = do { subst1 <- chrMatchTo fi subst (cpoPr po1) (cpoPr po2)
+         ; subst2 <- chrMatchTo fi subst (cpoCxt po1) (cpoCxt po2)
+         ; return $ subst2 |+> subst1
+         }
+
+{-# LINE 165 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHRMatchable FIIn Label VarMp where
+  chrMatchTo _ subst (Label_Var v1) lb2@(Label_Var v2) | v1 == v2    = Just emptyVarMp
+  chrMatchTo e subst (Label_Var v1) lb2                | isJust mbLb = chrMatchTo e subst (fromJust mbLb) lb2
+                                                                     where mbLb = varmpLabelLookup v1 subst
+  chrMatchTo e subst lb1                (Label_Var v2) | isJust mbLb = chrMatchTo e subst lb1 (fromJust mbLb)
+                                                                     where mbLb = varmpLabelLookup v2 subst
+  chrMatchTo _ subst _                  (Label_Var v2)               = Nothing
+  chrMatchTo _ subst (Label_Var v1) lb2                              = Just $ v1 `varmpLabelUnit` lb2
+  chrMatchTo _ subst (Label_Lab l1)     (Label_Lab l2) | l1 == l2    = Just emptyVarMp
+  chrMatchTo _ subst _              _                                = Nothing
+
+{-# LINE 178 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHRMatchable FIIn LabelOffset VarMp where
+  chrMatchTo _ subst (LabelOffset_Var v1) of2@(LabelOffset_Var v2) | v1 == v2    = Just emptyVarMp
+  chrMatchTo s subst (LabelOffset_Var v1) of2                      | isJust mbOf = chrMatchTo s subst (fromJust mbOf) of2
+                                                                                 where mbOf = varmpOffsetLookup v1 subst
+  chrMatchTo s subst of1                      (LabelOffset_Var v2) | isJust mbOf = chrMatchTo s subst of1 (fromJust mbOf)
+                                                                                 where mbOf = varmpOffsetLookup v2 subst
+  chrMatchTo _ subst _                        (LabelOffset_Var v2)               = Nothing
+  chrMatchTo _ subst (LabelOffset_Var v1) of2                                    = Just $ v1 `varmpOffsetUnit` of2
+  chrMatchTo _ subst (LabelOffset_Off l1)     (LabelOffset_Off l2) | l1 == l2    = Just emptyVarMp
+  chrMatchTo _ subst _                    _                                      = Nothing
+
+{-# LINE 195 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance CHRCheckable FIIn Guard VarMp where
+  chrCheck env subst x
+    = chk x
+    where subst' = subst |+> fiVarMp env
+          chk (HasStrictCommonScope (PredScope_Var vDst) sc1 sc2)
+            = do { let sc1' = varUpd subst' sc1
+                       sc2' = varUpd subst' sc2
+                 ; scDst <- pscpCommon sc1' sc2'
+                 ; if scDst == sc1'
+                   then Nothing
+                   else return $ vDst `varmpScopeUnit` scDst
+                 }
+          chk (IsStrictParentScope (PredScope_Var vDst) sc1 sc2)
+            = do { let sc1' = varUpd subst' sc1
+                       sc2' = varUpd subst' sc2
+                 ; scDst <- pscpCommon sc1' sc2'
+                 ; if scDst == sc1' && sc1' /= sc2'
+                   then return $ vDst `varmpScopeUnit` scDst
+                   else Nothing
+                 }
+          chk (NotEqualScope sc1 sc2) | isJust c
+            = if fromJust c /= EQ then return emptyVarMp else Nothing
+            where c = pscpCmp (varUpd subst' sc1) (varUpd subst' sc2)
+          chk (EqualScope sc1 sc2) | isJust c
+            = if fromJust c == EQ then return emptyVarMp else Nothing
+            where c = pscpCmp (varUpd subst' sc1) (varUpd subst' sc2)
+          chk (IsVisibleInScope scDst@(PredScope_Var vDst) sc1) | isJust mbSc
+            = chk (IsVisibleInScope (fromJust mbSc) sc1)
+            where mbSc = varmpScopeLookupScopeCyc scDst subst'
+          chk (IsVisibleInScope (PredScope_Var vDst) sc1)
+            = return $ vDst `varmpScopeUnit` sc1
+          chk (IsVisibleInScope scDst sc1) | pscpIsVisibleIn (varUpd subst' scDst) (varUpd subst' sc1)
+            = return emptyVarMp
+          chk (NonEmptyRowLacksLabel r1@(Ty_Var tv _) (LabelOffset_Var vDst) ty lab)
+            |  fiAllowTyVarBind env r1
+            && not (null exts) && presence == Absent -- tyIsEmptyRow row
+            = return $ (vDst `varmpOffsetUnit` LabelOffset_Off offset)
+                       `varUpd` (tv `varmpTyUnit` row)
+            where (row,exts) = tyRowExtsWithLkup (varmpTyLookupCyc2 subst') ty
+                  ((offset,presence),_) = tyExtsOffset lab' $ rowCanonOrder exts
+                  (Label_Lab lab') = varUpd subst' lab
+          chk _
+            = Nothing
+
+{-# LINE 304 "src/ehc/CHR/CtxtRedOnly/Instances.chs" #-}
+instance IsCHRConstraint FIIn Constraint VarMp
+
+instance IsCHRGuard FIIn Guard VarMp
+
+-- instance IsCHRPrio FIIn Prio VarMp
+
diff --git a/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Key.hs b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Key.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Key.hs
@@ -0,0 +1,52 @@
+module UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+( Key (..) )
+where
+import UHC.Light.Compiler.Base.Common
+import UHC.Util.TreeTrie
+import UHC.Util.Pretty
+import UHC.Util.Utils
+import UHC.Util.CHR.Key
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.Ty.Pretty
+import UHC.Util.Serialize
+import Control.Monad
+
+
+
+
+{-# LINE 33 "src/ehc/CHR/CtxtRedOnly/Key.chs" #-}
+data Key
+  = Key_HNm     !HsName         -- type constant, its name
+  | Key_UID     !UID            -- type variable, its id, used with TKK_Partial
+  | Key_Str     !String         -- arbitrary string
+  | Key_TyQu    !TyQu           -- quantified type, used with TKK_Partial
+  | Key_Ty      !Ty             -- catchall for the rest, used with TKK_Partial
+  deriving ( Eq, Ord
+           , Typeable, Generic
+           )
+
+{-# LINE 57 "src/ehc/CHR/CtxtRedOnly/Key.chs" #-}
+instance Show Key where
+  show (Key_HNm  n) = "H:" ++ show n
+  show (Key_UID  n) = "U:" ++ show n
+  show (Key_Str  n) = "S:" ++ n
+  show (Key_TyQu n) = "Q:" ++ show n
+  show (Key_Ty   n) = "T:" ++ show n
+
+{-# LINE 71 "src/ehc/CHR/CtxtRedOnly/Key.chs" #-}
+instance PP Key where
+  pp (Key_HNm  n) = "H:" >|< n
+  pp (Key_UID  n) = "U:" >|< n
+  pp (Key_Str  n) = "S:" >|< n
+  pp (Key_TyQu n) = "Q:" >|< show n
+  pp (Key_Ty   n) = "T:" >|< n
+
+{-# LINE 138 "src/ehc/CHR/CtxtRedOnly/Key.chs" #-}
+-- type instance TrTrKey x = TTKey x
+
+instance (TrTrKey x ~ TTKey x, TTKeyable x) => TreeTrieKeyable x where
+  toTreeTrieKey = toTTKey
+
+{-# LINE 149 "src/ehc/CHR/CtxtRedOnly/Key.chs" #-}
+instance Serialize Key
+
diff --git a/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Solve.hs b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Solve.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/CHR/CtxtRedOnly/Solve.hs
@@ -0,0 +1,75 @@
+module UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+( module UHC.Util.CHR.Rule
+, module UHC.Util.CHR.Solve.TreeTrie.Mono, IsCHRSolvable (..), SolveState, SolveTrace, SolveStep, CHRStore', CHRSolverConstraint
+, CHRStore
+, PartialOrdering (..), toOrdering, toPartialOrdering
+, isLetProveCandidate, isLetProveFailure )
+where
+import qualified Data.Set as Set
+import UHC.Util.Utils
+import UHC.Util.CHR
+import UHC.Util.CHR.Rule
+import UHC.Util.Substitutable
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Instances
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+import UHC.Light.Compiler.VarMp
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.Ty.FitsInCommon2
+import UHC.Util.CHR.Solve.TreeTrie.Mono hiding (IsCHRSolvable (..),SolveState,SolveTrace,SolveStep,CHRStore)
+import qualified UHC.Util.CHR.Solve.TreeTrie.Mono as Mono
+
+{-# LINE 24 "src/ehc/CHR/CtxtRedOnly/Solve.chs" #-}
+instance Mono.IsCHRSolvable FIIn Constraint Guard VarMp
+
+type CHRSolverConstraint = Constraint
+
+-- | (Class alias) API for solving requirements, hiding Mono/Poly differences
+class ( Mono.IsCHRSolvable env c g s
+      ) => IsCHRSolvable env c g p s
+
+instance IsCHRSolvable FIIn Constraint Guard Prio VarMp
+
+type CHRStore'  e c g p s = Mono.CHRStore   c g
+type SolveState e c g p s = Mono.SolveState c g s
+type SolveTrace e c g p s = Mono.SolveTrace c g s
+type SolveStep  e c g p s = Mono.SolveStep  c g s
+
+{-# LINE 91 "src/ehc/CHR/CtxtRedOnly/Solve.chs" #-}
+-- dummy (for now)
+-- type Prio = ()
+-- type CHRPrio = Prio
+
+type CHRStore = CHRStore' FIIn Constraint Guard Prio VarMp
+
+{-# LINE 105 "src/ehc/CHR/CtxtRedOnly/Solve.chs" #-}
+data PartialOrdering
+  = P_LT | P_EQ | P_GT | P_NE
+  deriving (Eq,Show)
+
+toPartialOrdering :: Ordering -> PartialOrdering
+toPartialOrdering o
+  = case o of
+      EQ -> P_EQ
+      LT -> P_LT
+      GT -> P_GT
+
+toOrdering :: PartialOrdering -> Maybe Ordering
+toOrdering o
+  = case o of
+      P_EQ -> Just EQ
+      P_LT -> Just LT
+      P_GT -> Just GT
+      _    -> Nothing
+
+{-# LINE 130 "src/ehc/CHR/CtxtRedOnly/Solve.chs" #-}
+-- | Consider a pred for proving if: no free tvars, or its free tvars do not coincide with those globally used
+isLetProveCandidate :: (VarExtractable x) => Set.Set (ExtrValVarKey x) -> x -> Bool
+isLetProveCandidate glob x
+  = Set.null fv || Set.null (fv `Set.intersection` glob)
+  where fv = varFreeSet x
+
+isLetProveFailure :: (VarExtractable x) => Set.Set (ExtrValVarKey x) -> x -> Bool
+isLetProveFailure glob x
+  = Set.null fv
+  where fv = varFreeSet x
+
diff --git a/src/UHC/Light/Compiler/CHR/Guard.hs b/src/UHC/Light/Compiler/CHR/Guard.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/CHR/Guard.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-module UHC.Light.Compiler.CHR.Guard
-( Guard (..) )
-where
-import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Key
-import UHC.Util.Pretty
-import UHC.Light.Compiler.Base.Common
-import UHC.Light.Compiler.Ty
-import Control.Monad
-import UHC.Util.Binary
-import UHC.Util.Serialize
-
-
-
-{-# LINE 39 "src/ehc/CHR/Guard.chs" #-}
-data Guard
-  = HasStrictCommonScope    PredScope PredScope PredScope                   -- have strict/proper common scope?
-  | IsVisibleInScope        PredScope PredScope                             -- is visible in 2nd scope?
-  | NotEqualScope           PredScope PredScope                             -- scopes are unequal
-  | EqualScope              PredScope PredScope                             -- scopes are equal
-  | IsStrictParentScope     PredScope PredScope PredScope                   -- parent scope of each other?
-  | NonEmptyRowLacksLabel   Ty LabelOffset Ty Label                         -- non empty row does not have label?, yielding its position + rest
-  deriving (Typeable, Generic)
-
-{-# LINE 60 "src/ehc/CHR/Guard.chs" #-}
-ppGuard :: Guard -> PP_Doc
-ppGuard (HasStrictCommonScope   sc1 sc2 sc3) = ppParensCommas' [sc1 >#< "<" >#< sc2,sc1 >#< "<=" >#< sc3]
-ppGuard (IsStrictParentScope    sc1 sc2 sc3) = ppParens (sc1 >#< "==" >#< sc2 >#< "/\\" >#< sc2 >#< "/=" >#< sc3)
-ppGuard (IsVisibleInScope       sc1 sc2    ) = sc1 >#< "`visibleIn`" >#< sc2
-ppGuard (NotEqualScope          sc1 sc2    ) = sc1 >#< "/=" >#< sc2
-ppGuard (EqualScope             sc1 sc2    ) = sc1 >#< "==" >#< sc2
-ppGuard (NonEmptyRowLacksLabel  r o t l    ) = ppParens (t >#< "==" >#< ppParens (r >#< "| ...")) >#< "\\" >#< l >|< "@" >|< o
-
-{-# LINE 79 "src/ehc/CHR/Guard.chs" #-}
-instance Show Guard where
-  show _ = "CHR Guard"
-
-instance PP Guard where
-  pp = ppGuard
-
-{-# LINE 91 "src/ehc/CHR/Guard.chs" #-}
-instance Serialize Guard
-
diff --git a/src/UHC/Light/Compiler/CHR/Instances.hs b/src/UHC/Light/Compiler/CHR/Instances.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/CHR/Instances.hs
+++ /dev/null
@@ -1,189 +0,0 @@
-module UHC.Light.Compiler.CHR.Instances
-( module UHC.Light.Compiler.CHR.Constraint, module UHC.Light.Compiler.CHR.Guard )
-where
-import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Key
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import Data.Maybe
-import UHC.Util.Pretty
-import UHC.Util.AGraph
-import UHC.Light.Compiler.Base.Common
-import UHC.Light.Compiler.Base.TermLike
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.VarMp
-import UHC.Light.Compiler.Substitutable
-import UHC.Light.Compiler.Ty.FitsInCommon2
-import UHC.Light.Compiler.Ty.FitsIn
-import UHC.Light.Compiler.Ty.TreeTrieKey
-import UHC.Light.Compiler.Base.HsName.Builtin
-import Control.Monad
-import UHC.Util.Binary
-import UHC.Util.Serialize
-
-
-
-{-# LINE 42 "src/ehc/CHR/Instances.chs" #-}
-type instance ExtrValVarKey ConstraintToInfoMap = TyVarId
-
-instance VarExtractable ConstraintToInfoMap where
-  varFreeSet        x = Set.unions [ varFreeSet k | k <- Map.keys x ]
-
-instance VarUpdatable ConstraintToInfoMap VarMp where
-  varUpd s x = Map.mapKeysWith (++) (varUpd s) x
-
-type instance ExtrValVarKey Guard = TyVarId
-
-instance VarExtractable Guard where
-  varFreeSet        (HasStrictCommonScope   p1 p2 p3) = Set.unions $ map varFreeSet [p1,p2,p3]
-  varFreeSet        (IsStrictParentScope    p1 p2 p3) = Set.unions $ map varFreeSet [p1,p2,p3]
-  varFreeSet        (IsVisibleInScope       p1 p2   ) = Set.unions $ map varFreeSet [p1,p2]
-  varFreeSet        (NotEqualScope          p1 p2   ) = Set.unions $ map varFreeSet [p1,p2]
-  varFreeSet        (EqualScope             p1 p2   ) = Set.unions $ map varFreeSet [p1,p2]
-  varFreeSet        (NonEmptyRowLacksLabel  r o t l ) = Set.unions [varFreeSet r,varFreeSet o,varFreeSet t,varFreeSet l]
-
-instance VarUpdatable Guard VarMp where
-  varUpd s (HasStrictCommonScope   p1 p2 p3) = HasStrictCommonScope   (s `varUpd` p1) (s `varUpd` p2) (s `varUpd` p3)
-  varUpd s (IsStrictParentScope    p1 p2 p3) = IsStrictParentScope    (s `varUpd` p1) (s `varUpd` p2) (s `varUpd` p3)
-  varUpd s (IsVisibleInScope       p1 p2   ) = IsVisibleInScope       (s `varUpd` p1) (s `varUpd` p2)
-  varUpd s (NotEqualScope          p1 p2   ) = NotEqualScope          (s `varUpd` p1) (s `varUpd` p2)
-  varUpd s (EqualScope             p1 p2   ) = EqualScope             (s `varUpd` p1) (s `varUpd` p2)
-  varUpd s (NonEmptyRowLacksLabel  r o t l ) = NonEmptyRowLacksLabel  (s `varUpd` r)  (s `varUpd` o)  (s `varUpd` t)  (s `varUpd` l)
-
-{-# LINE 85 "src/ehc/CHR/Instances.chs" #-}
-type instance ExtrValVarKey VarUIDHsName = TyVarId
-
-instance VarExtractable VarUIDHsName where
-  varFreeSet          (VarUIDHs_Var i)  = Set.singleton i
-  varFreeSet          _                 = Set.empty
-
--- instance VarUpdatable VarUIDHsName VarMp where
-instance (VarLookup m (SubstVarKey m) (SubstVarVal m), SubstVarKey m ~ ImplsVarId, SubstVarVal m ~ VarMpInfo) => VarUpdatable VarUIDHsName m where
-  varUpd s a                   = maybe a id $ varmpAssNmLookupAssNmCyc a s
-
-{-# LINE 97 "src/ehc/CHR/Instances.chs" #-}
-type instance ExtrValVarKey RedHowAnnotation = TyVarId
-
-instance VarExtractable RedHowAnnotation where
-  varFreeSet        (RedHow_Assumption   vun sc)  = Set.unions [varFreeSet vun,varFreeSet sc]
-  varFreeSet        (RedHow_ByLabel      l o sc)  = Set.unions [varFreeSet l,varFreeSet o,varFreeSet sc]
-  varFreeSet        _                             = Set.empty
-
-instance VarUpdatable RedHowAnnotation VarMp where
-  varUpd s (RedHow_Assumption   vun sc)  = RedHow_Assumption (varUpd s vun) (varUpd s sc)
-  varUpd s (RedHow_ByLabel      l o sc)  = RedHow_ByLabel (varUpd s l) (varUpd s o) (varUpd s sc)
-  varUpd _ x                             = x
-
-{-# LINE 122 "src/ehc/CHR/Instances.chs" #-}
-instance CHREmptySubstitution VarMp where
-  chrEmptySubst = emptyVarMp
-
-
-{-# LINE 132 "src/ehc/CHR/Instances.chs" #-}
-instance CHRMatchable FIIn Pred VarMp where
-  chrMatchTo fi subst pr1 pr2
-    = do { (_,subst') <- fitPredIntoPred (fi {fiVarMp = subst |+> fiVarMp fi}) pr1 pr2
-         ; return subst'
-         }
-
-{-# LINE 140 "src/ehc/CHR/Instances.chs" #-}
-instance CHRMatchable FIIn CHRPredOccCxt VarMp where
-  chrMatchTo e subst (CHRPredOccCxt_Scope1 sc1) (CHRPredOccCxt_Scope1 sc2) = chrMatchTo e subst sc1 sc2
-
-instance CHRMatchable FIIn PredScope VarMp where
-  chrMatchTo _ subst (PredScope_Var v1) sc2@(PredScope_Var v2) | v1 == v2    = Just emptyVarMp
-  chrMatchTo e subst (PredScope_Var v1) sc2                    | isJust mbSc = chrMatchTo e subst (fromJust mbSc) sc2
-                                                                             where mbSc = varmpScopeLookup v1 subst
-  chrMatchTo e subst sc1                    (PredScope_Var v2) | isJust mbSc = chrMatchTo e subst sc1 (fromJust mbSc)
-                                                                             where mbSc = varmpScopeLookup v2 subst
-  chrMatchTo _ subst _                      (PredScope_Var v2)               = Nothing
-  chrMatchTo _ subst (PredScope_Var v1) sc2                                  = Just $ v1 `varmpScopeUnit` sc2
-  chrMatchTo _ subst (PredScope_Lev l1)     (PredScope_Lev l2) | l1 == l2    = Just emptyVarMp
-  chrMatchTo _ subst _                  _                                    = Nothing
-
-{-# LINE 156 "src/ehc/CHR/Instances.chs" #-}
-instance CHRMatchable FIIn CHRPredOcc VarMp where
-  chrMatchTo fi subst po1 po2
-    = do { subst1 <- chrMatchTo fi subst (cpoPr po1) (cpoPr po2)
-         ; subst2 <- chrMatchTo fi subst (cpoCxt po1) (cpoCxt po2)
-         ; return $ subst2 |+> subst1
-         }
-
-{-# LINE 165 "src/ehc/CHR/Instances.chs" #-}
-instance CHRMatchable FIIn Label VarMp where
-  chrMatchTo _ subst (Label_Var v1) lb2@(Label_Var v2) | v1 == v2    = Just emptyVarMp
-  chrMatchTo e subst (Label_Var v1) lb2                | isJust mbLb = chrMatchTo e subst (fromJust mbLb) lb2
-                                                                     where mbLb = varmpLabelLookup v1 subst
-  chrMatchTo e subst lb1                (Label_Var v2) | isJust mbLb = chrMatchTo e subst lb1 (fromJust mbLb)
-                                                                     where mbLb = varmpLabelLookup v2 subst
-  chrMatchTo _ subst _                  (Label_Var v2)               = Nothing
-  chrMatchTo _ subst (Label_Var v1) lb2                              = Just $ v1 `varmpLabelUnit` lb2
-  chrMatchTo _ subst (Label_Lab l1)     (Label_Lab l2) | l1 == l2    = Just emptyVarMp
-  chrMatchTo _ subst _              _                                = Nothing
-
-{-# LINE 178 "src/ehc/CHR/Instances.chs" #-}
-instance CHRMatchable FIIn LabelOffset VarMp where
-  chrMatchTo _ subst (LabelOffset_Var v1) of2@(LabelOffset_Var v2) | v1 == v2    = Just emptyVarMp
-  chrMatchTo s subst (LabelOffset_Var v1) of2                      | isJust mbOf = chrMatchTo s subst (fromJust mbOf) of2
-                                                                                 where mbOf = varmpOffsetLookup v1 subst
-  chrMatchTo s subst of1                      (LabelOffset_Var v2) | isJust mbOf = chrMatchTo s subst of1 (fromJust mbOf)
-                                                                                 where mbOf = varmpOffsetLookup v2 subst
-  chrMatchTo _ subst _                        (LabelOffset_Var v2)               = Nothing
-  chrMatchTo _ subst (LabelOffset_Var v1) of2                                    = Just $ v1 `varmpOffsetUnit` of2
-  chrMatchTo _ subst (LabelOffset_Off l1)     (LabelOffset_Off l2) | l1 == l2    = Just emptyVarMp
-  chrMatchTo _ subst _                    _                                      = Nothing
-
-{-# LINE 195 "src/ehc/CHR/Instances.chs" #-}
-instance CHRCheckable FIIn Guard VarMp where
-  chrCheck env subst x
-    = chk x
-    where subst' = subst |+> fiVarMp env
-          chk (HasStrictCommonScope (PredScope_Var vDst) sc1 sc2)
-            = do { let sc1' = varUpd subst' sc1
-                       sc2' = varUpd subst' sc2
-                 ; scDst <- pscpCommon sc1' sc2'
-                 ; if scDst == sc1'
-                   then Nothing
-                   else return $ vDst `varmpScopeUnit` scDst
-                 }
-          chk (IsStrictParentScope (PredScope_Var vDst) sc1 sc2)
-            = do { let sc1' = varUpd subst' sc1
-                       sc2' = varUpd subst' sc2
-                 ; scDst <- pscpCommon sc1' sc2'
-                 ; if scDst == sc1' && sc1' /= sc2'
-                   then return $ vDst `varmpScopeUnit` scDst
-                   else Nothing
-                 }
-          chk (NotEqualScope sc1 sc2) | isJust c
-            = if fromJust c /= EQ then return emptyVarMp else Nothing
-            where c = pscpCmp (varUpd subst' sc1) (varUpd subst' sc2)
-          chk (EqualScope sc1 sc2) | isJust c
-            = if fromJust c == EQ then return emptyVarMp else Nothing
-            where c = pscpCmp (varUpd subst' sc1) (varUpd subst' sc2)
-          chk (IsVisibleInScope scDst@(PredScope_Var vDst) sc1) | isJust mbSc
-            = chk (IsVisibleInScope (fromJust mbSc) sc1)
-            where mbSc = varmpScopeLookupScopeCyc scDst subst'
-          chk (IsVisibleInScope (PredScope_Var vDst) sc1)
-            = return $ vDst `varmpScopeUnit` sc1
-          chk (IsVisibleInScope scDst sc1) | pscpIsVisibleIn (varUpd subst' scDst) (varUpd subst' sc1)
-            = return emptyVarMp
-          chk (NonEmptyRowLacksLabel r1@(Ty_Var tv _) (LabelOffset_Var vDst) ty lab)
-            |  fiAllowTyVarBind env r1
-            && not (null exts) && presence == Absent -- tyIsEmptyRow row
-            = return $ (vDst `varmpOffsetUnit` LabelOffset_Off offset)
-                       `varUpd` (tv `varmpTyUnit` row)
-            where (row,exts) = tyRowExtsWithLkup (varmpTyLookupCyc2 subst') ty
-                  ((offset,presence),_) = tyExtsOffset lab' $ rowCanonOrder exts
-                  (Label_Lab lab') = varUpd subst' lab
-          chk _
-            = Nothing
-
-{-# LINE 304 "src/ehc/CHR/Instances.chs" #-}
-instance IsCHRConstraint FIIn Constraint VarMp
-
-instance IsCHRGuard FIIn Guard VarMp
-
--- instance IsCHRPrio FIIn Prio VarMp
-
diff --git a/src/UHC/Light/Compiler/CHR/Key.hs b/src/UHC/Light/Compiler/CHR/Key.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/CHR/Key.hs
+++ /dev/null
@@ -1,52 +0,0 @@
-module UHC.Light.Compiler.CHR.Key
-( Key (..) )
-where
-import UHC.Light.Compiler.Base.Common
-import UHC.Util.TreeTrie
-import UHC.Util.Pretty
-import UHC.Util.Utils
-import UHC.Util.CHR.Key
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.Ty.Pretty
-import UHC.Util.Serialize
-import Control.Monad
-
-
-
-
-{-# LINE 33 "src/ehc/CHR/Key.chs" #-}
-data Key
-  = Key_HNm     !HsName         -- type constant, its name
-  | Key_UID     !UID            -- type variable, its id, used with TKK_Partial
-  | Key_Str     !String         -- arbitrary string
-  | Key_TyQu    !TyQu           -- quantified type, used with TKK_Partial
-  | Key_Ty      !Ty             -- catchall for the rest, used with TKK_Partial
-  deriving ( Eq, Ord
-           , Typeable, Generic
-           )
-
-{-# LINE 57 "src/ehc/CHR/Key.chs" #-}
-instance Show Key where
-  show (Key_HNm  n) = "H:" ++ show n
-  show (Key_UID  n) = "U:" ++ show n
-  show (Key_Str  n) = "S:" ++ n
-  show (Key_TyQu n) = "Q:" ++ show n
-  show (Key_Ty   n) = "T:" ++ show n
-
-{-# LINE 71 "src/ehc/CHR/Key.chs" #-}
-instance PP Key where
-  pp (Key_HNm  n) = "H:" >|< n
-  pp (Key_UID  n) = "U:" >|< n
-  pp (Key_Str  n) = "S:" >|< n
-  pp (Key_TyQu n) = "Q:" >|< show n
-  pp (Key_Ty   n) = "T:" >|< n
-
-{-# LINE 138 "src/ehc/CHR/Key.chs" #-}
-type instance TrTrKey x = TTKey x
-
-instance TTKeyable x => TreeTrieKeyable x where
-  toTreeTrieKey = toTTKey
-
-{-# LINE 149 "src/ehc/CHR/Key.chs" #-}
-instance Serialize Key
-
diff --git a/src/UHC/Light/Compiler/CHR/Solve.hs b/src/UHC/Light/Compiler/CHR/Solve.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/CHR/Solve.hs
+++ /dev/null
@@ -1,75 +0,0 @@
-module UHC.Light.Compiler.CHR.Solve
-( module UHC.Util.CHR.Rule
-, module UHC.Util.CHR.Solve.TreeTrie.Mono, IsCHRSolvable (..), SolveState, SolveTrace, SolveStep, CHRStore', CHRSolverConstraint
-, CHRStore, Prio
-, PartialOrdering (..), toOrdering, toPartialOrdering
-, isLetProveCandidate, isLetProveFailure )
-where
-import qualified Data.Set as Set
-import UHC.Util.Utils
-import UHC.Util.CHR
-import UHC.Util.CHR.Rule
-import UHC.Util.Substitutable
-import UHC.Light.Compiler.CHR.Instances
-import UHC.Light.Compiler.CHR.Key
-import UHC.Light.Compiler.VarMp
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.Ty.FitsInCommon2
-import UHC.Util.CHR.Solve.TreeTrie.Mono hiding (IsCHRSolvable (..),SolveState,SolveTrace,SolveStep,CHRStore)
-import qualified UHC.Util.CHR.Solve.TreeTrie.Mono as Mono
-
-{-# LINE 24 "src/ehc/CHR/Solve.chs" #-}
-instance Mono.IsCHRSolvable FIIn Constraint Guard Prio VarMp
-
-type CHRSolverConstraint = Constraint
-
--- | (Class alias) API for solving requirements, hiding Mono/Poly differences
-class ( Mono.IsCHRSolvable env c g p s
-      ) => IsCHRSolvable env c g p s
-
-instance IsCHRSolvable FIIn Constraint Guard Prio VarMp
-
-type CHRStore'  e c g p s = Mono.CHRStore   c g p
-type SolveState e c g p s = Mono.SolveState c g p s
-type SolveTrace e c g p s = Mono.SolveTrace c g p s
-type SolveStep  e c g p s = Mono.SolveStep  c g p s
-
-{-# LINE 89 "src/ehc/CHR/Solve.chs" #-}
--- dummy (for now)
-type Prio = ()
--- type CHRPrio = Prio
-
-type CHRStore = CHRStore' FIIn Constraint Guard Prio VarMp
-
-{-# LINE 103 "src/ehc/CHR/Solve.chs" #-}
-data PartialOrdering
-  = P_LT | P_EQ | P_GT | P_NE
-  deriving (Eq,Show)
-
-toPartialOrdering :: Ordering -> PartialOrdering
-toPartialOrdering o
-  = case o of
-      EQ -> P_EQ
-      LT -> P_LT
-      GT -> P_GT
-
-toOrdering :: PartialOrdering -> Maybe Ordering
-toOrdering o
-  = case o of
-      P_EQ -> Just EQ
-      P_LT -> Just LT
-      P_GT -> Just GT
-      _    -> Nothing
-
-{-# LINE 128 "src/ehc/CHR/Solve.chs" #-}
--- | Consider a pred for proving if: no free tvars, or its free tvars do not coincide with those globally used
-isLetProveCandidate :: (VarExtractable x) => Set.Set (ExtrValVarKey x) -> x -> Bool
-isLetProveCandidate glob x
-  = Set.null fv || Set.null (fv `Set.intersection` glob)
-  where fv = varFreeSet x
-
-isLetProveFailure :: (VarExtractable x) => Set.Set (ExtrValVarKey x) -> x -> Bool
-isLetProveFailure glob x
-  = Set.null fv
-  where fv = varFreeSet x
-
diff --git a/src/UHC/Light/Compiler/Config.hs b/src/UHC/Light/Compiler/Config.hs
--- a/src/UHC/Light/Compiler/Config.hs
+++ b/src/UHC/Light/Compiler/Config.hs
@@ -66,12 +66,12 @@
       , verMajor            = "1"
       , verMinor            = "1"
       , verMinorMinor       = "9"
-      , verMinorMinorMinor  = "3"
+      , verMinorMinorMinor  = "4"
       , verQuality          = "alpha"
       , verShort            = "1.1"
       , verMedium           = "1.1.9"
-      , verFull             = "1.1.9.3"
-      , verAsNumber         = "1010903"
+      , verFull             = "1.1.9.4"
+      , verAsNumber         = "1010904"
       , verProg             = "ehc"
       }
 
diff --git a/src/UHC/Light/Compiler/ConfigInstall.hs b/src/UHC/Light/Compiler/ConfigInstall.hs
--- a/src/UHC/Light/Compiler/ConfigInstall.hs
+++ b/src/UHC/Light/Compiler/ConfigInstall.hs
@@ -11,9 +11,9 @@
 cppOpts  = fst $ parseCmdLineOpts Cmd_CPP "-Wno-invalid-pp-token"
 -- cppOpts  = showCmdLineOpts cppOpts'
 
-ehcSvnRevision = "master@b84bf358b7"
+ehcSvnRevision = "master@b6602cb03a"
 
-ehcDefaultInplaceInstallDir = "/Volumes/Work/Programming/uhc/EHC/install"
+ehcDefaultInplaceInstallDir = "/Users/atze/Programming/uhc/EHC/install"
 
 ehcPkgConfigfileName = "installed-pkg-config"
 
diff --git a/src/UHC/Light/Compiler/ConfigInternalVersions.hs b/src/UHC/Light/Compiler/ConfigInternalVersions.hs
--- a/src/UHC/Light/Compiler/ConfigInternalVersions.hs
+++ b/src/UHC/Light/Compiler/ConfigInternalVersions.hs
@@ -1,7 +1,7 @@
 module UHC.Light.Compiler.ConfigInternalVersions
 ( InternalVersionCombined
 , internalVersionCombined
-, internalVersionTySys, internalVersionCodeGen, internalVersionHI, internalVersionCore, internalVersionCoreRun )
+, internalVersionTySys, internalVersionCodeGen, internalVersionHI, internalVersionCore, internalVersionCoreRun, internalVersionHS )
 where
 import Data.Word
 import Data.Bits
@@ -23,8 +23,9 @@
   .|. (internalVersionTySys 	`shiftL` 18)
   .|. (internalVersionCodeGen 	`shiftL` 24)
   .|. (internalVersionEH 	    `shiftL` 30)
+  .|. (internalVersionHS 	    `shiftL` 36)
 
-{-# LINE 36 "src/ehc/ConfigInternalVersions.chs" #-}
+{-# LINE 37 "src/ehc/ConfigInternalVersions.chs" #-}
 -- | For variation in type inferencing
 internalVersionTySys = mkInternalVersion 1
 
@@ -42,5 +43,8 @@
 
 -- | For binary/serialized EH intermediate structures
 internalVersionEH = mkInternalVersion 2
+
+-- | For HS frontend differences
+internalVersionHS = mkInternalVersion 1
 
 
diff --git a/src/UHC/Light/Compiler/Core.hs b/src/UHC/Light/Compiler/Core.hs
--- a/src/UHC/Light/Compiler/Core.hs
+++ b/src/UHC/Light/Compiler/Core.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core.ag)
 module UHC.Light.Compiler.Core(module UHC.Light.Compiler.AbstractCore
 , module UHC.Light.Compiler.Base.Target
 , CodeAGItf (..), CModule (..), CExpr (..), CBind (..), CBound (..), CBindL, CBoundL, CPatRest (..), CAlt (..), CAltL, CPat (..), CPatFld (..), CPatFldL
diff --git a/src/UHC/Light/Compiler/Core/BindExtract.hs b/src/UHC/Light/Compiler/Core/BindExtract.hs
--- a/src/UHC/Light/Compiler/Core/BindExtract.hs
+++ b/src/UHC/Light/Compiler/Core/BindExtract.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/BindExtra)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/BindExtra)
 module UHC.Light.Compiler.Core.BindExtract(BoundSel (..), noBoundSel, emptyBoundSel
 , boundSelVal, boundSelExpr, boundSelMetaLev0, boundSelMetaLev01
 , SelVal
diff --git a/src/UHC/Light/Compiler/Core/Check.hs b/src/UHC/Light/Compiler/Core/Check.hs
--- a/src/UHC/Light/Compiler/Core/Check.hs
+++ b/src/UHC/Light/Compiler/Core/Check.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Check.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Check.ag)
 module UHC.Light.Compiler.Core.Check(NotYetTransformed (..), NotYetTransformedS
 , cmodCheck', Inh_CodeAGItf (..), Syn_CodeAGItf (..)) where
 
diff --git a/src/UHC/Light/Compiler/Core/ExtractFFE.hs b/src/UHC/Light/Compiler/Core/ExtractFFE.hs
--- a/src/UHC/Light/Compiler/Core/ExtractFFE.hs
+++ b/src/UHC/Light/Compiler/Core/ExtractFFE.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/ExtractFF)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/ExtractFF)
 module UHC.Light.Compiler.Core.ExtractFFE(cmodExtractFFE
 , ExtractFFE (..)) where
 
diff --git a/src/UHC/Light/Compiler/Core/FvS.hs b/src/UHC/Light/Compiler/Core/FvS.hs
--- a/src/UHC/Light/Compiler/Core/FvS.hs
+++ b/src/UHC/Light/Compiler/Core/FvS.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/FvS.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/FvS.ag)
 module UHC.Light.Compiler.Core.FvS(cexprFvS) where
 
 import qualified Data.Set as Set
diff --git a/src/UHC/Light/Compiler/Core/ModAsMap.hs b/src/UHC/Light/Compiler/Core/ModAsMap.hs
--- a/src/UHC/Light/Compiler/Core/ModAsMap.hs
+++ b/src/UHC/Light/Compiler/Core/ModAsMap.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/ModAsMap.)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/ModAsMap.)
 module UHC.Light.Compiler.Core.ModAsMap(cexprModAsDatabase) where
 
 import qualified Data.Set as Set
diff --git a/src/UHC/Light/Compiler/Core/Pretty.hs b/src/UHC/Light/Compiler/Core/Pretty.hs
--- a/src/UHC/Light/Compiler/Core/Pretty.hs
+++ b/src/UHC/Light/Compiler/Core/Pretty.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Pretty.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Pretty.ag)
 module UHC.Light.Compiler.Core.Pretty(ppCModule
 , ppCBindL) where
 
diff --git a/src/UHC/Light/Compiler/Core/PrettyTrace.hs b/src/UHC/Light/Compiler/Core/PrettyTrace.hs
--- a/src/UHC/Light/Compiler/Core/PrettyTrace.hs
+++ b/src/UHC/Light/Compiler/Core/PrettyTrace.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/PrettyTra)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/PrettyTra)
 module UHC.Light.Compiler.Core.PrettyTrace(ppASTCModule) where
 
 import UHC.Util.Pretty
diff --git a/src/UHC/Light/Compiler/Core/Subst.hs b/src/UHC/Light/Compiler/Core/Subst.hs
--- a/src/UHC/Light/Compiler/Core/Subst.hs
+++ b/src/UHC/Light/Compiler/Core/Subst.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Subst.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Subst.ag)
 module UHC.Light.Compiler.Core.Subst(CSubst
 , cSubstAppExpr, cSubstAppBind, cSubstAppBound
 , cSubstAppExprAndBinds
diff --git a/src/UHC/Light/Compiler/Core/ToCoreRun.hs b/src/UHC/Light/Compiler/Core/ToCoreRun.hs
--- a/src/UHC/Light/Compiler/Core/ToCoreRun.hs
+++ b/src/UHC/Light/Compiler/Core/ToCoreRun.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/ToCoreRun)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/ToCoreRun)
 module UHC.Light.Compiler.Core.ToCoreRun(Inh_CodeAGItf (..), Syn_CodeAGItf (..), wrap_CodeAGItf, sem_CodeAGItf
 , cmod2CoreRun', cmod2CoreRun'', cmod2CoreRun) where
 
diff --git a/src/UHC/Light/Compiler/Core/ToGrin.hs b/src/UHC/Light/Compiler/Core/ToGrin.hs
--- a/src/UHC/Light/Compiler/Core/ToGrin.hs
+++ b/src/UHC/Light/Compiler/Core/ToGrin.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/ToGrin.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/ToGrin.ag)
 module UHC.Light.Compiler.Core.ToGrin(Inh_CodeAGItf (..), Syn_CodeAGItf (..), wrap_CodeAGItf, sem_CodeAGItf) where
 
 import Data.Char
diff --git a/src/UHC/Light/Compiler/Core/Trf.hs b/src/UHC/Light/Compiler/Core/Trf.hs
--- a/src/UHC/Light/Compiler/Core/Trf.hs
+++ b/src/UHC/Light/Compiler/Core/Trf.hs
@@ -125,11 +125,11 @@
 
                  -- flattening of nested strictness
                ; t_let_flatstr
+                 -- removal of unnecessary constructs: aliases
+               ; t_inl_letali
 
                ; unless noOptims $ do
                    {
-                     -- removal of unnecessary constructs: aliases
-                   ; t_inl_letali
 
                      -- removal of unnecessary constructs: trival function applications
                    ; t_elim_trivapp
@@ -143,12 +143,12 @@
                           ; t_let_unrec
                           -- ; t_ren_uniq
                           })
+                 -- removal of unnecessary constructs: constants
+               ; t_const_prop
 
                ; unless noOptims $ do
-                   {
-                     -- removal of unnecessary constructs: constants
-                   ; t_const_prop
-                   ; t_inl_letali
+                   { -- inline aliases
+                     t_inl_letali
                    ; t_elim_trivapp
                    }
 
diff --git a/src/UHC/Light/Compiler/Core/Trf/ANormal.hs b/src/UHC/Light/Compiler/Core/Trf/ANormal.hs
--- a/src/UHC/Light/Compiler/Core/Trf/ANormal.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/ANormal.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/ANorm)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/ANorm)
 module UHC.Light.Compiler.Core.Trf.ANormal(cmodTrfANormal) where
 
 import UHC.Light.Compiler.Base.Common
diff --git a/src/UHC/Light/Compiler/Core/Trf/AnnBasedSimplify.hs b/src/UHC/Light/Compiler/Core/Trf/AnnBasedSimplify.hs
--- a/src/UHC/Light/Compiler/Core/Trf/AnnBasedSimplify.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/AnnBasedSimplify.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/AnnBa)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/AnnBa)
 module UHC.Light.Compiler.Core.Trf.AnnBasedSimplify(cmodTrfAnnBasedSimplify) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
diff --git a/src/UHC/Light/Compiler/Core/Trf/CAFGlobalAsArg.hs b/src/UHC/Light/Compiler/Core/Trf/CAFGlobalAsArg.hs
--- a/src/UHC/Light/Compiler/Core/Trf/CAFGlobalAsArg.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/CAFGlobalAsArg.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/CAFGl)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/CAFGl)
 module UHC.Light.Compiler.Core.Trf.CAFGlobalAsArg(cmodTrfCAFGlobalAsArg) where
 
 import UHC.Util.Utils
diff --git a/src/UHC/Light/Compiler/Core/Trf/ConstProp.hs b/src/UHC/Light/Compiler/Core/Trf/ConstProp.hs
--- a/src/UHC/Light/Compiler/Core/Trf/ConstProp.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/ConstProp.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Const)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Const)
 module UHC.Light.Compiler.Core.Trf.ConstProp(cmodTrfConstProp) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
diff --git a/src/UHC/Light/Compiler/Core/Trf/ElimNonCodegenConstructs.hs b/src/UHC/Light/Compiler/Core/Trf/ElimNonCodegenConstructs.hs
--- a/src/UHC/Light/Compiler/Core/Trf/ElimNonCodegenConstructs.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/ElimNonCodegenConstructs.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/ElimN)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/ElimN)
 module UHC.Light.Compiler.Core.Trf.ElimNonCodegenConstructs(cmodTrfElimNonCodegenConstructs) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
diff --git a/src/UHC/Light/Compiler/Core/Trf/ElimTrivApp.hs b/src/UHC/Light/Compiler/Core/Trf/ElimTrivApp.hs
--- a/src/UHC/Light/Compiler/Core/Trf/ElimTrivApp.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/ElimTrivApp.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/ElimT)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/ElimT)
 module UHC.Light.Compiler.Core.Trf.ElimTrivApp(cmodTrfElimTrivApp) where
 
 import Data.Maybe
diff --git a/src/UHC/Light/Compiler/Core/Trf/EraseExtractTysigCore.hs b/src/UHC/Light/Compiler/Core/Trf/EraseExtractTysigCore.hs
--- a/src/UHC/Light/Compiler/Core/Trf/EraseExtractTysigCore.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/EraseExtractTysigCore.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Erase)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Erase)
 module UHC.Light.Compiler.Core.Trf.EraseExtractTysigCore(cmodTrfEraseExtractTysigCore, cmodTrfEraseTyCore) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
diff --git a/src/UHC/Light/Compiler/Core/Trf/EtaRed.hs b/src/UHC/Light/Compiler/Core/Trf/EtaRed.hs
--- a/src/UHC/Light/Compiler/Core/Trf/EtaRed.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/EtaRed.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/EtaRe)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/EtaRe)
 module UHC.Light.Compiler.Core.Trf.EtaRed(cmodTrfEtaRed) where
 
 import Data.Maybe
diff --git a/src/UHC/Light/Compiler/Core/Trf/ExplicitStackTrace.hs b/src/UHC/Light/Compiler/Core/Trf/ExplicitStackTrace.hs
--- a/src/UHC/Light/Compiler/Core/Trf/ExplicitStackTrace.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/ExplicitStackTrace.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Expli)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Expli)
 module UHC.Light.Compiler.Core.Trf.ExplicitStackTrace(cmodTrfExplicitStackTrace) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
diff --git a/src/UHC/Light/Compiler/Core/Trf/FixAfterParse.hs b/src/UHC/Light/Compiler/Core/Trf/FixAfterParse.hs
--- a/src/UHC/Light/Compiler/Core/Trf/FixAfterParse.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/FixAfterParse.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/FixAf)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/FixAf)
 module UHC.Light.Compiler.Core.Trf.FixAfterParse(cmodTrfFixAfterParse) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
diff --git a/src/UHC/Light/Compiler/Core/Trf/FloatToGlobal.hs b/src/UHC/Light/Compiler/Core/Trf/FloatToGlobal.hs
--- a/src/UHC/Light/Compiler/Core/Trf/FloatToGlobal.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/FloatToGlobal.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Float)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Float)
 module UHC.Light.Compiler.Core.Trf.FloatToGlobal(cmodTrfFloatToGlobal) where
 
 import UHC.Util.Utils
diff --git a/src/UHC/Light/Compiler/Core/Trf/InlineLetAlias.hs b/src/UHC/Light/Compiler/Core/Trf/InlineLetAlias.hs
--- a/src/UHC/Light/Compiler/Core/Trf/InlineLetAlias.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/InlineLetAlias.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Inlin)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/Inlin)
 module UHC.Light.Compiler.Core.Trf.InlineLetAlias(cmodTrfInlineLetAlias) where
 
 import Data.Maybe
diff --git a/src/UHC/Light/Compiler/Core/Trf/LamGlobalAsArg.hs b/src/UHC/Light/Compiler/Core/Trf/LamGlobalAsArg.hs
--- a/src/UHC/Light/Compiler/Core/Trf/LamGlobalAsArg.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/LamGlobalAsArg.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LamGl)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LamGl)
 module UHC.Light.Compiler.Core.Trf.LamGlobalAsArg(cmodTrfLamGlobalAsArg) where
 
 import UHC.Util.Utils
diff --git a/src/UHC/Light/Compiler/Core/Trf/LetDefBeforeUse.hs b/src/UHC/Light/Compiler/Core/Trf/LetDefBeforeUse.hs
--- a/src/UHC/Light/Compiler/Core/Trf/LetDefBeforeUse.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/LetDefBeforeUse.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LetDe)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LetDe)
 module UHC.Light.Compiler.Core.Trf.LetDefBeforeUse(cmodTrfLetDefBeforeUse) where
 
 import Data.Maybe
diff --git a/src/UHC/Light/Compiler/Core/Trf/LetFlattenStrict.hs b/src/UHC/Light/Compiler/Core/Trf/LetFlattenStrict.hs
--- a/src/UHC/Light/Compiler/Core/Trf/LetFlattenStrict.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/LetFlattenStrict.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LetFl)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LetFl)
 module UHC.Light.Compiler.Core.Trf.LetFlattenStrict(cmodTrfLetFlattenStrict) where
 
 import UHC.Light.Compiler.Base.Common
diff --git a/src/UHC/Light/Compiler/Core/Trf/LetUnrec.hs b/src/UHC/Light/Compiler/Core/Trf/LetUnrec.hs
--- a/src/UHC/Light/Compiler/Core/Trf/LetUnrec.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/LetUnrec.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LetUn)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/LetUn)
 module UHC.Light.Compiler.Core.Trf.LetUnrec(cmodTrfLetUnrec) where
 
 import UHC.Light.Compiler.Base.Common
diff --git a/src/UHC/Light/Compiler/Core/Trf/RenUniq.hs b/src/UHC/Light/Compiler/Core/Trf/RenUniq.hs
--- a/src/UHC/Light/Compiler/Core/Trf/RenUniq.hs
+++ b/src/UHC/Light/Compiler/Core/Trf/RenUniq.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/RenUn)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/Trf/RenUn)
 module UHC.Light.Compiler.Core.Trf.RenUniq(RenUniqOpts (..), emptyRenUniqOpts
 , cmodTrfRenUniq) where
 
diff --git a/src/UHC/Light/Compiler/Core/UsedModNms.hs b/src/UHC/Light/Compiler/Core/UsedModNms.hs
--- a/src/UHC/Light/Compiler/Core/UsedModNms.hs
+++ b/src/UHC/Light/Compiler/Core/UsedModNms.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Core/UsedModNm)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Core/UsedModNm)
 module UHC.Light.Compiler.Core.UsedModNms(cmodUsedModNms) where
 
 import qualified Data.Set as Set
diff --git a/src/UHC/Light/Compiler/CoreRun.hs b/src/UHC/Light/Compiler/CoreRun.hs
--- a/src/UHC/Light/Compiler/CoreRun.hs
+++ b/src/UHC/Light/Compiler/CoreRun.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun.ag)
 module UHC.Light.Compiler.CoreRun(module UHC.Light.Compiler.CoreRun.Prim
 , AGItf (..)
 , Mod (..), SExp (..), Exp (..), MbExp, Alt (..), Pat (..)
diff --git a/src/UHC/Light/Compiler/CoreRun/Check.hs b/src/UHC/Light/Compiler/CoreRun/Check.hs
--- a/src/UHC/Light/Compiler/CoreRun/Check.hs
+++ b/src/UHC/Light/Compiler/CoreRun/Check.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun/Check.)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun/Check.)
 module UHC.Light.Compiler.CoreRun.Check(crmodCheck', Inh_AGItf (..), Syn_AGItf (..)) where
 
 import UHC.Light.Compiler.Base.Common
diff --git a/src/UHC/Light/Compiler/CoreRun/ModImpExp.hs b/src/UHC/Light/Compiler/CoreRun/ModImpExp.hs
--- a/src/UHC/Light/Compiler/CoreRun/ModImpExp.hs
+++ b/src/UHC/Light/Compiler/CoreRun/ModImpExp.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun/ModImp)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun/ModImp)
 module UHC.Light.Compiler.CoreRun.ModImpExp(crmodImpExp', Inh_AGItf (..), Syn_AGItf (..)) where
 
 import UHC.Light.Compiler.Base.Common
diff --git a/src/UHC/Light/Compiler/CoreRun/Pretty.hs b/src/UHC/Light/Compiler/CoreRun/Pretty.hs
--- a/src/UHC/Light/Compiler/CoreRun/Pretty.hs
+++ b/src/UHC/Light/Compiler/CoreRun/Pretty.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun/Pretty)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/CoreRun/Pretty)
 module UHC.Light.Compiler.CoreRun.Pretty(ppMod', ppExp') where
 
 import UHC.Util.Pretty
diff --git a/src/UHC/Light/Compiler/EH.hs b/src/UHC/Light/Compiler/EH.hs
--- a/src/UHC/Light/Compiler/EH.hs
+++ b/src/UHC/Light/Compiler/EH.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/EH.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/EH.ag)
 module UHC.Light.Compiler.EH(AGItf (..), Decl (..), Decls, TyExpr (..), Expr (..), PatExpr (..)
 , ExprAnn (..), PatExprAnn (..), TyExprAnn (..)
 , mkLet
diff --git a/src/UHC/Light/Compiler/EH/MainAG.hs b/src/UHC/Light/Compiler/EH/MainAG.hs
--- a/src/UHC/Light/Compiler/EH/MainAG.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG.hs
@@ -58,15 +58,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_AGItf.hs b/src/UHC/Light/Compiler/EH/MainAG_AGItf.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_AGItf.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_AGItf.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_CaseAlt.hs b/src/UHC/Light/Compiler/EH/MainAG_CaseAlt.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_CaseAlt.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_CaseAlt.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_CaseAlts.hs b/src/UHC/Light/Compiler/EH/MainAG_CaseAlts.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_CaseAlts.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_CaseAlts.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_DataConstr.hs b/src/UHC/Light/Compiler/EH/MainAG_DataConstr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_DataConstr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_DataConstr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_DataConstrs.hs b/src/UHC/Light/Compiler/EH/MainAG_DataConstrs.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_DataConstrs.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_DataConstrs.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_DataField.hs b/src/UHC/Light/Compiler/EH/MainAG_DataField.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_DataField.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_DataField.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_DataFieldExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_DataFieldExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_DataFieldExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_DataFieldExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_DataFieldPatExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_DataFieldPatExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_DataFieldPatExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_DataFieldPatExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_DataFields.hs b/src/UHC/Light/Compiler/EH/MainAG_DataFields.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_DataFields.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_DataFields.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_Decl.hs b/src/UHC/Light/Compiler/EH/MainAG_Decl.hs
# file too large to diff: src/UHC/Light/Compiler/EH/MainAG_Decl.hs
diff --git a/src/UHC/Light/Compiler/EH/MainAG_Decls.hs b/src/UHC/Light/Compiler/EH/MainAG_Decls.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_Decls.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_Decls.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_Expr.hs b/src/UHC/Light/Compiler/EH/MainAG_Expr.hs
# file too large to diff: src/UHC/Light/Compiler/EH/MainAG_Expr.hs
diff --git a/src/UHC/Light/Compiler/EH/MainAG_ExprAnn.hs b/src/UHC/Light/Compiler/EH/MainAG_ExprAnn.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_ExprAnn.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_ExprAnn.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_FuncDep.hs b/src/UHC/Light/Compiler/EH/MainAG_FuncDep.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_FuncDep.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_FuncDep.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_FuncDeps.hs b/src/UHC/Light/Compiler/EH/MainAG_FuncDeps.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_FuncDeps.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_FuncDeps.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_KiExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_KiExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_KiExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_KiExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_KiExprAnn.hs b/src/UHC/Light/Compiler/EH/MainAG_KiExprAnn.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_KiExprAnn.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_KiExprAnn.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_MbTyExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_MbTyExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_MbTyExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_MbTyExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_PatExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_PatExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_PatExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_PatExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_PatExprAnn.hs b/src/UHC/Light/Compiler/EH/MainAG_PatExprAnn.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_PatExprAnn.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_PatExprAnn.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_PrExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_PrExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_PrExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_PrExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_PrExprs.hs b/src/UHC/Light/Compiler/EH/MainAG_PrExprs.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_PrExprs.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_PrExprs.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_RecExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_RecExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_RecExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_RecExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_RecPatExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_RecPatExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_RecPatExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_RecPatExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_RowTyExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_RowTyExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_RowTyExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_RowTyExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_TyExpr.hs b/src/UHC/Light/Compiler/EH/MainAG_TyExpr.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_TyExpr.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_TyExpr.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_TyExprAnn.hs b/src/UHC/Light/Compiler/EH/MainAG_TyExprAnn.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_TyExprAnn.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_TyExprAnn.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_TyExprs.hs b/src/UHC/Light/Compiler/EH/MainAG_TyExprs.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_TyExprs.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_TyExprs.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_TyVar.hs b/src/UHC/Light/Compiler/EH/MainAG_TyVar.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_TyVar.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_TyVar.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_TyVars.hs b/src/UHC/Light/Compiler/EH/MainAG_TyVars.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_TyVars.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_TyVars.hs
@@ -59,15 +59,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
diff --git a/src/UHC/Light/Compiler/EH/MainAG_common.hs b/src/UHC/Light/Compiler/EH/MainAG_common.hs
--- a/src/UHC/Light/Compiler/EH/MainAG_common.hs
+++ b/src/UHC/Light/Compiler/EH/MainAG_common.hs
@@ -58,15 +58,15 @@
 import UHC.Light.Compiler.Ty.Trf.Canonic
 import UHC.Light.Compiler.Gam.ClGam
 import UHC.Light.Compiler.Pred
-import UHC.Light.Compiler.Pred.RedGraph (redPruneReductionsUntil)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph (redPruneReductionsUntil)
 import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Pred.EvidenceToCore
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
 import UHC.Light.Compiler.Gam.ClassDefaultGam
 import UHC.Light.Compiler.Ty.Trf.BetaReduce (tyBetaRedFull)
 import UHC.Light.Compiler.Module.ImportExport
@@ -239,7 +239,7 @@
 gathMentrelFilterMpFromSimplifyResult moduleNm simpRes
   = mentrelFilterMpUnions
       [ mentrelFilterMpSingleton [moduleNm] IdOcc_Val nm
-      | (Reduction {cnstrInfo=RedHow_ByInstance nm _ _}) <- (filterMb fromSolverConstraint $ chrSolveStateDoneConstraints $ simpresSolveState simpRes :: [Constraint])
+      | (Reduction {cnstrInfo=RedHow_ByInstance nm _ _}) <- ({- filterMb fromSolverConstraint $ -} chrSolveStateDoneConstraints $ simpresSolveState simpRes :: [Constraint])
       ]
 
 
diff --git a/src/UHC/Light/Compiler/EHC/BuildFunction/Run.hs b/src/UHC/Light/Compiler/EHC/BuildFunction/Run.hs
--- a/src/UHC/Light/Compiler/EHC/BuildFunction/Run.hs
+++ b/src/UHC/Light/Compiler/EHC/BuildFunction/Run.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE GADTs, TemplateHaskell, KindSignatures, ImpredicativeTypes #-}
+{-# LANGUAGE GADTs, TemplateHaskell, KindSignatures #-}
 -- {-# LANGUAGE RecursiveDo #-}
 
 module UHC.Light.Compiler.EHC.BuildFunction.Run
@@ -47,7 +47,7 @@
 import UHC.Light.Compiler.Module.ImportExport
 import qualified UHC.Light.Compiler.HS.ModImpExp as HSSemMod
 import UHC.Light.Compiler.CodeGen.ModuleImportExportImpl
-import UHC.Light.Compiler.CHR.Solve (chrStoreUnion)
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve (chrStoreUnion)
 import qualified UHC.Light.Compiler.Core.Check as Core2ChkSem
 import qualified UHC.Light.Compiler.CoreRun.Check as CoreRun2ChkSem
 import qualified UHC.Light.Compiler.CoreRun.ModImpExp as CoreRunSemMod
@@ -512,10 +512,15 @@
                      Right (ast, _, _) -> return $ Just $ _asthdlrASTIsValid hdlr ast
                maybe (return False) breturn mbValid
 
-          DirOfModIsWriteable modSearchKey -> do
+          DirOfModIsWriteable modSearchKey linkingStyle -> do
                ecu <- bcall $ EcuOfPrevNameAndPath modSearchKey
+               opts <- bcall $ EHCOptsOf modSearchKey
                let fp = ecuSrcFilePath ecu
-               pm <- liftIO $ getPermissions (maybe "." id $ fpathMbDir fp)
+               pm <- liftIO $ getPermissions $
+                   case mkOutputMbDir (if linkingStyle == LinkingStyle_Pkg then OutputFor_Pkg else OutputFor_Module) opts of
+                     Just d -> d
+                     _ ->
+                       maybe "." id $ fpathMbDir fp
                let res = writable pm
                -- liftIO $ putStrLn (fpathToStr fp ++ " writ " ++ show res)
                bUpdECU (ecuModNm ecu) $ ecuDirIsWritable ^= res
@@ -523,7 +528,8 @@
 
           CanCompile modSearchKey -> do
                ecu  <- bcall $ EcuOfPrevNameAndPath modSearchKey
-               isWr <- bcall $ DirOfModIsWriteable modSearchKey
+               opts <- bcall $ EHCOptsOf modSearchKey
+               isWr <- bcall $ DirOfModIsWriteable modSearchKey (ehcOptLinkingStyle opts)
                mbTm <- bcall $ ModfTimeOfFile modSearchKey (ecu ^. ecuASTType) (ecu ^. ecuASTFileContent, ecu ^. ecuASTFileUse) ASTFileTiming_Current
                breturn $ isJust mbTm && isWr
 {-
@@ -1071,7 +1077,7 @@
     -- undefined result
     undefFor modNm = return $ panic $ "BuildFunction.Run.bcall (" ++ show bfun ++ ") undefined result related to " ++ show modNm
 
-{-# LINE 1355 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1363 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- lens access
 st    = crStateInfo ^* crsiBState
 cstk  = st ^* bstateCallStack
@@ -1108,7 +1114,7 @@
 	bmemo (Identity res)
 	return res
 
-{-# LINE 1397 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1405 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Make a Choice what to build, resolve newer/older choice
 bMkASTPMbChoice :: forall m . (EHCCompileRunner m) => BuildGlobal -> PrevFileSearchKey -> ASTPipe -> TmOfResM m -- EHCompilePhaseT m (Maybe (TmOfRes m))
 bMkASTPMbChoice bglob modSearchKey astpipe = do
@@ -1196,7 +1202,8 @@
 
     -- cache: time recursively computed, if file can be cached
     tmOf modSearchKey (ASTPipe_Cache {astpPipe=p}) = do
-        ifM' (bcall $ DirOfModIsWriteable modSearchKey) (return Nothing) $ updTmChoiceM Choice_No $ bTmOf modSearchKey p
+        opts <- bcall $ EHCOptsOf modSearchKey
+        ifM' (bcall $ DirOfModIsWriteable modSearchKey (ehcOptLinkingStyle opts)) (return Nothing) $ updTmChoiceM Choice_No $ bTmOf modSearchKey p
 
     -- whole: time recursively computed, merged into 1 time for all
     tmOf modSearchKey (ASTPipe_Whole {astpPipe=p}) = do
@@ -1256,7 +1263,7 @@
           if tm1 `diffClockTimes` mxtm2 > noTimeDiff then a1 t1 else a2 t2
       _ -> adflt
 
-{-# LINE 1566 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1575 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Build a AST result
 bRetAST :: forall m ast1 ast2 . (Typeable ast1, Typeable ast2, EHCCompileRunner m) => PrevFileSearchKey -> ASTPipe -> ast1 -> EHCompilePhaseT m (Maybe (ASTResult m ast2))
 bRetAST modSearchKey astpipe ast1 = do
@@ -1270,7 +1277,7 @@
               ref = BRef_AST modSearchKey (astpType astpipe)
       _ -> return Nothing
 
-{-# LINE 1581 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1590 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Execute a Choice what to build, having resolved newer/older choice
 bExecASTPMbChoice :: (Typeable ast, EHCCompileRunner m) => BuildGlobal -> PrevFileSearchKey -> ASTBuildPlan -> EHCompilePhaseT m (Maybe (ASTResult m ast))
 bExecASTPMbChoice bglob modSearchKey@(PrevFileSearchKey {_pfsrchKey=FileSearchKey {_fsrchNm=modNm}}) astplan@(ASTBuildPlan {_astbplPipe=astpipe, _astbplChoice=choice}) = do
@@ -1374,7 +1381,7 @@
 	 where
 	   dflt = return Nothing
 
-{-# LINE 1719 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1728 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 bLiftASTPipeToASTBuildPlan
   :: (EHCCompileRunner m)
   => BuildGlobal
@@ -1385,7 +1392,7 @@
     maybeM (bcall $ BuildPlanPMb bglob modSearchKey astpipe) dflt $ \astplan ->
       f modSearchKey astplan
 
-{-# LINE 1735 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1744 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Get AST from file, maybe...
 -- Wrapper around bcalls.
 bASTFromFileEither
@@ -1432,7 +1439,7 @@
 bASTFromFileMb modSearchKey chkTimeStamp asttype skey tkey =
   fmap (either (const Nothing) (Just . tup123to12)) $ bASTFromFileEither modSearchKey False chkTimeStamp asttype skey tkey
 
-{-# LINE 1794 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1803 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Get possible Hs semantics
 bGetHsSemPlMb
   :: (EHCCompileRunner m)
@@ -1447,7 +1454,7 @@
      where
        extr (hsSem, _) = hsSem
 
-{-# LINE 1818 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1827 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Dereference an indirection into compilation state, possibly with a result, and a setter
 bderef'' :: forall res m . (Typeable res, EHCCompileRunner m) => BRef m res -> EHCompilePhaseT m (Maybe res, Maybe (res -> EHCompilePhaseT m ()))
 bderef'' bref = do
@@ -1503,11 +1510,11 @@
 bderef bref = do
     fmap (panicJust $ "BuildFunction.Run.bderef " ++ show bref) $ bderef' bref
 
-{-# LINE 1885 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1894 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 type ASTFlowPred  = ASTPipe -> Maybe (ASTPipe,ASTAlreadyFlowIntoCRSIFromToInfo)
 type ASTFlowPred' = Bool -> ASTFlowPred
 
-{-# LINE 1890 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1899 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 -- | Is a particular flow of semantics allowed?
 bIsAllowedFlowPl'' :: ASTBuildPlan -> ASTFlowPred -> Maybe (ASTBuildPlan, (ASTPipe,ASTAlreadyFlowIntoCRSIFromToInfo))
 bIsAllowedFlowPl'' astplan astpred = astplFind astpred astplan
@@ -1542,17 +1549,17 @@
        return $ Just astplanFnd
      else return Nothing
 
-{-# LINE 1926 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1935 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 astpMbFromHSToEH, astpMbFromHS, astpMbFromEH :: ASTFlowPred'
 astpMbFromHSToEH top p = case p of {ASTPipe_Derived ASTType_EH p' | astpType p' == ASTType_HS -> Just (if' top p p', (Just ASTType_EH, ASTType_HS)); _ -> Nothing}
 astpMbFromHS top p = case p of {ASTPipe_Derived _ p' | astpType p' == ASTType_HS -> Just (if' top p p', (Nothing, ASTType_HS)); _ -> Nothing}
 astpMbFromEH top p = case p of {ASTPipe_Derived _ p' | astpType p' == ASTType_EH -> Just (if' top p p', (Nothing, ASTType_EH)); _ -> Nothing}
 
-{-# LINE 1933 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1942 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 astpMbFromEHToCore :: ASTFlowPred'
 astpMbFromEHToCore top p = case p of {ASTPipe_Derived ASTType_Core p' | astpType p' == ASTType_EH -> Just (if' top p p', (Just ASTType_Core, ASTType_EH)); _ -> Nothing}
 
-{-# LINE 1943 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1952 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 astpMbSrcCore, astpMbCachedCore, astpMbSrcCachedCore :: ASTFlowPred'
 astpMbSrcCore top p = case p of
   ASTPipe_Src ASTFileUse_Src _ ASTType_Core
@@ -1566,7 +1573,7 @@
 
 astpMbSrcCachedCore = astpMbSrcCore <|||> astpMbCachedCore
 
-{-# LINE 1958 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1967 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 astpMbSrcCoreRun, astpMbCachedCoreRun, astpMbSrcCachedCoreRun :: ASTFlowPred'
 astpMbSrcCoreRun top p = case p of
   ASTPipe_Src ASTFileUse_Src _ ASTType_CoreRun
@@ -1580,15 +1587,15 @@
 
 astpMbSrcCachedCoreRun = astpMbSrcCoreRun <|||> astpMbCachedCoreRun
 
-{-# LINE 1973 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1982 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 astpMbFromCoreToCoreRun :: ASTFlowPred'
 astpMbFromCoreToCoreRun top p = case p of {ASTPipe_Derived ASTType_CoreRun p' | astpType p' == ASTType_Core -> Just (if' top p p', (Just ASTType_CoreRun, ASTType_Core)); _ -> Nothing}
 
-{-# LINE 1978 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1987 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 astpMbCheckCoreRunToCoreRun :: ASTFlowPred'
 astpMbCheckCoreRunToCoreRun top p = case p of {ASTPipe_Trf ASTType_CoreRun ASTTrf_Check p' | astpType p' == ASTType_CoreRun -> Just (if' top p p', (Just ASTType_CoreRun, ASTType_CoreRun)); _ -> Nothing}
 
-{-# LINE 1987 "src/ehc/EHC/BuildFunction/Run.chs" #-}
+{-# LINE 1996 "src/ehc/EHC/BuildFunction/Run.chs" #-}
 f1 <||>  f2 = \a   -> f1 a   <|> f2 a
 f1 <|||> f2 = \a b -> f1 a b <|> f2 a b
 
diff --git a/src/UHC/Light/Compiler/EHC/Common.hs b/src/UHC/Light/Compiler/EHC/Common.hs
--- a/src/UHC/Light/Compiler/EHC/Common.hs
+++ b/src/UHC/Light/Compiler/EHC/Common.hs
@@ -35,7 +35,8 @@
 , hsstateNext
 , GetMeta (..), allGetMeta
 , CState (..), OState (..)
-, prevSearchInfoAdaptedSearchPath )
+, prevSearchInfoAdaptedSearchPath
+, mkOutputMbDir )
 where
 import Data.List
 import Data.Char
@@ -346,9 +347,30 @@
 showShellCmd (cmd,args) = concat $ intersperse " " $ [cmd] ++ args
 
 {-# LINE 451 "src/ehc/EHC/Common.chs" #-}
+-- | Get the output dir
+mkOutputMbDir :: InOrOutputFor -> EHCOpts -> Maybe String
+mkOutputMbDir inoutputfor opts =
+    case inoutputfor of
+        OutputFor_Module   -> f ehcOptOutputDir
+        OutputFor_Pkg      -> f ehcOptOutputDir -- ehcOptOutputPkgLibDir
+        InputFrom_Loc l
+          | filelocIsPkg l -> f (const Nothing)
+          | otherwise      -> f ehcOptOutputDir
+  where f g = fmap filePathUnPrefix $ g opts
+
+{-# LINE 464 "src/ehc/EHC/Common.chs" #-}
 mkInOrOutputFPathDirFor :: FPATH nm => InOrOutputFor -> EHCOpts -> nm -> FPath -> String -> (FPath,Maybe String)
 mkInOrOutputFPathDirFor inoutputfor opts modNm fp suffix
   = (fpathSetSuff suffix fp', d)
+  where (fp', d) = maybe (fp, Nothing) (\(fp,d) -> (fp, Just d)) $ do
+          d <- mkOutputMbDir inoutputfor opts
+          return ( fpathPrependDir d
+                   $ fpathSetBase (fpathBase fp)	-- ensure possibly adapted name in filesys is used
+                   $ mkFPath modNm	                -- includes module hierarchy into filename
+                 , d
+                 )
+{-
+  = (fpathSetSuff suffix fp', d)
   where (fp',d) = case inoutputfor of
                     OutputFor_Module   -> f ehcOptOutputDir
                     OutputFor_Pkg      -> f ehcOptOutputDir -- ehcOptOutputPkgLibDir
@@ -363,17 +385,18 @@
                               )
                            where d' = filePathUnPrefix d
                     _      -> (fp,Nothing)
+-}
 
-{-# LINE 476 "src/ehc/EHC/Common.chs" #-}
+{-# LINE 499 "src/ehc/EHC/Common.chs" #-}
 mkInOrOutputFPathFor :: FPATH nm => InOrOutputFor -> EHCOpts -> nm -> FPath -> String -> FPath
 mkInOrOutputFPathFor inoutputfor opts modNm fp suffix
   = fst $ mkInOrOutputFPathDirFor inoutputfor opts modNm fp suffix
 
-{-# LINE 482 "src/ehc/EHC/Common.chs" #-}
+{-# LINE 505 "src/ehc/EHC/Common.chs" #-}
 mkOutputFPath :: FPATH nm => EHCOpts -> nm -> FPath -> String -> FPath
 mkOutputFPath = mkInOrOutputFPathFor OutputFor_Module
 
-{-# LINE 491 "src/ehc/EHC/Common.chs" #-}
+{-# LINE 514 "src/ehc/EHC/Common.chs" #-}
 -- | FPath for per module output
 mkPerModuleOutputFPath :: EHCOpts -> Bool -> HsName -> FPath -> String -> FPath
 mkPerModuleOutputFPath opts doSepBy_ modNm fp suffix
@@ -385,7 +408,7 @@
                where nm_ = mkOutputFPath opts (hsnMapQualified (const base) m) (fpathSetBase base f) suffix
                          where base = hsnShow "_" "_" m
 
-{-# LINE 508 "src/ehc/EHC/Common.chs" #-}
+{-# LINE 531 "src/ehc/EHC/Common.chs" #-}
 -- | FPath for final executable, with possible suffix (and forcing flag, even on given exec)
 mkPerExecOutputFPath :: EHCOpts -> HsName -> FPath -> Maybe (String, Bool) -> FPath
 mkPerExecOutputFPath opts modNm fp mbSuffix
diff --git a/src/UHC/Light/Compiler/EHC/CompilePhase/FlowBetweenPhase.hs b/src/UHC/Light/Compiler/EHC/CompilePhase/FlowBetweenPhase.hs
--- a/src/UHC/Light/Compiler/EHC/CompilePhase/FlowBetweenPhase.hs
+++ b/src/UHC/Light/Compiler/EHC/CompilePhase/FlowBetweenPhase.hs
@@ -24,7 +24,7 @@
 import UHC.Light.Compiler.Core.UsedModNms
 import qualified UHC.Light.Compiler.Core.Check as Core2ChkSem
 import qualified UHC.Light.Compiler.HI as HI
-import UHC.Light.Compiler.CHR.Solve (chrStoreUnion)
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve (chrStoreUnion)
 import qualified UHC.Util.FastSeq as Seq
 import UHC.Light.Compiler.EHC.CompilePhase.Module(cpUpdHiddenExports)
 
diff --git a/src/UHC/Light/Compiler/EHC/CompilePhase/Parsers.hs b/src/UHC/Light/Compiler/EHC/CompilePhase/Parsers.hs
--- a/src/UHC/Light/Compiler/EHC/CompilePhase/Parsers.hs
+++ b/src/UHC/Light/Compiler/EHC/CompilePhase/Parsers.hs
@@ -53,10 +53,11 @@
 cpParseWithFPath
       astHdlr popts mbFp modNm
  = do { cr <- get
-      ; let (_,opts) 	= crBaseInfo' cr
+      ; let (_,_,opts,_)= crBaseInfo modNm cr
             sopts    	= _asthdlrParseScanOpts astHdlr opts popts
             description = "Parse (" ++ (if ScanUtils.scoLitmode sopts then "Literate " else "") ++ _asthdlrName astHdlr ++ " syntax) of module `" ++ show modNm ++ "`"
             seterrs 	= cpSetLimitErrsWhen 5 description
+      -- ; liftIO $ putStrLn $ "cpParseWithFPath: ehcOptBangPatterns=" ++ show (ehcOptBangPatterns opts)
       ; case _asthdlrParser astHdlr opts popts of
           Just (ASTParser p) -> do
                (res,errs) <- parseWithFPath sopts popts p (maybe (ecuFilePath (crCU modNm cr)) id mbFp)
@@ -65,15 +66,15 @@
           _ -> seterrs [strMsg $ "No parser for " ++ _asthdlrName astHdlr]
       }
 
-{-# LINE 129 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 130 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 cpParseHs :: EHCCompileRunner m => Bool -> HsName -> EHCompilePhaseT m ()
 cpParseHs litmode = cpParseWithFPath astHandler'_HS (defaultEHParseOpts {ehpoptsLitMode=litmode}) Nothing
 
-{-# LINE 139 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 140 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 cpParseHsImport :: EHCCompileRunner m => Bool -> HsName -> EHCompilePhaseT m ()
 cpParseHsImport litmode = cpParseWithFPath astHandler'_HS (defaultEHParseOpts {ehpoptsOkToStopAtErr=True, ehpoptsLitMode=litmode, ehpoptsForImport=True}) Nothing
 
-{-# LINE 195 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 196 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 -- | Decode from serialized file and store result in the compileunit for the module modNm
 cpDecode :: (EHCCompileRunner m, Serialize x) => Maybe String -> EcuUpdater x -> HsName -> EHCompilePhaseT m ()
 cpDecode mbSuff store modNm
@@ -85,7 +86,7 @@
        ; cpUpdCU modNm (store x)
        }
 
-{-# LINE 208 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 209 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 -- | Decode from serialized file and store result in the compileunit for the module modNm, return True if decoding could be done
 cpDecode'' :: EHCCompileRunner m => ASTHandler' ast -> ASTSuffixKey -> ASTFileTiming -> HsName -> EHCompilePhaseT m Bool
 cpDecode'' astHdlr skey tkey modNm
@@ -119,7 +120,7 @@
     okDecode <- cpDecode'' astHdlr skey tkey modNm
     unless okDecode $ cpSetLimitErrsWhen 1 ("Decode " ++ _asthdlrName astHdlr) [strMsg $ "No decoder/lens for " ++ _asthdlrName astHdlr ++ " (" ++ show skey ++ "/" ++ show tkey ++ ")"]
 
-{-# LINE 263 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 264 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 cpGetPrevHI :: EHCCompileRunner m => HsName -> EHCompilePhaseT m AST_HI
 cpGetPrevHI modNm
   = do { cpMsg modNm VerboseDebug "cpGetPrevHI"
@@ -135,7 +136,7 @@
        ; bcall $ ASTFromFile (mkPrevFileSearchKeyWithName modNm) (AlwaysEq ASTFileTimeHandleHow_AbsenceIgnore) ASTType_HI (ASTFileContent_Binary, ASTFileUse_Cache) ASTFileTiming_Prev
        }
 
-{-# LINE 280 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 281 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 cpGetPrevCore :: EHCCompileRunner m => HsName -> EHCompilePhaseT m AST_Core
 cpGetPrevCore modNm
   = do { cpMsg modNm VerboseDebug "cpGetPrevCore"
@@ -150,7 +151,7 @@
        ; bcall $ ASTFromFile (mkPrevFileSearchKeyWithName modNm) (AlwaysEq ASTFileTimeHandleHow_AbsenceIgnore) ASTType_Core (ASTFileContent_Binary, ASTFileUse_Cache) ASTFileTiming_Prev
        }
 
-{-# LINE 296 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
+{-# LINE 297 "src/ehc/EHC/CompilePhase/Parsers.chs" #-}
 cpGetPrevCoreRun :: EHCCompileRunner m => HsName -> EHCompilePhaseT m AST_CoreRun
 cpGetPrevCoreRun modNm
   = do { cpMsg modNm VerboseDebug "cpGetPrevCoreRun"
diff --git a/src/UHC/Light/Compiler/EHC/CompilePhase/Semantics.hs b/src/UHC/Light/Compiler/EHC/CompilePhase/Semantics.hs
--- a/src/UHC/Light/Compiler/EHC/CompilePhase/Semantics.hs
+++ b/src/UHC/Light/Compiler/EHC/CompilePhase/Semantics.hs
@@ -155,6 +155,7 @@
                  pragmas = HSSemMod.fileHeaderPragmas_Syn_AGItf hsSemMod
                  (ecuOpts,modifiedOpts)
                          = ehcOptUpdateWithPragmas pragmas opts
+         -- ;  liftIO $ putStrLn $ "pragmas:" ++ show pragmas
          ;  when (isJust mbHS)
                  (cpUpdCU modNm ( ecuStoreHSSemMod hsSemMod
                                 . ecuSetHasMain hasMain
@@ -163,7 +164,7 @@
                  )              )
          }
 
-{-# LINE 278 "src/ehc/EHC/CompilePhase/Semantics.chs" #-}
+{-# LINE 279 "src/ehc/EHC/CompilePhase/Semantics.chs" #-}
 cpFoldHIInfo :: EHCCompileRunner m => HsName -> EHCompilePhaseT m ()
 cpFoldHIInfo modNm
   =  do  {  cr <- get
diff --git a/src/UHC/Light/Compiler/EHC/CompileRun.hs b/src/UHC/Light/Compiler/EHC/CompileRun.hs
--- a/src/UHC/Light/Compiler/EHC/CompileRun.hs
+++ b/src/UHC/Light/Compiler/EHC/CompileRun.hs
@@ -137,7 +137,7 @@
                  -- dfltPrev ASTType_CoreRun modNm ecu
          ;  when (GetMeta_Dir `elem` gm) $
                  wr opts ecu ecuStoreDirIsWritable fp
-                 -- void $ bcall $ DirOfModIsWriteable modNm
+                 -- void $ bcall $ DirOfModIsWriteable modNm (ehcOptLinkingStyle opts)
          }
   where -- dfltPrev astty modNm ecu = void $ bcall $ ModfTimeOfFile (mkPrevFileSearchKeyWithName modNm) astty (ASTFileContent_Binary, ASTFileUse_Cache) ASTFileTiming_Prev
 
@@ -157,8 +157,12 @@
                           })
                }
         wr opts ecu store fp
-          = do { pm <- liftIO $ getPermissions (maybe "." id $ fpathMbDir fp)
-               -- ; liftIO $ putStrLn (fpathToStr fp ++ " writ " ++ show (writable pm))
+          = do { pm <- liftIO $ getPermissions $
+                   case mkOutputMbDir (if ehcOptLinkingStyle opts == LinkingStyle_Pkg then OutputFor_Pkg else OutputFor_Module) opts of
+                     Just d -> d
+                     _ ->
+                       maybe "." id $ fpathMbDir fp
+               -- ; liftIO $ putStrLn $ fpathToStr fp ++ " writ " ++ show (writable pm)
                ; cpUpdCU modNm $ store (writable pm)
                }
 
diff --git a/src/UHC/Light/Compiler/EHC/CompileRun/Base.hs b/src/UHC/Light/Compiler/EHC/CompileRun/Base.hs
--- a/src/UHC/Light/Compiler/EHC/CompileRun/Base.hs
+++ b/src/UHC/Light/Compiler/EHC/CompileRun/Base.hs
@@ -342,6 +342,7 @@
   --- | Get writeability of the dir a module resides in
   DirOfModIsWriteable
     :: !PrevFileSearchKey							--- ^ module name and possibly known path
+    -> !LinkingStyle
     -> BFun' m Bool
 
   --- | Can compile a src module
@@ -592,7 +593,7 @@
     (ModfTimeOfFile         	a1 b1 c1 d1			, ModfTimeOfFile			a2 b2 c2 d2			) -> lexico [a1 `compare` a2, b1 `compare` b2, c1 `compare` c2, d1 `compare` d2]
     (ASTFileIsValid         	a1 b1 c1 d1			, ASTFileIsValid			a2 b2 c2 d2			) -> lexico [a1 `compare` a2, b1 `compare` b2, c1 `compare` c2, d1 `compare` d2]
     (ASTFileIsNewerThan        	a1 b1   			, ASTFileIsNewerThan		a2 b2 	 			) -> lexico [a1 `compare` a2, b1 `compare` b2]
-    (DirOfModIsWriteable		a1   				, DirOfModIsWriteable		a2   				) ->         a1 `compare` a2
+    (DirOfModIsWriteable		a1 b1				, DirOfModIsWriteable		a2 b2				) -> lexico [a1 `compare` a2, b1 `compare` b2]
     (CanCompile					a1 					, CanCompile				a2 					) ->         a1 `compare` a2
     (IsTopMod					a1 					, IsTopMod					a2 					) ->         a1 `compare` a2
     (HasMain					a1 b1 c1			, HasMain					a2 b2 c2			) -> lexico [a1 `compare` a2, b1 `compare` b2, c1 `compare` c2]
@@ -612,7 +613,7 @@
     (FoldCoreRunCheckPlMb		a1 b1 c1 			, FoldCoreRunCheckPlMb		a2 b2 c2			) -> lexico [a1 `compare` a2, b1 `compare` b2, c1 `compare` c2]
     (FPathPreprocessedWithCPP	a1 b1 				, FPathPreprocessedWithCPP	a2 b2 				) -> lexico [a1 `compare` a2, b1 `compare` b2]
     (ExposedPackages								, ExposedPackages								) -> EQ
-  where lexico = orderingLexic
+  where lexico = orderingLexicList
 
 instance Ord (BFun' m res) where
   compare = bfunCompare
@@ -647,7 +648,7 @@
 	ModfTimeOfFile				a b	c d		-> salt `hashWithSalt` (23::Int) `hashWithSalt` a `hashWithSalt` b `hashWithSalt` c `hashWithSalt` d
 	ASTFileIsValid				a b	c d		-> salt `hashWithSalt` (24::Int) `hashWithSalt` a `hashWithSalt` b `hashWithSalt` c `hashWithSalt` d
 	ASTFileIsNewerThan			a b			-> salt `hashWithSalt` (25::Int) `hashWithSalt` a `hashWithSalt` b
-	DirOfModIsWriteable 		a 			-> salt `hashWithSalt` (26::Int) `hashWithSalt` a
+	DirOfModIsWriteable 		a b			-> salt `hashWithSalt` (26::Int) `hashWithSalt` a `hashWithSalt` b
 	CanCompile		 			a 			-> salt `hashWithSalt` (27::Int) `hashWithSalt` a
 	IsTopMod			 		a 			-> salt `hashWithSalt` (29::Int) `hashWithSalt` a
 	HasMain			 			a b c		-> salt `hashWithSalt` (29::Int) `hashWithSalt` a `hashWithSalt` b `hashWithSalt` c
@@ -669,7 +670,7 @@
 	ExposedPackages							-> salt `hashWithSalt` (maxBound-2::Int)
 
 
-{-# LINE 753 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 754 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | BFun' used as a dependency of another BFun', for now same as a Dynamic
 data BFun m
   = forall res
@@ -690,7 +691,7 @@
 instance Show (BFun m) where
   show (BFun {bfcdFun=x}) = show x
 
-{-# LINE 775 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 776 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | BFun' + BCachedVal' packaged with required class instances, similar to a Dynamic
 data BFunCacheEntry m
   = forall f res
@@ -700,7 +701,7 @@
            , bfceVal		:: !(f res)
            }
 
-{-# LINE 786 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 787 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Cache for function calls, first indexed on hash
 data BCache m
   = BCache
@@ -712,11 +713,11 @@
 emptyBCache :: BCache m
 emptyBCache = BCache IMap.empty Map.empty Rel.empty
 
-{-# LINE 799 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 800 "src/ehc/EHC/CompileRun/Base.chs" #-}
 bcacheResolveModNm :: BCache m -> HsName -> HsName
 bcacheResolveModNm c n = maybe n (bcacheResolveModNm c) $ Map.lookup n (_bcacheModNmForward c)
 
-{-# LINE 808 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 809 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | GADT for references to global state, interpreted inside the compiler driver monad, the type of the GADT telling what the type of the value should be.
 data BRef (m :: * -> *) val where
   --- | Global state
@@ -754,7 +755,7 @@
 deriving instance Typeable BRef
 deriving instance Show (BRef m val)
 
-{-# LINE 870 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 871 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Result coming out of a build call for constructing/loading an AST
 data ASTResult m ast =
   ASTResult
@@ -765,7 +766,7 @@
     }
   deriving (Typeable, Show)
 
-{-# LINE 884 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 885 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkASTResult'
   :: EHCCompileRunner m
   => ast
@@ -780,11 +781,11 @@
       ASTResult ast ref astpipe
         tm
 
-{-# LINE 908 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 909 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkASTResult :: EHCCompileRunner m => ast -> BRef m ast -> ASTPipe -> EHCompilePhaseT m (ASTResult m ast)
 mkASTResult ast ref astpipe = mkASTResult' ast ref astpipe Nothing
 
-{-# LINE 917 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 918 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Cache for function calls, first indexed on hash
 data BState m
   = BState
@@ -795,17 +796,17 @@
 emptyBState :: BState m
 emptyBState = BState emptyBCache []
 
-{-# LINE 933 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 934 "src/ehc/EHC/CompileRun/Base.chs" #-}
 data EHCIOInfo
   = EHCIOInfo
       { ehcioinfoStartTime			:: EHCTime
       , ehcioinfoLastTime			:: EHCTime
       }
 
-{-# LINE 945 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 946 "src/ehc/EHC/CompileRun/Base.chs" #-}
 type EHCTime = Integer
 
-{-# LINE 953 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 954 "src/ehc/EHC/CompileRun/Base.chs" #-}
 data EHCompileRunCoreRunStateInfo
   = EHCompileRunCoreRunStateInfo
       { _crcrsiReqdModules  	:: [HsName]                             -- ^ (current) required/to-be-loaded modules, the length is used to assign module nr identifications
@@ -819,7 +820,7 @@
       , _crcrsiNm2RefMp			=	CoreRun.emptyNm2RefMp
       }
 
-{-# LINE 972 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 973 "src/ehc/EHC/CompileRun/Base.chs" #-}
 data EHCompileRunStateInfo (m :: * -> *)
   = EHCompileRunStateInfo
       { _crsiOpts       :: !EHCOpts                             -- options
@@ -845,7 +846,7 @@
       }
   deriving (Typeable)
 
-{-# LINE 1007 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1008 "src/ehc/EHC/CompileRun/Base.chs" #-}
 emptyEHCompileRunStateInfo :: EHCompileRunStateInfo m
 emptyEHCompileRunStateInfo
   = EHCompileRunStateInfo
@@ -870,18 +871,18 @@
       , _crsiBState   	=   emptyBState
       }
 
-{-# LINE 1045 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1046 "src/ehc/EHC/CompileRun/Base.chs" #-}
 instance Show (EHCompileRunStateInfo m) where
   show _ = "EHCompileRunStateInfo"
 
 instance PP (EHCompileRunStateInfo m) where
   pp i = "CRSI:" >#< ppModMp (crsiModMp i)
 
-{-# LINE 1053 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1054 "src/ehc/EHC/CompileRun/Base.chs" #-}
 instance CompileRunStateInfo (EHCompileRunStateInfo m) HsName () where
   crsiImportPosOfCUKey n i = ()
 
-{-# LINE 1058 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1059 "src/ehc/EHC/CompileRun/Base.chs" #-}
 class ( MonadIO m
       , MonadFix m
       , Typeable m
@@ -923,13 +924,13 @@
   liftIO = lift . liftIO
 -}
 
-{-# LINE 1101 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1102 "src/ehc/EHC/CompileRun/Base.chs" #-}
 type EHCompileRun m         = CompileRun HsName EHCompileUnit (EHCompileRunStateInfo m) Err
 type EHCompilePhaseAddonT m = StateT (EHCompileRun m) m
 type EHCompilePhaseT      m = CompilePhaseT HsName EHCompileUnit (EHCompileRunStateInfo m) Err (EHCompilePhaseAddonT m)
 type EHCompilePhase         = EHCompilePhaseT IO
 
-{-# LINE 1114 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1115 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Delayed results (too avoid too much file content inspection)
 data TmOfDelayedRes =
   TmOfDelayedRes
@@ -942,7 +943,7 @@
 emptyTmOfDelayedRes :: TmOfDelayedRes
 emptyTmOfDelayedRes = TmOfDelayedRes hsnUnknown False Map.empty
 
-{-# LINE 1128 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1129 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Results coming along with 'bMkASTPMbChoice' determining which choice in the build pipe to take
 data TmOfRes (m :: * -> *) =
   TmOfRes
@@ -960,31 +961,31 @@
                        (panic "emptyTmOfRes.tmofresDelayed") (panic "emptyTmOfRes.tmofresTm")
                        False
 
-{-# LINE 1155 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1156 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''BCache
 
-{-# LINE 1159 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1160 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''BState
 
-{-# LINE 1163 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1164 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''EHCompileRunCoreRunStateInfo
 
-{-# LINE 1167 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1168 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''EHCompileRunStateInfo
 
 
 
-{-# LINE 1180 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1181 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''ASTResult
 
-{-# LINE 1187 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1188 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''TmOfDelayedRes
 
-{-# LINE 1191 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1192 "src/ehc/EHC/CompileRun/Base.chs" #-}
 mkLabel ''TmOfRes
 
 
-{-# LINE 1202 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1203 "src/ehc/EHC/CompileRun/Base.chs" #-}
 crBaseInfo' :: EHCompileRun m -> (EHCompileRunStateInfo m,EHCOpts)
 crBaseInfo' cr
   = (crsi,opts)
@@ -1010,7 +1011,7 @@
     )
   where (mbEcu, crsi, opts, mbFp) = crMbBaseInfo modNm cr
 
-{-# LINE 1237 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1238 "src/ehc/EHC/CompileRun/Base.chs" #-}
 cpStepUID :: EHCCompileRunner m => EHCompilePhaseT m ()
 cpStepUID
   = cpUpdSI (\crsi -> let (n,h) = mkNewLevUID (crsi ^. crsiNextUID)
@@ -1022,7 +1023,7 @@
 cpSetUID u
   = cpUpdSI $ crsiNextUID ^= u -- (\crsi -> crsi {crsiNextUID = u})
 
-{-# LINE 1254 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1255 "src/ehc/EHC/CompileRun/Base.chs" #-}
 type EHCTimeDiff = Integer
 
 getEHCTime :: IO EHCTime
@@ -1040,12 +1041,12 @@
         (days, hrs  ) = r2 `quotRem` 24
         fm n x = strPadLeft '0' n (show x)
 
-{-# LINE 1277 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1278 "src/ehc/EHC/CompileRun/Base.chs" #-}
 cpRegisterFilesToRm :: EHCCompileRunner m => [FPath] -> EHCompilePhaseT m ()
 cpRegisterFilesToRm fpL
   = cpUpdSI (\crsi -> crsi {crsiFilesToRm = fpL ++ crsiFilesToRm crsi})
 
-{-# LINE 1283 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1284 "src/ehc/EHC/CompileRun/Base.chs" #-}
 cpRmFilesToRm :: EHCCompileRunner m => EHCompilePhaseT m ()
 cpRmFilesToRm
   = do { cr <- MS.get
@@ -1057,7 +1058,7 @@
   where rm f = CE.catch (removeFile f)
                         (\(e :: SomeException) -> hPutStrLn stderr (show f ++ ": " ++ show e))
 
-{-# LINE 1300 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1301 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Tracing
 cpTrPP :: EHCCompileRunner m => TraceOn -> [PP_Doc] -> EHCompilePhaseT m ()
 cpTrPP ton ms = do
@@ -1076,12 +1077,12 @@
 cpTr :: EHCCompileRunner m => TraceOn -> [String] -> EHCompilePhaseT m ()
 cpTr ton ms = cpTrPP ton $ map pp ms
 
-{-# LINE 1324 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1325 "src/ehc/EHC/CompileRun/Base.chs" #-}
 cpMemUsage :: EHCCompileRunner m => EHCompilePhaseT m ()
 cpMemUsage
   = return ()
 
-{-# LINE 1343 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1344 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Message
 cpMsg :: EHCCompileRunner m => HsName -> Verbosity -> String -> EHCompilePhaseT m ()
 cpMsg modNm v m
@@ -1110,7 +1111,7 @@
        ; cpMemUsage
        }
 
-{-# LINE 1385 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1386 "src/ehc/EHC/CompileRun/Base.chs" #-}
 cpSystem' :: EHCCompileRunner m => Maybe FilePath -> (FilePath,[String]) -> EHCompilePhaseT m ()
 cpSystem' mbStdOut (cmd,args)
   = do { exitCode <- liftIO $ system $ showShellCmd $ (cmd,args ++ (maybe [] (\o -> [">", o]) mbStdOut))
@@ -1122,7 +1123,7 @@
 cpSystem :: EHCCompileRunner m => (FilePath,[String]) -> EHCompilePhaseT m ()
 cpSystem = cpSystem' Nothing
 
-{-# LINE 1415 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1416 "src/ehc/EHC/CompileRun/Base.chs" #-}
 cpSystemRaw :: EHCCompileRunner m => String -> [String] -> EHCompilePhaseT m ()
 cpSystemRaw cmd args
   = do { exitCode <- liftIO $ rawSystem cmd args
@@ -1131,7 +1132,7 @@
            _           -> cpSetErrs [rngLift emptyRange Err_PP $ pp $ show exitCode] -- cpSetFail
        }
 
-{-# LINE 1429 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1430 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | split module names in those part of a package, and others
 crPartitionIntoPkgAndOthers :: EHCompileRun m -> [HsName] -> ([PkgModulePartition],[HsName])
 crPartitionIntoPkgAndOthers cr modNmL
@@ -1146,7 +1147,7 @@
                   FileLocKind_Pkg p d -> ([((p,d),[m])], [ ])
               where (ecu,_,_,_) = crBaseInfo m cr
 
-{-# LINE 1449 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1450 "src/ehc/EHC/CompileRun/Base.chs" #-}
 crsiExpNmOffMpDbg :: String -> HsName -> EHCompileRunStateInfo m -> VA.HsName2FldMp
 crsiExpNmOffMpDbg ctxt modNm crsi = mmiNmOffMp $ panicJust ("crsiExpNmOffMp." ++ ctxt ++ show ks ++ ": " ++ show modNm) $ Map.lookup modNm $ crsiModMp crsi
   where ks = Map.keys $ crsiModMp crsi
@@ -1154,7 +1155,7 @@
 crsiExpNmOffMp :: HsName -> EHCompileRunStateInfo m -> VA.HsName2FldMp
 crsiExpNmOffMp modNm crsi = mmiNmOffMp $ panicJust ("crsiExpNmOffMp: " ++ show modNm) $ Map.lookup modNm $ crsiModMp crsi
 
-{-# LINE 1462 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1463 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Add ast types for which the semantics have been flowed into global state, with additional from/to info
 bUpdAlreadyFlowIntoCRSIWith :: EHCCompileRunner m => HsName -> ASTType -> ASTAlreadyFlowIntoCRSIInfo -> EHCompilePhaseT m ()
 bUpdAlreadyFlowIntoCRSIWith modNm asttype flowstage =
@@ -1165,7 +1166,7 @@
 bUpdAlreadyFlowIntoCRSI :: EHCCompileRunner m => HsName -> ASTType -> ASTSemFlowStage -> EHCompilePhaseT m ()
 bUpdAlreadyFlowIntoCRSI modNm asttype flowstage = bUpdAlreadyFlowIntoCRSIWith modNm asttype (flowstage,Nothing)
 
-{-# LINE 1478 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1479 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- | Lookup compile unit, also giving the actual module name forwarded to
 bLookupECUInCR :: HsName -> EHCompileRun m -> Maybe (HsName, EHCompileUnit)
 bLookupECUInCR n cr = lkn n <|> lkn (bcacheResolveModNm (cr ^. crStateInfo ^. crsiBState ^. bstateCache) n)
@@ -1185,7 +1186,7 @@
     cr <- MS.get
     cpUpdCU (maybe n fst $ bLookupECUInCR n cr) f
 
-{-# LINE 1503 "src/ehc/EHC/CompileRun/Base.chs" #-}
+{-# LINE 1504 "src/ehc/EHC/CompileRun/Base.chs" #-}
 -- type TmOfRes   m = TmRes m -- (EHCompilePhaseT m (Maybe (Map.Map HsName ClockTime)), TmChoice, ClockTime)
 type TmOfResMb m = Maybe (TmOfRes m)
 type TmOfResM  m = EHCompilePhaseT m (TmOfResMb m)
diff --git a/src/UHC/Light/Compiler/EHC/InitialSetup.hs b/src/UHC/Light/Compiler/EHC/InitialSetup.hs
--- a/src/UHC/Light/Compiler/EHC/InitialSetup.hs
+++ b/src/UHC/Light/Compiler/EHC/InitialSetup.hs
@@ -18,7 +18,7 @@
 import qualified UHC.Light.Compiler.HS.ModImpExp as HSSemMod
 import UHC.Light.Compiler.CodeGen.ImportUsedModules
 import UHC.Light.Compiler.CodeGen.ModuleImportExportImpl
-import UHC.Light.Compiler.Pred.ToCHR (initCHRStore)
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR (initCHRStore)
 
 
 
diff --git a/src/UHC/Light/Compiler/Error.hs b/src/UHC/Light/Compiler/Error.hs
--- a/src/UHC/Light/Compiler/Error.hs
+++ b/src/UHC/Light/Compiler/Error.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Error.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Error.ag)
 module UHC.Light.Compiler.Error(Err (..), ErrL
 , ThingAndRange
 , ErrSq
diff --git a/src/UHC/Light/Compiler/Error/Pretty.hs b/src/UHC/Light/Compiler/Error/Pretty.hs
--- a/src/UHC/Light/Compiler/Error/Pretty.hs
+++ b/src/UHC/Light/Compiler/Error/Pretty.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Error/Pretty.a)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Error/Pretty.a)
 module UHC.Light.Compiler.Error.Pretty(ppErr, ppErrs, ppErrL
 , mkPPErr) where
 
diff --git a/src/UHC/Light/Compiler/Foreign.hs b/src/UHC/Light/Compiler/Foreign.hs
--- a/src/UHC/Light/Compiler/Foreign.hs
+++ b/src/UHC/Light/Compiler/Foreign.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Foreign.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Foreign.ag)
 module UHC.Light.Compiler.Foreign(ForeignEnt (..), CCall (..), PlainCall (..), PrimCall (..), JavaScriptCall (..)
 , ForeignExpr (..), ForeignExprs
 , ForeignExprAGItf (..), ForeignAGItf (..)
diff --git a/src/UHC/Light/Compiler/Foreign/Extract.hs b/src/UHC/Light/Compiler/Foreign/Extract.hs
--- a/src/UHC/Light/Compiler/Foreign/Extract.hs
+++ b/src/UHC/Light/Compiler/Foreign/Extract.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Foreign/Extrac)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Foreign/Extrac)
 module UHC.Light.Compiler.Foreign.Extract(ForeignExtraction (..), forextractMbEnt
 , foreignEntExtract) where
 
diff --git a/src/UHC/Light/Compiler/Foreign/Pretty.hs b/src/UHC/Light/Compiler/Foreign/Pretty.hs
--- a/src/UHC/Light/Compiler/Foreign/Pretty.hs
+++ b/src/UHC/Light/Compiler/Foreign/Pretty.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Foreign/Pretty)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Foreign/Pretty)
 module UHC.Light.Compiler.Foreign.Pretty(ppForeignEnt
 , ppForeignExpr) where
 
diff --git a/src/UHC/Light/Compiler/Gam.hs b/src/UHC/Light/Compiler/Gam.hs
--- a/src/UHC/Light/Compiler/Gam.hs
+++ b/src/UHC/Light/Compiler/Gam.hs
@@ -129,7 +129,7 @@
 {-# INLINE idQualGamReplacement #-}
 
 {-# LINE 231 "src/ehc/Gam.chs" #-}
-instance (Ord tk, Ord (SubstVarKey subst), VarUpdatable vv subst) => VarUpdatable (SGam tk vv) subst where
+instance (Ord tk, Ord (VarLookupKey subst), VarUpdatable vv subst) => VarUpdatable (SGam tk vv) subst where
   s `varUpd`  g    =   gamMapElts (s `varUpd`) g
   s `varUpdCyc` g    =   (g',varmpUnions $ gamElts gm)
               where (g',gm) = sgamUnzip $ gamMapElts (s `varUpdCyc`) g
diff --git a/src/UHC/Light/Compiler/Gam/Base.hs b/src/UHC/Light/Compiler/Gam/Base.hs
--- a/src/UHC/Light/Compiler/Gam/Base.hs
+++ b/src/UHC/Light/Compiler/Gam/Base.hs
@@ -38,7 +38,7 @@
 
 {-# LINE 51 "src/ehc/Gam/Base.chs" #-}
 emptyGam            ::            Gam k v
-gamSingleton        ::            k -> v        -> Gam k v
+gamSingleton        ::  Ord k =>  k -> v        -> Gam k v
 gamLookup           ::  Ord k =>  k -> Gam k v  -> Maybe v
 gamToAssocL         ::  Ord k =>  Gam k v       -> AssocL k v
 gamPushNew          ::            Gam k v       -> Gam k v
@@ -96,64 +96,65 @@
 {-# INLINE gamTopUpdate #-}
 
 {-# LINE 135 "src/ehc/Gam/Base.chs" #-}
-gamMetaLevSingleton                        = sgamMetaLevSingleton
+gamMetaLevSingleton :: Ord k => MetaLev -> k -> v -> Gam k v
+gamMetaLevSingleton = sgamMetaLevSingleton
 {-# INLINE gamMetaLevSingleton #-}
 
-{-# LINE 145 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 146 "src/ehc/Gam/Base.chs" #-}
 assocDupLToGam :: Ord k => AssocL k [v] -> Gam k v
 assocDupLToGam = sgamFromAssocDupL
 {-# INLINE assocDupLToGam #-}
 
-{-# LINE 151 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 152 "src/ehc/Gam/Base.chs" #-}
 assocLToGamWithDups :: Ord k => AssocL k v -> Gam k v
 assocLToGamWithDups = assocDupLToGam . assocLGroupSort
 {-# INLINE assocLToGamWithDups #-}
 
-{-# LINE 163 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 164 "src/ehc/Gam/Base.chs" #-}
 gamToAssocDupL :: Ord k => Gam k v -> AssocL k [v]
 gamToAssocDupL = sgamToAssocDupL
 {-# INLINE gamToAssocDupL #-}
 
-{-# LINE 169 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 170 "src/ehc/Gam/Base.chs" #-}
 gamToOnlyDups :: Ord k => Gam k v -> AssocL k [v]
 gamToOnlyDups g = [ x | x@(n,(_:_:_)) <- gamToAssocDupL g ]
 
-{-# LINE 179 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 180 "src/ehc/Gam/Base.chs" #-}
 gamNoDups :: Ord k => Gam k v -> Gam k v
 gamNoDups = sgamNoDups
 {-# INLINE gamNoDups #-}
 
-{-# LINE 190 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 191 "src/ehc/Gam/Base.chs" #-}
 gamMap :: (Ord k,Ord k') => ((k,v) -> (k',v')) -> Gam k v -> Gam k' v'
 gamMap = sgamMap
 {-# INLINE gamMap #-}
 
-{-# LINE 196 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 197 "src/ehc/Gam/Base.chs" #-}
 gamMapElts :: Ord k => (v -> v') -> Gam k v -> Gam k v'
 gamMapElts f = gamMap (\(n,v) -> (n,f v))
 {-# INLINE gamMapElts #-}
 
-{-# LINE 210 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 211 "src/ehc/Gam/Base.chs" #-}
 gamPartition :: Ord k => (k -> v -> Bool) -> Gam k v -> (Gam k v,Gam k v)
 gamPartition = sgamPartitionWithKey
 {-# INLINE gamPartition #-}
 
-{-# LINE 231 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 232 "src/ehc/Gam/Base.chs" #-}
 gamMapThr :: (Ord k,Ord k') => ((k,v) -> t -> ((k',v'),t)) -> t -> Gam k v -> (Gam k' v',t)
 gamMapThr = sgamMapThr
 {-# INLINE gamMapThr #-}
 
-{-# LINE 237 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 238 "src/ehc/Gam/Base.chs" #-}
 gamKeys :: Ord k => Gam k v -> [k]
 gamKeys = assocLKeys . gamToAssocL
 {-# INLINE gamKeys #-}
 
-{-# LINE 243 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 244 "src/ehc/Gam/Base.chs" #-}
 gamElts :: Ord k => Gam k v -> [v]
 gamElts = assocLElts . gamToAssocL
 {-# INLINE gamElts #-}
 
-{-# LINE 254 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 255 "src/ehc/Gam/Base.chs" #-}
 gamLookupMetaLevDup :: Ord k => MetaLev -> k -> Gam k v -> Maybe [v]
 gamLookupMetaLevDup = sgamLookupMetaLevDup
 {-# INLINE gamLookupMetaLevDup #-}
@@ -162,12 +163,12 @@
 gamLookupDup = gamLookupMetaLevDup metaLevVal
 {-# INLINE gamLookupDup #-}
 
-{-# LINE 271 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 272 "src/ehc/Gam/Base.chs" #-}
 gamUnzip :: Ord k => Gam k (v1,v2) -> (Gam k v1,Gam k v2)
 gamUnzip g = sgamUnzip g
 {-# INLINE gamUnzip #-}
 
-{-# LINE 281 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 282 "src/ehc/Gam/Base.chs" #-}
 gamInsert :: Ord k => k -> v -> Gam k v -> Gam k v
 gamInsert = gamAdd
 {-# INLINE gamInsert #-}
@@ -180,12 +181,12 @@
 gamFromAssocL = assocLToGam
 {-# INLINE gamFromAssocL #-}
 
-{-# LINE 295 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 296 "src/ehc/Gam/Base.chs" #-}
 gamUnionWith :: Ord k => (v -> [v] -> [v]) -> Gam k v -> Gam k v -> Gam k v
 gamUnionWith cmb = sgamUnionWith (Just cmb)
 {-# INLINE gamUnionWith #-}
 
-{-# LINE 301 "src/ehc/Gam/Base.chs" #-}
+{-# LINE 302 "src/ehc/Gam/Base.chs" #-}
 gamUnions :: Ord k => [Gam k v] -> Gam k v
 gamUnions [] = emptyGam
 gamUnions gs = foldr1 gamUnion gs
diff --git a/src/UHC/Light/Compiler/Gam/ClassDefaultGam.hs b/src/UHC/Light/Compiler/Gam/ClassDefaultGam.hs
--- a/src/UHC/Light/Compiler/Gam/ClassDefaultGam.hs
+++ b/src/UHC/Light/Compiler/Gam/ClassDefaultGam.hs
@@ -33,10 +33,9 @@
 {-# LINE 53 "src/ehc/Gam/ClassDefaultGam.chs" #-}
 -- | Lookup a matching default for a predicate
 clDfGamLookupDefault
-  :: ( VarLookup gm TyVarId VarMpInfo
-     -- , VarLookup gm Ty VarMpInfo
+  :: ( VarLookup gm
      , VarLookupCmb VarMp gm
-     , SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo
+     , VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo
      )
      => FIIn' gm -> Pred -> ClassDefaultGam
      -> Maybe VarMp
@@ -49,7 +48,7 @@
         where mbConArgs@(~(Just (nm,args))) = appMbConApp t
       _ -> Nothing
 
-{-# LINE 77 "src/ehc/Gam/ClassDefaultGam.chs" #-}
+{-# LINE 76 "src/ehc/Gam/ClassDefaultGam.chs" #-}
 instance Serialize ClassDefaultGamInfo where
   sput (ClassDefaultGamInfo a) = sput a
   sget = liftM ClassDefaultGamInfo sget
diff --git a/src/UHC/Light/Compiler/HI.hs b/src/UHC/Light/Compiler/HI.hs
--- a/src/UHC/Light/Compiler/HI.hs
+++ b/src/UHC/Light/Compiler/HI.hs
@@ -25,8 +25,8 @@
 import UHC.Light.Compiler.LamInfo
 import UHC.Light.Compiler.Config
 import UHC.Light.Compiler.Module.ImportExport
-import UHC.Light.Compiler.Pred.ToCHR
-import UHC.Light.Compiler.CHR.Solve
+import UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
 import qualified UHC.Light.Compiler.Gam.ClGam as Pr
 import qualified Data.Set as Set
 import qualified Data.Map as Map
diff --git a/src/UHC/Light/Compiler/HS.hs b/src/UHC/Light/Compiler/HS.hs
--- a/src/UHC/Light/Compiler/HS.hs
+++ b/src/UHC/Light/Compiler/HS.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/HS.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/HS.ag)
 module UHC.Light.Compiler.HS(module UU.Scanner.Position
 , AGItf (..), Module (..), Body (..), Declaration (..), Declarations, MaybeDeclarations, Type (..), Types, MaybeType, Expression (..), Expressions, MaybeExpression, FunctionBinding (..), FunctionBindings, LeftHandSide (..), RightHandSide (..), Pattern (..), Patterns, Literal (..), Name, Names, MaybeName, MaybeNames, Strings, Range (..), Fixity (..)
 , TypeAnnotation (..), ExpressionAnnotation (..), PatternAnnotation (..)
@@ -315,6 +315,7 @@
             | Pragma_OptionsUHC {range_Pragma_OptionsUHC :: !(Range),options_Pragma_OptionsUHC :: !(String)}
             | Pragma_Derivable {range_Pragma_Derivable :: !(Range),className_Pragma_Derivable :: !(Name),fieldName_Pragma_Derivable :: !(Name),defaultName_Pragma_Derivable :: !(Name)}
             | Pragma_ExcludeIfTarget {range_Pragma_ExcludeIfTarget :: !(Range),targetNames_Pragma_ExcludeIfTarget :: !(([String]))}
+            | Pragma_CHR {range_Pragma_CHR :: !(Range),chrRules_Pragma_CHR :: !(String)}
 -- Pragmas -----------------------------------------------------
 type Pragmas = [Pragma]
 -- Qualifier ---------------------------------------------------
diff --git a/src/UHC/Light/Compiler/HS/MainAG.hs b/src/UHC/Light/Compiler/HS/MainAG.hs
--- a/src/UHC/Light/Compiler/HS/MainAG.hs
+++ b/src/UHC/Light/Compiler/HS/MainAG.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/HS/MainAG.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/HS/MainAG.ag)
 module UHC.Light.Compiler.HS.MainAG(Inh_AGItf (..), Syn_AGItf (..), sem_AGItf, wrap_AGItf
 , tyGam2IdDefOccGam, kiGam2IdDefOccGam
 , clGam2IdDefOccGam) where
@@ -25060,10 +25060,10 @@
               _bodyItopInstanceNmL :: ([HsName])
               _bodyItrpp :: TrPP
               _bodyIundefOccGam :: IdUseOccGam
-              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 23, column 9)
+              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 27, column 9)
               _fileHeaderPragmas =
                   _fileheaderpragmasIgathPragmas
-              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 23, column 9)
+              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 27, column 9)
               _opts =
                   fst $ ehcOptUpdateWithPragmas _fileHeaderPragmas _lhsIopts
               -- "build/103/lib-ehc/UHC/Light/Compiler/HS/ExtraChecks.ag"(line 3, column 9)
@@ -27998,6 +27998,9 @@
          visit 0:
             local targets     : _
             local pp          : _
+      alternative CHR:
+         child range          : {Range}
+         child chrRules       : {String}
 -}
 -- cata
 sem_Pragma :: Pragma ->
@@ -28010,6 +28013,8 @@
     (sem_Pragma_Derivable _range _className _fieldName _defaultName)
 sem_Pragma (Pragma_ExcludeIfTarget _range _targetNames) =
     (sem_Pragma_ExcludeIfTarget _range _targetNames)
+sem_Pragma (Pragma_CHR _range _chrRules) =
+    (sem_Pragma_CHR _range _chrRules)
 -- semantic domain
 type T_Pragma = UID ->
                 IdDefOccGam ->
@@ -28215,6 +28220,54 @@
               -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Pretty.ag"(line 1, column 27)
               _lhsOpp =
                   _pp
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Pretty.ag"(line 3, column 31)
+              _lhsOppWrap =
+                  const empty
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Trace.ag"(line 1, column 29)
+              _lhsOtrpp =
+                  trppEmpty
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/NameAnalysis.ag"(line 842, column 30)
+              _lhsOundefOccGam =
+                  emptyGam
+              -- copy rule (chain)
+              _lhsOgUniq =
+                  _lhsIgUniq
+              -- copy rule (chain)
+              _lhsOtopInstanceNmL =
+                  _lhsItopInstanceNmL
+          in  ( _lhsOerrSq,_lhsOgUniq,_lhsOgathPragmas,_lhsOidUseOccGam,_lhsOpp,_lhsOppWrap,_lhsOtopInstanceNmL,_lhsOtrpp,_lhsOundefOccGam)))
+sem_Pragma_CHR :: Range ->
+                  String ->
+                  T_Pragma
+sem_Pragma_CHR range_ chrRules_ =
+    (\ _lhsIgUniq
+       _lhsIidGam
+       _lhsInmLev
+       _lhsIopts
+       _lhsIpatchEhNmInInstance
+       _lhsItopInstanceNmL
+       _lhsItr ->
+         (let _lhsOerrSq :: ErrSq
+              _lhsOgathPragmas :: (Set.Set Pragma.Pragma)
+              _lhsOidUseOccGam :: IdUseOccGam
+              _lhsOpp :: PP_Doc
+              _lhsOppWrap :: (PP_Doc -> PP_Doc)
+              _lhsOtrpp :: TrPP
+              _lhsOundefOccGam :: IdUseOccGam
+              _lhsOgUniq :: UID
+              _lhsOtopInstanceNmL :: ([HsName])
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/GatherError.ag"(line 1, column 30)
+              _lhsOerrSq =
+                  Seq.empty
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 1, column 49)
+              _lhsOgathPragmas =
+                  Set.empty
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/NameAnalysis.ag"(line 550, column 30)
+              _lhsOidUseOccGam =
+                  emptyGam
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Pretty.ag"(line 1, column 27)
+              _lhsOpp =
+                  empty
               -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Pretty.ag"(line 3, column 31)
               _lhsOppWrap =
                   const empty
diff --git a/src/UHC/Light/Compiler/HS/ModImpExp.hs b/src/UHC/Light/Compiler/HS/ModImpExp.hs
--- a/src/UHC/Light/Compiler/HS/ModImpExp.hs
+++ b/src/UHC/Light/Compiler/HS/ModImpExp.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/HS/ModImpExp.a)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/HS/ModImpExp.a)
 module UHC.Light.Compiler.HS.ModImpExp(Inh_AGItf (..), Syn_AGItf (..), sem_AGItf, wrap_AGItf) where
 
 import UHC.Light.Compiler.Base.HsName.Builtin
@@ -9502,10 +9502,10 @@
               _bodyImodHideDefsRel :: ModEntRel
               _bodyImodImpL :: ([ModImp])
               _bodyItopInstanceNmL :: ([HsName])
-              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 23, column 9)
+              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 27, column 9)
               _fileHeaderPragmas =
                   _fileheaderpragmasIgathPragmas
-              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 23, column 9)
+              -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 27, column 9)
               _opts =
                   fst $ ehcOptUpdateWithPragmas _fileHeaderPragmas _lhsIopts
               -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Module.ag"(line 46, column 9)
@@ -10807,6 +10807,9 @@
          child targetNames    : {[String]}
          visit 0:
             local targets     : _
+      alternative CHR:
+         child range          : {Range}
+         child chrRules       : {String}
 -}
 -- cata
 sem_Pragma :: Pragma ->
@@ -10819,6 +10822,8 @@
     (sem_Pragma_Derivable _range _className _fieldName _defaultName)
 sem_Pragma (Pragma_ExcludeIfTarget _range _targetNames) =
     (sem_Pragma_ExcludeIfTarget _range _targetNames)
+sem_Pragma (Pragma_CHR _range _chrRules) =
+    (sem_Pragma_CHR _range _chrRules)
 -- semantic domain
 type T_Pragma = UID ->
                 NmLev ->
@@ -10908,6 +10913,26 @@
               -- "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 19, column 9)
               _lhsOgathPragmas =
                   Set.singleton (Pragma.Pragma_ExcludeIfTarget _targets)
+              -- copy rule (chain)
+              _lhsOgUniq =
+                  _lhsIgUniq
+              -- copy rule (chain)
+              _lhsOtopInstanceNmL =
+                  _lhsItopInstanceNmL
+          in  ( _lhsOgUniq,_lhsOgathPragmas,_lhsOtopInstanceNmL)))
+sem_Pragma_CHR :: Range ->
+                  String ->
+                  T_Pragma
+sem_Pragma_CHR range_ chrRules_ =
+    (\ _lhsIgUniq
+       _lhsInmLev
+       _lhsItopInstanceNmL ->
+         (let _lhsOgathPragmas :: (Set.Set Pragma.Pragma)
+              _lhsOgUniq :: UID
+              _lhsOtopInstanceNmL :: ([HsName])
+              -- use rule "build/103/lib-ehc/UHC/Light/Compiler/HS/Pragmas.ag"(line 1, column 49)
+              _lhsOgathPragmas =
+                  Set.empty
               -- copy rule (chain)
               _lhsOgUniq =
                   _lhsIgUniq
diff --git a/src/UHC/Light/Compiler/HS/Parser.hs b/src/UHC/Light/Compiler/HS/Parser.hs
--- a/src/UHC/Light/Compiler/HS/Parser.hs
+++ b/src/UHC/Light/Compiler/HS/Parser.hs
@@ -89,6 +89,8 @@
           <$> pEXCLUDEIFTARGET_prag  <*> pList1Sep pCOMMA (pList1 (conid <|> varid))
       <|> (\t targ r -> mk r $ Pragma_OptionsUHC (mkRange1 t) (tokMkStr targ))
           <$> pOPTIONSUHC_prag  <*> pStringTk
+      <|> (\t targ r -> mk r $ Pragma_CHR (mkRange1 t) (tokMkStr targ))
+          <$> pCHR_prag <*> pStringTk
       )
 
 pPragma :: HSParser Pragma
@@ -99,7 +101,7 @@
   = pPragma' Declaration_Pragma
 
 
-{-# LINE 148 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 150 "src/ehc/HS/Parser.chs" #-}
 pModule :: EHCOpts -> (EHCOpts -> (HSParser2 Declaration) -> HSParser Body) -> HSParser Module
 pModule opts pBody
   = pList_gr pPragma
@@ -108,7 +110,7 @@
          )
   <?> "pModule"
 
-{-# LINE 174 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 176 "src/ehc/HS/Parser.chs" #-}
 pImportExport :: (Range -> Name -> ie,Range -> Name -> MaybeNames -> ie,Range -> Name -> ie) -> HSParser ie
 pImportExport (sem_Var,sem_tOrC,sem_tOrC_complete)
   =   mkRngNm sem_Var <$> qvar
@@ -121,7 +123,7 @@
            )
   <?> "pImportExport"
 
-{-# LINE 188 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 190 "src/ehc/HS/Parser.chs" #-}
 pExport :: HSParser Export
 pExport
   =   (\t m -> Export_Module (mkRange1 t) (tokMkQName m)) <$> pMODULE <*> modid
@@ -134,7 +136,7 @@
   <|> pSucceed Nothing
   <?> "pMaybeExports"
 
-{-# LINE 202 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 204 "src/ehc/HS/Parser.chs" #-}
 pImport :: HSParser Import
 pImport
   =   pImportExport (Import_Variable,Import_TypeOrClass,Import_TypeOrClassComplete)
@@ -154,7 +156,7 @@
             <**> pParens'
                    ((\i r h -> ImportSpecification_Import r h i) <$> pListSep_ng pCOMMA pImport <* pMb pCOMMA)
 
-{-# LINE 227 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 229 "src/ehc/HS/Parser.chs" #-}
 pLayoutList :: HSParser d -> HSParser [d]
 pLayoutList pD
   =   pBlock pOCURLY pSEMI pCCURLY pD
@@ -164,17 +166,17 @@
   =   pBlock1 pOCURLY pSEMI pCCURLY pD
 
 
-{-# LINE 242 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 244 "src/ehc/HS/Parser.chs" #-}
 pBodyImport :: EHCOpts -> HSParser Body
 pBodyImport opts
   =   (\d -> Body_Body emptyRange d []) <$> pLayoutList pImportDeclaration
   <?> "pBodyImport"
 
-{-# LINE 249 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 251 "src/ehc/HS/Parser.chs" #-}
 pBody :: EHCOpts -> HSParser Body
 pBody opts = pBody' opts id
 
-{-# LINE 254 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 256 "src/ehc/HS/Parser.chs" #-}
 pBody' :: EHCOpts -> (HSParser2 Declaration) -> HSParser Body
 pBody' opts addDecl
   =   (\ids -> let (i,d) = foldr cmbid ([],[]) ids in Body_Body emptyRange i d)
@@ -194,7 +196,7 @@
         cmbid ([i],_) (is,ds) = (i:is,ds)
         cmbid (_,[d]) (_ ,ds) = ([],d:ds)
 
-{-# LINE 286 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 288 "src/ehc/HS/Parser.chs" #-}
         pDeclaration :: HSParser Declaration
         pDeclaration
           =   pDeclarationValue
@@ -207,7 +209,7 @@
           <|> pDeclarationConversion
           <?> "pDeclaration"
 
-{-# LINE 310 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 312 "src/ehc/HS/Parser.chs" #-}
         pTopDeclaration :: HSParser Declaration
         pTopDeclaration
           =   pDeclaration
@@ -217,7 +219,7 @@
           <|> pDeclarationDefault
           <?> "pTopDeclaration"
 
-{-# LINE 325 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 327 "src/ehc/HS/Parser.chs" #-}
         pDeclarations :: HSParser Declarations
         pDeclarations
           =   pLayoutList pDeclaration
@@ -226,7 +228,7 @@
         pDeclarations1
           =   pLayoutList1 pDeclaration
 
-{-# LINE 335 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 337 "src/ehc/HS/Parser.chs" #-}
         pWhere :: HSParser d -> HSParser [d]
         pWhere pD = pWHERE *> pLayoutList pD
 
@@ -236,7 +238,7 @@
         pWhereMbDecls :: HSParser MaybeDeclarations
         pWhereMbDecls = pWhereMb pDeclaration
 
-{-# LINE 350 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 352 "src/ehc/HS/Parser.chs" #-}
         pDeclarationFixity :: HSParser Declaration
         pDeclarationFixity
           = (\f p os@(o:_) -> Declaration_Fixity (mkRange1 o) f p (tokMkQNames os))
@@ -247,7 +249,7 @@
         pFixity :: HSParser' Fixity
         pFixity = Fixity_Infixl <$ pINFIXL <|> Fixity_Infixr <$ pINFIXR <|> Fixity_Infix <$ pINFIX
 
-{-# LINE 366 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 368 "src/ehc/HS/Parser.chs" #-}
         pDeclarationTypeSignature :: HSParser Declaration
         pDeclarationTypeSignature
           =   (\(v:vs) t -> Declaration_TypeSignature (mkRange1 v) (tokMkQNames (v:vs)) t)
@@ -291,7 +293,7 @@
                 mkTyPat (Just (tok,ty),rhs) = (\p -> Pattern_Typed      (mkRange1 tok) p ty,rhs)
                 mkTyPat (_            ,rhs) = (id                                          ,rhs)
 
-{-# LINE 421 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 423 "src/ehc/HS/Parser.chs" #-}
         pDeclarationSimpleValue :: HSParser Declaration
         pDeclarationSimpleValue
           =   Declaration_PatternBinding emptyRange <$> lhs <*> rhs
@@ -299,7 +301,7 @@
           where lhs = mkRngNm Pattern_Variable <$> var
                 rhs = (\t e -> RightHandSide_Expression (mkRange1 t) e Nothing) <$> pEQUAL <*> pExpression
 
-{-# LINE 430 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 432 "src/ehc/HS/Parser.chs" #-}
         pRhs :: HSParser Token -> HSParser RightHandSide
         pRhs pSep
           =   (RightHandSide_Expression . mkRange1) <$> pSep <*> pExpression <*> pWhereMbDecls
@@ -308,14 +310,14 @@
               <*> pWhereMbDecls
           <?> "pRhs"
 
-{-# LINE 442 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 444 "src/ehc/HS/Parser.chs" #-}
         pDeclarationKindSignature :: HSParser Declaration
         pDeclarationKindSignature
           =   (\(v:vs) t -> Declaration_KindSignature (mkRange1 v) (tokMkQNames (v:vs)) t)
               <$> pList1Sep pCOMMA con <* pDCOLON <*> pKind
           <?> "pDeclarationKindSignature"
 
-{-# LINE 454 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 456 "src/ehc/HS/Parser.chs" #-}
         pDeclarationData :: HSParser Declaration
         pDeclarationData
           =   pDATA
@@ -345,42 +347,42 @@
                 pDer :: HSParser [Deriving]
                 pDer = pDERIVING *> ((:[]) <$> pDeriving <|> pParens (pListSep pCOMMA pDeriving)) <|> pSucceed []
 
-{-# LINE 507 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 509 "src/ehc/HS/Parser.chs" #-}
         pDeriving :: HSParser Deriving
         pDeriving
           = (\(n,u) t -> Deriving_Deriving (mkRange1 t) n u (tokMkQName t)) <$> pInstanceNameMb <*> qconid
 
-{-# LINE 513 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 515 "src/ehc/HS/Parser.chs" #-}
         pConstructor :: HSParser Constructor
         pConstructor
           =   con
               <**> (   (\ts c -> mkRngNm Constructor_Constructor c ts) <$> pList pTB
-{-# LINE 519 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 521 "src/ehc/HS/Parser.chs" #-}
                    <|> pCurlys' ((\fs r c -> mkRngNm Constructor_Record c fs) <$> pListSep pCOMMA pFieldDeclaration)
-{-# LINE 522 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 524 "src/ehc/HS/Parser.chs" #-}
                    )
           <|> (\l o r -> Constructor_Infix (mkRange1 o) l (tokMkQName o) r) <$> pT <*> conop <*> pT
           where pT  = pAnnotatedType pType
                 pTB = pAnnotatedType pTypeBase
 
-{-# LINE 529 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 531 "src/ehc/HS/Parser.chs" #-}
         pContextedConstructor :: HSParser Constructor
         pContextedConstructor
           =   Constructor_Contexted emptyRange <$> pContextItemsPrefix <*> pConstructor
           <|> pConstructor
 
-{-# LINE 536 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 538 "src/ehc/HS/Parser.chs" #-}
         pGADTConstructor :: HSParser Constructor
         pGADTConstructor
           =   mkRngNm Constructor_GADTFunction <$> con <* pDCOLON <*> pType
 
-{-# LINE 542 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 544 "src/ehc/HS/Parser.chs" #-}
         pFieldDeclaration :: HSParser FieldDeclaration
         pFieldDeclaration
           = (\vs@(v:_) -> FieldDeclaration_FieldDeclaration (mkRange1 v) (tokMkQNames vs))
             <$> pList1Sep pCOMMA var <* pDCOLON <*> pAnnotatedType pType
 
-{-# LINE 553 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 555 "src/ehc/HS/Parser.chs" #-}
         pDeclarationForeign :: HSParser Declaration
         pDeclarationForeign
           = pFOREIGN
@@ -392,7 +394,7 @@
           where pSafety =  (Just . tokMkStr) <$> safety <|> pSucceed Nothing
                 pFSpec = (,,) <$> ((Just . tokMkStr) <$> pStringTk <|> pSucceed Nothing) <*> var{-id_no_foreign-} <* pDCOLON <*> pType
 
-{-# LINE 572 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 574 "src/ehc/HS/Parser.chs" #-}
         pDeclarationClass :: HSParser Declaration
         pDeclarationClass
           = (\t -> Declaration_Class (mkRange1 t))
@@ -407,7 +409,7 @@
                   = (\vs1@(v:_) vs2 -> FunctionalDependency_Dependency (mkRange1 v) (tokMkQNames vs1) (tokMkQNames vs2))
                     <$> pList1 tyvar <* pRARROW <*> pList1 tyvar
 
-{-# LINE 592 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 594 "src/ehc/HS/Parser.chs" #-}
         pInstanceName :: HSParser (Maybe HsName,Bool)
         pInstanceName
           =   (if ehcOptIsUnderDev UnderDev_NamedInst opts
@@ -420,7 +422,7 @@
           =   pInstanceName
           <|> pSucceed (Nothing,True)
 
-{-# LINE 606 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 608 "src/ehc/HS/Parser.chs" #-}
         pDeclarationInstance :: HSParser Declaration
         pDeclarationInstance
           =   pINSTANCE
@@ -456,7 +458,7 @@
           where pHeader = (,,) <$> pInstanceNameMb <*> pContextItemsPrefixOpt <*> pHeaderTy
                 pHeaderTy = pType' pTypeOpBase (\_ p -> p)
 
-{-# LINE 645 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 647 "src/ehc/HS/Parser.chs" #-}
         pDeclarationDefault :: HSParser Declaration
         pDeclarationDefault
           = (Declaration_Default . mkRange1) <$> pDEFAULT <*> pMb (tokMkQName <$> qtyconid)
@@ -464,12 +466,12 @@
                 <|> pParens (pListSep pCOMMA pTypeBase)
                 )
 
-{-# LINE 658 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 660 "src/ehc/HS/Parser.chs" #-}
         pDeclarationType :: HSParser Declaration
         pDeclarationType
           =   (Declaration_Type . mkRange1) <$> pTYPE <*> pTypeLeftHandSide <* pEQUAL <*> pType
 
-{-# LINE 669 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 671 "src/ehc/HS/Parser.chs" #-}
 
         pDeclarationFusion :: HSParser Declaration
         pDeclarationFusion
@@ -479,7 +481,7 @@
         pDeclarationConversion
           = (Declaration_FusionConversion . mkRange1) <$> pCONVERT <*> (tokMkQName <$> qvar) <* pCOMMA <*> (tokMkQName <$> qvar)
 
-{-# LINE 685 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 687 "src/ehc/HS/Parser.chs" #-}
         pKindBase :: HSParser Kind
         pKindBase
           =   mkRngNm Kind_Constructor <$> pSTAR
@@ -512,7 +514,7 @@
           =  ((Kind_Forall . mkRange1) <$> pFORALL)
              <*> (tokMkQNames <$> pTyVarBinds) <* pDOT
 
-{-# LINE 723 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 725 "src/ehc/HS/Parser.chs" #-}
         pTypeBaseCon :: HSParser Type
         pTypeBaseCon
           =   mkRngNm Type_Constructor <$> gtycon_no_delims_commas
@@ -570,7 +572,7 @@
                            )
                        <*  pVBAR <*> pFlds
 
-{-# LINE 813 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 815 "src/ehc/HS/Parser.chs" #-}
         pType' :: HSParser (Type,Range) -> (HSParser Type -> HSParser (Type,Int) -> HSParser (Type,Int)) -> HSParser Type
         pType' pOp extend
           = pT'
@@ -586,7 +588,7 @@
                 mkT (e,0) =  e
                 mkT (e,_) =  Type_InfixApplicationChainTop emptyRange e
 
-{-# LINE 834 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 836 "src/ehc/HS/Parser.chs" #-}
         pType ::  HSParser Type
         pType
           = pType'
@@ -611,53 +613,53 @@
                 mkT (e,_) =  Type_InfixApplicationChainTop emptyRange e
 -}
 
-{-# LINE 868 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 870 "src/ehc/HS/Parser.chs" #-}
         pTypeQuantPrefix :: HSParser (Type -> Type)
         pTypeQuantPrefix
           =  ((Type_Forall . mkRange1) <$> pFORALL <|> (Type_Exists . mkRange1) <$> pEXISTS)
              <*> (tokMkQNames <$> pTyVarBinds) <* pDOT
 
-{-# LINE 875 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 877 "src/ehc/HS/Parser.chs" #-}
         pTypeOpPrefix :: HSParser (Type -> Type)
         pTypeOpPrefix
           =   (\l (op,rng) r -> Type_InfixApplication rng l op r) <$> pTypeApp <*> pTypeOp
           <|> (\c -> Type_Qualified emptyRange [c]) <$> pContextItemImpl <* pRARROW
 
-{-# LINE 884 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 886 "src/ehc/HS/Parser.chs" #-}
         pTypeOp :: HSParser (Type,Range)
         pTypeOp
           =   pTypeOpBaseEq
           <|> mkRngNm' Type_Variable    <$> varop_no_ty
           <|> mkRngNm' Type_Constructor <$> pDARROW
 
-{-# LINE 896 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 898 "src/ehc/HS/Parser.chs" #-}
         pTypeOpBase :: HSParser (Type,Range)
         pTypeOpBase
           = mkRngNm' Type_Constructor
             <$> (   gtycon_for_insection
                 )
 
-{-# LINE 904 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 906 "src/ehc/HS/Parser.chs" #-}
         pTypeOpBaseEq :: HSParser (Type,Range)
         pTypeOpBaseEq
           =   pTypeOpBase
           <|> mkRngNm' Type_Constructor <$> pTILDE
 
-{-# LINE 917 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 919 "src/ehc/HS/Parser.chs" #-}
         pTypeApp :: HSParser Type
         pTypeApp
           =  pT <??> pA
           where pT = pTypeBase
                 pA = (\es e -> Type_NormalApplication emptyRange e es) <$> pList1 pT
 
-{-# LINE 925 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 927 "src/ehc/HS/Parser.chs" #-}
         pTyVarBind :: HSParser Token
         pTyVarBind =  tyvar
 
         pTyVarBinds :: HSParser [Token]
         pTyVarBinds =  pList1 pTyVarBind
 
-{-# LINE 939 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 941 "src/ehc/HS/Parser.chs" #-}
         pTypeLeftHandSide :: HSParser TypeLeftHandSide
         pTypeLeftHandSide
           =   pLhs
@@ -675,7 +677,7 @@
                 pLhsTail ::  HSParser [TypePattern]
                 pLhsTail =   pList1 pTypePatternBase
 
-{-# LINE 958 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 960 "src/ehc/HS/Parser.chs" #-}
         pAnnotatedType :: HSParser Type -> HSParser Type
         pAnnotatedType pT
           =   (\(r,s) t -> if s
@@ -685,7 +687,7 @@
               <$> ((\t -> (mkRange1 t,True)) <$> pBANG <|> pSucceed (emptyRange,False))
               <*> pT
 
-{-# LINE 981 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 983 "src/ehc/HS/Parser.chs" #-}
         pContextItemsPrefix1 :: HSParser ContextItems
         pContextItemsPrefix1
           =   (:[]) <$> pContextItemImpl <* pRARROW
@@ -716,17 +718,17 @@
         pTypeContextPrefix
           = Type_Qualified emptyRange <$> pContextItemsPrefix
 
-{-# LINE 1017 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1019 "src/ehc/HS/Parser.chs" #-}
         pContextItemClass :: HSParser ContextItem
         pContextItemClass
           =    mkRngNm ContextItem_Class <$> qconid <*> pList1 pTypeBase
 
-{-# LINE 1023 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1025 "src/ehc/HS/Parser.chs" #-}
         pContextItemPrefix :: HSParser (ContextItem -> ContextItem)
         pContextItemPrefix
           =   (ContextItem_Forall . mkRange1) <$> pFORALL <*> (tokMkQNames <$> pTyVarBinds) <* pDOT
 
-{-# LINE 1029 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1031 "src/ehc/HS/Parser.chs" #-}
         pContextItem :: HSParser ContextItem
         pContextItem
           =   pContextItemBase
@@ -735,11 +737,11 @@
                    )
           <|> pContextItemPrefix <*> pContextItem
 
-{-# LINE 1043 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1045 "src/ehc/HS/Parser.chs" #-}
         pContextItemImplWild :: HSParser ContextItem
         pContextItemImplWild = (ContextItem_Implicits . mkRange1) <$> pTDOT
 
-{-# LINE 1048 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1050 "src/ehc/HS/Parser.chs" #-}
         pContextItemImpl :: HSParser ContextItem
         pContextItemImpl
           = pImpls'
@@ -747,7 +749,7 @@
               <|>  pSucceed ContextItem_NoImplicits
               )
 
-{-# LINE 1057 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1059 "src/ehc/HS/Parser.chs" #-}
         pContextItemBase ::   HSParser ContextItem
         pContextItemBase
           =   pContextItemClass
@@ -755,7 +757,7 @@
                                <$ pLAM <*> pSelector
                           )
 
-{-# LINE 1081 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1083 "src/ehc/HS/Parser.chs" #-}
         pLiteralNumber :: HSParser Literal
         pLiteralNumber
           =   mk  8 <$> pInteger8Tk
@@ -764,7 +766,7 @@
           <?> "pLiteralNumber"
           where mk b t = Literal_Int (mkRange1 t) b (tokMkStr t)
 
-{-# LINE 1097 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1099 "src/ehc/HS/Parser.chs" #-}
         pLiteral :: HSParser Literal
         pLiteral
           =   pLiteralNumber
@@ -773,7 +775,7 @@
           <|> mkRngStr Literal_Float  <$> pFractionTk
           <?> "pLiteral"
 
-{-# LINE 1115 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1117 "src/ehc/HS/Parser.chs" #-}
         pExpressionMinusPrefix :: HSParser (Expression -> Expression)
         pExpressionMinusPrefix
           =   (Expression_Negate . mkRange1) <$> pMINUS
@@ -857,7 +859,7 @@
                                    )
                                <*  pVBAR <*> pFlds
 
-{-# LINE 1219 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1221 "src/ehc/HS/Parser.chs" #-}
         pExpressionList :: HSParser Expression
         pExpressionList
           = pBracks'
@@ -889,7 +891,7 @@
                   <|> (Qualifier_Let . mkRange1) <$> pLET <*> pDeclarations
                   <|> Qualifier_Generator emptyRange <$> pPattern <* pLARROW <*> pExpression
 
-{-# LINE 1259 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1261 "src/ehc/HS/Parser.chs" #-}
         pExpressionDo :: HSParser Expression
         pExpressionDo
           =   (Expression_Do . mkRange1) <$> pDO <*> pBlock1 pOCURLY pSEMI pCCURLY pStatement
@@ -901,7 +903,7 @@
                       -- common prefix with 'let x=e in e' dies out
                   <|> (Statement_Let . mkRange1) <$> pLET <*> pDeclarations
 
-{-# LINE 1307 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1309 "src/ehc/HS/Parser.chs" #-}
         pExpressionConUpd :: HSParser Expression
         pExpressionConUpd
           =   qcon
@@ -914,13 +916,13 @@
           where pU =   pCurlys' ((\bs r e -> Expression_RecordUpdate r e bs) <$> pList1Sep pCOMMA pRecordExpressionBinding)
                    <|> pRowRecordSelectionSuffix
 
-{-# LINE 1327 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1329 "src/ehc/HS/Parser.chs" #-}
         pRecordExpressionBinding :: HSParser RecordExpressionBinding
         pRecordExpressionBinding
           =   mkRngNm RecordExpressionBinding_Binding <$> qvar <* pEQUAL <*> pExpression
           <?> "pRecordExpressionBinding"
 
-{-# LINE 1334 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1336 "src/ehc/HS/Parser.chs" #-}
         pExpressionApp :: HSParser Expression
         pExpressionApp
           =   pE <**> ((\as e -> foldl (flip ($)) e as) <$> pList pA)
@@ -934,7 +936,7 @@
                            else (\e c r -> ContextedExpression_Contexted r e c) <$> pExpression  <* pLTCOLON <*> pContextItem
                          pContextedExpression :: HSParser (Range -> ContextedExpression)
 
-{-# LINE 1353 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1355 "src/ehc/HS/Parser.chs" #-}
         pExpressionLayout :: HSParser Expression
         pExpressionLayout
           =   pMaybe id id pExpressionMinusPrefix <*> pExpressionApp
@@ -942,12 +944,12 @@
           <|> pExpressionDo
           <?> "pExpressionLayout"
 
-{-# LINE 1366 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1368 "src/ehc/HS/Parser.chs" #-}
         pOp, pOpm :: HSParser (Expression,Range)
         pOp  = mkRngNm' Expression_Variable <$> qvarop          <|> mkRngNm' Expression_Constructor <$> qconop
         pOpm = mkRngNm' Expression_Variable <$> qvarop_no_minus <|> mkRngNm' Expression_Constructor <$> qconop
 
-{-# LINE 1372 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1374 "src/ehc/HS/Parser.chs" #-}
         pExpression4'' :: Bool -> HSParser (Expression,Range) -> HSParser (Expression -> Expression) -> HSParser Expression -> HSParser Expression4
         pExpression4'' inParen pOp pPreNotOp pBase
           =   ((\(e,cnt,res) -> (mkC cnt e,0,res)) <$> pE)
@@ -993,7 +995,7 @@
         pExpression4' :: HSParser (Expression -> Expression) -> HSParser Expression
         pExpression4' pPreNotOp = (\(e,_,_) -> e) <$> pExpression4'' False pOp pPreNotOp pExpressionLayout
 
-{-# LINE 1419 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1421 "src/ehc/HS/Parser.chs" #-}
         pExpressionPreBase :: HSParser Expression
         pExpressionPreBase = (\ps e -> foldr ($) e ps) <$> pList_gr pExpressionPrefix <*> pExpressionLayout
 
@@ -1005,7 +1007,7 @@
           = pExpression4' pExpressionPrefix
             <?> "pExpression"
 
-{-# LINE 1432 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1434 "src/ehc/HS/Parser.chs" #-}
         pExpressionNoLet :: HSParser Expression
         pExpressionNoLet
           -- =   pExpression' pExpressionNoLetPrefix
@@ -1016,7 +1018,7 @@
           where pBase3 :: HSParser Expression
                 pBase3 = (\ps e -> foldr ($) e ps) <$> pList pExpressionNoLetPrefix <*> pExpressionLayout
 
-{-# LINE 1444 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1446 "src/ehc/HS/Parser.chs" #-}
         pExpressionLetPrefix :: HSParser (Expression -> Expression)
         pExpressionLetPrefix
           =   (\(s,t,d) -> Expression_Let (mkRange1 t) s d)
@@ -1025,7 +1027,7 @@
                   )
           <?> "pExpressionLetPrefix"
 
-{-# LINE 1460 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1462 "src/ehc/HS/Parser.chs" #-}
         pExpressionNoLetPrefix :: HSParser (Expression -> Expression)
         pExpressionNoLetPrefix
           =   pLAM <**> pLamArgs
@@ -1044,14 +1046,14 @@
                   else (\p c r -> ContextedPattern_Contexted r p c) <$> pPattern     <* pLTCOLON <*> pContextItem
                 pContextedPattern :: HSParser (Range -> ContextedPattern)
 
-{-# LINE 1486 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1488 "src/ehc/HS/Parser.chs" #-}
         pExpressionPrefix :: HSParser (Expression -> Expression)
         pExpressionPrefix
           =   pExpressionLetPrefix
           <|> pExpressionNoLetPrefix
           <?> "pExpressionPrefix"
 
-{-# LINE 1498 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1500 "src/ehc/HS/Parser.chs" #-}
         pAlternative :: HSParser Alternative
         pAlternative
           = Alternative_Alternative emptyRange <$> pPattern <*> pRhs pRARROW
@@ -1060,7 +1062,7 @@
         pAlternatives
           = pBlock1 pOCURLY pSEMI pCCURLY pAlternative
 
-{-# LINE 1512 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1514 "src/ehc/HS/Parser.chs" #-}
         pPatternBaseInParens :: HSParser (Range -> Pattern)
         pPatternBaseInParens
           =   (pPattern
@@ -1088,11 +1090,11 @@
                            )
                        <*  pVBAR <*> pFlds
 
-{-# LINE 1550 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1552 "src/ehc/HS/Parser.chs" #-}
         pPatternBaseMinusLiteral :: HSParser Pattern
         pPatternBaseMinusLiteral = (\m n -> Pattern_Literal (mkRange1 m) (-1) n) <$> pMINUS <*> pLiteralNumber
 
-{-# LINE 1555 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1557 "src/ehc/HS/Parser.chs" #-}
         pPatternBaseNoParens :: HSParser Pattern
         pPatternBaseNoParens
           = (
@@ -1110,28 +1112,28 @@
             ) )
           <?> "pPatternBaseNoParens"
 
-{-# LINE 1581 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1583 "src/ehc/HS/Parser.chs" #-}
         pPatternBase :: HSParser Pattern
         pPatternBase
           =   pPatternBaseNoParens
           <|> pParens' pPatternBaseInParens
           <?> "pPatternBase"
 
-{-# LINE 1589 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1591 "src/ehc/HS/Parser.chs" #-}
         pPatternConSuffix :: HSParser (Token -> Pattern)
         pPatternConSuffix
           =   pSucceed (\c -> mkRngNm Pattern_Constructor c [])
           <|> pCurlys' ((\bs _ c -> mkRngNm Pattern_Record c bs) <$> pListSep pCOMMA pRecordPatternBinding)
           <?> "pPatternConSuffix"
 
-{-# LINE 1599 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1601 "src/ehc/HS/Parser.chs" #-}
         pPatternBaseCon :: HSParser Pattern
         pPatternBaseCon
           =   pPatternBase
           <|> qconid <**> pPatternConSuffix
           <?> "pPatternBaseCon"
 
-{-# LINE 1607 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1609 "src/ehc/HS/Parser.chs" #-}
         pRecordPatternBinding :: HSParser RecordPatternBinding
         pRecordPatternBinding
           =   qvar
@@ -1140,7 +1142,7 @@
                    )
           <?> "pRecordPatternBinding"
 
-{-# LINE 1617 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1619 "src/ehc/HS/Parser.chs" #-}
         pPatternApp :: HSParser Pattern
         pPatternApp
           =   pPatternBase
@@ -1152,7 +1154,7 @@
           <|> (Pattern_Tuple emptyRange) <$> pParens commas_arity <*> pList1 pPatternBaseCon
           <?> "pPatternApp"
 
-{-# LINE 1632 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1634 "src/ehc/HS/Parser.chs" #-}
         pPatternOp :: HSParser Pattern
         pPatternOp
           -- =   (\l rs -> foldr (\(o,r) mk -> \l -> o l (mk r)) id rs l) <$> pPatternApp <*> pList_ng (pOp <+> pPatternApp)
@@ -1161,32 +1163,32 @@
           where pOp =
                     ((\o l r -> Pattern_InfixConstructor (mkRange1 o) l (tokMkQName o) r) <$> qconop)
 
-{-# LINE 1646 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1648 "src/ehc/HS/Parser.chs" #-}
         pPattern :: HSParser Pattern
         pPattern
           =   pPatternOp
               <??> ((\c t p -> Pattern_Typed (mkRange1 c) p t) <$> pDCOLON <*> pType)
           <?> "pPattern"
 
-{-# LINE 1656 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1658 "src/ehc/HS/Parser.chs" #-}
         pRowRecordSelectionSuffix :: HSParser (Expression -> Expression)
         pRowRecordSelectionSuffix
           = (\lbls e -> foldl (\e l -> Expression_RowRecordSelect (mkRange1 l) e (tokMkQName l)) e lbls)
             <$> pList1 (pHASH *> pSelector)
 
-{-# LINE 1663 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1665 "src/ehc/HS/Parser.chs" #-}
         pSelector :: HSParser Token
         pSelector
           =   qvarid <|> qconid <|> pIntegerTk
 
-{-# LINE 1673 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1675 "src/ehc/HS/Parser.chs" #-}
         pTypePatternBase :: HSParser TypePattern
         pTypePatternBase
           =   mkRngNm TypePattern_Variable <$> var_no_ty
           <?> "pTypePatternBase"
 
 
-{-# LINE 1695 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1697 "src/ehc/HS/Parser.chs" #-}
 commas' :: HSParser [Token]
 commas' = pList1 pCOMMA
 
@@ -1194,22 +1196,22 @@
 commas =  (map (\s -> strProd (length s + 1)) . foldr tokConcat tokEmpty) <$> commas'
   where map = tokenMap
 
-{-# LINE 1708 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1710 "src/ehc/HS/Parser.chs" #-}
 commas_arity :: HSParser Int
 commas_arity =  (\ts -> length ts + 1) <$> commas'
 
-{-# LINE 1715 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1717 "src/ehc/HS/Parser.chs" #-}
 pOptSEMISeparator :: HSParser (Maybe ())
 pOptSEMISeparator = pMb (pSeparator <|> () <$ pSEMI)
 
-{-# LINE 1720 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1722 "src/ehc/HS/Parser.chs" #-}
 modid :: HSParser Token
 modid
   =   pCONID
   <|> pQCONID
   <?> "modid"
 
-{-# LINE 1730 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1732 "src/ehc/HS/Parser.chs" #-}
 qcnames :: HSParser [Token]
 qcnames
   =   pListSep pCOMMA qcname
@@ -1221,7 +1223,7 @@
   <|> gcon
   <?> "qcname"
 
-{-# LINE 1743 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1745 "src/ehc/HS/Parser.chs" #-}
 identifier :: HSParser Token
 identifier
   =   qvar
@@ -1253,7 +1255,7 @@
   <?> "sysdcon"
 
 
-{-# LINE 1782 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1784 "src/ehc/HS/Parser.chs" #-}
 qcon    :: HSParser Token
 qcon
   =   qconid
@@ -1274,14 +1276,14 @@
   <|> pBACKQUOTE *> qconid <* pBACKQUOTE
   <?> "qconop"
 
-{-# LINE 1809 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1811 "src/ehc/HS/Parser.chs" #-}
 qconid :: HSParser Token    -- Qualified or unqualifiedb
 qconid
   =   conid
   <|> pQCONID
   <?> "qconid"
 
-{-# LINE 1819 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1821 "src/ehc/HS/Parser.chs" #-}
 conid_nopragma   :: HSParser Token
 conid_nopragma
   =   pCONID
@@ -1300,21 +1302,21 @@
   <|> pQCONSYM
   <?> "qconsym"
 
-{-# LINE 1843 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1845 "src/ehc/HS/Parser.chs" #-}
 consym :: HSParser Token
 consym
   =   pCONSYM
   <|> pCOLON -- ':' means only list cons
   <?> "consym"
 
-{-# LINE 1851 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1853 "src/ehc/HS/Parser.chs" #-}
 con :: HSParser Token
 con
   =   conid
   <|> pParens consym
   <?> "con"
 
-{-# LINE 1859 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1861 "src/ehc/HS/Parser.chs" #-}
 -----------------------------------------------------------------------------
 -- Any operator
 
@@ -1331,13 +1333,13 @@
   <?> "qop"
 
 
-{-# LINE 1896 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1898 "src/ehc/HS/Parser.chs" #-}
 tyvar   :: HSParser Token
 tyvar
   =   varid_no_ty
   <?> "tyvar"
 
-{-# LINE 1907 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1909 "src/ehc/HS/Parser.chs" #-}
 -- | special identifier: FFI safety
 safety :: HSParser Token
 safety
@@ -1346,14 +1348,14 @@
   <|> pTHREADSAFE
   <?> "safety"
 
-{-# LINE 1919 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1921 "src/ehc/HS/Parser.chs" #-}
 -- | special identifier: FFI calling convention
 callconv :: HSParser Token
 callconv
   =   snd <$> pFFIWay
   <?> "callconv"
 
-{-# LINE 1927 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1929 "src/ehc/HS/Parser.chs" #-}
 -- These special_ids are treated as keywords in various places,
 -- but as ordinary ids elsewhere.   'special_id' collects all these
 -- except 'unsafe' and 'forall' whose treatment differs depending on context
@@ -1368,14 +1370,14 @@
   <|> pDYNAMIC
   <?> "special_id_no_callconv"
 
-{-# LINE 1947 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1949 "src/ehc/HS/Parser.chs" #-}
 special_id :: HSParser Token
 special_id
   =   special_id_no_callconv
   <|> callconv
   <?> "special_id"
 
-{-# LINE 1955 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1957 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified value/function, e.g.: f, except type related keywords
 varid_no_ty :: HSParser Token
 varid_no_ty
@@ -1385,7 +1387,7 @@
   <|> safety
   <?> "varid_no_ty"
 
-{-# LINE 1971 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1973 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified value/function, e.g.: f
 varid :: HSParser Token
 varid
@@ -1394,7 +1396,7 @@
   <|> pEXISTS
   <?> "varid"
 
-{-# LINE 1983 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1985 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified value/function, e.g.: X.f
 qvarid :: HSParser Token
 qvarid
@@ -1402,7 +1404,7 @@
   <|> pQVARID
   <?> "qvarid"
 
-{-# LINE 1994 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 1996 "src/ehc/HS/Parser.chs" #-}
 -- | See comments with special_id
 special_sym_no_bang :: HSParser Token
 special_sym_no_bang
@@ -1417,7 +1419,7 @@
   <|> special_sym_no_bang
   <?> "special_sym"
 
-{-# LINE 2010 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2012 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified operator, e.g.: +, except -, !
 varsym_no_minus_bang :: HSParser Token
 varsym_no_minus_bang
@@ -1431,7 +1433,7 @@
   <|> special_sym
   <?> "varsym_no_minus"
 
-{-# LINE 2025 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2027 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified operator, e.g.: +
 varsym :: HSParser Token
 varsym
@@ -1439,14 +1441,14 @@
   <|> pMINUS
   <?> "varsym"
 
-{-# LINE 2034 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2036 "src/ehc/HS/Parser.chs" #-}
 -- | Qualified operator, e.g.: X.+, only base
 qvarsym_base :: HSParser Token
 qvarsym_base
   =   pQVARSYM
   <?> "qvarsym1"
 
-{-# LINE 2042 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2044 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: X.+, except -
 qvarsym_no_minus :: HSParser Token
 qvarsym_no_minus
@@ -1454,7 +1456,7 @@
   <|> qvarsym_base
   <?> "qvarsym_no_minus"
 
-{-# LINE 2053 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2055 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: X.+, for use inside parens
 qvarsym_for_inparens :: HSParser Token
 qvarsym_for_inparens
@@ -1462,14 +1464,14 @@
   <|> qvarsym_base
   <?> "qvarsym_for_inparens"
 
-{-# LINE 2064 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2066 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: X.+
 qvarsym :: HSParser Token
 qvarsym
   =   qvarsym_for_inparens
   <?> "qvarsym"
 
-{-# LINE 2072 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2074 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: +, `f`, except -, !
 varop_no_minus_bang   :: HSParser Token
 varop_no_minus_bang
@@ -1484,7 +1486,7 @@
   <|> pBACKQUOTE *> varid <* pBACKQUOTE
   <?> "varop_no_minus"
 
-{-# LINE 2088 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2090 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: +, `f`, except type related keywords
 varop_no_ty   :: HSParser Token
 varop_no_ty
@@ -1492,7 +1494,7 @@
   <|> pBACKQUOTE *> varid_no_ty <* pBACKQUOTE
   <?> "varop_no_minus"
 
-{-# LINE 2097 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2099 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: +, `f`, except !
 varop_no_bang   :: HSParser Token
 varop_no_bang
@@ -1507,7 +1509,7 @@
   <|> pMINUS
   <?> "varop"
 
-{-# LINE 2113 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2115 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: X.+, `X.f`, except -
 qvarop_no_minus :: HSParser Token
 qvarop_no_minus
@@ -1515,7 +1517,7 @@
   <|> pBACKQUOTE *> qvarid <* pBACKQUOTE
   <?> "qvarop_no_minus"
 
-{-# LINE 2122 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2124 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified operator, e.g.: X.+, `X.f`
 qvarop :: HSParser Token
 qvarop
@@ -1523,7 +1525,7 @@
   <|> pBACKQUOTE *> qvarid <* pBACKQUOTE
   <?> "qvarop"
 
-{-# LINE 2131 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2133 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified value/function, e.g.: f, (+), except type related keywords
 var_no_ty     :: HSParser Token
 var_no_ty
@@ -1531,7 +1533,7 @@
   <|> pParens varsym
   <?> "var"
 
-{-# LINE 2140 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2142 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified value/function, e.g.: f, (+)
 var     :: HSParser Token
 var
@@ -1539,7 +1541,7 @@
   <|> pParens varsym
   <?> "var"
 
-{-# LINE 2149 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2151 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified value/function, e.g.: X.f, (X.+)
 qvar    :: HSParser Token
 qvar
@@ -1547,14 +1549,14 @@
   <|> pParens qvarsym_for_inparens
   <?> "qvar"
 
-{-# LINE 2166 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2168 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified type constructor, e.g.: :+:
 tyconsym :: HSParser Token
 tyconsym
   =   pCONSYM
   <?> "tyconsym"
 
-{-# LINE 2174 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2176 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified type constructor, e.g.: X.:+:
 qtyconsym :: HSParser Token
 qtyconsym
@@ -1562,14 +1564,14 @@
   <|> pQCONSYM
   <?> "qtyconsym"
 
-{-# LINE 2185 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2187 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified type constructor, e.g.: Either
 tyconid   :: HSParser Token
 tyconid
   =   pCONID
   <?> "tyconid"
 
-{-# LINE 2196 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2198 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified type constructor, e.g.: X.Either
 qtyconid :: HSParser Token
 qtyconid
@@ -1577,7 +1579,7 @@
   <|> pQCONID
   <?> "qtyconid"
 
-{-# LINE 2207 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2209 "src/ehc/HS/Parser.chs" #-}
 -- | Unqualified infix type operator, e.g.: `Either`, :+:
 tyconop :: HSParser Token   -- Unqualified
 tyconop
@@ -1585,7 +1587,7 @@
   <|> pBACKQUOTE *> tyconid <* pBACKQUOTE
   <?> "tyconop"
 
-{-# LINE 2216 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2218 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified infix type operator, e.g.: `X.Either`, X.:+:
 qtyconop :: HSParser Token
 qtyconop
@@ -1593,7 +1595,7 @@
   <|> pBACKQUOTE *> qtyconid <* pBACKQUOTE
   <?> "qtyconop"
 
-{-# LINE 2225 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2227 "src/ehc/HS/Parser.chs" #-}
 -- | (Un)qualified prefix type constructor, e.g.: X.Either, (X.:+:)
 qtycon :: HSParser Token
 qtycon
@@ -1601,7 +1603,7 @@
   <|> pParens qtyconsym
   <?> "qtycon"
 
-{-# LINE 2234 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2236 "src/ehc/HS/Parser.chs" #-}
 -- | General (un)qualified prefix type constructor, no delimiting brackets (e.g. []), to be parameterized with the part inside parenthesis (the general part)
 gtycon_no_delims' :: HSParser Token -> HSParser Token
 gtycon_no_delims' pInParens
@@ -1609,7 +1611,7 @@
   <|> pParens pInParens
   <?> "gtycon_no_delims"
 
-{-# LINE 2243 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2245 "src/ehc/HS/Parser.chs" #-}
 -- | Inside parenthesis part for gtycon
 gtycon_for_inparens_arrow :: HSParser Token
 gtycon_for_inparens_arrow
@@ -1631,28 +1633,28 @@
   <|> qtyconop
   <?> "gtycon_for_insection"
 
-{-# LINE 2268 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2270 "src/ehc/HS/Parser.chs" #-}
 -- | General (un)qualified prefix type constructor, e.g.: X.Either, (X.:+:), and (->)
 gtycon_no_delims_commas :: HSParser Token
 gtycon_no_delims_commas
   =   gtycon_no_delims' gtycon_for_inparens_arrow
   <?> "gtycon_no_delims_commas"
 
-{-# LINE 2276 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2278 "src/ehc/HS/Parser.chs" #-}
 -- | General (un)qualified prefix type constructor, e.g.: X.Either, (X.:+:), and (,,,), (->)
 gtycon_no_delims :: HSParser Token   -- A "general" qualified tycon
 gtycon_no_delims
   =   gtycon_no_delims' gtycon_for_inparens_arrow_commas
   <?> "gtycon_no_delims"
 
-{-# LINE 2284 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2286 "src/ehc/HS/Parser.chs" #-}
 gtycon_only_bracks :: HSParser Token   -- A "general" qualified tycon
 gtycon_only_bracks
   =   tokConcat <$> pOBRACK <*> pCBRACK
   -- <|> tokConcat <$> pOPABRACK <*> pCPABRACK
   <?> "gtycon_only_delims"
 
-{-# LINE 2292 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2294 "src/ehc/HS/Parser.chs" #-}
 -- | General (un)qualified prefix type constructor, including delimiting brackets, to be parameterized with the part inside parenthesis (the general part)
 gtycon' :: HSParser Token -> HSParser Token
 gtycon' pInParens
@@ -1660,7 +1662,7 @@
   <|> gtycon_only_bracks
   <?> "gtycon'"
 
-{-# LINE 2303 "src/ehc/HS/Parser.chs" #-}
+{-# LINE 2305 "src/ehc/HS/Parser.chs" #-}
 -- | General (un)qualified prefix type constructor, e.g.: X.Either, (X.:+:), and (,,,), (->), []
 gtycon :: HSParser Token   -- A "general" qualified tycon
 gtycon
diff --git a/src/UHC/Light/Compiler/Opts/Base.hs b/src/UHC/Light/Compiler/Opts/Base.hs
--- a/src/UHC/Light/Compiler/Opts/Base.hs
+++ b/src/UHC/Light/Compiler/Opts/Base.hs
@@ -247,9 +247,9 @@
       ,  ehcStopAtPoint         =   CompilePoint_All
       ,  ehcOptPolyKinds	    =   False
       ,  ehcOptExtensibleRecords=   False
+      ,  ehcOptBangPatterns		= 	False
       ,  ehcOptMbTarget         =   JustOk defaultTarget
       ,  ehcOptMbTargetFlavor   =   JustOk defaultTargetFlavor
-      ,  ehcOptBangPatterns		= 	True
       ,  ehcOptOptimizationLevel=   OptimizationLevel_Normal
       ,  ehcOptOptimizationScope=   OptimizationScope_PerModule
       ,  ehcOptDumpCoreStages   =   False
@@ -308,7 +308,7 @@
       ,  ehcOptExecOptsMp		=   Map.empty
       }
 
-{-# LINE 579 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 583 "src/ehc/Opts/Base.chs" #-}
 -- | PP EH AST, with annotations
 ehcOptEhAstPP :: EHCOpts -> Bool
 ehcOptEhAstPP opts =
@@ -318,19 +318,19 @@
 ehcOptEhAstPPExtensive :: EHCOpts -> Bool
 ehcOptEhAstPPExtensive opts = (ehcOptEhAstPP opts && ehcOptDebug opts) || EhOpt_DumpAST `elem` ehcOptEhOpts opts
 
-{-# LINE 594 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 598 "src/ehc/Opts/Base.chs" #-}
 -- | Do some plain PP on EH
 ehcOptEhPP :: EHCOpts -> Bool
 ehcOptEhPP opts = ehcOptShowEH opts || ehcOptEmitEH opts || EhOpt_Dump `elem` ehcOptEhOpts opts
 
-{-# LINE 600 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 604 "src/ehc/Opts/Base.chs" #-}
 ehcOptTarget :: EHCOpts -> Target
 ehcOptTarget = maybeOk (\s -> panic ("ehcOptTarget: " ++ s)) id  . ehcOptMbTarget
 
 ehcOptTargetFlavor :: EHCOpts -> TargetFlavor
 ehcOptTargetFlavor = maybeOk (\s -> panic ("ehcOptTargetFlavor: " ++ s)) id . ehcOptMbTargetFlavor
 
-{-# LINE 608 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 612 "src/ehc/Opts/Base.chs" #-}
 -- | Generate system F (20120421 AD: very much under construction)
 ehcOptCoreSysF :: EHCOpts -> Bool
 ehcOptCoreSysF _    = False
@@ -347,7 +347,7 @@
 ehcOptCoreSysFCheckOnlyVal :: EHCOpts -> Bool
 ehcOptCoreSysFCheckOnlyVal opts = ehcOptCoreSysFCheck opts
 
-{-# LINE 642 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 646 "src/ehc/Opts/Base.chs" #-}
 -- generate bytecode
 ehcOptEmitExecBytecode :: EHCOpts -> Bool
 ehcOptEmitExecBytecode _ = False
@@ -355,12 +355,12 @@
 ehcOptEmitBytecode :: EHCOpts -> Bool
 ehcOptEmitBytecode _ = False
 
-{-# LINE 699 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 703 "src/ehc/Opts/Base.chs" #-}
 -- | Check Cmm
 ehcOptCmmCheck :: EHCOpts -> Bool
 ehcOptCmmCheck _    = False
 
-{-# LINE 709 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 713 "src/ehc/Opts/Base.chs" #-}
 -- | Via Core -> Grin -> CMM -> JS ?
 ehcOptIsViaGrinCmmJavaScript :: EHCOpts -> Bool
 ehcOptIsViaGrinCmmJavaScript opts
@@ -372,36 +372,36 @@
   = targetIsViaCoreJavaScript t
   where t = ehcOptTarget opts
 
-{-# LINE 730 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 734 "src/ehc/Opts/Base.chs" #-}
 ehcOptIsViaCmm :: EHCOpts -> Bool
 ehcOptIsViaCmm opts = ehcOptIsViaGrinCmmJavaScript opts
 {-# INLINE ehcOptIsViaCmm #-}
 
-{-# LINE 736 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 740 "src/ehc/Opts/Base.chs" #-}
 ehcOptIsViaGrin :: EHCOpts -> Bool
 ehcOptIsViaGrin opts = ehcOptIsViaGrinCmmJavaScript opts || targetIsGrinBytecode t || targetDoesHPTAnalysis t
   where t = ehcOptTarget opts
 
-{-# LINE 746 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 750 "src/ehc/Opts/Base.chs" #-}
 ehcOptBuiltin :: EHCOpts -> (EHBuiltinNames -> x) -> x
 ehcOptBuiltin o f = f $ ehcOptBuiltinNames o
 
 ehcOptBuiltin2 :: EHCOpts -> (EHBuiltinNames -> Int -> HsName) -> Int -> HsName
 ehcOptBuiltin2 o f i = f (ehcOptBuiltinNames o) i
 
-{-# LINE 758 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 762 "src/ehc/Opts/Base.chs" #-}
 -- | Either fromJust with a possible panic, or with a default value (when debugging)
 ehcOptFromJust :: EHCOpts -> String -> a -> Maybe a -> a
 ehcOptFromJust opts panicMsg n m
   | ehcOptDebug opts = maybe n id m
   | otherwise        = panicJust panicMsg m
 
-{-# LINE 770 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 774 "src/ehc/Opts/Base.chs" #-}
 -- | Do linking into executable?
 ehcOptDoExecLinking :: EHCOpts -> Bool
 ehcOptDoExecLinking opts = ehcOptLinkingStyle opts == LinkingStyle_Exec
 
-{-# LINE 780 "src/ehc/Opts/Base.chs" #-}
+{-# LINE 784 "src/ehc/Opts/Base.chs" #-}
 -- | Is something under development turned on?
 ehcOptIsUnderDev :: UnderDev -> EHCOpts -> Bool
 ehcOptIsUnderDev ud opts = ud `Set.member` ehcOptUnderDev opts
diff --git a/src/UHC/Light/Compiler/Pred/CtxtRedOnly/Evidence.hs b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/Evidence.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/Evidence.hs
@@ -0,0 +1,121 @@
+module UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+( Evidence, Evidence' (..)
+, evidUnresolved
+, evidUpdateUnresolved
+, InfoToEvidenceMap, evidMpInsert, evidMpUnion, evidMpSubst )
+where
+import UHC.Util.CHR
+import UHC.Light.Compiler.Substitutable
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.VarMp
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.Base.Common
+import Data.List
+import qualified Data.Set as Set
+import qualified Data.Map as Map
+import Data.Maybe
+import UHC.Util.Pretty
+import UHC.Util.Utils
+
+{-# LINE 39 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+data Evidence' p info
+  =  Evid_Unresolved { evidPred :: !p                       , evidTrace     :: ![UnresolvedTrace' p info]    }
+  -- =  Evid_Unresolved { evidPred :: !p                       , evidAttempts  :: ![Evidence' p info]           }
+  |  Evid_Proof      { evidPred :: !p  , evidInfo :: !info  , evidProofSubs :: ![Evidence' p info]           }
+  |  Evid_Recurse    { evidPred :: !p                                                                       }
+  |  Evid_Ambig      { evidPred :: !p                       , evidAmbigSubs :: ![(info,[Evidence' p info])]  }
+
+type Evidence = Evidence' CHRPredOcc RedHowAnnotation
+
+{-# LINE 50 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+instance (Show info, Show p) => Show (Evidence' p info) where
+  show _ = "Evidence"
+
+instance (Eq p, Eq info) => Eq (Evidence' p info) where
+  (Evid_Proof _ i1 evs1) == (Evid_Proof _ i2 evs2) = i1 == i2 && evs1 == evs2
+  (Evid_Recurse p1     ) == (Evid_Recurse p2     ) = p1 == p2
+  _                      == _                      = False
+
+instance (Ord p, Ord info) => Ord (Evidence' p info) where
+  Evid_Unresolved _ _    `compare` _                      = LT
+  _                      `compare` Evid_Unresolved _ _    = GT
+  Evid_Proof _ i1 evs1   `compare` Evid_Proof _ i2 evs2   = orderingLexicList (i1 `compare` i2 : zipWith compare evs1 evs2)
+  Evid_Proof _ _  _      `compare` _                      = LT
+  _                      `compare` Evid_Proof _ _  _      = GT
+  Evid_Recurse p1        `compare` Evid_Recurse p2        = p1 `compare` p2
+  Evid_Recurse _         `compare` _                      = LT
+  _                      `compare` Evid_Recurse _         = GT
+
+{-# LINE 70 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+instance (PP info, PP p) => PP (Evidence' p info) where
+  pp (Evid_Proof _ info []) = "Ev:"             >#< info
+  pp (Evid_Proof _ info es) = "Ev:"             >#< info >#< ppBracketsCommas' es
+  pp (Evid_Recurse p      ) = "Ev: recurse:"    >#< p
+  pp (Evid_Ambig _     ess) = "Ev: ambiguous:"  >#< ppBracketsCommas' (map (ppBracketsCommas . snd) ess)
+  pp (Evid_Unresolved p  _) = "Ev: unresolved:" >#< p
+
+{-# LINE 79 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+type instance ExtrValVarKey (Evidence' p info) = ExtrValVarKey p
+
+instance (VarExtractable p) => VarExtractable (Evidence' p info) where
+  varFreeSet            (Evid_Unresolved  p   _ )    = varFreeSet p
+  varFreeSet            (Evid_Proof       p _ es)    = Set.unions $ varFreeSet p : map varFreeSet es
+  varFreeSet            (Evid_Recurse     p     )    = varFreeSet p
+  varFreeSet            (Evid_Ambig       p  ess)    = Set.unions $ varFreeSet p : map (Set.unions . map varFreeSet . snd) ess
+
+instance VarUpdatable p s => VarUpdatable (Evidence' p info) s where
+  varUpd s     (Evid_Unresolved  p   u )    = Evid_Unresolved (varUpd s p) u
+  varUpd s     (Evid_Proof       p i es)    = Evid_Proof      (varUpd s p) i (map (varUpd s) es)
+  varUpd s     (Evid_Recurse     p     )    = Evid_Recurse    (varUpd s p)
+  varUpd s     (Evid_Ambig       p  ess)    = Evid_Ambig      (varUpd s p) (assocLMapElt (map (varUpd s)) ess)
+
+{-# LINE 99 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+-- | Get unresolved trace from evidence from which is known is belongs to unresolved predicate
+evidUnresolved :: Eq p => Evidence' p info -> [UnresolvedTrace' p info]
+evidUnresolved (Evid_Unresolved p us)	= -- concatMap evidUnresolved us
+                                          us
+evidUnresolved (Evid_Proof p i ps)
+               | null us            	= []
+               | otherwise          	= [UnresolvedTrace_Red p i us]
+               where us = {- nub $ -} concatMap evidUnresolved ps
+evidUnresolved (Evid_Ambig p  pss)
+               | null us            	= []
+               | otherwise          	= [UnresolvedTrace_Overlap p us]
+               where us = {- nub $ concatMap -} map (\(i,ps) -> (i,concatMap evidUnresolved ps)) pss
+evidUnresolved _                    	= []
+
+{-# LINE 115 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+-- | Choose proof over unresolved, to be used when patching evidence with newfound proofs
+evidUpdateUnresolved :: Eq p => Evidence' p info -> Evidence' p info -> Evidence' p info
+evidUpdateUnresolved e                        (Evid_Unresolved _ _)= e
+evidUpdateUnresolved (Evid_Proof p i qs)      e                    = Evid_Proof   p i [evidUpdateUnresolved q e | q <- qs]
+evidUpdateUnresolved (Evid_Recurse p   )      e                    = Evid_Recurse p
+evidUpdateUnresolved u@(Evid_Unresolved q _)  e     | q == evidPred e = e
+                                                    | otherwise       = u
+
+{-# LINE 125 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+evidSubstUnresolved :: (p -> Maybe (Evidence' p info)) -> Evidence' p info -> Evidence' p info
+evidSubstUnresolved lkup ev
+  = s ev
+  where s ev = case ev of
+                 Evid_Unresolved p _
+                   | isJust mbev   -> fromJust mbev
+                   where mbev = lkup p
+                 Evid_Proof p i es -> Evid_Proof p i $ map s es
+                 Evid_Ambig p  ess -> Evid_Ambig p $ assocLMapElt (map s) ess
+                 _                 -> ev
+
+{-# LINE 142 "src/ehc/Pred/CtxtRedOnly/Evidence.chs" #-}
+type InfoToEvidenceMap' p info = Map.Map info (Evidence' p info)
+
+type InfoToEvidenceMap = InfoToEvidenceMap' CHRPredOcc RedHowAnnotation
+
+evidMpInsert :: (Eq p, Ord info) => info -> Evidence' p info -> InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info
+evidMpInsert = Map.insertWith evidUpdateUnresolved
+
+evidMpUnion :: (Eq p, Ord info) => InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info
+evidMpUnion = Map.unionWith evidUpdateUnresolved
+
+evidMpSubst :: (p -> Maybe (Evidence' p info)) -> InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info
+evidMpSubst lkup = Map.map (evidSubstUnresolved lkup)
+
diff --git a/src/UHC/Light/Compiler/Pred/CtxtRedOnly/EvidenceToCore.hs b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/EvidenceToCore.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/EvidenceToCore.hs
@@ -0,0 +1,530 @@
+module UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore
+( EvidKeyToCBindMap, PredScopeToCBindMap, EvidKeyToCExprMap
+, OverlapEvid, OverlapEvid' (..)
+, evidKeyToBindMapUnion, predScopeToBindMapUnion
+, evidMpToCore
+, EvidCBindL, evidKeyCoreMpToBinds2
+, evidKeyBindMpToCSubst )
+where
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import Data.List
+import qualified Data.Set as Set
+import qualified Data.Map as Map
+import Data.Maybe
+import UHC.Light.Compiler.Base.Common
+import UHC.Light.Compiler.Ty.FitsInCommon2
+import UHC.Light.Compiler.Core
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.Core.Utils
+import UHC.Light.Compiler.Core.Subst
+import UHC.Light.Compiler.AbstractCore
+import qualified UHC.Light.Compiler.Core.SysF.AsTy as SysF
+import UHC.Util.Pretty
+import UHC.Util.Utils
+import Control.Monad.State
+import Debug.Trace
+
+
+
+{-# LINE 53 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+type EvidKeyToExprMap' e t = Map.Map UID (ToCoreRes e t) -- (e,t,Set.Set SubEvid,PredScope)
+type EvidKeyToBindMap' b = Map.Map UID [b]
+type PredScopeToBindMap' b = Map.Map PredScope [b]
+
+type EvidKeyToCExprMap = EvidKeyToExprMap' CExpr Ty
+type EvidKeyToCBindMap = EvidKeyToBindMap' CBind
+type PredScopeToCBindMap = PredScopeToBindMap' CBind
+
+{-# LINE 66 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+data OverlapEvid' p info
+  = OverlapEvid
+      { overlapevidPredOcc  :: !p
+      , overlapevidInfos    :: ![info]
+      }
+
+type OverlapEvid = OverlapEvid' CHRPredOcc RedHowAnnotation
+
+{-# LINE 76 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+evidKeyToBindMapUnion :: EvidKeyToBindMap' e -> EvidKeyToBindMap' e -> EvidKeyToBindMap' e
+evidKeyToBindMapUnion = Map.unionWith (++)
+
+predScopeToBindMapUnion :: PredScopeToBindMap' b -> PredScopeToBindMap' b -> PredScopeToBindMap' b
+predScopeToBindMapUnion = Map.unionWith (++)
+
+{-# LINE 88 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+-- | Translate evidence to actual core, taking into account the need to share (i.e. do CSE, by state accumulating maps).
+--   Cleanup dd 20120209, rewrite to State version.
+evidMpToCore2 :: FIIn' gm -> InfoToEvidenceMap -> (EvidKeyToCExprMap,[OverlapEvid])
+evidMpToCore2 env evidMp
+  = ( -- Map.map (\r -> (tcrCExpr r,tcrTy r,tcrUsed r,tcrScope r)) $
+      tcsMp
+      $ execState (mapM (\(RedHow_ProveObl i _,ev) -> mk1 (Just i) ev) evidMp')
+                  (ToCoreState Map.empty Map.empty Map.empty (fiUniq env))
+    , concat overlaps
+    )
+  where -- | Split off overlapping instances (i.e. ambiguous evidence)
+        (evidMp',overlaps)
+          = unzip [ ((i,ev3),as)
+                  | (i,ev) <- Map.toList evidMp, not (ignore ev)
+                  , let (ev2,as) = splitOverlap ev ; ev3 = stripScope ev2
+                  ]
+
+        -- | Make Core for a single Evidence, recursing for subevidence
+        mk1 :: Maybe UID									-- an UID already may have been assigned, it then should be used (the case for start evidence of this fun)
+            -> Evidence			-- the evidence
+            -> State (ToCoreState CExpr Ty) (ToCoreRes CExpr Ty)
+        mk1 mbevk ev
+          = case ev of
+              Evid_Proof p info evs
+                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
+                       ; let (u',evk,insk,evnm,uses)
+                                = case info of
+                                    RedHow_ProveObl   i   _ -> (u,choosek i,True,choosen $ mkHNm i,Set.empty)
+                                    RedHow_Assumption vun s -> (u,choosek i,False,choosen (vunmNm vun),Set.singleton (SubEvid_Assume i s))
+                                                            where i = vunmId vun
+                                    _                       -> (u1,choosek u2,True,choosen $ mkHNm u2,Set.empty)
+                                                            where (u1,u2) = mkNewUID u
+                       ; modify (\st -> st {tcsUniq = u', tcsPrMp = Map.insert p evnm $ tcsPrMp st})
+                       ; rs <- mapM (mk1 Nothing) evs
+                       ; let (c,sc) = ann info rs
+                       ; ins (insk || isJust mbevk)
+                             evk evnm ev c (pred2DataTy $ cpoPr p) sc
+                             (Set.unions (uses : map tcrUsed rs))
+                       }
+                where choosek k = maybe k id mbevk
+                      choosen n = maybe n mkHNm mbevk
+              Evid_Recurse p
+                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
+                       ; let (u1,u2) = mkNewUID u
+                             recnm = panicJust "evidMpToCore.Evid_Recurse" $ Map.lookup p $ tcsPrMp st
+                       ; modify (\st -> st {tcsUniq = u1})
+                       ; ins True
+                             u2 (mkHNm u2) ev (mknm recnm) (pred2DataTy $ cpoPr p) (cpoScope p)
+                             Set.empty
+                       }
+              ev
+                ->  return (ToCoreRes (acoreBuiltinUndefined $ feEHCOpts $ fiEnv env)
+                                      (pred2DataTy $ cpoPr $ evidPred ev)
+                                      Set.empty initPredScope
+                           )
+
+        -- | Update state (insert given required ingredients) & compute actual result
+        ins :: Bool                                     -- insert in UID map?
+            -> UID                                      -- the UID for this evidence
+            -> HsName                                   -- the name as used in Core for this evidence
+            -> Evidence						     		-- the evidence
+            -> CExpr                                    -- its Core expr
+            -> Ty                                       -- its type
+            -> PredScope                                -- its scope
+            -> Set.Set SubEvid                          -- its sub evidence
+            -> State (ToCoreState CExpr Ty) (ToCoreRes CExpr Ty)
+        ins insk k evnm ev c ty sc uses
+          = do { st <- get
+               ; case Map.lookup ev $ tcsEvMp st of
+                   Just r
+                     -- Is already in map, update UID/key map
+                     | insk
+                       -> do { modify (mkk k r)
+                             ; return (vr evnm r)
+                             }
+
+                     -- No map update required
+                     | otherwise
+                       -> return (vr evnm r)
+
+                     -- Insert in both maps, i.e. UID and Evidence map
+                   _ | insk
+                       -> do { let r1 = ToCoreRes     c              ty uses sc
+                                   r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
+                             ; modify (mkk k r1 . mkc ev r2)
+                             ; return r2
+                             }
+
+                     -- Update only Evidence map
+                     | otherwise
+                       -> do { let r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
+                             ; modify (mkc ev r2)
+                             ; return r2
+                             }
+               }
+          where mkk k  r st = st {tcsMp   = Map.insert k  r $ tcsMp   st}
+                mkc ev r st = st {tcsEvMp = Map.insert ev r $ tcsEvMp st}
+                vr evnm r = case acoreExprMbVar $ tcrCExpr r of
+                              Just _ -> r
+                              _      -> r {tcrCExpr = mknm evnm}
+                vc c c' = case acoreExprMbVar c of
+                            Just _ -> c
+                            _      -> c'
+        mknm = acoreVar
+        ann (RedHow_Assumption   vun sc) _     = ( mknm $ vunmNm vun, sc )
+        ann (RedHow_ByInstance   n _   sc) ctxt= ( acoreApp (mknm n) (map (\c -> (tcrCExpr c)) ctxt), maximumBy pscpCmpByLen $ sc : map tcrScope ctxt )
+        ann (RedHow_BySuperClass n o t ) [sub] = let res = acoreSatSelsCaseTy
+                                                             (emptyRCEEnv $ feEHCOpts $ fiEnv env)
+                                                             (Just (hsnUniqifyEval n,acoreTyErr "evidMpToCore2.ann.RedHow_BySuperClass"))
+                                                             (tcrCExpr sub)
+                                                             t
+                                                             [(n,acoreTyErr $ "evidMpToCore2.ann.RedHow_BySuperClass.sub: " ++ show n,{-n,-}o)]
+                                                             Nothing
+                                                             (acoreVar n)
+                                                 in ( res
+                                                    , tcrScope sub
+                                                    )
+        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) []     = ( acoreInt opts o, sc )
+        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) [roff] = ( acoreBuiltinAddInt opts (tcrCExpr roff) o, sc )
+        ann (RedHow_Lambda  i sc) [body]       = ( acoreTyErrLift "RedHow_Lambda" [mkHNm i]  `acoreLamTy` tcrCExpr body, sc )
+
+        -- | Ignore proofs without real evidence
+        ignore _ = False
+
+        -- | Strip off scope related reductions, no longer required
+        stripScope (Evid_Proof _ (RedHow_ByScope _) [ev]) = stripScope ev
+        stripScope (Evid_Proof p i                  evs ) = Evid_Proof p i (map stripScope evs)
+        stripScope ev                                     = ev
+
+        -- | Split off overlapping instances
+        splitOverlap  (Evid_Proof p i es            )  = let (es',as) = splitOverlaps es in (Evid_Proof p i es',as)
+        splitOverlap  (Evid_Ambig p   ess@((i,es):_))  = let (es',_ ) = splitOverlaps es in (Evid_Proof p i es',[OverlapEvid p (map fst ess)])
+        splitOverlap  ev                               = (ev,[])
+        splitOverlaps es                               = let (es',as) = unzip $ map splitOverlap es in (es',concat as)
+
+        -- | ehc options
+        opts = feEHCOpts $ fiEnv env
+
+{-# LINE 243 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+-- | Translate evidence to actual core, taking into account the need to share (i.e. do CSE, by state accumulating maps).
+--   Cleanup dd 20120209, rewrite to State version, plus abstraction over Core variant
+{-
+--   For now: breaks on pred2DataTy, which is not (yet) abstracted over
+evidMpToCore3
+  :: forall gm p e m b basp bcat mbind t pat pr pf a .
+     (AbstractCore e m b basp bcat mbind t pat pr pf a)
+     => FIIn' gm
+     -> InfoToEvidenceMap p RedHowAnnotation
+     -> ( EvidKeyToExprMap' e t
+        , [OverlapEvid p RedHowAnnotation]
+        )
+evidMpToCore3 env evidMp
+  = ( Map.map (\r -> (tcrCExpr r,tcrTy r,tcrUsed r,tcrScope r)) $ tcsMp $ snd
+      $ runState (mapM (\(RedHow_ProveObl i _,ev) -> mk1 (Just i) ev) evidMp')
+                 (ToCoreState Map.empty Map.empty Map.empty (fiUniq env))
+    , concat overlaps
+    )
+  where -- | Split off overlapping instances (i.e. ambiguous evidence)
+        (evidMp',overlaps)
+          = unzip [ ((i,ev3),as)
+                  | (i,ev) <- Map.toList evidMp, not (ignore ev)
+                  , let (ev2,as) = splitOverlap ev ; ev3 = stripScope ev2
+                  ]
+
+        -- | Make Core for a single Evidence, recursing for subevidence
+        mk1 :: Maybe UID									-- an UID already may have been assigned, it then should be used (the case for start evidence of this fun)
+            -> Evidence p RedHowAnnotation								-- the evidence
+            -> State (ToCoreState p RedHowAnnotation e t) (ToCoreRes e t)
+        mk1 mbevk ev
+          = case ev of
+              Evid_Proof p info evs
+                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
+                       ; let (u',evk,insk,evnm,uses)
+                                = case info of
+                                    RedHow_ProveObl   i   _ -> (u,choosek i,True,choosen $ mkHNm i,Set.empty)
+                                    RedHow_Assumption vun s -> (u,choosek i,False,choosen (vunmNm vun),Set.singleton (SubEvid_Assume i s))
+                                                            where i = vunmId vun
+                                    _                       -> (u1,choosek u2,True,choosen $ mkHNm u2,Set.empty)
+                                                            where (u1,u2) = mkNewUID u
+                       ; modify (\st -> st {tcsUniq = u', tcsPrMp = Map.insert p evnm $ tcsPrMp st})
+                       ; rs <- mapM (mk1 Nothing) evs
+                       ; let (c,sc) = ann info rs
+                       ; ins (insk || isJust mbevk)
+                             evk evnm ev c (pred2DataTy $ cpoPr p) sc
+                             (Set.unions (uses : map tcrUsed rs))
+                       }
+                where choosek k = maybe k id mbevk
+                      choosen n = maybe n mkHNm mbevk
+              Evid_Recurse p
+                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
+                       ; let (u1,u2) = mkNewUID u
+                             recnm = panicJust "evidMpToCore.Evid_Recurse" $ Map.lookup p $ tcsPrMp st
+                       ; modify (\st -> st {tcsUniq = u1})
+                       ; ins True
+                             u2 (mkHNm u2) ev (mknm recnm) (pred2DataTy $ cpoPr p) (cpoScope p)
+                             Set.empty
+                       }
+              ev
+                ->  return (ToCoreRes (acoreBuiltinUndefined $ feEHCOpts $ fiEnv env)
+                                      undefined -- (pred2DataTy $ cpoPr $ evidPred ev)
+                                      Set.empty initPredScope
+                           )
+
+        -- | Update state (insert given required ingredients) & compute actual result
+        ins :: Bool                                     -- insert in UID map?
+            -> UID                                      -- the UID for this evidence
+            -> HsName                                   -- the name as used in Core for this evidence
+            -> Evidence p RedHowAnnotation		     				-- the evidence
+            -> e                                    	-- its Core expr
+            -> t                                       	-- its type
+            -> PredScope                                -- its scope
+            -> Set.Set SubEvid                          -- its sub evidence
+            -> State (ToCoreState p RedHowAnnotation e t) (ToCoreRes e t)
+        ins insk k evnm ev c ty sc uses
+          = do { st <- get
+               ; case Map.lookup ev $ tcsEvMp st of
+                   Just r
+                     -- Is already in map, update UID/key map
+                     | insk
+                       -> do { modify (mkk k r)
+                             ; return (vr evnm r)
+                             }
+
+                     -- No map update required
+                     | otherwise
+                       -> return (vr evnm r)
+
+                     -- Insert in both maps, i.e. UID and Evidence map
+                   _ | insk
+                       -> do { let r1 = ToCoreRes     c              ty uses sc
+                                   r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
+                             ; modify (mkk k r1 . mkc ev r2)
+                             ; return r2
+                             }
+
+                     -- Update only Evidence map
+                     | otherwise
+                       -> do { let r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
+                             ; modify (mkc ev r2)
+                             ; return r2
+                             }
+               }
+          where mkk k  r st = st {tcsMp   = Map.insert k  r $ tcsMp   st}
+                mkc ev r st = st {tcsEvMp = Map.insert ev r $ tcsEvMp st}
+                vr evnm r = case acoreExprMbVar $ tcrCExpr r of
+                              Just _ -> r
+                              _      -> r {tcrCExpr = mknm evnm}
+                vc c c' = case acoreExprMbVar c of
+                            Just _ -> c
+                            _      -> c'
+        mknm = acoreVar
+        ann (RedHow_Assumption   vun sc) _     = ( mknm $ vunmNm vun, sc )
+        ann (RedHow_ByInstance   n _   sc) ctxt= ( acoreApp (mknm n) (map (\c -> (tcrCExpr c)) ctxt), maximumBy pscpCmpByLen $ sc : map tcrScope ctxt )
+        ann (RedHow_BySuperClass n o t ) [sub] = let res = acoreSatSelsCaseTy
+                                                             (emptyRCEEnv $ feEHCOpts $ fiEnv env)
+                                                             (Just (hsnUniqifyEval n,Ty_Any))
+                                                             (tcrCExpr sub)
+                                                             t
+                                                             [(n,{-n,-}o)]
+                                                             Nothing
+                                                             (acoreVar n)
+                                                 in ( res
+                                                    , tcrScope sub
+                                                    )
+        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) []     = ( acoreInt o, sc )
+        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) [roff] = ( acoreBuiltinAddInt (feEHCOpts $ fiEnv env) (tcrCExpr roff) o, sc )
+        ann (RedHow_Lambda  i sc) [body]       = ( acoreTyErrLift "RedHow_Lambda" [mkHNm i]  `acoreLamTy` tcrCExpr body, sc )
+
+        -- | Ignore proofs without real evidence
+        ignore _ = False
+
+        -- | Strip off scope related reductions, no longer required
+        stripScope (Evid_Proof _ (RedHow_ByScope _) [ev]) = stripScope ev
+        stripScope (Evid_Proof p i                  evs ) = Evid_Proof p i (map stripScope evs)
+        stripScope ev                                     = ev
+
+        -- | Split off overlapping instances
+        splitOverlap  (Evid_Proof p i es            )  = let (es',as) = splitOverlaps es in (Evid_Proof p i es',as)
+        splitOverlap  (Evid_Ambig p   ess@((i,es):_))  = let (es',_ ) = splitOverlaps es in (Evid_Proof p i es',[OverlapEvid p (map fst ess)])
+        splitOverlap  ev                               = (ev,[])
+        splitOverlaps es                               = let (es',as) = unzip $ map splitOverlap es in (es',concat as)
+-}
+
+{-# LINE 404 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+-- | State maintained during evid -> core
+data ToCoreState' p info e t
+  = ToCoreState
+      { tcsMp       :: !(Map.Map UID (ToCoreRes e t))                 	-- accumulating map: uid -> Core (+additional info)
+      , tcsEvMp     :: !(Map.Map (Evidence' p info) (ToCoreRes e t))   	-- accumulating map: evidence -> Core (+additional info)
+      , tcsPrMp     :: !(Map.Map p HsName)                      		-- accumulating map: for recursive proof, names for predicates to be introduced
+      , tcsUniq     :: !UID                                     		-- threaded unique id
+      }
+
+type ToCoreState e t = ToCoreState' CHRPredOcc RedHowAnnotation e t
+
+-- | The core expression, plus additional info
+data ToCoreRes e t
+  = ToCoreRes
+      { tcrCExpr    :: !e                                   	-- evidence Core expr
+      , tcrTy       :: !t                                       -- its type
+      , tcrUsed     :: !(Set.Set SubEvid)                       -- which subevidence has been used to construct this evidence
+      , tcrScope    :: !PredScope                               -- its scope
+      }
+
+instance Show (ToCoreRes e t) where
+  show _ = "ToCoreRes"
+
+instance (PP e, PP t) => PP (ToCoreRes e t) where
+  pp r = "TCR" >#< tcrCExpr r >#< "::" >#< tcrTy r
+
+{-# LINE 432 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+-- | Sub evidence encodes the evidence needed to construct other evidence, as in Eq Int required for Eq [Int].
+--   The subevidence is identified/introduced by a UID and defined in scope.
+--   Subevidence can be an assumption (encoded below) or an already known instance (dealt with otherwise, but must be here too. 20090416)
+data SubEvid
+  = SubEvid_Assume
+      { subevdId    :: UID
+      , subevdScope :: PredScope
+      }
+  deriving (Eq,Ord,Show)
+
+instance PP SubEvid where
+  pp (SubEvid_Assume i s) = "SubEvd" >#< i >#< s
+
+{-# LINE 449 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+-- | Translate evidence to actual core, taking into account the need to share (i.e. do CSE)
+evidMpToCore :: FIIn' gm -> InfoToEvidenceMap -> (EvidKeyToCExprMap,[OverlapEvid])
+evidMpToCore = evidMpToCore2
+{-
+evidMpToCore env evidMp
+  = ( Map.map (\r -> (tcrCExpr r,tcrTy r,tcrUsed r,tcrScope r)) $ tcsMp
+      $ foldr mke (ToCoreState Map.empty Map.empty Map.empty (fiUniq env))
+      $ evidMp'
+    , concat ambigs
+    )
+  where (evidMp',ambigs)
+                      = dbg "evidMpToCore.mk1.evidMp'" $
+                        unzip [ ((i,ev3),as)
+                              | (i,ev) <- Map.toList evidMp, not (ignore ev)
+                              , let (ev2,as) = splitOverlap ev ; ev3 = stripScope ev2
+                              ]
+        mke (RedHow_ProveObl i _,ev) st = fst $ mk1 st (Just i) ev
+        mk1 st mbevk ev@(Evid_Proof p info evs)
+                      = dbg "evidMpToCore.mk1.a" $
+                        ins (insk || isJust mbevk)
+                            evk evnm ev c (pred2DataTy $ cpoPr p) sc
+                            (Set.unions (uses : map tcrUsed rs))
+                            (st' {tcsUniq=u'})
+                      where (st'@(ToCoreState {tcsUniq=u}),rs) = mkn (st {tcsPrMp = Map.insert p evnm $ tcsPrMp st}) evs
+                            (c,sc)          = ann info rs
+                            (u',evk,insk,evnm,uses)
+                                            = case info of
+                                                RedHow_ProveObl   i   _ -> (u,choosek i,True,choosen $ mkHNm i,Set.empty)
+                                                RedHow_Assumption vun s -> (u,choosek i,False,choosen (vunmNm vun),Set.singleton (SubEvid_Assume i s))
+                                                                        where i = vunmId vun
+                                                _                       -> (u1,choosek u2,True,choosen $ mkHNm u2,Set.empty)
+                                                                        where (u1,u2) = mkNewUID u
+                            choosek k = maybe k id mbevk
+                            choosen n = maybe n mkHNm mbevk
+        mk1 st@(ToCoreState {tcsUniq=u}) mbevk ev@(Evid_Recurse p)
+                      = ins True
+                            u2 (mkHNm u2) ev (mknm recnm) (pred2DataTy $ cpoPr p) (cpoScope p)
+                            Set.empty
+                            (st {tcsUniq=u1})
+                      where (u1,u2) = mkNewUID u
+                            recnm = panicJust "evidMpToCore.Evid_Recurse" $ Map.lookup p $ tcsPrMp st
+        mk1 st _   ev = dbg "evidMpToCore.mk1.b" $ (st,ToCoreRes (acoreBuiltinUndefined $ feEHCOpts $ fiEnv env) (pred2DataTy $ cpoPr $ evidPred ev) Set.empty initPredScope)
+        mkn st        = dbg "evidMpToCore.mkn" $ foldr (\ev (st,rs) -> let (st',r) = mk1 st Nothing ev in (st',r:rs)) (st,[])
+        mkv x         = mknm $ mkHNm x
+        mknm          = acoreVar
+        ins insk k evnm ev c ty sc uses st
+                      = {- trp "XX" ((ppAssocLV $ Map.toList $ tcsMp st') >-< (ppAssocLV $ Map.toList $ tcsEvMp st')) $ -} res
+                      where res@(st',_)
+                              = case Map.lookup ev $ tcsEvMp st of
+                                  Just r -> (        mkk r                     st,vr r)
+                                  _      -> (mkc r $ mkk (ToCoreRes c ty uses sc) st,   r)
+                            mkk r st = if insk then st {tcsMp = Map.insert k r $ tcsMp st} else st
+                            mkc v st = st {tcsEvMp = Map.insert ev v $ tcsEvMp st}
+                            v = mknm evnm
+                            r = ToCoreRes (vc c v) ty uses sc
+                            vr r = case acoreExprMbVar $ tcrCExpr r of
+                                     Just _ -> r
+                                     _      -> r {tcrCExpr = v}
+                            vc c c' = case acoreExprMbVar c of
+                                        Just _ -> c
+                                        _      -> c'
+        ann (RedHow_Assumption   vun sc) _     = ( mknm $ vunmNm vun, sc )
+        ann (RedHow_ByInstance   n _   sc) ctxt= ( acoreApp (mknm n) (map (\c -> (tcrCExpr c)) ctxt), maximumBy pscpCmpByLen $ sc : map tcrScope ctxt )
+        ann (RedHow_BySuperClass n o t ) [sub] = let res = acoreSatSelsCaseTy
+                                                             (emptyRCEEnv $ feEHCOpts $ fiEnv env)
+                                                             (Just (hsnUniqifyEval n,Ty_Any))
+                                                             (tcrCExpr sub)
+                                                             t
+                                                             [(n,{-n,-}o)]
+                                                             Nothing
+                                                             (acoreVar n)
+                                                 in ( res
+                                                    , tcrScope sub
+                                                    )
+        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) []     = ( acoreInt o, sc )
+        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) [roff] = ( acoreBuiltinAddInt (feEHCOpts $ fiEnv env) (tcrCExpr roff) o, sc )
+        ann (RedHow_Lambda  i sc) [body]       = ( acoreTyErrLift "RedHow_Lambda" [mkHNm i] `acoreLamTy` tcrCExpr body, sc )
+        ignore _ = False
+
+        stripScope (Evid_Proof _ (RedHow_ByScope _) [ev]) = stripScope ev
+        stripScope (Evid_Proof p i                  evs ) = Evid_Proof p i (map stripScope evs)
+        stripScope ev                                     = ev
+
+        splitOverlap  (Evid_Proof p i es            )  = let (es',as) = splitOverlaps es in (Evid_Proof p i es',as)
+        splitOverlap  (Evid_Ambig p   ess@((i,es):_))  = let (es',_ ) = splitOverlaps es in (Evid_Proof p i es',[OverlapEvid p (map fst ess)])
+        splitOverlap  ev                               = (ev,[])
+        splitOverlaps es                               = let (es',as) = unzip $ map splitOverlap es in (es',concat as)
+
+        dbg m = id -- Debug.tr m empty
+-}
+
+{-# LINE 556 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+evidKeyCoreMpToBinds :: FIIn' gm -> EvidKeyToCExprMap -> (EvidKeyToCBindMap,PredScopeToCBindMap)
+evidKeyCoreMpToBinds env m
+  = dbg "evidKeyCoreMpToBinds.res"
+    $!
+    ( dbg "evidKeyCoreMpToBinds.res1"
+      $! Map.unionsWith (++)
+      $ map (\(b,uses)
+               -> let deepestScope = subevdId . maximumBy (\evd1 evd2 -> subevdScope evd1 `pscpCmpByLen` subevdScope evd2) . Set.toList
+                  in  Map.singleton (deepestScope uses) [b]
+            )
+      $ [ (acoreBind1Ty (mkHNm i) (SysF.ty2TyCforFFI opts $ tcrTy r) (tcrCExpr r),tcrUsed r)
+        | (i,r) <- dbg "evidKeyCoreMpToBinds.dependentOnAssumes"   $! Map.toList dependentOnAssumes
+        ]
+    , dbg "evidKeyCoreMpToBinds.res2"
+      $! Map.fromListWith (++)
+      $ [ (tcrScope r,[acoreBind1Ty (mkHNm i) (SysF.ty2TyCforFFI opts $ tcrTy r) (tcrCExpr r)])
+        | (i,r) <- dbg "evidKeyCoreMpToBinds.independentOfAssumes" $! Map.toList independentOfAssumes
+        ]
+    )
+  where (independentOfAssumes, dependentOnAssumes)
+          = dbg "evidKeyCoreMpToBinds.partition"
+            $! Map.partition (\r -> Set.null (tcrUsed r))
+            $ dbg "evidKeyCoreMpToBinds.m"
+            $! m
+        dbg m = id -- Debug.tr m (pp m)
+        opts = feEHCOpts $ fiEnv env
+
+{-# LINE 599 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+type EvidCBindL = [CBind]
+
+evidKeyCoreMpToBinds2 :: FIIn' gm -> EvidKeyToCExprMap -> (EvidCBindL,EvidKeyToCBindMap,PredScopeToCBindMap)
+evidKeyCoreMpToBinds2 env m
+  = (   [ mkd i r
+        | (i,r) <- Map.toList independentOfAssumes
+        ]
+    , Map.unionsWith (++)
+      $ [ Map.singleton (subevdId $ head $ Set.toList $ tcrUsed r) [mkd i r]
+        | (i,r) <- Map.toList dependentOn1Assume
+        ]
+    , Map.unionsWith (++)
+      $ [ Map.singleton (deepestScope (tcrScope r) (tcrUsed r)) [mkd i r]
+        | (i,r) <- Map.toList dependentOnNAssumes
+        ]
+    )
+  where (independentOfAssumes, dependentOnAssumes)
+          = Map.partition (\r -> Set.null $ tcrUsed r) m
+        (dependentOn1Assume, dependentOnNAssumes)
+          = Map.partition (\r -> Set.size (tcrUsed r) == 1) m
+        -- mkd i e t         = acoreBind1Ty (mkHNm i) t e
+        mkd i r = acoreBind1Ty (mkHNm i) (SysF.ty2TyCforFFI opts $ tcrTy r) (tcrCExpr r)
+        deepestScope sc u = maximumBy pscpCmpByLen $ sc : (map subevdScope $ Set.toList u)
+        opts = feEHCOpts $ fiEnv env
+
+{-# LINE 627 "src/ehc/Pred/CtxtRedOnly/EvidenceToCore.chs" #-}
+evidKeyBindMpToCSubst :: EvidKeyToCBindMap -> CSubst
+evidKeyBindMpToCSubst
+  = acoreCSubstFromUidBindLL . Map.toList
+
diff --git a/src/UHC/Light/Compiler/Pred/CtxtRedOnly/Heuristics.hs b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/Heuristics.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/Heuristics.hs
@@ -0,0 +1,223 @@
+module UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+( Heuristic, SHeuristic
+, HeurAlts, HeurAlts' (..), HeurRed, HeurRed' (..)
+, toHeuristic
+, heurTry
+, localChoice
+, binChoice
+, solvable
+, heurScopedEHC )
+where
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.Ty.FitsInCommon2
+import UHC.Util.CHR
+import UHC.Light.Compiler.VarMp
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.Base.Common
+import Data.List (nub,partition)
+import Data.Maybe
+import UHC.Util.Pretty
+import UHC.Util.AGraph
+import UHC.Util.Utils
+
+{-# LINE 23 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+type Heuristic' p info = [info] -> HeurAlts' p info -> [(info, Evidence' p info)]
+
+type Heuristic = Heuristic' CHRPredOcc RedHowAnnotation
+
+type SHeuristic' p info = HeurAlts' p info -> Evidence' p info
+
+type SHeuristic = SHeuristic' CHRPredOcc RedHowAnnotation
+
+{-# LINE 39 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+data HeurAlts' p info
+  = HeurAlts
+     { redaltsPredicate  	:: p
+     , redaltsAlts  		:: [HeurRed' p info]
+     }
+
+type HeurAlts = HeurAlts' CHRPredOcc RedHowAnnotation
+
+data HeurRed' p info
+  = HeurRed
+     { redInfo           	:: info
+     , redContext   		:: [HeurAlts' p info]
+     }
+  | HeurRed_Rec
+     { redRecPred           :: p
+     }
+
+type HeurRed = HeurRed' CHRPredOcc RedHowAnnotation
+
+{-# LINE 60 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+instance Show (HeurAlts' p info) where
+  show _ = "HeurAlts"
+
+instance Show (HeurRed' p info) where
+  show _ = "HeurRed"
+
+{-# LINE 68 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+instance (PP p, PP info) => PP (HeurAlts' p info) where
+  pp x = "HeurAlts" >#< redaltsPredicate x >#< ppBracketsCommasBlock (redaltsAlts x)
+
+instance (PP p, PP info) => PP (HeurRed' p info) where
+  pp (HeurRed     i subs) = "HeurRed" >#< i >#< ppBracketsCommasBlock subs
+  pp (HeurRed_Rec p     ) = "HeurRec" >#< p
+
+{-# LINE 81 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+toHeuristic :: SHeuristic' p info -> Heuristic' p info
+toHeuristic h infos alts
+  = zip infos (repeat ev)
+  where ev = h alts
+
+{-# LINE 92 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+heurTry :: Eq p => SHeuristic' p info -> SHeuristic' p info -> SHeuristic' p info
+heurTry f g a  | null (evidUnresolved ev) = ev
+               | otherwise                = g a
+               where ev = f a
+
+{-# LINE 103 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+localChoice :: (Eq p, Eq info) => (p -> [info] -> [info]) -> SHeuristic' p info
+localChoice choose (HeurAlts p reds) =
+  case filter ((`elem` redinfos) . redInfo) reds of
+    []                    -> Evid_Unresolved p (concatMap evidUnresolved [ Evid_Proof p i evs | (i,evs) <- chs reds])
+    [r@(HeurRed_Rec p)]   -> Evid_Recurse p
+    [r@(HeurRed i   _)]   -> Evid_Proof p i (snd $ ch r)
+    rs                    -> reallyOverlapEvid p (chs rs)
+  where redinfos          = choose p (map redInfo reds)
+        ch (HeurRed i rs) = (i,map (localChoice choose) rs)
+        chs rs            = map ch rs
+
+{-# LINE 116 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+binChoice :: (Eq p, Eq info) => (info -> info -> PartialOrdering) -> SHeuristic' p info
+binChoice order = localChoice (const local)
+  where  local []  = []
+         local is  = [mx]
+                   where (mx,eqPairs) = heurMaximumBy order is
+
+{-# LINE 124 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+-- | Choose maximum, also giving list of equals of there are more maximum x-es
+heurChoose :: (x -> x -> PartialOrdering) -> (x,[x]) -> x -> (x,[x])
+heurChoose cmp (x,eqPairs) y
+  = case cmp x y of
+      P_LT -> (y,[])
+      P_GT -> (x,eqPairs)
+      P_EQ -> (x,if null eqPairs then [x,y] else y:eqPairs)
+
+heurMaximumBy :: (x -> x -> PartialOrdering) -> [x] -> (x,[x])
+heurMaximumBy cmp (x:xs)
+  = foldl (heurChoose cmp) (x,[]) xs
+
+{-# LINE 142 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+contextChoice :: Eq p => (p -> [HeurRed' p info] -> [HeurRed' p info]) -> SHeuristic' p info
+contextChoice choose (HeurAlts p reds) =
+  case choose p reds of
+         []                   -> Evid_Unresolved p [UnresolvedTrace_Fail p []]
+         [r@(HeurRed_Rec p)]  -> Evid_Recurse p
+         [r@(HeurRed i   _)]  -> Evid_Proof p i (snd $ ch r)
+         rs                   -> reallyOverlapEvid p (chs rs)
+  where ch (HeurRed i rs) = (i,map (contextChoice choose) rs)
+        chs rs            = map ch rs
+
+contextBinChoice :: Eq p => (HeurRed' p info -> HeurRed' p info -> PartialOrdering) -> SHeuristic' p info
+contextBinChoice order = contextChoice (const local)
+  where  local []                = []
+         local is | null eqPairs = [mx]
+                  | otherwise    = eqPairs
+                   where (mx,eqPairs) = heurMaximumBy order is			-- do something with equal pairs, construct Evid_Ambig perhaps?
+
+{-# LINE 167 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+reallyOverlapEvid :: p -> [(info,[Evidence' p info])] -> Evidence' p info
+reallyOverlapEvid p evs
+  = case filter (not . null . snd) evs of
+      []       -> Evid_Ambig p evs
+      [(i,ev)] -> Evid_Proof p i ev
+      _        -> Evid_Ambig p evs
+
+{-# LINE 186 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+solvable :: HeurAlts' p info -> HeurAlts' p info
+solvable (HeurAlts p rs) = HeurAlts p (catMaybes (map heu rs))
+   where heu h@(HeurRed info reds)  | all hasAlts reds'  = Just (HeurRed info  reds')
+                                    | otherwise          = Nothing
+                                    where reds' = map solvable reds
+         heu h@(HeurRed_Rec p    )                       = Just h
+
+hasAlts :: HeurAlts' p info -> Bool
+hasAlts (HeurAlts _ [])  = False
+hasAlts _                = True
+
+{-# LINE 205 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+cmpSpecificness :: CHRMatchable (FIIn' gm) Pred VarMp => FIIn' gm -> Pred -> Pred -> PartialOrdering
+cmpSpecificness env p q =
+  case  chrMatchTo env (emptyVarMp :: VarMp) p q of
+    Nothing  -> P_GT
+    Just _   -> case  chrMatchTo env (emptyVarMp :: VarMp) q p of
+                  Nothing  -> P_LT
+                  Just _   -> P_EQ
+
+{-# LINE 282 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+cmpEqReds :: RedHowAnnotation -> RedHowAnnotation -> PartialOrdering
+cmpEqReds r1                            r2                              = panic ("cmpEqReds: don't know how to deal with: " ++ show (pp r1) ++ " and " ++ show (pp r2))
+
+{-# LINE 305 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+anncmpEHCScoped :: CHRMatchable (FIIn' gm) Pred VarMp => Bool -> FIIn' gm -> HeurRed -> HeurRed -> PartialOrdering
+anncmpEHCScoped preferInst env ann1 ann2
+  = case (ann1,ann2) of
+      (HeurRed (RedHow_Assumption     _ _) _    , _                                        )              ->  P_GT
+      (_                                        , HeurRed (RedHow_Assumption     _ _) _    )              ->  P_LT
+      (HeurRed (RedHow_ByScope ByScopeRedHow_Assume) _
+                                                , _                                        )              ->  P_GT
+      (_                                        , HeurRed (RedHow_ByScope ByScopeRedHow_Assume) _)        ->  P_LT
+      (HeurRed_Rec _                            , _                                        )              ->  P_GT
+      (_                                        , HeurRed_Rec _                            )              ->  P_LT
+      (HeurRed (RedHow_ByInstance _ p   s) _    , HeurRed (RedHow_ByInstance _ q   t) _    )              ->  case pscpCmpByLen s t of
+                                                                                                                EQ   -> cmpSpecificness env p q
+                                                                                                                ord  -> toPartialOrdering ord
+      (HeurRed (RedHow_ByInstance _ _   s) _    , HeurRed (RedHow_ByScope _) [HeurAlts q _])              ->  toPartialOrdering $ pscpCmpByLen s (cpoScope q)
+      (HeurRed (RedHow_ByScope _) [HeurAlts p _], HeurRed (RedHow_ByInstance _ _   t) _    )              ->  toPartialOrdering $ pscpCmpByLen (cpoScope p) t
+      (HeurRed (RedHow_ByInstance _ _   _) _    , _                                        ) | preferInst ->  P_GT
+      (_                                        , HeurRed (RedHow_ByInstance _ _   _) _    ) | preferInst ->  P_LT
+      (HeurRed (RedHow_ByLabel     _ _  s) _    , HeurRed (RedHow_ByLabel     _ _  t) _    )              ->  toPartialOrdering $ pscpCmpByLen s t
+      (HeurRed (RedHow_ByLabel     _ _  _) _    , _                                        )              ->  P_GT
+      (_                                        , HeurRed (RedHow_ByLabel     _ _  _) _    )              ->  P_LT
+      (HeurRed (RedHow_BySuperClass _ _ _) _    , _                                        )              ->  P_GT
+      (_                                        , HeurRed (RedHow_BySuperClass _ _ _) _    )              ->  P_LT
+      (HeurRed (RedHow_ByScope _) [HeurAlts p _], HeurRed (RedHow_ByScope _) [HeurAlts q _])              ->  toPartialOrdering $ pscpCmpByLen (cpoScope p) (cpoScope q)
+      (HeurRed (RedHow_ByScope _) _             , _                                        )              ->  P_GT
+      (_                                        , HeurRed (RedHow_ByScope _) _             )              ->  P_LT
+      (HeurRed (RedHow_ByInstance _ _   _) _    , _                                        )              ->  P_GT
+      (_                                        , HeurRed (RedHow_ByInstance _ _   _) _    )              ->  P_LT
+      _                                                                                                   ->  panic ("anncmpEHCScoped: don't know how to deal with:\n  " ++ show (pp ann1) ++ "\n  " ++ show (pp ann2))
+
+{-# LINE 351 "src/ehc/Pred/CtxtRedOnly/Heuristics.chs" #-}
+heurScopedEHC :: CHRMatchable (FIIn' gm) Pred VarMp => FIIn' gm -> Heuristic
+heurScopedEHC env
+  = toHeuristic
+    $ ifthenelseSHeuristic isEqHeuristic
+        eqHeuristic
+{-
+        defaultHeuristic
+-}
+{-
+        $ heurTry (contextBinChoice (anncmpEHCScoped True  env))
+                  -- (contextBinChoice (anncmpEHCScoped False env))
+                  (contextChoice ehcOnlySuperReduce)
+-}
+        $ contextBinChoice (anncmpEHCScoped True  env)
+  where
+    isEqHeuristic _                            = False
+    eqHeuristic = binChoice cmpEqReds . solvable
+{-
+    defaultHeuristic
+      = contextBinChoice (anncmpEHCScoped env)
+-}
+
+ifthenelseSHeuristic :: (p -> Bool) -> SHeuristic' p info -> SHeuristic' p info -> SHeuristic' p info
+ifthenelseSHeuristic g t e alts
+  | g (redaltsPredicate alts) = t alts
+  | otherwise = e alts
+
diff --git a/src/UHC/Light/Compiler/Pred/CtxtRedOnly/RedGraph.hs b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/RedGraph.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/RedGraph.hs
@@ -0,0 +1,119 @@
+module UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph
+( module UHC.Util.AGraph
+, RedNode (..)
+, RedGraph', RedGraph, emptyRedGraph
+, mkRedGraphFromReductions, addToRedGraphFromReductions
+, addToRedGraphFromAssumes, mkRedGraphFromAssumes
+, ppRedGraph
+, addAssumption
+, addReduction
+, redPruneReductionsUntil
+, redAlternatives )
+where
+import UHC.Light.Compiler.Base.Common
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.VarMp
+import Data.Maybe
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import qualified Data.Map as Map
+import qualified Data.Set as Set
+import UHC.Util.AGraph
+import UHC.Util.Pretty
+import Data.Graph.Inductive.Graph
+import UHC.Util.Utils
+
+{-# LINE 34 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+data RedNode p
+  =  Red_Pred { rednodePred 	::  !p	 	}
+  |  Red_And  { rednodePreds 	::  ![p] 	}
+  deriving (Eq, Ord)
+
+mkRedNode :: [p] -> RedNode p
+mkRedNode [p] = Red_Pred p
+mkRedNode ps  = Red_And ps
+
+redNodePreds :: RedNode p -> [p]
+redNodePreds (Red_Pred  q) = [q]
+redNodePreds (Red_And  qs) = qs
+
+true  ::  RedNode p
+true  =   mkRedNode []
+
+{-# LINE 52 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+type RedGraph' p info = AGraph (RedNode p) info
+
+type RedGraph = RedGraph' CHRPredOcc RedHowAnnotation
+
+emptyRedGraph :: Ord p => RedGraph' p i
+emptyRedGraph = emptyAGraph
+
+{-# LINE 61 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+addToRedGraphFromReductions :: [Constraint] -> RedGraph -> RedGraph
+addToRedGraphFromReductions cs g = foldr addReduction g cs
+
+mkRedGraphFromReductions :: [Constraint] -> RedGraph
+mkRedGraphFromReductions cs = addToRedGraphFromReductions cs emptyRedGraph
+
+{-# LINE 69 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+addToRedGraphFromAssumes :: ConstraintToInfoMap -> RedGraph -> RedGraph
+addToRedGraphFromAssumes cm g = Map.foldrWithKey addAssumption g cm
+
+mkRedGraphFromAssumes :: ConstraintToInfoMap -> RedGraph
+mkRedGraphFromAssumes cm = addToRedGraphFromAssumes cm emptyRedGraph
+
+{-# LINE 77 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+instance PP p => Show (RedNode p) where
+  show = showPP . pp
+
+instance PP p => PP (RedNode p) where
+  pp (Red_Pred p)    = pp p
+  pp (Red_And [])    = pp "True"
+  pp (Red_And _ )    = pp "And"
+
+{-# LINE 87 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+ppRedGraph :: (PP p, PP i) => RedGraph' p i -> PP_Doc
+ppRedGraph ag = "RedGraph" >-< indent 2 ((ppBracketsCommasBlock $ nodes g) >-< (ppBracketsCommasBlock $ edges g) >-< pp (show g))
+  where g = agraphGraph ag
+
+{-# LINE 97 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+addAssumption :: Constraint -> [RedHowAnnotation] -> RedGraph -> RedGraph
+addAssumption (Assume  p)  is  = insertEdges (zip3 (repeat (Red_Pred p)) (repeat true) is)
+addAssumption _            _   = id
+
+{-# LINE 103 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+addReduction :: Constraint -> RedGraph -> RedGraph
+addReduction (Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=[q]})
+                                    =  insertEdge (Red_Pred p, Red_Pred q  , i)
+addReduction (Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=ps})
+                                    =  let  andNd  = Red_And ps
+                                            edges  = map (\q -> (andNd, Red_Pred q, i)) ps
+                                       in   insertEdges ((Red_Pred p, andNd, i) : edges)
+addReduction _                      =  id
+
+{-# LINE 121 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+redPruneReductionsUntil :: [CHRPredOcc] -> (CHRPredOcc -> Bool) -> RedGraph -> RedGraph
+redPruneReductionsUntil leaves stop gr
+  = dels (map Red_Pred leaves) gr
+  where dels leaves g = foldr del g leaves
+        del  leaf   g | all (not . stop)
+                        $ redNodePreds leaf = dels (map snd pres)
+                                              $ deleteNode leaf
+                                              $ foldr (\(_,from) g -> deleteEdge (from,leaf) g) g pres
+                      | otherwise           = g
+          where pres = predecessors g leaf
+
+{-# LINE 138 "src/ehc/Pred/CtxtRedOnly/RedGraph.chs" #-}
+redAlternatives :: RedGraph -> CHRPredOcc -> HeurAlts
+redAlternatives gr
+  = recOr Set.empty
+  where  recOr visited p = HeurAlts p (map (recAnd visited') (successors gr (Red_Pred p)))
+           where visited' = Set.insert p visited
+
+         recAnd visited (i, n)
+           = HeurRed i (map mk qs)
+           where qs = redNodePreds n
+                 mk q | Set.member q visited = HeurAlts q [HeurRed_Rec q]
+                      | otherwise            = recOr visited q
+
diff --git a/src/UHC/Light/Compiler/Pred/CtxtRedOnly/ToCHR.hs b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/ToCHR.hs
new file mode 100644
--- /dev/null
+++ b/src/UHC/Light/Compiler/Pred/CtxtRedOnly/ToCHR.hs
@@ -0,0 +1,343 @@
+module UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR
+( CHRClassDecl, CHRScopedInstanceDecl
+, initCHRStore
+, mkScopedCHR2
+, SimplifyResult, SimplifyResult'' (..), emptySimplifyResult
+, simplifyResultResetForAdditionalWork
+, partitionUnresolved2AssumableAndOthers
+, patchUnresolvedWithAssumption
+, chrSimplifySolveToRedGraph
+, chrSimplifyRedGraphToEvidence )
+where
+import UHC.Light.Compiler.Opts
+import UHC.Light.Compiler.Base.Common
+import UHC.Light.Compiler.Base.TermLike
+import UHC.Light.Compiler.Ty
+import UHC.Light.Compiler.Ty.Ftv
+import UHC.Light.Compiler.Error
+import UHC.Light.Compiler.VarMp
+import UHC.Light.Compiler.Substitutable
+import Data.Maybe
+import qualified Data.Set as Set
+import qualified Data.Map as Map
+import UHC.Util.CHR
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Guard
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Solve
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics
+import UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence
+import UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph
+import UHC.Light.Compiler.Ty.FitsInCommon2
+import UHC.Light.Compiler.Ty.Trf.Canonic
+import UHC.Util.Pretty
+import UHC.Util.Utils
+import UHC.Light.Compiler.Base.HsName.Builtin
+
+
+{-# LINE 36 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+type CHRClassDecl'          a info      = ([a], a, [info])
+type CHRClassDecl                       = CHRClassDecl' Pred RedHowAnnotation
+type CHRScopedInstanceDecl' a info sc   = ([a], a, info, sc)
+type CHRScopedInstanceDecl              = CHRScopedInstanceDecl' Pred RedHowAnnotation PredScope
+
+{-# LINE 47 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+type MkRes1 = (CHRStore, ([CHRPredOcc],CHRPredOcc) )
+type MkResN = (CHRStore,[([CHRPredOcc],CHRPredOcc)])
+
+{-# LINE 56 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+([sc1,sc2,sc3]
+ ,[pr1,pr2,pr3]
+ ,[ty1,ty2,ty3,ty4]
+ ,[lab1]
+ ,[off1]
+ ,[pr1v]
+ ,[pa1]
+ )
+  = ( map PredScope_Var [u1,u2,u3]
+    , map Pred_Var [u7,u8,u9]
+    , map mkTyMetaVar {- mkTyVar -} [u10,u11,u14,u15]
+    , map Label_Var [u12]
+    , map LabelOffset_Var [u13]
+    , [u7]
+    , map PredSeq_Var [u4]
+    )
+  where [u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15] = mkNewLevUIDL 15 uidStart
+
+{-# LINE 101 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+-- | The basic initial set of CHRs
+initCHRStore :: CHRStore
+initCHRStore
+  = chrStoreFromElems $
+      [ scopeProve, {- scopeAssum1, -} scopeAssum2 ]
+      ++ [ labelProve1, labelProve2 ]
+      ++ [ instForall, predArrow, predSeq1, predSeq2 ]
+  where p1s1         = mkCHRPredOcc pr1 sc1
+        p1s2         = mkCHRPredOcc pr1 sc2
+        p1s3         = mkCHRPredOcc pr1 sc3
+        scopeProve   = [mkProve p1s1, mkProve p1s2]
+                         ==> [mkReduction p1s2 (RedHow_ByScope (ByScopeRedHow_Other $ AlwaysEq "prv")) [p1s3]]
+                          =| [IsStrictParentScope sc3 sc1 sc2]
+{-
+        scopeAssum1  = [mkProve p1s1, mkAssume p1s2]
+                         ==> [mkReduction p1s1 (RedHow_Assumption sc2) []]
+                          =| [EqualScope sc1 sc2]
+-}
+        scopeAssum2  = [mkProve p1s1, mkAssume p1s2]
+                         ==> [mkReduction p1s1 (RedHow_ByScope ByScopeRedHow_Assume) [p1s2]]
+                          =| [NotEqualScope sc1 sc2,IsVisibleInScope sc2 sc1]
+        l1s1         = mkCHRPredOcc (Pred_Lacks ty1 lab1) sc1
+        l2s1         = mkCHRPredOcc (Pred_Lacks ty2 lab1) sc1
+        l3s1         = mkCHRPredOcc (Pred_Lacks recRowEmp lab1) sc1
+        labelProve1  = [mkProve l1s1]
+                         ==> [mkProve l2s1, mkReduction l1s1 (RedHow_ByLabel lab1 off1 sc1) [l2s1]]
+                          =| [NonEmptyRowLacksLabel ty2 off1 ty1 lab1]
+        labelProve2  = [mkProve l3s1]
+                         ==> [mkReduction l3s1 (RedHow_ByLabel lab1 (LabelOffset_Off 0) sc1) []]
+        f1s1         = mkCHRPredOcc (tyPred $ mkTyQu tyQu_Forall [(pr1v,kiStar)] $ mkTyPr pr1) sc1	-- TBD
+        f2s1         = mkCHRPredOcc pr1 sc1
+        instForall   = [mkAssume f1s1]
+                         ==> [mkAssume f2s1]
+        a1s1         = mkCHRPredOcc (Pred_Arrow pa1 pr1) sc1
+        a2s1         = mkCHRPredOcc pr1 sc1
+        a3s1         = mkCHRPredOcc (Pred_Preds pa1) sc1
+        predArrow    = [mkAssume a1s1, mkProve a2s1]
+                         ==> [mkProve a3s1, mkReduction a2s1 (RedHow_ByInstance hsnUnknown pr1 sc1) [a1s1,a3s1]]
+        s1s1         = mkCHRPredOcc (Pred_Preds (PredSeq_Cons pr1 pa1)) sc1
+        s2s1         = mkCHRPredOcc pr1 sc1
+        s3s1         = mkCHRPredOcc (Pred_Preds pa1) sc1
+        predSeq1     = [mkProve s1s1]
+                         <=> [mkProve s2s1, mkProve s3s1]
+        predSeq2     = [mkProve $ mkCHRPredOcc (Pred_Preds PredSeq_Nil) sc1]
+                         <=> ([] :: [Constraint])
+        -- inclSc       = ehcCfgCHRInclScope $ feEHCOpts $ fiEnv env
+
+{-# LINE 190 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+-- | Construct CHRs from class and instance decls
+mkScopedCHR2
+  :: FIIn -> [CHRClassDecl] -> [CHRScopedInstanceDecl]
+       -> CHRStore -> (CHRStore,CHRStore)
+mkScopedCHR2 env clsDecls insts prevStore
+  = (chrStoreUnions [store2,instSimplStore], chrStoreUnions [assumeStore,instSimplStore])
+  where  ucls        = mkNewLevUIDL (length clsDecls) $ fiUniq env
+         ((assumeStore,assumePredOccs), (instStore,_))
+                     = mkScopedChrs clsDecls canonInsts
+         store2      = chrStoreUnions [assumeStore,prevStore]
+         simplStores = zipWith (\u (cx,h,i) -> mkClassSimplChrs (env {fiUniq = u}) store2 (cx,h,i)) ucls clsDecls
+         instSimplStore
+         			 = chrStoreUnions $ instStore : simplStores
+         canonInsts  = [ (map mkC cx, mkC hd, info, sc) | (cx,hd,info,sc) <- insts ]
+                     where mkC = fst . predCanonic (emptyTyBetaRedEnv {tbredFI=env})
+
+{-# LINE 208 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+-- | Construct simplification CHRs from class decls, building upon a given CHR store
+mkClassSimplChrs :: FIIn -> CHRStore -> CHRClassDecl -> CHRStore
+mkClassSimplChrs env rules (context, head, infos)
+  = simps
+  where simps        = chrStoreFromElems $ mapTrans (Set.fromList [head1]) [] head1 (zip infos (map (\p -> Red_Pred $ mkCHRPredOcc p sc1) context))
+        (superClassesWork, superClassesDone, _ :: SolveTrace FIIn Constraint Guard Prio VarMp)
+                     = chrSolve' [] env rules (map (\p -> {- toSolverConstraint $ -} mkAssume $ mkCHRPredOcc p sc1) context)
+        superClasses = superClassesWork ++ superClassesDone
+        graph        = mkRedGraphFromReductions {- $ filterMb fromSolverConstraint -} superClasses
+        head1        = mkCHRPredOcc head sc1
+        head2        = mkCHRPredOcc head sc2
+        head3        = mkCHRPredOcc head sc3
+
+        mapTrans done reds subClass
+          = concatMap (transClosure done reds subClass)
+            . filter (\(_,x) -> not (rednodePred x `Set.member` done))
+
+        transClosure done reds par (info, pr@(Red_Pred p@(CHRPredOcc {cpoPr = super})))
+          = [superRule] ++ ({-if ehcCfgCHRScoped opts >= CHRScopedMutualSuper then -} [scopeRule1, scopeRule2] {- else [] -}) ++ rules
+          where super1     = mkCHRPredOcc super sc1
+                super2     = mkCHRPredOcc super sc2
+                super3     = mkCHRPredOcc super sc3
+                superRule  = [mkProve head1, mkProve p] ==> reds'
+                scopeRule1 = [mkProve head1, mkProve super2]
+                               ==> [mkProve head3, mkReduction head1 (RedHow_ByScope (ByScopeRedHow_Other $ AlwaysEq "sup1")) [head3]]
+                                 =| [HasStrictCommonScope sc3 sc1 sc2]
+                scopeRule2 = [mkProve head2, mkProve super1]
+                               ==> [mkProve super3, mkReduction super1 (RedHow_ByScope (ByScopeRedHow_Other $ AlwaysEq "sup2")) [super3]]
+                                 =| [HasStrictCommonScope sc3 sc1 sc2]
+                reds'      = mkReduction p info [par] : reds
+                rules      = mapTrans (Set.insert p done) reds' p (predecessors graph pr)
+
+        opts          = feEHCOpts $ fiEnv env
+
+mkScopedChrs :: [CHRClassDecl] -> [CHRScopedInstanceDecl] -> (MkResN,MkResN)
+mkScopedChrs clsDecls insts
+  = ((chrStoreUnions assumeStores,assumePredOccs), instChrs)
+  where (assumeStores,assumePredOccs) = unzip $ mapMaybe mkAssumeChrs clsDecls
+        instChrs   = mkInstanceChrs insts
+
+mkAssumeChrs :: CHRClassDecl -> Maybe MkRes1
+mkAssumeChrs ([]     ,  _  , _    ) = Nothing
+mkAssumeChrs (context, head, infos) =
+  let prThis = mkCHRPredOcc head sc1
+      super prSuper info = [mkAssume prSuper, mkReduction prSuper info [prThis]]
+      prSuper = map (\c -> mkCHRPredOcc c sc1) context
+  in  Just ( chrStoreSingletonElem $ [mkAssume prThis] ==> concat (zipWith super prSuper infos)
+           , (prSuper,prThis)
+           )
+
+mkInstanceChrs :: [CHRScopedInstanceDecl] -> MkResN
+mkInstanceChrs insts
+  = (chrStoreUnions instStores,instChrs)
+  where (instStores,instChrs) = unzip $ map mkInstanceChr insts
+
+mkInstanceChr :: CHRScopedInstanceDecl -> MkRes1
+mkInstanceChr (context, hd, i, s)
+  = ( chrStoreSingletonElem
+      $ [mkProve constraint]
+          ==> mkReduction constraint i body : map mkProve body
+            =| [s `IsVisibleInScope` sc1]
+    , (body,constraint)
+    )
+  where constraint = mkCHRPredOcc hd sc1
+        body = map (\p -> mkCHRPredOcc p sc1) context
+
+{-# LINE 282 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+data SimplifyResult'' p i g pr s
+  = SimplifyResult
+      { simpresSolveState		:: SolveState FIIn (Constraint' p i) g pr s
+      , simpresRedGraph			:: RedGraph' p i
+
+      -- for debugging only:
+      , simpresRedAlts			:: [HeurAlts' p i]
+      , simpresRedTrees			:: [[(i, Evidence' p i)]]
+      , simpresRedGraphs		:: [(String,RedGraph' p i)]
+      , simpresRemPredL         :: [p]							-- remaining pred occurrences, which cannot be proven, as a list
+      }
+
+type SimplifyResult' g s = SimplifyResult'' CHRPredOcc RedHowAnnotation g Prio s
+
+type SimplifyResult = SimplifyResult' Guard VarMp
+
+emptySimplifyResult :: SimplifyResult
+emptySimplifyResult
+  = SimplifyResult
+      emptySolveState emptyRedGraph
+      [] [] [] []
+
+{-# LINE 306 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+simplifyResultResetForAdditionalWork :: SimplifyResult -> SimplifyResult
+simplifyResultResetForAdditionalWork r = r {simpresRedGraph = emptyRedGraph}
+
+{-# LINE 315 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+mkEvidence
+  :: Heuristic
+  -> ConstraintToInfoMap
+  -> RedGraph
+  -> ( -- ConstraintToInfoMap						-- remaining constraints
+       ConstraintToInfoTraceMp						-- remaining constraints
+     , InfoToEvidenceMap							-- mapping to evidence
+     , [Err]											-- errors
+     )
+mkEvidence heur cnstrMp redGraph
+  = ( {- (cnstrMp `Map.intersection` remCnstrMp) `Map.union` -}
+      cnstrTraceMpFromList remCnstrMp
+    , evidMp
+    , err
+    )
+  where (remCnstrMp,evidMp,err,dbg)
+          = foldl (\(cm,em,err,dbg) c -> let (cm',em',err',dbg') = mk c in (cm' ++ cm, evidMpUnion em' em, err' ++ err, dbg' ++ dbg))
+                  ([],Map.empty,[],[])
+            $ Map.toList cnstrMp
+        mk (Prove p, infos)
+          = (remCnstrMp,evidMp,[],[(redAlts,redTrees)])
+          where redAlts    = redAlternatives redGraph p
+                redTrees   = heur infos redAlts
+                evidMp     = foldr (uncurry evidMpInsert) Map.empty redTrees
+                remCnstrMp = [ (Prove (utraceRedFrom u),(i,[u])) | (i,t) <- redTrees, u <- evidUnresolved t ]
+        mk (c, infos)
+          = ([ (c,(i,[])) | i <- infos],Map.empty,[],[])
+
+{-# LINE 375 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+partitionUnresolved2AssumableAndOthers :: ConstraintToInfoTraceMp -> ([CHRIntermediateUntilAssume],ConstraintToInfoTraceMp)
+partitionUnresolved2AssumableAndOthers unresCnstrMp
+  = (unres,cannotResCnstrMp)
+  where (unresCnstrMp',cannotResCnstrMp)
+                      = Map.partitionWithKey canAssume unresCnstrMp
+                      where -- if p only ranges over non-fixed tvars, we potentially can assume them (if not found ambiguous later)
+                            canAssume (Prove p) _ = Map.null $ Map.filter (tvCatIsFixed . tvinfoCateg) $ tyFtvMp $ predTy $ cpoPr p
+                            canAssume _         _ = True
+        unres         = [ (p,x) | (Prove p,x) <- shareUnresolvedAssumptionsByScope (unresCnstrMp') ]
+
+{-# LINE 387 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+-- | Group unresolved constraints, reducing the various scopes to the outermost scope.
+--   Find assume's wich have a common scope prefix, then share these.
+--   Assumption: we will never share outer scopes because we only get passed inner scopes, because these will be abstracted over in bindings of a let expression.
+shareUnresolvedAssumptionsByScope :: ConstraintToInfoTraceMp -> [(Constraint,(PredScope,ConstraintToInfoTraceMp))]
+shareUnresolvedAssumptionsByScope unres
+  = [ ( c
+      , ( -- the common prefix off all scopes, i.e. the most global scope
+          foldr1 (\s1 s2 -> panicJust "shareUnresolvedAssumptionsByScope" $ pscpCommon s1 s2)
+                 [ cpoScope $ cnstrPred c | (c,_) <- cs ]
+          -- all original info for this predicate
+        , Map.fromList cs
+        )
+      )
+    | cs@((c,_):_) <-
+        -- sort, then group by predicate, so we get all scopes for each predicate
+        groupSortOn (cpoPr . cnstrPred . fst) $ Map.toList unres
+    ]
+
+{-# LINE 411 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+-- | Transform unresolved Prove constraints to Assume variants, used either for quantification over, or for error messages about unresolved predicates
+patchUnresolvedWithAssumption :: FIIn -> [CHRIntermediateUntilAssume] -> RedGraph -> InfoToEvidenceMap -> (ConstraintToInfoTraceMp,InfoToEvidenceMap)
+patchUnresolvedWithAssumption env unres redGraph evidMp
+  = ( assumeCnstrs
+    , evidMpSubst (\p -> Map.lookup p assumeSubstMp) evidMp
+    )
+  where us = mkNewLevUIDL (length unres) $ fiUniq env
+        assumeCnstrs
+          = cnstrMpUnions
+              [ cnstrTraceMpSingleton c i (concat [ us | es <- Map.elems trMap, (_,us) <- es ])
+              | ((p,(sc,trMap)),u) <- zip unres us
+              , let (c,i) = rngLift emptyRange mkAssumeConstraint (cpoPr p) u sc
+              ]
+        assumeSubstMp
+          = Map.fromList [ (p,Evid_Proof p i []) | (Assume p,((i,_):_)) <- Map.toList assumeCnstrs ]
+
+{-# LINE 433 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+chrSimplifySolveToRedGraph
+  ::   FIIn
+    -> CHRStore
+    -> ConstraintToInfoMap
+    -> ConstraintToInfoMap
+    -> SimplifyResult
+    -> ( ConstraintToInfoMap
+       , SimplifyResult
+       )
+chrSimplifySolveToRedGraph env chrStore cnstrInfoMpPrev cnstrInfoMp prevRes
+  = ( cnstrInfoMpAll
+    , emptySimplifyResult
+        { simpresSolveState = solveState
+        , simpresRedGraph   = redGraph
+        , simpresRedGraphs  = ("chrSimplifySolveToRedGraph",redGraph) : simpresRedGraphs prevRes
+        }
+    )
+  where (_,u1,u2) = mkNewLevUID2 $ fiUniq env
+        solveState = chrSolve'' [] (env {fiUniq = u1}) chrStore ({- map toSolverConstraint $ -} Map.keys $ cnstrInfoMp `Map.difference` cnstrInfoMpPrev) (simpresSolveState prevRes)
+        cnstrInfoMpAll = cnstrMpUnion cnstrInfoMp cnstrInfoMpPrev
+        redGraph
+          = addToRedGraphFromReductions ({- filterMb fromSolverConstraint $ -} chrSolveStateDoneConstraints solveState)
+            $ addToRedGraphFromAssumes cnstrInfoMpAll
+            $ simpresRedGraph prevRes
+
+{-# LINE 464 "src/ehc/Pred/CtxtRedOnly/ToCHR.chs" #-}
+chrSimplifyRedGraphToEvidence
+  :: Heuristic
+  -> ConstraintToInfoMap
+  -> SimplifyResult
+  -> ( ( ConstraintToInfoTraceMp, InfoToEvidenceMap, [Err] )
+     , SimplifyResult
+     )
+chrSimplifyRedGraphToEvidence heur cnstrInfoMpAll simpRes
+  = ( (chrSolveRemCnstrMp,chrSolveEvidMp,chrSolveErrs)
+    , simpRes
+    )
+  where ( chrSolveRemCnstrMp,chrSolveEvidMp,chrSolveErrs
+         )
+          = mkEvidence heur cnstrInfoMpAll (simpresRedGraph simpRes)
+
diff --git a/src/UHC/Light/Compiler/Pred/Evidence.hs b/src/UHC/Light/Compiler/Pred/Evidence.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/Pred/Evidence.hs
+++ /dev/null
@@ -1,123 +0,0 @@
-module UHC.Light.Compiler.Pred.Evidence
-( Evidence, Evidence' (..)
-, evidUnresolved
-, evidUpdateUnresolved
-, InfoToEvidenceMap, evidMpInsert, evidMpUnion, evidMpSubst )
-where
-import UHC.Util.CHR
-import UHC.Light.Compiler.Substitutable
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.VarMp
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.Base.Common
-import Data.List
-import qualified Data.Set as Set
-import qualified Data.Map as Map
-import Data.Maybe
-import UHC.Util.Pretty
-import UHC.Util.Utils
-
-{-# LINE 39 "src/ehc/Pred/Evidence.chs" #-}
-data Evidence' p info
-  =  Evid_Unresolved { evidPred :: !p                       , evidTrace     :: ![UnresolvedTrace' p info]    }
-  -- =  Evid_Unresolved { evidPred :: !p                       , evidAttempts  :: ![Evidence' p info]           }
-  |  Evid_Proof      { evidPred :: !p  , evidInfo :: !info  , evidProofSubs :: ![Evidence' p info]           }
-  |  Evid_Recurse    { evidPred :: !p                                                                       }
-  |  Evid_Ambig      { evidPred :: !p                       , evidAmbigSubs :: ![(info,[Evidence' p info])]  }
-
-type Evidence = Evidence' CHRPredOcc RedHowAnnotation
-
-{-# LINE 50 "src/ehc/Pred/Evidence.chs" #-}
-instance (Show info, Show p) => Show (Evidence' p info) where
-  show _ = "Evidence"
-
-instance (Eq p, Eq info) => Eq (Evidence' p info) where
-  (Evid_Proof _ i1 evs1) == (Evid_Proof _ i2 evs2) = i1 == i2 && evs1 == evs2
-  (Evid_Recurse p1     ) == (Evid_Recurse p2     ) = p1 == p2
-  _                      == _                      = False
-
-instance (Ord p, Ord info) => Ord (Evidence' p info) where
-  Evid_Unresolved _ _    `compare` _                      = LT
-  _                      `compare` Evid_Unresolved _ _    = GT
-  Evid_Proof _ i1 evs1   `compare` Evid_Proof _ i2 evs2   = orderingLexic (i1 `compare` i2 : zipWith compare evs1 evs2)
-  Evid_Proof _ _  _      `compare` _                      = LT
-  _                      `compare` Evid_Proof _ _  _      = GT
-  Evid_Recurse p1        `compare` Evid_Recurse p2        = p1 `compare` p2
-  Evid_Recurse _         `compare` _                      = LT
-  _                      `compare` Evid_Recurse _         = GT
-
-{-# LINE 70 "src/ehc/Pred/Evidence.chs" #-}
-instance (PP info, PP p) => PP (Evidence' p info) where
-  pp (Evid_Proof _ info []) = "Ev:"             >#< info
-  pp (Evid_Proof _ info es) = "Ev:"             >#< info >#< ppBracketsCommas' es
-  pp (Evid_Recurse p      ) = "Ev: recurse:"    >#< p
-  pp (Evid_Ambig _     ess) = "Ev: ambiguous:"  >#< ppBracketsCommas' (map (ppBracketsCommas . snd) ess)
-  pp (Evid_Unresolved p  _) = "Ev: unresolved:" >#< p
-
-{-# LINE 79 "src/ehc/Pred/Evidence.chs" #-}
-type instance ExtrValVarKey (Evidence' p info) = ExtrValVarKey p
-
-instance (VarExtractable p) => VarExtractable (Evidence' p info) where
-  varFreeSet            (Evid_Unresolved  p   _ )    = varFreeSet p
-  varFreeSet            (Evid_Proof       p _ es)    = Set.unions $ varFreeSet p : map varFreeSet es
-  varFreeSet            (Evid_Recurse     p     )    = varFreeSet p
-  varFreeSet            (Evid_Ambig       p  ess)    = Set.unions $ varFreeSet p : map (Set.unions . map varFreeSet . snd) ess
-
-instance VarUpdatable p s => VarUpdatable (Evidence' p info) s where
-  -- type SubstVarKey s = SubstVarKey s
-  -- type SubstVarVal s = SubstVarVal s
-  varUpd s     (Evid_Unresolved  p   u )    = Evid_Unresolved (varUpd s p) u
-  varUpd s     (Evid_Proof       p i es)    = Evid_Proof      (varUpd s p) i (map (varUpd s) es)
-  varUpd s     (Evid_Recurse     p     )    = Evid_Recurse    (varUpd s p)
-  varUpd s     (Evid_Ambig       p  ess)    = Evid_Ambig      (varUpd s p) (assocLMapElt (map (varUpd s)) ess)
-
-{-# LINE 101 "src/ehc/Pred/Evidence.chs" #-}
--- | Get unresolved trace from evidence from which is known is belongs to unresolved predicate
-evidUnresolved :: Eq p => Evidence' p info -> [UnresolvedTrace' p info]
-evidUnresolved (Evid_Unresolved p us)	= -- concatMap evidUnresolved us
-                                          us
-evidUnresolved (Evid_Proof p i ps)
-               | null us            	= []
-               | otherwise          	= [UnresolvedTrace_Red p i us]
-               where us = {- nub $ -} concatMap evidUnresolved ps
-evidUnresolved (Evid_Ambig p  pss)
-               | null us            	= []
-               | otherwise          	= [UnresolvedTrace_Overlap p us]
-               where us = {- nub $ concatMap -} map (\(i,ps) -> (i,concatMap evidUnresolved ps)) pss
-evidUnresolved _                    	= []
-
-{-# LINE 117 "src/ehc/Pred/Evidence.chs" #-}
--- | Choose proof over unresolved, to be used when patching evidence with newfound proofs
-evidUpdateUnresolved :: Eq p => Evidence' p info -> Evidence' p info -> Evidence' p info
-evidUpdateUnresolved e                        (Evid_Unresolved _ _)= e
-evidUpdateUnresolved (Evid_Proof p i qs)      e                    = Evid_Proof   p i [evidUpdateUnresolved q e | q <- qs]
-evidUpdateUnresolved (Evid_Recurse p   )      e                    = Evid_Recurse p
-evidUpdateUnresolved u@(Evid_Unresolved q _)  e     | q == evidPred e = e
-                                                    | otherwise       = u
-
-{-# LINE 127 "src/ehc/Pred/Evidence.chs" #-}
-evidSubstUnresolved :: (p -> Maybe (Evidence' p info)) -> Evidence' p info -> Evidence' p info
-evidSubstUnresolved lkup ev
-  = s ev
-  where s ev = case ev of
-                 Evid_Unresolved p _
-                   | isJust mbev   -> fromJust mbev
-                   where mbev = lkup p
-                 Evid_Proof p i es -> Evid_Proof p i $ map s es
-                 Evid_Ambig p  ess -> Evid_Ambig p $ assocLMapElt (map s) ess
-                 _                 -> ev
-
-{-# LINE 144 "src/ehc/Pred/Evidence.chs" #-}
-type InfoToEvidenceMap' p info = Map.Map info (Evidence' p info)
-
-type InfoToEvidenceMap = InfoToEvidenceMap' CHRPredOcc RedHowAnnotation
-
-evidMpInsert :: (Eq p, Ord info) => info -> Evidence' p info -> InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info
-evidMpInsert = Map.insertWith evidUpdateUnresolved
-
-evidMpUnion :: (Eq p, Ord info) => InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info
-evidMpUnion = Map.unionWith evidUpdateUnresolved
-
-evidMpSubst :: (p -> Maybe (Evidence' p info)) -> InfoToEvidenceMap' p info -> InfoToEvidenceMap' p info
-evidMpSubst lkup = Map.map (evidSubstUnresolved lkup)
-
diff --git a/src/UHC/Light/Compiler/Pred/EvidenceToCore.hs b/src/UHC/Light/Compiler/Pred/EvidenceToCore.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/Pred/EvidenceToCore.hs
+++ /dev/null
@@ -1,530 +0,0 @@
-module UHC.Light.Compiler.Pred.EvidenceToCore
-( EvidKeyToCBindMap, PredScopeToCBindMap, EvidKeyToCExprMap
-, OverlapEvid, OverlapEvid' (..)
-, evidKeyToBindMapUnion, predScopeToBindMapUnion
-, evidMpToCore
-, EvidCBindL, evidKeyCoreMpToBinds2
-, evidKeyBindMpToCSubst )
-where
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Constraint
-import Data.List
-import qualified Data.Set as Set
-import qualified Data.Map as Map
-import Data.Maybe
-import UHC.Light.Compiler.Base.Common
-import UHC.Light.Compiler.Ty.FitsInCommon2
-import UHC.Light.Compiler.Core
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.Core.Utils
-import UHC.Light.Compiler.Core.Subst
-import UHC.Light.Compiler.AbstractCore
-import qualified UHC.Light.Compiler.Core.SysF.AsTy as SysF
-import UHC.Util.Pretty
-import UHC.Util.Utils
-import Control.Monad.State
-import Debug.Trace
-
-
-
-{-# LINE 53 "src/ehc/Pred/EvidenceToCore.chs" #-}
-type EvidKeyToExprMap' e t = Map.Map UID (ToCoreRes e t) -- (e,t,Set.Set SubEvid,PredScope)
-type EvidKeyToBindMap' b = Map.Map UID [b]
-type PredScopeToBindMap' b = Map.Map PredScope [b]
-
-type EvidKeyToCExprMap = EvidKeyToExprMap' CExpr Ty
-type EvidKeyToCBindMap = EvidKeyToBindMap' CBind
-type PredScopeToCBindMap = PredScopeToBindMap' CBind
-
-{-# LINE 66 "src/ehc/Pred/EvidenceToCore.chs" #-}
-data OverlapEvid' p info
-  = OverlapEvid
-      { overlapevidPredOcc  :: !p
-      , overlapevidInfos    :: ![info]
-      }
-
-type OverlapEvid = OverlapEvid' CHRPredOcc RedHowAnnotation
-
-{-# LINE 76 "src/ehc/Pred/EvidenceToCore.chs" #-}
-evidKeyToBindMapUnion :: EvidKeyToBindMap' e -> EvidKeyToBindMap' e -> EvidKeyToBindMap' e
-evidKeyToBindMapUnion = Map.unionWith (++)
-
-predScopeToBindMapUnion :: PredScopeToBindMap' b -> PredScopeToBindMap' b -> PredScopeToBindMap' b
-predScopeToBindMapUnion = Map.unionWith (++)
-
-{-# LINE 88 "src/ehc/Pred/EvidenceToCore.chs" #-}
--- | Translate evidence to actual core, taking into account the need to share (i.e. do CSE, by state accumulating maps).
---   Cleanup dd 20120209, rewrite to State version.
-evidMpToCore2 :: FIIn' gm -> InfoToEvidenceMap -> (EvidKeyToCExprMap,[OverlapEvid])
-evidMpToCore2 env evidMp
-  = ( -- Map.map (\r -> (tcrCExpr r,tcrTy r,tcrUsed r,tcrScope r)) $
-      tcsMp
-      $ execState (mapM (\(RedHow_ProveObl i _,ev) -> mk1 (Just i) ev) evidMp')
-                  (ToCoreState Map.empty Map.empty Map.empty (fiUniq env))
-    , concat overlaps
-    )
-  where -- | Split off overlapping instances (i.e. ambiguous evidence)
-        (evidMp',overlaps)
-          = unzip [ ((i,ev3),as)
-                  | (i,ev) <- Map.toList evidMp, not (ignore ev)
-                  , let (ev2,as) = splitOverlap ev ; ev3 = stripScope ev2
-                  ]
-
-        -- | Make Core for a single Evidence, recursing for subevidence
-        mk1 :: Maybe UID									-- an UID already may have been assigned, it then should be used (the case for start evidence of this fun)
-            -> Evidence			-- the evidence
-            -> State (ToCoreState CExpr Ty) (ToCoreRes CExpr Ty)
-        mk1 mbevk ev
-          = case ev of
-              Evid_Proof p info evs
-                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
-                       ; let (u',evk,insk,evnm,uses)
-                                = case info of
-                                    RedHow_ProveObl   i   _ -> (u,choosek i,True,choosen $ mkHNm i,Set.empty)
-                                    RedHow_Assumption vun s -> (u,choosek i,False,choosen (vunmNm vun),Set.singleton (SubEvid_Assume i s))
-                                                            where i = vunmId vun
-                                    _                       -> (u1,choosek u2,True,choosen $ mkHNm u2,Set.empty)
-                                                            where (u1,u2) = mkNewUID u
-                       ; modify (\st -> st {tcsUniq = u', tcsPrMp = Map.insert p evnm $ tcsPrMp st})
-                       ; rs <- mapM (mk1 Nothing) evs
-                       ; let (c,sc) = ann info rs
-                       ; ins (insk || isJust mbevk)
-                             evk evnm ev c (pred2DataTy $ cpoPr p) sc
-                             (Set.unions (uses : map tcrUsed rs))
-                       }
-                where choosek k = maybe k id mbevk
-                      choosen n = maybe n mkHNm mbevk
-              Evid_Recurse p
-                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
-                       ; let (u1,u2) = mkNewUID u
-                             recnm = panicJust "evidMpToCore.Evid_Recurse" $ Map.lookup p $ tcsPrMp st
-                       ; modify (\st -> st {tcsUniq = u1})
-                       ; ins True
-                             u2 (mkHNm u2) ev (mknm recnm) (pred2DataTy $ cpoPr p) (cpoScope p)
-                             Set.empty
-                       }
-              ev
-                ->  return (ToCoreRes (acoreBuiltinUndefined $ feEHCOpts $ fiEnv env)
-                                      (pred2DataTy $ cpoPr $ evidPred ev)
-                                      Set.empty initPredScope
-                           )
-
-        -- | Update state (insert given required ingredients) & compute actual result
-        ins :: Bool                                     -- insert in UID map?
-            -> UID                                      -- the UID for this evidence
-            -> HsName                                   -- the name as used in Core for this evidence
-            -> Evidence						     		-- the evidence
-            -> CExpr                                    -- its Core expr
-            -> Ty                                       -- its type
-            -> PredScope                                -- its scope
-            -> Set.Set SubEvid                          -- its sub evidence
-            -> State (ToCoreState CExpr Ty) (ToCoreRes CExpr Ty)
-        ins insk k evnm ev c ty sc uses
-          = do { st <- get
-               ; case Map.lookup ev $ tcsEvMp st of
-                   Just r
-                     -- Is already in map, update UID/key map
-                     | insk
-                       -> do { modify (mkk k r)
-                             ; return (vr evnm r)
-                             }
-
-                     -- No map update required
-                     | otherwise
-                       -> return (vr evnm r)
-
-                     -- Insert in both maps, i.e. UID and Evidence map
-                   _ | insk
-                       -> do { let r1 = ToCoreRes     c              ty uses sc
-                                   r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
-                             ; modify (mkk k r1 . mkc ev r2)
-                             ; return r2
-                             }
-
-                     -- Update only Evidence map
-                     | otherwise
-                       -> do { let r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
-                             ; modify (mkc ev r2)
-                             ; return r2
-                             }
-               }
-          where mkk k  r st = st {tcsMp   = Map.insert k  r $ tcsMp   st}
-                mkc ev r st = st {tcsEvMp = Map.insert ev r $ tcsEvMp st}
-                vr evnm r = case acoreExprMbVar $ tcrCExpr r of
-                              Just _ -> r
-                              _      -> r {tcrCExpr = mknm evnm}
-                vc c c' = case acoreExprMbVar c of
-                            Just _ -> c
-                            _      -> c'
-        mknm = acoreVar
-        ann (RedHow_Assumption   vun sc) _     = ( mknm $ vunmNm vun, sc )
-        ann (RedHow_ByInstance   n _   sc) ctxt= ( acoreApp (mknm n) (map (\c -> (tcrCExpr c)) ctxt), maximumBy pscpCmpByLen $ sc : map tcrScope ctxt )
-        ann (RedHow_BySuperClass n o t ) [sub] = let res = acoreSatSelsCaseTy
-                                                             (emptyRCEEnv $ feEHCOpts $ fiEnv env)
-                                                             (Just (hsnUniqifyEval n,acoreTyErr "evidMpToCore2.ann.RedHow_BySuperClass"))
-                                                             (tcrCExpr sub)
-                                                             t
-                                                             [(n,acoreTyErr $ "evidMpToCore2.ann.RedHow_BySuperClass.sub: " ++ show n,{-n,-}o)]
-                                                             Nothing
-                                                             (acoreVar n)
-                                                 in ( res
-                                                    , tcrScope sub
-                                                    )
-        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) []     = ( acoreInt opts o, sc )
-        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) [roff] = ( acoreBuiltinAddInt opts (tcrCExpr roff) o, sc )
-        ann (RedHow_Lambda  i sc) [body]       = ( acoreTyErrLift "RedHow_Lambda" [mkHNm i]  `acoreLamTy` tcrCExpr body, sc )
-
-        -- | Ignore proofs without real evidence
-        ignore _ = False
-
-        -- | Strip off scope related reductions, no longer required
-        stripScope (Evid_Proof _ (RedHow_ByScope _) [ev]) = stripScope ev
-        stripScope (Evid_Proof p i                  evs ) = Evid_Proof p i (map stripScope evs)
-        stripScope ev                                     = ev
-
-        -- | Split off overlapping instances
-        splitOverlap  (Evid_Proof p i es            )  = let (es',as) = splitOverlaps es in (Evid_Proof p i es',as)
-        splitOverlap  (Evid_Ambig p   ess@((i,es):_))  = let (es',_ ) = splitOverlaps es in (Evid_Proof p i es',[OverlapEvid p (map fst ess)])
-        splitOverlap  ev                               = (ev,[])
-        splitOverlaps es                               = let (es',as) = unzip $ map splitOverlap es in (es',concat as)
-
-        -- | ehc options
-        opts = feEHCOpts $ fiEnv env
-
-{-# LINE 243 "src/ehc/Pred/EvidenceToCore.chs" #-}
--- | Translate evidence to actual core, taking into account the need to share (i.e. do CSE, by state accumulating maps).
---   Cleanup dd 20120209, rewrite to State version, plus abstraction over Core variant
-{-
---   For now: breaks on pred2DataTy, which is not (yet) abstracted over
-evidMpToCore3
-  :: forall gm p e m b basp bcat mbind t pat pr pf a .
-     (AbstractCore e m b basp bcat mbind t pat pr pf a)
-     => FIIn' gm
-     -> InfoToEvidenceMap p RedHowAnnotation
-     -> ( EvidKeyToExprMap' e t
-        , [OverlapEvid p RedHowAnnotation]
-        )
-evidMpToCore3 env evidMp
-  = ( Map.map (\r -> (tcrCExpr r,tcrTy r,tcrUsed r,tcrScope r)) $ tcsMp $ snd
-      $ runState (mapM (\(RedHow_ProveObl i _,ev) -> mk1 (Just i) ev) evidMp')
-                 (ToCoreState Map.empty Map.empty Map.empty (fiUniq env))
-    , concat overlaps
-    )
-  where -- | Split off overlapping instances (i.e. ambiguous evidence)
-        (evidMp',overlaps)
-          = unzip [ ((i,ev3),as)
-                  | (i,ev) <- Map.toList evidMp, not (ignore ev)
-                  , let (ev2,as) = splitOverlap ev ; ev3 = stripScope ev2
-                  ]
-
-        -- | Make Core for a single Evidence, recursing for subevidence
-        mk1 :: Maybe UID									-- an UID already may have been assigned, it then should be used (the case for start evidence of this fun)
-            -> Evidence p RedHowAnnotation								-- the evidence
-            -> State (ToCoreState p RedHowAnnotation e t) (ToCoreRes e t)
-        mk1 mbevk ev
-          = case ev of
-              Evid_Proof p info evs
-                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
-                       ; let (u',evk,insk,evnm,uses)
-                                = case info of
-                                    RedHow_ProveObl   i   _ -> (u,choosek i,True,choosen $ mkHNm i,Set.empty)
-                                    RedHow_Assumption vun s -> (u,choosek i,False,choosen (vunmNm vun),Set.singleton (SubEvid_Assume i s))
-                                                            where i = vunmId vun
-                                    _                       -> (u1,choosek u2,True,choosen $ mkHNm u2,Set.empty)
-                                                            where (u1,u2) = mkNewUID u
-                       ; modify (\st -> st {tcsUniq = u', tcsPrMp = Map.insert p evnm $ tcsPrMp st})
-                       ; rs <- mapM (mk1 Nothing) evs
-                       ; let (c,sc) = ann info rs
-                       ; ins (insk || isJust mbevk)
-                             evk evnm ev c (pred2DataTy $ cpoPr p) sc
-                             (Set.unions (uses : map tcrUsed rs))
-                       }
-                where choosek k = maybe k id mbevk
-                      choosen n = maybe n mkHNm mbevk
-              Evid_Recurse p
-                ->  do { st@(ToCoreState {tcsUniq=u}) <- get
-                       ; let (u1,u2) = mkNewUID u
-                             recnm = panicJust "evidMpToCore.Evid_Recurse" $ Map.lookup p $ tcsPrMp st
-                       ; modify (\st -> st {tcsUniq = u1})
-                       ; ins True
-                             u2 (mkHNm u2) ev (mknm recnm) (pred2DataTy $ cpoPr p) (cpoScope p)
-                             Set.empty
-                       }
-              ev
-                ->  return (ToCoreRes (acoreBuiltinUndefined $ feEHCOpts $ fiEnv env)
-                                      undefined -- (pred2DataTy $ cpoPr $ evidPred ev)
-                                      Set.empty initPredScope
-                           )
-
-        -- | Update state (insert given required ingredients) & compute actual result
-        ins :: Bool                                     -- insert in UID map?
-            -> UID                                      -- the UID for this evidence
-            -> HsName                                   -- the name as used in Core for this evidence
-            -> Evidence p RedHowAnnotation		     				-- the evidence
-            -> e                                    	-- its Core expr
-            -> t                                       	-- its type
-            -> PredScope                                -- its scope
-            -> Set.Set SubEvid                          -- its sub evidence
-            -> State (ToCoreState p RedHowAnnotation e t) (ToCoreRes e t)
-        ins insk k evnm ev c ty sc uses
-          = do { st <- get
-               ; case Map.lookup ev $ tcsEvMp st of
-                   Just r
-                     -- Is already in map, update UID/key map
-                     | insk
-                       -> do { modify (mkk k r)
-                             ; return (vr evnm r)
-                             }
-
-                     -- No map update required
-                     | otherwise
-                       -> return (vr evnm r)
-
-                     -- Insert in both maps, i.e. UID and Evidence map
-                   _ | insk
-                       -> do { let r1 = ToCoreRes     c              ty uses sc
-                                   r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
-                             ; modify (mkk k r1 . mkc ev r2)
-                             ; return r2
-                             }
-
-                     -- Update only Evidence map
-                     | otherwise
-                       -> do { let r2 = ToCoreRes (vc c (mknm evnm)) ty uses sc
-                             ; modify (mkc ev r2)
-                             ; return r2
-                             }
-               }
-          where mkk k  r st = st {tcsMp   = Map.insert k  r $ tcsMp   st}
-                mkc ev r st = st {tcsEvMp = Map.insert ev r $ tcsEvMp st}
-                vr evnm r = case acoreExprMbVar $ tcrCExpr r of
-                              Just _ -> r
-                              _      -> r {tcrCExpr = mknm evnm}
-                vc c c' = case acoreExprMbVar c of
-                            Just _ -> c
-                            _      -> c'
-        mknm = acoreVar
-        ann (RedHow_Assumption   vun sc) _     = ( mknm $ vunmNm vun, sc )
-        ann (RedHow_ByInstance   n _   sc) ctxt= ( acoreApp (mknm n) (map (\c -> (tcrCExpr c)) ctxt), maximumBy pscpCmpByLen $ sc : map tcrScope ctxt )
-        ann (RedHow_BySuperClass n o t ) [sub] = let res = acoreSatSelsCaseTy
-                                                             (emptyRCEEnv $ feEHCOpts $ fiEnv env)
-                                                             (Just (hsnUniqifyEval n,Ty_Any))
-                                                             (tcrCExpr sub)
-                                                             t
-                                                             [(n,{-n,-}o)]
-                                                             Nothing
-                                                             (acoreVar n)
-                                                 in ( res
-                                                    , tcrScope sub
-                                                    )
-        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) []     = ( acoreInt o, sc )
-        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) [roff] = ( acoreBuiltinAddInt (feEHCOpts $ fiEnv env) (tcrCExpr roff) o, sc )
-        ann (RedHow_Lambda  i sc) [body]       = ( acoreTyErrLift "RedHow_Lambda" [mkHNm i]  `acoreLamTy` tcrCExpr body, sc )
-
-        -- | Ignore proofs without real evidence
-        ignore _ = False
-
-        -- | Strip off scope related reductions, no longer required
-        stripScope (Evid_Proof _ (RedHow_ByScope _) [ev]) = stripScope ev
-        stripScope (Evid_Proof p i                  evs ) = Evid_Proof p i (map stripScope evs)
-        stripScope ev                                     = ev
-
-        -- | Split off overlapping instances
-        splitOverlap  (Evid_Proof p i es            )  = let (es',as) = splitOverlaps es in (Evid_Proof p i es',as)
-        splitOverlap  (Evid_Ambig p   ess@((i,es):_))  = let (es',_ ) = splitOverlaps es in (Evid_Proof p i es',[OverlapEvid p (map fst ess)])
-        splitOverlap  ev                               = (ev,[])
-        splitOverlaps es                               = let (es',as) = unzip $ map splitOverlap es in (es',concat as)
--}
-
-{-# LINE 404 "src/ehc/Pred/EvidenceToCore.chs" #-}
--- | State maintained during evid -> core
-data ToCoreState' p info e t
-  = ToCoreState
-      { tcsMp       :: !(Map.Map UID (ToCoreRes e t))                 	-- accumulating map: uid -> Core (+additional info)
-      , tcsEvMp     :: !(Map.Map (Evidence' p info) (ToCoreRes e t))   	-- accumulating map: evidence -> Core (+additional info)
-      , tcsPrMp     :: !(Map.Map p HsName)                      		-- accumulating map: for recursive proof, names for predicates to be introduced
-      , tcsUniq     :: !UID                                     		-- threaded unique id
-      }
-
-type ToCoreState e t = ToCoreState' CHRPredOcc RedHowAnnotation e t
-
--- | The core expression, plus additional info
-data ToCoreRes e t
-  = ToCoreRes
-      { tcrCExpr    :: !e                                   	-- evidence Core expr
-      , tcrTy       :: !t                                       -- its type
-      , tcrUsed     :: !(Set.Set SubEvid)                       -- which subevidence has been used to construct this evidence
-      , tcrScope    :: !PredScope                               -- its scope
-      }
-
-instance Show (ToCoreRes e t) where
-  show _ = "ToCoreRes"
-
-instance (PP e, PP t) => PP (ToCoreRes e t) where
-  pp r = "TCR" >#< tcrCExpr r >#< "::" >#< tcrTy r
-
-{-# LINE 432 "src/ehc/Pred/EvidenceToCore.chs" #-}
--- | Sub evidence encodes the evidence needed to construct other evidence, as in Eq Int required for Eq [Int].
---   The subevidence is identified/introduced by a UID and defined in scope.
---   Subevidence can be an assumption (encoded below) or an already known instance (dealt with otherwise, but must be here too. 20090416)
-data SubEvid
-  = SubEvid_Assume
-      { subevdId    :: UID
-      , subevdScope :: PredScope
-      }
-  deriving (Eq,Ord,Show)
-
-instance PP SubEvid where
-  pp (SubEvid_Assume i s) = "SubEvd" >#< i >#< s
-
-{-# LINE 449 "src/ehc/Pred/EvidenceToCore.chs" #-}
--- | Translate evidence to actual core, taking into account the need to share (i.e. do CSE)
-evidMpToCore :: FIIn' gm -> InfoToEvidenceMap -> (EvidKeyToCExprMap,[OverlapEvid])
-evidMpToCore = evidMpToCore2
-{-
-evidMpToCore env evidMp
-  = ( Map.map (\r -> (tcrCExpr r,tcrTy r,tcrUsed r,tcrScope r)) $ tcsMp
-      $ foldr mke (ToCoreState Map.empty Map.empty Map.empty (fiUniq env))
-      $ evidMp'
-    , concat ambigs
-    )
-  where (evidMp',ambigs)
-                      = dbg "evidMpToCore.mk1.evidMp'" $
-                        unzip [ ((i,ev3),as)
-                              | (i,ev) <- Map.toList evidMp, not (ignore ev)
-                              , let (ev2,as) = splitOverlap ev ; ev3 = stripScope ev2
-                              ]
-        mke (RedHow_ProveObl i _,ev) st = fst $ mk1 st (Just i) ev
-        mk1 st mbevk ev@(Evid_Proof p info evs)
-                      = dbg "evidMpToCore.mk1.a" $
-                        ins (insk || isJust mbevk)
-                            evk evnm ev c (pred2DataTy $ cpoPr p) sc
-                            (Set.unions (uses : map tcrUsed rs))
-                            (st' {tcsUniq=u'})
-                      where (st'@(ToCoreState {tcsUniq=u}),rs) = mkn (st {tcsPrMp = Map.insert p evnm $ tcsPrMp st}) evs
-                            (c,sc)          = ann info rs
-                            (u',evk,insk,evnm,uses)
-                                            = case info of
-                                                RedHow_ProveObl   i   _ -> (u,choosek i,True,choosen $ mkHNm i,Set.empty)
-                                                RedHow_Assumption vun s -> (u,choosek i,False,choosen (vunmNm vun),Set.singleton (SubEvid_Assume i s))
-                                                                        where i = vunmId vun
-                                                _                       -> (u1,choosek u2,True,choosen $ mkHNm u2,Set.empty)
-                                                                        where (u1,u2) = mkNewUID u
-                            choosek k = maybe k id mbevk
-                            choosen n = maybe n mkHNm mbevk
-        mk1 st@(ToCoreState {tcsUniq=u}) mbevk ev@(Evid_Recurse p)
-                      = ins True
-                            u2 (mkHNm u2) ev (mknm recnm) (pred2DataTy $ cpoPr p) (cpoScope p)
-                            Set.empty
-                            (st {tcsUniq=u1})
-                      where (u1,u2) = mkNewUID u
-                            recnm = panicJust "evidMpToCore.Evid_Recurse" $ Map.lookup p $ tcsPrMp st
-        mk1 st _   ev = dbg "evidMpToCore.mk1.b" $ (st,ToCoreRes (acoreBuiltinUndefined $ feEHCOpts $ fiEnv env) (pred2DataTy $ cpoPr $ evidPred ev) Set.empty initPredScope)
-        mkn st        = dbg "evidMpToCore.mkn" $ foldr (\ev (st,rs) -> let (st',r) = mk1 st Nothing ev in (st',r:rs)) (st,[])
-        mkv x         = mknm $ mkHNm x
-        mknm          = acoreVar
-        ins insk k evnm ev c ty sc uses st
-                      = {- trp "XX" ((ppAssocLV $ Map.toList $ tcsMp st') >-< (ppAssocLV $ Map.toList $ tcsEvMp st')) $ -} res
-                      where res@(st',_)
-                              = case Map.lookup ev $ tcsEvMp st of
-                                  Just r -> (        mkk r                     st,vr r)
-                                  _      -> (mkc r $ mkk (ToCoreRes c ty uses sc) st,   r)
-                            mkk r st = if insk then st {tcsMp = Map.insert k r $ tcsMp st} else st
-                            mkc v st = st {tcsEvMp = Map.insert ev v $ tcsEvMp st}
-                            v = mknm evnm
-                            r = ToCoreRes (vc c v) ty uses sc
-                            vr r = case acoreExprMbVar $ tcrCExpr r of
-                                     Just _ -> r
-                                     _      -> r {tcrCExpr = v}
-                            vc c c' = case acoreExprMbVar c of
-                                        Just _ -> c
-                                        _      -> c'
-        ann (RedHow_Assumption   vun sc) _     = ( mknm $ vunmNm vun, sc )
-        ann (RedHow_ByInstance   n _   sc) ctxt= ( acoreApp (mknm n) (map (\c -> (tcrCExpr c)) ctxt), maximumBy pscpCmpByLen $ sc : map tcrScope ctxt )
-        ann (RedHow_BySuperClass n o t ) [sub] = let res = acoreSatSelsCaseTy
-                                                             (emptyRCEEnv $ feEHCOpts $ fiEnv env)
-                                                             (Just (hsnUniqifyEval n,Ty_Any))
-                                                             (tcrCExpr sub)
-                                                             t
-                                                             [(n,{-n,-}o)]
-                                                             Nothing
-                                                             (acoreVar n)
-                                                 in ( res
-                                                    , tcrScope sub
-                                                    )
-        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) []     = ( acoreInt o, sc )
-        ann (RedHow_ByLabel _ (LabelOffset_Off o) sc) [roff] = ( acoreBuiltinAddInt (feEHCOpts $ fiEnv env) (tcrCExpr roff) o, sc )
-        ann (RedHow_Lambda  i sc) [body]       = ( acoreTyErrLift "RedHow_Lambda" [mkHNm i] `acoreLamTy` tcrCExpr body, sc )
-        ignore _ = False
-
-        stripScope (Evid_Proof _ (RedHow_ByScope _) [ev]) = stripScope ev
-        stripScope (Evid_Proof p i                  evs ) = Evid_Proof p i (map stripScope evs)
-        stripScope ev                                     = ev
-
-        splitOverlap  (Evid_Proof p i es            )  = let (es',as) = splitOverlaps es in (Evid_Proof p i es',as)
-        splitOverlap  (Evid_Ambig p   ess@((i,es):_))  = let (es',_ ) = splitOverlaps es in (Evid_Proof p i es',[OverlapEvid p (map fst ess)])
-        splitOverlap  ev                               = (ev,[])
-        splitOverlaps es                               = let (es',as) = unzip $ map splitOverlap es in (es',concat as)
-
-        dbg m = id -- Debug.tr m empty
--}
-
-{-# LINE 556 "src/ehc/Pred/EvidenceToCore.chs" #-}
-evidKeyCoreMpToBinds :: FIIn' gm -> EvidKeyToCExprMap -> (EvidKeyToCBindMap,PredScopeToCBindMap)
-evidKeyCoreMpToBinds env m
-  = dbg "evidKeyCoreMpToBinds.res"
-    $!
-    ( dbg "evidKeyCoreMpToBinds.res1"
-      $! Map.unionsWith (++)
-      $ map (\(b,uses)
-               -> let deepestScope = subevdId . maximumBy (\evd1 evd2 -> subevdScope evd1 `pscpCmpByLen` subevdScope evd2) . Set.toList
-                  in  Map.singleton (deepestScope uses) [b]
-            )
-      $ [ (acoreBind1Ty (mkHNm i) (SysF.ty2TyCforFFI opts $ tcrTy r) (tcrCExpr r),tcrUsed r)
-        | (i,r) <- dbg "evidKeyCoreMpToBinds.dependentOnAssumes"   $! Map.toList dependentOnAssumes
-        ]
-    , dbg "evidKeyCoreMpToBinds.res2"
-      $! Map.fromListWith (++)
-      $ [ (tcrScope r,[acoreBind1Ty (mkHNm i) (SysF.ty2TyCforFFI opts $ tcrTy r) (tcrCExpr r)])
-        | (i,r) <- dbg "evidKeyCoreMpToBinds.independentOfAssumes" $! Map.toList independentOfAssumes
-        ]
-    )
-  where (independentOfAssumes, dependentOnAssumes)
-          = dbg "evidKeyCoreMpToBinds.partition"
-            $! Map.partition (\r -> Set.null (tcrUsed r))
-            $ dbg "evidKeyCoreMpToBinds.m"
-            $! m
-        dbg m = id -- Debug.tr m (pp m)
-        opts = feEHCOpts $ fiEnv env
-
-{-# LINE 599 "src/ehc/Pred/EvidenceToCore.chs" #-}
-type EvidCBindL = [CBind]
-
-evidKeyCoreMpToBinds2 :: FIIn' gm -> EvidKeyToCExprMap -> (EvidCBindL,EvidKeyToCBindMap,PredScopeToCBindMap)
-evidKeyCoreMpToBinds2 env m
-  = (   [ mkd i r
-        | (i,r) <- Map.toList independentOfAssumes
-        ]
-    , Map.unionsWith (++)
-      $ [ Map.singleton (subevdId $ head $ Set.toList $ tcrUsed r) [mkd i r]
-        | (i,r) <- Map.toList dependentOn1Assume
-        ]
-    , Map.unionsWith (++)
-      $ [ Map.singleton (deepestScope (tcrScope r) (tcrUsed r)) [mkd i r]
-        | (i,r) <- Map.toList dependentOnNAssumes
-        ]
-    )
-  where (independentOfAssumes, dependentOnAssumes)
-          = Map.partition (\r -> Set.null $ tcrUsed r) m
-        (dependentOn1Assume, dependentOnNAssumes)
-          = Map.partition (\r -> Set.size (tcrUsed r) == 1) m
-        -- mkd i e t         = acoreBind1Ty (mkHNm i) t e
-        mkd i r = acoreBind1Ty (mkHNm i) (SysF.ty2TyCforFFI opts $ tcrTy r) (tcrCExpr r)
-        deepestScope sc u = maximumBy pscpCmpByLen $ sc : (map subevdScope $ Set.toList u)
-        opts = feEHCOpts $ fiEnv env
-
-{-# LINE 627 "src/ehc/Pred/EvidenceToCore.chs" #-}
-evidKeyBindMpToCSubst :: EvidKeyToCBindMap -> CSubst
-evidKeyBindMpToCSubst
-  = acoreCSubstFromUidBindLL . Map.toList
-
diff --git a/src/UHC/Light/Compiler/Pred/Heuristics.hs b/src/UHC/Light/Compiler/Pred/Heuristics.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/Pred/Heuristics.hs
+++ /dev/null
@@ -1,223 +0,0 @@
-module UHC.Light.Compiler.Pred.Heuristics
-( Heuristic, SHeuristic
-, HeurAlts, HeurAlts' (..), HeurRed, HeurRed' (..)
-, toHeuristic
-, heurTry
-, localChoice
-, binChoice
-, solvable
-, heurScopedEHC )
-where
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.Ty.FitsInCommon2
-import UHC.Util.CHR
-import UHC.Light.Compiler.VarMp
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.CHR.Key
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.Base.Common
-import Data.List (nub,partition)
-import Data.Maybe
-import UHC.Util.Pretty
-import UHC.Util.AGraph
-import UHC.Util.Utils
-
-{-# LINE 23 "src/ehc/Pred/Heuristics.chs" #-}
-type Heuristic' p info = [info] -> HeurAlts' p info -> [(info, Evidence' p info)]
-
-type Heuristic = Heuristic' CHRPredOcc RedHowAnnotation
-
-type SHeuristic' p info = HeurAlts' p info -> Evidence' p info
-
-type SHeuristic = SHeuristic' CHRPredOcc RedHowAnnotation
-
-{-# LINE 39 "src/ehc/Pred/Heuristics.chs" #-}
-data HeurAlts' p info
-  = HeurAlts
-     { redaltsPredicate  	:: p
-     , redaltsAlts  		:: [HeurRed' p info]
-     }
-
-type HeurAlts = HeurAlts' CHRPredOcc RedHowAnnotation
-
-data HeurRed' p info
-  = HeurRed
-     { redInfo           	:: info
-     , redContext   		:: [HeurAlts' p info]
-     }
-  | HeurRed_Rec
-     { redRecPred           :: p
-     }
-
-type HeurRed = HeurRed' CHRPredOcc RedHowAnnotation
-
-{-# LINE 60 "src/ehc/Pred/Heuristics.chs" #-}
-instance Show (HeurAlts' p info) where
-  show _ = "HeurAlts"
-
-instance Show (HeurRed' p info) where
-  show _ = "HeurRed"
-
-{-# LINE 68 "src/ehc/Pred/Heuristics.chs" #-}
-instance (PP p, PP info) => PP (HeurAlts' p info) where
-  pp x = "HeurAlts" >#< redaltsPredicate x >#< ppBracketsCommasBlock (redaltsAlts x)
-
-instance (PP p, PP info) => PP (HeurRed' p info) where
-  pp (HeurRed     i subs) = "HeurRed" >#< i >#< ppBracketsCommasBlock subs
-  pp (HeurRed_Rec p     ) = "HeurRec" >#< p
-
-{-# LINE 81 "src/ehc/Pred/Heuristics.chs" #-}
-toHeuristic :: SHeuristic' p info -> Heuristic' p info
-toHeuristic h infos alts
-  = zip infos (repeat ev)
-  where ev = h alts
-
-{-# LINE 92 "src/ehc/Pred/Heuristics.chs" #-}
-heurTry :: Eq p => SHeuristic' p info -> SHeuristic' p info -> SHeuristic' p info
-heurTry f g a  | null (evidUnresolved ev) = ev
-               | otherwise                = g a
-               where ev = f a
-
-{-# LINE 103 "src/ehc/Pred/Heuristics.chs" #-}
-localChoice :: (Eq p, Eq info) => (p -> [info] -> [info]) -> SHeuristic' p info
-localChoice choose (HeurAlts p reds) =
-  case filter ((`elem` redinfos) . redInfo) reds of
-    []                    -> Evid_Unresolved p (concatMap evidUnresolved [ Evid_Proof p i evs | (i,evs) <- chs reds])
-    [r@(HeurRed_Rec p)]   -> Evid_Recurse p
-    [r@(HeurRed i   _)]   -> Evid_Proof p i (snd $ ch r)
-    rs                    -> reallyOverlapEvid p (chs rs)
-  where redinfos          = choose p (map redInfo reds)
-        ch (HeurRed i rs) = (i,map (localChoice choose) rs)
-        chs rs            = map ch rs
-
-{-# LINE 116 "src/ehc/Pred/Heuristics.chs" #-}
-binChoice :: (Eq p, Eq info) => (info -> info -> PartialOrdering) -> SHeuristic' p info
-binChoice order = localChoice (const local)
-  where  local []  = []
-         local is  = [mx]
-                   where (mx,eqPairs) = heurMaximumBy order is
-
-{-# LINE 124 "src/ehc/Pred/Heuristics.chs" #-}
--- | Choose maximum, also giving list of equals of there are more maximum x-es
-heurChoose :: (x -> x -> PartialOrdering) -> (x,[x]) -> x -> (x,[x])
-heurChoose cmp (x,eqPairs) y
-  = case cmp x y of
-      P_LT -> (y,[])
-      P_GT -> (x,eqPairs)
-      P_EQ -> (x,if null eqPairs then [x,y] else y:eqPairs)
-
-heurMaximumBy :: (x -> x -> PartialOrdering) -> [x] -> (x,[x])
-heurMaximumBy cmp (x:xs)
-  = foldl (heurChoose cmp) (x,[]) xs
-
-{-# LINE 142 "src/ehc/Pred/Heuristics.chs" #-}
-contextChoice :: Eq p => (p -> [HeurRed' p info] -> [HeurRed' p info]) -> SHeuristic' p info
-contextChoice choose (HeurAlts p reds) =
-  case choose p reds of
-         []                   -> Evid_Unresolved p [UnresolvedTrace_Fail p []]
-         [r@(HeurRed_Rec p)]  -> Evid_Recurse p
-         [r@(HeurRed i   _)]  -> Evid_Proof p i (snd $ ch r)
-         rs                   -> reallyOverlapEvid p (chs rs)
-  where ch (HeurRed i rs) = (i,map (contextChoice choose) rs)
-        chs rs            = map ch rs
-
-contextBinChoice :: Eq p => (HeurRed' p info -> HeurRed' p info -> PartialOrdering) -> SHeuristic' p info
-contextBinChoice order = contextChoice (const local)
-  where  local []                = []
-         local is | null eqPairs = [mx]
-                  | otherwise    = eqPairs
-                   where (mx,eqPairs) = heurMaximumBy order is			-- do something with equal pairs, construct Evid_Ambig perhaps?
-
-{-# LINE 167 "src/ehc/Pred/Heuristics.chs" #-}
-reallyOverlapEvid :: p -> [(info,[Evidence' p info])] -> Evidence' p info
-reallyOverlapEvid p evs
-  = case filter (not . null . snd) evs of
-      []       -> Evid_Ambig p evs
-      [(i,ev)] -> Evid_Proof p i ev
-      _        -> Evid_Ambig p evs
-
-{-# LINE 186 "src/ehc/Pred/Heuristics.chs" #-}
-solvable :: HeurAlts' p info -> HeurAlts' p info
-solvable (HeurAlts p rs) = HeurAlts p (catMaybes (map heu rs))
-   where heu h@(HeurRed info reds)  | all hasAlts reds'  = Just (HeurRed info  reds')
-                                    | otherwise          = Nothing
-                                    where reds' = map solvable reds
-         heu h@(HeurRed_Rec p    )                       = Just h
-
-hasAlts :: HeurAlts' p info -> Bool
-hasAlts (HeurAlts _ [])  = False
-hasAlts _                = True
-
-{-# LINE 205 "src/ehc/Pred/Heuristics.chs" #-}
-cmpSpecificness :: CHRMatchable (FIIn' gm) Pred VarMp => FIIn' gm -> Pred -> Pred -> PartialOrdering
-cmpSpecificness env p q =
-  case  chrMatchTo env (emptyVarMp :: VarMp) p q of
-    Nothing  -> P_GT
-    Just _   -> case  chrMatchTo env (emptyVarMp :: VarMp) q p of
-                  Nothing  -> P_LT
-                  Just _   -> P_EQ
-
-{-# LINE 282 "src/ehc/Pred/Heuristics.chs" #-}
-cmpEqReds :: RedHowAnnotation -> RedHowAnnotation -> PartialOrdering
-cmpEqReds r1                            r2                              = panic ("cmpEqReds: don't know how to deal with: " ++ show (pp r1) ++ " and " ++ show (pp r2))
-
-{-# LINE 305 "src/ehc/Pred/Heuristics.chs" #-}
-anncmpEHCScoped :: CHRMatchable (FIIn' gm) Pred VarMp => Bool -> FIIn' gm -> HeurRed -> HeurRed -> PartialOrdering
-anncmpEHCScoped preferInst env ann1 ann2
-  = case (ann1,ann2) of
-      (HeurRed (RedHow_Assumption     _ _) _    , _                                        )              ->  P_GT
-      (_                                        , HeurRed (RedHow_Assumption     _ _) _    )              ->  P_LT
-      (HeurRed (RedHow_ByScope ByScopeRedHow_Assume) _
-                                                , _                                        )              ->  P_GT
-      (_                                        , HeurRed (RedHow_ByScope ByScopeRedHow_Assume) _)        ->  P_LT
-      (HeurRed_Rec _                            , _                                        )              ->  P_GT
-      (_                                        , HeurRed_Rec _                            )              ->  P_LT
-      (HeurRed (RedHow_ByInstance _ p   s) _    , HeurRed (RedHow_ByInstance _ q   t) _    )              ->  case pscpCmpByLen s t of
-                                                                                                                EQ   -> cmpSpecificness env p q
-                                                                                                                ord  -> toPartialOrdering ord
-      (HeurRed (RedHow_ByInstance _ _   s) _    , HeurRed (RedHow_ByScope _) [HeurAlts q _])              ->  toPartialOrdering $ pscpCmpByLen s (cpoScope q)
-      (HeurRed (RedHow_ByScope _) [HeurAlts p _], HeurRed (RedHow_ByInstance _ _   t) _    )              ->  toPartialOrdering $ pscpCmpByLen (cpoScope p) t
-      (HeurRed (RedHow_ByInstance _ _   _) _    , _                                        ) | preferInst ->  P_GT
-      (_                                        , HeurRed (RedHow_ByInstance _ _   _) _    ) | preferInst ->  P_LT
-      (HeurRed (RedHow_ByLabel     _ _  s) _    , HeurRed (RedHow_ByLabel     _ _  t) _    )              ->  toPartialOrdering $ pscpCmpByLen s t
-      (HeurRed (RedHow_ByLabel     _ _  _) _    , _                                        )              ->  P_GT
-      (_                                        , HeurRed (RedHow_ByLabel     _ _  _) _    )              ->  P_LT
-      (HeurRed (RedHow_BySuperClass _ _ _) _    , _                                        )              ->  P_GT
-      (_                                        , HeurRed (RedHow_BySuperClass _ _ _) _    )              ->  P_LT
-      (HeurRed (RedHow_ByScope _) [HeurAlts p _], HeurRed (RedHow_ByScope _) [HeurAlts q _])              ->  toPartialOrdering $ pscpCmpByLen (cpoScope p) (cpoScope q)
-      (HeurRed (RedHow_ByScope _) _             , _                                        )              ->  P_GT
-      (_                                        , HeurRed (RedHow_ByScope _) _             )              ->  P_LT
-      (HeurRed (RedHow_ByInstance _ _   _) _    , _                                        )              ->  P_GT
-      (_                                        , HeurRed (RedHow_ByInstance _ _   _) _    )              ->  P_LT
-      _                                                                                                   ->  panic ("anncmpEHCScoped: don't know how to deal with:\n  " ++ show (pp ann1) ++ "\n  " ++ show (pp ann2))
-
-{-# LINE 351 "src/ehc/Pred/Heuristics.chs" #-}
-heurScopedEHC :: CHRMatchable (FIIn' gm) Pred VarMp => FIIn' gm -> Heuristic
-heurScopedEHC env
-  = toHeuristic
-    $ ifthenelseSHeuristic isEqHeuristic
-        eqHeuristic
-{-
-        defaultHeuristic
--}
-{-
-        $ heurTry (contextBinChoice (anncmpEHCScoped True  env))
-                  -- (contextBinChoice (anncmpEHCScoped False env))
-                  (contextChoice ehcOnlySuperReduce)
--}
-        $ contextBinChoice (anncmpEHCScoped True  env)
-  where
-    isEqHeuristic _                            = False
-    eqHeuristic = binChoice cmpEqReds . solvable
-{-
-    defaultHeuristic
-      = contextBinChoice (anncmpEHCScoped env)
--}
-
-ifthenelseSHeuristic :: (p -> Bool) -> SHeuristic' p info -> SHeuristic' p info -> SHeuristic' p info
-ifthenelseSHeuristic g t e alts
-  | g (redaltsPredicate alts) = t alts
-  | otherwise = e alts
-
diff --git a/src/UHC/Light/Compiler/Pred/RedGraph.hs b/src/UHC/Light/Compiler/Pred/RedGraph.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/Pred/RedGraph.hs
+++ /dev/null
@@ -1,119 +0,0 @@
-module UHC.Light.Compiler.Pred.RedGraph
-( module UHC.Util.AGraph
-, RedNode (..)
-, RedGraph', RedGraph, emptyRedGraph
-, mkRedGraphFromReductions, addToRedGraphFromReductions
-, addToRedGraphFromAssumes, mkRedGraphFromAssumes
-, ppRedGraph
-, addAssumption
-, addReduction
-, redPruneReductionsUntil
-, redAlternatives )
-where
-import UHC.Light.Compiler.Base.Common
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.VarMp
-import Data.Maybe
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.Pred.Heuristics
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import UHC.Util.AGraph
-import UHC.Util.Pretty
-import Data.Graph.Inductive.Graph
-import UHC.Util.Utils
-
-{-# LINE 34 "src/ehc/Pred/RedGraph.chs" #-}
-data RedNode p
-  =  Red_Pred { rednodePred 	::  !p	 	}
-  |  Red_And  { rednodePreds 	::  ![p] 	}
-  deriving (Eq, Ord)
-
-mkRedNode :: [p] -> RedNode p
-mkRedNode [p] = Red_Pred p
-mkRedNode ps  = Red_And ps
-
-redNodePreds :: RedNode p -> [p]
-redNodePreds (Red_Pred  q) = [q]
-redNodePreds (Red_And  qs) = qs
-
-true  ::  RedNode p
-true  =   mkRedNode []
-
-{-# LINE 52 "src/ehc/Pred/RedGraph.chs" #-}
-type RedGraph' p info = AGraph (RedNode p) info
-
-type RedGraph = RedGraph' CHRPredOcc RedHowAnnotation
-
-emptyRedGraph :: Ord p => RedGraph' p i
-emptyRedGraph = emptyAGraph
-
-{-# LINE 61 "src/ehc/Pred/RedGraph.chs" #-}
-addToRedGraphFromReductions :: [Constraint] -> RedGraph -> RedGraph
-addToRedGraphFromReductions cs g = foldr addReduction g cs
-
-mkRedGraphFromReductions :: [Constraint] -> RedGraph
-mkRedGraphFromReductions cs = addToRedGraphFromReductions cs emptyRedGraph
-
-{-# LINE 69 "src/ehc/Pred/RedGraph.chs" #-}
-addToRedGraphFromAssumes :: ConstraintToInfoMap -> RedGraph -> RedGraph
-addToRedGraphFromAssumes cm g = Map.foldrWithKey addAssumption g cm
-
-mkRedGraphFromAssumes :: ConstraintToInfoMap -> RedGraph
-mkRedGraphFromAssumes cm = addToRedGraphFromAssumes cm emptyRedGraph
-
-{-# LINE 77 "src/ehc/Pred/RedGraph.chs" #-}
-instance PP p => Show (RedNode p) where
-  show = showPP . pp
-
-instance PP p => PP (RedNode p) where
-  pp (Red_Pred p)    = pp p
-  pp (Red_And [])    = pp "True"
-  pp (Red_And _ )    = pp "And"
-
-{-# LINE 87 "src/ehc/Pred/RedGraph.chs" #-}
-ppRedGraph :: (PP p, PP i) => RedGraph' p i -> PP_Doc
-ppRedGraph ag = "RedGraph" >-< indent 2 ((ppBracketsCommasBlock $ nodes g) >-< (ppBracketsCommasBlock $ edges g) >-< pp (show g))
-  where g = agraphGraph ag
-
-{-# LINE 97 "src/ehc/Pred/RedGraph.chs" #-}
-addAssumption :: Constraint -> [RedHowAnnotation] -> RedGraph -> RedGraph
-addAssumption (Assume  p)  is  = insertEdges (zip3 (repeat (Red_Pred p)) (repeat true) is)
-addAssumption _            _   = id
-
-{-# LINE 103 "src/ehc/Pred/RedGraph.chs" #-}
-addReduction :: Constraint -> RedGraph -> RedGraph
-addReduction (Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=[q]})
-                                    =  insertEdge (Red_Pred p, Red_Pred q  , i)
-addReduction (Reduction {cnstrPred=p, cnstrInfo=i, cnstrFromPreds=ps})
-                                    =  let  andNd  = Red_And ps
-                                            edges  = map (\q -> (andNd, Red_Pred q, i)) ps
-                                       in   insertEdges ((Red_Pred p, andNd, i) : edges)
-addReduction _                      =  id
-
-{-# LINE 121 "src/ehc/Pred/RedGraph.chs" #-}
-redPruneReductionsUntil :: [CHRPredOcc] -> (CHRPredOcc -> Bool) -> RedGraph -> RedGraph
-redPruneReductionsUntil leaves stop gr
-  = dels (map Red_Pred leaves) gr
-  where dels leaves g = foldr del g leaves
-        del  leaf   g | all (not . stop)
-                        $ redNodePreds leaf = dels (map snd pres)
-                                              $ deleteNode leaf
-                                              $ foldr (\(_,from) g -> deleteEdge (from,leaf) g) g pres
-                      | otherwise           = g
-          where pres = predecessors g leaf
-
-{-# LINE 138 "src/ehc/Pred/RedGraph.chs" #-}
-redAlternatives :: RedGraph -> CHRPredOcc -> HeurAlts
-redAlternatives gr
-  = recOr Set.empty
-  where  recOr visited p = HeurAlts p (map (recAnd visited') (successors gr (Red_Pred p)))
-           where visited' = Set.insert p visited
-
-         recAnd visited (i, n)
-           = HeurRed i (map mk qs)
-           where qs = redNodePreds n
-                 mk q | Set.member q visited = HeurAlts q [HeurRed_Rec q]
-                      | otherwise            = recOr visited q
-
diff --git a/src/UHC/Light/Compiler/Pred/ToCHR.hs b/src/UHC/Light/Compiler/Pred/ToCHR.hs
deleted file mode 100644
--- a/src/UHC/Light/Compiler/Pred/ToCHR.hs
+++ /dev/null
@@ -1,343 +0,0 @@
-module UHC.Light.Compiler.Pred.ToCHR
-( CHRClassDecl, CHRScopedInstanceDecl
-, initCHRStore
-, mkScopedCHR2
-, SimplifyResult, SimplifyResult'' (..), emptySimplifyResult
-, simplifyResultResetForAdditionalWork
-, partitionUnresolved2AssumableAndOthers
-, patchUnresolvedWithAssumption
-, chrSimplifySolveToRedGraph
-, chrSimplifyRedGraphToEvidence )
-where
-import UHC.Light.Compiler.Opts
-import UHC.Light.Compiler.Base.Common
-import UHC.Light.Compiler.Base.TermLike
-import UHC.Light.Compiler.Ty
-import UHC.Light.Compiler.Ty.Ftv
-import UHC.Light.Compiler.Error
-import UHC.Light.Compiler.VarMp
-import UHC.Light.Compiler.Substitutable
-import Data.Maybe
-import qualified Data.Set as Set
-import qualified Data.Map as Map
-import UHC.Util.CHR
-import UHC.Light.Compiler.CHR.Constraint
-import UHC.Light.Compiler.CHR.Guard
-import UHC.Light.Compiler.CHR.Solve
-import UHC.Light.Compiler.CHR.Key
-import UHC.Light.Compiler.Pred.Heuristics
-import UHC.Light.Compiler.Pred.Evidence
-import UHC.Light.Compiler.Pred.RedGraph
-import UHC.Light.Compiler.Ty.FitsInCommon2
-import UHC.Light.Compiler.Ty.Trf.Canonic
-import UHC.Util.Pretty
-import UHC.Util.Utils
-import UHC.Light.Compiler.Base.HsName.Builtin
-
-
-{-# LINE 36 "src/ehc/Pred/ToCHR.chs" #-}
-type CHRClassDecl'          a info      = ([a], a, [info])
-type CHRClassDecl                       = CHRClassDecl' Pred RedHowAnnotation
-type CHRScopedInstanceDecl' a info sc   = ([a], a, info, sc)
-type CHRScopedInstanceDecl              = CHRScopedInstanceDecl' Pred RedHowAnnotation PredScope
-
-{-# LINE 47 "src/ehc/Pred/ToCHR.chs" #-}
-type MkRes1 = (CHRStore, ([CHRPredOcc],CHRPredOcc) )
-type MkResN = (CHRStore,[([CHRPredOcc],CHRPredOcc)])
-
-{-# LINE 56 "src/ehc/Pred/ToCHR.chs" #-}
-([sc1,sc2,sc3]
- ,[pr1,pr2,pr3]
- ,[ty1,ty2,ty3,ty4]
- ,[lab1]
- ,[off1]
- ,[pr1v]
- ,[pa1]
- )
-  = ( map PredScope_Var [u1,u2,u3]
-    , map Pred_Var [u7,u8,u9]
-    , map mkTyMetaVar {- mkTyVar -} [u10,u11,u14,u15]
-    , map Label_Var [u12]
-    , map LabelOffset_Var [u13]
-    , [u7]
-    , map PredSeq_Var [u4]
-    )
-  where [u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15] = mkNewLevUIDL 15 uidStart
-
-{-# LINE 101 "src/ehc/Pred/ToCHR.chs" #-}
--- | The basic initial set of CHRs
-initCHRStore :: CHRStore
-initCHRStore
-  = chrStoreFromElems $
-      [ scopeProve, {- scopeAssum1, -} scopeAssum2 ]
-      ++ [ labelProve1, labelProve2 ]
-      ++ [ instForall, predArrow, predSeq1, predSeq2 ]
-  where p1s1         = mkCHRPredOcc pr1 sc1
-        p1s2         = mkCHRPredOcc pr1 sc2
-        p1s3         = mkCHRPredOcc pr1 sc3
-        scopeProve   = [mkProve p1s1, mkProve p1s2]
-                         ==> [mkReduction p1s2 (RedHow_ByScope (ByScopeRedHow_Other $ AlwaysEq "prv")) [p1s3]]
-                          |> [IsStrictParentScope sc3 sc1 sc2]
-{-
-        scopeAssum1  = [mkProve p1s1, mkAssume p1s2]
-                         ==> [mkReduction p1s1 (RedHow_Assumption sc2) []]
-                          |> [EqualScope sc1 sc2]
--}
-        scopeAssum2  = [mkProve p1s1, mkAssume p1s2]
-                         ==> [mkReduction p1s1 (RedHow_ByScope ByScopeRedHow_Assume) [p1s2]]
-                          |> [NotEqualScope sc1 sc2,IsVisibleInScope sc2 sc1]
-        l1s1         = mkCHRPredOcc (Pred_Lacks ty1 lab1) sc1
-        l2s1         = mkCHRPredOcc (Pred_Lacks ty2 lab1) sc1
-        l3s1         = mkCHRPredOcc (Pred_Lacks recRowEmp lab1) sc1
-        labelProve1  = [mkProve l1s1]
-                         ==> [mkProve l2s1, mkReduction l1s1 (RedHow_ByLabel lab1 off1 sc1) [l2s1]]
-                          |> [NonEmptyRowLacksLabel ty2 off1 ty1 lab1]
-        labelProve2  = [mkProve l3s1]
-                         ==> [mkReduction l3s1 (RedHow_ByLabel lab1 (LabelOffset_Off 0) sc1) []]
-        f1s1         = mkCHRPredOcc (tyPred $ mkTyQu tyQu_Forall [(pr1v,kiStar)] $ mkTyPr pr1) sc1	-- TBD
-        f2s1         = mkCHRPredOcc pr1 sc1
-        instForall   = [mkAssume f1s1]
-                         ==> [mkAssume f2s1]
-        a1s1         = mkCHRPredOcc (Pred_Arrow pa1 pr1) sc1
-        a2s1         = mkCHRPredOcc pr1 sc1
-        a3s1         = mkCHRPredOcc (Pred_Preds pa1) sc1
-        predArrow    = [mkAssume a1s1, mkProve a2s1]
-                         ==> [mkProve a3s1, mkReduction a2s1 (RedHow_ByInstance hsnUnknown pr1 sc1) [a1s1,a3s1]]
-        s1s1         = mkCHRPredOcc (Pred_Preds (PredSeq_Cons pr1 pa1)) sc1
-        s2s1         = mkCHRPredOcc pr1 sc1
-        s3s1         = mkCHRPredOcc (Pred_Preds pa1) sc1
-        predSeq1     = [mkProve s1s1]
-                         <==> [mkProve s2s1, mkProve s3s1]
-        predSeq2     = [mkProve $ mkCHRPredOcc (Pred_Preds PredSeq_Nil) sc1]
-                         <==> ([] :: [Constraint])
-        -- inclSc       = ehcCfgCHRInclScope $ feEHCOpts $ fiEnv env
-
-{-# LINE 190 "src/ehc/Pred/ToCHR.chs" #-}
--- | Construct CHRs from class and instance decls
-mkScopedCHR2
-  :: FIIn -> [CHRClassDecl] -> [CHRScopedInstanceDecl]
-       -> CHRStore -> (CHRStore,CHRStore)
-mkScopedCHR2 env clsDecls insts prevStore
-  = (chrStoreUnions [store2,instSimplStore], chrStoreUnions [assumeStore,instSimplStore])
-  where  ucls        = mkNewLevUIDL (length clsDecls) $ fiUniq env
-         ((assumeStore,assumePredOccs), (instStore,_))
-                     = mkScopedChrs clsDecls canonInsts
-         store2      = chrStoreUnions [assumeStore,prevStore]
-         simplStores = zipWith (\u (cx,h,i) -> mkClassSimplChrs (env {fiUniq = u}) store2 (cx,h,i)) ucls clsDecls
-         instSimplStore
-         			 = chrStoreUnions $ instStore : simplStores
-         canonInsts  = [ (map mkC cx, mkC hd, info, sc) | (cx,hd,info,sc) <- insts ]
-                     where mkC = fst . predCanonic (emptyTyBetaRedEnv {tbredFI=env})
-
-{-# LINE 208 "src/ehc/Pred/ToCHR.chs" #-}
--- | Construct simplification CHRs from class decls, building upon a given CHR store
-mkClassSimplChrs :: FIIn -> CHRStore -> CHRClassDecl -> CHRStore
-mkClassSimplChrs env rules (context, head, infos)
-  = simps
-  where simps        = chrStoreFromElems $ mapTrans (Set.fromList [head1]) [] head1 (zip infos (map (\p -> Red_Pred $ mkCHRPredOcc p sc1) context))
-        (superClassesWork, superClassesDone, _ :: SolveTrace FIIn Constraint Guard Prio VarMp)
-                     = chrSolve' env rules (map (\p -> toSolverConstraint $ mkAssume $ mkCHRPredOcc p sc1) context)
-        superClasses = superClassesWork ++ superClassesDone
-        graph        = mkRedGraphFromReductions $ filterMb fromSolverConstraint superClasses
-        head1        = mkCHRPredOcc head sc1
-        head2        = mkCHRPredOcc head sc2
-        head3        = mkCHRPredOcc head sc3
-
-        mapTrans done reds subClass
-          = concatMap (transClosure done reds subClass)
-            . filter (\(_,x) -> not (rednodePred x `Set.member` done))
-
-        transClosure done reds par (info, pr@(Red_Pred p@(CHRPredOcc {cpoPr = super})))
-          = [superRule] ++ ({-if ehcCfgCHRScoped opts >= CHRScopedMutualSuper then -} [scopeRule1, scopeRule2] {- else [] -}) ++ rules
-          where super1     = mkCHRPredOcc super sc1
-                super2     = mkCHRPredOcc super sc2
-                super3     = mkCHRPredOcc super sc3
-                superRule  = [mkProve head1, mkProve p] ==> reds'
-                scopeRule1 = [mkProve head1, mkProve super2]
-                               ==> [mkProve head3, mkReduction head1 (RedHow_ByScope (ByScopeRedHow_Other $ AlwaysEq "sup1")) [head3]]
-                                 |> [HasStrictCommonScope sc3 sc1 sc2]
-                scopeRule2 = [mkProve head2, mkProve super1]
-                               ==> [mkProve super3, mkReduction super1 (RedHow_ByScope (ByScopeRedHow_Other $ AlwaysEq "sup2")) [super3]]
-                                 |> [HasStrictCommonScope sc3 sc1 sc2]
-                reds'      = mkReduction p info [par] : reds
-                rules      = mapTrans (Set.insert p done) reds' p (predecessors graph pr)
-
-        opts          = feEHCOpts $ fiEnv env
-
-mkScopedChrs :: [CHRClassDecl] -> [CHRScopedInstanceDecl] -> (MkResN,MkResN)
-mkScopedChrs clsDecls insts
-  = ((chrStoreUnions assumeStores,assumePredOccs), instChrs)
-  where (assumeStores,assumePredOccs) = unzip $ mapMaybe mkAssumeChrs clsDecls
-        instChrs   = mkInstanceChrs insts
-
-mkAssumeChrs :: CHRClassDecl -> Maybe MkRes1
-mkAssumeChrs ([]     ,  _  , _    ) = Nothing
-mkAssumeChrs (context, head, infos) =
-  let prThis = mkCHRPredOcc head sc1
-      super prSuper info = [mkAssume prSuper, mkReduction prSuper info [prThis]]
-      prSuper = map (\c -> mkCHRPredOcc c sc1) context
-  in  Just ( chrStoreSingletonElem $ [mkAssume prThis] ==> concat (zipWith super prSuper infos)
-           , (prSuper,prThis)
-           )
-
-mkInstanceChrs :: [CHRScopedInstanceDecl] -> MkResN
-mkInstanceChrs insts
-  = (chrStoreUnions instStores,instChrs)
-  where (instStores,instChrs) = unzip $ map mkInstanceChr insts
-
-mkInstanceChr :: CHRScopedInstanceDecl -> MkRes1
-mkInstanceChr (context, hd, i, s)
-  = ( chrStoreSingletonElem
-      $ [mkProve constraint]
-          ==> mkReduction constraint i body : map mkProve body
-            |> [s `IsVisibleInScope` sc1]
-    , (body,constraint)
-    )
-  where constraint = mkCHRPredOcc hd sc1
-        body = map (\p -> mkCHRPredOcc p sc1) context
-
-{-# LINE 282 "src/ehc/Pred/ToCHR.chs" #-}
-data SimplifyResult'' p i g pr s
-  = SimplifyResult
-      { simpresSolveState		:: SolveState FIIn (Constraint' p i) g pr s
-      , simpresRedGraph			:: RedGraph' p i
-
-      -- for debugging only:
-      , simpresRedAlts			:: [HeurAlts' p i]
-      , simpresRedTrees			:: [[(i, Evidence' p i)]]
-      , simpresRedGraphs		:: [(String,RedGraph' p i)]
-      , simpresRemPredL         :: [p]							-- remaining pred occurrences, which cannot be proven, as a list
-      }
-
-type SimplifyResult' g s = SimplifyResult'' CHRPredOcc RedHowAnnotation g Prio s
-
-type SimplifyResult = SimplifyResult' Guard VarMp
-
-emptySimplifyResult :: SimplifyResult
-emptySimplifyResult
-  = SimplifyResult
-      emptySolveState emptyRedGraph
-      [] [] [] []
-
-{-# LINE 306 "src/ehc/Pred/ToCHR.chs" #-}
-simplifyResultResetForAdditionalWork :: SimplifyResult -> SimplifyResult
-simplifyResultResetForAdditionalWork r = r {simpresRedGraph = emptyRedGraph}
-
-{-# LINE 315 "src/ehc/Pred/ToCHR.chs" #-}
-mkEvidence
-  :: Heuristic
-  -> ConstraintToInfoMap
-  -> RedGraph
-  -> ( -- ConstraintToInfoMap						-- remaining constraints
-       ConstraintToInfoTraceMp						-- remaining constraints
-     , InfoToEvidenceMap							-- mapping to evidence
-     , [Err]											-- errors
-     )
-mkEvidence heur cnstrMp redGraph
-  = ( {- (cnstrMp `Map.intersection` remCnstrMp) `Map.union` -}
-      cnstrTraceMpFromList remCnstrMp
-    , evidMp
-    , err
-    )
-  where (remCnstrMp,evidMp,err,dbg)
-          = foldl (\(cm,em,err,dbg) c -> let (cm',em',err',dbg') = mk c in (cm' ++ cm, evidMpUnion em' em, err' ++ err, dbg' ++ dbg))
-                  ([],Map.empty,[],[])
-            $ Map.toList cnstrMp
-        mk (Prove p, infos)
-          = (remCnstrMp,evidMp,[],[(redAlts,redTrees)])
-          where redAlts    = redAlternatives redGraph p
-                redTrees   = heur infos redAlts
-                evidMp     = foldr (uncurry evidMpInsert) Map.empty redTrees
-                remCnstrMp = [ (Prove (utraceRedFrom u),(i,[u])) | (i,t) <- redTrees, u <- evidUnresolved t ]
-        mk (c, infos)
-          = ([ (c,(i,[])) | i <- infos],Map.empty,[],[])
-
-{-# LINE 375 "src/ehc/Pred/ToCHR.chs" #-}
-partitionUnresolved2AssumableAndOthers :: ConstraintToInfoTraceMp -> ([CHRIntermediateUntilAssume],ConstraintToInfoTraceMp)
-partitionUnresolved2AssumableAndOthers unresCnstrMp
-  = (unres,cannotResCnstrMp)
-  where (unresCnstrMp',cannotResCnstrMp)
-                      = Map.partitionWithKey canAssume unresCnstrMp
-                      where -- if p only ranges over non-fixed tvars, we potentially can assume them (if not found ambiguous later)
-                            canAssume (Prove p) _ = Map.null $ Map.filter (tvCatIsFixed . tvinfoCateg) $ tyFtvMp $ predTy $ cpoPr p
-                            canAssume _         _ = True
-        unres         = [ (p,x) | (Prove p,x) <- shareUnresolvedAssumptionsByScope (unresCnstrMp') ]
-
-{-# LINE 387 "src/ehc/Pred/ToCHR.chs" #-}
--- | Group unresolved constraints, reducing the various scopes to the outermost scope.
---   Find assume's wich have a common scope prefix, then share these.
---   Assumption: we will never share outer scopes because we only get passed inner scopes, because these will be abstracted over in bindings of a let expression.
-shareUnresolvedAssumptionsByScope :: ConstraintToInfoTraceMp -> [(Constraint,(PredScope,ConstraintToInfoTraceMp))]
-shareUnresolvedAssumptionsByScope unres
-  = [ ( c
-      , ( -- the common prefix off all scopes, i.e. the most global scope
-          foldr1 (\s1 s2 -> panicJust "shareUnresolvedAssumptionsByScope" $ pscpCommon s1 s2)
-                 [ cpoScope $ cnstrPred c | (c,_) <- cs ]
-          -- all original info for this predicate
-        , Map.fromList cs
-        )
-      )
-    | cs@((c,_):_) <-
-        -- sort, then group by predicate, so we get all scopes for each predicate
-        groupSortOn (cpoPr . cnstrPred . fst) $ Map.toList unres
-    ]
-
-{-# LINE 411 "src/ehc/Pred/ToCHR.chs" #-}
--- | Transform unresolved Prove constraints to Assume variants, used either for quantification over, or for error messages about unresolved predicates
-patchUnresolvedWithAssumption :: FIIn -> [CHRIntermediateUntilAssume] -> RedGraph -> InfoToEvidenceMap -> (ConstraintToInfoTraceMp,InfoToEvidenceMap)
-patchUnresolvedWithAssumption env unres redGraph evidMp
-  = ( assumeCnstrs
-    , evidMpSubst (\p -> Map.lookup p assumeSubstMp) evidMp
-    )
-  where us = mkNewLevUIDL (length unres) $ fiUniq env
-        assumeCnstrs
-          = cnstrMpUnions
-              [ cnstrTraceMpSingleton c i (concat [ us | es <- Map.elems trMap, (_,us) <- es ])
-              | ((p,(sc,trMap)),u) <- zip unres us
-              , let (c,i) = rngLift emptyRange mkAssumeConstraint (cpoPr p) u sc
-              ]
-        assumeSubstMp
-          = Map.fromList [ (p,Evid_Proof p i []) | (Assume p,((i,_):_)) <- Map.toList assumeCnstrs ]
-
-{-# LINE 433 "src/ehc/Pred/ToCHR.chs" #-}
-chrSimplifySolveToRedGraph
-  ::   FIIn
-    -> CHRStore
-    -> ConstraintToInfoMap
-    -> ConstraintToInfoMap
-    -> SimplifyResult
-    -> ( ConstraintToInfoMap
-       , SimplifyResult
-       )
-chrSimplifySolveToRedGraph env chrStore cnstrInfoMpPrev cnstrInfoMp prevRes
-  = ( cnstrInfoMpAll
-    , emptySimplifyResult
-        { simpresSolveState = solveState
-        , simpresRedGraph   = redGraph
-        , simpresRedGraphs  = ("chrSimplifySolveToRedGraph",redGraph) : simpresRedGraphs prevRes
-        }
-    )
-  where (_,u1,u2) = mkNewLevUID2 $ fiUniq env
-        solveState = chrSolve'' (env {fiUniq = u1}) chrStore (map toSolverConstraint $ Map.keys $ cnstrInfoMp `Map.difference` cnstrInfoMpPrev) (simpresSolveState prevRes)
-        cnstrInfoMpAll = cnstrMpUnion cnstrInfoMp cnstrInfoMpPrev
-        redGraph
-          = addToRedGraphFromReductions (filterMb fromSolverConstraint $ chrSolveStateDoneConstraints solveState)
-            $ addToRedGraphFromAssumes cnstrInfoMpAll
-            $ simpresRedGraph prevRes
-
-{-# LINE 464 "src/ehc/Pred/ToCHR.chs" #-}
-chrSimplifyRedGraphToEvidence
-  :: Heuristic
-  -> ConstraintToInfoMap
-  -> SimplifyResult
-  -> ( ( ConstraintToInfoTraceMp, InfoToEvidenceMap, [Err] )
-     , SimplifyResult
-     )
-chrSimplifyRedGraphToEvidence heur cnstrInfoMpAll simpRes
-  = ( (chrSolveRemCnstrMp,chrSolveEvidMp,chrSolveErrs)
-    , simpRes
-    )
-  where ( chrSolveRemCnstrMp,chrSolveEvidMp,chrSolveErrs
-         )
-          = mkEvidence heur cnstrInfoMpAll (simpresRedGraph simpRes)
-
diff --git a/src/UHC/Light/Compiler/Scanner/Common.hs b/src/UHC/Light/Compiler/Scanner/Common.hs
--- a/src/UHC/Light/Compiler/Scanner/Common.hs
+++ b/src/UHC/Light/Compiler/Scanner/Common.hs
@@ -13,6 +13,7 @@
 import UHC.Light.Compiler.Base.Common
 import UHC.Light.Compiler.Opts.Base
 import qualified Data.Set as Set
+import qualified Data.Map as Map
 import UHC.Util.ScanUtils
 import UHC.Light.Compiler.Scanner.Scanner
 import UHC.Util.ParseUtils
@@ -125,7 +126,7 @@
                 )
 {-# LINE 208 "src/ehc/Scanner/Common.chs" #-}
         ,   scoPragmasTxt      =
-                (Set.fromList $
+                (Map.fromList $
                        tokPragmaStrsHS99
                 )
 {-# LINE 214 "src/ehc/Scanner/Common.chs" #-}
@@ -727,6 +728,7 @@
 	pOPTIONSUHC_prag  	,
 	pDERIVABLE_prag		,
 	pEXCLUDEIFTARGET_prag,
+	pCHR_prag           ,
     pOPRAGMA    		,
     pCPRAGMA
   :: IsParser p Token => p Token
@@ -735,9 +737,16 @@
 pDERIVABLE_prag  = pKeyTk "DERIVABLE"
 pEXCLUDEIFTARGET_prag  = pKeyTk "EXCLUDE_IF_TARGET"
 pOPTIONSUHC_prag = pKeyTk "OPTIONS_UHC"
+pCHR_prag        = pKeyTk "CHR"
 pOPRAGMA         = pKeyTk "{-#"
 pCPRAGMA         = pKeyTk "#-}"
 
-tokPragmaStrsHS99= [ "LANGUAGE", "DERIVABLE", "EXCLUDE_IF_TARGET", "OPTIONS_UHC" {- , "INLINE", "NOINLINE", "SPECIALIZE" -} ]
+tokPragmaStrsHS99=
+    [ mkf "LANGUAGE", mkf "DERIVABLE", mkf "EXCLUDE_IF_TARGET", mkf "OPTIONS_UHC"
+    , mkt "CHR"
+    {- , "INLINE", "NOINLINE", "SPECIALIZE" -}
+    ]
+  where mkt = flip (,) True
+        mkf = flip (,) False
 
 
diff --git a/src/UHC/Light/Compiler/Scanner/Machine.hs b/src/UHC/Light/Compiler/Scanner/Machine.hs
--- a/src/UHC/Light/Compiler/Scanner/Machine.hs
+++ b/src/UHC/Light/Compiler/Scanner/Machine.hs
@@ -14,6 +14,7 @@
 import UHC.Util.ScanUtils
 import UHC.Light.Compiler.Scanner.Token
 import qualified Data.Set as Set
+import qualified Data.Map as Map
 import UHC.Util.Debug
 
 
@@ -56,7 +57,7 @@
    isOpsym  = (`Set.member` scoOpChars opts)
    isPairSym= (`Set.member` scoSpecPairs opts)
    isStringDelim = (`elem` scoStringDelims opts)
-   isPragma = (`Set.member` scoPragmasTxt opts) . map toUpper
+   isPragma = maybe (False,False) ((,) True). (`Map.lookup` scoPragmasTxt opts) . map toUpper
 
    isIdStart c = isLower    c || c == '_' || iskwextra c
    isIdChar  c = scanpredIsIdChar c || iskwextra c
@@ -102,10 +103,6 @@
    scanString :: Char -> Pos -> String -> (String,Pos,String)
    scanString d p []            = ("",p,[])
    scanString d p ('\\':'&':xs) = scanString d (advc 2 p) xs
-   {-
-   scanString d p ('\'':xs)     = let (str,p',r) = scanString d (advc 1 p) xs
-                                  in  ('\'': str,p',r)
-   -}
    scanString d p ( c  :xs) | isStringDelim c && c /= d
                                 = let (str,p',r) = scanString d (advc 1 p) xs
                                   in  (c:str,p',r)
@@ -118,7 +115,15 @@
                            (str,p',r) = scanString d (advc cw p) cr
                        in  maybe ("",p,xs) (\c -> (c:str,p',r)) ch
 
-{-# LINE 158 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 154 "src/ehc/Scanner/Machine.chs" #-}
+   scanPragmaString :: Pos -> String -> (String,Pos,String)
+   scanPragmaString p   []               = ("", p, [])
+   scanPragmaString p s@('#':'-':'}':xs) = ("", p, s )
+   scanPragmaString p   ( c         :xs) =
+                                let (  str,p',r) = scanPragmaString (adv p c) xs
+                                in  (c:str,p',r)
+
+{-# LINE 163 "src/ehc/Scanner/Machine.chs" #-}
    scanLitText scSt p ('\\':'b':'e':'g':'i':'n':'{':'c':'o':'d':'e':'}':s)
      | posIs1stColumn p
          = doScan scSt (advc 12 p) s
@@ -131,7 +136,7 @@
    scanLitText scSt p []
          = []
 
-{-# LINE 172 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 177 "src/ehc/Scanner/Machine.chs" #-}
    doScan scSt p [] = []
    doScan scSt p (c:s)     | isSpace c = let (sp,next) = span isSpace s
                                          in  doScan (scSt {ssAfterQual=False}) (foldl adv p (c:sp)) next
@@ -140,12 +145,18 @@
    doScan scSt p ('-':'-':s@(c:_))
      | c == '-' || not (isOpsym c)
        = doScan (scSt {ssAfterQual=False}) p (dropWhile (/= '\n') s)
-{-
--}
    doScan scSt p ('{':'-':'#':s)
-     | isPragma pragma
-       = reserved "{-#" p : reserved pragma p2 : doScan (scSt {ssAfterQual=False}) p3 s3
-       where (w        ,s2) = getWhite s
+     | isPr
+       = reserved "{-#" p : reserved pragma p2 :
+           (if asStr
+            then let (s,p',rest) = scanPragmaString p3 s3
+                 in if null rest || head rest /= '#'
+                       then errToken "Unterminated pragma string" p3 : doScan scSt p' rest
+                       else valueToken TkString s p3 : reserved "#-}" p' : doScan scSt (advc 3 p') (drop 3 rest)
+            else doScan (scSt {ssAfterQual=False}) p3 s3
+           )
+       where (isPr,asStr)   = isPragma pragma
+             (w        ,s2) = getWhite s
              p2             = advc (length w) $ advc 3 p
              (pragma,p3,s3) = scanIdent isIdChar p2 s2
    doScan scSt p ('#':'-':'}':s) = reserved "#-}" p : doScan (scSt {ssAfterQual=False}) (advc 3 p) s
@@ -157,7 +168,7 @@
              then errToken "Unterminated string literal" p : doScan scSt p' rest
              else valueToken TkString s p : doScan scSt (advc 1 p') (tail rest)
 
-{-# LINE 201 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 212 "src/ehc/Scanner/Machine.chs" #-}
    doScan scSt p ('$':ss)
      | scoDollarIdent opts   = tok : doScan scSt (advc (w+1) p) ss'
          where (ident,w,ss') = scanDollarIdent ss
@@ -165,12 +176,12 @@
                      then errToken "Zero length $identifier" p
                      else valueToken TkVarid ident p
 
-{-# LINE 210 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 221 "src/ehc/Scanner/Machine.chs" #-}
    doScan scSt p ('\\':'e':'n':'d':'{':'c':'o':'d':'e':'}':s)
      | scoLitmode opts && posIs1stColumn p
          = scanLitText scSt (advc 10 p) s
 
-{-# LINE 216 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 227 "src/ehc/Scanner/Machine.chs" #-}
    -- this is experimental, for now, not foolproof, only to be used for the Prelude
    doScan scSt p ('\'':'\'':ss)
      = let (s,w,r) = scanDQuoteIdent ss
@@ -193,7 +204,7 @@
      | isSymbol c
                 = reserved [c] p
                   : doScan (scSt {ssAfterQual=False}) (advc 1 p) s
-{-# LINE 240 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 251 "src/ehc/Scanner/Machine.chs" #-}
      | isIdStart c || isUpper c
          =
            let (qualPrefix,qualTail) = scanQualified cs
@@ -213,7 +224,7 @@
                       (tok@(ValToken tp val _):toks)
                          -> ValToken (tokTpQual tp) (qualPrefix ++ val) p : toks
                       ts -> ts
-{-# LINE 268 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 279 "src/ehc/Scanner/Machine.chs" #-}
      | isOpsym c
                  = let (name, s') = span isOpsym cs
                        tok n p (c:_)
@@ -231,21 +242,21 @@
                            where (pre,suf) = splitAt (length n - 2) n
                        (toks,drops) = tok name p s'
                    in toks ++ doScan (scSt {ssAfterQual=False}) (advc drops $ foldl adv p name) (drop drops s')
-{-# LINE 287 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 298 "src/ehc/Scanner/Machine.chs" #-}
      | scoAllowFloat opts && isDigit c
          = let (tktype,(number,mantissa,exp),w,cs') = getRational' cs
                m = maybe "" (\mant -> "." ++ mant)
                e = maybe "" (\(sign,exp) -> "E" ++ maybe "" id sign ++ exp)
            in  valueToken tktype (number ++ m mantissa ++ e exp) p
                  : doScan scSt (advc w p) cs'
-{-# LINE 295 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 306 "src/ehc/Scanner/Machine.chs" #-}
      | isDigit c = let (tktype,number,width,s') = getNumber cs
                    in  valueToken tktype number p : doScan scSt (advc width p) s'
-{-# LINE 299 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 310 "src/ehc/Scanner/Machine.chs" #-}
      | otherwise = errToken ("Unexpected character " ++ show c) p
                  : doScan scSt (adv p c) s
 
-{-# LINE 308 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 319 "src/ehc/Scanner/Machine.chs" #-}
 -- | Is base char for identifiers (and keywords)
 scanpredIsIdChar :: Char -> Bool
 scanpredIsIdChar  c = isAlphaNum c || c == '\'' || c == '_' -- -|| iskwextra c
@@ -254,7 +265,7 @@
 scanpredIsKeywExtra :: ScanOpts -> Char -> Bool
 scanpredIsKeywExtra opts = (`Set.member` scoKeywExtraChars opts)
 
-{-# LINE 322 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 333 "src/ehc/Scanner/Machine.chs" #-}
 varKind :: String -> EnumValToken
 varKind ('_':s)             = varKind s
 varKind (c  :s) | isUpper c = TkConid
@@ -273,26 +284,6 @@
        nest c scSt p (x:s)       = nest c scSt (adv p x) s
        nest _ _    _ []          = [ errToken "Unterminated nested comment" pos]
 
-
-{-
-scanString :: Char -> Pos -> String -> (String,Pos,String)
-scanString d p []            = ("",p,[])
-scanString d p ('\\':'&':xs) = scanString d (advc 2 p) xs
--- scanString d p ('\'':xs)     = let (str,p',r) = scanString d (advc 1 p) xs
---                                in  ('\'': str,p',r)
-scanString d p ( c  :xs) | isStringDelim c && c /= d
-                             = let (str,p',r) = scanString d (advc 1 p) xs
-                               in  (c:str,p',r)
-scanString d p ('\\':x:xs) | isSpace x
-                             = let (white,rest) = span isSpace xs
-                               in  case rest of
-                                     ('\\':rest') -> scanString d (advc 1 $ foldl adv (advc 2 p) white) rest'
-                                     _            -> ("",advc 2 p,xs)
-scanString d p xs = let (ch,cw,cr) = getchar d xs
-                        (str,p',r) = scanString d (advc cw p) cr
-                    in  maybe ("",p,xs) (\c -> (c:str,p',r)) ch
--}
-
 scanChar :: [Char] -> (Maybe Char,Int,[Char])
 scanChar ('"' :xs) = (Just '"',1,xs)
 scanChar xs        = getchar '\'' xs
@@ -308,11 +299,11 @@
                         in (c,l+1,r)
 getchar d (x:xs)      = (Just x,1,xs)
 
-{-# LINE 377 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 368 "src/ehc/Scanner/Machine.chs" #-}
 getWhite :: String -> (String,String)
 getWhite = span (`elem` " \t\r\n")
 
-{-# LINE 382 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 373 "src/ehc/Scanner/Machine.chs" #-}
 scanDQuoteIdent :: String -> (String,Int,String)
 scanDQuoteIdent []             = ("",0,[])
 scanDQuoteIdent ('\'':'\'':xs) = ("",0,xs)
@@ -380,7 +371,7 @@
             in  if null n then const0
                           else (tk         , n, 2+length n,rs)
 
-{-# LINE 459 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 450 "src/ehc/Scanner/Machine.chs" #-}
 getRational' :: String -> (EnumValToken,(String,Maybe String,Maybe (Maybe String,String)),Int,String)
 getRational' s
   = case s2 of
@@ -417,7 +408,7 @@
   = n
   where (_,n,_,_) = getRational' s
 
-{-# LINE 497 "src/ehc/Scanner/Machine.chs" #-}
+{-# LINE 488 "src/ehc/Scanner/Machine.chs" #-}
 isHexaDigit :: Char -> Bool
 isHexaDigit  d = isDigit d || (d >= 'A' && d <= 'F') || (d >= 'a' && d <= 'f')
 
diff --git a/src/UHC/Light/Compiler/SourceCodeSig.hs b/src/UHC/Light/Compiler/SourceCodeSig.hs
--- a/src/UHC/Light/Compiler/SourceCodeSig.hs
+++ b/src/UHC/Light/Compiler/SourceCodeSig.hs
@@ -1,3 +1,3 @@
 module UHC.Light.Compiler.SourceCodeSig where
-sig = "86ccf3db3cbbee52faa87090ccfe50bc"
-timestamp = "20160219 +0100 201122"
+sig = "913250209a27dc1670f2ac951f4e5f16"
+timestamp = "20160521 +0200 071542"
diff --git a/src/UHC/Light/Compiler/Substitutable.hs b/src/UHC/Light/Compiler/Substitutable.hs
--- a/src/UHC/Light/Compiler/Substitutable.hs
+++ b/src/UHC/Light/Compiler/Substitutable.hs
@@ -43,16 +43,16 @@
       _              -> emptyTvCatMp		-- incomplete
 
 {-# LINE 73 "src/ehc/Substitutable.chs" #-}
-type instance SubstVarKey VarMp = VarId
-type instance SubstVarVal VarMp = VarMpInfo
+type instance VarLookupKey VarMp = VarId
+type instance VarLookupVal VarMp = VarMpInfo
 
-type instance SubstVarKey (VarMp' k v) = k
-type instance SubstVarVal (VarMp' k v) = v
+{-
+type instance VarLookupKey (VarMp' k v) = k
+type instance VarLookupVal (VarMp' k v) = v
+-}
 
-{-# LINE 89 "src/ehc/Substitutable.chs" #-}
-instance (VarLookup m (SubstVarKey m) (SubstVarVal m), SubstVarKey m ~ TyVarId, SubstVarVal m ~ VarMpInfo) => VarUpdatable Ty m where
-  -- type SubstVarKey m = SubstVarKey m
-  -- type SubstVarVal m = SubstVarVal m
+{-# LINE 91 "src/ehc/Substitutable.chs" #-}
+instance (VarLookup m, VarLookupKey m ~ TyVarId, VarLookupVal m ~ VarMpInfo) => VarUpdatable Ty m where
   varUpd     	= tyAppVarLookup
   varUpdCyc    = tyAppVarLookup2
 
@@ -61,11 +61,9 @@
 instance VarExtractable Ty where
   varFreeSet    = tyFtv
 
-{-# LINE 110 "src/ehc/Substitutable.chs" #-}
+{-# LINE 108 "src/ehc/Substitutable.chs" #-}
 -- instance VarUpdatable Label VarMp where
-instance (VarLookup m (SubstVarKey m) (SubstVarVal m), SubstVarKey m ~ ImplsVarId, SubstVarVal m ~ VarMpInfo) => VarUpdatable Label m where
-  -- type SubstVarKey m = ImplsVarId
-  -- type SubstVarVal m = VarMpInfo
+instance (VarLookup m, VarLookupKey m ~ ImplsVarId, VarLookupVal m ~ VarMpInfo) => VarUpdatable Label m where
   s `varUpd` lb          = maybe lb id $ varmpLabelLookupLabelCyc lb s
 
 type instance ExtrValVarKey Label = TyVarId
@@ -75,9 +73,7 @@
   varFree _             = []
 
 -- instance VarUpdatable LabelOffset VarMp where
-instance (VarLookup m (SubstVarKey m) (SubstVarVal m), SubstVarKey m ~ UID, SubstVarVal m ~ VarMpInfo) => VarUpdatable LabelOffset m where
-  -- type SubstVarKey m = UID
-  -- type SubstVarVal m = VarMpInfo
+instance (VarLookup m, VarLookupKey m ~ UID, VarLookupVal m ~ VarMpInfo) => VarUpdatable LabelOffset m where
   s `varUpd` o@(LabelOffset_Var v) = maybe o id $ varmpOffsetLookup v s
   s `varUpd` o                     = o
 
@@ -87,23 +83,23 @@
   varFree (LabelOffset_Var v) = [v]
   varFree _                   = []
 
-{-# LINE 137 "src/ehc/Substitutable.chs" #-}
+{-# LINE 131 "src/ehc/Substitutable.chs" #-}
+{- 20160421: in uhc-util
 -- instance (VarUpdatable vv subst) => VarUpdatable [vv] subst where
-instance (Ord (SubstVarKey subst), VarUpdatable vv subst) => VarUpdatable [vv] subst where
-  -- type SubstVarKey subst = SubstVarKey subst
-  -- type SubstVarVal subst = SubstVarVal subst
+instance (Ord (VarLookupKey subst), VarUpdatable vv subst) => VarUpdatable [vv] subst where
   s      `varUpd`  l   =   map (varUpd s) l
   s      `varUpdCyc` l   =   (l,varmpUnions m)
                   where (l,m) = unzip $ map (varUpdCyc s) l
+-}
 
+{- 20160411: in uhc-util
 instance (VarExtractable vv) => VarExtractable [vv] where
   varFreeSet      l   =   Set.unions $ map varFreeSet l
+-}
 
-{-# LINE 181 "src/ehc/Substitutable.chs" #-}
+{-# LINE 173 "src/ehc/Substitutable.chs" #-}
 -- instance VarLookupCmb m (VarMp' k v) => VarUpdatable (VarMp' k v) m where
 instance VarLookupCmb (VarMp' k v) (VarMp' k v) => VarUpdatable (VarMp' k v) (VarMp' k v) where
-  -- type SubstVarKey (VarMp' k v) = k
-  -- type SubstVarVal (VarMp' k v) = v
   varUpd                                =   (|+>)
 
 type instance ExtrValVarKey VarMp = TyVarId
@@ -111,20 +107,16 @@
 instance VarExtractable VarMp where
   varFreeSet               (VarMp _ sl)    =   Set.unions $ map (varFreeSet . Map.elems) sl
 
-{-# LINE 194 "src/ehc/Substitutable.chs" #-}
+{-# LINE 184 "src/ehc/Substitutable.chs" #-}
 -- instance VarUpdatable vv subst => VarUpdatable (HsName,vv) subst where
 instance VarUpdatable vv subst => VarUpdatable (HsName,vv) subst where
-  -- type SubstVarKey subst = SubstVarKey subst
-  -- type SubstVarVal subst = SubstVarVal subst
   s `varUpd`  (k,v) =  (k,s `varUpd` v)
 
 instance (VarExtractable vv, ExtrValVarKey vv ~ ExtrValVarKey (HsName,vv)) => VarExtractable (HsName,vv) where
   varFreeSet (_,v) =  varFreeSet v
 
-{-# LINE 205 "src/ehc/Substitutable.chs" #-}
+{-# LINE 193 "src/ehc/Substitutable.chs" #-}
 instance VarUpdatable Pred VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd`  p  =  (\(Ty_Pred p) -> p) (s `varUpd` (Ty_Pred p))
 
 type instance ExtrValVarKey Pred = TyVarId
@@ -133,9 +125,7 @@
   varFreeSet p  =  varFreeSet (Ty_Pred p)
 
 -- instance VarUpdatable PredScope VarMp where
-instance (VarLookup m (SubstVarKey m) (SubstVarVal m), SubstVarKey m ~ ImplsVarId, SubstVarVal m ~ VarMpInfo) => VarUpdatable PredScope m where
-  -- type SubstVarKey m = ImplsVarId
-  -- type SubstVarVal m = VarMpInfo
+instance (VarLookup m, VarLookupKey m ~ ImplsVarId, VarLookupVal m ~ VarMpInfo) => VarUpdatable PredScope m where
   s `varUpd`  sc                   = maybe sc id $ varmpScopeLookupScopeCyc sc s
 
 type instance ExtrValVarKey PredScope = TyVarId
@@ -145,8 +135,6 @@
   varFree    _                    = []
 
 instance VarUpdatable CHRPredOccCxt VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd`  (CHRPredOccCxt_Scope1 sc) = CHRPredOccCxt_Scope1 (s `varUpd` sc)
 
 type instance ExtrValVarKey CHRPredOccCxt = TyVarId
@@ -155,8 +143,6 @@
   varFree    (CHRPredOccCxt_Scope1 sc) = varFree sc
 
 instance VarUpdatable PredOcc VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd`  (PredOcc pr id sc r)  = PredOcc (s `varUpd` pr) id (s `varUpd` sc) r
 
 type instance ExtrValVarKey PredOcc = TyVarId
@@ -165,8 +151,6 @@
   varFreeSet (PredOcc pr id sc _)  = varFreeSet pr `Set.union` varFreeSet sc
 
 instance VarUpdatable CHRPredOcc VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd`  (CHRPredOcc pr sc r)  = CHRPredOcc (s `varUpd` pr) (s `varUpd` sc) r
 
 type instance ExtrValVarKey CHRPredOcc = TyVarId
@@ -175,8 +159,6 @@
   varFreeSet (CHRPredOcc pr sc _)  = varFreeSet pr `Set.union` varFreeSet sc
 
 instance VarUpdatable Impls VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd`  i  =  (\(Ty_Impls i) -> i) (s `varUpd` (Ty_Impls i))
 
 type instance ExtrValVarKey Impls = TyVarId
@@ -184,10 +166,8 @@
 instance VarExtractable Impls where
   varFreeSet i  =  varFreeSet (Ty_Impls i)
 
-{-# LINE 285 "src/ehc/Substitutable.chs" #-}
+{-# LINE 261 "src/ehc/Substitutable.chs" #-}
 instance VarUpdatable VarMpInfo VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd` vmi =  case vmi of
                  VMITy       t  -> VMITy (s `varUpd` t)
                  VMIImpls    i  -> VMIImpls (s `varUpd` i)
@@ -197,7 +177,7 @@
                  -- VMIExts     x  -> VMIExts (s `varUpd` x)
                  vmi            -> vmi
 
-{-# LINE 305 "src/ehc/Substitutable.chs" #-}
+{-# LINE 279 "src/ehc/Substitutable.chs" #-}
 type instance ExtrValVarKey VarMpInfo = VarId
 
 instance VarExtractable VarMpInfo where
@@ -211,10 +191,8 @@
                  vmi            -> Set.empty
 
 
-{-# LINE 341 "src/ehc/Substitutable.chs" #-}
+{-# LINE 315 "src/ehc/Substitutable.chs" #-}
 instance VarUpdatable PredSeq VarMp where
-  -- type SubstVarKey VarMp = VarId
-  -- type SubstVarVal VarMp = VarMpInfo
   s `varUpd`  a@(PredSeq_Var  v  ) = maybe a id $ varmpPredSeqLookup v s
   s `varUpd`    (PredSeq_Cons h t) = PredSeq_Cons (s `varUpd` h) (s `varUpd` t)
   _ `varUpd`    x                  = x
@@ -226,7 +204,7 @@
   varFreeSet   (PredSeq_Cons h t) = varFreeSet h `Set.union` varFreeSet t
   varFreeSet _                    = Set.empty
 
-{-# LINE 361 "src/ehc/Substitutable.chs" #-}
+{-# LINE 333 "src/ehc/Substitutable.chs" #-}
 -- | Construct varmp for fixing tvars to new fresh fixed tvars + varmp for unfixing those to (again) fresh tvars, resp meta tvars
 fixTyVarsVarMp :: UID -> Ty -> (VarMp,VarMp,VarMp,VarMp)
 fixTyVarsVarMp uniq t
@@ -251,21 +229,21 @@
   = smTo `varUpd` t
   where (_,smTo,_,_) = fixTyVarsVarMp uniq t
 
-{-# LINE 391 "src/ehc/Substitutable.chs" #-}
+{-# LINE 363 "src/ehc/Substitutable.chs" #-}
 setSubst :: VarMp -> TyVarIdS -> TyVarIdS
 setSubst m s = varFreeSet $ (varUpd m) $ map mkTyVar $ Set.toList s
 
-{-# LINE 400 "src/ehc/Substitutable.chs" #-}
+{-# LINE 372 "src/ehc/Substitutable.chs" #-}
 varmpMapTyVarKey :: VarMp -> VarMp -> VarMp
 varmpMapTyVarKey mMap m
   = varmpUnions [ varmpTyUnit v x | (Ty_Var v _,x) <- assocLMapKey (\v -> fst $ appUnAnnCanon $ mMap `varUpd` mkTyVar v) $ varmpToAssocTyL m ]
 
 
-{-# LINE 420 "src/ehc/Substitutable.chs" #-}
+{-# LINE 392 "src/ehc/Substitutable.chs" #-}
 ppS :: VarUpdatable x m => (x -> PP_Doc) -> m -> x -> PP_Doc
 ppS pp c x = (pp $ c `varUpd` x) >#< ppParens (pp x)
 
-{-# LINE 437 "src/ehc/Substitutable.chs" #-}
+{-# LINE 409 "src/ehc/Substitutable.chs" #-}
 varmpOccurErr :: Range -> VarMp -> VarMp -> [Err]
 varmpOccurErr r m mc = [ Err_OccurCycle r v (varmpDel [v] m `varUpd` t) | (v,t) <- varmpToAssocTyL mc ]
 
diff --git a/src/UHC/Light/Compiler/Ty.hs b/src/UHC/Light/Compiler/Ty.hs
--- a/src/UHC/Light/Compiler/Ty.hs
+++ b/src/UHC/Light/Compiler/Ty.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty.ag)
 module UHC.Light.Compiler.Ty(TyAGItf (..), Ty (..), TyAnn (..), TyL, tyInt, tyChar
 , tyLHdAndTl, tyProdArgs
 , tyUnAnn
diff --git a/src/UHC/Light/Compiler/Ty/FitsIn.hs b/src/UHC/Light/Compiler/Ty/FitsIn.hs
--- a/src/UHC/Light/Compiler/Ty/FitsIn.hs
+++ b/src/UHC/Light/Compiler/Ty/FitsIn.hs
@@ -41,7 +41,7 @@
 import UHC.Light.Compiler.Core.Subst
 import UHC.Light.Compiler.Core.Coercion
 import UHC.Light.Compiler.Core.Pretty
-import UHC.Light.Compiler.CHR.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
 import UHC.Light.Compiler.Core.Utils
 import UHC.Light.Compiler.Ty.Trf.BetaReduce
 
@@ -91,7 +91,8 @@
 fiAppSpineLookup
   :: forall gm .
      ( VarLookupCmb VarMp gm
-     , VarLookup gm TyVarId VarMpInfo
+     , VarLookup gm
+     , VarLookupKey gm ~ TyVarId, VarLookupVal gm ~ VarMpInfo
      )
      => FIIn' gm -> HsName -> AppSpineGam -> Maybe AppSpineInfo
 fiAppSpineLookup fi n gappSpineGam
@@ -110,7 +111,7 @@
                 (_,u1,u2) = mkNewLevUID2 uidStart
                 fo = fitsIn weakFIOpts emptyFE u1 (emptyVarMp :: VarMp) pol (map mkPolVar (mkNewUIDL (length polargs) u2) `appArr` polCovariant)
 
-{-# LINE 287 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 288 "src/ehc/Ty/FitsIn.chs" #-}
 manyFO :: [FIOut] -> FIOut
 manyFO = foldr1 (\fo1 fo2 -> if foHasErrs fo1 then fo1 else fo2)
 
@@ -121,9 +122,9 @@
      , VarLookupCmb gm gm
      )
      => -}
-     ( VarLookup gm TyVarId VarMpInfo
+     ( VarLookup gm
      , VarLookupCmb VarMp gm
-     , SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo
+     , VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo
      )
      => FIOpts -> FIEnv -> UID -> gm -> Ty -> Ty
      -> FIOut
@@ -138,7 +139,7 @@
         ) :: FIIn' gm
        )
 
-{-# LINE 318 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 319 "src/ehc/Ty/FitsIn.chs" #-}
 fitsInFI
   :: forall gm .
      {- ( VarUpdatable Ty gm
@@ -146,9 +147,9 @@
      , VarLookupCmb gm gm
      )
      => -}
-     ( VarLookup gm TyVarId VarMpInfo
+     ( VarLookup gm
      , VarLookupCmb VarMp gm
-     , SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo
+     , VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo
      )
      => FIIn' gm -> Ty -> Ty
      -> FIOut
@@ -185,16 +186,16 @@
             -- binding
             occurBind fi isLBind v t=  bind fi isLBind v t
 
-{-# LINE 412 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 413 "src/ehc/Ty/FitsIn.chs" #-}
             -- 20080309, AD: naming of function is not right, type info neither, error yes. Should indicate a double expansion of tyvar, indicating infinite type.
             errInfinite fi v t      =  err fi [rngLift range Err_UnifyOccurs (fiAppVarMp fi ty1) (fiAppVarMp fi ty2) (fioMode (fiFIOpts fi)) v t (fioMode (fiFIOpts fi))]
 
-{-# LINE 417 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 418 "src/ehc/Ty/FitsIn.chs" #-}
             lookupImplsVarCyc fi v  =  fiLookupVar' varmpImplsLookupCyc varmpImplsLookupCyc v (fiVarMpLoc fi) (fiVarMp fi)
-{-# LINE 420 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 421 "src/ehc/Ty/FitsIn.chs" #-}
             lookupLabelCyc    fi v  =  fiLookupVar' varmpLabelLookupLabelCyc varmpLabelLookupLabelCyc v (fiVarMpLoc fi) (fiVarMp fi)
 
-{-# LINE 424 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 425 "src/ehc/Ty/FitsIn.chs" #-}
             bind fi isLBind tv t    =  dtfo "bind" fi tv' t [] (tv `varmpTyUnit` t)
                                        $ res' (fiBindTyVar tv t fi2) tv' t
                                     where tv' = mkTyVar tv
@@ -204,13 +205,13 @@
                                                        fiInhibitBind v fi
                                                   _ -> fi
 
-{-# LINE 443 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 444 "src/ehc/Ty/FitsIn.chs" #-}
             allowImpredTVBindL fi t _
                 = fioBindLFirst (fiFIOpts fi) && fiAllowTyVarBind fi t
             allowImpredTVBindR fi t _
                 = fioBindRFirst (fiFIOpts fi) && fiAllowTyVarBind fi t
 
-{-# LINE 450 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 451 "src/ehc/Ty/FitsIn.chs" #-}
             -- removal of quantifier
             unquant fi t hide howToInst
                 = ( fi { fiUniq = u
@@ -223,7 +224,7 @@
                        back              = if hide  then  \fo -> foSetVarMp (varmpDel rtvs (foVarMp fo)) $ foUpdTy t fo
                                                     else  id
 
-{-# LINE 496 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 497 "src/ehc/Ty/FitsIn.chs" #-}
             foUpdVarMp  c fo = fo {foVarMp = c |+> foVarMp fo}
             fifo       fi fo = fo { foVarMp    = fiVarMpLoc fi, foUniq = fiUniq fi, foTrace = fiTrace fi
                                   , foDontBind = fioDontBind (fiFIOpts fi)
@@ -234,35 +235,35 @@
                                   }
                                where o  = fiFIOpts fi
 
-{-# LINE 512 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 513 "src/ehc/Ty/FitsIn.chs" #-}
             fiInhibitBind v fi = fi {fiFIOpts = o {fioDontBind = v `Set.insert` fioDontBind o}}
                                where o  = fiFIOpts fi
 
-{-# LINE 517 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 518 "src/ehc/Ty/FitsIn.chs" #-}
             foUpdTy  t   fo  = fo {foTy = t}
 
-{-# LINE 521 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 522 "src/ehc/Ty/FitsIn.chs" #-}
             foCmbAppTy   ffo afo  = afo {foTy = Ty_App (foTy ffo) (foTy afo)}
             foCmbVarMp   ffo afo  = afo -- {foVarMp = foVarMp afo `varUpd` foVarMp ffo}
             foCmbCoCon   ffo afo  = afo {foMbAppSpineInfo = fmap asgiShift1SpinePos $ foMbAppSpineInfo ffo}
 
-{-# LINE 527 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 528 "src/ehc/Ty/FitsIn.chs" #-}
             foCmbPrL     ffo afo  = afo {foPredOccL = foPredOccL afo ++ foPredOccL ffo, foGathCnstrMp = foGathCnstrMp afo `cnstrMpUnion` foGathCnstrMp ffo}
-{-# LINE 530 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 531 "src/ehc/Ty/FitsIn.chs" #-}
             foCmbCSubst  ffo afo  = afo {foCSubst = cSubstApp (foCSubst afo) (foCSubst ffo)}
 
-{-# LINE 534 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 535 "src/ehc/Ty/FitsIn.chs" #-}
             foCmbApp     ffo      =
                                     -- foCmbTvKiVarMp ffo .
                                     -- (\afo -> afo {foDontBind = ((\x -> Debug.tr "foCmbApp.ffo" (pp $ show x) x) $ foDontBind ffo) `Set.union` ((\x -> Debug.tr "foCmbApp.afo" (pp $ show x) x) $ foDontBind afo)}) .
                                     foCmbPrfRes ffo .
                                     foCmbCoCon ffo . foCmbVarMp ffo . foCmbAppTy ffo
 
-{-# LINE 552 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 553 "src/ehc/Ty/FitsIn.chs" #-}
             foCmbPrfRes  ffo      = foCmbPrL ffo
                                     . foCmbCSubst ffo
 
-{-# LINE 559 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 560 "src/ehc/Ty/FitsIn.chs" #-}
             fiAddPr n i prTy fi
                 =  let  e                   = fiEnv fi
                         (_,assumePredScope) = pscpEnter 0 $ fePredScope (fiEnv fi)
@@ -283,7 +284,7 @@
                               $ foUpdLRCoe lrcoe
                                 fo
 
-{-# LINE 591 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 592 "src/ehc/Ty/FitsIn.chs" #-}
             deepInstMatchTy fi t
               = case t of
                   _ | not (null as
@@ -295,7 +296,7 @@
               where (u,u1) = mkNewLevUID (fiUniq fi)
                     fi' = fi {fiUniq = u}
 
-{-# LINE 606 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 607 "src/ehc/Ty/FitsIn.chs" #-}
             fPairWise fi tL1 tL2
               =  foldr  (\(t1,t2) (foL,fii)
                            -> let  fo = fVar' fTySyn fii id t1 t2
@@ -303,7 +304,7 @@
                         ([],fi)
                         (zip tL1 tL2)
 
-{-# LINE 621 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 622 "src/ehc/Ty/FitsIn.chs" #-}
             fRow fi tr1 tr2 isRec isSum
                 = foR
                 where  (r1,exts1) = tyRowExtsUnAnn $ tyRowExtsWithLkup (fiLookupTyVarCyc fi) tr1
@@ -364,7 +365,7 @@
                                        $ foUpdRecFldsCoe eKeys foL tr1
                                        $ foUpdTy (foTy fo `recRow` eL) fo
 
-{-# LINE 690 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 691 "src/ehc/Ty/FitsIn.chs" #-}
                        fR fi r1@(Ty_Var _ f1) r2@(Ty_Con n2) [] [] []
                          | tvCatIsFixed f1 && n2 == hsnRowEmpty && isRec
                          = res fi r2
@@ -376,11 +377,11 @@
                               { foLRCoe = emptyLRCoe
                               }
 
-{-# LINE 713 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 714 "src/ehc/Ty/FitsIn.chs" #-}
                        fR fi _ _ _ _ _
                          = errClash fi tr1 tr2
 
-{-# LINE 722 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 723 "src/ehc/Ty/FitsIn.chs" #-}
                        fo         = fR fi2 r1 r2 extsIn1 extsIn12 extsIn2
                        foR        = (if isRec then foUpdRecCoe tr1 r1 r2 extsIn1 extsIn12 extsIn2 else id) fo
                        foUpdRecCoe tr1 r1 r2 e1 e12 e2 fo
@@ -484,7 +485,7 @@
                                              }
                                      where coe = Coe_Map (\e -> acoreLet1Plain rn e (fuMkCExpr globOpts u4 fuUpdL r))
 
-{-# LINE 879 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 880 "src/ehc/Ty/FitsIn.chs" #-}
                        foUpdRecFldsCoe eKeys foL tr1 foR
                          =  let (u',u1) = mkNewLevUID (foUniq foR)
                                 us = mkNewLevUIDL (length foL) u1
@@ -500,10 +501,10 @@
                                     , foCSubst = foldr cSubstApp (foCSubst foR) sL
                                     }
 
-{-# LINE 904 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 905 "src/ehc/Ty/FitsIn.chs" #-}
             f fi t1 t2
               = fBase fi id t1 t2
-{-# LINE 912 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 913 "src/ehc/Ty/FitsIn.chs" #-}
             fTySyn fi updTy t1 t2
               = case filter (not . foHasErrs) tries of
                   (fo:_) -> fo
@@ -531,15 +532,15 @@
                                                                     e1 e2 = [f]
                                            | otherwise              =       []
 
-{-# LINE 945 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 946 "src/ehc/Ty/FitsIn.chs" #-}
             varMayFit isL fi t@(Ty_Var v f)
               = f `elem` fioBindCategs (fiFIOpts fi) && not (v `Set.member` fioDontBind (fiFIOpts fi))
               -- where mbvs = if isL then fioBindLVars (fiFIOpts fi) else fioBindRVars (fiFIOpts fi)
-{-# LINE 950 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 951 "src/ehc/Ty/FitsIn.chs" #-}
             varMayExpand mbvs fi t@(Ty_Var v f)
               = not ((fioBindIsYes mbvs || v `Set.member` fioBindNoSet mbvs) || v `Set.member` fioDontBind (fiFIOpts fi))
 
-{-# LINE 955 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 956 "src/ehc/Ty/FitsIn.chs" #-}
             fVar' f fi updTy t1@(Ty_Var v1 f1)     t2@(Ty_Var v2 f2)
                 | v1 == v2 && f1 == f2
                   && not (fioExpandEqTyVar (fiFIOpts fi))
@@ -567,7 +568,7 @@
 
             fVar f fi        t1                    t2                = fVar' f fi id t1 t2
 
-{-# LINE 1029 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1030 "src/ehc/Ty/FitsIn.chs" #-}
             -- | tvar binding part 1: 2 tvars
             varBind1  fi updTy t1@(Ty_Var v1 f1)      t2@(Ty_Var v2 f2)
                 | v1 == v2 && f1 == f2                  = Just $ res  fi       t1
@@ -600,7 +601,7 @@
                                                             _ -> Just $ occurBind fi False v2 t1
             varBind3  _  _     _                      _ = Nothing
 
-{-# LINE 1071 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1072 "src/ehc/Ty/FitsIn.chs" #-}
             fAnn f fi updTy t1@(Ty_Var _ _) t2                = case tyAnnDecomposeMk t2 of
                                                                     (t2@(Ty_Var _ _), (_:_), mk2)
                                                                       -> fVar' f fi2 (updTy . mk2) t1 t2
@@ -613,7 +614,7 @@
                                                                     _ -> f fi updTy t1 t2
             fAnn f fi updTy t1              t2                = f fi updTy t1 t2
 
-{-# LINE 1093 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1094 "src/ehc/Ty/FitsIn.chs" #-}
             fVarPred2 f fi tpr1                             (Ty_Impls (Impls_Tail iv2 _))
                 | isJust mbTl                                 = f fi tpr1 (Ty_Impls tl2)
                 where mbTl@(~(Just tl2)) = lookupImplsVarCyc fi iv2
@@ -628,7 +629,7 @@
             fVarPred1 f fi tpr1
                 = f fi tpr1
 
-{-# LINE 1109 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1110 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1                    t2
                 | fioMode (fiFIOpts fi) == FitSubRL          = fBase  fi' updTy t2 t1
                 where  fi'       = fiSwapCoCo $ fi  {fiFIOpts = fioSwapOpts $ fioSwapPolarity polContravariant $ fiFIOpts fi}
@@ -642,7 +643,7 @@
                 | isJust mbVarBind                           = fromJust mbVarBind
                 where  mbVarBind = varBind1 fi updTy t1 t2
 
-{-# LINE 1124 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1125 "src/ehc/Ty/FitsIn.chs" #-}
             -- get rid of annotation for fitsIn, but preserve as result
             fBase fi updTy t1@(Ty_Ann TyAnn_Mono at1)       t2          = fo
                 where fi2 = fi { fiFIOpts = (fiFIOpts fi) {fioBindLFirst = False} }
@@ -656,7 +657,7 @@
             fBase fi updTy t1                               t2@(Ty_Ann a2 at2)
                                                                         = fVar' fBase fi updTy t1 at2
 
-{-# LINE 1139 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1140 "src/ehc/Ty/FitsIn.chs" #-}
             -- always get rid of empty implicits
             fBase fi updTy t1@(Ty_App (Ty_App (Ty_Con c1) tpr1) tr1)
                            t2
@@ -675,13 +676,13 @@
                             =  Just (fVar' fTySyn fi updTy t1 tr2)
                        fP fi _ =  Nothing
 
-{-# LINE 1159 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1160 "src/ehc/Ty/FitsIn.chs" #-}
             -- here we decide whether to bind impredicatively, anything not to be bounded as such must be dealt with before here
             fBase fi updTy t1                    t2
                 | isJust mbVarBind                           = fromJust mbVarBind
                 where  mbVarBind = varBind2 fi updTy t1 t2
 
-{-# LINE 1166 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1167 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1@(Ty_Pred pr1) t2@(Ty_Pred pr2)
                 | fioPredAsTy (fiFIOpts fi) && isJust mbfp
                 = let (fo,pr) = fromJust mbfp in foUpdTy (Ty_Pred pr) fo
@@ -692,25 +693,25 @@
                        fP (Pred_Pred prt1)          (Pred_Pred prt2)
                             = Just (fo,Pred_Pred (foTy fo))
                             where fo = fVar' fTySyn fi id prt1 prt2
-{-# LINE 1178 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1179 "src/ehc/Ty/FitsIn.chs" #-}
                        fP (Pred_Lacks lt1 l1)       (Pred_Lacks lt2 l2)
                             | l1' == l2'
                             = Just (fo,Pred_Lacks (foTy fo) l1')
                             where fo = fVar' fTySyn fi id lt1 lt2
                                   l1' = maybe l1 id $ lookupLabelCyc fi l1
                                   l2' = maybe l2 id $ lookupLabelCyc fi l2
-{-# LINE 1186 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1187 "src/ehc/Ty/FitsIn.chs" #-}
                        fP _                         _
                             = Nothing
 
-{-# LINE 1191 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1192 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1@(Ty_TBind q1 _ _ _) t2@(Ty_TBind q2 _ _ _)
                 | fioMode (fiFIOpts fi) == FitUnify && q1 == q2
                                                     = fVar' fTySyn fi2 id uqt1 uqt2
                 where  (fi1,uqt1,_,_) = unquant fi   t1 False instCoConst
                        (fi2,uqt2,_,_) = unquant fi1  t2 False instCoConst
 
-{-# LINE 1203 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1204 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1                     t2@(Ty_TBind _ _ _ _)
                 | fioIsSubsume (fiFIOpts fi) && fioLeaveRInst (fiFIOpts fi)
                                                     = back2 (fo { foRInstToL = instto2 ++ foRInstToL fo
@@ -724,14 +725,14 @@
                 where (fi2,uqt2,back2,instto2) = unquant fi t2 False instContra
                       fo = fVar' fTySyn fi2 id t1 uqt2
 
-{-# LINE 1226 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1227 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1@(Ty_TBind _ _ _ _)  t2
                 | fioIsSubsume (fiFIOpts fi)        = fo { foLInstToL = instto1 ++ foLInstToL fo
                                                          }
                 where (fi1,uqt1,back1,instto1) = unquant fi t1 False instCoConst
                       fo = fVar' fTySyn fi1 id uqt1 t2
 
-{-# LINE 1238 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1239 "src/ehc/Ty/FitsIn.chs" #-}
             -- tpr1 => tr1 `fit` tpr2 => tr2
             fBase fi updTy t1@(Ty_App (Ty_App (Ty_Con c1) tpr1) tr1)
                            t2@(Ty_App (Ty_App (Ty_Con c2) tpr2) tr2)
@@ -802,7 +803,7 @@
                        fP fi _                             _
                             =  Nothing
 
-{-# LINE 1326 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1327 "src/ehc/Ty/FitsIn.chs" #-}
             -- t1 `fit` tpr2 => tr2
             fBase fi updTy t1
                            t2@(Ty_App (Ty_App (Ty_Con c2) tpr2) tr2)
@@ -848,7 +849,7 @@
                                     = fSub fi id (mkPrIdCHR u1) pr2 tr2
                        fP fi _ =  Nothing
 
-{-# LINE 1393 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1394 "src/ehc/Ty/FitsIn.chs" #-}
             -- tpr1 => tr1 `fit` t2
             fBase fi updTy t1@(Ty_App (Ty_App (Ty_Con c1) tpr1) tr1)
                            t2
@@ -896,7 +897,7 @@
                                    , cnstrMp ) = fSub fi updTy (mkPrIdCHR u1) prfPredScope pr1 tr1
                        fP fi _ =  Nothing
 
-{-# LINE 1467 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1468 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1@(Ty_App (Ty_Con n1) tr1)
                            t2@(Ty_App (Ty_Con n2) tr2)
                 | n1 == n2 && (isRec || isSum)
@@ -907,12 +908,12 @@
                        isSum = hsnIsSum n1
                        fo = fRow fi tr1 tr2 isRec isSum
 
-{-# LINE 1492 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1493 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1                    t2
                 | isJust mbVarBind                  = fromJust mbVarBind
                 where  mbVarBind = varBind3 fi updTy t1 t2
 
-{-# LINE 1498 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1499 "src/ehc/Ty/FitsIn.chs" #-}
             -- tf1 ta1 `fit` tf2 ta2
             fBase fi updTy t1@(Ty_App tf1 ta1)
                            t2@(Ty_App tf2 ta2)
@@ -949,11 +950,11 @@
                                                             (foVarMp afo `varUpd` foTy ffo) (foVarMp afo `varUpd` foTy afo)]
                                     hasSubCoerce = not $ lrcoeIsId $ foLRCoe afo
 
-{-# LINE 1565 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1566 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1@(Ty_Ext _ _ _)   t2@(Ty_Ext _ _ _)
                 =  fRow fi t1 t2 False False
 
-{-# LINE 1585 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1586 "src/ehc/Ty/FitsIn.chs" #-}
             -- N.B. hsnInvariant is a unique name which cannot be written by a programmer. In other words,
             -- this pattern match cannot trigger during other type inferences.
             -- Weaken Co/Contravariant polarity to Invariant polarity
@@ -964,18 +965,18 @@
                 | s1 == hsnInvariant && sf2 == hsnPolNegation
                                                     = fVar' fBase fi id t1 ta2
 
-{-# LINE 1597 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1598 "src/ehc/Ty/FitsIn.chs" #-}
             fBase fi updTy t1                     t2          = errClash fi t1 t2
 
-{-# LINE 1601 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1602 "src/ehc/Ty/FitsIn.chs" #-}
             foRes  = fVar' fTySyn fi id ty1 ty2
 
-{-# LINE 1605 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1606 "src/ehc/Ty/FitsIn.chs" #-}
 fitsIn' :: String -> FIOpts -> FIEnv -> UID -> VarMp -> Ty -> Ty -> FIOut
 fitsIn' msg opts env uniq varmp ty1 ty2
   =  fitsIn opts (trPP (msg ++ "-env") env) (trPP (msg ++ "-uniq") uniq) varmp (trPP (msg ++ "-ty1") ty1) (trPP (msg ++ "-ty2") ty2)
 
-{-# LINE 1615 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1616 "src/ehc/Ty/FitsIn.chs" #-}
 fitsInL' :: FIOpts -> FIEnv -> UID -> VarMp -> TyL -> TyL -> ([FIOut],FIOut)
 fitsInL' opts env uniq varmp tyl1 tyl2
   = fitsInLWith (\fo1 fo2 -> fo2 {foVarMp = foVarMp fo1 |+> foVarMp fo2, foErrL = foErrL fo1 ++ foErrL fo2})
@@ -986,17 +987,17 @@
   = (map foTy foL,fo)
   where (foL,fo) = fitsInL' opts env uniq varmp tyl1 tyl2
 
-{-# LINE 1631 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1632 "src/ehc/Ty/FitsIn.chs" #-}
 fitsInFold :: FIOpts -> FIEnv -> UID -> VarMp -> TyL -> FIOut
 fitsInFold opts env uniq varmp tyl
   = foldl (\fo t -> if foHasErrs fo then fo else fitsIn opts env uniq varmp (foTy fo) t)
           emptyFO tyl
 
-{-# LINE 1642 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1643 "src/ehc/Ty/FitsIn.chs" #-}
 fitPredIntoPred
   :: ( VarLookupCmb VarMp gm
-     , VarLookup gm TyVarId VarMpInfo
-     , SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo
+     , VarLookup gm
+     , VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo
      )
      => FIIn' gm -> Pred -> Pred
      -> Maybe (Pred,VarMp)
@@ -1064,7 +1065,7 @@
                             (fiEnv fi) (fiUniq fi) (fiVarMp fi)
                             (Ty_Pred pr1) (Ty_Pred pr2)
 
-{-# LINE 1747 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1748 "src/ehc/Ty/FitsIn.chs" #-}
 fitPredToEvid'' :: (ClGamInfo -> Ty) -> UID -> VarMp -> Ty -> Either ClGamInfo ClGam -> FIOut
 fitPredToEvid'' getTy u varmp prTy gg
   =  case prTy of
@@ -1086,7 +1087,7 @@
                              (_,aLr'@(r':aL')) = foldr (\t (u,ar) -> let (u',u1) = mkNewLevUID u in (u',fPr u1 t : ar)) (u,[]) (r : aL)
                         in   manyFO (aLr' ++ [emptyFO {foTy = map foTy aL' `appArr` foTy r'}])
 
-{-# LINE 1770 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1771 "src/ehc/Ty/FitsIn.chs" #-}
 fitPredToEvid' :: UID -> VarMp -> Ty -> Either ClGamInfo ClGam -> FIOut
 fitPredToEvid' = fitPredToEvid'' clgiPrToEvidRecTy
 {-
@@ -1111,11 +1112,11 @@
                         in   manyFO (aLr' ++ [emptyFO {foTy = map foTy aL' `appArr` foTy r'}])
 -}
 
-{-# LINE 1796 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1797 "src/ehc/Ty/FitsIn.chs" #-}
 fitPredToEvid :: UID -> VarMp -> Ty -> ClGam -> FIOut
 fitPredToEvid u varmp prTy g = fitPredToEvid' u varmp prTy (Right g)
 
-{-# LINE 1805 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1806 "src/ehc/Ty/FitsIn.chs" #-}
 mkFitsInWrap' :: FIEnv -> FitsIn'
 mkFitsInWrap' env
   =  \opt u varmp t1 t2
@@ -1128,7 +1129,7 @@
         -> let  fo = fitsIn opt env u varmp t1 t2
            in   (foTy fo, foVarMp fo, foErrL fo)
 
-{-# LINE 1823 "src/ehc/Ty/FitsIn.chs" #-}
+{-# LINE 1824 "src/ehc/Ty/FitsIn.chs" #-}
 -- fitsInForToTyCore :: C.KiFitsIn
 fitsInForToTyCore uniq t1 t2
   = foLInstToL fo
diff --git a/src/UHC/Light/Compiler/Ty/FitsInCommon.hs b/src/UHC/Light/Compiler/Ty/FitsInCommon.hs
--- a/src/UHC/Light/Compiler/Ty/FitsInCommon.hs
+++ b/src/UHC/Light/Compiler/Ty/FitsInCommon.hs
@@ -23,7 +23,7 @@
 import UHC.Util.Pretty
 import qualified Data.Set as Set
 import UHC.Light.Compiler.AbstractCore
-import UHC.Light.Compiler.CHR.Constraint
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint
 import UHC.Light.Compiler.Core
 import UHC.Light.Compiler.Core.Coercion
 import UHC.Light.Compiler.Core.Subst
diff --git a/src/UHC/Light/Compiler/Ty/FitsInCommon2.hs b/src/UHC/Light/Compiler/Ty/FitsInCommon2.hs
--- a/src/UHC/Light/Compiler/Ty/FitsInCommon2.hs
+++ b/src/UHC/Light/Compiler/Ty/FitsInCommon2.hs
@@ -27,10 +27,10 @@
 
 
 {-# LINE 39 "src/ehc/Ty/FitsInCommon2.chs" #-}
-ppTyWithFI :: (VarLookupCmb VarMp gm, VarUpdatable Ty gm, SubstVarKey gm ~ VarId) => FIIn' gm -> Ty -> PP_Doc
+ppTyWithFI :: (VarLookupCmb VarMp gm, VarUpdatable Ty gm, VarLookupKey gm ~ VarId) => FIIn' gm -> Ty -> PP_Doc
 ppTyWithFI fi t =  ppTyS (fiVarMpLoc fi |+> fiVarMp fi) t
 
-ppTyWithFIFO :: (VarLookupCmb VarMp gm, VarUpdatable Ty gm, SubstVarKey gm ~ VarId) => FIIn' gm -> FIOut -> Ty -> PP_Doc
+ppTyWithFIFO :: (VarLookupCmb VarMp gm, VarUpdatable Ty gm, VarLookupKey gm ~ VarId) => FIIn' gm -> FIOut -> Ty -> PP_Doc
 ppTyWithFIFO fi fo t    =  ppTyS (foVarMp fo |+> fiVarMp fi) t
 
 {-# LINE 59 "src/ehc/Ty/FitsInCommon2.chs" #-}
@@ -81,12 +81,12 @@
       j       -> j
 
 -- lookup a tvar in the VarMps of a FIIn
-fiLookupTyVarCyc :: VarLookup gm TyVarId VarMpInfo => FIIn' gm -> TyVarId -> Maybe Ty
+fiLookupTyVarCyc :: (VarLookup gm, VarLookupKey gm ~ TyVarId, VarLookupVal gm ~ VarMpInfo) => FIIn' gm -> TyVarId -> Maybe Ty
 fiLookupTyVarCyc  fi v  =  fiLookupVar' varmpTyLookupCyc varmpTyLookupCyc v (fiVarMpLoc fi) (fiVarMp fi)
 
 {-# LINE 123 "src/ehc/Ty/FitsInCommon2.chs" #-}
 -- lookup a possible tvar in the VarMps of a FIIn, the result being the replacement if any
-fiLookupReplaceTyCyc :: VarLookup gm TyVarId VarMpInfo => FIIn' gm -> Ty -> Ty
+fiLookupReplaceTyCyc :: (VarLookup gm, VarLookupKey gm ~ TyVarId, VarLookupVal gm ~ VarMpInfo) => FIIn' gm -> Ty -> Ty
 fiLookupReplaceTyCyc  fi t  =  maybe t (maybe t id . fiLookupTyVarCyc fi) $ tyMbVar t
 
 {-# LINE 137 "src/ehc/Ty/FitsInCommon2.chs" #-}
diff --git a/src/UHC/Light/Compiler/Ty/Ftv.hs b/src/UHC/Light/Compiler/Ty/Ftv.hs
--- a/src/UHC/Light/Compiler/Ty/Ftv.hs
+++ b/src/UHC/Light/Compiler/Ty/Ftv.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Ftv.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Ftv.ag)
 module UHC.Light.Compiler.Ty.Ftv(tyFtv
 , tyFtvMp
 , implsFtvMp) where
diff --git a/src/UHC/Light/Compiler/Ty/Pretty.hs b/src/UHC/Light/Compiler/Ty/Pretty.hs
--- a/src/UHC/Light/Compiler/Ty/Pretty.hs
+++ b/src/UHC/Light/Compiler/Ty/Pretty.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Pretty.ag)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Pretty.ag)
 module UHC.Light.Compiler.Ty.Pretty(ppTyWithCfg', ppTyWithCfg, ppTy
 , CfgPPTy
 , ppTyPr
diff --git a/src/UHC/Light/Compiler/Ty/TreeTrieKey.hs b/src/UHC/Light/Compiler/Ty/TreeTrieKey.hs
--- a/src/UHC/Light/Compiler/Ty/TreeTrieKey.hs
+++ b/src/UHC/Light/Compiler/Ty/TreeTrieKey.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/TreeTrieKey)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/TreeTrieKey)
 module UHC.Light.Compiler.Ty.TreeTrieKey where
 
 import UHC.Light.Compiler.Base.Common
@@ -12,7 +12,7 @@
 import Data.List as Lst
 import UHC.Util.FastSeq as Seq
 import UHC.Util.TreeTrie
-import UHC.Light.Compiler.CHR.Key
+import UHC.Light.Compiler.CHR.CtxtRedOnly.Key
 import UHC.Util.CHR.Key
 
 
diff --git a/src/UHC/Light/Compiler/Ty/Trf/BetaReduce.hs b/src/UHC/Light/Compiler/Ty/Trf/BetaReduce.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/BetaReduce.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/BetaReduce.hs
@@ -87,7 +87,7 @@
 
 {-# LINE 116 "src/ehc/Ty/Trf/BetaReduce.chs" #-}
 -- | get the lookahead for reduction
-betaRedTyLookAhead :: VarLookup gm TyVarId VarMpInfo => TyBetaRedEnv gm -> TyBetaRedLkup gm -> Ty -> TyBetaRedLookAheadExpansion
+betaRedTyLookAhead :: (VarLookup gm, VarLookupKey gm ~ TyVarId, VarLookupVal gm ~ VarMpInfo) => TyBetaRedEnv gm -> TyBetaRedLkup gm -> Ty -> TyBetaRedLookAheadExpansion
 betaRedTyLookAhead renv lkup ty
   = unpack ty
   where unpack t = (f', as, betaRedTyFunLookup renv lkup f')
@@ -98,7 +98,7 @@
 {-# LINE 127 "src/ehc/Ty/Trf/BetaReduce.chs" #-}
 -- | one expansion step of type level beta reduction
 tyBetaRed1
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> TyBetaRedLkup gm -> Either Ty TyBetaRedLookAheadExpansion
      -> Maybe TyBetaRedOut
 tyBetaRed1 renv lkup tyOrFunAndArgs
@@ -147,7 +147,7 @@
 
 {-# LINE 180 "src/ehc/Ty/Trf/BetaReduce.chs" #-}
 tyBetaRed'
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> TyBetaRedLkup gm -> Either Ty TyBetaRedLookAheadExpansion
      -> [TyBetaRedOut]
 tyBetaRed' renv lkup tyOrFunArgs
@@ -156,13 +156,13 @@
       _       -> []
 
 tyBetaRed
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> TyBetaRedLkup gm -> Ty
      -> [TyBetaRedOut]
 tyBetaRed renv lkup ty = tyBetaRed' renv lkup (Left ty)
 
 tyBetaRedAndInit
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> TyBetaRedLkup gm -> Ty
      -> [TyBetaRedOut]
 tyBetaRedAndInit renv lkup ty
@@ -171,7 +171,7 @@
 
 {-# LINE 210 "src/ehc/Ty/Trf/BetaReduce.chs" #-}
 tyBetaRedFullMb
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> TyBetaRedLkup gm -> (Ty -> Maybe TyBetaRedOut) -> Ty
      -> Maybe TyBetaRedOut
 tyBetaRedFullMb renv lkup redSub ty
@@ -191,7 +191,7 @@
 
 {-# LINE 233 "src/ehc/Ty/Trf/BetaReduce.chs" #-}
 tyBetaRedFull
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm)
+  :: (VarLookup gm, VarLookupKey gm ~ TyVarId, VarLookupVal gm ~ VarMpInfo, VarLookupCmb VarMp gm)
      => TyBetaRedEnv gm -> VarMp -> Ty
      -> Ty
 tyBetaRedFull renv varmp ty
diff --git a/src/UHC/Light/Compiler/Ty/Trf/Canonic.hs b/src/UHC/Light/Compiler/Ty/Trf/Canonic.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/Canonic.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/Canonic.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Canonic)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Canonic)
 module UHC.Light.Compiler.Ty.Trf.Canonic(TyCanonicOut
 , TyCanonicOpts (..), emptyTyCanonicOpts
 , tyCanonic
@@ -134,7 +134,7 @@
 
 
 tyCanonic
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> Ty
      -> Ty
 tyCanonic fi
@@ -145,7 +145,7 @@
 
 
 tyCanonicFFI'
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => Bool			-- expand newtypes
      -> TyBetaRedEnv gm
      -> Ty
@@ -167,7 +167,7 @@
 
 
 tyCanonicFFI
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm
      -> Ty
      -> Ty
@@ -176,7 +176,7 @@
 
 
 predCanonic
-  :: (VarLookup gm TyVarId VarMpInfo, VarLookupCmb VarMp gm, SubstVarKey gm ~ VarId, SubstVarVal gm ~ VarMpInfo)
+  :: (VarLookup gm, VarLookupCmb VarMp gm, VarLookupKey gm ~ VarId, VarLookupVal gm ~ VarMpInfo)
      => TyBetaRedEnv gm -> Pred
      -> (Pred,VarMp)
 predCanonic renv
diff --git a/src/UHC/Light/Compiler/Ty/Trf/FreshVar.hs b/src/UHC/Light/Compiler/Ty/Trf/FreshVar.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/FreshVar.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/FreshVar.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/FreshVa)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/FreshVa)
 module UHC.Light.Compiler.Ty.Trf.FreshVar(tyFreshVar) where
 
 import UHC.Light.Compiler.Base.Common
diff --git a/src/UHC/Light/Compiler/Ty/Trf/Instantiate.hs b/src/UHC/Light/Compiler/Ty/Trf/Instantiate.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/Instantiate.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/Instantiate.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Instant)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Instant)
 module UHC.Light.Compiler.Ty.Trf.Instantiate(tyInst1Quants, tyInst1Exists, instCoConst, instContra, instCo
 , tyInstToL) where
 
diff --git a/src/UHC/Light/Compiler/Ty/Trf/MergePreds.hs b/src/UHC/Light/Compiler/Ty/Trf/MergePreds.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/MergePreds.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/MergePreds.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/MergePr)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/MergePr)
 module UHC.Light.Compiler.Ty.Trf.MergePreds(tyMergePreds
 , TyMergePredOut (..)
 , TQOGam) where
diff --git a/src/UHC/Light/Compiler/Ty/Trf/Quantify.hs b/src/UHC/Light/Compiler/Ty/Trf/Quantify.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/Quantify.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/Quantify.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Quantif)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Quantif)
 module UHC.Light.Compiler.Ty.Trf.Quantify(tyQuantify
 , TyQuOpts (..), defaultTyQuOpts
 , TyQuOut (..)
diff --git a/src/UHC/Light/Compiler/Ty/Trf/Subst.hs b/src/UHC/Light/Compiler/Ty/Trf/Subst.hs
--- a/src/UHC/Light/Compiler/Ty/Trf/Subst.hs
+++ b/src/UHC/Light/Compiler/Ty/Trf/Subst.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Subst.a)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/Trf/Subst.a)
 module UHC.Light.Compiler.Ty.Trf.Subst(tyAppVarLookup, tyAppVarLookup2) where
 
 import UHC.Light.Compiler.Base.Common
@@ -52,7 +52,7 @@
 
 
 
-tyAppVarLookup' :: VarLookup m TyVarId VarMpInfo => SubstOpts -> m -> TVUseMp -> Ty -> (Ty,VarMp)
+tyAppVarLookup' :: (VarLookup m, VarLookupKey m ~ TyVarId, VarLookupVal m ~ VarMpInfo) => SubstOpts -> m -> TVUseMp -> Ty -> (Ty,VarMp)
 tyAppVarLookup' opts m usemp ty
   = (repl_Syn_TyAGItf t,cycVarMp_Syn_TyAGItf t)
   where t = wrap_TyAGItf
@@ -63,12 +63,12 @@
                  , lkup_Inh_TyAGItf 		= mkLkup m
                  })
 
-tyAppVarLookup :: VarLookup m TyVarId VarMpInfo => m -> Ty -> Ty
+tyAppVarLookup :: (VarLookup m, VarLookupKey m ~ TyVarId, VarLookupVal m ~ VarMpInfo) => m -> Ty -> Ty
 tyAppVarLookup m ty
   = ty'
   where (ty',_) = tyAppVarLookup' defaultOpts m Map.empty ty
 
-tyAppVarLookup2 :: VarLookup m TyVarId VarMpInfo => m -> Ty -> (Ty,VarMp)
+tyAppVarLookup2 :: (VarLookup m, VarLookupKey m ~ TyVarId, VarLookupVal m ~ VarMpInfo) => m -> Ty -> (Ty,VarMp)
 tyAppVarLookup2 m ty
   = tyAppVarLookup' defaultOpts m Map.empty ty
 
@@ -84,7 +84,7 @@
 
 type Lkup = MetaLev -> TyVarId -> Maybe VarMpInfo
 
-mkLkup :: VarLookup m TyVarId VarMpInfo => m -> Lkup
+mkLkup :: (VarLookup m, VarLookupKey m ~ TyVarId, VarLookupVal m ~ VarMpInfo) => m -> Lkup
 mkLkup m = \mlev v -> {- trm "Subst.lkup" (\r -> mlev >#< v >#< r) $ -} varlookupWithMetaLev mlev v m
 
 
diff --git a/src/UHC/Light/Compiler/Ty/UsedNames.hs b/src/UHC/Light/Compiler/Ty/UsedNames.hs
--- a/src/UHC/Light/Compiler/Ty/UsedNames.hs
+++ b/src/UHC/Light/Compiler/Ty/UsedNames.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.52.2 (build/103/lib-ehc/UHC/Light/Compiler/Ty/UsedNames.a)
+-- UUAGC 0.9.52.1 (build/103/lib-ehc/UHC/Light/Compiler/Ty/UsedNames.a)
 module UHC.Light.Compiler.Ty.UsedNames(tyUsedNames) where
 
 import Data.List
diff --git a/src/UHC/Light/Compiler/Ty/Utils1.hs b/src/UHC/Light/Compiler/Ty/Utils1.hs
--- a/src/UHC/Light/Compiler/Ty/Utils1.hs
+++ b/src/UHC/Light/Compiler/Ty/Utils1.hs
@@ -15,7 +15,7 @@
 
 
 {-# LINE 19 "src/ehc/Ty/Utils1.chs" #-}
-ppTyS :: (VarUpdatable Ty m, SubstVarKey m ~ VarId) => m -> Ty -> PP_Doc
+ppTyS :: (VarUpdatable Ty m, VarLookupKey m ~ VarId) => m -> Ty -> PP_Doc
 ppTyS = ppS ppTy
 
 {-# LINE 24 "src/ehc/Ty/Utils1.chs" #-}
diff --git a/src/UHC/Light/Compiler/VarMp.hs b/src/UHC/Light/Compiler/VarMp.hs
--- a/src/UHC/Light/Compiler/VarMp.hs
+++ b/src/UHC/Light/Compiler/VarMp.hs
@@ -156,7 +156,7 @@
 
 {-# LINE 363 "src/ehc/VarMp.chs" #-}
 varmpMetaLevTyUnit :: Ord k => MetaLev -> k -> Ty -> VarMp' k VarMpInfo
-varmpMetaLevTyUnit mlev v t = varmpMetaLevSingleton mlev v (VMITy t)
+varmpMetaLevTyUnit mlev v t = varlookupSingletonWithMetaLev mlev v (VMITy t)
 
 varmpTyUnit :: Ord k => k -> Ty -> VarMp' k VarMpInfo
 varmpTyUnit = varmpMetaLevTyUnit metaLevVal
@@ -208,55 +208,55 @@
 tyAsVarMp = tyAsVarMp' (flip const)
 
 {-# LINE 440 "src/ehc/VarMp.chs" #-}
-varmpTyLookup :: (VarLookup m k VarMpInfo,Ord k) => k -> m -> Maybe Ty
+varmpTyLookup :: (VarLookup m, Ord (VarLookupKey m), VarLookupVal m ~ VarMpInfo) => VarLookupKey m -> m -> Maybe Ty
 varmpTyLookup = varlookupMap vmiMbTy
 
 {-# LINE 445 "src/ehc/VarMp.chs" #-}
-varmpImplsLookup :: VarLookup m ImplsVarId VarMpInfo => ImplsVarId -> m -> Maybe Impls
+varmpImplsLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => ImplsVarId -> m -> Maybe Impls
 varmpImplsLookup = varlookupMap vmiMbImpls
 
-varmpScopeLookup :: VarLookup m TyVarId VarMpInfo => TyVarId -> m -> Maybe PredScope
+varmpScopeLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ TyVarId) => TyVarId -> m -> Maybe PredScope
 varmpScopeLookup = varlookupMap vmiMbScope
 
-varmpPredLookup :: VarLookup m TyVarId VarMpInfo => TyVarId -> m -> Maybe Pred
+varmpPredLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ TyVarId) => TyVarId -> m -> Maybe Pred
 varmpPredLookup = varlookupMap vmiMbPred
 
-varmpAssNmLookup :: VarLookup m TyVarId VarMpInfo => TyVarId -> m -> Maybe VarUIDHsName
+varmpAssNmLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ TyVarId) => TyVarId -> m -> Maybe VarUIDHsName
 varmpAssNmLookup = varlookupMap vmiMbAssNm
 
 {-# LINE 459 "src/ehc/VarMp.chs" #-}
-varmpLabelLookup :: VarLookup m LabelVarId VarMpInfo => LabelVarId -> m -> Maybe Label
+varmpLabelLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ LabelVarId) => LabelVarId -> m -> Maybe Label
 varmpLabelLookup = varlookupMap vmiMbLabel
 
-varmpOffsetLookup :: VarLookup m UID VarMpInfo => UID -> m -> Maybe LabelOffset
+varmpOffsetLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ UID) => UID -> m -> Maybe LabelOffset
 varmpOffsetLookup = varlookupMap vmiMbOffset
 
 {-# LINE 467 "src/ehc/VarMp.chs" #-}
-varmpPredSeqLookup :: VarLookup m TyVarId VarMpInfo => TyVarId -> m -> Maybe PredSeq
+varmpPredSeqLookup :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ TyVarId) => TyVarId -> m -> Maybe PredSeq
 varmpPredSeqLookup = varlookupMap vmiMbPredSeq
 
 {-# LINE 476 "src/ehc/VarMp.chs" #-}
-varmpTyLookupCyc :: VarLookup m TyVarId VarMpInfo => TyVarId -> m -> Maybe Ty
+varmpTyLookupCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ TyVarId) => TyVarId -> m -> Maybe Ty
 varmpTyLookupCyc x m = lookupLiftCycMb2 tyMbVar (flip varmpTyLookup m) x
 
 {-# LINE 485 "src/ehc/VarMp.chs" #-}
-varmpImplsLookupImplsCyc :: VarLookup m ImplsVarId VarMpInfo => Impls -> m -> Maybe Impls
+varmpImplsLookupImplsCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => Impls -> m -> Maybe Impls
 varmpImplsLookupImplsCyc x m = lookupLiftCycMb1 implsMbVar (flip varmpImplsLookup m) x
 
-varmpImplsLookupCyc :: VarLookup m ImplsVarId VarMpInfo => TyVarId -> m -> Maybe Impls
+varmpImplsLookupCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => TyVarId -> m -> Maybe Impls
 varmpImplsLookupCyc x m = lookupLiftCycMb2 implsMbVar (flip varmpImplsLookup m) x
 
-varmpScopeLookupScopeCyc :: VarLookup m ImplsVarId VarMpInfo => PredScope -> m -> Maybe PredScope
+varmpScopeLookupScopeCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => PredScope -> m -> Maybe PredScope
 varmpScopeLookupScopeCyc x m = lookupLiftCycMb1 pscpMbVar (flip varmpScopeLookup m) x
 
-varmpAssNmLookupAssNmCyc :: VarLookup m ImplsVarId VarMpInfo => VarUIDHsName -> m -> Maybe VarUIDHsName
+varmpAssNmLookupAssNmCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => VarUIDHsName -> m -> Maybe VarUIDHsName
 varmpAssNmLookupAssNmCyc x m = lookupLiftCycMb1 vunmMbVar (flip varmpAssNmLookup m) x
 
 {-# LINE 499 "src/ehc/VarMp.chs" #-}
-varmpLabelLookupLabelCyc :: VarLookup m ImplsVarId VarMpInfo => Label -> m -> Maybe Label
+varmpLabelLookupLabelCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => Label -> m -> Maybe Label
 varmpLabelLookupLabelCyc x m = lookupLiftCycMb1 labelMbVar (flip varmpLabelLookup m) x
 
-varmpLabelLookupCyc :: VarLookup m ImplsVarId VarMpInfo => TyVarId -> m -> Maybe Label
+varmpLabelLookupCyc :: (VarLookup m, VarLookupVal m ~ VarMpInfo, VarLookupKey m ~ ImplsVarId) => TyVarId -> m -> Maybe Label
 varmpLabelLookupCyc x m = lookupLiftCycMb2 labelMbVar (flip varmpLabelLookup m) x
 
 {-# LINE 511 "src/ehc/VarMp.chs" #-}
diff --git a/uhc-light.cabal b/uhc-light.cabal
--- a/uhc-light.cabal
+++ b/uhc-light.cabal
@@ -1,5 +1,5 @@
 Name:				uhc-light
-Version:			1.1.9.3
+Version:			1.1.9.4
 License:			BSD3
 Copyright:			Utrecht University, Department of Information and Computing Sciences, Software Technology group
 Build-Type:			 Simple 
@@ -12,25 +12,25 @@
 Synopsis:			Part of UHC packaged as cabal/hackage installable library
 Description:		A 'light' variant of UHC including only an API and executables for compiling to Core representation (uhcl) and running CoreRun (uhcr). This version is just to test the infrastructure. Later versions will provide a fleshing out of the API and completion of the now rudimentary platform independent (Haskell) interpreted running etc..
 Cabal-Version:      >= 1.8
-data-files:          103/lib/ag/AnaDomain/AbsSyn.ag,103/lib/ag/Cmm/AbsSyn.ag,103/lib/ag/Core/AbsSyn.ag,103/lib/ag/CoreRun/AbsSyn.ag,103/lib/ag/EH/AbsSyn.ag,103/lib/ag/Error/AbsSyn.ag,103/lib/ag/Foreign/AbsSyn.ag,103/lib/ag/GrinByteCode/AbsSyn.ag,103/lib/ag/GrinCode/AbsSyn.ag,103/lib/ag/HS/AbsSyn.ag,103/lib/ag/JavaScript/AbsSyn.ag,103/lib/ag/JVMClass/AbsSyn.ag,103/lib/ag/LLVM/AbsSyn.ag,103/lib/ag/Ty/AbsSyn.ag,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.bcrr,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.cr,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi,103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/CompileAll,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/include/consUtils.h,103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Control/Monad.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Bits.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Char.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Either.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/IORef.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/List.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Maybe.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Data/Typeable.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Debug/Trace.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/Ptr.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Foreign/StablePtr.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/CTypes.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/dirUtils.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBase.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/HsBaseConfig.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/IntLikeInstance.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/MachDeps.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/TupleInstance.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/include/Typeable.h,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/installed-pkg-config,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Error.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Fix.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO/Unsafe.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/System/IO.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Array.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Base.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bits.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Bounded.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/BoxArray.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Char.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Enum.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Eq.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Float.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/GC.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics/Tuple.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Generics.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Handle.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IO.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/IOBase.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ix.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/LazyST.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MutVar.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/MVar.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/OldException.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ord.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Prims.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Ptr.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Read.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Real.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Run.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Show.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/ST.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StablePtr.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/StackTrace.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/STRef.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Types.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/Weak.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/UHC/WeakPtr.hi,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.bcrr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.cr,103/lib/pkg/uhcbase-1.1.9.3/103/cr/plain/Unsafe/Coerce.hi 
+data-files:          103/lib/ag/AnaDomain/AbsSyn.ag,103/lib/ag/Cmm/AbsSyn.ag,103/lib/ag/Core/AbsSyn.ag,103/lib/ag/CoreRun/AbsSyn.ag,103/lib/ag/EH/AbsSyn.ag,103/lib/ag/Error/AbsSyn.ag,103/lib/ag/Foreign/AbsSyn.ag,103/lib/ag/GrinByteCode/AbsSyn.ag,103/lib/ag/GrinCode/AbsSyn.ag,103/lib/ag/HS/AbsSyn.ag,103/lib/ag/JavaScript/AbsSyn.ag,103/lib/ag/JVMClass/AbsSyn.ag,103/lib/ag/LLVM/AbsSyn.ag,103/lib/ag/Ty/AbsSyn.ag,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.bcrr,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.cr,103/lib/pkg/array-1.0.0.0/103/cr/plain/Data/Array.hi,103/lib/pkg/array-1.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/CompileAll,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Applicative.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Arrow.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Category.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Fix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/Instances.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST/Lazy.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Control/Monad/ST.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Bool.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Complex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Dynamic.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Eq.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Foldable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Function.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ix.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Monoid.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ord.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Ratio.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/String.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Data/Traversable.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/include/consUtils.h,103/lib/pkg/base-3.0.0.0/103/cr/plain/installed-pkg-config,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Numeric.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Prelude.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Console/GetOpt.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/System/Exit.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadP.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/ParserCombinators/ReadPrec.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read/Lex.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Read.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show/Functions.hi,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.bcrr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.cr,103/lib/pkg/base-3.0.0.0/103/cr/plain/Text/Show.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Control/Monad.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Bits.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Char.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Either.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/IORef.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/List.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Maybe.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Data/Typeable.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Debug/Trace.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/Ptr.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Foreign/StablePtr.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/CTypes.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/dirUtils.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBase.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/HsBaseConfig.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/IntLikeInstance.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/MachDeps.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/TupleInstance.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/include/Typeable.h,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/installed-pkg-config,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Error.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Fix.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO/Unsafe.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/System/IO.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Array.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Base.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bits.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Bounded.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/BoxArray.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Char.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Enum.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Eq.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Float.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/GC.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics/Tuple.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Generics.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Handle.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IO.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/IOBase.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ix.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/LazyST.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MutVar.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/MVar.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/OldException.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ord.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Prims.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Ptr.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Read.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Real.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Run.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Show.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/ST.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StablePtr.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/StackTrace.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/STRef.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Types.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/Weak.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/UHC/WeakPtr.hi,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.bcrr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.cr,103/lib/pkg/uhcbase-1.1.9.4/103/cr/plain/Unsafe/Coerce.hi 
 extra-source-files:  changelog.md 
 
 Library
   Hs-Source-Dirs:        src 
-  Build-Depends:		fgl,uulib>=0.9.19,hashable>=1.2.4&&<1.3,uhc-util>=0.1.6.5&&<0.1.7,base>=4.7&&<5,vector,network,binary,mtl,transformers,directory,containers,array,process,filepath,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale
+  Build-Depends:		fgl,uulib>=0.9.19,hashable>=1.2.4&&<1.3,uhc-util>=0.1.6.6&&<0.1.7,base>=4.7&&<5,vector,network,binary,mtl,transformers,directory,containers,array,process,filepath,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale
   Extensions:			RankNTypes,MultiParamTypeClasses,FunctionalDependencies,UndecidableInstances,DeriveDataTypeable,LiberalTypeSynonyms,StandaloneDeriving,DeriveGeneric,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,ScopedTypeVariables,TypeFamilies
   Exposed-Modules:		 UHC.Light.Compiler.API,UHC.Light.Compiler.Base.API,UHC.Light.Compiler.Core.API,UHC.Light.Compiler.CoreRun.API,UHC.Light.Compiler.CoreRun.API.Internal,UHC.Light.Compiler.EH.Main,UHC.Light.Compiler.EHC.Main,UHC.Light.Compiler.EHC.Main.Compile,UHC.Light.Compiler.EHC.Main.Utils 
-  Other-Modules:		 Paths_uhc_light,UHC.Light.Compiler.AbstractCore,UHC.Light.Compiler.AbstractCore.Utils,UHC.Light.Compiler.Base.CfgPP,UHC.Light.Compiler.Base.Common,UHC.Light.Compiler.Base.Debug,UHC.Light.Compiler.Base.FileSearchLocation,UHC.Light.Compiler.Base.Fld,UHC.Light.Compiler.Base.HsName,UHC.Light.Compiler.Base.HsName.Builtin,UHC.Light.Compiler.Base.Optimize,UHC.Light.Compiler.Base.PackageDatabase,UHC.Light.Compiler.Base.ParseUtils,UHC.Light.Compiler.Base.Parser,UHC.Light.Compiler.Base.Parser2,UHC.Light.Compiler.Base.Pragma,UHC.Light.Compiler.Base.Range,UHC.Light.Compiler.Base.Strictness,UHC.Light.Compiler.Base.Target,UHC.Light.Compiler.Base.TermLike,UHC.Light.Compiler.Base.Trace,UHC.Light.Compiler.Base.UID,UHC.Light.Compiler.Base.UnderDev,UHC.Light.Compiler.CHR.Constraint,UHC.Light.Compiler.CHR.Guard,UHC.Light.Compiler.CHR.Instances,UHC.Light.Compiler.CHR.Key,UHC.Light.Compiler.CHR.Solve,UHC.Light.Compiler.CodeGen.BasicAnnot,UHC.Light.Compiler.CodeGen.Bits,UHC.Light.Compiler.CodeGen.BuiltinPrims,UHC.Light.Compiler.CodeGen.BuiltinSizeInfo,UHC.Light.Compiler.CodeGen.CEnv,UHC.Light.Compiler.CodeGen.CVar,UHC.Light.Compiler.CodeGen.Const,UHC.Light.Compiler.CodeGen.ImportUsedModules,UHC.Light.Compiler.CodeGen.ModuleImportExportImpl,UHC.Light.Compiler.CodeGen.RefGenerator,UHC.Light.Compiler.CodeGen.Tag,UHC.Light.Compiler.CodeGen.TrfUtils,UHC.Light.Compiler.CodeGen.ValAccess,UHC.Light.Compiler.Config,UHC.Light.Compiler.ConfigCabal,UHC.Light.Compiler.ConfigDefines,UHC.Light.Compiler.ConfigInstall,UHC.Light.Compiler.ConfigInternalVersions,UHC.Light.Compiler.Core,UHC.Light.Compiler.Core.BindExtract,UHC.Light.Compiler.Core.Check,UHC.Light.Compiler.Core.Coercion,UHC.Light.Compiler.Core.ExtractFFE,UHC.Light.Compiler.Core.FFI,UHC.Light.Compiler.Core.FvS,UHC.Light.Compiler.Core.Merge,UHC.Light.Compiler.Core.ModAsMap,UHC.Light.Compiler.Core.Parser,UHC.Light.Compiler.Core.Pretty,UHC.Light.Compiler.Core.PrettyTrace,UHC.Light.Compiler.Core.Subst,UHC.Light.Compiler.Core.SysF.AsTy,UHC.Light.Compiler.Core.ToCoreRun,UHC.Light.Compiler.Core.ToGrin,UHC.Light.Compiler.Core.Trf,UHC.Light.Compiler.Core.Trf.ANormal,UHC.Light.Compiler.Core.Trf.AnnBasedSimplify,UHC.Light.Compiler.Core.Trf.CAFGlobalAsArg,UHC.Light.Compiler.Core.Trf.ConstProp,UHC.Light.Compiler.Core.Trf.ElimNonCodegenConstructs,UHC.Light.Compiler.Core.Trf.ElimTrivApp,UHC.Light.Compiler.Core.Trf.EraseExtractTysigCore,UHC.Light.Compiler.Core.Trf.EtaRed,UHC.Light.Compiler.Core.Trf.ExplicitStackTrace,UHC.Light.Compiler.Core.Trf.FixAfterParse,UHC.Light.Compiler.Core.Trf.FloatToGlobal,UHC.Light.Compiler.Core.Trf.InlineLetAlias,UHC.Light.Compiler.Core.Trf.LamGlobalAsArg,UHC.Light.Compiler.Core.Trf.LetDefBeforeUse,UHC.Light.Compiler.Core.Trf.LetFlattenStrict,UHC.Light.Compiler.Core.Trf.LetUnrec,UHC.Light.Compiler.Core.Trf.RenUniq,UHC.Light.Compiler.Core.UsedModNms,UHC.Light.Compiler.Core.Utils,UHC.Light.Compiler.CoreRun,UHC.Light.Compiler.CoreRun.Check,UHC.Light.Compiler.CoreRun.ModImpExp,UHC.Light.Compiler.CoreRun.Parser,UHC.Light.Compiler.CoreRun.Pretty,UHC.Light.Compiler.CoreRun.Prim,UHC.Light.Compiler.CoreRun.Run,UHC.Light.Compiler.CoreRun.Run.Val,UHC.Light.Compiler.CoreRun.Run.Val.Prim,UHC.Light.Compiler.CoreRun.Run.Val.RunExplStk,UHC.Light.Compiler.CoreRun.Run.Val.RunImplStk,UHC.Light.Compiler.Deriving,UHC.Light.Compiler.EH,UHC.Light.Compiler.EH.MainAG,UHC.Light.Compiler.EH.MainAG_AGItf,UHC.Light.Compiler.EH.MainAG_CaseAlt,UHC.Light.Compiler.EH.MainAG_CaseAlts,UHC.Light.Compiler.EH.MainAG_DataConstr,UHC.Light.Compiler.EH.MainAG_DataConstrs,UHC.Light.Compiler.EH.MainAG_DataField,UHC.Light.Compiler.EH.MainAG_DataFieldExpr,UHC.Light.Compiler.EH.MainAG_DataFieldPatExpr,UHC.Light.Compiler.EH.MainAG_DataFields,UHC.Light.Compiler.EH.MainAG_Decl,UHC.Light.Compiler.EH.MainAG_Decls,UHC.Light.Compiler.EH.MainAG_Expr,UHC.Light.Compiler.EH.MainAG_ExprAnn,UHC.Light.Compiler.EH.MainAG_FuncDep,UHC.Light.Compiler.EH.MainAG_FuncDeps,UHC.Light.Compiler.EH.MainAG_KiExpr,UHC.Light.Compiler.EH.MainAG_KiExprAnn,UHC.Light.Compiler.EH.MainAG_MbTyExpr,UHC.Light.Compiler.EH.MainAG_PatExpr,UHC.Light.Compiler.EH.MainAG_PatExprAnn,UHC.Light.Compiler.EH.MainAG_PrExpr,UHC.Light.Compiler.EH.MainAG_PrExprs,UHC.Light.Compiler.EH.MainAG_RecExpr,UHC.Light.Compiler.EH.MainAG_RecPatExpr,UHC.Light.Compiler.EH.MainAG_RowTyExpr,UHC.Light.Compiler.EH.MainAG_TyExpr,UHC.Light.Compiler.EH.MainAG_TyExprAnn,UHC.Light.Compiler.EH.MainAG_TyExprs,UHC.Light.Compiler.EH.MainAG_TyVar,UHC.Light.Compiler.EH.MainAG_TyVars,UHC.Light.Compiler.EH.MainAG_common,UHC.Light.Compiler.EH.Parser,UHC.Light.Compiler.EHC.ASTHandler,UHC.Light.Compiler.EHC.ASTHandler.Instances,UHC.Light.Compiler.EHC.ASTPipeline,UHC.Light.Compiler.EHC.ASTTypes,UHC.Light.Compiler.EHC.BuildFunction,UHC.Light.Compiler.EHC.BuildFunction.Run,UHC.Light.Compiler.EHC.Common,UHC.Light.Compiler.EHC.CompileGroup,UHC.Light.Compiler.EHC.CompilePhase.Cleanup,UHC.Light.Compiler.EHC.CompilePhase.Common,UHC.Light.Compiler.EHC.CompilePhase.CompileC,UHC.Light.Compiler.EHC.CompilePhase.FlowBetweenPhase,UHC.Light.Compiler.EHC.CompilePhase.Link,UHC.Light.Compiler.EHC.CompilePhase.Module,UHC.Light.Compiler.EHC.CompilePhase.Output,UHC.Light.Compiler.EHC.CompilePhase.Parsers,UHC.Light.Compiler.EHC.CompilePhase.Run,UHC.Light.Compiler.EHC.CompilePhase.Semantics,UHC.Light.Compiler.EHC.CompilePhase.TopLevelPhases,UHC.Light.Compiler.EHC.CompilePhase.Transformations,UHC.Light.Compiler.EHC.CompilePhase.Translations,UHC.Light.Compiler.EHC.CompileRun,UHC.Light.Compiler.EHC.CompileRun.Base,UHC.Light.Compiler.EHC.CompileUnit,UHC.Light.Compiler.EHC.Environment,UHC.Light.Compiler.EHC.FileSuffMp,UHC.Light.Compiler.EHC.InitialSetup,UHC.Light.Compiler.Error,UHC.Light.Compiler.Error.Pretty,UHC.Light.Compiler.FinalEnv,UHC.Light.Compiler.Foreign,UHC.Light.Compiler.Foreign.Boxing,UHC.Light.Compiler.Foreign.Extract,UHC.Light.Compiler.Foreign.Parser,UHC.Light.Compiler.Foreign.Pretty,UHC.Light.Compiler.Gam,UHC.Light.Compiler.Gam.AppSpineGam,UHC.Light.Compiler.Gam.Base,UHC.Light.Compiler.Gam.ClGam,UHC.Light.Compiler.Gam.ClassDefaultGam,UHC.Light.Compiler.Gam.DataGam,UHC.Light.Compiler.Gam.FixityGam,UHC.Light.Compiler.Gam.Full,UHC.Light.Compiler.Gam.Instantiate,UHC.Light.Compiler.Gam.KiGam,UHC.Light.Compiler.Gam.PolGam,UHC.Light.Compiler.Gam.Quantify,UHC.Light.Compiler.Gam.TyGam,UHC.Light.Compiler.Gam.TyKiGam,UHC.Light.Compiler.Gam.Utils,UHC.Light.Compiler.Gam.ValGam,UHC.Light.Compiler.Generics,UHC.Light.Compiler.HI,UHC.Light.Compiler.HS,UHC.Light.Compiler.HS.MainAG,UHC.Light.Compiler.HS.ModImpExp,UHC.Light.Compiler.HS.Parser,UHC.Light.Compiler.LamInfo,UHC.Light.Compiler.Module.ImportExport,UHC.Light.Compiler.Module.Merge,UHC.Light.Compiler.NameAspect,UHC.Light.Compiler.Opts,UHC.Light.Compiler.Opts.Base,UHC.Light.Compiler.Opts.CommandLine,UHC.Light.Compiler.Pred,UHC.Light.Compiler.Pred.Evidence,UHC.Light.Compiler.Pred.EvidenceToCore,UHC.Light.Compiler.Pred.Heuristics,UHC.Light.Compiler.Pred.RedGraph,UHC.Light.Compiler.Pred.ToCHR,UHC.Light.Compiler.Scanner.Common,UHC.Light.Compiler.Scanner.Machine,UHC.Light.Compiler.Scanner.Scanner,UHC.Light.Compiler.Scanner.Token,UHC.Light.Compiler.Scanner.TokenParser,UHC.Light.Compiler.SourceCodeSig,UHC.Light.Compiler.Substitutable,UHC.Light.Compiler.Ty,UHC.Light.Compiler.Ty.AppSpineGam,UHC.Light.Compiler.Ty.FIEnv,UHC.Light.Compiler.Ty.FIEnv2,UHC.Light.Compiler.Ty.FitsIn,UHC.Light.Compiler.Ty.FitsInCommon,UHC.Light.Compiler.Ty.FitsInCommon2,UHC.Light.Compiler.Ty.Ftv,UHC.Light.Compiler.Ty.Parser,UHC.Light.Compiler.Ty.Pretty,UHC.Light.Compiler.Ty.TreeTrieKey,UHC.Light.Compiler.Ty.Trf.BetaReduce,UHC.Light.Compiler.Ty.Trf.Canonic,UHC.Light.Compiler.Ty.Trf.FreshVar,UHC.Light.Compiler.Ty.Trf.Instantiate,UHC.Light.Compiler.Ty.Trf.MergePreds,UHC.Light.Compiler.Ty.Trf.Quantify,UHC.Light.Compiler.Ty.Trf.Subst,UHC.Light.Compiler.Ty.UsedNames,UHC.Light.Compiler.Ty.Utils1,UHC.Light.Compiler.Ty.Utils2,UHC.Light.Compiler.VarLookup,UHC.Light.Compiler.VarMp,UHC.Light.Compiler.VarMp.Utils 
+  Other-Modules:		 Paths_uhc_light,UHC.Light.Compiler.AbstractCore,UHC.Light.Compiler.AbstractCore.Utils,UHC.Light.Compiler.Base.CfgPP,UHC.Light.Compiler.Base.Common,UHC.Light.Compiler.Base.Debug,UHC.Light.Compiler.Base.FileSearchLocation,UHC.Light.Compiler.Base.Fld,UHC.Light.Compiler.Base.HsName,UHC.Light.Compiler.Base.HsName.Builtin,UHC.Light.Compiler.Base.Optimize,UHC.Light.Compiler.Base.PackageDatabase,UHC.Light.Compiler.Base.ParseUtils,UHC.Light.Compiler.Base.Parser,UHC.Light.Compiler.Base.Parser2,UHC.Light.Compiler.Base.Pragma,UHC.Light.Compiler.Base.Range,UHC.Light.Compiler.Base.Strictness,UHC.Light.Compiler.Base.Target,UHC.Light.Compiler.Base.TermLike,UHC.Light.Compiler.Base.Trace,UHC.Light.Compiler.Base.UID,UHC.Light.Compiler.Base.UnderDev,UHC.Light.Compiler.CHR.CtxtRedOnly.Constraint,UHC.Light.Compiler.CHR.CtxtRedOnly.Guard,UHC.Light.Compiler.CHR.CtxtRedOnly.Instances,UHC.Light.Compiler.CHR.CtxtRedOnly.Key,UHC.Light.Compiler.CHR.CtxtRedOnly.Solve,UHC.Light.Compiler.CodeGen.BasicAnnot,UHC.Light.Compiler.CodeGen.Bits,UHC.Light.Compiler.CodeGen.BuiltinPrims,UHC.Light.Compiler.CodeGen.BuiltinSizeInfo,UHC.Light.Compiler.CodeGen.CEnv,UHC.Light.Compiler.CodeGen.CVar,UHC.Light.Compiler.CodeGen.Const,UHC.Light.Compiler.CodeGen.ImportUsedModules,UHC.Light.Compiler.CodeGen.ModuleImportExportImpl,UHC.Light.Compiler.CodeGen.RefGenerator,UHC.Light.Compiler.CodeGen.Tag,UHC.Light.Compiler.CodeGen.TrfUtils,UHC.Light.Compiler.CodeGen.ValAccess,UHC.Light.Compiler.Config,UHC.Light.Compiler.ConfigCabal,UHC.Light.Compiler.ConfigDefines,UHC.Light.Compiler.ConfigInstall,UHC.Light.Compiler.ConfigInternalVersions,UHC.Light.Compiler.Core,UHC.Light.Compiler.Core.BindExtract,UHC.Light.Compiler.Core.Check,UHC.Light.Compiler.Core.Coercion,UHC.Light.Compiler.Core.ExtractFFE,UHC.Light.Compiler.Core.FFI,UHC.Light.Compiler.Core.FvS,UHC.Light.Compiler.Core.Merge,UHC.Light.Compiler.Core.ModAsMap,UHC.Light.Compiler.Core.Parser,UHC.Light.Compiler.Core.Pretty,UHC.Light.Compiler.Core.PrettyTrace,UHC.Light.Compiler.Core.Subst,UHC.Light.Compiler.Core.SysF.AsTy,UHC.Light.Compiler.Core.ToCoreRun,UHC.Light.Compiler.Core.ToGrin,UHC.Light.Compiler.Core.Trf,UHC.Light.Compiler.Core.Trf.ANormal,UHC.Light.Compiler.Core.Trf.AnnBasedSimplify,UHC.Light.Compiler.Core.Trf.CAFGlobalAsArg,UHC.Light.Compiler.Core.Trf.ConstProp,UHC.Light.Compiler.Core.Trf.ElimNonCodegenConstructs,UHC.Light.Compiler.Core.Trf.ElimTrivApp,UHC.Light.Compiler.Core.Trf.EraseExtractTysigCore,UHC.Light.Compiler.Core.Trf.EtaRed,UHC.Light.Compiler.Core.Trf.ExplicitStackTrace,UHC.Light.Compiler.Core.Trf.FixAfterParse,UHC.Light.Compiler.Core.Trf.FloatToGlobal,UHC.Light.Compiler.Core.Trf.InlineLetAlias,UHC.Light.Compiler.Core.Trf.LamGlobalAsArg,UHC.Light.Compiler.Core.Trf.LetDefBeforeUse,UHC.Light.Compiler.Core.Trf.LetFlattenStrict,UHC.Light.Compiler.Core.Trf.LetUnrec,UHC.Light.Compiler.Core.Trf.RenUniq,UHC.Light.Compiler.Core.UsedModNms,UHC.Light.Compiler.Core.Utils,UHC.Light.Compiler.CoreRun,UHC.Light.Compiler.CoreRun.Check,UHC.Light.Compiler.CoreRun.ModImpExp,UHC.Light.Compiler.CoreRun.Parser,UHC.Light.Compiler.CoreRun.Pretty,UHC.Light.Compiler.CoreRun.Prim,UHC.Light.Compiler.CoreRun.Run,UHC.Light.Compiler.CoreRun.Run.Val,UHC.Light.Compiler.CoreRun.Run.Val.Prim,UHC.Light.Compiler.CoreRun.Run.Val.RunExplStk,UHC.Light.Compiler.CoreRun.Run.Val.RunImplStk,UHC.Light.Compiler.Deriving,UHC.Light.Compiler.EH,UHC.Light.Compiler.EH.MainAG,UHC.Light.Compiler.EH.MainAG_AGItf,UHC.Light.Compiler.EH.MainAG_CaseAlt,UHC.Light.Compiler.EH.MainAG_CaseAlts,UHC.Light.Compiler.EH.MainAG_DataConstr,UHC.Light.Compiler.EH.MainAG_DataConstrs,UHC.Light.Compiler.EH.MainAG_DataField,UHC.Light.Compiler.EH.MainAG_DataFieldExpr,UHC.Light.Compiler.EH.MainAG_DataFieldPatExpr,UHC.Light.Compiler.EH.MainAG_DataFields,UHC.Light.Compiler.EH.MainAG_Decl,UHC.Light.Compiler.EH.MainAG_Decls,UHC.Light.Compiler.EH.MainAG_Expr,UHC.Light.Compiler.EH.MainAG_ExprAnn,UHC.Light.Compiler.EH.MainAG_FuncDep,UHC.Light.Compiler.EH.MainAG_FuncDeps,UHC.Light.Compiler.EH.MainAG_KiExpr,UHC.Light.Compiler.EH.MainAG_KiExprAnn,UHC.Light.Compiler.EH.MainAG_MbTyExpr,UHC.Light.Compiler.EH.MainAG_PatExpr,UHC.Light.Compiler.EH.MainAG_PatExprAnn,UHC.Light.Compiler.EH.MainAG_PrExpr,UHC.Light.Compiler.EH.MainAG_PrExprs,UHC.Light.Compiler.EH.MainAG_RecExpr,UHC.Light.Compiler.EH.MainAG_RecPatExpr,UHC.Light.Compiler.EH.MainAG_RowTyExpr,UHC.Light.Compiler.EH.MainAG_TyExpr,UHC.Light.Compiler.EH.MainAG_TyExprAnn,UHC.Light.Compiler.EH.MainAG_TyExprs,UHC.Light.Compiler.EH.MainAG_TyVar,UHC.Light.Compiler.EH.MainAG_TyVars,UHC.Light.Compiler.EH.MainAG_common,UHC.Light.Compiler.EH.Parser,UHC.Light.Compiler.EHC.ASTHandler,UHC.Light.Compiler.EHC.ASTHandler.Instances,UHC.Light.Compiler.EHC.ASTPipeline,UHC.Light.Compiler.EHC.ASTTypes,UHC.Light.Compiler.EHC.BuildFunction,UHC.Light.Compiler.EHC.BuildFunction.Run,UHC.Light.Compiler.EHC.Common,UHC.Light.Compiler.EHC.CompileGroup,UHC.Light.Compiler.EHC.CompilePhase.Cleanup,UHC.Light.Compiler.EHC.CompilePhase.Common,UHC.Light.Compiler.EHC.CompilePhase.CompileC,UHC.Light.Compiler.EHC.CompilePhase.FlowBetweenPhase,UHC.Light.Compiler.EHC.CompilePhase.Link,UHC.Light.Compiler.EHC.CompilePhase.Module,UHC.Light.Compiler.EHC.CompilePhase.Output,UHC.Light.Compiler.EHC.CompilePhase.Parsers,UHC.Light.Compiler.EHC.CompilePhase.Run,UHC.Light.Compiler.EHC.CompilePhase.Semantics,UHC.Light.Compiler.EHC.CompilePhase.TopLevelPhases,UHC.Light.Compiler.EHC.CompilePhase.Transformations,UHC.Light.Compiler.EHC.CompilePhase.Translations,UHC.Light.Compiler.EHC.CompileRun,UHC.Light.Compiler.EHC.CompileRun.Base,UHC.Light.Compiler.EHC.CompileUnit,UHC.Light.Compiler.EHC.Environment,UHC.Light.Compiler.EHC.FileSuffMp,UHC.Light.Compiler.EHC.InitialSetup,UHC.Light.Compiler.Error,UHC.Light.Compiler.Error.Pretty,UHC.Light.Compiler.FinalEnv,UHC.Light.Compiler.Foreign,UHC.Light.Compiler.Foreign.Boxing,UHC.Light.Compiler.Foreign.Extract,UHC.Light.Compiler.Foreign.Parser,UHC.Light.Compiler.Foreign.Pretty,UHC.Light.Compiler.Gam,UHC.Light.Compiler.Gam.AppSpineGam,UHC.Light.Compiler.Gam.Base,UHC.Light.Compiler.Gam.ClGam,UHC.Light.Compiler.Gam.ClassDefaultGam,UHC.Light.Compiler.Gam.DataGam,UHC.Light.Compiler.Gam.FixityGam,UHC.Light.Compiler.Gam.Full,UHC.Light.Compiler.Gam.Instantiate,UHC.Light.Compiler.Gam.KiGam,UHC.Light.Compiler.Gam.PolGam,UHC.Light.Compiler.Gam.Quantify,UHC.Light.Compiler.Gam.TyGam,UHC.Light.Compiler.Gam.TyKiGam,UHC.Light.Compiler.Gam.Utils,UHC.Light.Compiler.Gam.ValGam,UHC.Light.Compiler.Generics,UHC.Light.Compiler.HI,UHC.Light.Compiler.HS,UHC.Light.Compiler.HS.MainAG,UHC.Light.Compiler.HS.ModImpExp,UHC.Light.Compiler.HS.Parser,UHC.Light.Compiler.LamInfo,UHC.Light.Compiler.Module.ImportExport,UHC.Light.Compiler.Module.Merge,UHC.Light.Compiler.NameAspect,UHC.Light.Compiler.Opts,UHC.Light.Compiler.Opts.Base,UHC.Light.Compiler.Opts.CommandLine,UHC.Light.Compiler.Pred,UHC.Light.Compiler.Pred.CtxtRedOnly.Evidence,UHC.Light.Compiler.Pred.CtxtRedOnly.EvidenceToCore,UHC.Light.Compiler.Pred.CtxtRedOnly.Heuristics,UHC.Light.Compiler.Pred.CtxtRedOnly.RedGraph,UHC.Light.Compiler.Pred.CtxtRedOnly.ToCHR,UHC.Light.Compiler.Scanner.Common,UHC.Light.Compiler.Scanner.Machine,UHC.Light.Compiler.Scanner.Scanner,UHC.Light.Compiler.Scanner.Token,UHC.Light.Compiler.Scanner.TokenParser,UHC.Light.Compiler.SourceCodeSig,UHC.Light.Compiler.Substitutable,UHC.Light.Compiler.Ty,UHC.Light.Compiler.Ty.AppSpineGam,UHC.Light.Compiler.Ty.FIEnv,UHC.Light.Compiler.Ty.FIEnv2,UHC.Light.Compiler.Ty.FitsIn,UHC.Light.Compiler.Ty.FitsInCommon,UHC.Light.Compiler.Ty.FitsInCommon2,UHC.Light.Compiler.Ty.Ftv,UHC.Light.Compiler.Ty.Parser,UHC.Light.Compiler.Ty.Pretty,UHC.Light.Compiler.Ty.TreeTrieKey,UHC.Light.Compiler.Ty.Trf.BetaReduce,UHC.Light.Compiler.Ty.Trf.Canonic,UHC.Light.Compiler.Ty.Trf.FreshVar,UHC.Light.Compiler.Ty.Trf.Instantiate,UHC.Light.Compiler.Ty.Trf.MergePreds,UHC.Light.Compiler.Ty.Trf.Quantify,UHC.Light.Compiler.Ty.Trf.Subst,UHC.Light.Compiler.Ty.UsedNames,UHC.Light.Compiler.Ty.Utils1,UHC.Light.Compiler.Ty.Utils2,UHC.Light.Compiler.VarLookup,UHC.Light.Compiler.VarMp,UHC.Light.Compiler.VarMp.Utils 
   Ghc-Options:			-fno-warn-tabs
 
 Executable uhcl
   Hs-Source-Dirs:        src-main 
-  Build-Depends:		uhc-light==1.1.9.3, fgl,uulib>=0.9.19,hashable>=1.2.4&&<1.3,uhc-util>=0.1.6.5&&<0.1.7,base>=4.7&&<5,vector,network,binary,mtl,transformers,directory,containers,array,process,filepath,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale
+  Build-Depends:		uhc-light==1.1.9.4, fgl,uulib>=0.9.19,hashable>=1.2.4&&<1.3,uhc-util>=0.1.6.6&&<0.1.7,base>=4.7&&<5,vector,network,binary,mtl,transformers,directory,containers,array,process,filepath,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale
   Extensions:			RankNTypes,MultiParamTypeClasses,FunctionalDependencies,UndecidableInstances,DeriveDataTypeable,LiberalTypeSynonyms,StandaloneDeriving,DeriveGeneric,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,ScopedTypeVariables,TypeFamilies
   Main-Is:           	EHC.hs
 
 Executable uhcr
   Hs-Source-Dirs:        src-main 
-  Build-Depends:		uhc-light==1.1.9.3, fgl,uulib>=0.9.19,hashable>=1.2.4&&<1.3,uhc-util>=0.1.6.5&&<0.1.7,base>=4.7&&<5,vector,network,binary,mtl,transformers,directory,containers,array,process,filepath,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale
+  Build-Depends:		uhc-light==1.1.9.4, fgl,uulib>=0.9.19,hashable>=1.2.4&&<1.3,uhc-util>=0.1.6.6&&<0.1.7,base>=4.7&&<5,vector,network,binary,mtl,transformers,directory,containers,array,process,filepath,primitive,binary,syb,bytestring,uulib>=0.9.12,old-locale
   Extensions:			RankNTypes,MultiParamTypeClasses,FunctionalDependencies,UndecidableInstances,DeriveDataTypeable,LiberalTypeSynonyms,StandaloneDeriving,DeriveGeneric,FlexibleContexts,FlexibleInstances,TypeSynonymInstances,ScopedTypeVariables,TypeFamilies
   Main-Is:           	EHCRun.hs
