diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright (c) 2015, Jeremy Shaw
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Jeremy Shaw nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/example/BrokenTuple.hs b/example/BrokenTuple.hs
new file mode 100644
--- /dev/null
+++ b/example/BrokenTuple.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = print $ length ('a', 'b')
diff --git a/example/GoodTuple.hs b/example/GoodTuple.hs
new file mode 100644
--- /dev/null
+++ b/example/GoodTuple.hs
@@ -0,0 +1,8 @@
+module Main where
+
+import Safe.Length (safeLength)
+import Data.Proxy (Proxy(..))
+
+main :: IO ()
+main = print $ safeLength (Proxy :: Proxy (Char, Char)) ('a', 'b')
+
diff --git a/example/List.hs b/example/List.hs
new file mode 100644
--- /dev/null
+++ b/example/List.hs
@@ -0,0 +1,7 @@
+module Main where
+
+import Data.Proxy (Proxy(..))
+import Safe.Length (safeLength)
+
+main :: IO ()
+main = print $ safeLength (Proxy :: Proxy [Char]) ['a', 'b']
diff --git a/example/NestedList.hs b/example/NestedList.hs
new file mode 100644
--- /dev/null
+++ b/example/NestedList.hs
@@ -0,0 +1,8 @@
+module Main where
+
+import Data.Proxy (Proxy(..))
+import Safe.Length (safeLength)
+
+main :: IO ()
+main = print $ safeLength (Proxy :: Proxy [[Char]]) (head [['a', 'b', 'c']])
+
diff --git a/example/OldList.hs b/example/OldList.hs
new file mode 100644
--- /dev/null
+++ b/example/OldList.hs
@@ -0,0 +1,8 @@
+module Main where
+
+import GHC.OldList as OldList
+
+main :: IO ()
+main = print $ OldList.length (head [['a','b','c']])
+
+
diff --git a/example/Tuple.hs b/example/Tuple.hs
new file mode 100644
--- /dev/null
+++ b/example/Tuple.hs
@@ -0,0 +1,7 @@
+module Main where
+
+import Data.Proxy (Proxy(..))
+import Safe.Length (safeLength)
+
+main :: IO ()
+main = print $ safeLength (Proxy :: Proxy [Char]) ('a', 'b')
diff --git a/safe-length.cabal b/safe-length.cabal
new file mode 100644
--- /dev/null
+++ b/safe-length.cabal
@@ -0,0 +1,36 @@
+name:                safe-length
+version:             0.1.0.0
+synopsis:            Tired of accidentally calling length on tuples? Relief at last!
+homepage:            http://www.github.com/stepcut/safe-length
+license:             BSD3
+license-file:        LICENSE
+author:              Jeremy Shaw
+maintainer:          jeremy@n-heptane.com
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+data-files:
+    example/BrokenTuple.hs
+    example/GoodTuple.hs
+    example/List.hs
+    example/NestedList.hs
+    example/OldList.hs
+    example/Tuple.hs
+
+library
+  exposed-modules:     Safe.Length
+  build-depends:       base >=4.8 && <4.9
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+test-suite tests
+  type:                exitcode-stdio-1.0
+  main-is:             Main.hs
+  hs-source-dirs:      tests
+  build-depends:       base,
+                       hspec,
+                       hspec-core,
+                       QuickCheck,
+                       safe-length,
+                       should-not-typecheck
+  default-language:    Haskell2010
diff --git a/src/Safe/Length.hs b/src/Safe/Length.hs
new file mode 100644
--- /dev/null
+++ b/src/Safe/Length.hs
@@ -0,0 +1,9 @@
+module Safe.Length where
+
+import Data.Proxy (Proxy(..))
+
+safeLength :: (Foldable f) => Proxy (f a) -> f a -> Int
+safeLength _ f = length f
+
+list :: Proxy [a]
+list = Proxy
diff --git a/tests/Main.hs b/tests/Main.hs
new file mode 100644
--- /dev/null
+++ b/tests/Main.hs
@@ -0,0 +1,37 @@
+{-# OPTIONS_GHC -fdefer-type-errors #-}
+------------------------------------------------------------------------------
+-- |
+-- Module      : Main
+-- Stability   : experimental
+-- Portability : POSIX
+--
+------------------------------------------------------------------------------
+module Main where
+
+import Data.Proxy (Proxy(..))
+import Safe.Length (safeLength)
+import Test.Hspec
+import Test.QuickCheck (property)
+import Test.ShouldNotTypecheck (shouldNotTypecheck)
+
+------------------------------------------------------------------------------
+-- | Testing main
+main :: IO ()
+main = hspec spec
+
+------------------------------------------------------------------------------
+-- | Spec
+spec :: Spec
+spec = do
+  describe "safeLength tests" $
+           tests
+
+tests = do
+    it "length of a tuple is 1" $
+        property $ safeLength (Proxy :: Proxy (Char, Char)) ('a', 'b') == 1
+    it "Can't accidentally take the length of a tuple when we don't mean to" $
+       shouldNotTypecheck (safeLength (Proxy :: Proxy [Char]) ('a', 'b'))
+    it "Can't accidentally take the length of the wrong level of a nested list" $
+       shouldNotTypecheck (safeLength (Proxy :: Proxy [[Char]]) (head [['a', 'b', 'c']] :: [Char]))
+    it "Can take the length of a list." $
+       property $ safeLength (Proxy :: Proxy [Char]) ['a', 'b'] == 2
