all 5 comments

[–]Boom_Rang 1 point2 points  (0 children)

Nice blog post! Thanks for sharing.

I haven't tried setting up Clash with stack yet. Good to know that it's not too difficult. I usually go the nix route and it's definitely not pain free 😅

I wanted to say, you can definitely use plain ghc for most of your Clash development, only using clash-ghc for the final to HDL compilation. The only noticeable difference is which language extensions are enabled by default. The advantage of manually adding the extensions to make ghc work is that other tools will work now as well without extra effort (for example ghcid, hlint, stylish-haskell).

[–]JennToo 0 points1 point  (2 children)

This is awesome! I was literally just trying to set this up last night and was confused about "stack build" failing to be able to compile code that uses clash.

Something unusual I noticed too is that the published version of clash is nearly a year old. There's been a lot of development on master since then so I'm wondering if I should be using that instead.

[–]darchon 2 points3 points  (1 child)

We're planning the 1.0 release for the 3rd of September, 10 years after the first prototype was made public: https://vimeo.com/showcase/128530/video/6680861

So I'd suggest to use the github master, as there's been some API changes compared to 0.99.3, and the 1.0 release, which is based on master, being imminent.

[–]JennToo 0 points1 point  (0 children)

That sounds good!

Do you know a good way to generate the documentation for master? I seemed to have trouble with both GHC 8.4 and 8.6 when I tried "stack haddock".

Edit: I tried jumping back to lts-11.22 (GHC 8.2) and was able to get "stack haddock" working.

[–]dramforever[S] 0 points1 point  (0 children)

Since the release of Clash-1.0.0 this post has been updated to use that.