clash-lang / clash-compiler

Haskell to VHDL/Verilog/SystemVerilog compiler
https://clash-lang.org/
Other
1.43k stars 151 forks source link

Allow multiple PrimitiveGuard annotations #2562

Closed leonschoorl closed 1 year ago

leonschoorl commented 1 year ago

Fixes #1436

Due to some refactoring of the error reporting this slightly changes some of the error messages:

import Clash.Prelude
topEntity = False
{-# ANN topEntity (defSyn "foo") #-}
{-# ANN topEntity (defSyn "bar") #-}

Now generates:

    Error processing 'Synthesize' annotations on Main.topEntity:
    A binder can't have more than one 'Synthesize' annotation.

Instead of:

    The following value has multiple 'Synthesize' annotations: topEntity

Still TODO: