Closed jrbeaumont closed 7 years ago
@snowleopard I have made the changes to the test file.
With regards to using a type variable, [a]
. Most of it requires it to be Signal
, as it needs to get information from the Concept
. Are you sure we can use [a]
instead?
@jrbeaumont Let's look at function doTranslate
for example. Can't it have the following type instead?
doTranslate :: (Show a, Ord a) => [a] -> Concept (State a) (Transition a) a -> String
As far as I can see, all we need is to show
and compare
signals?
@snowleopard: OK I just found that as you posted it haha. Changed some things around, seems to work fine. Just going to test it now.
@snowleopard: I have changed the code as needed, and tested it both alone, and in Workcraft, all appears to be working well.
Cleared those up, still working well :) Let me know if you have more suggestions!
@jrbeaumont Great, merged now!
@snowleopard: Thanks!
@snowleopard: I have added some tests, but found some issues along the way.
In order to do the testing, the translation code needs to be installed as part of the cabal build phase, therefore I have refactored some of it into
Tuura.Concept.STG.Translation
. This allows testing to occur on.g
output and arcs of different concepts.First of all, if you think these tests need some changes, please let me know.
Second of all: I have attempted to change the
translate/Main.hs
file, so it uses as much of theTuura.Concept.STG.Translation
as possible. However, testing this produces a seg. fault, and debugging proves it is becauseSignal
is defined in theTranslation
module, not in theMain.hs
file.I have had a go at hiding
Signal
when importingTuura.Concept.STG.Translation
, and redefining it intranslate/Main.hs
, but this provides incompatability issues when attempting to retrieve information on theCircuitConcept
itself.Thus, there is now a lot of repeated code, and changing the actual translation code used from
translate/Main.hs
means that theTransTest.hs
file won't actually correctly test the translation process.Do you have any ideas for this?