On 2008 Sep 4, at 18:00, Justin Bailey wrote:
On Thu, Sep 4, 2008 at 2:52 PM, Philippa Cowderoy
<[EMAIL PROTECTED]> wrote:
Would writing Haskell to generate the C via Language.C be an option?
Effectively you'd be using Haskell as a typeful macro system.
Interesting idea, and I've done similar things with haskelldb
(generating SQL queries). Looking at the package, I think would be
pretty painful though. It seems I'd have to build the AST by hand, and
it doesn't seem to incorporate any type information in the AST items.
Compared to Haskell (or HaskellDB), C barely has type information and
is very non-strict about what types are compatible with what types.
(And I'd wonder how Language.C deals with typedef, which is to C
parsing what fixity declarations are to Haskell parsing [which is to
say, painful].)
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe