[Haskell-cafe] Using FosSyDe to translate haskell to VHDL.

wanghanyi wanghanyi21 at hotmail.com
Tue Mar 10 13:54:47 EDT 2009

Dear all,
 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.
I wrote a small function Plus2.hs which is implied as following

addTwof :: ProcFun (Int32 -> Int32)
addTwof = $(newProcFun [d|addTwof :: Int32 -> Int32
                          addTwof n = addOnef+1
                                 addOnef = n +1

*Plus2> writeVHDL plus2SysDef
*** Exception: VHDL Compilation Error: Untranslatable function: where constructs are not supported in functions:
    where addOnef_0 = n_1 GHC.Num.+ 1
in process function `addTwof' (created in Plus2)  used by  process `plus2Proc' belonging to system definition `plus2' (created in <unkown>)

The compiling process was fine, but the script could not be translated into VHDL, like the error i mentioned above.
Is there any way to solve this problem if a where-clause is a must. Thanks all.


Live SearchÊÓƵËÑË÷£¬¿ìËÙ¼ìË÷ÊÓƵµÄÀûÆ÷£¡
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090311/fa7fd02d/attachment.htm

More information about the Haskell-Cafe mailing list