Skip to content

Commit

Permalink
Make Typeable instance for Snap play nicely with hint
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Howells committed Jun 16, 2010
1 parent e97491e commit 8ee59a2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Snap/Internal/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import Snap.Internal.Http.Types
------------------------------------------------------------------------------
newtype Snap a = Snap {
unSnap :: StateT SnapState (Iteratee IO) (Maybe (Either Response a))
} deriving Typeable
}


------------------------------------------------------------------------------
Expand Down Expand Up @@ -151,6 +151,16 @@ instance Alternative Snap where
empty = mzero
(<|>) = mplus

------------------------------------------------------------------------------
-- | The Typeable instance is here so Snap can be dynamically executed with
-- Hint.
snapTyCon :: TyCon
snapTyCon = mkTyCon "Snap.Types.Snap"
{-# NOINLINE snapTyCon #-}

instance Typeable1 Snap where
typeOf1 _ = mkTyConApp snapTyCon []


------------------------------------------------------------------------------
liftIter :: Iteratee IO a -> Snap a
Expand Down

0 comments on commit 8ee59a2

Please sign in to comment.