 
   test "@type with a keyword map" do
     module = test_module do
-      @type mytype :: %{hello: :world}
-    end
-
-    assert [type: {:mytype,
+      @type my_type :: %{hello: :world}
+    end
+
+    assert [type: {:my_type,
              {:type, _, :map, [
                {:type, _, :map_field_exact, [{:atom, _, :hello}, {:atom, _, :world}]}
              ]},

      (quote do: @type a_map() :: map()),
      (quote do: @type empty_map() :: %{}),
      (quote do: @type my_map() :: %{hello: :world}),
      (quote do: @type my_req_map() :: %{required(0) => :atom}),
      (quote do: @type my_opt_map() :: %{optional(0) => :atom}),
      (quote do: @type my_struct() :: %Kernel.TypespecTest{hello: :world}),
      (quote do: @type list1() :: list()),
      (quote do: @type list2() :: [0]),


  test "@type with an atom" do
    module = test_module do
      @type my_type :: :foo
    end

    assert [type: {:my_type, {:atom, _, :foo}, []}] =
           types(module)
  end

  test "@type with an atom alias" do
    module = test_module do
      @type my_type :: Atom
    end

    assert [type: {:my_type, {:atom, _, Atom}, []}] =
           types(module)
  end

