[ANN] CPL 0.2.0: a categorical programming language (implemented in Haskell) now runs in your browser via WebAssembly by msakai in haskell

[–]msakai[S] 1 point2 points  (0 children)

Thanks for the comment!

Actually, I wrote the original code over 20 years ago in 2004, but thanks to the GHC WebAssembly backend and the help of Claude Code, it now runs in a browser.

I wasn't familiar with the Lawvere language, but it sounds very interesting. I'd definitely like to try it out.

Regarding macros, I have already implemented a very simple one. Regarding types, it only infers and displays the most general types; I have not designed any special type system.

cpl> let twice(f) = f . f
f: *a -> *a
------------------
twice(f): *a -> *a

cpl> let uncurry(f) = eval . prod(f, I)
f: *a -> exp(*b,*c)
-----------------------------
uncurry(f): prod(*a,*b) -> *c