Skip to content

Instantly share code, notes, and snippets.

@glittershark
Last active May 9, 2018 15:40
Show Gist options
  • Save glittershark/d546f2498977201042811b6e93c522b6 to your computer and use it in GitHub Desktop.
Save glittershark/d546f2498977201042811b6e93c522b6 to your computer and use it in GitHub Desktop.
{-# LANGUAGE DerivingStrategies, GeneralizedNewtypeDeriving, DeriveAnyClass, FunctionalDependencies, DeriveGeneric #-}
module Lib where
import Control.Lens
import Control.Monad.Writer
import Control.Monad.Except
import Data.Monoid
import GHC.Generics
data Foo = Foo
data Bar = Bar
newtype SomeT m a
= SomeT { runSomeT :: WriterT (Endo Foo) (ExceptT Bar m) a }
deriving stock (Generic)
deriving newtype (Functor, Applicative, Monad, MonadError Bar)
deriving anyclass (Wrapped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment