diff --git a/src/console/Console/Pretty.hs b/src/console/Console/Pretty.hs index 92c5f79..5a66c08 100644 --- a/src/console/Console/Pretty.hs +++ b/src/console/Console/Pretty.hs @@ -21,6 +21,7 @@ import Data.Bool (bool) import Data.Char (toLower) import Data.Default.Class import Data.Maybe (fromMaybe) +import Data.String import Data.Text.Prettyprint.Doc import Data.Text.Prettyprint.Doc.Render.Text as RenderText import Data.Text.Prettyprint.Doc.Render.Terminal as RenderTerminal @@ -34,6 +35,9 @@ import System.Console.Terminfo.Cursor (termColumns) #endif import Text.Read (readMaybe) +instance IsString str => MonadFail (Either str) where + fail = Left . fromString + data FancyOptions = FancyOptions { _fancyColor :: Maybe Bool diff --git a/src/lsp/Language/Server/Protocol.hs b/src/lsp/Language/Server/Protocol.hs index f2d5fa2..7504444 100644 --- a/src/lsp/Language/Server/Protocol.hs +++ b/src/lsp/Language/Server/Protocol.hs @@ -208,8 +208,8 @@ import Control.Lens.TH import Control.Monad import Data.Aeson hiding (Error) import Data.Aeson.Encoding -import Data.Aeson.Internal -import Data.Aeson.Lens +import Data.Aeson.Types hiding (Error) +import Data.Aeson.Lens hiding (JSON) import Data.Char as Char import Data.Data import Data.Default diff --git a/src/relative/List.hs b/src/relative/List.hs index 9b78689..3072c05 100644 --- a/src/relative/List.hs +++ b/src/relative/List.hs @@ -26,7 +26,7 @@ import Control.Lens (AsEmpty(..), prism, Cons(..)) import Data.Default import Data.Function (on) import Data.Semigroup -import GHC.Exts as Exts +import GHC.Exts as Exts hiding(List) import qualified Prelude import Prelude hiding (reverse) import Text.Read diff --git a/src/relative/Located.hs b/src/relative/Located.hs index 03a9be8..438ef6b 100644 --- a/src/relative/Located.hs +++ b/src/relative/Located.hs @@ -32,6 +32,8 @@ import Data.Semigroup #endif import GHC.Generics +import Data.Functor.Classes + import Algebra.Ordered import Relative import Delta @@ -44,6 +46,9 @@ data Located a = Located !Delta a instance Hashable a => Hashable (Located a) +instance Eq1 Located where + liftEq eq (Located _ x) (Located _ y) = eq x y + instance Hashable1 Located where liftHashWithSalt f s (Located d a) = f (hashWithSalt s d) a