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

clashi doesn't load plugins correctly #668

Closed
leonschoorl opened this issue Jul 12, 2019 · 2 comments · Fixed by #687
Closed

clashi doesn't load plugins correctly #668

leonschoorl opened this issue Jul 12, 2019 · 2 comments · Fixed by #687

Comments

@leonschoorl
Copy link
Member

leonschoorl commented Jul 12, 2019

clashi should load and use our typechecker plugins automatically, but:

Clash.Prelude> pack (1 :: Index 3)

<interactive>:3:1: error:
    • No instance for (KnownNat (CLog 2 3))

(This should be solved by the combination of GHC.TypeLits.Extra.Solver and GHC.TypeLits.KnownNat.Solver)

Also clashi seems to ignore the -fplugin option:

$ cabal run -- clashi  -fplugin=PluginMissing
Clashi, version 0.9999 (using clash-lib, version 0.9999):
http://www.clash-lang.org/  :? for help
Clash.Prelude>

But do the same with ghci and it will try to load the plugin and error out:

$ ghci  -fplugin=PluginMissing
GHCi, version 8.6.5: http://www.haskell.org/ghc/  :? for help
<command line>: Could not find module ‘PluginMissing’
Use -v to see a list of the files searched for.
@leonschoorl
Copy link
Member Author

leonschoorl commented Jul 12, 2019

I think clashi is ignoring plugins in its interactive session, and only uses them in the session used on files.
Because if we give clashi an input file it will complain about the MissingPlugin:

$ cabal run -- clashi  -fplugin=PluginMissing Pack.hs
...
Could not find module ‘PluginMissing’
Use -v to see a list of the files searched for.

@leonschoorl
Copy link
Member Author

This is only an problem with GHC-8.6.
We're missing https://gitlab.haskell.org/ghc/ghc/commit/599eaada382d04722219bfc319bde94591be3fb1

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

Successfully merging a pull request may close this issue.

1 participant