diff options
Diffstat (limited to 'lib/Types.hs')
-rw-r--r-- | lib/Types.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Types.hs b/lib/Types.hs index 0d35432..1099630 100644 --- a/lib/Types.hs +++ b/lib/Types.hs @@ -84,8 +84,7 @@ instance PrettyPrint Hint where prettyprint (Hint level msg) = " " <> (showText level) <> ": " <> msg instance ToJSON Lint where - toJSON (Lint (Hint l m)) = A.object - [ "msg" .= m, "level" .= l ] + toJSON (Lint h) = toJSON h toJSON (Depends dep) = A.object [ "msg" .= prettyprint dep , "level" .= A.String "Dependency Info" ] @@ -93,6 +92,10 @@ instance ToJSON Lint where [ "msg" .= prettyprint l , "level" .= A.String "Entrypoint Info" ] +instance ToJSON Hint where + toJSON (Hint l m) = A.object + [ "msg" .= m, "level" .= l ] + instance ToJSON Dep where toJSON = \case Local text -> json "local" $ prettyprint text |