Getting syntax error when going from combinational to sequentional circuits

Skip to first unread message

Mahshid Shahmohammadian

May 19, 2021, 1:08:57 PMMay 19
to Clash - Hardware Description Language


I just started using Clash and went over the tutorial with the MAC example. When using the mealy machine without type annotation the compiler asks for type annotation, then I just use the type:

mac :: (Pack o, Num o) => (Signal o, Signal o) -> SignalP o
mac = macT <^> 0

Then I get this weird error which I think is related to installation:

Not in scope: type constructor or class ‘Pack’ ,
Not in scope: type constructor or class ‘SignalP’

I have built the same MAC circuit in both linux and mac using stack with option B in the page below: (replaced the Example.Project with MAC source)

Before using the mealy machine it builds but when going sequential this happens. Can you advise me what is going on?

BTW, I have started to work with Clash so I'm going to ask many questions if that's fine with you :)


Rowan Goemans

May 19, 2021, 1:37:50 PMMay 19
Hi Mahshid,

You are following an incredibly outdated Clash tutorial, those types
don't exist anymore. Please make sure you follow the one for the
version you have.
This is the tutorial for the most recent version:

Best regards,

Rowan Goemans

Op wo 19 mei 2021 om 19:09 schreef Mahshid Shahmohammadian
> --
> You received this message because you are subscribed to the Google Groups "Clash - Hardware Description Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visit

Christiaan Baaij

May 20, 2021, 5:09:37 AMMay 20
Hi Mahshid,

As Rowan explained, you seem to be following an older version of a tutorial.
Could you give me the link to the tutorial you have been using so far?



Mahshid Shahmohammadian

May 20, 2021, 10:44:45 AMMay 20
Hi Christiaan,

Yes, that fixed my issue. I did not notice the version of Clash in the tutorial is much older than the one in the stack.yaml and cabal files. I was using the first google search result for "Clash Haskell tutorial" which was the link below:

Then I switched to the link Rowan sent and everything is going good so far. Thanks for the follow-up.


Mahshid Shahmohammadian
Ph.D. Candidate
Computer Science Department
Drexel University
Reply all
Reply to author
0 new messages