Joey,

thanks for the answer. About my use case: I would like to implement some 
tool in haskell to visualize various aspects of elm packages as graphs (as 
I am quite crazy about using graphs to understand software).

For example
1) package dependencies: nodes = packages; edge from X to Y meaning X 
declares dependency on Y
2) module dependencies: nodes = modules from given package; edge from X to 
Y meaning module X imports module Y
3) implementation dependencies inside a module: nodes = top-level functions 
in the module; edge from X to Y means function declaration X uses Y on its 
right side

It would be nice to have some Haskell library available to get access to 
elm ASTs (even better in some canonical form - when package/module data are 
available for every function in the source code).


On Friday, December 9, 2016 at 5:17:40 PM UTC+1, Joey Eremondi wrote:
>
> Jan, can you tell us about your use case?
>
> Elm-compiler doesn't export the parser as a library. If you're looking to 
> do stuff like that, elm-format might be a better starting point for a 
> parser: https://github.com/avh4/elm-format
>
> The syntax is not exported as an API because it is subject to change: Elm 
> is currently pre-1.0, and as you can see from our release notes, the syntax 
> frequently changes between releases.
>
> Additionally, many people who use Elm are not Haskell users, so we didn't 
> want them to need Haskell in order to use Elm, thus the switch to NPM 
> and/or the Windows/Mac installers.
>
> On Fri, Dec 9, 2016 at 8:10 AM, Nick H <falling...@gmail.com <javascript:>
> > wrote:
>
>> You need to build from source.
>>
>> The elm compiler moved from hackage to npm. It was never maintained in 
>> both places at once.
>>
>> On Fri, Dec 9, 2016 at 1:51 AM, Jan Hrček <honz...@gmail.com 
>> <javascript:>> wrote:
>>
>>> Hello,
>>>
>>> is there a distribution of latest (0.18) elm-compiler available as 
>>> haskell library? I checked hackage 
>>> <https://hackage.haskell.org/package/elm-compiler> but that only has 
>>> version 0.15. Or do I need to build it from sources?
>>> I'd like to make use of the elm parsing capabilities of the library to 
>>> use in my project..
>>> Or is there some reason why Evan is no longer publishing latest versions 
>>> of the package on hackage?
>>>
>>> -- 
>>> 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 elm-discuss...@googlegroups.com <javascript:>.
>>> 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 elm-discuss...@googlegroups.com <javascript:>.
>> 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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to