ogma-language-xlsx-1.12.0: Ogma: Runtime Monitor translator: XLSX Frontend

Safe Haskell | None
Language | Haskell2010

Language.XLSXSpec.Parser

Description

Parser for Ogma specs stored in XLSX files.

Synopsis

- data XLSXFormat = XLSXFormat {
  - skipHeaders :: Bool
  - specRequirementSheet :: String
  - specRequirementId :: Int
  - specRequirementDesc :: Maybe Int
  - specRequirementExpr :: Int
  - specRequirementResultType :: Maybe Int
  - specRequirementResultExpr :: Maybe Int
  }
- parseXLSXSpec :: (String -> IO (Either String a)) -> a -> XLSXFormat -> ByteString -> IO (Either String (Spec a))

# Documentation

data XLSXFormat Source #

Area of the CSV file that contains the information of interest.

Constructors

XLSXFormat |

Fields

- skipHeaders :: Bool
- specRequirementSheet :: String
- specRequirementId :: Int
- specRequirementDesc :: Maybe Int
- specRequirementExpr :: Int
- specRequirementResultType :: Maybe Int
- specRequirementResultExpr :: Maybe Int

#### Instances

Instances details

Read XLSXFormat Source # |
Instance details Defined in Language.XLSXSpec.Parser Methods readsPrec :: Int -> ReadS XLSXFormat Source # readList :: ReadS [XLSXFormat] Source # readPrec :: ReadPrec XLSXFormat Source # readListPrec :: ReadPrec [XLSXFormat] Source #

parseXLSXSpec Source #

Arguments

:: (String -> IO (Either String a)) | Parser for expressions.
-> a | Default property value.
-> XLSXFormat | Spec format.
-> ByteString | String containing XLSX.
-> IO (Either String (Spec a)) |

Parse a XLSX file and extract a Spec from it.

An auxiliary function must be provided to parse the requirement expressions.

Fails if the sheet does not exist, any of the columns indicate a column out of range, if the XLSX is malformed.