Open mgajda opened 9 years ago
It may be a part of more general question: is it possible to mark constants that require some recursive Haskell-level evaluation as constants that need to be evaluated before CLaSH generates VHDL code, or is it necessary to use other tricks here? (Like Template Haskell.)
It pains me to say that you'll need to use template Haskell (tricks) here. The compile time evaluation mechanisms are very poor in the clash compiler right now. It is one of the reasons I want to overhaul the internals. Right now you should avoid any use of lists (and 'Double' for that matter) outside of a template Haskell expression.
Hmm, Enforcing a phase separation with TH between the Haskell CLaSH can deal with and that which it can't doesn't seem like the worst thing to me.
https://github.com/ghc-proposals/ghc-proposals/pull/243 Years later I finally get around to proposing that phase separation.
I've just tried to abstract my VGA controller over different possible modeline parameters, and got a rather obscure error message:
Most of the types and indeed most of the code is identical with previous version, just it is abstracted over
Modeline
, I have no idea what to attribute it to.I attach lpaste links to the two source modules.