2 Module : Text.Edifact.Common
3 Description : Common syntax
5 This module should handle the main revision of the Edifact specification, which
8 Currently it barely covers the revision 3 and this has not been scaffolded.
10 One future evolution will be to scaffold the various revisions from a more
11 general specification.
13 module Text.Edifact.Common
24 import Text.Edifact.Parsing
25 import Text.Edifact.Parsing.Commons
27 import Text.Edifact.Common.Segments
29 import Data.Text (Text)
31 parseFull :: Parser value -> Text -> Either ParseError value
32 parseFull = parse . fullSyntaxParser
34 fullSyntaxParser :: Parser a -> Parser a
35 fullSyntaxParser messageParser =
37 tries [ segmentUNB *> messageParser <* segmentUNZ