Permalink
Browse files

Revert "Use derived instance for Typeable AppConfig"

This reverts commit fc078d1.
  • Loading branch information...
1 parent d7d8b79 commit 55d42a82cba97ddfb7b0c213d7ef08713e18207f @chowells79 chowells79 committed Feb 19, 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 55d42a8

Please sign in to comment.