replace OverloadedLabels with OverloadedRecordDot
This commit is contained in:
parent
cd5801dd7d
commit
28520eb443
8 changed files with 126 additions and 138 deletions
|
@ -48,7 +48,7 @@ main = do
|
|||
|
||||
main2 :: HasVerbose => ModeOptions -> IO ()
|
||||
main2 (SinglePage {root, file, prefix, index, dataDir, nsfw, output}) = do
|
||||
siteName <- #title <$> readYAML @IndexInfo index
|
||||
siteName <- (.title) <$> readYAML @IndexInfo index
|
||||
info <- readYAML file
|
||||
printV $ "contents" := info
|
||||
let dir = takeDirectory $ makeRelative dataDir file
|
||||
|
@ -121,7 +121,7 @@ galleryFromIndex :: FilePath -> FilePath -> IO GalleryInfo
|
|||
galleryFromIndex file prefix = do
|
||||
IndexInfo {galleries} <- readYAML file
|
||||
maybe (fail $ "no gallery with prefix " ++ prefix) pure $
|
||||
List.find (\g -> #prefix g == prefix) galleries
|
||||
List.find (\g -> g.prefix == prefix) galleries
|
||||
|
||||
decode1Must :: YAML.FromYAML a => FilePath -> ByteString -> IO a
|
||||
decode1Must file txt =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue