@@ -29,18 +29,35 @@ instance MonadReader tag r m => Class.MonadReader r (WrappedEther tag m) where
29 ask = WrapEther $ ask (Proxy :: Proxy tag)
29 ask = WrapEther $ ask (Proxy :: Proxy tag)
30 local f = WrapEther . local (Proxy :: Proxy tag) f . unwrapEther
30 local f = WrapEther . local (Proxy :: Proxy tag) f . unwrapEther
32+instance MonadReader tag r m => MonadReader tag r (WrappedEther tag' m) where
33+ ask t = WrapEther $ ask t
34+ local t f = WrapEther . local t f . unwrapEther
32instance MonadState tag s m => Class.MonadState s (WrappedEther tag m) where
36instance MonadState tag s m => Class.MonadState s (WrappedEther tag m) where
33 get = WrapEther $ get (Proxy :: Proxy tag)
37 get = WrapEther $ get (Proxy :: Proxy tag)
34 put = WrapEther . put (Proxy :: Proxy tag)
38 put = WrapEther . put (Proxy :: Proxy tag)
40+instance MonadState tag s m => MonadState tag s (WrappedEther tag' m) where
41+ get t = WrapEther $ get t
42+ put t = WrapEther . put t
36instance MonadExcept tag e m => Class.MonadError e (WrappedEther tag m) where
44instance MonadExcept tag e m => Class.MonadError e (WrappedEther tag m) where
37 throwError = WrapEther . throw (Proxy :: Proxy tag)
45 throwError = WrapEther . throw (Proxy :: Proxy tag)
38 catchError m h = WrapEther $ catch (Proxy :: Proxy tag) (unwrapEther m) (unwrapEther . h)
46 catchError m h = WrapEther $ catch (Proxy :: Proxy tag) (unwrapEther m) (unwrapEther . h)
48+instance MonadExcept tag e m => MonadExcept tag e (WrappedEther tag' m) where
49+ throw t = WrapEther . throw t
50+ catch t m h = WrapEther $ catch t (unwrapEther m) (unwrapEther . h)
40instance MonadWriter tag w m => Class.MonadWriter w (WrappedEther tag m) where
52instance MonadWriter tag w m => Class.MonadWriter w (WrappedEther tag m) where
41 tell = WrapEther . tell (Proxy :: Proxy tag)
53 tell = WrapEther . tell (Proxy :: Proxy tag)
42 listen = WrapEther . listen (Proxy :: Proxy tag) . unwrapEther
54 listen = WrapEther . listen (Proxy :: Proxy tag) . unwrapEther
43 pass = WrapEther . pass (Proxy :: Proxy tag) . unwrapEther
55 pass = WrapEther . pass (Proxy :: Proxy tag) . unwrapEther
57+instance MonadWriter tag w m => MonadWriter tag w (WrappedEther tag' m) where
58+ tell t = WrapEther . tell t
59+ listen t = WrapEther . listen t . unwrapEther
60+ pass t = WrapEther . pass t . unwrapEther
45ethered :: proxy tag -> WrappedEther tag m a -> m a
62ethered :: proxy tag -> WrappedEther tag m a -> m a
46ethered _proxy = unwrapEther
63ethered _proxy = unwrapEther