Function( Function { head: Destructured( FunctionHeadDestructured { ellipsis: true, identifier: None, arguments: [ FunctionHeadDestructuredArgument { identifier: "config", default: None, }, FunctionHeadDestructuredArgument { identifier: "lib", default: None, }, FunctionHeadDestructuredArgument { identifier: "pkgs", default: None, }, ], }, ), body: With( With { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 3, column: 6, }, end: Position { line: 3, column: 9, }, }, }, ), target: LetIn( LetIn { bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "cfg", span: Span { start: Position { line: 7, column: 3, }, end: Position { line: 7, column: 6, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 7, column: 9, }, end: Position { line: 7, column: 15, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "programs", span: Span { start: Position { line: 7, column: 16, }, end: Position { line: 7, column: 24, }, }, }, ), Raw( PartRaw { content: "htop", span: Span { start: Position { line: 7, column: 25, }, end: Position { line: 7, column: 29, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "fmt", span: Span { start: Position { line: 9, column: 3, }, end: Position { line: 9, column: 6, }, }, }, ), ], to: Function( Function { head: Simple( FunctionHeadSimple { identifier: "value", }, ), body: IfThenElse( IfThenElse { predicate: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "isList", span: Span { start: Position { line: 10, column: 8, }, end: Position { line: 10, column: 14, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 10, column: 15, }, end: Position { line: 10, column: 20, }, }, }, ), ], }, ), then: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "concatStringsSep", span: Span { start: Position { line: 10, column: 26, }, end: Position { line: 10, column: 42, }, }, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: " ", span: Span { start: Position { line: 10, column: 44, }, end: Position { line: 10, column: 45, }, }, }, ), ], span: Span { start: Position { line: 10, column: 43, }, end: Position { line: 10, column: 46, }, }, }, ), FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "map", span: Span { start: Position { line: 10, column: 48, }, end: Position { line: 10, column: 51, }, }, }, ), arguments: [ Identifier( Identifier { id: "fmt", span: Span { start: Position { line: 10, column: 52, }, end: Position { line: 10, column: 55, }, }, }, ), Identifier( Identifier { id: "value", span: Span { start: Position { line: 10, column: 56, }, end: Position { line: 10, column: 61, }, }, }, ), ], }, ), ], }, ), else_: IfThenElse( IfThenElse { predicate: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "isString", span: Span { start: Position { line: 11, column: 8, }, end: Position { line: 11, column: 16, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 11, column: 17, }, end: Position { line: 11, column: 22, }, }, }, ), ], }, ), then: Identifier( Identifier { id: "value", span: Span { start: Position { line: 11, column: 28, }, end: Position { line: 11, column: 33, }, }, }, ), else_: IfThenElse( IfThenElse { predicate: BinaryOperation( BinaryOperation { left: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "isBool", span: Span { start: Position { line: 12, column: 8, }, end: Position { line: 12, column: 14, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 12, column: 15, }, end: Position { line: 12, column: 20, }, }, }, ), ], }, ), operator: LogicalOr, right: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "isInt", span: Span { start: Position { line: 12, column: 24, }, end: Position { line: 12, column: 29, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 12, column: 30, }, end: Position { line: 12, column: 35, }, }, }, ), ], }, ), }, ), then: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "toString", span: Span { start: Position { line: 12, column: 41, }, end: Position { line: 12, column: 49, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 12, column: 50, }, end: Position { line: 12, column: 55, }, }, }, ), ], }, ), else_: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "throw", span: Span { start: Position { line: 13, column: 5, }, end: Position { line: 13, column: 10, }, }, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Unrecognized type ", span: Span { start: Position { line: 13, column: 12, }, end: Position { line: 13, column: 45, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "typeOf", span: Span { start: Position { line: 13, column: 32, }, end: Position { line: 13, column: 38, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 13, column: 39, }, end: Position { line: 13, column: 44, }, }, }, ), ], }, ), }, ), Raw( PartRaw { content: " in htop settings", span: Span { start: Position { line: 13, column: 12, }, end: Position { line: 13, column: 62, }, }, }, ), ], span: Span { start: Position { line: 13, column: 11, }, end: Position { line: 13, column: 63, }, }, }, ), ], }, ), span: Span { start: Position { line: 12, column: 5, }, end: Position { line: 13, column: 63, }, }, }, ), span: Span { start: Position { line: 11, column: 5, }, end: Position { line: 13, column: 63, }, }, }, ), span: Span { start: Position { line: 10, column: 5, }, end: Position { line: 13, column: 63, }, }, }, ), span: Span { start: Position { line: 9, column: 9, }, end: Position { line: 13, column: 63, }, }, }, ), }, ), ], target: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "options", span: Span { start: Position { line: 19, column: 3, }, end: Position { line: 19, column: 10, }, }, }, ), Raw( PartRaw { content: "programs", span: Span { start: Position { line: 19, column: 11, }, end: Position { line: 19, column: 19, }, }, }, ), Raw( PartRaw { content: "htop", span: Span { start: Position { line: 19, column: 20, }, end: Position { line: 19, column: 24, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "package", span: Span { start: Position { line: 20, column: 5, }, end: Position { line: 20, column: 12, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 20, column: 15, }, end: Position { line: 20, column: 23, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 21, column: 7, }, end: Position { line: 21, column: 11, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 21, column: 14, }, end: Position { line: 21, column: 19, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "package", span: Span { start: Position { line: 21, column: 20, }, end: Position { line: 21, column: 27, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 22, column: 7, }, end: Position { line: 22, column: 14, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 22, column: 17, }, end: Position { line: 22, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "htop", span: Span { start: Position { line: 22, column: 22, }, end: Position { line: 22, column: 26, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "defaultText", span: Span { start: Position { line: 23, column: 7, }, end: Position { line: 23, column: 18, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "pkgs.htop", span: Span { start: Position { line: 23, column: 22, }, end: Position { line: 23, column: 31, }, }, }, ), ], span: Span { start: Position { line: 23, column: 21, }, end: Position { line: 23, column: 32, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 24, column: 7, }, end: Position { line: 24, column: 18, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 24, column: 21, }, end: Position { line: 24, column: 24, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 24, column: 25, }, end: Position { line: 24, column: 30, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "The htop package that should be used.\n", span: Span { start: Position { line: 25, column: 1, }, end: Position { line: 26, column: 7, }, }, }, ), ], span: Span { start: Position { line: 24, column: 31, }, end: Position { line: 26, column: 9, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 20, column: 24, }, end: Position { line: 27, column: 6, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 29, column: 5, }, end: Position { line: 29, column: 11, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkEnableOption", span: Span { start: Position { line: 29, column: 14, }, end: Position { line: 29, column: 28, }, }, }, ), arguments: [ FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 29, column: 30, }, end: Position { line: 29, column: 33, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 29, column: 34, }, end: Position { line: 29, column: 39, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "htop process monitor", span: Span { start: Position { line: 29, column: 41, }, end: Position { line: 29, column: 61, }, }, }, ), ], span: Span { start: Position { line: 29, column: 40, }, end: Position { line: 29, column: 62, }, }, }, ), ], }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "settings", span: Span { start: Position { line: 31, column: 5, }, end: Position { line: 31, column: 13, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 31, column: 16, }, end: Position { line: 31, column: 24, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 32, column: 7, }, end: Position { line: 32, column: 11, }, }, }, ), ], to: With( With { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 32, column: 19, }, end: Position { line: 32, column: 24, }, }, }, ), target: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "attrsOf", span: Span { start: Position { line: 32, column: 26, }, end: Position { line: 32, column: 33, }, }, }, ), arguments: [ FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "oneOf", span: Span { start: Position { line: 32, column: 35, }, end: Position { line: 32, column: 40, }, }, }, ), arguments: [ List( List { elements: [ Identifier( Identifier { id: "str", span: Span { start: Position { line: 32, column: 43, }, end: Position { line: 32, column: 46, }, }, }, ), Identifier( Identifier { id: "int", span: Span { start: Position { line: 32, column: 47, }, end: Position { line: 32, column: 50, }, }, }, ), Identifier( Identifier { id: "bool", span: Span { start: Position { line: 32, column: 51, }, end: Position { line: 32, column: 55, }, }, }, ), FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "listOf", span: Span { start: Position { line: 32, column: 57, }, end: Position { line: 32, column: 63, }, }, }, ), arguments: [ FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "oneOf", span: Span { start: Position { line: 32, column: 65, }, end: Position { line: 32, column: 70, }, }, }, ), arguments: [ List( List { elements: [ Identifier( Identifier { id: "str", span: Span { start: Position { line: 32, column: 73, }, end: Position { line: 32, column: 76, }, }, }, ), Identifier( Identifier { id: "int", span: Span { start: Position { line: 32, column: 77, }, end: Position { line: 32, column: 80, }, }, }, ), Identifier( Identifier { id: "bool", span: Span { start: Position { line: 32, column: 81, }, end: Position { line: 32, column: 85, }, }, }, ), ], span: Span { start: Position { line: 32, column: 71, }, end: Position { line: 32, column: 87, }, }, }, ), ], }, ), ], }, ), ], span: Span { start: Position { line: 32, column: 41, }, end: Position { line: 32, column: 91, }, }, }, ), ], }, ), ], }, ), span: Span { start: Position { line: 32, column: 14, }, end: Position { line: 32, column: 92, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 33, column: 7, }, end: Position { line: 33, column: 14, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [], span: Span { start: Position { line: 33, column: 17, }, end: Position { line: 33, column: 19, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 34, column: 7, }, end: Position { line: 34, column: 14, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "hide_kernel_threads", span: Span { start: Position { line: 35, column: 9, }, end: Position { line: 35, column: 28, }, }, }, ), ], to: Identifier( Identifier { id: "true", span: Span { start: Position { line: 35, column: 31, }, end: Position { line: 35, column: 35, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "hide_userland_threads", span: Span { start: Position { line: 36, column: 9, }, end: Position { line: 36, column: 30, }, }, }, ), ], to: Identifier( Identifier { id: "true", span: Span { start: Position { line: 36, column: 33, }, end: Position { line: 36, column: 37, }, }, }, ), }, ), ], span: Span { start: Position { line: 34, column: 17, }, end: Position { line: 37, column: 8, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 38, column: 7, }, end: Position { line: 38, column: 18, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 38, column: 21, }, end: Position { line: 38, column: 24, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 38, column: 25, }, end: Position { line: 38, column: 30, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "Extra global default configuration for htop\nwhich is read on first startup only.\nHtop subsequently uses ~/.config/htop/htoprc\nas configuration source.\n", span: Span { start: Position { line: 39, column: 1, }, end: Position { line: 43, column: 7, }, }, }, ), ], span: Span { start: Position { line: 38, column: 31, }, end: Position { line: 43, column: 9, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 31, column: 25, }, end: Position { line: 44, column: 6, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 19, column: 27, }, end: Position { line: 45, column: 4, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "config", span: Span { start: Position { line: 47, column: 3, }, end: Position { line: 47, column: 9, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkIf", span: Span { start: Position { line: 47, column: 12, }, end: Position { line: 47, column: 16, }, }, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 47, column: 17, }, end: Position { line: 47, column: 20, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 47, column: 21, }, end: Position { line: 47, column: 27, }, }, }, ), ], default: None, }, ), Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "environment", span: Span { start: Position { line: 48, column: 5, }, end: Position { line: 48, column: 16, }, }, }, ), Raw( PartRaw { content: "systemPackages", span: Span { start: Position { line: 48, column: 17, }, end: Position { line: 48, column: 31, }, }, }, ), ], to: List( List { elements: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 49, column: 7, }, end: Position { line: 49, column: 10, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "package", span: Span { start: Position { line: 49, column: 11, }, end: Position { line: 49, column: 18, }, }, }, ), ], default: None, }, ), ], span: Span { start: Position { line: 48, column: 34, }, end: Position { line: 50, column: 6, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "environment", span: Span { start: Position { line: 52, column: 5, }, end: Position { line: 52, column: 16, }, }, }, ), Raw( PartRaw { content: "etc", span: Span { start: Position { line: 52, column: 17, }, end: Position { line: 52, column: 20, }, }, }, ), Expression( PartExpression { expression: String( String_ { parts: [ Raw( PartRaw { content: "htoprc", span: Span { start: Position { line: 52, column: 22, }, end: Position { line: 52, column: 28, }, }, }, ), ], span: Span { start: Position { line: 52, column: 21, }, end: Position { line: 52, column: 29, }, }, }, ), }, ), Raw( PartRaw { content: "text", span: Span { start: Position { line: 52, column: 30, }, end: Position { line: 52, column: 34, }, }, }, ), ], to: BinaryOperation( BinaryOperation { left: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "# Global htop configuration\n# To change set: programs.htop.settings.KEY = VALUE;\n", span: Span { start: Position { line: 53, column: 1, }, end: Position { line: 55, column: 5, }, }, }, ), ], span: Span { start: Position { line: 52, column: 37, }, end: Position { line: 55, column: 7, }, }, }, ), operator: Addition, right: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "concatStringsSep", span: Span { start: Position { line: 55, column: 10, }, end: Position { line: 55, column: 26, }, }, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "\n", span: Span { start: Position { line: 55, column: 28, }, end: Position { line: 55, column: 30, }, }, }, ), ], span: Span { start: Position { line: 55, column: 27, }, end: Position { line: 55, column: 31, }, }, }, ), FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mapAttrsToList", span: Span { start: Position { line: 55, column: 33, }, end: Position { line: 55, column: 47, }, }, }, ), arguments: [ Function( Function { head: Simple( FunctionHeadSimple { identifier: "key", }, ), body: Function( Function { head: Simple( FunctionHeadSimple { identifier: "value", }, ), body: String( String_ { parts: [ Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "key", span: Span { start: Position { line: 55, column: 64, }, end: Position { line: 55, column: 67, }, }, }, ), }, ), Raw( PartRaw { content: "=", span: Span { start: Position { line: 55, column: 62, }, end: Position { line: 55, column: 69, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "fmt", span: Span { start: Position { line: 55, column: 71, }, end: Position { line: 55, column: 74, }, }, }, ), arguments: [ Identifier( Identifier { id: "value", span: Span { start: Position { line: 55, column: 75, }, end: Position { line: 55, column: 80, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 55, column: 61, }, end: Position { line: 55, column: 82, }, }, }, ), span: Span { start: Position { line: 55, column: 54, }, end: Position { line: 55, column: 82, }, }, }, ), span: Span { start: Position { line: 55, column: 49, }, end: Position { line: 55, column: 82, }, }, }, ), PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 55, column: 84, }, end: Position { line: 55, column: 87, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "settings", span: Span { start: Position { line: 55, column: 88, }, end: Position { line: 55, column: 96, }, }, }, ), ], default: None, }, ), ], }, ), ], }, ), }, ), }, ), ], span: Span { start: Position { line: 47, column: 28, }, end: Position { line: 56, column: 4, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 17, column: 1, }, end: Position { line: 58, column: 2, }, }, }, ), span: Span { start: Position { line: 5, column: 1, }, end: Position { line: 58, column: 2, }, }, }, ), span: Span { start: Position { line: 3, column: 1, }, end: Position { line: 58, column: 2, }, }, }, ), span: Span { start: Position { line: 1, column: 1, }, end: Position { line: 58, column: 2, }, }, }, )