fix: hlint warnings in SchemaOrg module

- Remove unused DeriveGeneric pragma
- Use newtype for SchemaOrgPerson and SchemaOrgImageObject
- Remove redundant brackets around string literal
This commit is contained in:
2026-05-19 22:54:46 -04:00
parent 340b95cf79
commit a70cd86afd
+5 -6
View File
@@ -1,4 +1,3 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Roux.SchemaOrg (
@@ -50,14 +49,14 @@ data SchemaOrgRecipe = SchemaOrgRecipe
deriving stock (Eq, Show)
-- | A schema.org Person (recipe author).
data SchemaOrgPerson = SchemaOrgPerson
{ soPersonName :: !Text
newtype SchemaOrgPerson = SchemaOrgPerson
{ soPersonName :: Text
}
deriving stock (Eq, Show)
-- | A schema.org ImageObject (recipe image).
data SchemaOrgImageObject = SchemaOrgImageObject
{ soImageObjectUrl :: !Text
newtype SchemaOrgImageObject = SchemaOrgImageObject
{ soImageObjectUrl :: Text
}
deriving stock (Eq, Show)
@@ -258,7 +257,7 @@ buildIngredientSection :: [Text] -> Section
buildIngredientSection ings
| null ings = Section Nothing (SecStep (Step []) :| [])
| otherwise =
let items = concatMap (\t -> [StepText (", "), StepText t]) ings
let items = concatMap (\t -> [StepText ", ", StepText t]) ings
step = Step items
in Section (Just "Ingredients") (SecStep step :| [])