summaryrefslogtreecommitdiff
path: root/lib/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Types.hs')
-rw-r--r--lib/Types.hs54
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/Types.hs b/lib/Types.hs
index d737392..acba99d 100644
--- a/lib/Types.hs
+++ b/lib/Types.hs
@@ -54,8 +54,8 @@ instance HasArguments Level where
-- | a hint comes with an explanation (and a level), or is a dependency
-- (in which case it'll be otherwise treated as an info hint)
-data Lint = Depends Dep | Offers Text | Lint Hint | Badge Badge | CW [Text]
- deriving (Ord, Eq, Generic, ToJSONKey)
+data Lint = Depends Dep | Offers Text | Lint Hint | Badge Badge | CW [Text] | Jitsi Text
+ deriving (Ord, Eq, Generic)
data Dep = Local RelPath | Link Text | MapLink Text | LocalMap RelPath
deriving (Generic, Ord, Eq, NFData)
@@ -78,35 +78,35 @@ lintLevel _ = Info
lintsToHints :: [Lint] -> [Hint]
lintsToHints = mapMaybe (\case {Lint hint -> Just hint ; _ -> Nothing})
-instance PrettyPrint Lint where
- prettyprint (Lint Hint { hintMsg, hintLevel } ) =
- " " <> show hintLevel <> ": " <> hintMsg
- prettyprint (Depends dep) =
- " Info: found dependency: " <> prettyprint dep
- prettyprint (Offers dep) =
- " Info: map offers entrypoint " <> prettyprint dep
- prettyprint (Badge _) =
- " Info: found a badge."
- prettyprint (CW cws) =
- " CWs: " <> show cws
+-- instance PrettyPrint Lint where
+-- prettyprint (Lint Hint { hintMsg, hintLevel } ) =
+-- " " <> show hintLevel <> ": " <> hintMsg
+-- prettyprint (Depends dep) =
+-- " Info: found dependency: " <> prettyprint dep
+-- prettyprint (Offers dep) =
+-- " Info: map offers entrypoint " <> prettyprint dep
+-- prettyprint (Badge _) =
+-- " Info: found a badge."
+-- prettyprint (CW cws) =
+-- " CWs: " <> show cws
instance PrettyPrint Hint where
prettyprint (Hint level msg) = " " <> show level <> ": " <> msg
-instance ToJSON Lint where
- toJSON (Lint h) = toJSON h
- toJSON (Depends dep) = A.object
- [ "msg" .= prettyprint dep
- , "level" .= A.String "Dependency Info" ]
- toJSON (Offers l) = A.object
- [ "msg" .= prettyprint l
- , "level" .= A.String "Entrypoint Info" ]
- toJSON (Badge _) = A.object
- [ "msg" .= A.String "found a badge"
- , "level" .= A.String "Badge Info"]
- toJSON (CW cws) = A.object
- [ "msg" .= A.String "Content Warning"
- , "level" .= A.String "CW Info" ]
+-- instance ToJSON Lint where
+-- toJSON (Lint h) = toJSON h
+-- toJSON (Depends dep) = A.object
+-- [ "msg" .= prettyprint dep
+-- , "level" .= A.String "Dependency Info" ]
+-- toJSON (Offers l) = A.object
+-- [ "msg" .= prettyprint l
+-- , "level" .= A.String "Entrypoint Info" ]
+-- toJSON (Badge _) = A.object
+-- [ "msg" .= A.String "found a badge"
+-- , "level" .= A.String "Badge Info"]
+-- toJSON (CW cws) = A.object
+-- [ "msg" .= A.String "Content Warning"
+-- , "level" .= A.String "CW Info" ]
instance ToJSON Hint where
toJSON (Hint l m) = A.object