Skip to content

Commit

Permalink
Merge pull request #31 from shayne-fletcher/more-fixes
Browse files Browse the repository at this point in the history
more fixes
  • Loading branch information
ekmett authored Apr 10, 2024
2 parents 63b99bb + 853b30b commit 02fccc0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/console/Console/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/lsp/Language/Server/Protocol.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/relative/List.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/relative/Located.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import Data.Semigroup
#endif
import GHC.Generics

import Data.Functor.Classes

import Algebra.Ordered
import Relative
import Delta
Expand All @@ -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

Expand Down

0 comments on commit 02fccc0

Please sign in to comment.