Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to translate Concepts #97

Open
ARandomOWL opened this issue Sep 28, 2020 · 4 comments
Open

Unable to translate Concepts #97

ARandomOWL opened this issue Sep 28, 2020 · 4 comments

Comments

@ARandomOWL
Copy link
Contributor

(Had to update stack.yaml to be able to build, see #96.)

After
stack setup --no-system-ghc
stack build
stack test passes successfully
stack runghc translate/System.hs -- examples/Celement_with_env_1.hs returns:

translate/System.hs:46:1: error:
    Failed to load interface for ‘Concept’
    Perhaps you meant Convert (needs flag -package-key ghc-8.0.1)
    Use -v to see a list of the files searched for.
@snowleopard
Copy link
Member

I guess Stack has moved on but Plato hasn't been built for a while and needs some maintenance work to make it buildable again. I don't think I have time for this at the moment but I'm happy to review a PR.

@jrbeaumont
Copy link
Member

If stack has updated, it may also have updated how it loads in modules.
If I get a chance soon I'll dust off the old Haskell skills and have a look. Let me know if you have any ideas, or if you want to have a go please feel free!

@jrbeaumont
Copy link
Member

I had a look at this this afternoon, and it's a headscratcher.

Between it being a while since I looked at Plato, and GHC and/or Stack have moved on and simply put, it's not as simple as it once was.

We used to pass the filepath for the concept file to be translated into translate/System.hs and it would import this, and then we'd use the file itself to generate the helper file which it would then run to compile and translate the concepts.

Now it seems, it requires that Concept is imported before we can translate anything, but we need the Signals from Concept in order to translate.

I thought maybe it was no longer getting the input filepath, but it is.

I'm considering a Signal module which has up to 26 signals (A - Z), which all concept files import, and the translate code imports too. I have no idea if it will work, but if it does, it sets the max number of signals until something else is done.

Any ideas on how this may be fixed in a better way?

@snowleopard
Copy link
Member

@jrbeaumont Thanks for looking into this! To be honest, I don't quite understand the problem -- I have very little memory of how things used to work :)

I'm considering a Signal module which has up to 26 signals (A - Z), which all concept files import, and the translate code imports too. I have no idea if it will work, but if it does, it sets the max number of signals until something else is done.

Will this rule out signal names like uv? Sounds pretty limiting.

Could you describe how things used to work and how your solution with the Signal module works in more detail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants