clash-lang / clash-compiler

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

Clash fails to account for `.` in names #2705

Open martijnbastiaan opened 5 months ago

martijnbastiaan commented 5 months ago

E.g.,

https://github.com/clash-lang/clash-compiler/blob/55448cdd568b90549f42980d80d9bdbcc01b6084/clash-lib/src/Clash/Netlist/Util.hs#L1445

and

https://github.com/clash-lang/clash-compiler/blob/55448cdd568b90549f42980d80d9bdbcc01b6084/clash-lib/src/Clash/Normalize/Transformations/Specialize.hs#L513-L514

These functions fail for things like:

Foo.Bar.(.&.)

leonschoorl commented 5 months ago

We should probably switch to storing the module name separately from the rest of the name. Just like template-haskell (inside of NameFlavour) and ghc (inside of NameSort).