diff --git a/elm-export.cabal b/elm-export.cabal
--- a/elm-export.cabal
+++ b/elm-export.cabal
@@ -1,5 +1,5 @@
 name: elm-export
-version: 0.5.0.0
+version: 0.5.0.1
 cabal-version: >=1.10
 build-type: Simple
 license: OtherLicense
@@ -13,6 +13,8 @@
     Generate Elm source code automatically from Haskell types. Using GHC.Generics, we can automatically derive Elm type declarations, and Aeson-compatible JSON decoders & encoders.
 category: Web
 author: Kris Jenkins
+extra-source-files:
+    test/*.elm
 
 source-repository head
     type: git
@@ -49,7 +51,7 @@
         base >=4.8.2.0 && <4.9,
         bytestring >=0.10.6.0 && <0.11,
         containers >=0.5.6.2 && <0.6,
-        elm-export >=0.5.0.0 && <0.6,
+        elm-export >=0.5.0.1 && <0.6,
         hspec >=2.2.3 && <2.3,
         hspec-core >=2.2.3 && <2.3,
         quickcheck-instances >=0.3.12 && <0.4,
diff --git a/src/Elm/Type.hs b/src/Elm/Type.hs
--- a/src/Elm/Type.hs
+++ b/src/Elm/Type.hs
@@ -8,6 +8,7 @@
 
 module Elm.Type where
 
+import           Data.Int     (Int16, Int32, Int64, Int8)
 import           Data.Map
 import           Data.Proxy
 import           Data.Text
@@ -147,6 +148,18 @@
 
 instance ElmType Double where
     toElmType _ = ElmPrimitive EFloat
+
+instance ElmType Int8 where
+    toElmType _ = Primitive "Int"
+
+instance ElmType Int16 where
+    toElmType _ = Primitive "Int"
+
+instance ElmType Int32 where
+    toElmType _ = Primitive "Int"
+
+instance ElmType Int64 where
+    toElmType _ = Primitive "Int"
 
 instance (ElmType a, ElmType b) =>
          ElmType (a, b) where
diff --git a/test/CommentDecoder.elm b/test/CommentDecoder.elm
new file mode 100644
--- /dev/null
+++ b/test/CommentDecoder.elm
@@ -0,0 +1,18 @@
+module CommentDecoder exposing (..)
+
+import CommentType exposing (..)
+import Date
+import Dict
+import Json.Decode exposing (..)
+import Json.Decode.Pipeline exposing (..)
+
+
+decodeComment : Decoder Comment
+decodeComment =
+    decode Comment
+        |> required "postId" int
+        |> required "text" string
+        |> required "mainCategories" (tuple2 (,) string string)
+        |> required "published" bool
+        |> required "created" (customDecoder string Date.fromString)
+        |> required "tags" (map Dict.fromList (list (tuple2 (,) string int)))
diff --git a/test/CommentDecoderWithOptions.elm b/test/CommentDecoderWithOptions.elm
new file mode 100644
--- /dev/null
+++ b/test/CommentDecoderWithOptions.elm
@@ -0,0 +1,18 @@
+module CommentDecoderWithOptions exposing (..)
+
+import CommentType exposing (..)
+import Date
+import Dict
+import Json.Decode exposing (..)
+import Json.Decode.Pipeline exposing (..)
+
+
+decodeComment : Decoder Comment
+decodeComment =
+    decode Comment
+        |> required "commentPostId" int
+        |> required "commentText" string
+        |> required "commentMainCategories" (tuple2 (,) string string)
+        |> required "commentPublished" bool
+        |> required "commentCreated" (customDecoder string Date.fromString)
+        |> required "commentTags" (map Dict.fromList (list (tuple2 (,) string int)))
diff --git a/test/CommentEncoder.elm b/test/CommentEncoder.elm
new file mode 100644
--- /dev/null
+++ b/test/CommentEncoder.elm
@@ -0,0 +1,18 @@
+module CommentEncoder exposing (..)
+
+import CommentType exposing (..)
+import Exts.Date exposing (..)
+import Exts.Json.Encode exposing (..)
+import Json.Encode
+
+
+encodeComment : Comment -> Json.Encode.Value
+encodeComment x =
+    Json.Encode.object
+        [ ( "postId", Json.Encode.int x.postId )
+        , ( "text", Json.Encode.string x.text )
+        , ( "mainCategories", (tuple2 Json.Encode.string Json.Encode.string) x.mainCategories )
+        , ( "published", Json.Encode.bool x.published )
+        , ( "created", (Json.Encode.string << toISOString) x.created )
+        , ( "tags", (dict Json.Encode.string Json.Encode.int) x.tags )
+        ]
diff --git a/test/CommentEncoderWithOptions.elm b/test/CommentEncoderWithOptions.elm
new file mode 100644
--- /dev/null
+++ b/test/CommentEncoderWithOptions.elm
@@ -0,0 +1,18 @@
+module CommentEncoderWithOptions exposing (..)
+
+import CommentType exposing (..)
+import Exts.Date exposing (..)
+import Exts.Json.Encode exposing (..)
+import Json.Encode
+
+
+encodeComment : Comment -> Json.Encode.Value
+encodeComment x =
+    Json.Encode.object
+        [ ( "commentPostId", Json.Encode.int x.postId )
+        , ( "commentText", Json.Encode.string x.text )
+        , ( "commentMainCategories", (tuple2 Json.Encode.string Json.Encode.string) x.mainCategories )
+        , ( "commentPublished", Json.Encode.bool x.published )
+        , ( "commentCreated", (Json.Encode.string << toISOString) x.created )
+        , ( "commentTags", (dict Json.Encode.string Json.Encode.int) x.tags )
+        ]
diff --git a/test/CommentType.elm b/test/CommentType.elm
new file mode 100644
--- /dev/null
+++ b/test/CommentType.elm
@@ -0,0 +1,14 @@
+module CommentType exposing (..)
+
+import Date exposing (Date)
+import Dict exposing (Dict)
+
+
+type alias Comment =
+    { postId : Int
+    , text : String
+    , mainCategories : ( String, String )
+    , published : Bool
+    , created : Date
+    , tags : Dict (String) (Int)
+    }
diff --git a/test/CommentTypeWithOptions.elm b/test/CommentTypeWithOptions.elm
new file mode 100644
--- /dev/null
+++ b/test/CommentTypeWithOptions.elm
@@ -0,0 +1,14 @@
+module CommentTypeWithOptions exposing (..)
+
+import Date exposing (Date)
+import Dict exposing (Dict)
+
+
+type alias Comment =
+    { commentPostId : Int
+    , commentText : String
+    , commentMainCategories : ( String, String )
+    , commentPublished : Bool
+    , commentCreated : Date
+    , commentTags : Dict (String) (Int)
+    }
diff --git a/test/FavoritePlacesType.elm b/test/FavoritePlacesType.elm
new file mode 100644
--- /dev/null
+++ b/test/FavoritePlacesType.elm
@@ -0,0 +1,8 @@
+module FavoritePlacesType exposing (..)
+
+import PositionType exposing (..)
+
+
+type alias FavoritePlaces =
+    { positionsByUser : Dict (String) (List (Position))
+    }
diff --git a/test/PositionType.elm b/test/PositionType.elm
new file mode 100644
--- /dev/null
+++ b/test/PositionType.elm
@@ -0,0 +1,7 @@
+module PositionType exposing (..)
+
+
+type Position
+    = Beginning
+    | Middle
+    | End
diff --git a/test/PostDecoder.elm b/test/PostDecoder.elm
new file mode 100644
--- /dev/null
+++ b/test/PostDecoder.elm
@@ -0,0 +1,17 @@
+module PostDecoder exposing (..)
+
+import CommentDecoder exposing (..)
+import Json.Decode exposing (..)
+import Json.Decode.Pipeline exposing (..)
+import PostType exposing (..)
+
+
+decodePost : Decoder Post
+decodePost =
+    decode Post
+        |> required "id" int
+        |> required "name" string
+        |> required "age" (maybe float)
+        |> required "comments" (list decodeComment)
+        |> required "promoted" (maybe decodeComment)
+        |> required "author" (maybe string)
diff --git a/test/PostDecoderWithOptions.elm b/test/PostDecoderWithOptions.elm
new file mode 100644
--- /dev/null
+++ b/test/PostDecoderWithOptions.elm
@@ -0,0 +1,17 @@
+module PostDecoderWithOptions exposing (..)
+
+import CommentDecoder exposing (..)
+import Json.Decode exposing (..)
+import Json.Decode.Pipeline exposing (..)
+import PostType exposing (..)
+
+
+decodePost : Decoder Post
+decodePost =
+    decode Post
+        |> required "postId" int
+        |> required "postName" string
+        |> required "postAge" (maybe float)
+        |> required "postComments" (list decodeComment)
+        |> required "postPromoted" (maybe decodeComment)
+        |> required "postAuthor" (maybe string)
diff --git a/test/PostEncoder.elm b/test/PostEncoder.elm
new file mode 100644
--- /dev/null
+++ b/test/PostEncoder.elm
@@ -0,0 +1,17 @@
+module PostEncoder exposing (..)
+
+import CommentEncoder exposing (..)
+import Json.Encode
+import PostType exposing (..)
+
+
+encodePost : Post -> Json.Encode.Value
+encodePost x =
+    Json.Encode.object
+        [ ( "id", Json.Encode.int x.id )
+        , ( "name", Json.Encode.string x.name )
+        , ( "age", (Maybe.withDefault Json.Encode.null << Maybe.map Json.Encode.float) x.age )
+        , ( "comments", (Json.Encode.list << List.map encodeComment) x.comments )
+        , ( "promoted", (Maybe.withDefault Json.Encode.null << Maybe.map encodeComment) x.promoted )
+        , ( "author", (Maybe.withDefault Json.Encode.null << Maybe.map Json.Encode.string) x.author )
+        ]
diff --git a/test/PostEncoderWithOptions.elm b/test/PostEncoderWithOptions.elm
new file mode 100644
--- /dev/null
+++ b/test/PostEncoderWithOptions.elm
@@ -0,0 +1,17 @@
+module PostEncoderWithOptions exposing (..)
+
+import CommentEncoder exposing (..)
+import Json.Encode
+import PostType exposing (..)
+
+
+encodePost : Post -> Json.Encode.Value
+encodePost x =
+    Json.Encode.object
+        [ ( "postId", Json.Encode.int x.id )
+        , ( "postName", Json.Encode.string x.name )
+        , ( "postAge", (Maybe.withDefault Json.Encode.null << Maybe.map Json.Encode.float) x.age )
+        , ( "postComments", (Json.Encode.list << List.map encodeComment) x.comments )
+        , ( "postPromoted", (Maybe.withDefault Json.Encode.null << Maybe.map encodeComment) x.promoted )
+        , ( "postAuthor", (Maybe.withDefault Json.Encode.null << Maybe.map Json.Encode.string) x.author )
+        ]
diff --git a/test/PostType.elm b/test/PostType.elm
new file mode 100644
--- /dev/null
+++ b/test/PostType.elm
@@ -0,0 +1,13 @@
+module PostType exposing (..)
+
+import CommentType exposing (..)
+
+
+type alias Post =
+    { id : Int
+    , name : String
+    , age : Maybe (Float)
+    , comments : List (Comment)
+    , promoted : Maybe (Comment)
+    , author : Maybe (String)
+    }
diff --git a/test/PostTypeWithOptions.elm b/test/PostTypeWithOptions.elm
new file mode 100644
--- /dev/null
+++ b/test/PostTypeWithOptions.elm
@@ -0,0 +1,13 @@
+module PostTypeWithOptions exposing (..)
+
+import CommentType exposing (..)
+
+
+type alias Post =
+    { postId : Int
+    , postName : String
+    , postAge : Maybe (Float)
+    , postComments : List (Comment)
+    , postPromoted : Maybe (Comment)
+    , postAuthor : Maybe (String)
+    }
diff --git a/test/TimingType.elm b/test/TimingType.elm
new file mode 100644
--- /dev/null
+++ b/test/TimingType.elm
@@ -0,0 +1,7 @@
+module TimingType exposing (..)
+
+
+type Timing
+    = Start
+    | Continue Float
+    | Stop
diff --git a/test/UselessType.elm b/test/UselessType.elm
new file mode 100644
--- /dev/null
+++ b/test/UselessType.elm
@@ -0,0 +1,5 @@
+module UselessType exposing (..)
+
+
+type Useless
+    = Useless ()
