diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,80 @@
+CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL
+SERVICES. DISTRIBUTION OF THIS CC0 WAIVER DOES NOT CREATE AN ATTORNEY-CLIENT
+RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS"
+BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED,
+AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
+
+Statement of Purpose
+
+The laws of various jurisdictions throughout the world automatically confer
+certain exclusive rights upon the creator of an original work of authorship
+and/or a database (each, a “Work”), and the subsequent owners thereof.
+
+Some owners of these exclusive rights wish to permanently remove these
+restrictions from a Work for the purpose of contributing to a commons that the
+public can reliably build upon, modify, reuse and redistribute as freely as
+possible from such restrictions for any purposes and in any form whatsoever,
+whether modified or unmodified, in whole or in part. Such owners therefore wish
+to fully, permanently, irrevocably and unconditionally waive, abandon and
+relinquish their Copyright Related Rights (defined below) with respect to a
+Work to the fullest extent permitted by applicable law.
+
+A Work associated with this CC0 Waiver may be protected by copyright and
+related or neighboring rights, database rights (such as those arising under
+Directive 96/9/EC of the European Parliament and of the Council of 11 March
+1996 on the legal protection of databases, and under any national
+implementation thereof, (including any amended or successor version of such
+directive)), and/or other similar equivalent or corresponding rights throughout
+the world as such rights may be available under applicable law or treaty (and
+national implementations thereof), including but not limited to moral rights
+retained by the original author(s), publicity and privacy rights pertaining to
+an individual’s image or likeness depicted in a Work, rights protecting
+against unfair competition in regards to the Work, and any rights protecting
+the extraction, dissemination and reuse of data in the Work (such rights all,
+collectively, the “Copyright Related Rights”).
+
+The person associating this CC0 Waiver with a Work is the owner of Copyright
+Related Rights in the Work (the “Affirmer”), and does openly, overtly and
+voluntarily elect to apply this CC0 Waiver to his or her Work with knowledge of
+his or her Copyright Related Rights in the Work and the meaning and intended
+legal effect of this CC0 Waiver.
+
+Subject to rights of other persons in the Work, and any patent and trademark
+rights held by Affirmer, by associating this CC0 Waiver with a Work the
+Affirmer does intend to fully, permanently, irrevocably and unconditionally
+waive, abandon and relinquish all of his or her Copyright Related Rights in
+such Work, to the fullest extent permitted by (but not in contravention of)
+applicable law.
+
+CC0 Waiver
+
+1.  To the fullest extent permitted by (but not in contravention of) applicable
+law, Affirmer hereby fully, permanently, irrevocably and unconditionally
+waives, abandons and relinquishes all of Affirmer’s Copyright Related Rights
+and associated claims and causes of action, whether present or future, vested
+or contingent, in the Work, (such waiver, abandonment, and relinquishment, the
+"Waiver"). Affirmer makes the Waiver for the benefit of each member of the
+public at large and to the detriment of Affirmer's heirs or successors.
+
+2. Should the Waiver for any reason be judged legally invalid or ineffective
+under applicable law, then the Waiver shall be preserved to the maximum extent
+permitted and Affirmer hereby grants to each such affected recipient of the
+Work a worldwide, royalty-free, non exclusive, perpetual (for the duration of
+the applicable copyright), non transferable, non sublicensable, irrevocable and
+unconditional license to exercise Affirmer’s Copyright Related Rights in the
+Work, which license shall be deemed effective as of the date this CC0 Waiver
+was applied by Affirmer to the Work.
+
+3. No trademark or patent rights held by Affirmer are waived, abandoned,
+relinquished, licensed or otherwise affected by this CC0 Waiver.
+
+4. Affirmer hereby fully and completely disclaims responsibility for clearing
+rights of other persons that may apply to the Work or any intended use thereof,
+including without limitation any such person’s Copyright Related Rights
+(including privacy and publicity rights). Further, Affirmer hereby fully and
+completely disclaims responsibility for obtaining any necessary consents,
+permissions or other rights required for such intended use.
+
+5. Affirmer understands and acknowledges that Creative Commons is not party to
+this CC0 Waiver and has no duty or obligation with respect to this CC0 Waiver
+or use of the Work.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,4 @@
+import Distribution.Simple
+
+main :: IO ()
+main = defaultMain
diff --git a/System/Glib/Cast/TH.hs b/System/Glib/Cast/TH.hs
new file mode 100644
--- /dev/null
+++ b/System/Glib/Cast/TH.hs
@@ -0,0 +1,33 @@
+-- gtk2hs-cast-th -- A type class for cast functions of Gtk2hs: TH package
+-- Copyright (c) 2009 Marco Túlio Gontijo e Silva <marcot@holoscopio.com>
+-- CC0 Waiver 1.0 Universal [Beta 3]
+-- See LICENSE
+
+module System.Glib.Cast.TH (instance_) where
+
+-- base
+import Data.Maybe
+
+-- hint
+import Language.Haskell.Interpreter
+
+-- template-haskell
+import Language.Haskell.TH.Syntax
+
+instance_ :: String -> Q [Dec]
+instance_ module_
+  = do
+    (Right (elements :: [ModuleElem]))
+      <- qRunIO $ runInterpreter $ getModuleExports module_
+    return $ map makeInstance_ $ mapMaybe isCastTo elements
+
+isCastTo :: ModuleElem -> Maybe String
+isCastTo (Fun ('c' : 'a' : 's' : 't' : 'T' : 'o' : rest)) = Just rest
+isCastTo _others = Nothing
+
+makeInstance_ :: String -> Dec
+makeInstance_ type_
+  = InstanceD []
+  (AppT (ConT $ mkName "Cast") $ ConT $ mkName type_)
+  [ FunD (mkName "cast")
+    [ Clause [] (NormalB $ VarE $ mkName $ "castTo" ++ type_) []]]
diff --git a/gtk2hs-cast-th.cabal b/gtk2hs-cast-th.cabal
new file mode 100644
--- /dev/null
+++ b/gtk2hs-cast-th.cabal
@@ -0,0 +1,33 @@
+name: gtk2hs-cast-th
+version: 0.10.1.0
+cabal-version: >= 1.6
+build-type: Simple
+license: OtherLicense
+license-file: LICENSE
+copyright: 2009 Marco Túlio Gontijo e Silva <marcot@holoscopio.com>
+author: Marco Túlio Gontijo e Silva <marcot@holoscopio.com>
+maintainer: Marco Túlio Gontijo e Silva <marcot@holoscopio.com>
+stability: alpha
+bug-reports: mailto:marcot@holoscopio.com
+synopsis: A type class for cast functions of Gtk2hs: TH package
+description:
+ This package contains a type class called Cast with a function cast, that is a
+ wrapper for all the castTo* functions of gtk2hs.  It makes it easier to write
+ other functions that require a castTo* as a parameter, like xmlGetWidget from
+ glade.  The main utility of these packages is to use xmlGetWidgetCast, a
+ version of xmlGetWidget defined in gtk2hs-cast-glade, which has the type:
+ xmlGetWidgetCast :: (Cast widget, WidgetClass widget) => GladeXML -> String ->
+ IO widget.
+ .
+ This is the Template Haskell package of gtk2hs-cast, it includes a template
+ for generating a module with instances of the Cast class, defined at
+ gtk2hs-cast-glib.
+category: GUI
+tested-with: GHC == 6.10.1
+library
+  exposed-modules: System.Glib.Cast.TH
+  build-depends: base, hint, template-haskell
+  extensions: ScopedTypeVariables, TemplateHaskell
+source-repository head
+  type: darcs
+  location: http://git.holoscopio.com/marcot/git/gtk2hs-cast/gtk2hs-cast-gtk
