diff --git a/ChangeLog.md b/ChangeLog.md
new file mode 100644
--- /dev/null
+++ b/ChangeLog.md
@@ -0,0 +1,5 @@
+# Revision history for ip2location
+
+## 8.0.3  -- YYYY-mm-dd
+
+* First version. Released on an unsuspecting world.
diff --git a/IP2Location.hs b/IP2Location.hs
new file mode 100644
--- /dev/null
+++ b/IP2Location.hs
@@ -0,0 +1,344 @@
+{-|
+Module      : IP2Location
+Description : IP2Location Haskell package
+Copyright   : (c) IP2Location, 2016
+License     : LGPL-3
+Maintainer  : sales@ip2location.com
+Stability   : experimental
+
+This Haskell package provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type,
+IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, elevation, and usage type from IP address by using IP2Location database.
+This package uses a file based database available at IP2Location.com. This database simply contains IP blocks as keys, and other information such as country, 
+region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, weather station name, mcc, mnc, 
+mobile brand, elevation, and usage type as values. It supports both IP addresses in IPv4 and IPv6.
+
+IP2Location LITE BIN databases are available for free at http://lite.ip2location.com/
+-}
+module IP2Location (Meta, IP2LocationRecord, getAPIVersion, doInit, doQuery) where
+
+import qualified Data.ByteString.Lazy as BS
+import qualified Data.ByteString.Lazy.Char8 as BS8
+import Data.Word
+import Data.Bits
+import Data.Binary.Get
+import Data.IP
+import Control.Exception
+
+-- | Contains geolocation results.
+data IP2LocationRecord = IP2LocationRecord {
+    -- | Country code
+    country_short :: String,
+    -- | Country name
+    country_long :: String,
+    -- | Region name
+    region :: String,
+    -- | City name
+    city :: String,
+    -- | ISP name
+    isp :: String,
+    -- | Latitude
+    latitude :: Float,
+    -- | Longitude
+    longitude :: Float,
+    -- | Domain name
+    domain :: String,
+    -- | ZIP/Postal code
+    zipcode :: String,
+    -- | Timezone
+    timezone :: String,
+    -- | Network speed
+    netspeed :: String,
+    -- | IDD code
+    iddcode :: String,
+    -- | Area code
+    areacode :: String,
+    -- | Weather station code
+    weatherstationcode :: String,
+    -- | Weather station name
+    weatherstationname :: String,
+    -- | Mobile country code
+    mcc :: String,
+    -- | Mobile network code
+    mnc :: String,
+    -- | Carrier brand
+    mobilebrand :: String,
+    -- | Elevation in meters
+    elevation :: Float,
+    -- | Usage type
+    usagetype :: String
+} deriving (Show)
+
+-- | Contains the BIN database file metadata.
+data Meta = Meta {
+    -- | Database type
+    databasetype :: Int,
+    -- | Number of columns
+    databasecolumn :: Int,
+    -- | Database year
+    databaseyear :: Int,
+    -- | Database month
+    databasemonth :: Int,
+    -- | Database day
+    databaseday :: Int,
+    -- | IPv4 data count
+    ipv4databasecount :: Int,
+    -- | IPv4 data base address
+    ipv4databaseaddr :: Int,
+    -- | IPv6 data count
+    ipv6databasecount :: Int,
+    -- | IPv6 data base address
+    ipv6databaseaddr :: Int,
+    -- | IPv4 index base address
+    ipv4indexbaseaddr :: Int,
+    -- | IPv6 index base address
+    ipv6indexbaseaddr :: Int,
+    -- | IPv4 column size
+    ipv4columnsize :: Int,
+    -- | IPv6 column size
+    ipv6columnsize :: Int
+} deriving (Show)
+
+getMeta = do
+    databasetype <- getWord8
+    databasecolumn <- getWord8
+    databaseyear <- getWord8
+    databasemonth <- getWord8
+    databaseday <- getWord8
+    ipv4databasecount <- getWord32le
+    ipv4databaseaddr <- getWord32le
+    ipv6databasecount <- getWord32le
+    ipv6databaseaddr <- getWord32le
+    ipv4indexbaseaddr <- getWord32le
+    ipv6indexbaseaddr <- getWord32le
+    let ipv4columnsize = fromIntegral databasecolumn `shiftL` 2 -- 4 bytes each column
+    let ipv6columnsize = 16 + ((fromIntegral databasecolumn - 1) `shiftL` 2) -- 4 bytes each column, except IPFrom column which is 16 bytes
+    let meta = Meta (fromIntegral databasetype) (fromIntegral databasecolumn) (fromIntegral databaseyear) (fromIntegral databasemonth) (fromIntegral databaseday) (fromIntegral ipv4databasecount) (fromIntegral ipv4databaseaddr) (fromIntegral ipv6databasecount) (fromIntegral ipv6databaseaddr) (fromIntegral ipv4indexbaseaddr) (fromIntegral ipv6indexbaseaddr) ipv4columnsize ipv6columnsize
+    return meta
+
+{-|
+    The 'getAPIVersion' function returns a string containing the API version.
+-}
+getAPIVersion :: String
+getAPIVersion = "8.0.3"
+
+ipToOcts :: IP -> [Int]
+ipToOcts (IPv4 ip) = fromIPv4 ip
+ipToOcts (IPv6 ip) = fromIPv6b ip
+
+ipToInteger :: IP -> Integer
+ipToInteger = sum . map (\(n,o) -> toInteger o * 256 ^ n) . zip [0..] . reverse . ipToOcts
+
+ipStringToInteger :: String -> Integer
+ipStringToInteger = ipToInteger . read
+
+{-|
+    The 'doInit' function returns the Meta record containing metadata from the BIN database file.
+    It takes one argument, of type 'String', which is the path to the BIN database file.
+-}
+doInit :: String -> IO Meta
+doInit myfile = do
+    contents <- BS.readFile myfile
+    return $ runGet getMeta contents
+
+readuint8 :: BS.ByteString -> Int -> Int
+readuint8 contents startpos = fromIntegral (runGet getWord8 (BS.drop (fromIntegral startpos - 1) contents))
+
+readuint32 :: BS.ByteString -> Int -> Int
+readuint32 contents startpos = fromIntegral (runGet getWord32le (BS.drop (fromIntegral startpos - 1) contents))
+
+getuint128 = do
+    uint64A <- getWord64le
+    uint64B <- getWord64le
+    let uint128 = (toInteger uint64A) + ((toInteger uint64B) `rotateL` 64)
+    return uint128
+
+readuint128 :: BS.ByteString -> Int -> Integer
+readuint128 contents startpos = runGet getuint128 (BS.drop (fromIntegral startpos - 1) contents)
+
+readfloat :: BS.ByteString -> Int -> Float
+readfloat contents startpos = runGet getFloatle (BS.drop (fromIntegral startpos - 1) contents)
+
+readstr :: BS.ByteString -> Int -> String
+readstr contents startpos = do
+    let len = runGet getWord8 (BS.drop (fromIntegral startpos) contents)
+    str <- BS8.unpack (BS.take (fromIntegral len) (BS.drop (fromIntegral startpos + 1) contents))
+    return str
+
+readcolcountry :: BS.ByteString -> Int -> Int -> [Int] -> (String, String)
+readcolcountry contents dbtype rowoffset col = do
+    let x = "This parameter is unavailable for selected data file. Please upgrade the data file."
+    let [colpos] = take 1 (drop dbtype col)
+    
+    if colpos == 0
+        then do
+            (x, x)
+        else do
+            let coloffset = (colpos - 1) `shiftL` 2
+            let x0 = readuint32 contents (rowoffset + coloffset)
+            let x1 = readstr contents  x0
+            let x2 = readstr contents (x0 + 3)
+            (x1, x2)
+
+readcolstring :: BS.ByteString -> Int -> Int -> [Int] -> String
+readcolstring contents dbtype rowoffset col = do
+    let [colpos] = take 1 (drop dbtype col)
+    
+    if colpos == 0
+        then do
+            "This parameter is unavailable for selected data file. Please upgrade the data file."
+        else do
+            let coloffset = (colpos - 1) `shiftL` 2
+            readstr contents (readuint32 contents (rowoffset + coloffset))
+
+readcolfloat :: BS.ByteString -> Int -> Int -> [Int] -> Float
+readcolfloat contents dbtype rowoffset col = do
+    let [colpos] = take 1 (drop dbtype col)
+    
+    if colpos == 0
+        then do
+            0.0
+        else do
+            let coloffset = (colpos - 1) `shiftL` 2
+            readfloat contents (rowoffset + coloffset)
+
+readcolfloatstring :: BS.ByteString -> Int -> Int -> [Int] -> Float
+readcolfloatstring contents dbtype rowoffset col = do
+    let [colpos] = take 1 (drop dbtype col)
+    
+    if colpos == 0
+        then do
+            0.0
+        else do
+            let coloffset = (colpos - 1) `shiftL` 2
+            let n = readstr contents (readuint32 contents (rowoffset + coloffset))
+            read n :: Float
+
+readrecord :: BS.ByteString -> Int -> Int -> IP2LocationRecord
+readrecord contents dbtype rowoffset = do
+    let country_position = [0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
+    let region_position = [0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
+    let city_position = [0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]
+    let isp_position = [0, 0, 3, 0, 5, 0, 7, 5, 7, 0, 8, 0, 9, 0, 9, 0, 9, 0, 9, 7, 9, 0, 9, 7, 9]
+    let latitude_position = [0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
+    let longitude_position = [0, 0, 0, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]
+    let domain_position = [0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 9, 0, 10,0, 10, 0, 10, 0, 10, 8, 10, 0, 10, 8, 10]
+    let zipcode_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 0, 7, 0, 7, 7, 7, 0, 7]
+    let timezone_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 7, 8, 8, 8, 7, 8, 0, 8, 8, 8, 0, 8]
+    let netspeed_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 11,0, 11,8, 11, 0, 11, 0, 11, 0, 11]
+    let iddcode_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 12, 0, 12, 0, 12, 9, 12, 0, 12]
+    let areacode_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10 ,13 ,0, 13, 0, 13, 10, 13, 0, 13]
+    let weatherstationcode_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 14, 0, 14, 0, 14, 0, 14]
+    let weatherstationname_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 15, 0, 15, 0, 15, 0, 15]
+    let mcc_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 16, 0, 16, 9, 16]
+    let mnc_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,17, 0, 17, 10, 17]
+    let mobilebrand_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,18, 0, 18, 11, 18]
+    let elevation_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 19, 0, 19]
+    let usagetype_position = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 20]
+    
+    let (country_short, country_long) = readcolcountry contents dbtype rowoffset country_position
+    let region = readcolstring contents dbtype rowoffset region_position
+    let city = readcolstring contents dbtype rowoffset city_position
+    let isp = readcolstring contents dbtype rowoffset isp_position
+    let latitude = readcolfloat contents dbtype rowoffset latitude_position
+    let longitude = readcolfloat contents dbtype rowoffset longitude_position
+    let domain = readcolstring contents dbtype rowoffset domain_position
+    let zipcode = readcolstring contents dbtype rowoffset zipcode_position
+    let timezone = readcolstring contents dbtype rowoffset timezone_position
+    let netspeed = readcolstring contents dbtype rowoffset netspeed_position
+    let iddcode = readcolstring contents dbtype rowoffset iddcode_position
+    let areacode = readcolstring contents dbtype rowoffset areacode_position
+    let weatherstationcode = readcolstring contents dbtype rowoffset weatherstationcode_position
+    let weatherstationname = readcolstring contents dbtype rowoffset weatherstationname_position
+    let mcc = readcolstring contents dbtype rowoffset mcc_position
+    let mnc = readcolstring contents dbtype rowoffset mnc_position
+    let mobilebrand = readcolstring contents dbtype rowoffset mobilebrand_position
+    let elevation = readcolfloatstring contents dbtype rowoffset elevation_position
+    let usagetype = readcolstring contents dbtype rowoffset usagetype_position
+    
+    IP2LocationRecord country_short country_long region city isp latitude longitude domain zipcode timezone netspeed iddcode areacode weatherstationcode weatherstationname mcc mnc mobilebrand elevation usagetype 
+
+searchtree :: BS.ByteString -> Integer -> Int -> Int -> Int -> Int -> Int -> Int -> IP2LocationRecord
+searchtree contents ipnum dbtype low high baseaddr colsize iptype = do
+    if low <= high
+        then do
+            let mid = ((low + high) `shiftR` 1)
+            let rowoffset = baseaddr + (mid * colsize)
+            let rowoffset2 = rowoffset + colsize
+            
+            let ipfrom = if (iptype == 4)
+                then toInteger $ readuint32 contents rowoffset
+                else readuint128 contents rowoffset
+            
+            let ipto = if (iptype == 4)
+                then toInteger $ readuint32 contents rowoffset2
+                else readuint128 contents rowoffset2
+            
+            if ipnum >= ipfrom && ipnum < ipto
+                then do
+                    if iptype == 4
+                        then
+                            readrecord contents dbtype rowoffset
+                        else
+                            readrecord contents dbtype (rowoffset + 12)
+                else if ipnum < ipfrom
+                    then
+                        searchtree contents ipnum dbtype low (mid - 1) baseaddr colsize iptype
+                    else
+                        searchtree contents ipnum dbtype (mid + 1) high baseaddr colsize iptype
+        else do
+            let x = "IP address not found."
+            IP2LocationRecord x x x x x 0.0 0.0 x x x x x x x x x x x 0.0 x 
+        
+search4 :: BS.ByteString -> Integer -> Int -> Int -> Int -> Int -> Int -> Int -> IP2LocationRecord
+search4 contents ipnum dbtype low high baseaddr indexbaseaddr colsize = do
+    if indexbaseaddr > 0
+        then do
+            let indexpos = fromIntegral (((ipnum `rotateR` 16) `rotateL` 3) + (toInteger indexbaseaddr))
+            let low2 = readuint32 contents indexpos
+            let high2 = readuint32 contents (indexpos + 4)
+            searchtree contents ipnum dbtype low2 high2 baseaddr colsize 4
+        else
+            searchtree contents ipnum dbtype low high baseaddr colsize 4
+
+search6 :: BS.ByteString -> Integer -> Int -> Int -> Int -> Int -> Int -> Int -> IP2LocationRecord
+search6 contents ipnum dbtype low high baseaddr indexbaseaddr colsize = do
+    if indexbaseaddr > 0
+        then do
+            let indexpos = fromIntegral (((ipnum `rotateR` 112) `rotateL` 3) + (toInteger indexbaseaddr))
+            let low2 = readuint32 contents indexpos
+            let high2 = readuint32 contents (indexpos + 4)
+            searchtree contents ipnum dbtype low2 high2 baseaddr colsize 6
+        else
+            searchtree contents ipnum dbtype low high baseaddr colsize 6
+
+tryfirst myIP = do
+    result <- try (evaluate (ipStringToInteger myIP)) :: IO (Either SomeException Integer)
+    case result of
+        Left ex -> return $ toInteger (1 - 2)
+        Right val -> return val
+
+{-|
+    The 'doQuery' function returns an IP2LocationRecord containing geolocation data for an IP address.
+    It takes 3 arguments; the BIN database file path (String), the metadata from 'doInit' function (Meta record) & either IPv4 or IPv6 address (String).
+-}
+doQuery :: String -> Meta -> String -> IO IP2LocationRecord
+doQuery myfile meta myip = do
+    contents <- BS.readFile myfile
+    let from = 281470681743360
+    let to = 281474976710655
+    let fromA = 0
+    let toA = 4294967295
+    
+    ipnum <- tryfirst myip
+    if ipnum == -1
+        then do
+            let x = "Invalid IP address."
+            return $ IP2LocationRecord x x x x x 0.0 0.0 x x x x x x x x x x x 0.0 x
+        else if ipnum >= from && ipnum <= to
+            then do
+                return $ search4 contents (ipnum - (toInteger from)) (databasetype meta) 0 (ipv4databasecount meta) (ipv4databaseaddr meta) (ipv4indexbaseaddr meta) (ipv4columnsize meta)
+            else if ipnum >= fromA && ipnum <= toA
+                then do
+                    return $ search4 contents ipnum (databasetype meta) 0 (ipv4databasecount meta) (ipv4databaseaddr meta) (ipv4indexbaseaddr meta) (ipv4columnsize meta)
+                else do
+                    return $ search6 contents ipnum (databasetype meta) 0 (ipv6databasecount meta) (ipv6databaseaddr meta) (ipv6indexbaseaddr meta) (ipv6columnsize meta)
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,165 @@
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
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/ip2location.cabal b/ip2location.cabal
new file mode 100644
--- /dev/null
+++ b/ip2location.cabal
@@ -0,0 +1,70 @@
+-- Initial ip2location.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+-- The name of the package.
+name:                ip2location
+
+-- The package version.  See the Haskell package versioning policy (PVP) 
+-- for standards guiding when and how versions should be incremented.
+-- https://wiki.haskell.org/Package_versioning_policy
+-- PVP summary:      +-+------- breaking API changes
+--                   | | +----- non-breaking API additions
+--                   | | | +--- code changes with no API change
+version:             8.0.3
+
+-- A short (one-line) description of the package.
+synopsis:            IP2Location Haskell package for IP geolocation.
+
+-- A longer description of the package.
+-- description: This Haskell package provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, elevation, and usage type from IP address by using IP2Location database. This package uses a file based database available at IP2Location.com. This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection type, IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, elevation, and usage type as values. It supports both IP addresses in IPv4 and IPv6.
+
+-- URL for the project homepage or repository.
+homepage:            http://www.ip2location.com
+
+-- The license under which the package is released.
+license:             LGPL-3
+
+-- The file containing the license text.
+license-file:        LICENSE
+
+-- The package author(s).
+author:              IP2Location
+
+-- An email address to which users can send suggestions, bug reports, and 
+-- patches.
+maintainer:          sales@ip2location.com
+
+-- A copyright notice.
+-- copyright:           
+
+category:            Development
+
+build-type:          Simple
+
+-- Extra files to be distributed with the package, such as examples or a 
+-- README.
+extra-source-files:  ChangeLog.md
+
+-- Constraint on the version of Cabal needed to build this package.
+cabal-version:       >=1.10
+
+
+library
+  -- Modules exported by the library.
+  exposed-modules:     IP2Location
+  
+  -- Modules included in this library but not exported.
+  -- other-modules:       
+  
+  -- LANGUAGE extensions used by modules in this package.
+  -- other-extensions:    
+  
+  -- Other library packages from which modules are imported.
+  build-depends:       base >=4.9 && <4.10, bytestring >=0.10 && <0.11, binary >=0.8.4 && <0.9, iproute >=1.7 && <1.8
+  
+  -- Directories containing source files.
+  -- hs-source-dirs:      
+  
+  -- Base language which the package is written in.
+  default-language:    Haskell2010
+  
