File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
haskell-lsp-types/src/Language/Haskell/LSP/Types Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1623,16 +1623,13 @@ instance FromJSON MarkedString where
16231623data HoverContents =
16241624 HoverContentsMS (List MarkedString )
16251625 | HoverContents MarkupContent
1626- | HoverContentsEmpty
16271626 deriving (Read ,Show ,Eq )
16281627
16291628instance ToJSON HoverContents where
16301629 toJSON (HoverContentsMS x) = toJSON x
16311630 toJSON (HoverContents x) = toJSON x
1632- toJSON (HoverContentsEmpty ) = A. Null
16331631instance FromJSON HoverContents where
16341632 parseJSON v@ (A. String _) = HoverContentsMS <$> parseJSON v
1635- parseJSON (A. Null ) = pure HoverContentsEmpty
16361633 parseJSON v@ (A. Array _) = HoverContentsMS <$> parseJSON v
16371634 parseJSON v@ (A. Object _) = HoverContents <$> parseJSON v
16381635 <|> HoverContentsMS <$> parseJSON v
@@ -1646,10 +1643,8 @@ instance Semigroup HoverContents where
16461643#endif
16471644
16481645instance Monoid HoverContents where
1649- mempty = HoverContentsEmpty
1646+ mempty = HoverContentsMS ( List [] )
16501647
1651- HoverContentsEmpty `mappend` hc = hc
1652- hc `mappend` HoverContentsEmpty = hc
16531648 HoverContents h1 `mappend` HoverContents h2 = HoverContents (h1 `mappend` h2)
16541649 HoverContents h1 `mappend` HoverContentsMS (List h2s) = HoverContents (mconcat (h1: (map toMarkupContent h2s)))
16551650 HoverContentsMS (List h1s) `mappend` HoverContents h2 = HoverContents (mconcat ((map toMarkupContent h1s) ++ [h2]))
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ instance Arbitrary MarkupKind where
5959instance Arbitrary HoverContents where
6060 arbitrary = oneof [ HoverContentsMS <$> arbitrary
6161 , HoverContents <$> arbitrary
62- , pure HoverContentsEmpty ]
62+ ]
6363
6464-- | make lists of maximum length 3 for test performance
6565smallList :: Gen a -> Gen [a ]
You can’t perform that action at this time.
0 commit comments