     defstruct line: nil, name: nil, value: nil, type: nil
 
     @spec new(charlist, Literals.t(), Types.t()) :: t
-    def new(name, val, type) do
-      %Constant{name: atomify(name), value: cast(type, val), type: type}
+    def new(name, value, type) do
+      %Constant{name: atomify(name), value: cast(type, value), type: type}
     end
   end
 
   defmodule TEnum do
-    @moduledoc false
-    @type enum_value :: bitstring | integer
+    @moduledoc """
+    An enumerated type with named values.
+    """
+    @type value :: integer()
     @type t :: %TEnum{
             line: Thrift.Parser.line(),
             annotations: Thrift.Parser.annotations(),
             name: atom,
-            values: [{atom, enum_value}]
+            values: [{atom, value}, ...]
           }
 
     @enforce_keys [:name, :values]
     defstruct line: nil, annotations: %{}, name: nil, values: []
 
-    @spec new(charlist, %{charlist => enum_value}) :: t
+    @spec new(charlist, %{required(charlist) => value}) :: t
     def new(name, values) do
       {_, values} =
         Enum.reduce(values, {0, []}, fn

  - `Thrift.AST.Include`
  - `Thrift.AST.Namespace`

  """

  import Thrift.Parser.Conversions

  end

  defmodule Constant do
    @moduledoc """
    An constant value definition.
    """
    @type t :: %Constant{
            line: Thrift.Parser.line(),
            name: atom,
