module Config.Value
( Section(..)
, Value(..)
, Atom(..)
) where
import Data.Text (Text)
import Data.Data (Data, Typeable)
import Data.String (IsString(..))
import GHC.Generics (Generic)
data Section = Section
{ sectionName :: Text
, sectionValue :: Value
}
deriving (Eq, Read, Show, Typeable, Data, Generic)
newtype Atom = MkAtom { atomName :: Text }
deriving (Eq, Ord, Show, Read, Typeable, Data, Generic)
instance IsString Atom where
fromString = MkAtom . fromString
data Value
= Sections [Section]
| Number Int Integer
| Text Text
| Atom Atom
| List [Value]
deriving (Eq, Read, Show, Typeable, Data, Generic)