Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to derive ADTs that have no associated data? #1

Open
XtraKrispi opened this issue Jan 28, 2021 · 0 comments
Open

Is there a way to derive ADTs that have no associated data? #1

XtraKrispi opened this issue Jan 28, 2021 · 0 comments

Comments

@XtraKrispi
Copy link

I have an ADT defined like this:
data MyData = Val1 | Val2

and generically deriving TypescriptType fails with a No Instance error. Do you know if there's a way to do this automatically, or do I have to manually create the TypescriptType instance?

No instance for (Typescript.Internal.Intermediate.Generic.GenericTSUnion (GHC.Generics.M1 GHC.Generics.C ('GHC.Generics.MetaCons "Val1" 'GHC.Generics.PrefixI 'False) GHC.Generics.U1)) arising from a use of ‘Typescript.Internal.Intermediate.Generic.$dmtoTSIntermediate’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant