Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 2ee0aa2

Browse files
committed
Fix ToJSON instance for Diagnostics
1 parent 33bcbdd commit 2ee0aa2

File tree

1 file changed

+2
-2
lines changed
  • hie-plugin-api/Haskell/Ide/Engine

1 file changed

+2
-2
lines changed

hie-plugin-api/Haskell/Ide/Engine/Ghc.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import qualified Data.Map.Strict as Map
2626
import qualified Data.Set as Set
2727
import qualified Data.Text as T
2828
import qualified Data.Aeson
29-
import Data.Coerce
3029
import ErrUtils
3130

3231
import Haskell.Ide.Engine.MonadFunctions
@@ -73,7 +72,8 @@ instance Monoid Diagnostics where
7372

7473
instance Data.Aeson.ToJSON Diagnostics where
7574
toJSON (Diagnostics d) = Data.Aeson.toJSON
76-
(Map.mapKeys coerce d :: Map.Map T.Text (Set.Set Diagnostic))
75+
(Map.mapKeys extractUri d :: Map.Map T.Text (Set.Set Diagnostic))
76+
where extractUri (NormalizedUri _ t) = t
7777

7878
type AdditionalErrs = [T.Text]
7979

0 commit comments

Comments
 (0)