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

Filename comparison is too strict. #10

Open
jfdm opened this issue Feb 28, 2017 · 8 comments
Open

Filename comparison is too strict. #10

jfdm opened this issue Feb 28, 2017 · 8 comments

Comments

@jfdm
Copy link
Collaborator

jfdm commented Feb 28, 2017

If the base name of the specified file is not made strictly relative, idrishl can fail.

For example:

  • idrishl Data.Fuel fails
  • idrishl ./Data.Fuel works

I believe the filter predicate used in sortedHighlights in Main.idr is not smart enough to work out that Data.Fuel and ./Data.Fuel are the same file.

@david-christiansen
Copy link
Owner

Yep. There's unfortunately no good Idris library for normalizing file names right now, so this is a bit inconvenient.

@david-christiansen
Copy link
Owner

Though it looks like you're adding a bit of a hack that fixes it for some cases, at least :-)

@david-christiansen
Copy link
Owner

I don't think that this is fixed yet, because it really should use a filename normalization relative to the current working directory. But the situation is better.

@jfdm
Copy link
Collaborator Author

jfdm commented Feb 28, 2017

Yeah, I know its a hack, but without a good file path library, it is the best I could think off.

@david-christiansen
Copy link
Owner

Definitely an improvement for everyday usability! When I was doing the code samples for my dissertation, I just had scripts that set everything up right. Which is obviously ridiculous.

@jfdm
Copy link
Collaborator Author

jfdm commented Feb 28, 2017

at least with this fix, my next paper will more than likely have semantic highlighting!

@david-christiansen
Copy link
Owner

Nice!

@david-christiansen
Copy link
Owner

It would also be nice to get .lidr support working in it.

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

2 participants