Created
March 21, 2017 06:43
-
-
Save fizruk/57c43e97b9015491a9ac18a2983bc829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE ScopedTypeVariables #-} | |
import Control.Lens | |
import Data.Typeable | |
import qualified Data.Text as Text | |
instance {-# OVERLAPPING #-} (Typeable a, ToSchema a) => ToSchema (Either WalletError a) where | |
declareNamedSchema proxy = genericDeclareNamedSchema defaultSchemaOptions proxy | |
& mapped.name ?~ Text.pack ("Either WalletError " ++ show (typeOf (undefined :: a))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment