aboutsummaryrefslogtreecommitdiffhomepage
path: root/specification/src/Text/Edifact/D01B/Segments/LOC.hs
blob: 6b67b9998389382d97a1550dad71d7f67f337205 (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
62
{-# LANGUAGE OverloadedStrings #-}

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

module Text.Edifact.D01B.Segments.LOC
  ( -- * Definition
    segmentLOC
    -- * Dependencies
  , compositeC517
  , compositeC519
  , compositeC553
  , simple3227
  , simple5479
  ) where

import           Text.Edifact.D01B.Composites (compositeC517, compositeC519,
                                               compositeC553)
import           Text.Edifact.D01B.Simples    (simple3227, simple5479)

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

-- | Derived from this specification:
--
-- >        LOC  PLACE/LOCATION IDENTIFICATION
-- >
-- >        Function: To identify a place or a location and/or related
-- >                  locations.
-- >
-- > 010    3227 LOCATION FUNCTION CODE QUALIFIER           M    1 an..3
-- >
-- > 020    C517 LOCATION IDENTIFICATION                    C    1
-- >        3225  Location name code                        C      an..25
-- >        1131  Code list identification code             C      an..17
-- >        3055  Code list responsible agency code         C      an..3
-- >        3224  Location name                             C      an..256
-- >
-- > 030    C519 RELATED LOCATION ONE IDENTIFICATION        C    1
-- >        3223  First related location name code          C      an..25
-- >        1131  Code list identification code             C      an..17
-- >        3055  Code list responsible agency code         C      an..3
-- >        3222  First related location name               C      an..70
-- >
-- > 040    C553 RELATED LOCATION TWO IDENTIFICATION        C    1
-- >        3233  Second related location name code         C      an..25
-- >        1131  Code list identification code             C      an..17
-- >        3055  Code list responsible agency code         C      an..3
-- >        3232  Second related location name              C      an..70
-- >
-- > 050    5479 RELATION CODE                              C    1 an..3
--
-- Dependencies: 'compositeC517', 'compositeC519', 'compositeC553', 'simple3227', 'simple5479'.
segmentLOC :: Parser Value
segmentLOC =
  segment "LOC"
    [ "010" .@ mandatory simple3227
    , "020" .@ optional  compositeC517
    , "030" .@ optional  compositeC519
    , "040" .@ optional  compositeC553
    , "050" .@ optional  simple5479
    ]