There are a number of ways to do Haskell+Elm interop, but none of them are very polished at the moment. I'm considering a project to make that process *delightful*. Would anyone be interested?
Normally GraphQL would be an attractive option for this kind of thing, but without sum types or parametric polymorphism it's really a sad thing to drop down to in this case. It really kills your chance of generating great, idiomatic Elm data types.
That leaves one of the Elm codegen libraries for Haskell.

I'm tracking 4:

+ elm-bridge
+ haskell-to-elm
+ elm-street
+ elm-export

On top of these people have built two Servant-based network call systems:

+ servant-elm
+ servant-to-elm
These are great, and provide a good foundation to build off of.

However, at the moment none of them have everything we need for an awesome experience.

Most pressingly, I want full support for type variables. Modeling data without them is way too annoying.
Additionally, I'd like smooth Elm generation for pretty much everything in the idiomatic core Haskell libraries, not just `base`, but `containers`, `unordered-containers`, etc.
Eg I should be able to use a `NonEmpty` from base on the Haskell side, and a `NonEmpty` from https://package.elm-lang.org/packages/mgold/elm-nonempty-list/latest/List-Nonempty should come out on the Elm side.
Additionally I'd like good support for Abstract Data Types/Opaque types. This is such a key part of a quality Haskell/Elm codebase, and an idiomatic way to make them isn't covered by the existing Elm gen libraries.
The Elm side here will need to be written by hand, but that doesn't mean the libraries can't help. In particular easy, idiomatic property testing for this is key-- to be able to assert that the Elm side enforces the same invariants as the Haskell side.
Anyway, if you're interested message me! If there's enough interest I'll do this publicly, if not, privatelyđź‘»
Stretch goal: mirror the Haskell comments on the Elm side. Docs matter!đź“ś
You can follow @seagreen__.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.