File tree 2 files changed +2
-7
lines changed
haskell-lsp-types/src/Language/Haskell/LSP/Types
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
1623
1623
data HoverContents =
1624
1624
HoverContentsMS (List MarkedString )
1625
1625
| HoverContents MarkupContent
1626
- | HoverContentsEmpty
1627
1626
deriving (Read ,Show ,Eq )
1628
1627
1629
1628
instance ToJSON HoverContents where
1630
1629
toJSON (HoverContentsMS x) = toJSON x
1631
1630
toJSON (HoverContents x) = toJSON x
1632
- toJSON (HoverContentsEmpty ) = A. Null
1633
1631
instance FromJSON HoverContents where
1634
1632
parseJSON v@ (A. String _) = HoverContentsMS <$> parseJSON v
1635
- parseJSON (A. Null ) = pure HoverContentsEmpty
1636
1633
parseJSON v@ (A. Array _) = HoverContentsMS <$> parseJSON v
1637
1634
parseJSON v@ (A. Object _) = HoverContents <$> parseJSON v
1638
1635
<|> HoverContentsMS <$> parseJSON v
@@ -1646,10 +1643,8 @@ instance Semigroup HoverContents where
1646
1643
#endif
1647
1644
1648
1645
instance Monoid HoverContents where
1649
- mempty = HoverContentsEmpty
1646
+ mempty = HoverContentsMS ( List [] )
1650
1647
1651
- HoverContentsEmpty `mappend` hc = hc
1652
- hc `mappend` HoverContentsEmpty = hc
1653
1648
HoverContents h1 `mappend` HoverContents h2 = HoverContents (h1 `mappend` h2)
1654
1649
HoverContents h1 `mappend` HoverContentsMS (List h2s) = HoverContents (mconcat (h1: (map toMarkupContent h2s)))
1655
1650
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
59
59
instance Arbitrary HoverContents where
60
60
arbitrary = oneof [ HoverContentsMS <$> arbitrary
61
61
, HoverContents <$> arbitrary
62
- , pure HoverContentsEmpty ]
62
+ ]
63
63
64
64
-- | make lists of maximum length 3 for test performance
65
65
smallList :: Gen a -> Gen [a ]
You can’t perform that action at this time.
0 commit comments