You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Hpack/Config.hs
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -849,16 +849,18 @@ sectionAll f sect = f sect <> foldMap (foldMap $ sectionAll f) (sectionCondition
849
849
850
850
decodeValue::FromValuea=>ProgramName->FilePath->Value->Warnings (ErrorsIO) a
851
851
decodeValue (ProgramName programName) file value =do
852
-
(r, unknown) <- lift .ExceptT.return$ first (prefix ++) (Config.decodeValue value)
852
+
(r, warnings) <- lift .ExceptT.return$ first (prefix ++) (Config.decodeValue value)
853
853
case r of
854
854
UnsupportedSpecVersion v ->do
855
855
lift $ throwE ("The file "++ file ++" requires version "++ showVersion v ++" of the Hpack package specification, however this version of "++ programName ++" only supports versions up to "++ showVersion Hpack.version ++". Upgrading to the latest version of "++ programName ++" may resolve this issue.")
856
856
SupportedSpecVersion a ->do
857
-
tell (mapformatUnknownField unknown)
857
+
tell (mapformatWarning warnings)
858
858
return a
859
859
where
860
860
prefix = file ++": "
861
-
formatUnknownField name = prefix ++"Ignoring unrecognized field "++ name
861
+
formatWarning warning = prefix ++case warning of
862
+
Warning path (WarningReason reason) -> reason <>" in "<> path
863
+
Warning path UnknownField->"Ignoring unrecognized field "<> path
0 commit comments