servant-elm icon indicating copy to clipboard operation
servant-elm copied to clipboard

generating elm for polymorphic data type and type synonym is broken

Open nlv opened this issue 6 years ago • 0 comments

In my project I use opaleye lib. I have to define polymorphic data type that corresponds to db table and several type synonyms with concrete fixed type parameters. For example:

data People' a b c = People { name :: a, lastname :: b, birthday :: s} type People = People' Text Text Int

And in API type I use type synonym:

type PeopleApi = "people" :> Capture "code" Int :> Get '[JSON] People

Generating elm api client is broken for this case. Full example you can see here: https://github.com/nlv/servant-elm-test

nlv avatar Aug 28 '19 19:08 nlv