Share more code between copilot-bluespec
and copilot-c99
#3
Labels
enhancement
New feature or request
copilot-bluespec
and copilot-c99
#3
Currently,
copilot-bluespec
has a fair bit of code that is copy-pasted fromcopilot-c99
:Almost all of the code in
Copilot.Compile.Bluespec.External
is taken directly fromCopilot.Compile.C99.External
.This code in
Copilot.Compile.Bluespec.Name
:copilot-bluespec/src/Copilot/Compile/Bluespec/Name.hs
Lines 69 to 95 in 9d83645
Is taken from
Copilot.Compile.C99.Name
.This code in
Copilot.Compile.Bluespec.Compile
:copilot-bluespec/src/Copilot/Compile/Bluespec/Compile.hs
Lines 262 to 294 in 9d83645
Is taken from
Copilot.Compile.C99.Compile
.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?The text was updated successfully, but these errors were encountered: