1 {-# LANGUAGE OverloadedStrings #-}
3 module Text.Edifact.Common.Composites
13 import Text.Edifact.Common.Simples (simple0001, simple0002,
14 simple0004, simple0007,
15 simple0008, simple0010,
16 simple0014, simple0017,
17 simple0019, simple0022,
18 simple0025, simple0042,
19 simple0046, simple0051,
20 simple0052, simple0054,
21 simple0057, simple0065,
22 simple0070, simple0073,
23 simple0080, simple0133)
25 import Text.Edifact.Parsing
26 import Text.Edifact.Types (Value)
28 -- | Derived from this specification:
30 -- > 010 0001 Syntax identifier M a4
31 -- > 020 0002 Syntax version number M an1
32 -- > 030 0080 Service code list directory version number C an..6
33 -- > 040 0133 Character encoding, coded C an..3
35 -- Dependencies: 'simple0001', 'simple0002', 'simple0080', 'simple0133'.
36 compositeS001 :: Parser Value
39 [ "010" .@ mandatory simple0001
40 , "020" .@ mandatory simple0002
41 , "030" .@ optional simple0080
42 , "040" .@ optional simple0133
45 -- | Derived from this specification:
47 -- > 010 0004 Interchange sender identification M an..35
48 -- > 020 0007 Identification code qualifier C an..4
49 -- > 030 0008 Interchange sender internal identification C an..35
50 -- > 040 0042 Interchange sender internal sub-identification C an..35
52 -- Dependencies: 'simple0004', 'simple0007', 'simple0008', 'simple0042'.
53 compositeS002 :: Parser Value
56 [ "010" .@ mandatory simple0004
57 , "020" .@ optional simple0007
58 , "030" .@ optional simple0008
59 , "040" .@ optional simple0042
62 -- | Derived from this specification:
64 -- > 010 0010 Interchange recipient identification M an..35
65 -- > 020 0007 Identification code qualifier C an..4
66 -- > 030 0014 Interchange recipient internal identification C an..35
67 -- > 040 0046 Interchange recipient internal sub-identification C an..35
69 -- Dependencies: 'simple0007', 'simple0010', 'simple0014', 'simple0046'.
70 compositeS003 :: Parser Value
73 [ "010" .@ mandatory simple0010
74 , "020" .@ optional simple0007
75 , "030" .@ optional simple0014
76 , "040" .@ optional simple0046
79 -- | Derived from this specification:
81 -- > 010 0017 Date M n6
82 -- > 020 0019 Time M n4
84 -- Dependencies: 'simple0017', 'simple0019'.
85 compositeS004 :: Parser Value
88 [ "010" .@ mandatory simple0017
89 , "020" .@ mandatory simple0019
92 -- | Derived from this specification:
94 -- > 010 0022 Recipient reference/password M an..14
95 -- > 020 0025 Recipient reference/password qualifier C an2
97 -- Dependencies: 'simple0022', 'simple0025'.
98 compositeS005 :: Parser Value
101 [ "010" .@ mandatory simple0022
102 , "020" .@ optional simple0025
105 -- | Derived from this specification:
107 -- > 010 0065 Message type M an..6
108 -- > 020 0052 Message version number M an..3
109 -- > 030 0054 Message release number M an..3
110 -- > 040 0051 Controlling agency M an..2
111 -- > 050 0057 Association assigned code C an..6
113 -- Dependencies: 'simple0051', 'simple0052', 'simple0054', 'simple0057', 'simple0065'.
114 compositeS009 :: Parser Value
117 [ "010" .@ mandatory simple0065
118 , "020" .@ mandatory simple0052
119 , "030" .@ mandatory simple0054
120 , "040" .@ mandatory simple0051
121 , "050" .@ optional simple0057
124 -- | Derived from this specification:
126 -- > 010 0070 Sequence of transfers M n..2
127 -- > 020 0073 First and last transfer C a1
129 -- Dependencies: 'simple0070', 'simple0073'.
130 compositeS010 :: Parser Value
133 [ "010" .@ mandatory simple0070
134 , "020" .@ optional simple0073