https://github.com/moggi-lang/moggi/

Moggi is a statically typed, purely functional programming language with strict evaluation. It has algebraic data types, GADTs, pattern matching, type classes, type inference, Generic Deriving, and an IO monad. It targets the JVM, .NET, and PHP, with typed FFI for existing Java, .NET, and PHP libraries.

The first release also includes a REPL, LSP, VS Code extension, moogle (code search), mogdoc (documentation generation), and a growing standard library.

This is an alpha release: the language and APIs are still evolving, and the standard library is still a work in progress.

I'd particularly like feedback from people interested in functional languages, type systems, compilers, and language/runtime interoperability.

all 11 comments

sorted by: hot top controversial new old
[–] 17 points 3 weeks ago* (2 children)

Dude you commited 167,147 lines of code in 1529 files in a single initial commit, then have not made any coding changes...

Is this slop?

  • source
  • hideshow 2 child comments
  • [–] 2 points 3 weeks ago (1 child)

    Why would I use this rather than, say, Clojure?

  • source
  • hideshow 1 child comment
  • [–] 2 points 3 weeks ago

    This is all done in PHP. Actually impressive. It's a bit of an unusual choice for this kind of thing. Also with help of an Ai, because everything is nowadays. The README didn't answer my question, why someone would want to learn and use Moggi. It just explains what it is (which is fine I guess), but not its purpose or why this was created. Don't get me wrong, I'm not against this project, just want to understand the motivation.

  • source
  • [–] 1 point 3 weeks ago (1 child)
  • [–] 1 point 3 weeks ago (1 child)

    Well it looks 99% like Haskell, but compiles to JVM, .NET, and PHP. And otherwise seems very "Haskell at home", with moogle (instead of hoogle), and mogdoc (instead of haddock).

    Not to diminish any work you did do, but I do think a Haskell -> JVM/.NET/PHP compiler might have done what you aimed for and easier.

  • source
  • hideshow 1 child comment
  • [–] 1 point 3 weeks ago

    Why target 3 different runtimes?

  • source