If there is an easy way to do this, it does not exist within the Elm language. By design, Elm does not have any utilities for inspecting types at runtime.
The grammar for Elm type declarations is fairly small, so I don't think it would be difficult to write a parser. But I don't know if anybody has done this work (outside of the Elm compiler itself!) On Tue, May 31, 2016 at 10:00 AM, Zachary Kessin <[email protected]> wrote: > Is there an easy way to parse out elm types and export them to some form > of AST? > > I know that NoRedInk did it here... http://noredink.github.io/json-to-elm/ > but having a way to define a type in elm then somehow convert that to > erlang code would be really helpful. > > Zach > > -- > Zach Kessin > Twitter: @zkessin <https://twitter.com/zkessin> > Skype: zachkessin > ᐧ > > -- > You received this message because you are subscribed to the Google Groups > "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
