diff options
Diffstat (limited to 'src/Hakyll')
| -rw-r--r-- | src/Hakyll/Alias.hs | 1 | ||||
| -rw-r--r-- | src/Hakyll/Paper.hs | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Hakyll/Alias.hs b/src/Hakyll/Alias.hs index 73beb86..129ec42 100644 --- a/src/Hakyll/Alias.hs +++ b/src/Hakyll/Alias.hs @@ -29,6 +29,7 @@ aliasCtxtFrom name toa fromx ident = functionField1 name $ \s -> do -- personCtxt :: (StringConv StrictText s, Ord (Name s), ToMarkup s) => AliasMap (Name s) (Person s) -> Context a personCtxt :: Identifier -> Context a personCtxt = aliasCtxtFrom @Name_ @Person_ "personA" (parseName . toSL) (pure . toSL . personHtml) +-- personCtxt = aliasCtxtFrom @Name_ @Person_ "personA" (parseName . toSL) (pure . toSL . (\(Person n _) -> toMarkup $ renderNameFML n)) -- personCtxtFrom :: Identifier -> Context a -- personCtxtFrom = functionField1 diff --git a/src/Hakyll/Paper.hs b/src/Hakyll/Paper.hs index 609f74d..06c45d0 100644 --- a/src/Hakyll/Paper.hs +++ b/src/Hakyll/Paper.hs @@ -27,14 +27,14 @@ authorCtxt = fold $ [ field "name" $ pure . renderNameFML . fmap toSL . itemBody ] -paperCtxt :: StringConv a String => FieldContext a -> Context (Paper a) +paperCtxt :: StringConv a String => (forall b. Context b) -> Context (Paper a) paperCtxt fctxt = fold $ - [ listFieldWith "authors" (_authorCtxt fctxt <> authorCtxt) $ pure . traverse authors + [ listFieldWith "authors" (fctxt <> authorCtxt) $ pure . traverse authors -- fmap pure . authors . itemBody , field "abstract" $ liftMaybe . fmap toSL . abstract . itemBody , field "title" $ pure . toSL . title . itemBody , field "key" $ pure . sluggedKey . itemBody - , status >$< (statusCtxt <> _journalCtxt fctxt) + , status >$< (statusCtxt <> fctxt) , listFieldWith "eprints" eprintCtxt $ pure . traverse eprints -- , eprint >$< maybeContext eprintCtxt , field "extra" $ \i -> case extraLink $ itemBody i of @@ -47,7 +47,7 @@ paperCtxt fctxt = fold $ _ -> fail $ "No extra for " <> k ] -mkPaperContext :: (StringConv a String, StringConv String a) => FieldContext a -> [Paper a] -> Context b +mkPaperContext :: (StringConv a String, StringConv String a) => (forall c. Context c) -> [Paper a] -> Context b mkPaperContext fctxt papers = listField "papers" (paperCtxt fctxt) $ do fp <- getResourceFilePath forM papers $ \p -> do |
