@@ -3,12 +3,8 @@
3{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE GADTs #-}
4{-# LANGUAGE GADTs #-}
5{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5{-# LANGUAGE GeneralizedNewtypeDeriving #-}
6−{-# LANGUAGE KindSignatures #-}
7{-# LANGUAGE MultiParamTypeClasses #-}
6{-# LANGUAGE MultiParamTypeClasses #-}
8−{-# LANGUAGE OverloadedStrings #-}
9{-# LANGUAGE RecordWildCards #-}
7{-# LANGUAGE RecordWildCards #-}
10−{-# LANGUAGE StandaloneDeriving #-}
11−{-# LANGUAGE TupleSections #-}
12{-# LANGUAGE TypeFamilies #-}
8{-# LANGUAGE TypeFamilies #-}
13{-# LANGUAGE TypeOperators #-}
9{-# LANGUAGE TypeOperators #-}
14{-# LANGUAGE UndecidableInstances #-}
10{-# LANGUAGE UndecidableInstances #-}
@@ -82,7 +78,7 @@ instance MonadBaseControl b m => MonadBaseControl b (RouteResultT m) where
83instance MonadTransControl RouteResultT where
79instance MonadTransControl RouteResultT where
84 type StT RouteResultT a = RouteResult a
80 type StT RouteResultT a = RouteResult a
85− liftWith f = RouteResultT $ liftM return $ f $ runRouteResultT
81+ liftWith f = RouteResultT $ liftM return $ f runRouteResultT
86 restoreT = RouteResultT
82 restoreT = RouteResultT
88instance MonadThrow m => MonadThrow (RouteResultT m) where
84instance MonadThrow m => MonadThrow (RouteResultT m) where
@@ -367,7 +363,7 @@ runAction :: Delayed env (Handler a)
367 -> (RouteResult Response -> IO r)
363 -> (RouteResult Response -> IO r)
368 -> (a -> RouteResult Response)
364 -> (a -> RouteResult Response)
370−runAction action env req respond k = runResourceT $ do
366+runAction action env req respond k = runResourceT $
371 runDelayed action env req >>= go >>= liftIO . respond
367 runDelayed action env req >>= go >>= liftIO . respond
373 go (Fail e) = return $ Fail e
369 go (Fail e) = return $ Fail e