Much of the infrastructure in the unit tests in each package.
Ideally, we could find some way to share this code in between the two libraries to avoid code duplication. One complication is that most of this code lives in modules that aren't exported. Perhaps it would make sense to create a new copilot-backend library that factors out the code shared in common?
Currently,
copilot-bluespec
has a fair bit of code that is copy-pasted fromcopilot-c99
:Copilot.Compile.Bluespec.External
is taken directly fromCopilot.Compile.C99.External
.This code in
Copilot.Compile.Bluespec.Name
:https://github.com/Copilot-Language/copilot-bluespec/blob/9d83645f94d1ff89da3894abe64c58b086fc94f0/src/Copilot/Compile/Bluespec/Name.hs#L69-L95
Is taken from
Copilot.Compile.C99.Name
.This code in
Copilot.Compile.Bluespec.Compile
:https://github.com/Copilot-Language/copilot-bluespec/blob/9d83645f94d1ff89da3894abe64c58b086fc94f0/src/Copilot/Compile/Bluespec/Compile.hs#L262-L294
Is taken from
Copilot.Compile.C99.Compile
.Ideally, we could find some way to share this code in between the two libraries to avoid code duplication. One complication is that most of this code lives in modules that aren't exported. Perhaps it would make sense to create a new
copilot-backend
library that factors out the code shared in common?