Is it possible to emulate a function with your own data type with some GHC extension? What I want to do is e.g.
(imaginary syntax)
data MyFunc = MyFu
No, the syntax f e cannot be overloaded. The f has to have type S -> T.
f e
f
S -> T
But you can still do a lot with EDSLs if you do a deep embedding, i.e., you let your functions build syntax trees instead of computing.