agrafix / agrafix/elm-bridge

Higher Kinded Data

オープン
#61 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Elm
スター
107
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

説明

Thank you for the great work on this library. Indispensable in keeping my Haskell types in sync with the front end types in elm.

I'm am using this library via servant-elm. In the backend I use beam, where types are required to look like
```
data UserT f = User
{ id :: C f Int32
, name :: C f Text
}
```
and since `type C Identity a = a ` then `type User = UserT Identity` is equivalent with
```
data User = User
{ id :: Int32
, name :: Text
}
```
I can derive FromJson, ToJson from the aeson library and ToSchema from the openapi3 library for both User types above. However I can't find a way to derive a sensible IsElmDefinition for the type alias version? It should not include the f parameter.
Is this possible, or what needs to be done to make this possible?
Right now my workaround is doubling every higher kinded type with a simple type that I can derive IsElmDefinition for, but that seems do defeat the purpose.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。