From 8ff8726abe91e4668c878b64cf719954574cac0d Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Thu, 26 Sep 2024 22:48:20 +0200 Subject: [PATCH] Add Text support --- byg/src/SiteGenerator.hs | 1 + byg/src/Types/Value.hs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/byg/src/SiteGenerator.hs b/byg/src/SiteGenerator.hs index 01dcfa6..7c54666 100644 --- a/byg/src/SiteGenerator.hs +++ b/byg/src/SiteGenerator.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE OverloadedStrings #-} module SiteGenerator (generateSite) where import Types diff --git a/byg/src/Types/Value.hs b/byg/src/Types/Value.hs index 40ece10..8b71b43 100644 --- a/byg/src/Types/Value.hs +++ b/byg/src/Types/Value.hs @@ -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