[Haskell-cafe] Retargeting Haskell compiler to embedded/hardware

Atze Dijkstra atze at cs.uu.nl
Wed Sep 29 17:07:35 EDT 2010

Hi Tom,

The Utrecht Haskell Compiler (UHC) is internally organized as a set of compilers, for which you can configure the aspects you want. It is relatively easy to extract such a particular combination and use it as a starting point. Or you might install UHC itself and use the installed libraries, which include abstract syntax, parser, etc. There is some variation depending on what you need, so check out http://www.cs.uu.nl/wiki/UHC for initial reading, and let me know whether you need more info.


On  29 Sep, 2010, at 16:49 , S. Doaitse Swierstra wrote:

> Begin forwarded message:
>> From: Tom Hawkins <tomahawkins at gmail.com>
>> Date: 29 september 2010 03:58:11 GMT+02:00
>> To: haskell-cafe <haskell-cafe at haskell.org>
>> Subject: [Haskell-cafe] Retargeting Haskell compiler to embedded/hardware
>> A few years ago I attempted to build a Haskell hardware compiler
>> (Haskell -> Verilog) based on the Yhc frontent.  At the time I was
>> trying to overcome several problems [1] with implementing a hardware
>> description language as a light eDSL, which convinced me a proper
>> compiler may be a better approach.  Yhc was recommended as a good
>> starting point since it had a simpler IR compared with GHC -- at least
>> at the time.
>> I am considering restarting this effort, but this time to target hard
>> realtime embedded code.  What is the recommended compiler to start
>> from?  I need an IR that is post type checking with as much desugaring
>> as possible, and a code base that is relatively easy to splice and
>> build.
>> My other requirement is not to be bound to IO () for 'main'.  The top
>> level will be a monad, but with different semantics than IO.  I would
>> also like to reuse the standard library, with exception to the values
>> related to IO.
>> What are my options?
>> Thanks.
>> -Tom
>> [1] Lack of observable sharing; function definitions, case
>> expressions, ADTs disappear at compile time; etc.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

                - Atze -

Atze Dijkstra, Department of Information and Computing Sciences. /|\
Utrecht University, PO Box 80089, 3508 TB Utrecht, Netherlands. / | \
Tel.: +31-30-2534118/1454 | WWW  : http://www.cs.uu.nl/~atze . /--|  \
Fax : +31-30-2513971 .... | Email: atze at cs.uu.nl ............ /   |___\

More information about the Haskell-Cafe mailing list