Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ini data essentially consists of String
s, that cannot contain every character
because of the simple format it is contained in. The types in this module are
restricted to contain only allowed characters. They also can not be empty or
start or end with whitespace. Values of these types can not be created with
data constructors. Use the mk*
functions instead!
Synopsis
- data IniHeading
- data IniKey
- data IniValue
- mkHdg :: String -> Maybe IniHeading
- mkKey :: String -> Maybe IniKey
- mkVal :: String -> Maybe IniValue
- isValidHeading :: String -> Bool
- isValidKey :: String -> Bool
- isValidValue :: String -> Bool
- invalidHdgChars :: String
- invalidKeyChars :: String
- invalidValChars :: String
- isValidStr :: String -> Bool
Safe String
types
data IniHeading Source #
A section heading
Instances
IsString IniHeading Source # | |
Defined in Trivialini.SafeTypes fromString :: String -> IniHeading # | |
Show IniHeading Source # | |
Defined in Trivialini.SafeTypes showsPrec :: Int -> IniHeading -> ShowS # show :: IniHeading -> String # showList :: [IniHeading] -> ShowS # | |
Eq IniHeading Source # | |
Defined in Trivialini.SafeTypes (==) :: IniHeading -> IniHeading -> Bool # (/=) :: IniHeading -> IniHeading -> Bool # | |
Ord IniHeading Source # | |
Defined in Trivialini.SafeTypes compare :: IniHeading -> IniHeading -> Ordering # (<) :: IniHeading -> IniHeading -> Bool # (<=) :: IniHeading -> IniHeading -> Bool # (>) :: IniHeading -> IniHeading -> Bool # (>=) :: IniHeading -> IniHeading -> Bool # max :: IniHeading -> IniHeading -> IniHeading # min :: IniHeading -> IniHeading -> IniHeading # |
A key of a key-value pair
A value of a key-value pair
Value creation
Validity predicates
isValidHeading :: String -> Bool Source #
isValidKey :: String -> Bool Source #
isValidValue :: String -> Bool Source #
Invalid character lists (useful for parsers)
Utility predicate
isValidStr :: String -> Bool Source #