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