Add Text support

This commit is contained in:
Niels G. W. Serup 2024-09-26 22:48:20 +02:00
parent 91e52aeb2a
commit 8ff8726abe
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
module SiteGenerator (generateSite) where
import Types

View File

@ -5,9 +5,11 @@ module Types.Value
import Types.Values
import Data.Text (Text)
import Language.Haskell.TH.Syntax (Lift)
data Value = String String
| Text Text
| Bool Bool
| ImageConversionSettings ImageConversionSettings
| Template Template
@ -22,5 +24,8 @@ class Valuable a where
instance Valuable String where
toValue = String
instance Valuable Text where
toValue = Text
instance Valuable ImageConversionSettings where
toValue = ImageConversionSettings