summaryrefslogtreecommitdiff
path: root/lib/Types.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Types.hs')
-rw-r--r--lib/Types.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Types.hs b/lib/Types.hs
index 00f0ee7..0d35432 100644
--- a/lib/Types.hs
+++ b/lib/Types.hs
@@ -10,7 +10,8 @@
module Types where
import Control.Monad.Trans.Maybe ()
-import Data.Aeson (ToJSON (toJSON), ToJSONKey, (.=))
+import Data.Aeson (FromJSON, ToJSON (toJSON),
+ ToJSONKey, (.=))
import Data.Text (Text)
import GHC.Generics (Generic)
@@ -27,7 +28,7 @@ import WithCli.Pure (Argument (argumentType, parseArgumen
-- | Levels of errors and warnings, collectively called
-- "Hints" until I can think of some better name
data Level = Info | Suggestion | Warning | Forbidden | Error | Fatal
- deriving (Show, Generic, Ord, Eq, ToJSON)
+ deriving (Show, Generic, Ord, Eq, ToJSON, FromJSON)
instance Argument Level where
argumentType Proxy = "Lint Level"