You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importElm.TyRepasETimport qualified Elm.ModuleasElmmyAlterations:: ET.ETypeDef->ET.ETypeDefmyAlterations =Elm.recAlterType myTypeAlterations
myTypeAlterations:: ET.EType->ET.ETypemyTypeAlterations t =case t ofET.ETyApp(ET.ETyCon(ET.ETCon"Key"))(ET.ETyCon(ET.ETCon"Book"))->ET.ETyCon(ET.ETCon"BookId")
_ ->Elm.defaultTypeAlterations t
But then you still need to specify the type of BookId that matches the database backend, such that elm-bridge can generate the type aliases and serialization functions...
Currently if you have a type alias
type BookId = Key Book
that youCapture "book-id" BookId
it'll be rendered as(Key Book)
, and you have to replace it manually, like at https://gitlab.com/k-bx/meetup/blob/master/backend/meetup/src/Meetup/GenerateElm.hs. Having aBookId
would be nicer.The text was updated successfully, but these errors were encountered: