The git repository is created at [categories-working-hacker](https://github.com/jmgimeno/categories-working-hacker).
The last commit includes both your suggestions and an the modified interpreter.
I can enter in `ghci` the expression `ex = lambda (lambda (add (before here) here))` only if I enable `:seti -XFlexibleContexts`
But when I try to evaluate `interpret (apply (apply ex (int 3)) (int 2))` I get the error:
• Could not deduce (BoolCat k) arising from a use of ‘ex’
from the context: Language k
bound by a type expected by the context:
add (BoolCat k) to the context of
a type expected by the context:
• In the first argument of ‘apply’, namely ‘ex’
In the first argument of ‘apply’, namely ‘(apply ex (int 3))’
In the first argument of ‘interpret’, namely
‘(apply (apply ex (int 3)) (int 2))’
I hope the project (using stack) is well configured because I use haskellformac and my _stack-fu_ is a little bit rusty.