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

make FS predicates compatible with Scryer library(files) #1

Closed
guregu opened this issue Mar 26, 2022 · 1 comment
Closed

make FS predicates compatible with Scryer library(files) #1

guregu opened this issue Mar 26, 2022 · 1 comment
Labels
files filesystem predicates

Comments

@guregu
Copy link
Owner

guregu commented Mar 26, 2022

See: 6a491d2#r69581698

Scryer's library(files) uses strings instead of atoms, let's try to match compatibility as close as possible.

I'm not sure if I should change how list handling in consult/1 works 🤔

It might be handy to have consult/1 handle lists as strings, then you could write something like directory_files(some_dir, Files), maplist(consult, Files). However, taking a peek at Scryer it seems to not accept lists at all. I would imagine that's the standard. ichiban/prolog accepts lists like SWI, so it could be confusing to provide a replacement that treats lists differently. Hmm..

@guregu guregu added the files filesystem predicates label Mar 26, 2022
@guregu
Copy link
Owner Author

guregu commented Mar 26, 2022

This change just landed in v0.0.5. More filesystem predicates coming soon!

I decided to keep consult/1 as-is for now, but opinions are welcome.

@guregu guregu closed this as completed Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
files filesystem predicates
Projects
None yet
Development

No branches or pull requests

1 participant