restore .scryerrc loading

This commit is contained in:
Mark Thom
2021-02-28 11:03:55 -07:00
parent a367812348
commit f935060b2b
4 changed files with 34 additions and 28 deletions

View File

@@ -9,6 +9,13 @@
:- use_module(library('$project_atts')).
:- use_module(library('$atts')).
load_scryerrc :-
( '$home_directory'(HomeDir) ->
atom_concat(HomeDir, '/.scryerrc', ScryerrcFile),
catch(use_module(ScryerrcFile), E, print_exception(E))
; true
).
:- dynamic(argv/1).
'$repl'([_|Args0]) :-
@@ -19,12 +26,14 @@
; asserta('$toplevel':argv([])),
Args = Args0
),
load_scryerrc,
delegate_task(Args, []),
repl.
'$repl'(_) :-
( \+ argv(_) -> asserta('$toplevel':argv([]))
; true
),
load_scryerrc,
repl.
delegate_task([], []).