use atom_chars to convert .scryerrc path string to atom
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1200,7 +1200,7 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.127"
|
version = "0.8.128"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"blake2",
|
"blake2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "scryer-prolog"
|
name = "scryer-prolog"
|
||||||
version = "0.8.127"
|
version = "0.8.128"
|
||||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "A modern Prolog implementation written mostly in Rust."
|
description = "A modern Prolog implementation written mostly in Rust."
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ load_scryerrc :-
|
|||||||
( '$home_directory'(HomeDir) ->
|
( '$home_directory'(HomeDir) ->
|
||||||
append(HomeDir, "/.scryerrc", ScryerrcFile),
|
append(HomeDir, "/.scryerrc", ScryerrcFile),
|
||||||
( file_exists(ScryerrcFile) ->
|
( file_exists(ScryerrcFile) ->
|
||||||
% convert ScryerrcFile to atom. somehow, I dunno how.
|
atom_chars(ScryerrcFileAtom, ScryerrcFile),
|
||||||
append(ScryerrcFile, "'.", ScryerrcFile0),
|
|
||||||
read_term_from_chars(['\'' | ScryerrcFile0], ScryerrcFileAtom),
|
|
||||||
catch(use_module(ScryerrcFileAtom), E, print_exception(E))
|
catch(use_module(ScryerrcFileAtom), E, print_exception(E))
|
||||||
; true
|
; true
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user