Replies: 3 comments 3 replies
-
I did some poking around in I'll take a stab at splitting a few up, and see how it goes. |
Beta Was this translation helpful? Give feedback.
-
I think splitting the I agree that we should check for valid My gut feel is that close inspection of those |
Beta Was this translation helpful? Give feedback.
-
I made the necessary changes to For some of the functions that call these, we can probably assume that when they call one of these functions they won't get an object back, but these assumptions aren't enforced by the underlying types. If we want to merge more of these functions, we need to either:
|
Beta Was this translation helpful? Give feedback.
-
As mentioned in #3868, once we move the Julia renderer over from
OOProg
toProcProg
, we lose the ability to generate Julia code becausedrasil-code
only knows how to generateOOProg
code. We need to enabledrasil-code
to generate procedural programs.I don't think the 'main part' of the implementation will be too bad - a lot of things in
drasil-code
that currently requireOOProg
can be relaxed toSharedProg
, which means that all renderers can use them.I have two things where I'm less sure, though:
OOProg
andSharedProg
? The example I'm currently looking at isgenCode
, the root function for generating code. Specifically this part:Drasil/code/drasil-gen/lib/Language/Drasil/Generate.hs
Lines 151 to 158 in c86e117
This works in the
main
branch becauseunJLC
is of the same type asunJC
and the rest, but in Switched the Julia renderer toProcProg
#3868 and beyond it's of a different type.Either
? This would allow us to pass itRight JC
orLeft JLC
, and let it go from there.Choices
that work with Julia?Choices
before starting, or by somehow constrainingChoices
to only allow certain options for certain types of output languages.Edit: I just realized that at least for this function, we don't need
Either
. We can split up thegenCall
function intogenCallOO
andgenCallProc
to handle the input type signatures, and do the same forgenerateCode
. SincegenCall
andgenerateCode
simply returnIO ()
, we don't need to worry about differences in output types.Beta Was this translation helpful? Give feedback.
All reactions