aboutsummaryrefslogtreecommitdiffhomepage
path: root/specification/src/Text/Edifact/D01B/Segments/FTX.hs
blob: 72a48367ea7ddf435be5ae2bc366b0b3ce4f9c46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{-# LANGUAGE OverloadedStrings #-}

---- Machine generated code.
---- Output of edi-parser-scaffolder

module Text.Edifact.D01B.Segments.FTX
  ( -- * Definition
    segmentFTX
    -- * Dependencies
  , compositeC107
  , compositeC108
  , simple3453
  , simple4447
  , simple4451
  , simple4453
  ) where

import           Text.Edifact.D01B.Composites (compositeC107, compositeC108)
import           Text.Edifact.D01B.Simples    (simple3453, simple4447,
                                               simple4451, simple4453)

import           Text.Edifact.Parsing
import           Text.Edifact.Types           (Value)

-- | Derived from this specification:
--
-- >        FTX  FREE TEXT
-- >
-- >        Function: To provide free form or coded text information.
-- >
-- > 010    4451 TEXT SUBJECT CODE QUALIFIER                M    1 an..3
-- >
-- > 020    4453 FREE TEXT FUNCTION CODE                    C    1 an..3
-- >
-- > 030    C107 TEXT REFERENCE                             C    1
-- >        4441  Free text value code                      M      an..17
-- >        1131  Code list identification code             C      an..17
-- >        3055  Code list responsible agency code         C      an..3
-- >
-- > 040    C108 TEXT LITERAL                               C    1
-- >        4440  Free text value                           M      an..512
-- >        4440  Free text value                           C      an..512
-- >        4440  Free text value                           C      an..512
-- >        4440  Free text value                           C      an..512
-- >        4440  Free text value                           C      an..512
-- >
-- > 050    3453 LANGUAGE NAME CODE                         C    1 an..3
-- >
-- > 060    4447 FREE TEXT FORMAT CODE                      C    1 an..3
--
-- Dependencies: 'compositeC107', 'compositeC108', 'simple3453', 'simple4447', 'simple4451', 'simple4453'.
segmentFTX :: Parser Value
segmentFTX =
  segment "FTX"
    [ "010" .@ mandatory simple4451
    , "020" .@ optional  simple4453
    , "030" .@ optional  compositeC107
    , "040" .@ optional  compositeC108
    , "050" .@ optional  simple3453
    , "060" .@ optional  simple4447
    ]