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

Matthijs Kooijman matthijs at stdin.nl
Tue Mar 10 15:23:57 EDT 2009


Hi Hany,

> *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>)
I don't know much about ForSyDe, but it seems that where clauses simply aren't
supported. Perhaps let expressions are?

The would mean something like the following:

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

(Not sure if this is completely valid code, I'm not too familiar with TH..).

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090310/fd1f0600/attachment.bin


More information about the Haskell-Cafe mailing list