<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Dear all,<br> I have used ForSyDe to translate a Haskell script to VHDL for a while, and I have one problem by applying where-clause during the translation.<br>I wrote a small function Plus2.hs which is implied as following<br><br>addTwof :: ProcFun (Int32 -> Int32)<br>addTwof = $(newProcFun [d|addTwof :: Int32 -> Int32<br> addTwof n = addOnef+1<br> where<br> addOnef = n +1<br> |])<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><br>The compiling process was fine, but the script could not be translated into VHDL, like the error i mentioned above.<br>Is there any way to solve this problem if a where-clause is a must. Thanks all.<br><br>Hanyi<br><br /><hr />更多热辣资讯尽在新版MSN首页! <a href='http://cn.msn.com/' target='_new'>立刻访问!</a></body>
</html>