-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | For when a type should never be an instance of a class -- -- -- Banning an instance allows the programmer to actively declare that an -- instance should never be defined, and provide a reason why: -- --
-- data Foo = -- ... -- $(banInstance [t|ToJSON Foo|] "why ToJSON Foo should never be defined") --@package ban-instance @version 0.1.0.1 module Language.Haskell.Instance.Ban -- | Ban an instance of a typeclass; code which tries to use the banned -- instance will fail at compile time. This works by generating an -- instance that depends on a custom type error: -- --
-- instance TypeError (..) => ToJSON Foo where -- ... ---- -- Use it like this: -- --
-- $(banInstance [t|ToJSON Foo|] "why ToJSON Foo should never be defined") --banInstance :: TypeQ -> String -> DecsQ