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