1 {-# LANGUAGE OverloadedStrings #-}
3 module Text.Edifact.Common.Simples
39 import Text.Edifact.Parsing
40 import Text.Edifact.Types (Value)
42 -- | Derived from this specification:
44 -- > 0001 Syntax identifier
46 simple0001 :: Parser Value
47 simple0001 = simple "0001" (alpha `exactly` 4)
49 -- | Derived from this specification:
51 -- > 0002 Syntax version number
53 simple0002 :: Parser Value
54 simple0002 = simple "0002" (alphaNumeric `exactly` 1)
56 -- | Derived from this specification:
58 -- > 0004 Interchange sender identification
60 simple0004 :: Parser Value
61 simple0004 = simple "0004" (alphaNumeric `upTo` 35)
63 -- | Derived from this specification:
65 -- > 0007 Identification code qualifier
67 simple0007 :: Parser Value
68 simple0007 = simple "0007" (alphaNumeric `upTo` 4)
70 -- | Derived from this specification:
72 -- > 0008 Interchange sender internal identification
74 simple0008 :: Parser Value
75 simple0008 = simple "0008" (alphaNumeric `upTo` 35)
77 -- | Derived from this specification:
79 -- > 0010 Interchange recipient identification
81 simple0010 :: Parser Value
82 simple0010 = simple "0010" (alphaNumeric `upTo` 35)
84 -- | Derived from this specification:
86 -- > 0014 Interchange recipient internal identification
88 simple0014 :: Parser Value
89 simple0014 = simple "0014" (alphaNumeric `upTo` 35)
91 -- | Derived from this specification:
95 simple0017 :: Parser Value
96 simple0017 = simple "0017" (numeric `exactly` 6)
98 -- | Derived from this specification:
102 simple0019 :: Parser Value
103 simple0019 = simple "0019" (numeric `exactly` 4)
105 -- | Derived from this specification:
107 -- > 0020 Interchange control reference
109 simple0020 :: Parser Value
110 simple0020 = simple "0020" (alphaNumeric `upTo` 14)
112 -- | Derived from this specification:
114 -- > 0022 Recipient reference/password
116 simple0022 :: Parser Value
117 simple0022 = simple "0022" (alphaNumeric `upTo` 14)
119 -- | Derived from this specification:
121 -- > 0025 Recipient reference/password qualifier
123 simple0025 :: Parser Value
124 simple0025 = simple "0025" (alphaNumeric `exactly` 2)
126 -- | Derived from this specification:
128 -- > 0026 Application reference
130 simple0026 :: Parser Value
131 simple0026 = simple "0026" (alphaNumeric `upTo` 14)
133 -- | Derived from this specification:
135 -- > 0029 Processing priority code
137 simple0029 :: Parser Value
138 simple0029 = simple "0029" (alphaNumeric `exactly` 1)
140 -- | Derived from this specification:
142 -- > 0031 Acknowledgement request
144 simple0031 :: Parser Value
145 simple0031 = simple "0031" (numeric `exactly` 1)
147 -- | Derived from this specification:
149 -- > 0032 Interchange agreement identifier
151 simple0032 :: Parser Value
152 simple0032 = simple "0032" (alphaNumeric `upTo` 35)
154 -- | Derived from this specification:
156 -- > 0035 Test indicator
158 simple0035 :: Parser Value
159 simple0035 = simple "0035" (numeric `exactly` 1)
161 -- | Derived from this specification:
163 -- > 0036 Interchange control count
165 simple0036 :: Parser Value
166 simple0036 = simple "0036" (numeric `upTo` 6)
168 -- | Derived from this specification:
170 -- > 0042 Interchange sender internal sub-identification
172 simple0042 :: Parser Value
173 simple0042 = simple "0042" (alphaNumeric `upTo` 35)
175 -- | Derived from this specification:
177 -- > 0046 Interchange recipient internal sub-identification
179 simple0046 :: Parser Value
180 simple0046 = simple "0046" (alphaNumeric `upTo` 35)
182 -- | Derived from this specification:
184 -- > 0051 Controlling agency
186 simple0051 :: Parser Value
187 simple0051 = simple "0051" (alphaNumeric `upTo` 2)
189 -- | Derived from this specification:
191 -- > 0052 Message version number
193 simple0052 :: Parser Value
194 simple0052 = simple "0052" (alphaNumeric `upTo` 3)
196 -- | Derived from this specification:
198 -- > 0054 Message release number
200 simple0054 :: Parser Value
201 simple0054 = simple "0054" (alphaNumeric `upTo` 3)
203 -- | Derived from this specification:
205 -- > 0057 Association assigned code
207 simple0057 :: Parser Value
208 simple0057 = simple "0057" (alphaNumeric `upTo` 6)
210 -- | Derived from this specification:
212 -- > 0062 MESSAGE REFERENCE NUMBER
214 simple0062 :: Parser Value
215 simple0062 = simple "0062" (alphaNumeric `upTo` 14)
217 -- | Derived from this specification:
219 -- > 0065 Message type
221 simple0065 :: Parser Value
222 simple0065 = simple "0065" (alphaNumeric `upTo` 6)
224 -- | Derived from this specification:
226 -- > 0068 COMMON ACCESS REFERENCE
228 simple0068 :: Parser Value
229 simple0068 = simple "0068" (alphaNumeric `upTo` 35)
231 -- | Derived from this specification:
233 -- > 0070 Sequence of transfers
235 simple0070 :: Parser Value
236 simple0070 = simple "0070" (numeric `upTo` 2)
238 -- | Derived from this specification:
240 -- > 0073 First and last transfer
242 simple0073 :: Parser Value
243 simple0073 = simple "0073" (alpha `exactly` 1)
245 -- | Derived from this specification:
247 -- > 0074 NUMBER OF SEGMENTS IN THE MESSAGE
249 simple0074 :: Parser Value
250 simple0074 = simple "0074" (numeric `upTo` 6)
252 -- | Derived from this specification:
254 -- > 0080 Service code list directory version number
256 simple0080 :: Parser Value
257 simple0080 = simple "0080" (alphaNumeric `upTo` 6)
259 -- | Derived from this specification:
261 -- > 0081 SECTION IDENTIFICATION
263 simple0081 :: Parser Value
264 simple0081 = simple "0081" (alpha `exactly` 1)
266 -- | Derived from this specification:
268 -- > 0133 Character encoding, coded
270 simple0133 :: Parser Value
271 simple0133 = simple "0133" (alphaNumeric `upTo` 3)