Skip to content

Commit

Permalink
Make lens param actually the lens
Browse files Browse the repository at this point in the history
  • Loading branch information
TauOmicronMu committed Jun 13, 2023
1 parent 4faf2e6 commit 56037cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions message-index/site.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ main = hakyll $ do

highlightField ident lens = field ident $ \item -> do
let name = getName item
case lens $ itemBody item of
case view lens $ itemBody item of
Nothing -> pure "<not present>"
Just exampleItem -> do
exampleText <- fmap itemBody $ load $ itemIdentifier exampleItem
Expand All @@ -92,8 +92,8 @@ main = hakyll $ do
_ -> ""
pure $ T.unpack $ highlight language $ T.pack $ exampleText

beforeField = highlightField "beforeHighlighted" (view _2)
afterField = highlightField "afterHighlighted" (view _3)
beforeField = highlightField "beforeHighlighted" _2
afterField = highlightField "afterHighlighted" _3
in [ indexlessUrlField "url",
nameField,
beforeField,
Expand Down

0 comments on commit 56037cd

Please sign in to comment.