-
Notifications
You must be signed in to change notification settings - Fork 27
Cannot find a physical path bound to logical path matching suffix GHC. #144
Comments
It seems that the first problem was caused by either not having I'm not sure what caused the second problem though. The error message seems to suggest that your |
Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc.
As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google!
Interestingly, if I try on the command line:
coqc -Q . "" "base/GHC/Base.v"
I get the error:
Error: Cannot find a physical path bound to logical path matching suffix GHC.
So then, I try:
coqc -Q src GHC "base/GHC/Base.v"
And I get the error:
Error: Unable to locate library GHC.Prim.
But it is there, in the same directory! All very mysterious.
Cheers,
Christina
…________________________________
From: Li Yao <[email protected]>
Sent: 18 February 2020 18:44
To: antalsz/hs-to-coq <[email protected]>
Cc: Christina Burge <[email protected]>; Author <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?)
I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#144?email_source=notifications&email_token=AJ6CBGJDOS2NOPAMVQARLOTRDQUBTA5CNFSM4KXFN76KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMDLDSQ#issuecomment-587641290>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ6CBGMDI2LTTMXVXWRWM6LRDQUBTANCNFSM4KXFN76A>.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-Q . ""
GHC/Wf.v GHC/Skip.v GHC/DeferredFix.v GHC/DeferredFixImpl.v GHC/Num.v GHC/Char.v GHC/Real.v GHC/Enum.v Data/Bits.v GHC/Prim.v GHC/Types.v GHC/Tuple.v Data/Type/Equality.v GHC/Err.v GHC/Nat.v GHC/Unicode.v Prelude.v GHC/Base.v Data/Maybe.v GHC/List.v Data/List.v Data/OldList.v Data/Bool.v Data/Tuple.v Data/Void.v Data/Function.v Data/Ord.v Data/Functor.v Data/Either.v Data/Proxy.v Control/Monad.v Data/Monoid.v Data/Functor/Utils.v Data/Traversable.v Control/Monad/Fail.v Data/Foldable.v Control/Arrow.v Data/Functor/Identity.v Data/Functor/Const.v Control/Applicative.v Data/Functor/Classes.v Control/Category.v Data/Bifunctor.v Data/List/NonEmpty.v Data/Semigroup.v Data/Functor/Compose.v Data/Functor/Product.v Data/Functor/Sum.v Data/Bifoldable.v Data/Bitraversable.v Control/Monad/Zip.v Data/SemigroupInternal.v
|
Aha! If I manually compile everything in the base/GHC directory, using (e.g):
coqc -Q . GHC Base.v
Then I can return to the top level and do make -C base successfully.
I now have a new error, when I do make -C base-thy:
COQC Data/Bits/Popcount.v
File "./Data/Bits/Popcount.v", line 20, characters 33-41:
Error: The reference Is_power was not found in the current environment.
I'm sure I'll get to the bottom of it eventually!
…________________________________
From: Christina Burge <[email protected]>
Sent: 19 February 2020 09:29
To: antalsz/hs-to-coq <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc.
As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google!
Interestingly, if I try on the command line:
coqc -Q . "" "base/GHC/Base.v"
I get the error:
Error: Cannot find a physical path bound to logical path matching suffix GHC.
So then, I try:
coqc -Q src GHC "base/GHC/Base.v"
And I get the error:
Error: Unable to locate library GHC.Prim.
But it is there, in the same directory! All very mysterious.
Cheers,
Christina
________________________________
From: Li Yao <[email protected]>
Sent: 18 February 2020 18:44
To: antalsz/hs-to-coq <[email protected]>
Cc: Christina Burge <[email protected]>; Author <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?)
I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#144?email_source=notifications&email_token=AJ6CBGJDOS2NOPAMVQARLOTRDQUBTA5CNFSM4KXFN76KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMDLDSQ#issuecomment-587641290>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ6CBGMDI2LTTMXVXWRWM6LRDQUBTANCNFSM4KXFN76A>.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
I should add, this is all on my linux machine, I'm currently revisiting the Mac version to see if I get any further there.
…________________________________
From: Christina Burge <[email protected]>
Sent: 19 February 2020 10:00
To: antalsz/hs-to-coq <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
Aha! If I manually compile everything in the base/GHC directory, using (e.g):
coqc -Q . GHC Base.v
Then I can return to the top level and do make -C base successfully.
I now have a new error, when I do make -C base-thy:
COQC Data/Bits/Popcount.v
File "./Data/Bits/Popcount.v", line 20, characters 33-41:
Error: The reference Is_power was not found in the current environment.
I'm sure I'll get to the bottom of it eventually!
________________________________
From: Christina Burge <[email protected]>
Sent: 19 February 2020 09:29
To: antalsz/hs-to-coq <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc.
As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google!
Interestingly, if I try on the command line:
coqc -Q . "" "base/GHC/Base.v"
I get the error:
Error: Cannot find a physical path bound to logical path matching suffix GHC.
So then, I try:
coqc -Q src GHC "base/GHC/Base.v"
And I get the error:
Error: Unable to locate library GHC.Prim.
But it is there, in the same directory! All very mysterious.
Cheers,
Christina
________________________________
From: Li Yao <[email protected]>
Sent: 18 February 2020 18:44
To: antalsz/hs-to-coq <[email protected]>
Cc: Christina Burge <[email protected]>; Author <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?)
I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#144?email_source=notifications&email_token=AJ6CBGJDOS2NOPAMVQARLOTRDQUBTA5CNFSM4KXFN76KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMDLDSQ#issuecomment-587641290>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ6CBGMDI2LTTMXVXWRWM6LRDQUBTANCNFSM4KXFN76A>.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
Same error on Mac.
…________________________________
From: Christina Burge <[email protected]>
Sent: 19 February 2020 10:09
To: antalsz/hs-to-coq <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
I should add, this is all on my linux machine, I'm currently revisiting the Mac version to see if I get any further there.
________________________________
From: Christina Burge <[email protected]>
Sent: 19 February 2020 10:00
To: antalsz/hs-to-coq <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
Aha! If I manually compile everything in the base/GHC directory, using (e.g):
coqc -Q . GHC Base.v
Then I can return to the top level and do make -C base successfully.
I now have a new error, when I do make -C base-thy:
COQC Data/Bits/Popcount.v
File "./Data/Bits/Popcount.v", line 20, characters 33-41:
Error: The reference Is_power was not found in the current environment.
I'm sure I'll get to the bottom of it eventually!
________________________________
From: Christina Burge <[email protected]>
Sent: 19 February 2020 09:29
To: antalsz/hs-to-coq <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
Thanks for your quick reply! I fixed the second error, it was due to having an outdated version of Coqc.
As for the first error, I'm still confused! My _Coqproject file is attached. I think it all looks fine? Not picking up files in the same directory seems to be a common problem for Coqc, from a quick google!
Interestingly, if I try on the command line:
coqc -Q . "" "base/GHC/Base.v"
I get the error:
Error: Cannot find a physical path bound to logical path matching suffix GHC.
So then, I try:
coqc -Q src GHC "base/GHC/Base.v"
And I get the error:
Error: Unable to locate library GHC.Prim.
But it is there, in the same directory! All very mysterious.
Cheers,
Christina
________________________________
From: Li Yao <[email protected]>
Sent: 18 February 2020 18:44
To: antalsz/hs-to-coq <[email protected]>
Cc: Christina Burge <[email protected]>; Author <[email protected]>
Subject: Re: [antalsz/hs-to-coq] Cannot find a physical path bound to logical path matching suffix GHC. (#144)
It seems that the first problem was caused by either not having GHC.Base compiled, or not putting the directory containing GHC.Base in your _CoqProject or Makefile. Would you mind sharing more information about what you did before getting this error information (and probably with your _CoqProject file?)
I'm not sure what caused the second problem though. The error message seems to suggest that your coqc does not take arguments (it mistook --print-version and -Q as file names), but I don't know why this would happen...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#144?email_source=notifications&email_token=AJ6CBGJDOS2NOPAMVQARLOTRDQUBTA5CNFSM4KXFN76KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMDLDSQ#issuecomment-587641290>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJ6CBGMDI2LTTMXVXWRWM6LRDQUBTANCNFSM4KXFN76A>.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
Thanks for the reports. Can you make a listing of all of the commands that you are running and their output so that we can figure out the issue? |
|
I sent this via email but I just realised it never showed up here for some reason! I'm following the instructions at https://hs-to-coq.readthedocs.io/en/latest/installation.html. Everything works fine (now that I manually complied the files in the base/GHC directory, using (e.g): coqc -Q . GHC Base.v) Then I run:
I have |
@christinaburge Hi, the issue seems to arise from a different version of Coq. Currently, |
@christinaburge If you want to keep using Coq 8.11, I have created a branch called |
@christinaburge Hi, I have just updated the |
Thanks for all your help! I'm now using coq-8.10, and everything now compiles, but I get errors with the line Require GHC.Base in my generated code. If I use the Coq IDE, I get:
If I use
|
Sometimes this happens if your coqide uses a different version of Coq than the one you used to compile the base libraries.
You’ll need to supply the command line arguments, such as -Q and -R so that coqtop knows where to find the libraries. The easiest way to do so is to create a _CoqProject file in the same directory as your code. For example, you can take a look at our _CoqProject file for our bag example: https://github.com/antalsz/hs-to-coq/blob/master/examples/bag/_CoqProject. |
Thanks for that! As an experiment, I tried running:
Clearly I'm missing a step! I wonder if the warning I got when I did make -C base is relevant?
|
Hi, the reason that Coq cannot find a "logical path matching suffix GHC" is that it relies on To fix |
I've tried that, and it doesn't work, unfortunately! I've got the entire output of both make -C base and make -C base-thy here, in case you can spot the problem! |
Oh, I've tried adding
This gets rid of the error Perhaps this should be autogenerated along with the rest of the .v file? |
I now get the error:
I'm not sure what I need to have installed to make this work! |
Hi, I think in both cases, the problem is that Coq does not find the corresponding Coq libraries translated from Haskell. Our general solution is specifying that in The second issue you raised should be caused by similar problems, but I cannot be sure why this happened without much information. Are you trying to translate a code of your own? If that's the case, you may want to skip the parts relevant to |
Hi,
I think this time the problem happens on the Haskell side: a Haskell module with called ‘Main’ must have a function called ‘main’, and the type of the function must be 'IO a’ for some type ‘a’. My conjecture is that your Transp.hs file has a ‘module Main where’ at top, which causes this issue. A simple fix is to change the module name to something else (e.g., Transp).
Hs-to-coq relies on ghc to do some pre-processing on Haskell files, so you must be able to compile all your files with ghc before translating them.
PS: If you don’t mind sharing with us what you are exploring with hs-to-coq and your work-in-progress source code, we may be able to help you in more detail.
Best,
Yao
… On Mar 2, 2020, at 5:52 AM, christinaburge ***@***.***> wrote:
Ah, I see. Does this mean that for the moment hs-to-coq does not handle anything that involves operations on lists as I cannot import Data.List?
I am trying to translate the code:
`import Data.List
transp :: Num a => [[a]] -> [[a]]
transp ([]:_) = []
transp a = (map head a) : transp (map tail a)`
And I get the error:
Transp.hs:1:1: error: The IO action ‘main’ is not defined in module ‘Main’
When I try to translate using the command:
stack exec -- hs-to-coq -e /Users/chrbur02/Coq/hs-to-coq/base/edits Transp.hs --iface-dir /Users/chrbur02/Coq/hs-to-coq/base -o .
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#144?email_source=notifications&email_token=AAGPFJX33AK6S6ML3CXQVY3RFOFXHA5CNFSM4KXFN76KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENO3DIQ#issuecomment-593342882>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGPFJSLXCWQISHVJ4MJIRDRFOFXHANCNFSM4KXFN76A>.
|
I get the error:
Cannot find a physical path bound to logical path matching suffix GHC.
This error occurs when attempting to verify the following line of code in the coq IDE on macOS:
Require GHC.Base.
Similarly, when I try to install hs-to-coq on my linux box, when I run
make -C base
I get the error:coqc: --print-version: no such file or directory
COQC GHC/Base.v
coqc: -Q: no such file or directory
Makefile:656: recipe for target 'GHC/Base.vo' failed
It seems like a file (and therefore a step in your instructions) is missing. Thanks for taking a look! :)
The text was updated successfully, but these errors were encountered: