Why doesn't the C99 backend place the resulting C code in the same directory as the original spec? #655
Replies: 2 comments 1 reply
-
I don't have a particularly strong opinion about what the default behavior should be, so I'm open to changing it. |
Beta Was this translation helpful? Give feedback.
-
Based on the way Haskell is interpreted this might be a somewhat difficult thing to implement and almost any implementation would be somewhat inelegant. Namely Haskell doesn't have an easy call-site-determiner, so some workaround needs to be done. Some options that I've been able to find from logging packages are:
however, both of these options (as far as I can tell in testing) only work if the copilot spec is being ran like a script (i.e.
I'd wager there are ways to switch down one control path if haskell is compiled and down another if it's run without being compiled. But, in all cases there is added boilerplate code to add instead of just choosing a different option in the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I find it a bit frustrating that I cannot compile a Copilot spec from wherever and I have to move the resulting files to where the original spec is. While I can modify the spec to specify a directory, I cannot modify the spec to mean "in the same directory where the spec is".
As a common user of sandboxes, my scenario is the following:
~/copilot
, locally using sandboxes.~/ogma
, locally using sandboxes.~/copilot/.cabal-sandbox
, or dorunhaskell
from~/copilot
and move the resultingcopilot{.c,.h,_types.h}
to the cFS application directory.I would have preferred to have the generated files be in the same directory as the spec, so that I could cd into
~/copilot
and justrunhaskell
of the Copilot spec file, wherever it it.Beta Was this translation helpful? Give feedback.
All reactions