+This arose in another guise in Trac #3959. Here we had
+
+ catch# (throw exn >> return ())
+
+Note that (throw :: forall a e. Exn e => e -> a) is called with [a = IO ()].
+After inlining (>>) we get
+
+ catch# (\_. throw {IO ()} exn)
+
+We must *not* eta-expand to
+
+ catch# (\_ _. throw {...} exn)
+
+because 'catch#' expects to get a (# _,_ #) after applying its argument to
+a State#, not another function!
+
+In short, we use the state hack to allow us to push let inside a lambda,
+but not to introduce a new lambda.
+
+
+Note [ArityType]
+~~~~~~~~~~~~~~~~
+ArityType is the result of a compositional analysis on expressions,
+from which we can decide the real arity of the expression (extracted
+with function getArity).
+
+Here is what the fields mean. If e has ArityType
+ (AT as r), where n = length as,
+then
+
+ * If r is ABot then (e x1..xn) definitely diverges
+ Partial applications may or may not diverge
+
+ * If r is ACheap then (e x1..x(n-1)) is cheap,
+ including any nested sub-expressions inside e
+ (say e is (f e1 e2) then e1,e2 are cheap too)
+
+ * e, (e x1), ... (e x1 ... x(n-1)) are definitely really
+ functions, or bottom, not casts from a data type
+ So eta expansion is dynamically ok;
+ see Note [State hack and bottoming functions],
+ the part about catch#
+
+We regard ABot as stronger than ACheap; ie if ABot holds
+we don't bother about ACheap
+
+Suppose f = \xy. x+y
+Then f :: AT [False,False] ACheap
+ f v :: AT [False] ACheap
+ f <expensive> :: AT [False] ATop
+Note the ArityRes flag tells whether the whole expression is cheap.
+Note also that having a non-empty 'as' doesn't mean it has that
+arity; see (f <expensive>) which does not have arity 1!
+
+The key function getArity extracts the arity (which in turn guides
+eta-expansion) from ArityType.
+ * If the term is cheap or diverges we can certainly eta expand it
+ e.g. (f x) where x has arity 2
+
+ * If its a function whose first arg is one-shot (probably via the
+ state hack) we can eta expand it
+ e.g. (getChar <expensive>)