{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module HsDev.Display ( Display(..) ) where import Control.Lens (view) import System.Directory.Paths class Display a where display :: a -> String displayType :: a -> String instance Display FilePath where display :: FilePath -> FilePath display = FilePath -> FilePath forall a. a -> a id displayType :: FilePath -> FilePath displayType FilePath _ = FilePath "path" instance Display Path where display :: Path -> FilePath display = Getting FilePath Path FilePath -> Path -> FilePath forall s (m :: * -> *) a. MonadReader s m => Getting a s a -> m a view Getting FilePath Path FilePath Lens' Path FilePath path displayType :: Path -> FilePath displayType Path _ = FilePath "path"