Permalink
Browse files

Merge branch 'master' of github.com:snapframework/snap

  • Loading branch information...
2 parents da5622c + 55d42a8 commit d7b01d2f530862db8ff7347d48a1ddf5059d6b92 @mightybyte mightybyte committed Feb 20, 2013
Showing with 14 additions and 1 deletion.
  1. +14 −1 src/Snap/Snaplet/Config.hs
View
@@ -15,7 +15,20 @@ import System.Console.GetOpt
-- | AppConfig contains the config options for command line arguments in
-- snaplet-based apps.
newtype AppConfig = AppConfig { appEnvironment :: Maybe String }
- deriving (Typeable)
+
+
+------------------------------------------------------------------------------
+-- | AppConfig has a manual instance of Typeable due to limitations in the
+-- tools available before GHC 7.4, and the need to make dynamic loading
+-- tractable. When support for earlier versions of GHC is dropped, the
+-- dynamic loader package can be updated so that manual Typeable instances
+-- are no longer needed.
+appConfigTyCon :: TyCon
+appConfigTyCon = mkTyCon "Snap.Snaplet.Config.AppConfig"
+{-# NOINLINE appConfigTyCon #-}
+
+instance Typeable AppConfig where
+ typeOf _ = mkTyConApp appConfigTyCon []
------------------------------------------------------------------------------

0 comments on commit d7b01d2

Please sign in to comment.