agrafix / agrafix/elm-bridge

Higher Kinded Data

Aberta
#61 5 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Elm
Estrelas
107
Forks
28
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.