-module(castle_rights). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([to_bool/1]). -export_type([castle_rights/0]). -type castle_rights() :: yes | {no, integer()}. -spec to_bool(castle_rights()) -> boolean(). to_bool(Castle_rights) -> case Castle_rights of yes -> true; {no, _} -> false end.