anchor.diff:      [{record_field,Line,{atom,La,A},Val1}|record_defs(Is)];
   record_defs([{record_field,Line,{atom,La,A}}|Is]) ->
       [{record_field,Line,{atom,La,A}}|record_defs(Is)];
  +record_defs([{typed_record_field,{record_field,Line,{atom,La,A},Val0},Type}|
  +             Is]) ->
  +    Val1 = expr(Val0),
  +    Type1 = type(Type),
  +    [{typed_record_field,{record_field,Line,{atom,La,A},Val1},Type1}|
  +     record_defs(Is)];
  +record_defs([{typed_record_field,{record_field,Line,{atom,La,A}},Type}|Is]) ->
  +    Type1 = type(Type),
  +    [{typed_record_field,{record_field,Line,{atom,La,A}},Type1}|
  +     record_defs(Is)];
   record_defs([]) -> [].
   
   %% -type function(atom(), integer(), [Clause]) -> {atom(),integer(),[Clause]}.
  
positive.code: farity_list([{Name,Arity}|Fas]) ->
      [{Name,Arity}|farity_list(Fas)];
  farity_list([]) -> [].
  
  %% -type record_defs([RecDef]) -> [RecDef].
  %%  N.B. Field names are full expressions here but only atoms are allowed
  
negative.code:     C1 = clause(C0),
      [C1|fun_clauses(Cs)];
  fun_clauses([]) -> [].
  
  function_type_list([{type,Line,bounded_fun,[Ft,Fc]}|Fts]) ->
      Ft1 = function_type(Ft),
      Fc1 = function_constraint(Fc),
      [{type,Line,bounded_fun,[Ft1,Fc1]}|function_type_list(Fts)];
  function_type_list([Ft|Fts]) ->
      [function_type(Ft)|function_type_list(Fts)];
  function_type_list([]) -> [].
  
  function_type({type,Line,'fun',[{type,Lt,product,As},B]}) ->
      As1 = type_list(As),
      B1 = type(B),
      {type,Line,'fun',[{type,Lt,product,As1},B1]}.
  
  function_constraint([C|Cs]) ->
      C1 = constraint(C),
      [C1|function_constraint(Cs)];
  function_constraint([]) -> [].
  
  constraint({type,Line,constraint,[{atom,L,A},[V,T]]}) ->
      V1 = type(V),
      T1 = type(T),
      {type,Line,constraint,[{atom,L,A},[V1,T1]]}.
  
  type({ann_type,Line,[{var,Lv,V},T]}) ->
      T1 = type(T),
      {ann_type,Line,[{var,Lv,V},T1]};
  type({atom,Line,A}) ->
      {atom,Line,A};
  type({integer,Line,I}) ->
      {integer,Line,I};
  type({op,Line,Op,T}) ->
      T1 = type(T),
      {op,Line,Op,T1};
  type({op,Line,Op,L,R}) ->
      L1 = type(L),
      R1 = type(R),
      {op,Line,Op,L1,R1};
  type({type,Line,binary,[M,N]}) ->
      M1 = type(M),
      N1 = type(N),
      {type,Line,binary,[M1,N1]};
  type({type,Line,'fun',[]}) ->
      {type,Line,'fun',[]};
  type({type,Line,'fun',[{type,Lt,any},B]}) ->
      B1 = type(B),
      {type,Line,'fun',[{type,Lt,any},B1]};
  type({type,Line,range,[L,H]}) ->
      L1 = type(L),
      H1 = type(H),
      {type,Line,range,[L1,H1]};
  type({type,Line,map,any}) ->
      {type,Line,map,any};
  type({type,Line,map,Ps}) ->
      Ps1 = map_pair_types(Ps),
      {type,Line,map,Ps1};
  type({type,Line,record,[{atom,La,N}|Fs]}) ->
      Fs1 = field_types(Fs),
      {type,Line,record,[{atom,La,N}|Fs1]};
  type({remote_type,Line,[{atom,Lm,M},{atom,Ln,N},As]}) ->
      As1 = type_list(As),
      {remote_type,Line,[{atom,Lm,M},{atom,Ln,N},As1]};
  type({type,Line,tuple,any}) ->
      {type,Line,tuple,any};
  type({type,Line,tuple,Ts}) ->
      Ts1 = type_list(Ts),
      {type,Line,tuple,Ts1};
  type({type,Line,union,Ts}) ->
      Ts1 = type_list(Ts),
      {type,Line,union,Ts1};
  type({var,Line,V}) ->
      {var,Line,V};
  type({user_type,Line,N,As}) ->
      As1 = type_list(As),
      {user_type,Line,N,As1};
  type({type,Line,N,As}) ->
      As1 = type_list(As),
      {type,Line,N,As1}.
  
  map_pair_types([{type,Line,map_field_assoc,[K,V]}|Ps]) ->
      K1 = type(K),
      V1 = type(V),
      [{type,Line,map_field_assoc,[K1,V1]}|map_pair_types(Ps)];
  map_pair_types([]) -> [].
  
  field_types([{type,Line,field_type,[{atom,La,A},T]}|Fs]) ->
      T1 = type(T),
      [{type,Line,field_type,[{atom,La,A},T1]}|field_types(Fs)];
  field_types([]) -> [].
  
  type_list([T|Ts]) ->
      T1 = type(T),
      [T1|type_list(Ts)];
  type_list([]) -> [].
  