[Haskell-cafe] Using GHC API to compile Haskell sources to CORE and CORE to binary
David Feuer
david.feuer at gmail.com
Wed Jan 28 03:53:01 UTC 2015
I can't answer all those questions, but I believe CoreSynType is the
AST representing Core.
On Tue, Jan 27, 2015 at 10:12 PM, Wojciech Danilo
<wojciech.danilo at gmail.com> wrote:
> Hello David, thank you for your response! :)
> I've got few questions regarding it:
> 1) Does it mean there are no datatypes dedicated to "a core language" ?
> 2) All passes are transforming AST -> AST? If so, what does the function
> `compileToCoreModule` does?
> 3) Additional - is there any subset of the AST that we can call "CORE" ?
> 4) Do all the documentation (like this one:
> https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/CoreSynType)
> should be considered obsolete?
>
> All the best,
> Wojciech
>
> Wed Jan 28 2015 at 3:55:12 AM użytkownik David Feuer <david.feuer at gmail.com>
> napisał:
>
>> There used to be an external representation of core intended to be
>> used for such things. It was recently removed because it had gotten
>> stale and no one wanted to take responsibility for maintaining it. So
>> at the moment, Core is really just an AST, not a proper language, and
>> you'll have to hack GHC if you want to inject it.
>>
>> On Tue, Jan 27, 2015 at 6:10 PM, Wojciech Danilo
>> <wojciech.danilo at gmail.com> wrote:
>> > Hello All! :)
>> > Recently I've came across a problem and hopefully you could help me with
>> > it.
>> > Basically I and some people here are running a startup and we have
>> > created a
>> > language for processing images. This language has 2 interchangeable
>> > representations - textual and visual, dataflow one.
>> >
>> > Right now we are compiling it to haskell sources, but we want to move
>> > over
>> > GHC CORE. Getting into GHC has a high learning curve, as far as we see,
>> > and
>> > we would be very thankfull for any help with a minimal working example
>> > of
>> > compiling haskell sources to CORE and then CORE to binaries. I've posted
>> > couple days ago a detailed question on StackOverflow, here:
>> >
>> >
>> > http://stackoverflow.com/questions/28059669/using-ghc-api-to-compile-haskell-sources-to-core-and-core-to-binary
>> >
>> >
>> > I would be very thankful for any help or hints!
>> > All the best,
>> > Wojciech
>> >
>> > _______________________________________________
>> > Haskell-Cafe mailing list
>> > Haskell-Cafe at haskell.org
>> > http://www.haskell.org/mailman/listinfo/haskell-cafe
>> >
More information about the Haskell-Cafe
mailing list