I've read that presentation you've linked.

The likeness of the simply typed lambda calculus to Haskell is a bit superficial, don't you think? The simply typed lambda calculus is strongly normalizing, and Haskell is not. If you haven't read the Conal Elliot paper, that is actually good news for you. This is because CCCs with fixed points are still a research topic for Conal's formalism AFAIK.

There are more differences in the type systems. I am sure you know Haskell compiles to [System FC](https://downloads.haskell.org/~ghc/7.6.3/docs/html/users_guide/an-external-representation-for-the-ghc-core-language-for-ghc-6.10.html). In terms of Barendregt's [Lambda cube](https://en.wikipedia.org/wiki/Lambda_cube) this means that Haskell is more akin to \\(\lambda 2\\). As far as I can tell your semantics are like \\(\lambda \to\\) and are therefore simpler.

Compiling to Conal Elliot's categories seems like an excellent idea for FQL, since the two are quite similar and appear to have the same expressive power. You could then be agnostic regarding implementation just like Conal Elliot is in his paper.

I would strongly prefer to *not* write out ADTs for the AST of FQL along with a parser. A much more direct way to get started is to use a [*finally tagless DSL* รก la Oleg Kiselyov](http://okmij.org/ftp/tagless-final/index.html). If you go to that thread I previously linked, I work out with Miguel how to compile one to Conal Elliot's categories.

But I am afraid I need your help in writing the finally tagless DSL, because I can't figure out how to start from your PDF.

The likeness of the simply typed lambda calculus to Haskell is a bit superficial, don't you think? The simply typed lambda calculus is strongly normalizing, and Haskell is not. If you haven't read the Conal Elliot paper, that is actually good news for you. This is because CCCs with fixed points are still a research topic for Conal's formalism AFAIK.

There are more differences in the type systems. I am sure you know Haskell compiles to [System FC](https://downloads.haskell.org/~ghc/7.6.3/docs/html/users_guide/an-external-representation-for-the-ghc-core-language-for-ghc-6.10.html). In terms of Barendregt's [Lambda cube](https://en.wikipedia.org/wiki/Lambda_cube) this means that Haskell is more akin to \\(\lambda 2\\). As far as I can tell your semantics are like \\(\lambda \to\\) and are therefore simpler.

Compiling to Conal Elliot's categories seems like an excellent idea for FQL, since the two are quite similar and appear to have the same expressive power. You could then be agnostic regarding implementation just like Conal Elliot is in his paper.

I would strongly prefer to *not* write out ADTs for the AST of FQL along with a parser. A much more direct way to get started is to use a [*finally tagless DSL* รก la Oleg Kiselyov](http://okmij.org/ftp/tagless-final/index.html). If you go to that thread I previously linked, I work out with Miguel how to compile one to Conal Elliot's categories.

But I am afraid I need your help in writing the finally tagless DSL, because I can't figure out how to start from your PDF.