Add Text support
This commit is contained in:
parent
91e52aeb2a
commit
8ff8726abe
|
@ -1,3 +1,4 @@
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
module SiteGenerator (generateSite) where
|
module SiteGenerator (generateSite) where
|
||||||
|
|
||||||
import Types
|
import Types
|
||||||
|
|
|
@ -5,9 +5,11 @@ module Types.Value
|
||||||
|
|
||||||
import Types.Values
|
import Types.Values
|
||||||
|
|
||||||
|
import Data.Text (Text)
|
||||||
import Language.Haskell.TH.Syntax (Lift)
|
import Language.Haskell.TH.Syntax (Lift)
|
||||||
|
|
||||||
data Value = String String
|
data Value = String String
|
||||||
|
| Text Text
|
||||||
| Bool Bool
|
| Bool Bool
|
||||||
| ImageConversionSettings ImageConversionSettings
|
| ImageConversionSettings ImageConversionSettings
|
||||||
| Template Template
|
| Template Template
|
||||||
|
@ -22,5 +24,8 @@ class Valuable a where
|
||||||
instance Valuable String where
|
instance Valuable String where
|
||||||
toValue = String
|
toValue = String
|
||||||
|
|
||||||
|
instance Valuable Text where
|
||||||
|
toValue = Text
|
||||||
|
|
||||||
instance Valuable ImageConversionSettings where
|
instance Valuable ImageConversionSettings where
|
||||||
toValue = ImageConversionSettings
|
toValue = ImageConversionSettings
|
||||||
|
|
Loading…
Reference in New Issue