{-# LANGUAGE DeriveGeneric #-} module Model.Translated where import GHC.Generics import Data.Yaml import Model.Translation.Language data Translated = Translated { english :: String , french :: String } deriving (Show, Read, Eq, Generic) instance FromJSON Translated getTranslation :: Language -> Translated -> String getTranslation English translated = english translated getTranslation French translated = french translated