Safe Haskell | Safe-Infered |
---|
- data AttributeType
- = Numeric
- | Nominal [ByteString]
- | String
- data Attribute = Attribute {}
- data Header = Header {
- title :: ByteString
- attributes :: [Attribute]
- data AttributeValue
- showAttributeValue :: AttributeValue -> String
- before :: Parser p1 -> Parser p2 -> Parser p1
- isInlineSpace :: Char -> Bool
- lineSpace :: Parser ()
- comment :: Parser ()
- lineEnd :: Parser ()
- identifier :: Parser ByteString
- relation :: Parser ByteString
- attributeType :: Parser AttributeType
- attribute :: Parser Attribute
- line :: Parser p -> Parser p
- header :: Parser Header
- value' :: AttributeType -> Parser AttributeValue
- value :: AttributeType -> Parser (Maybe AttributeValue)
- row :: [AttributeType] -> Parser [Maybe AttributeValue]
- rows :: Header -> Parser [[Maybe AttributeValue]]
- arff :: Parser (Header, [[Maybe AttributeValue]])
Documentation
Represents the entire header
Header | |
|
data AttributeValue Source
Value of a single attribute in a single row
before :: Parser p1 -> Parser p2 -> Parser p1Source
Parse two expressions sequentially, returning the result of the first.
isInlineSpace :: Char -> BoolSource
matches non-newline space characters
Matches what should be the end of the line- optional comment then newline.
identifier :: Parser ByteStringSource
identifier
parses arguments to \@
directives, e.g. @RELATION foo
TODO: Check these rules against the spec!
TODO: Allow quoted identifiers with spaces inside.
relation :: Parser ByteStringSource
Parse the title of the relation
value' :: AttributeType -> Parser AttributeValueSource
Parse a value of the expected type (not handling missings)
value :: AttributeType -> Parser (Maybe AttributeValue)Source
Parse a value of the expected type, returning Nothing for missing values
row :: [AttributeType] -> Parser [Maybe AttributeValue]Source
Create a parser which parses a single row of AttributeValues, expecting each to be in order of the Attributes supplied.