anchor.diff:           from_loadable_module/1,
   
            name/1,
  -         abst/1, abst/2,
  -         beam_file/1, beam_file/2,
  -         source_file/1, source_file/2,
  +         abst/1,
  +         beam_file/1,
  +         source_file/1,
            attribute/2]).
   
   -export_type([t/0]).
   
  --record(docsh_beam, {name, abst, beam_file, source_file}).
  +-record(docsh_beam, {name, beam_file, source_file}).
   
   -opaque t() :: #docsh_beam{name :: module(),
  -                           %% Abst chunk which may or may not be present in a loaded module.
  -                           abst :: [erl_parse:abstract_form()] | false,
                              %% `beam_file` has to be defined and is a file name.
                              %% TODO: Support dynamically compiled or network-loaded modules later.
                              beam_file :: file:filename(),
  
positive.code:             {error, {no_beam_file, E}};
          BEAMFile ->
              {ok, #docsh_beam{name = Mod,
                               abst = debug_info(BEAMFile),
                               beam_file = BEAMFile,
                               source_file = bind(docsh_lib:get_source_file(BEAMFile))}}
      end.
  
negative.code: -spec from_beam_file(file:filename()) -> {ok, t()} | {error, any()}.
  from_beam_file(BEAMFile) ->
      {ok, #docsh_beam{name = beam_name(BEAMFile),
                       beam_file = BEAMFile,
                       source_file = bind(docsh_lib:get_source_file(BEAMFile))}}.
  
  name(B) -> B#docsh_beam.name.
  
  abst(B) ->
      debug_info(beam_file(B)).
  
  beam_file(B) -> B#docsh_beam.beam_file.
  
  source_file(B) -> B#docsh_beam.source_file.
  
  attribute(B, Name) ->
      docsh_lib:get(Name, (B#docsh_beam.name):module_info(attributes)).
  