Doc update for hz_sophia and hz_aaci and some minor fixes #30

Merged
zxq9 merged 9 commits from spivee/docs into master 2026-05-26 09:44:53 +09:00
Owner
No description provided.
zxq9 added 9 commits 2026-05-26 09:41:40 +09:00
A while ago I tried dialyzer and discovered that actually a lot of the AACI generation process
never fails, and whatever the one failure was that was possible, I think I decided was unnecessary,
and made that produce {ok, unknown_type} instead. I then set the types of these functions to be
{ok, Result} | {error, none()}, since there were in fact no errors, but dialyzer still spewed out
warnings for all the case blocks that redundantly check for these impossible error conditions.

Anyway now that is fixed! The behavior and external interface are all the same still, there are just fewer warnings
now.

Also added specs for a couple more internal functions, just because.
So noperhaps realized that actually none of it should fail. I never went in and
removed all the {ok, _} wrappers, but I did at least type the functions with the correct error list
Once the types were documented, the functions were easy to document. Just say "see erlang_expr/0 for details" over and over! ;p
This one was much simpler to do than hz_aaci, since it doesn't introduce any new types.

I could have made note of some of the conventions, where a type can be represented in multiple
ways in Sophia syntax, or where these functions are actually more lenient than the compiler, but
it isn't as easy to break those notes up from the basic function usage, like it was in hz_aaci,
where those aforementioned new types are used.
zxq9 merged commit 3585dbe534 into master 2026-05-26 09:44:53 +09:00
zxq9 deleted branch spivee/docs 2026-05-26 09:44:54 +09:00
Sign in to join this conversation.