---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "duckling",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (8, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (9, 5),
           },
           Raw {
            content: "duckling",
            position: (9, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (10, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (10, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "duckling",
                 position: (10, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (12, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (12, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (13, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (13, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (13, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (14, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8080,
                  position: (14, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (15, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Port on which duckling will run.\n",
                    position: (16, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (12, 23),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (9, 25),
         },
        ),
       ],
       recursive: false,
       position: (8, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (22, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (22, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (22, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (22, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (23, 5),
             },
             Raw {
              content: "services",
              position: (23, 13),
             },
             Raw {
              content: "duckling",
              position: (23, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (24, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Duckling server service",
                 position: (24, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (25, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (25, 24),
                  },
                 ],
                },
               ],
               position: (25, 21),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (26, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (26, 24),
                  },
                 ],
                },
               ],
               position: (26, 21),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (28, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PORT",
                    position: (29, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "builtins",
                    position: (29, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "toString",
                      position: (29, 25),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (29, 34),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "port",
                       position: (29, 38),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (28, 21),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (32, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (33, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (33, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "haskellPackages",
                        position: (33, 29),
                       },
                       Raw {
                        content: "duckling",
                        position: (33, 45),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/duckling-example-exe --no-access-log --no-error-log",
                    position: (33, 54),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (34, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "always",
                    position: (34, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (35, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (35, 23),
                 },
                ),
               ],
               recursive: false,
               position: (32, 23),
              },
             ),
            ],
            recursive: false,
            position: (23, 33),
           },
          ),
         ],
         recursive: false,
         position: (22, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}