Compare commits
1 Commits
207b0c0a48
...
cc8af79a97
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cc8af79a97 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,7 +19,6 @@ rebar3.crashdump
|
||||
*.erl~
|
||||
*.aes~
|
||||
aesophia
|
||||
sophia
|
||||
.qcci
|
||||
current_counterexample.eqc
|
||||
test/contracts/test.aes
|
||||
|
@ -52,15 +52,15 @@
|
||||
|
||||
-spec version() -> {ok, binary()} | {error, term()}.
|
||||
version() ->
|
||||
case lists:keyfind(sophia, 1, application:loaded_applications()) of
|
||||
case lists:keyfind(aesophia, 1, application:loaded_applications()) of
|
||||
false ->
|
||||
case application:load(sophia) of
|
||||
case application:load(aesophia) of
|
||||
ok ->
|
||||
case application:get_key(sophia, vsn) of
|
||||
case application:get_key(aesophia, vsn) of
|
||||
{ok, VsnString} ->
|
||||
{ok, list_to_binary(VsnString)};
|
||||
undefined ->
|
||||
{error, failed_to_load_sophia}
|
||||
{error, failed_to_load_aesophia}
|
||||
end;
|
||||
Err = {error, _} ->
|
||||
Err
|
||||
|
@ -748,7 +748,7 @@ read_file(File, Opts) ->
|
||||
Escript = escript:script_name(),
|
||||
{ok, Sections} = escript:extract(Escript, []),
|
||||
Archive = proplists:get_value(archive, Sections),
|
||||
FileName = binary_to_list(filename:join([sophia, priv, stdlib, File])),
|
||||
FileName = binary_to_list(filename:join([aesophia, priv, stdlib, File])),
|
||||
case zip:extract(Archive, [{file_list, [FileName]}, memory]) of
|
||||
{ok, [{_, Src}]} -> {ok, escript, Src};
|
||||
_ -> {error, not_found}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{application, sophia,
|
||||
{application, aesophia,
|
||||
[{description, "Compiler for Aeternity Sophia language"},
|
||||
{vsn, "8.0.1"},
|
||||
{registered, []},
|
@ -11,7 +11,7 @@
|
||||
-export([read_contract/1, contract_path/0]).
|
||||
|
||||
contract_path() ->
|
||||
filename:join(code:lib_dir(sophia, test), "contracts").
|
||||
filename:join(code:lib_dir(aesophia, test), "contracts").
|
||||
|
||||
%% Read a contract file from the test/contracts directory.
|
||||
-spec read_contract(string() | atom()) -> string().
|
||||
|
Loading…
x
Reference in New Issue
Block a user