summaryrefslogtreecommitdiff
path: root/lib/Types.hs
diff options
context:
space:
mode:
authorstuebinm2021-12-02 02:28:23 +0100
committerstuebinm2021-12-02 16:00:54 +0100
commit7d8c66b4c3ffd610ef0da98c3f2ff8626f1c8af6 (patch)
tree1fd37b223dea6001c421aa17471d5108d2eb4e0a /lib/Types.hs
parentc2a49d6ea46c38f107ac1a47a965e4777be2aecc (diff)
collect badges from object layers
this includes a halfway-reasonable parsing of object layers, as well as some monad plumbing to get them all in the right place.
Diffstat (limited to 'lib/Types.hs')
-rw-r--r--lib/Types.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Types.hs b/lib/Types.hs
index 1099630..481dd22 100644
--- a/lib/Types.hs
+++ b/lib/Types.hs
@@ -15,6 +15,7 @@ import Data.Aeson (FromJSON, ToJSON (toJSON),
import Data.Text (Text)
import GHC.Generics (Generic)
+import Badges (Badge)
import qualified Data.Aeson as A
import Data.Maybe (mapMaybe)
import Paths (RelPath)
@@ -47,7 +48,7 @@ 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
+data Lint = Depends Dep | Offers Text | Lint Hint | Badge Badge
deriving (Ord, Eq, Generic, ToJSONKey)
-- | TODO: add a reasonable representation of possible urls