skeleton/Types.hs

25 lines
478 B
Haskell
Raw Normal View History

2015-07-07 14:55:02 +02:00
module Types where
import Data.Time (LocalTime)
data Item =
Item { keychain :: FilePath
, itemClass :: ItemClass
, attrs :: [Attrib]
, content :: String
} deriving (Eq, Show)
data ItemClass =
Id Integer |
Inet |
Genp deriving (Eq, Show)
data Value =
Date LocalTime |
Str String |
Num Integer |
Null deriving (Eq, Show)
type Keychain = [Item]
type Attrib = (Name, Value)
type Name = Either String Integer