---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: Map {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "haskellPathsInDir",
       position: (6, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "root",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: LetIn {
      bindings: [
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "root-files",
           position: (8, 9),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "builtins",
           position: (8, 22),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "attrNames",
             position: (8, 31),
            },
           ],
          },
          default: None,
         },
         arguments: [
          FunctionApplication {
           function: PropertyAccess {
            expression: Variable {
             identifier: "builtins",
             position: (8, 42),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "readDir",
               position: (8, 51),
              },
             ],
            },
            default: None,
           },
           arguments: [
            Variable {
             identifier: "root",
             position: (8, 59),
            },
           ],
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "root-files-with-paths",
           position: (10, 9),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "map",
          position: (11, 11),
         },
         arguments: [
          Function {
           argument: Some(
            "file",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "name",
                 position: (12, 15),
                },
               ],
              },
              Variable {
               identifier: "file",
               position: (12, 22),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "value",
                 position: (12, 28),
                },
               ],
              },
              BinaryOperation {
               operator: Addition,
               operands: [
                Variable {
                 identifier: "root",
                 position: (12, 36),
                },
                String {
                 parts: [
                  Raw {
                   content: "/",
                   position: (12, 44),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "file",
                    position: (12, 47),
                   },
                  },
                 ],
                },
               ],
               position: (12, 41),
              },
             ),
            ],
            recursive: false,
            position: (12, 13),
           },
           position: (11, 16),
          },
          Variable {
           identifier: "root-files",
           position: (13, 13),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "cabal-subdirs",
           position: (15, 9),
          },
         ],
        },
        FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "builtins",
           position: (16, 11),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "filter",
             position: (16, 20),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Function {
           argument: None,
           arguments: FunctionArguments {
            arguments: [
             FunctionArgument {
              identifier: "value",
              default: None,
             },
             FunctionArgument {
              identifier: "name",
              default: None,
             },
            ],
            ellipsis: false,
           },
           definition: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (17, 13),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "pathExists",
                position: (17, 22),
               },
              ],
             },
             default: None,
            },
            arguments: [
             BinaryOperation {
              operator: Addition,
              operands: [
               Variable {
                identifier: "value",
                position: (17, 34),
               },
               String {
                parts: [
                 Raw {
                  content: "/",
                  position: (17, 43),
                 },
                 Expression {
                  expression: Variable {
                   identifier: "name",
                   position: (17, 46),
                  },
                 },
                 Raw {
                  content: ".cabal",
                  position: (17, 51),
                 },
                ],
               },
              ],
              position: (17, 40),
             },
            ],
           },
           position: (16, 28),
          },
          Variable {
           identifier: "root-files-with-paths",
           position: (18, 13),
          },
         ],
        },
       ),
      ],
      target: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "builtins",
         position: (19, 8),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "listToAttrs",
           position: (19, 17),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Variable {
         identifier: "cabal-subdirs",
         position: (19, 29),
        },
       ],
      },
      position: (7, 5),
     },
     position: (6, 23),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "locateDominatingFile",
       position: (28, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "pattern",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: Function {
      argument: Some(
       "file",
      ),
      arguments: FunctionArguments {
       arguments: [],
       ellipsis: false,
      },
      definition: LetIn {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "go",
            position: (29, 9),
           },
          ],
         },
         Function {
          argument: Some(
           "path",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: LetIn {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "files",
                position: (30, 15),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "builtins",
                position: (30, 23),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "attrNames",
                  position: (30, 32),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               FunctionApplication {
                function: PropertyAccess {
                 expression: Variable {
                  identifier: "builtins",
                  position: (30, 43),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "readDir",
                    position: (30, 52),
                   },
                  ],
                 },
                 default: None,
                },
                arguments: [
                 Variable {
                  identifier: "path",
                  position: (30, 60),
                 },
                ],
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "matches",
                position: (31, 15),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "builtins",
                position: (31, 25),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "filter",
                  position: (31, 34),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               Function {
                argument: Some(
                 "match",
                ),
                arguments: FunctionArguments {
                 arguments: [],
                 ellipsis: false,
                },
                definition: BinaryOperation {
                 operator: NotEqualTo,
                 operands: [
                  Variable {
                   identifier: "match",
                   position: (31, 49),
                  },
                  Variable {
                   identifier: "null",
                   position: (31, 58),
                  },
                 ],
                 position: (31, 55),
                },
                position: (31, 42),
               },
               FunctionApplication {
                function: Variable {
                 identifier: "map",
                 position: (32, 28),
                },
                arguments: [
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "builtins",
                    position: (32, 33),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "match",
                      position: (32, 42),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   Variable {
                    identifier: "pattern",
                    position: (32, 48),
                   },
                  ],
                 },
                 Variable {
                  identifier: "files",
                  position: (32, 57),
                 },
                ],
               },
              ],
             },
            ),
           ],
           target: IfThenElse {
            predicate: BinaryOperation {
             operator: NotEqualTo,
             operands: [
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "builtins",
                 position: (34, 16),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "length",
                   position: (34, 25),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                Variable {
                 identifier: "matches",
                 position: (34, 32),
                },
               ],
              },
              Int {
               value: 0,
               position: (34, 43),
              },
             ],
             position: (34, 40),
            },
            then: Map {
             bindings: [
              Inherit(
               None,
               [
                Raw {
                 content: "path",
                 position: (35, 30),
                },
                Raw {
                 content: "matches",
                 position: (35, 35),
                },
               ],
              ),
             ],
             recursive: false,
             position: (35, 20),
            },
            else_: IfThenElse {
             predicate: BinaryOperation {
              operator: EqualTo,
              operands: [
               Variable {
                identifier: "path",
                position: (36, 23),
               },
               Path {
                parts: [
                 Raw {
                  content: "/.",
                  position: (36, 31),
                 },
                ],
               },
              ],
              position: (36, 28),
             },
             then: Variable {
              identifier: "null",
              position: (37, 22),
             },
             else_: FunctionApplication {
              function: Variable {
               identifier: "go",
               position: (38, 22),
              },
              arguments: [
               FunctionApplication {
                function: Variable {
                 identifier: "dirOf",
                 position: (38, 26),
                },
                arguments: [
                 Variable {
                  identifier: "path",
                  position: (38, 32),
                 },
                ],
               },
              ],
             },
             position: (36, 20),
            },
            position: (34, 13),
           },
           position: (30, 11),
          },
          position: (29, 14),
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "parent",
            position: (39, 9),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "dirOf",
           position: (39, 18),
          },
          arguments: [
           Variable {
            identifier: "file",
            position: (39, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "isDir",
            position: (40, 9),
           },
          ],
         },
         LetIn {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "base",
               position: (41, 15),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "baseNameOf",
              position: (41, 22),
             },
             arguments: [
              Variable {
               identifier: "file",
               position: (41, 33),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "type",
               position: (42, 15),
              },
             ],
            },
            PropertyAccess {
             expression: FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "builtins",
                position: (42, 23),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "readDir",
                  position: (42, 32),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               Variable {
                identifier: "parent",
                position: (42, 40),
               },
              ],
             },
             attribute_path: AttributePath {
              attributes: [
               Expression {
                expression: Variable {
                 identifier: "base",
                 position: (42, 50),
                },
               },
              ],
             },
             default: Some(
              Variable {
               identifier: "null",
               position: (42, 59),
              },
             ),
            },
           ),
          ],
          target: BinaryOperation {
           operator: LogicalOr,
           operands: [
            BinaryOperation {
             operator: EqualTo,
             operands: [
              Variable {
               identifier: "file",
               position: (43, 14),
              },
              Path {
               parts: [
                Raw {
                 content: "/.",
                 position: (43, 22),
                },
               ],
              },
             ],
             position: (43, 19),
            },
            BinaryOperation {
             operator: EqualTo,
             operands: [
              Variable {
               identifier: "type",
               position: (43, 28),
              },
              String {
               parts: [
                Raw {
                 content: "directory",
                 position: (43, 37),
                },
               ],
              },
             ],
             position: (43, 33),
            },
           ],
           position: (43, 25),
          },
          position: (41, 11),
         },
        ),
       ],
       target: FunctionApplication {
        function: Variable {
         identifier: "go",
         position: (44, 8),
        },
        arguments: [
         IfThenElse {
          predicate: Variable {
           identifier: "isDir",
           position: (44, 15),
          },
          then: Variable {
           identifier: "file",
           position: (44, 26),
          },
          else_: Variable {
           identifier: "parent",
           position: (44, 36),
          },
          position: (44, 12),
         },
        ],
       },
       position: (29, 5),
      },
      position: (28, 35),
     },
     position: (28, 26),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "listFilesRecursive",
       position: (50, 3),
      },
     ],
    },
    Function {
     argument: Some(
      "dir",
     ),
     arguments: FunctionArguments {
      arguments: [],
      ellipsis: false,
     },
     definition: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "lib",
        position: (50, 29),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "flatten",
          position: (50, 33),
         },
        ],
       },
       default: None,
      },
      arguments: [
       FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "lib",
          position: (50, 42),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "mapAttrsToList",
            position: (50, 46),
           },
          ],
         },
         default: None,
        },
        arguments: [
         Function {
          argument: Some(
           "name",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: Function {
           argument: Some(
            "type",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: IfThenElse {
            predicate: BinaryOperation {
             operator: EqualTo,
             operands: [
              Variable {
               identifier: "type",
               position: (51, 8),
              },
              String {
               parts: [
                Raw {
                 content: "directory",
                 position: (51, 17),
                },
               ],
              },
             ],
             position: (51, 13),
            },
            then: FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "lib",
               position: (52, 7),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "filesystem",
                 position: (52, 11),
                },
                Raw {
                 content: "listFilesRecursive",
                 position: (52, 22),
                },
               ],
              },
              default: None,
             },
             arguments: [
              BinaryOperation {
               operator: Addition,
               operands: [
                Variable {
                 identifier: "dir",
                 position: (52, 42),
                },
                String {
                 parts: [
                  Raw {
                   content: "/",
                   position: (52, 49),
                  },
                  Expression {
                   expression: Variable {
                    identifier: "name",
                    position: (52, 52),
                   },
                  },
                 ],
                },
               ],
               position: (52, 46),
              },
             ],
            },
            else_: BinaryOperation {
             operator: Addition,
             operands: [
              Variable {
               identifier: "dir",
               position: (54, 7),
              },
              String {
               parts: [
                Raw {
                 content: "/",
                 position: (54, 14),
                },
                Expression {
                 expression: Variable {
                  identifier: "name",
                  position: (54, 17),
                 },
                },
               ],
              },
             ],
             position: (54, 11),
            },
            position: (51, 5),
           },
           position: (50, 68),
          },
          position: (50, 62),
         },
         FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "builtins",
            position: (55, 6),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "readDir",
              position: (55, 15),
             },
            ],
           },
           default: None,
          },
          arguments: [
           Variable {
            identifier: "dir",
            position: (55, 23),
           },
          ],
         },
        ],
       },
      ],
     },
     position: (50, 24),
    },
   ),
  ],
  recursive: false,
  position: (2, 1),
 },
 position: (1, 1),
}