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

No uninstantiation_error(Stream) in open/[3, 4] #339

Open
ichiban opened this issue Oct 29, 2024 · 0 comments
Open

No uninstantiation_error(Stream) in open/[3, 4] #339

ichiban opened this issue Oct 29, 2024 · 0 comments

Comments

@ichiban
Copy link
Owner

ichiban commented Oct 29, 2024

It throws instantiation_error instead of uninstantiation_error(foo).

$ $(go env GOPATH)/bin/1pl
Top level for ichiban/prolog v1.2.1
This is for testing purposes only!
See https://github.com/ichiban/prolog for more details.
Type Ctrl-C or 'halt.' to exit.
?- open('/dev/urandom', read, S).
S = <stream>(0x14000106f00).
?- open('/dev/urandom', read, foo).
2024/10/29 11:30:41 error(instantiation_error,open/4)
	if _, ok := env.Resolve(stream).(Variable); !ok {
		return Error(InstantiationError(env))
	}

https://github.com/ichiban/prolog/blob/main/engine/builtin.go#L1260-L1262

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

1 participant