Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Dec 11, 2022
1 parent 4cc002c commit a8f0538
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Hpack/Yaml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Hpack.Yaml (
-- tool that supports Hpack (e.g. @stack@ or @cabal2nix@).

decodeYaml
, decodeYamlWithParseException
, decodeYamlWithParseError
, ParseException
, formatYamlParseError
, formatWarning
Expand All @@ -30,10 +30,10 @@ import Data.Aeson.Config.FromValue
import Data.Aeson.Config.Parser (fromAesonPath, formatPath)

decodeYaml :: FilePath -> IO (Either String ([String], Value))
decodeYaml file = first (formatYamlParseError file) <$> decodeYamlWithParseException file
decodeYaml file = first (formatYamlParseError file) <$> decodeYamlWithParseError file

decodeYamlWithParseException :: FilePath -> IO (Either ParseException ([String], Value))
decodeYamlWithParseException file = do
decodeYamlWithParseError :: FilePath -> IO (Either ParseException ([String], Value))
decodeYamlWithParseError file = do
result <- decodeFileWithWarnings file
return $ fmap (first (map $ formatWarning file)) result

Expand Down

0 comments on commit a8f0538

Please sign in to comment.