<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hey Matthijs<BR> Thanks for replying, and that might help. I will try with it to see if it works, and I am still looking for the answer myself. If there is anyone has worked with the Haskell to VHDL translater, plz let me know cause I have many to discuss.<BR>
Thanks<BR>
<BR>
Hanyi <BR> <BR>> Date: Tue, 10 Mar 2009 20:23:57 +0100<BR>> From: matthijs@stdin.nl<BR>> To: wanghanyi21@hotmail.com<BR>> CC: haskell-cafe@haskell.org<BR>> Subject: Re: [Haskell-cafe] Using FosSyDe to translate haskell to VHDL.<BR>> <BR>> Hi Hany,<BR>> <BR>> > *Plus2> writeVHDL plus2SysDef<BR>> > *** Exception: VHDL Compilation Error: Untranslatable function: where constructs are not supported in functions:<BR>> > where addOnef_0 = n_1 GHC.Num.+ 1<BR>> > in process function `addTwof' (created in Plus2) used by process `plus2Proc' belonging to system definition `plus2' (created in <unkown>)<BR>> I don't know much about ForSyDe, but it seems that where clauses simply aren't<BR>> supported. Perhaps let expressions are?<BR>> <BR>> The would mean something like the following:<BR>> <BR>> addTwof :: ProcFun (Int32 -> Int32)<BR>> addTwof = $(newProcFun [d|addTwof :: Int32 -> Int32<BR>> let addOnef = n +1 in<BR>> addTwof n = addOnef+1<BR>> |])<BR>> <BR>> (Not sure if this is completely valid code, I'm not too familiar with TH..).<BR>> <BR>> Gr.<BR>> <BR>> Matthijs<BR><BR><br /><hr />使用新一代 Windows Live Messenger 轻松交流和共享! <a href='http://im.live.cn/messenger.aspx' target='_new'>立刻下载!</a></body>
</html>