ormolu-0.7.2.0/0000755000000000000000000000000007346545000011364 5ustar0000000000000000ormolu-0.7.2.0/CHANGELOG.md0000644000000000000000000006677407346545000013221 0ustar0000000000000000## Ormolu 0.7.2.0 * Preserve necessary braces for final function arguments. [Issue 1044](https://github.com/tweag/ormolu/issues/1044). * Put `"this"` `PackageImports` at the end. [Issue 1048](https://github.com/tweag/ormolu/issues/1048). * Format parenthesized operators starting with a `#` correctly in the presence of `UnboxedSums`. [Issue 1062](https://github.com/tweag/ormolu/issues/1062). * Fix false positives in AST diffing related to empty Haddock comments in data declarations. [Issue 1065](https://github.com/tweag/ormolu/issues/1065). ## Ormolu 0.7.1.0 * Include `base` fixity information when formatting a Haskell file that's not mentioned in an existing cabal file. [Issue 1032](https://github.com/tweag/ormolu/issues/1032) * Update `displayException` for `OrmoluException` to pretty print the exception. [PR 1031](https://github.com/tweag/ormolu/pull/1031). * Ormolu is now aware of more common module re-exports by default. * Support explicit mention of target package name in module re-exports. Even if the exported package is not specified as a direct dependency of the component being formatted it will still be taken into account correctly. [Issue 1037](https://github.com/tweag/ormolu/issues/1037). * Ormolu no longer fails when CPP directly follows the import section (a regression introduced in 0.7.0.0). [Issue 1040](https://github.com/tweag/ormolu/issues/1040). ## Ormolu 0.7.0.0 * Inference of operator fixity information is now more precise and takes into account the import section of the module being formatted. [Issue 892](https://github.com/tweag/ormolu/issues/892) and [issue 929](https://github.com/tweag/ormolu/issues/929). * Ormolu can now be made aware of module re-exports through either special declarations in `.ormolu` files (see the readme for a description of the syntax), or on the command line with the `--reexport`/`-r` option. [Issue 1017](https://github.com/tweag/ormolu/issues/1017). * Ormolu now looks for `.ormolu` files independently of `.cabal` files. This means that it is now possible to have one `.ormolu` file for multiple Cabal packages. [Issue 1019](https://github.com/tweag/ormolu/issues/1019). * Consistently format `do` blocks/`case`s/`MultiWayIf`s with 4 spaces if and only if they occur as the applicand. [Issue 1002](https://github.com/tweag/ormolu/issues/1002) and [issue 730](https://github.com/tweag/ormolu/issues/730). * Support the (deprecated) `DatatypeContexts` extension to avoid surprises. [Issue 1012](https://github.com/tweag/ormolu/issues/1012). * Don't let comments escape from empty export lists. [Issue 906](https://github.com/tweag/ormolu/issues/906). * Format `\cases` with multiple patterns across multiple lines correctly. [Issue 1025](https://github.com/tweag/ormolu/issues/1025). ## Ormolu 0.6.0.1 * Fix false positives in AST diffing related to `UnicodeSyntax`. [PR 1009](https://github.com/tweag/ormolu/pull/1009). ## Ormolu 0.6.0.0 * Haddocks attached to arguments of a data constructor are now formatted in the pipe style (rather than the caret style), consistent with everything else. As a consequence, now Ormolu's output will be deemed invalid by the Haddock shipped with GHC <9.0. [Issue 844](https://github.com/tweag/ormolu/issues/844) and [issue 828](https://github.com/tweag/ormolu/issues/828). * Insert space before char literals in ticked promoted constructs when necessary. [Issue 1000](https://github.com/tweag/ormolu/issues/1000). * Switched to `ghc-lib-parser-9.6`: * Extended `OverloadedLabels`: `#Foo`, `#3`, `#"Hello there"`. Also, it is now disabled by default, as it causes e.g. `a#b` to be parsed differently. * New extension: `TypeData`, enabled by default. * Parse errors now include error codes, cf. https://errors.haskell.org. * Updated to `Cabal-syntax-3.10`. * Now whenever Ormolu fails to parse a `.cabal` file it also explains why. [PR 999](https://github.com/tweag/ormolu/pull/999). ## Ormolu 0.5.3.0 * Stop making empty `let`s move comments. [Issue 917](https://github.com/tweag/ormolu/issues/917). * Now `.ormolu` fixity override files can use both LF and CRLF line endings. [PR 969](https://github.com/tweag/ormolu/pull/969). * Normalize parentheses around constraints. [Issue 264](https://github.com/tweag/ormolu/issues/264). * The `ormolu` function now consumes `Text` instead of `String` due to an internal refactoring. * Exposed a more complete public API in the `Ormolu` module. The API is supposed to be stable and change according to [PVP](https://pvp.haskell.org/). * Now warnings regarding Ormolu not being able to find `.cabal` files or finding such files but them not mentioning the source file in question are only displayed when `--debug` is used. Printing the warnings by default seems to have been confusing, see e.g. [Issue 971](https://github.com/tweag/ormolu/issues/971) and [issue 924](https://github.com/tweag/ormolu/issues/924). ## Ormolu 0.5.2.0 * Eliminated the `fixity-th` Cabal flag because it caused issues on GHC 9.4 as well as on aarch64. See [issue 941](https://github.com/tweag/ormolu/issues/941) and [issue 927](https://github.com/tweag/ormolu/issues/927). * Now operators without explicitly specified fixity default to left associativity and highest precedence. [Issue 907](https://github.com/tweag/ormolu/issues/907). ## Ormolu 0.5.1.0 * Imports are now sorted by package qualifier, if one is present. [Issue 905](https://github.com/tweag/ormolu/issues/905). * Extension packs like `GHC2021` and `Haskell2010` are now bumped to the top of the list of language pragmas. [Issue 922](https://github.com/tweag/ormolu/issues/922). * Fix formatting of `SCC` pragmas in `do` blocks. [Issue 925](https://github.com/tweag/ormolu/issues/925). * Support type applications in patterns. [Issue 930](https://github.com/tweag/ormolu/issues/930). * Handle `UnicodeSyntax` variants more consistently. [Issue 934](https://github.com/tweag/ormolu/issues/934). * Fix an inconsistency in formatting of types in GADT declarations in certain cases. [PR 932](https://github.com/tweag/ormolu/pull/932). * Switched to `ghc-lib-parser-9.4`, which brings support for the following new syntactic features: * `\cases` via `LambdaCase` * `OPAQUE` pragmas * Unboxed sum type constructors like `(# | #)`. * Updated to `Cabal-syntax-3.8`, supporting `cabal-version: 3.8`. ## Ormolu 0.5.0.1 * Fixed a bug in the diff printing functionality. [Issue 886](https://github.com/tweag/ormolu/issues/886). * Indent closing bracket for list comprehensions in `do` blocks. [Issue 893](https://github.com/tweag/ormolu/issues/893). * Fix `hs-source-dirs: .` resulting in failing to find a `.cabal` file for a Haskell source file. [Issue 909](https://github.com/tweag/ormolu/issues/909). * Comments in closed type family declarations are now indented correctly. [Issue 913](https://github.com/tweag/ormolu/issues/913). * Cache `.cabal` file parsing and processing when given multiple input files in the same project. This results in dramatic speedups on projects which have both huge `.cabal` files and a large number of individual modules. [Issue 897](https://github.com/tweag/ormolu/issues/897). ## Ormolu 0.5.0.0 * Changed the way operator fixities and precedences are inferred. * Ormolu now tries to locate `.cabal` files of source files by default and in addition to default extensions it also infers the list of dependencies. * Ormolu comes equipped with extensive knowledge of all packages on Hackage and operators that those packages define. Knowing the names of the dependencies it can select the right fixity and precedence info from its knowledge base. * You can ask Ormolu not to look for `.cabal` files by using the `--no-cabal` switch. * Dependencies can be selected manually by using the `-p / --package` option (can be repeated many times). * The default heuristic algorithm will still try to guess the right fixities and precedence. * Fixity overrides can be provided by the user in the familiar Haskell notation (e.g. `infixr 9 .`, one declaration per line). They are loaded by default from the `.ormolu` file that is expected to be in the same directory as the `.cabal` file of a given source file. However, if `--no-cabal` is supplied, the `.ormolu` file will not be looked for either. Fixity declarations can be also provided by using the `-f / --fixity` command line option, which see. * This resolves the following issues: [Issue 826](https://github.com/tweag/ormolu/issues/826), [Issue 785](https://github.com/tweag/ormolu/issues/785), [Issue 690](https://github.com/tweag/ormolu/issues/690), [Issue 825](https://github.com/tweag/ormolu/issues/825). * Invalid haddock comments are formatted in a more consistent way. Leading haddock triggers (`|`, `^`) in an invalid haddock comment block are now escaped with a backslash `\`. [Issue 816](https://github.com/tweag/ormolu/issues/816). * Type synonyms and families are now formatted correctly when the equals sign is preceded by a comment. [Issue 829]( https://github.com/tweag/ormolu/issues/829). * Bidirectional pattern synonyms are formatted nicer in certain cases. [Issue 843](https://github.com/tweag/ormolu/issues/843). * Magic comments (like `{- ORMOLU_DISABLED -}`) now allow arbitrary succeeding text. This fixes use cases like [Issue 856](https://github.com/tweag/ormolu/issues/856). * Remove discrepancies between unboxed types and terms. [Issue 856 ](https://github.com/tweag/ormolu/issues/856). * Unboxed sum types are now formatted with a space before each `|`. * Unboxed unit tuples on type and value levels are formatted as `(# #)`. * Errors caused by AST differences now print before/after diffs. [Issue 877](https://github.com/tweag/ormolu/issues/877). * Improved formatting of data declarations in the case of single-constructor record with a Haddock. [Issue 881](https://github.com/tweag/ormolu/issues/881). ## Ormolu 0.4.0.0 * When a guard is located on its own line, the body associated with this guard is indented by one extra level, so that it can easily be distinguished from the guard predicate or pattern. [Issue 806](https://github.com/tweag/ormolu/issues/806). * Now a space is forced after `--` in line comments. [Issue 808](https://github.com/tweag/ormolu/issues/808). * Allow formatting Backpack signature files (`.hsig`). The switch between regular module mode and signature mode is based on the file extension by default, but can be overridden with the `-t / --source-type` command line option. [Issue 600](https://github.com/tweag/ormolu/issues/600). * Blank Haddock comments are now eliminated. This also fixes issues with differing ASTs in some special cases. [Issue 726](https://github.com/tweag/ormolu/issues/726). * Rewrite rules that are never active are now formatted correctly. [Issue 823](https://github.com/tweag/ormolu/issues/823). * Promoted infix data constructors are now formatted correctly. [Issue 768]( https://github.com/tweag/ormolu/issues/768). * Switched to `ghc-lib-parser-9.2`. [Issue 794](https://github.com/tweag/ormolu/issues/794). * Support for the new syntax-related language extensions: `OverloadedRecordDot` and `OverloadedRecordUpdate` (disabled by default). [Issue 709](https://github.com/tweag/ormolu/issues/709). * Removed support for `record-dot-preprocessor`. For the getter syntax, consider using `OverloadedRecordDot` instead. [Issue 659](https://github.com/tweag/ormolu/issues/659). [Issue 705](https://github.com/tweag/ormolu/issues/705). * Support for the `GHC2021` language. ## Ormolu 0.3.1.0 * Allow check mode when working with stdin input. [Issue 634]( https://github.com/tweag/ormolu/issues/634). * Now guards are printed on a new line if at least one guard is multiline or if all guards together occupy more than one line. The body of each guard is also indented one level deeper in that case. [Issue 712](https://github.com/tweag/ormolu/issues/712). * Invalid Haddock comments are no longer silently deleted, but rather converted into regular comments. [Issue 474](https://github.com/tweag/ormolu/issues/474). ## Ormolu 0.3.0.1 * Improvements to `.cabal` file handling: * When looking for a `.cabal` file, directories were previously erroneously also considered. [Issue 781]( https://github.com/tweag/ormolu/issues/781). * We now print a note if Ormolu was told to consider `.cabal` files, but no suitable one could be found. * Handle an empty `hs-source-dirs` correctly. * Also consider modules which are only conditionally listed in the `.cabal` file. * The special handling of CPP is now only applied if CPP is actually enabled. [Issue 782](https://github.com/tweag/ormolu/issues/782). * The left hand side of the `:` operator now uses braces if necessary. [Issue 780](https://github.com/tweag/ormolu/issues/780). ## Ormolu 0.3.0.0 * Data declarations with multiline kind signatures are now formatted correctly. [Issue 749](https://github.com/tweag/ormolu/issues/749). * Infix arrow command formations are formatted like usual operators. This fixes [Issue 748](https://github.com/tweag/ormolu/issues/748). * `do` arrow commands are formatted more flexibly. Fixes [Issue 753](https://github.com/tweag/ormolu/issues/753). * Source code is always read and written using UTF8 and ignoring the native line ending conventions. [Issue 717](https://github.com/tweag/ormolu/issues/717). * Opt-in support to respect default-extensions and default-language from .cabal files. [Issue 517](https://github.com/tweag/ormolu/issues/517). * Empty case expressions are now rendered with braces. [Issue 765](https://github.com/tweag/ormolu/issues/765). * Omit braces on repeated application of `do` blocks. [Issue 735](https://github.com/tweag/ormolu/issues/735). * Improved handling of disabled regions. [PR 773]( https://github.com/tweag/ormolu/pull/773). * Disabled regions are now exactly preserved, in particular empty lines and trailing spaces. [Issue 673](https://github.com/tweag/ormolu/issues/673). * Strings like `-}` can now be present in disabled regions. [Issue 708](https://github.com/tweag/ormolu/issues/708). This means that using CPP or magic comments in certain ways which were only supported as a side effect previously (like in [Issue 601](https://github.com/tweag/ormolu/issues/601)) will now result in formatting failures. Also see [Issue 774]( https://github.com/tweag/ormolu/issues/774). ## Ormolu 0.2.0.0 * Now standalone kind signatures are grouped with type synonyms. [Issue 683](https://github.com/tweag/ormolu/issues/683). * `TemplateHaskell` is not enabled by default anymore. [Issue 699](https://github.com/tweag/ormolu/issues/699). * Made record dot pre-processor rendering idempotent in certain specific cases. [Issue 701](https://github.com/tweag/ormolu/issues/701). * Added support for arrow command application. [Issue 716](https://github.com/tweag/ormolu/issues/716). * Switched to `ghc-lib-parser-9.0.1`. [PR 722](https://github.com/tweag/ormolu/pull/722). * Support for the new language extensions: * `LexicalNegation`, `LinearTypes`: disabled by default * `QualifiedDo`: enabled by default * Due to [upstream changes in whitespace sensitity]( https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#whitespace-sensitive-and-), `TypeApplications` is now *enabled* by default. [Issue 452](https://github.com/tweag/ormolu/issues/452). * Haddocks on declarations in files without a `module` header are no longer deleted. [Issue 480](https://github.com/tweag/ormolu/issues/480). * Due to a change in Haddock parsing, empty Haddock comments on function arguments now get deleted. * CTYPE pragmas are now preserved. [Issue 689]( https://github.com/tweag/ormolu/issues/689). * `TypeApplications` in data/type family instances are now supported. [Issue 698](https://github.com/tweag/ormolu/issues/698). * Formatting infix arrow command formations now preserves the AST. [Issue 718](https://github.com/tweag/ormolu/issues/718). * Surround code in brackets with spaces if it contains a `StarIsType` `*` to prevent unparseable output. [Issue 704](https://github.com/tweag/ormolu/issues/704). * Formatting applied multiline constructs in do blocks now preserves the AST. [Issue 707](https://github.com/tweag/ormolu/issues/707). This will sometimes result in odd indentations, e.g. this snippet is a fixed point: ```haskell foo = do do (+1) 1 ``` * GHC options passed in via the CLI can now be overridden in local files. Previously, if an extension was disabled via the CLI, it could not be re-enabled per file. * `NegativeLiterals` is no longer enabled by default. Also, spaces after negation via `-` are removed where possible. [Issue 694](https://github.com/tweag/ormolu/issues/694). * Minus signs in literal patterns are now preserved in all cases. [Issue 733](https://github.com/tweag/ormolu/issues/733). * Added support for left-to-right arrow application. [Issue 737](https://github.com/tweag/ormolu/issues/737). * Now `--mode check` fails on missing trailing blank lines. [Issue 743](https://github.com/tweag/ormolu/issues/743). * Fixed indentation of arrow forms in do blocks. [Issue 739](https://github.com/tweag/ormolu/issues/739). ## Ormolu 0.1.4.1 * Added command line option `--color` to control how diffs are printed. Standardized the way errors are printed. ## Ormolu 0.1.4.0 * Added support for monad comprehensions. [Issue 665](https://github.com/tweag/ormolu/issues/665). * Fixed a bug when a space was inserted in front of promoted types even when it wasn't strictly necessary. [Issue 668](https://github.com/tweag/ormolu/issues/668). * Now the checking mode displays diffs per file when unformatted files are found. The rendering of the diffs is also improved. [Issue 656](https://github.com/tweag/ormolu/issues/656). ## Ormolu 0.1.3.1 * Fixed a problem with multiline record updates using the record dot preprocessor. [Issue 658](https://github.com/tweag/ormolu/issues/658). ## Ormolu 0.1.3.0 * Ormolu no longer overwrites already formatted files. [PR 649](https://github.com/tweag/ormolu/pull/649). * Now a space is guaranteed before ticked promoted types. [Issue 631](https://github.com/tweag/ormolu/issues/631). * Made formatting of single-line explicitly bidirectional pattern synonyms idempotent. [Issue 630](https://github.com/tweag/ormolu/issues/630). ## Ormolu 0.1.2.0 * Fixed the bug when comments in different styles got glued together after formatting. [Issue 589](https://github.com/tweag/ormolu/issues/589). * Added `-i` as a shortcut for `--mode inplace`. [Issue 467](https://github.com/tweag/ormolu/issues/467). * Improved grouping of top-level declarations. [Issue 466](https://github.com/tweag/ormolu/issues/466). ## Ormolu 0.1.1.0 * Imports in a import lists are now normalized: duplicate imports are combined/eliminated intelligently. * Import declarations that can be merged are now automatically merged. [Issue 414](https://github.com/tweag/ormolu/issues/414). * The magic comments for disabling and enabling Ormolu now can encompass any fragment of code provided that the remaining code after exclusion of the disabled part is still syntactically correct. [Issue 601](https://github.com/tweag/ormolu/issues/601). * Improved sorting of operators in imports. [Issue 602](https://github.com/tweag/ormolu/issues/602). * Fixed a bug related to trailing space in multiline comments in certain cases. [Issue 603](https://github.com/tweag/ormolu/issues/602). * Added support for formatting linked lists with `(:)` as line terminator. [Issue 478](https://github.com/tweag/ormolu/issues/478). * Fixed rendering of function arguments in multiline layout. [Issue 609](https://github.com/tweag/ormolu/issues/609). * Blank lines between definitions in `let` and `while` bindings are now preserved. [Issue 554](https://github.com/tweag/ormolu/issues/554). * Fixed the bug when type applications stuck to the `$` of TH splices that followed them. [Issue 613](https://github.com/tweag/ormolu/issues/613). * Improved region formatting so that indented fragments—such as definitions inside of `where` clauses—can be formatted. [Issue 572](https://github.com/tweag/ormolu/issues/572). * Fixed the bug related to the de-association of pragma comments. [Issue 619](https://github.com/tweag/ormolu/issues/619). ## Ormolu 0.1.0.0 * Fixed rendering of type signatures concerning several identifiers. [Issue 566](https://github.com/tweag/ormolu/issues/566). * Fixed an idempotence issue with inline comments in tuples and parentheses. [Issue 450](https://github.com/tweag/ormolu/issues/450). * Fixed an idempotence issue when certain comments were picked up as “continuation” of a series of comments [Issue 449](https://github.com/tweag/ormolu/issues/449). * Fixed an idempotence issue related to different indentation levels in a comment series. [Issue 512](https://github.com/tweag/ormolu/issues/512). * Fixed an idempotence issue related to comments which may happen to be separated from the elements they are attached to by the equality sign. [Issue 340](https://github.com/tweag/ormolu/issues/340). * Fixed an idempotence issue with type synonym and data declarations where the type has a Haddock. [Issue 578](https://github.com/tweag/ormolu/issues/578). * Fix the false positive about AST differences in presence of comments with multiple blank lines in a row. [Issue 518](https://github.com/tweag/ormolu/issues/518). * Fixed rendering of comments around if expressions. [Issue 458](https://github.com/tweag/ormolu/issues/458). * Unnamed fields of data constructors are now documented using the `-- ^` syntax. [Issue 445](https://github.com/tweag/ormolu/issues/445) and [Issue 428](https://github.com/tweag/ormolu/issues/428). * Fixed non-idempotent transformation of partly documented data definition. [Issue 590](https://github.com/tweag/ormolu/issues/590). * Fixed an idempotence issue related to operators. [Issue 522](https://github.com/tweag/ormolu/issues/522). * Renamed the `--check-idempotency` flag to `--check-idempotence`. Apparently only the latter is correct. ## Ormolu 0.0.5.0 * Grouping of statements in `do`-blocks is now preserved. [Issue 74](https://github.com/tweag/ormolu/issues/74). * Grouping of TH splices is now preserved. [Issue 507](https://github.com/tweag/ormolu/issues/507). * Comments on pragmas are now preserved. [Issue 216](https://github.com/tweag/ormolu/issues/216). * Ormolu can now be enabled and disabled via special comments. [Issue 435](https://github.com/tweag/ormolu/issues/435). * Added experimental support for simple CPP. [Issue 415](https://github.com/tweag/ormolu/issues/415). * Added two new options `--start-line` and `--end-line` that allow us to select a region to format. [Issue 516](https://github.com/tweag/ormolu/issues/516). * Fixed rendering of module headers in the presence of preceding comments or Haddocks. [Issue 561](https://github.com/tweag/ormolu/issues/561). ## Ormolu 0.0.4.0 * When given several files to format, Ormolu does not stop on the first failure, but tries to format all the files. [Issue 502](https://github.com/tweag/ormolu/issues/502). * Made rendering of pattern matches involving operators consistent with other cases of rendering of operators. [Issue 500](https://github.com/tweag/ormolu/issues/500). * More compact rendering of type family injectivity constraints. [Issue 482](https://github.com/tweag/ormolu/issues/482). * Improved rendering of the keyword `where` in class, data, and type family declarations. When headers of these declarations are multi-line `where` is now put on its own line. [Issue 509](https://github.com/tweag/ormolu/issues/509). * Fixed the bug pertaining to rendering of arrow notation with multiline expressions. [Issue 513](https://github.com/tweag/ormolu/issues/513). * Made rendering of data type definitions, value-level applications, and application of types use the same style. Moreover, existential now doesn't cause the data constructor be unconditionally rendered in multiline layout. [Issue 427](https://github.com/tweag/ormolu/issues/427). * Records with a single data constructor are now formatted more compactly. [Issue 425](https://github.com/tweag/ormolu/issues/425). * Switched to `ghc-lib-parser-8.10.1`. * Implemented support for the new language extensions `ImportQualifiedPost` and `StandaloneKindSignatures`. ## Ormolu 0.0.3.1 * Fixed rendering of record updates with the record dot preprocessor syntax [Issue 498](https://github.com/tweag/ormolu/issues/498). ## Ormolu 0.0.3.0 * Fixed an issue related to unnecessary use of curly braces. [Issue 473](https://github.com/tweag/ormolu/issues/473). * Fixed the issue with formatting multi-way if when it happens to be a function applied to arguments [Issue 488](https://github.com/tweag/ormolu/issues/488). This changed the way multi-line if is formatted in general. * Added support for record dot pre-processor when used via the plugin. [Issue 486](https://github.com/tweag/ormolu/issues/486). * Stopped hanging record constructors and improved placing potentially-hanging consturctions in the presence of comments. [Issue 447](https://github.com/tweag/ormolu/issues/447). * Fixed indentation in presence of type applications. [Issue 493](https://github.com/tweag/ormolu/issues/493). * Class and instance declarations now do not have a blank line after `where`. Grouping of methods from the original input is also preserved with some normalizations. [Issue 431](https://github.com/tweag/ormolu/issues/431). ## Ormolu 0.0.2.0 * Switched to `ghc-lib-parser` instead of depending on the `ghc` package directly. This should allow us to use newest features of GHC while not necessarily depending on the newest version of the compiler. In addition to that Ormolu is now GHCJS-compatible. * Now unrecognized GHC options passed with `--ghc-opt` cause Ormolu to fail (exit code 7). * Fixed formatting of result type in closed type families. See [issue 420](https://github.com/tweag/ormolu/issues/420). * Fixed a minor inconsistency between formatting of normal and foreign type signatures. See [issue 408](https://github.com/tweag/ormolu/issues/408). * Fixed a bug when comment before module header with Haddock was moved inside the export list. See [issue 430](https://github.com/tweag/ormolu/issues/430). * Empty `forall`s are now correctly preserved. See [issue 429](https://github.com/tweag/ormolu/issues/429). * Fixed [issue 446](https://github.com/tweag/ormolu/issues/446), which involved braces and operators. * When there are comments between preceding Haddock (pipe-style) and its corresponding declaration they are preserved like this in the output instead of being shifted. To be clear, this is not a very good idea to have comments in that position because the Haddock will end up not being associated with the declarations. Issues [440](https://github.com/tweag/ormolu/issues/440) and [448](https://github.com/tweag/ormolu/issues/448). * Implemented correct handling of shebangs. [Issue 377](https://github.com/tweag/ormolu/issues/377). * Implemented correct handling of stack headers. [Issue 393](https://github.com/tweag/ormolu/issues/393). * Sorting language pragmas cannot not change meaning of the input program anymore. [Issue 404](https://github.com/tweag/ormolu/issues/404). * Fixed formatting of applications where function is a complex expression. [Issue 444](https://github.com/tweag/ormolu/issues/444). ## Ormolu 0.0.1.0 * Initial release. ormolu-0.7.2.0/CONTRIBUTING.md0000644000000000000000000000347707346545000013630 0ustar0000000000000000# Contributing Issues (bugs, feature requests or otherwise feedback) may be reported in [the GitHub issue tracker for this project][issues]. Pull requests are also welcome. When contributing to this repository, please first discuss the change you wish to make via an issue, unless it's entirely trivial (typo fixes, etc.). If there is already an issue that describes the change you have in mind, comment on it indicating that you're going to work on that. This way we can avoid the situation when several people work on the same thing. Please make sure that all non-trivial changes are described in commit messages and PR descriptions. ## Testing Testing has been taken good care of and now it amounts to just adding examples under `data/examples`. Each example is a pair of files: `.hs` for input and `-out.hs` for corresponding expected output. Testing is performed as following: * Given snippet of source code is parsed and pretty-printed. * The result of printing is parsed back again and the AST is compared to the AST obtained from the original file. They should match. * The output of printer is checked against the expected output. * Idempotence property is verified: formatting already formatted code results in exactly the same output. Examples can be organized in sub-directories, see the existing ones for inspiration. Please note that we try to keep individual files at most 25 lines long because otherwise it's hard to figure out want went wrong when a test fails. To regenerate outputs that have changed, you can set the `ORMOLU_REGENERATE_EXAMPLES` environment variable before running tests. ## Formatting Use `nix run .#format` script to format Ormolu with the current version of Ormolu. If Ormolu is not formatted like this, the CI will fail. [issues]: https://github.com/tweag/ormolu/issues ormolu-0.7.2.0/DESIGN.md0000644000000000000000000003602707346545000012667 0ustar0000000000000000# Ormolu *This document represents our discussions and plans at early stages of development, it is no longer being updated.* * [Analysis of the existing solutions](#analysis-of-the-existing-solutions) * [Brittany](#brittany) * [Hindent](#hindent) * [Stylish Haskell](#stylish-haskell) * [Haskell formatter](#haskell-formatter) * [Proposed design](#proposed-design) * [Parsing](#parsing) * [CPP](#cpp) * [Printing](#printing) * [Configuration](#configuration) * [Handling of language extensions](#handling-of-language-extensions) * [Testing](#testing) * [Functionality of executable](#functionality-of-executable) * [Why not contribute to/fork Hindent or Brittany?](#why-not-contribute-tofork-hindent-or-brittany) * [Examples](#examples) This document describes design of a new formatter for Haskell source code. It also includes recommendations for future implementers. We set for the following goals (mostly taken from [brittany](https://github.com/lspitzner/brittany)): * Preserve the meaning of the formatted functions when no CPP is used; * Make reasonable use of screen space; * Use linear space and computation time on the size of the input; * Preserve comments; * Be idempotent. ## Analysis of the existing solutions In order to design a new formatter we need to study the existing solutions so we can borrow the good bits and avoid making the same mistakes. ### Brittany [Brittany][brittany] builds on top of [`ghc-exactprint`][ghc-exactprint]—a library that uses parser of GHC itself for parsing and thus it guarantees that at least parsing phase is bug-free (which is admittedly the cause of majority of bugs in other projects, see below). After parsing, Haskell AST and a collection of annotations are available. The annotations are there because Haskell AST doesn't provide enough information to reconstruct source code (for example it doesn't include comments). The AST and the annotations are converted into a `BriDoc` value. A `BriDoc` value is a document representation like the `Doc` from the [pretty][pretty-doc] or the [wl-pprint][wl-pprint-doc] libraries. Brittany implements its own document type in an attempt to find a satisfactory rendering of the source code that fits a page-width constraint. Because of this, a `BriDoc` value represents a collection of many candidate layouts (i.e. renderings) of the source code. This collection is pruned until it contains a single layout. The structure of the chosen layout is then adjusted to leave it in a form which can be easily traversed to produce the final rendering. Brittany invests the majority of its implementation to manage the `BriDoc` values. Given that the amount of possible layouts is exponential, the representation is clever enough to fit them in linear space. There are multiple ways to build a `BriDoc`, not all of which fit in linear space. So care is necessary to keep memory bounded. The compexities of the `BriDoc` structure, together with the lack of documentation, make Brittany at least challenging to maintain. ### Hindent [Hindent][hindent] uses [`haskell-src-exts`][haskell-src-exts] for parsing like all older projects. `haskell-src-exts` does not use parser of GHC itself, and is a source of endless parsing bugs. `Hindent` is affected by these upstream issues as well as Stylish Haskell and Haskell formatter (see below). This already makes all these projects unusable with some valid Haskell source code, but let's continue studying Hindent anyway. Hindent is quite different from Brittany in the sense that it does not attempt to build a document representation to render afterwards, instead it just prints the parsed code straight away. This means that the 70-80% of what the code does is a printing traversal. Hindent code is easier to read and debug. Pretty-printing functions are very straightforward. If there is a bug (in pretty-printer, not in parser which Hindent cannot control), it's easy to fix AFAIU. Hindent is also notable for its ability to handle CPP and inputs that do not constitute complete modules. It splits input stream into so-called “code blocks” recognizing CPP macros and then only pretty-prints “normal code” without touching CPP directives. After that CPP is inserted between pretty-printed blocks of source code. The approach fails when CPP breaks code in such a way that separate blocks do not form valid Haskell expressions, see [this](https://github.com/commercialhaskell/hindent/issues/383) for example. Looking at the bug tracker there are many bugs. Part of them is because of the use of `haskell-src-exts`, the other part is because the maintainer doesn't care (anymore?) and doesn't fix them. Well it's as simple as that, with any sort of commercial backing the bugs in pretty printer would be fixed long time ago. ### Stylish Haskell [Stylish Haskell][stylish-haskell] also uses `haskell-src-exts` and suffers from the same upstream problems. I haven't studied the transformations it performs, but it looks like it transforms the parsed source code partially by manipulating AST and partially by manipulating raw text (e.g. to drop trailing whitespace from each line). CPP Macros are just filtered out silently as a preprocessing step before feeding the code to `haskell-src-exts`. Stylish Haskell is not so invasive as the other formatters and most reported bugs are about parsing issues and CPP. As I understand it, people mostly use it to sort their import lists. ### Haskell formatter [Haskell formatter][haskell-formatter] is an older project that didn't get much traction. It also uses `haskell-src-ext` and also tries to do manipulations on the parsed AST. The issue tracker doesn't have many issues probably because it never got popular enough (only 15 stars on GitHub). All the issues are about upstream problems with `haskell-src-exts`. ## Proposed design This section describes a solution that combines all the good things from the projects above. ### Parsing and CPP It is clear that `ghc-exactprint` is better than `haskell-src-exts`, so we should use that. If we go with `ghc-exactprint` though, we'll need to specify which parser to use, e.g. the parser that parses whole module or the one which parsers declarations/expressions/etc. It seems that in general it's better to use the parser for modules because it should work with all input files containing complete modules, while with other parsers it's impossible to guess what they'll be called on. ### CPP We allow CPP directives in the input, but we forgo the goal to preserve the meaning of the formatted functions in that case. Instead of supporting CPP better, we hope for a solution to replace CPP to do conditional compilation. There are the following challenges when formatting a module with CPP: * GHC parser won't accept anything but a valid, complete module. Therefore, formatting the Haskell code between CPP directives is not an option. * Ignoring the CPP directives and formatting the Haskell code can change its meaning. An example follows. Let's suppose that we want to format the following program: ``` $ cat test.hs {-# LANGUAGE CPP #-} main = print (g && f1) where f1 = h where h = True #ifdef C1 g = g1 where g1 = g2 where g2 = False #else g = True #endif #ifndef C1 g = False #endif $ runhaskell test.hs True ``` At the time of this writing, formatting this program with Hindent or Ormolu produces the same output we would get if the CPP directives were considered comments: ``` $ ormolu --version ormolu 0.0.5.0 HEAD fc64eada5c4da7a5b07d2872e253671b48aec115 using ghc-lib-parser 8.10.1.20200412 $ ormolu --mode inplace test.hs $ cat test.hs {-# LANGUAGE CPP #-} main = print (g && f1) where f1 = h where h = True #ifdef C1 g = g1 where g1 = g2 where g2 = False #else g = True #endif #ifndef C1 g = False #endif $ runhaskell test.hs False ``` Running the formatter causes the output of the program to change from `True` to `False` when `C1` is not defined. A solution could be to make the formatter more careful with CPP directives, constraining how directives can be inserted in Haskell code to avoid changing the meaning by reformatting. But this would introduce additional complexity, and the problem would need to be solved repeatedly for every tool out there which wants to parse Haskell modules. If CPP is replaced with some language extension or mechanism to do conditional compilation, all tools will benefit from it. ### Printing Just pretty-printing code (following the approach of Hindent) seems sane. It is straightforward and when complemented with enough tests (see the section about testing below), it should work all right. Implementation can be just a `Reader` monad producing something like text builder. The context of `Reader` can store current indentation and configuration options. As the pretty-printing library we can use [`Outputable`][outputable] (and `SDoc`) from the [`ghc`][ghc] package itself (at least for pretty-printing basic things like floating point literals and the like). The benefit is that AST components that we'll want to print are already instances of `Outputable`, so we'll get correct renderings for free. In order to keep the output of the formatter simple, fast and correct, we introduce the following rule. The pretty-printing code can be in control of every formatting choice, except for two, which are left to the programmer: 1. location of comments (comments are going to be attached to specific syntactic entities, so moving an entity will move its comment too), 2. line breaking. Regarding (2), the idea is that given any syntactic entity, the programmer has a choice: 1. write it on one line, or 2. write it on two lines or more. If (1), then everything is kept in one line. If (2), i.e. a line break appears somewhere in the concrete syntax tree (CST), then additional line breaks are introduced everywhere possible in parent nodes, *but not in any sibling or children nodes*. Examples: ```haskell -- Stays as is. data T = A | B data T = A | B -- Is reformatted to: data T = A | B -- Stays as is. map :: (a -> b) -> [a] -> [b] foldr :: (a -> b -> b) -> b -> [a] -> [b] -- Is reformatted to: foldr :: (a -> b -> b) -> b -> [a] -> [b] t = let x = foo bar baz in foo bar baz -- Is reformatted to: t = let x = foo bar baz in foo far baz ``` Crucially, no effort is made to fit within reasonable line lengths. That's up to the programmer. Style will still be consistent for everyone in every other aspect, and that's what counts. ### Configuration We are not allowing to configure any aspect of the formatter. A module might be used in multiple projects, and we prefer to have it formatted the same in all of them. See this [this post][hindent-5-blog] by Chris Done (the author of Hindent) which says that as long as the default style is conventional and good it doesn't really matter how code gets formatted. Consistency is more important. ### Handling of language extensions Some language extensions affect how parsing is done. We are going to deal with those in two ways: * When language pragmas are present in source file, we must parse them before we run the main parser (I guess) and they should determine how the main parsing will be done. * There also should be configuration file that may enable other language extensions to be used on all files. * Later we could try to locate Cabal files and fetch the list of extensions that are enabled by default from there. ### Testing It should be possible to add tests incrementally as we develop pretty-printing code and new issues are discovered. For each Haskell module that we want to test, we perform the following steps: 1. Given input snippet of source code parse it and pretty print it. 2. Parse the result of pretty-printing again and make sure that AST is the same as AST of original snippet module span positions. We could make this part of a self-check in the formatter. 3. Check the output against expected output. Thus all tests should include two files: input and expected output. 4. Check that running the formatter on the output produces the same output again (the transformation is idempotent). In order to grow our testsuite, we would borrow test cases from test suites of existing libraries like Brittany and Hindent. Then we may add test cases for opened issues that Brittany and Hindent have. When we're confident enough, we can start “mining” new issues by running the program on real source code from Hackage till we don't get new issues anymore. For every issue that we find this way, a test case should be added. ### Functionality of executable * In all cases the program should test if the produced AST is the same as the one we originally parsed and if it differs, an error should be displayed suggesting reporting this on our issue tracker. * Check mode: return non-zero exit code if any transformations would be applied. * Modification in place and printing of formatted code to stdout. * A flag for version/commit information. * An option to specify location of config file. * Options to specify parameters that come from config files on command line instead (currently this is just dynamic options enabled by default, such as language extensions). ### Why not contribute to/fork HIndent or Brittany? We want to simultaneously optimize three goals: 1. simplicity of implementation, 2. efficiency, 3. predictable and readable output that doesn't overuse vertical spacing. Hindent aims for (1) and (2) by still producing something palatable in (3). Brittany gives up on (1) but goes a long way towards (3) and presumably does OK on (2). Ormolu goes for (1), (2) and (3), by outsourcing the hard part of (3) to the user. Ormolu is less normative than Brittany, and less normative than Hindent, but arguably stills achieves consistent style. Forking or contributing to Hindent is not an option because if we replace `haskell-src-exts` with `ghc` (or `ghc-exact-print`) then we'll have to work with a different AST type and all the code in Hindent will become incompatible and there won't be much code to be re-used in that case. It is also possible that we'll find a nicer way to write pretty-printer. ## Examples A list of formatting examples can be found [here](data/examples). [brittany]: https://hackage.haskell.org/package/brittany [hindent]: https://hackage.haskell.org/package/hindent [hindent-5-blog]: https://chrisdone.com/posts/hindent-5 [stylish-haskell]: https://hackage.haskell.org/package/stylish-haskell [haskell-formatter]: https://hackage.haskell.org/package/haskell-formatter [ghc]: https://hackage.haskell.org/package/ghc [outputable]: https://hackage.haskell.org/package/ghc-8.4.3/docs/Outputable.html [haskell-src-exts]: https://hackage.haskell.org/package/haskell-src-exts [ghc-exactprint]: https://hackage.haskell.org/package/ghc-exactprint [hindent-printer]: https://github.com/commercialhaskell/hindent/blob/master/src/HIndent/Pretty.hs [pretty-doc]: http://hackage.haskell.org/package/pretty-1.1.3.6/docs/Text-PrettyPrint.html#t:Doc [wl-pprint-doc]: http://hackage.haskell.org/package/wl-pprint-1.2.1/docs/Text-PrettyPrint-Leijen.html#t:Doc ormolu-0.7.2.0/LICENSE.md0000644000000000000000000000265207346545000012775 0ustar0000000000000000Copyright © 2018–present Tweag I/O All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name Tweag I/O nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ormolu-0.7.2.0/README.md0000644000000000000000000002614007346545000012646 0ustar0000000000000000# Ormolu [![License BSD3](https://img.shields.io/badge/license-BSD3-brightgreen.svg)](http://opensource.org/licenses/BSD-3-Clause) [![Hackage](https://img.shields.io/hackage/v/ormolu.svg?style=flat)](https://hackage.haskell.org/package/ormolu) [![Stackage Nightly](http://stackage.org/package/ormolu/badge/nightly)](http://stackage.org/nightly/package/ormolu) [![Stackage LTS](http://stackage.org/package/ormolu/badge/lts)](http://stackage.org/lts/package/ormolu) [![CI](https://github.com/tweag/ormolu/actions/workflows/ci.yml/badge.svg)](https://github.com/tweag/ormolu/actions/workflows/ci.yml) * [Installation](#installation) * [Building from source](#building-from-source) * [Usage](#usage) * [Ormolu Live](#ormolu-live) * [Editor integration](#editor-integration) * [Haskell Language Server](#haskell-language-server) * [GitHub actions](#github-actions) * [Language extensions, dependencies, and fixities](#language-extensions-dependencies-and-fixities) * [Magic comments](#magic-comments) * [Regions](#regions) * [Exit codes](#exit-codes) * [Using as a library](#using-as-a-library) * [Limitations](#limitations) * [Running on Hackage](#running-on-hackage) * [Forks and modifications](#forks-and-modifications) * [Contributing](#contributing) * [License](#license) Ormolu is a formatter for Haskell source code. The project was created with the following goals in mind: * Using GHC's own parser to avoid parsing problems caused by [`haskell-src-exts`][haskell-src-exts]. * Let some whitespace be programmable. The layout of the input influences the layout choices in the output. This means that the choices between single-line/multi-line layouts in certain situations are made by the user, not by an algorithm. This makes the implementation simpler and leaves some control to the user while still guaranteeing that the formatted code is stylistically consistent. * Writing code in such a way so it's easy to modify and maintain. * Implementing one “true” formatting style which admits no configuration. * The formatting style aims to result in minimal diffs. * Choose a style compatible with modern dialects of Haskell. As new Haskell extensions enter broad use, we may change the style to accommodate them. * Idempotence: formatting already formatted code doesn't change it. * Be well-tested and robust so that the formatter can be used in large projects. Try it out in your browser at ! See [Ormolu Live](#ormolu-live) for more info. ## Installation The [release page][releases] has binaries for Linux, macOS and Windows. You can also install using `cabal` or `stack`: ```console $ cabal install ormolu $ stack install ormolu ``` Ormolu is also included in several package repositories. E.g., on Arch Linux, one can use [the package on AUR][aur]: ```console $ yay -S ormolu ``` ## Building from source The easiest way to build the project is with Nix: ```console $ nix build ``` Make sure to accept the offered Nix caches (in particular the IOG cache), otherwise building may take a very long time. Alternatively, `stack` could be used as follows: ```console $ stack build # to build $ stack install # to install ``` To use Ormolu directly from GitHub with Nix flakes, this snippet may come in handy: ```nix { inputs.ormolu.url = "github:tweag/ormolu"; outputs = { ormolu, ... }: { # use ormolu.packages.${system}.default here }; } ``` ## Usage The following will print the formatted output to the standard output. ```console $ ormolu Module.hs ``` Add `--mode inplace` to replace the contents of the input file with the formatted output. ```console $ ormolu --mode inplace Module.hs ``` Use `find` to format a tree recursively: ```console $ ormolu --mode inplace $(find . -name '*.hs') ``` Or find all files in a project with `git ls-files`: ```console $ ormolu --mode inplace $(git ls-files '*.hs') ``` To check if files are are already formatted (useful on CI): ```console $ ormolu --mode check $(find . -name '*.hs') ``` #### :zap: Beware git's `core.autocrlf` on Windows :zap: Ormolu's output always uses LF line endings. In particular, `ormolu --mode check` will fail if its input is correctly formatted *except* that it has CRLF line endings. This situation can happen on Windows when checking out a git repository without having set [`core.autocrlf`]( https://www.git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf) to `false`. ### Ormolu Live On every new commit to `master`, [Ormolu Live](./ormolu-live) is deployed to https://ormolu-live.tweag.io. Older versions are available at https://COMMITHASH--ormolu-live.netlify.app. ### Editor integration We know of the following editor integrations: * [Emacs][emacs-package] * [VS Code][vs-code-plugin] * Vim: [neoformat][neoformat], [vim-ormolu][vim-ormolu] ### Haskell Language Server [Haskell Language Server](https://haskell-language-server.readthedocs.io) has built-in support for using Ormolu as a formatter. ### GitHub actions [`run-ormolu`][run-ormolu] is the recommended way to ensure that a project is formatted with Ormolu. ### Language extensions, dependencies, and fixities Ormolu automatically locates the Cabal file that corresponds to a given source code file. Cabal files are used to extract both default extensions and dependencies. Default extensions directly affect behavior of the GHC parser, while dependencies are used to figure out fixities of operators that appear in the source code. Fixities can also be overridden via an `.ormolu` file which should be located at a higher level in the file system hierarchy than the source file that is being formatted. When the input comes from stdin, one can pass `--stdin-input-file` which will give Ormolu the location that should be used as the starting point for searching for `.cabal` and `.ormolu` files. Here is an example of `.ormolu` file: ```haskell infixr 9 . infixr 5 ++ infixl 4 <$ infixl 1 >>, >>= infixr 1 =<< infixr 0 $, $! infixl 4 <*>, <*, *>, <**> ``` It uses exactly the same syntax as usual Haskell fixity declarations to make it easier for Haskellers to edit and maintain. As of Ormolu 0.7.0.0, `.ormolu` files can also contain instructions about module re-exports that Ormolu should be aware of. This might be desirable because at the moment Ormolu cannot know about all possible module re-exports in the ecosystem and only few of them are actually important when it comes to fixity deduction. In 99% of cases the user won't have to do anything, especially since most common re-exports are already programmed into Ormolu. (You are welcome to open PRs to make Ormolu aware of more re-exports by default.) However, when the fixity of an operator is not inferred correctly, making Ormolu aware of a re-export may come in handy. Here is an example: ```haskell module Control.Lens exports Control.Lens.At module Control.Lens exports "lens" Control.Lens.Lens ``` Module re-export declarations can be mixed freely with fixity overrides, as long as each declaration is on its own line. As of Ormolu 0.7.1.0 explicit package names are allowed in re-export declarations (see the example above). Finally, all of the above-mentioned parameters can be controlled from the command line: * Language extensions can be specified with the `-o` or `--ghc-opt` flag. * Dependencies can be specified with the `-p` or `--package` flag. * Fixities can be specified with the `-f` or `--fixity` flag. * Re-exports can be specified with the `-r` or `--reexport` flag. Searching for `.cabal` and `.ormolu` files can be disabled by passing `--no-cabal` and `--no-dot-ormolu` respectively. ### Magic comments Ormolu understands two magic comments: ```haskell {- ORMOLU_DISABLE -} ``` and ```haskell {- ORMOLU_ENABLE -} ``` This allows us to disable formatting selectively for code between these markers or disable it for the entire file. To achieve the latter, just put `{- ORMOLU_DISABLE -}` at the very top. Note that for Ormolu to work the fragments where Ormolu is enabled must be parseable on their own. Because of that the magic comments cannot be placed arbitrarily, but rather must enclose independent top-level definitions. ### Regions One can ask Ormolu to format a region of input and leave the rest unformatted. This is accomplished by passing the `--start-line` and `--end-line` command line options. `--start-line` defaults to the beginning of the file, while `--end-line` defaults to the end. ### Exit codes Exit code | Meaning ----------|----------------------------------------------- 0 | Success 1 | General problem 2 | CPP used (deprecated) 3 | Parsing of original input failed 4 | Parsing of formatted code failed 5 | AST of original and formatted code differs 6 | Formatting is not idempotent 7 | Unrecognized GHC options 8 | Cabal file parsing failed 9 | Missing input file path when using stdin input and accounting for .cabal files 10 | Parse error while parsing fixity overrides 100 | In checking mode: unformatted files 101 | Inplace mode does not work with stdin 102 | Other issue (with multiple input files) ### Using as a library The `ormolu` package can also be depended upon from other Haskell programs. For these purposes only the top `Ormolu` module should be considered stable. It follows [PVP](https://pvp.haskell.org/) starting from the version 0.5.3.0. Rely on other modules at your own risk. ## Limitations * CPP support is experimental. CPP is virtually impossible to handle correctly, so we process them as a sort of unchangeable snippets. This works only in simple cases when CPP conditionals surround top-level declarations. See the [CPP][design-cpp] section in the design notes for a discussion of the dangers. ## Running on Hackage It's possible to try Ormolu on arbitrary packages from Hackage. For that execute (from the root of the cloned repo): ```console $ nix build .#hackage. ``` Then inspect `result/log.txt` for possible problems. The derivation will also contain formatted `.hs` files for inspection and original inputs with `.hs-original` extension (those are with CPP dropped, exactly what is fed into Ormolu). ## Forks and modifications We know of the following actively maintained forks: * [Fourmolu][fourmolu], which uses 4-space indentation and allows arbitrary configuration. ## Contributing See [CONTRIBUTING.md][contributing]. ## License See [LICENSE.md][license]. Copyright © 2018–present Tweag I/O [aur]: https://aur.archlinux.org/packages/ormolu [design-cpp]: https://github.com/tweag/ormolu/blob/master/DESIGN.md#cpp [emacs-package]: https://github.com/vyorkin/ormolu.el [haskell-src-exts]: https://hackage.haskell.org/package/haskell-src-exts [neoformat]: https://github.com/sbdchd/neoformat [releases]: https://github.com/tweag/ormolu/releases [run-ormolu]: https://github.com/haskell-actions/run-ormolu [vim-ormolu]: https://github.com/sdiehl/vim-ormolu [vs-code-plugin]: https://marketplace.visualstudio.com/items?itemName=sjurmillidahl.ormolu-vscode [fourmolu]: https://github.com/fourmolu/fourmolu [contributing]: https://github.com/tweag/ormolu/blob/master/CONTRIBUTING.md [license]: https://github.com/tweag/ormolu/blob/master/LICENSE.md ormolu-0.7.2.0/Setup.hs0000644000000000000000000000012707346545000013020 0ustar0000000000000000module Main (main) where import Distribution.Simple main :: IO () main = defaultMain ormolu-0.7.2.0/app/0000755000000000000000000000000007346545000012144 5ustar0000000000000000ormolu-0.7.2.0/app/Main.hs0000644000000000000000000003315307346545000013371 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Main (main) where import Control.Exception (throwIO) import Control.Monad import Data.Bool (bool) import Data.List (intercalate, sort) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict qualified as Map import Data.Maybe (fromMaybe, mapMaybe, maybeToList) import Data.Set qualified as Set import Data.Text.IO qualified as TIO import Data.Version (showVersion) import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import Language.Haskell.TH.Env (envQ) import Options.Applicative import Ormolu import Ormolu.Diff.Text (diffText, printTextDiff) import Ormolu.Fixity import Ormolu.Parser (manualExts) import Ormolu.Terminal import Ormolu.Utils (showOutputable) import Ormolu.Utils.Fixity import Ormolu.Utils.IO import Paths_ormolu (version) import System.Directory import System.Exit (ExitCode (..), exitWith) import System.FilePath qualified as FP import System.IO (hPutStrLn, stderr) -- | Entry point of the program. main :: IO () main = do Opts {..} <- execParser optsParserInfo let formatOne' = formatOne optConfigFileOpts optMode optSourceType optConfig exitCode <- case optInputFiles of [] -> formatOne' Nothing ["-"] -> formatOne' Nothing [x] -> formatOne' (Just x) xs -> do let selectFailure = \case ExitSuccess -> Nothing ExitFailure n -> Just n errorCodes <- mapMaybe selectFailure <$> mapM (formatOne' . Just) (sort xs) return $ if null errorCodes then ExitSuccess else ExitFailure $ if all (== 100) errorCodes then 100 else 102 exitWith exitCode -- | Format a single input. formatOne :: -- | How to use .cabal files ConfigFileOpts -> -- | Mode of operation Mode -> -- | The 'SourceType' requested by the user Maybe SourceType -> -- | Configuration Config RegionIndices -> -- | File to format or stdin as 'Nothing' Maybe FilePath -> IO ExitCode formatOne ConfigFileOpts {..} mode reqSourceType rawConfig mpath = withPrettyOrmoluExceptions (cfgColorMode rawConfig) $ do let getCabalInfoForSourceFile' sourceFile = do cabalSearchResult <- getCabalInfoForSourceFile sourceFile let debugEnabled = cfgDebug rawConfig case cabalSearchResult of CabalNotFound -> do when debugEnabled $ hPutStrLn stderr $ "Could not find a .cabal file for " <> sourceFile return Nothing CabalDidNotMention cabalInfo -> do when debugEnabled $ do relativeCabalFile <- makeRelativeToCurrentDirectory (ciCabalFilePath cabalInfo) hPutStrLn stderr $ "Found .cabal file " <> relativeCabalFile <> ", but it did not mention " <> sourceFile return (Just cabalInfo) CabalFound cabalInfo -> return (Just cabalInfo) getDotOrmoluForSourceFile' sourceFile = do if optDoNotUseDotOrmolu then return Nothing else Just <$> getDotOrmoluForSourceFile sourceFile case FP.normalise <$> mpath of -- input source = STDIN Nothing -> do mcabalInfo <- case (optStdinInputFile, optDoNotUseCabal) of (_, True) -> return Nothing (Nothing, False) -> throwIO OrmoluMissingStdinInputFile (Just inputFile, False) -> getCabalInfoForSourceFile' inputFile mdotOrmolu <- case optStdinInputFile of Nothing -> return Nothing Just inputFile -> getDotOrmoluForSourceFile' inputFile config <- patchConfig Nothing mcabalInfo mdotOrmolu case mode of Stdout -> do ormoluStdin config >>= TIO.putStr return ExitSuccess InPlace -> do hPutStrLn stderr "In place editing is not supported when input comes from stdin." -- 101 is different from all the other exit codes we already use. return (ExitFailure 101) Check -> do -- ormoluStdin is not used because we need the originalInput originalInput <- getContentsUtf8 let stdinRepr = "" formattedInput <- ormolu config stdinRepr originalInput handleDiff originalInput formattedInput stdinRepr -- input source = a file Just inputFile -> do mcabalInfo <- if optDoNotUseCabal then return Nothing else getCabalInfoForSourceFile' inputFile mdotOrmolu <- getDotOrmoluForSourceFile' inputFile config <- patchConfig (Just (detectSourceType inputFile)) mcabalInfo mdotOrmolu case mode of Stdout -> do ormoluFile config inputFile >>= TIO.putStr return ExitSuccess InPlace -> do -- ormoluFile is not used because we need originalInput originalInput <- readFileUtf8 inputFile formattedInput <- ormolu config inputFile originalInput when (formattedInput /= originalInput) $ writeFileUtf8 inputFile formattedInput return ExitSuccess Check -> do -- ormoluFile is not used because we need originalInput originalInput <- readFileUtf8 inputFile formattedInput <- ormolu config inputFile originalInput handleDiff originalInput formattedInput inputFile where patchConfig mdetectedSourceType mcabalInfo mdotOrmolu = do let sourceType = fromMaybe ModuleSource (reqSourceType <|> mdetectedSourceType) let mfixityOverrides = fst <$> mdotOrmolu mmoduleReexports = snd <$> mdotOrmolu return $ refineConfig sourceType mcabalInfo mfixityOverrides mmoduleReexports rawConfig handleDiff originalInput formattedInput fileRepr = case diffText originalInput formattedInput fileRepr of Nothing -> return ExitSuccess Just diff -> do runTerm (printTextDiff diff) (cfgColorMode rawConfig) stderr -- 100 is different to all the other exit code that are emitted -- either from an 'OrmoluException' or from 'error' and -- 'notImplemented'. return (ExitFailure 100) ---------------------------------------------------------------------------- -- Command line options parsing -- | All command line options. data Opts = Opts { -- | Mode of operation optMode :: !Mode, -- | Ormolu 'Config' optConfig :: !(Config RegionIndices), -- | Options related to info extracted from files optConfigFileOpts :: ConfigFileOpts, -- | Source type option, where 'Nothing' means autodetection optSourceType :: !(Maybe SourceType), -- | Haskell source files to format or stdin (when the list is empty) optInputFiles :: ![FilePath] } -- | Mode of operation. data Mode = -- | Output formatted source code to stdout Stdout | -- | Overwrite original file InPlace | -- | Exit with non-zero status code if -- source is not already formatted Check deriving (Eq, Show) -- | Options related to configuration stored in the file system. data ConfigFileOpts = ConfigFileOpts { -- | DO NOT extract default-extensions and dependencies from .cabal files optDoNotUseCabal :: Bool, -- | DO NOT look for @.ormolu@ files optDoNotUseDotOrmolu :: Bool, -- | Optional path to a file which will be used to find a .cabal file -- when using input from stdin optStdinInputFile :: Maybe FilePath } deriving (Show) optsParserInfo :: ParserInfo Opts optsParserInfo = info (helper <*> ver <*> exts <*> optsParser) . mconcat $ [fullDesc] where ver :: Parser (a -> a) ver = infoOption verStr . mconcat $ [ long "version", short 'v', help "Print version of the program" ] verStr = intercalate "\n" [ unwords $ ["ormolu", showVersion version] <> maybeToList $$(envQ @String "ORMOLU_REV"), "using ghc-lib-parser " ++ VERSION_ghc_lib_parser ] exts :: Parser (a -> a) exts = infoOption displayExts . mconcat $ [ long "manual-exts", help "Display extensions that need to be enabled manually" ] displayExts = unlines $ sort (showOutputable <$> manualExts) optsParser :: Parser Opts optsParser = Opts <$> ( (fmap (bool Stdout InPlace) . switch . mconcat) [ short 'i', help "A shortcut for --mode inplace" ] <|> (option parseMode . mconcat) [ long "mode", short 'm', metavar "MODE", value Stdout, help "Mode of operation: 'stdout' (the default), 'inplace', or 'check'" ] ) <*> configParser <*> configFileOptsParser <*> sourceTypeParser <*> (many . strArgument . mconcat) [ metavar "FILE", help "Haskell source files to format or stdin (the default)" ] configFileOptsParser :: Parser ConfigFileOpts configFileOptsParser = ConfigFileOpts <$> (switch . mconcat) [ long "no-cabal", help "Do not extract default-extensions and dependencies from .cabal files" ] <*> (switch . mconcat) [ long "no-dot-ormolu", help "Do not look for .ormolu files" ] <*> (optional . strOption . mconcat) [ long "stdin-input-file", help "Path which will be used to find the .cabal file when using input from stdin" ] configParser :: Parser (Config RegionIndices) configParser = Config <$> (fmap (fmap DynOption) . many . strOption . mconcat) [ long "ghc-opt", short 'o', metavar "OPT", help "GHC options to enable (e.g. language extensions)" ] <*> ( fmap (FixityOverrides . Map.fromList . mconcat) . many . option parseFixityDeclaration . mconcat ) [ long "fixity", short 'f', metavar "FIXITY", help "Fixity declaration to use (an override)" ] <*> ( fmap (ModuleReexports . Map.fromListWith (<>) . mconcat . pure) . many . option parseModuleReexportDeclaration . mconcat ) [ long "reexport", short 'r', metavar "REEXPORT", help "Module re-export that Ormolu should know about" ] <*> (fmap Set.fromList . many . strOption . mconcat) [ long "package", short 'p', metavar "PACKAGE", help "Explicitly specified dependency (for operator fixity/precedence only)" ] <*> (switch . mconcat) [ long "unsafe", short 'u', help "Do formatting faster but without automatic detection of defects" ] <*> (switch . mconcat) [ long "debug", short 'd', help "Output information useful for debugging" ] <*> (switch . mconcat) [ long "check-idempotence", short 'c', help "Fail if formatting is not idempotent" ] -- We cannot parse the source type here, because we might need to do -- autodection based on the input file extension (not available here) -- before storing the resolved value in the config struct. <*> pure ModuleSource <*> (option parseColorMode . mconcat) [ long "color", metavar "WHEN", value Auto, help "Colorize the output; WHEN can be 'never', 'always', or 'auto' (the default)" ] <*> ( RegionIndices <$> (optional . option auto . mconcat) [ long "start-line", metavar "START", help "Start line of the region to format (starts from 1)" ] <*> (optional . option auto . mconcat) [ long "end-line", metavar "END", help "End line of the region to format (inclusive)" ] ) sourceTypeParser :: Parser (Maybe SourceType) sourceTypeParser = (option parseSourceType . mconcat) [ long "source-type", short 't', metavar "TYPE", value Nothing, help "Set the type of source; TYPE can be 'module', 'sig', or 'auto' (the default)" ] ---------------------------------------------------------------------------- -- Helpers -- | Parse 'Mode'. parseMode :: ReadM Mode parseMode = eitherReader $ \case "stdout" -> Right Stdout "inplace" -> Right InPlace "check" -> Right Check s -> Left $ "unknown mode: " ++ s -- | Parse a fixity declaration. parseFixityDeclaration :: ReadM [(OpName, FixityInfo)] parseFixityDeclaration = eitherReader parseFixityDeclarationStr -- | Parse a module reexport declaration. parseModuleReexportDeclaration :: ReadM (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) parseModuleReexportDeclaration = eitherReader parseModuleReexportDeclarationStr -- | Parse 'ColorMode'. parseColorMode :: ReadM ColorMode parseColorMode = eitherReader $ \case "never" -> Right Never "always" -> Right Always "auto" -> Right Auto s -> Left $ "unknown color mode: " ++ s -- | Parse the 'SourceType'. 'Nothing' means that autodetection based on -- file extension is requested. parseSourceType :: ReadM (Maybe SourceType) parseSourceType = eitherReader $ \case "module" -> Right (Just ModuleSource) "sig" -> Right (Just SignatureSource) "auto" -> Right Nothing s -> Left $ "unknown source type: " ++ s ormolu-0.7.2.0/data/cabal-tests/0000755000000000000000000000000007346545000014477 5ustar0000000000000000ormolu-0.7.2.0/data/cabal-tests/Bar.hs0000644000000000000000000000006507346545000015540 0ustar0000000000000000module Foo where import Data.List qualified as List ormolu-0.7.2.0/data/cabal-tests/Foo.hs0000644000000000000000000000006507346545000015557 0ustar0000000000000000module Foo where import Data.List qualified as List ormolu-0.7.2.0/data/cabal-tests/test.cabal0000644000000000000000000000034607346545000016445 0ustar0000000000000000cabal-version: 2.4 name: test version: 0 library exposed-modules: Foo hs-source-dirs: . default-extensions: ImportQualifiedPost executable app main-is: Main other-modules: Bar default-extensions: ImportQualifiedPost ormolu-0.7.2.0/data/diff-tests/inputs/0000755000000000000000000000000007346545000015667 5ustar0000000000000000ormolu-0.7.2.0/data/diff-tests/inputs/applicative-after.hs0000644000000000000000000000036107346545000021623 0ustar0000000000000000testPermParser :: Permutation Parser String testPermParser = f <$> toPermutationWithDefault 'x' (char 'a') <*> toPermutationWithDefault 'y' (char 'b') <*> toPermutationWithDefault 'z' (char 'c') where f a b c = [a, b, c] ormolu-0.7.2.0/data/diff-tests/inputs/applicative-before.hs0000644000000000000000000000035507346545000021767 0ustar0000000000000000testPermParser :: Permutation Parser String testPermParser = f <$> toPermutationWithDefault 'x' (char 'a') <*> toPermutationWithDefault 'y' (char 'b') <*> toPermutationWithDefault 'z' (char 'c') where f a b c = [a, b, c] ormolu-0.7.2.0/data/diff-tests/inputs/empty.hs0000644000000000000000000000000007346545000017347 0ustar0000000000000000ormolu-0.7.2.0/data/diff-tests/inputs/longer-v2.hs0000644000000000000000000000013407346545000020034 0ustar0000000000000000module Main (foo) where a b c main :: IO () main = return () d e f g foo :: Int foo = 6 ormolu-0.7.2.0/data/diff-tests/inputs/longer.hs0000644000000000000000000000013507346545000017510 0ustar0000000000000000module Main (main) where a b c main :: IO () main = return () d e f g foo :: Int foo = 5 ormolu-0.7.2.0/data/diff-tests/inputs/main-and-bar-v2.hs0000644000000000000000000000014107346545000020772 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 bar :: Int bar = 7 ormolu-0.7.2.0/data/diff-tests/inputs/main-and-bar.hs0000644000000000000000000000014307346545000020447 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 bar :: Int bar = 6 ormolu-0.7.2.0/data/diff-tests/inputs/main-and-baz-v2.hs0000644000000000000000000000015007346545000021002 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 + 5 bar :: Int bar = 7 ormolu-0.7.2.0/data/diff-tests/inputs/main-and-baz.hs0000644000000000000000000000015207346545000020457 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 + 5 bar :: Int bar = 6 ormolu-0.7.2.0/data/diff-tests/inputs/main-and-foo-v2.hs0000644000000000000000000000011307346545000021010 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 ormolu-0.7.2.0/data/diff-tests/inputs/main-and-foo.hs0000644000000000000000000000011507346545000020465 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 ormolu-0.7.2.0/data/diff-tests/inputs/main-foo.hs0000644000000000000000000000007007346545000017725 0ustar0000000000000000module Main (foo) where main :: IO () main = return () ormolu-0.7.2.0/data/diff-tests/inputs/main-v2.hs0000644000000000000000000000006707346545000017477 0ustar0000000000000000module Main (main) where main :: IO () main = pure () ormolu-0.7.2.0/data/diff-tests/inputs/main.hs0000644000000000000000000000007107346545000017145 0ustar0000000000000000module Main (main) where main :: IO () main = return () ormolu-0.7.2.0/data/diff-tests/inputs/no-trailing-blank-line.hs0000644000000000000000000000002007346545000022450 0ustar0000000000000000data Test = Testormolu-0.7.2.0/data/diff-tests/inputs/one-line.hs0000644000000000000000000000003107346545000017723 0ustar0000000000000000module Main (main) where ormolu-0.7.2.0/data/diff-tests/inputs/spaced-v2.hs0000644000000000000000000000012407346545000020004 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 ormolu-0.7.2.0/data/diff-tests/inputs/spaced.hs0000644000000000000000000000012607346545000017461 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 ormolu-0.7.2.0/data/diff-tests/inputs/with-trailing-blank-line.hs0000644000000000000000000000002107346545000023010 0ustar0000000000000000data Test = Test ormolu-0.7.2.0/data/diff-tests/outputs/0000755000000000000000000000000007346545000016070 5ustar0000000000000000ormolu-0.7.2.0/data/diff-tests/outputs/joined-hunk.txt0000644000000000000000000000024507346545000021045 0ustar0000000000000000TEST @@ -1,11 +1,11 @@ module Main (main) where main :: IO () - main = return () + main = pure () foo :: Int foo = 5 bar :: Int - bar = 6 + bar = 7 ormolu-0.7.2.0/data/diff-tests/outputs/no-following.txt0000644000000000000000000000014507346545000021243 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ module Main (main) where main :: IO () - main = return () + main = pure () ormolu-0.7.2.0/data/diff-tests/outputs/no-preceding.txt0000644000000000000000000000015607346545000021205 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ - module Main (foo) where + module Main (main) where main :: IO () main = return () ormolu-0.7.2.0/data/diff-tests/outputs/one-line-added.txt0000644000000000000000000000006007346545000021372 0ustar0000000000000000TEST @@ -1,0 +1,1 @@ + module Main (main) where ormolu-0.7.2.0/data/diff-tests/outputs/one-line-removed.txt0000644000000000000000000000006007346545000021772 0ustar0000000000000000TEST @@ -1,1 +1,0 @@ - module Main (main) where ormolu-0.7.2.0/data/diff-tests/outputs/simple-hunk.txt0000644000000000000000000000017507346545000021070 0ustar0000000000000000TEST @@ -1,7 +1,7 @@ module Main (main) where main :: IO () - main = return () + main = pure () foo :: Int foo = 5 ormolu-0.7.2.0/data/diff-tests/outputs/trailing-blank-line.txt0000644000000000000000000000005207346545000022451 0ustar0000000000000000TEST @@ -1,1 +1,2 @@ data Test = Test + ormolu-0.7.2.0/data/diff-tests/outputs/trimming-trailing-both-eof.txt0000644000000000000000000000045607346545000023774 0ustar0000000000000000TEST @@ -1,6 +1,7 @@ testPermParser :: Permutation Parser String testPermParser = - f <$> toPermutationWithDefault 'x' (char 'a') + f + <$> toPermutationWithDefault 'x' (char 'a') <*> toPermutationWithDefault 'y' (char 'b') <*> toPermutationWithDefault 'z' (char 'c') where ormolu-0.7.2.0/data/diff-tests/outputs/trimming-trailing-both-out-of-margin.txt0000644000000000000000000000021307346545000025676 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ - module Main (main) where + module Main (foo) where a b @@ -13,4 +13,4 @@ g foo :: Int - foo = 5 + foo = 6 ormolu-0.7.2.0/data/diff-tests/outputs/trimming.txt0000644000000000000000000000011107346545000020450 0ustar0000000000000000TEST @@ -7,2 +7,2 @@ main :: IO () - main = return () + main = pure () ormolu-0.7.2.0/data/diff-tests/outputs/two-hunks.txt0000644000000000000000000000026607346545000020574 0ustar0000000000000000TEST @@ -1,7 +1,7 @@ module Main (main) where main :: IO () - main = return () + main = pure () foo :: Int foo = @@ -9,4 +9,4 @@ + 5 bar :: Int - bar = 6 + bar = 7 ormolu-0.7.2.0/data/examples/declaration/annotation/0000755000000000000000000000000007346545000020552 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/annotation/annotation-out.hs0000644000000000000000000000034307346545000024065 0ustar0000000000000000{-# ANN module (5 :: Int) #-} {-# ANN module ( 5 :: Int ) #-} {-# ANN foo "hey" #-} foo :: Int foo = 5 {-# ANN Char (Just 42) #-} data Foo = Foo Int {-# ANN type Foo ("HLint: ignore") #-} {- Comment -} ormolu-0.7.2.0/data/examples/declaration/annotation/annotation.hs0000644000000000000000000000041407346545000023257 0ustar0000000000000000{-#ANN module (5 :: Int)#-} {-# ANN module (5 :: Int)#-} {-# ANN foo "hey" #-} foo :: Int foo = 5 {-# ANN Char (Just 42)#-} data Foo = Foo Int {-# ANN type Foo ("HLint: ignore") #-} {- Comment -} ormolu-0.7.2.0/data/examples/declaration/class/0000755000000000000000000000000007346545000017505 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/class/associated-data1-out.hs0000644000000000000000000000025307346545000023755 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} class Foo a where data FooBar a -- | Something. class Bar a where -- | Bar bar data BarBar a -- | Bar baz data BarBaz a ormolu-0.7.2.0/data/examples/declaration/class/associated-data1.hs0000644000000000000000000000027107346545000023150 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} class Foo a where data FooBar a -- | Something. class Bar a where -- | Bar bar data BarBar a -- | Bar baz data family BarBaz a ormolu-0.7.2.0/data/examples/declaration/class/associated-data2-out.hs0000644000000000000000000000031407346545000023754 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} module Main where -- | Something more. class Baz a where -- | Baz bar data BazBar a b c -- | Baz baz data BazBaz b a c ormolu-0.7.2.0/data/examples/declaration/class/associated-data2.hs0000644000000000000000000000033707346545000023154 0ustar0000000000000000module Main where {-# LANGUAGE TypeFamilies #-} -- | Something more. class Baz a where -- | Baz bar data BazBar a b c -- | Baz baz data family BazBaz b a c ormolu-0.7.2.0/data/examples/declaration/class/associated-type-defaults-out.hs0000644000000000000000000000050307346545000025547 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} class Foo a where type FooBar a = Int -- | Something. class Bar a where -- Define bar type BarBar a = BarBaz a -- Define baz type BarBaz a = BarBar -- Middle comment a class Baz a where type BazBar a type BazBar a = Bar a ormolu-0.7.2.0/data/examples/declaration/class/associated-type-defaults.hs0000644000000000000000000000046507346545000024751 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} class Foo a where type FooBar a = Int -- | Something. class Bar a where -- Define bar type BarBar a = BarBaz a -- Define baz type BarBaz a = BarBar -- Middle comment a class Baz a where type BazBar a type BazBar a = Bar a ormolu-0.7.2.0/data/examples/declaration/class/associated-types1-out.hs0000644000000000000000000000025307346545000024210 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} class Foo a where type FooBar a -- | Something. class Bar a where -- | Bar bar type BarBar a -- | Bar baz type BarBaz a ormolu-0.7.2.0/data/examples/declaration/class/associated-types1.hs0000644000000000000000000000026207346545000023403 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} class Foo a where type FooBar a -- | Something. class Bar a where -- | Bar bar type BarBar a -- | Bar baz type BarBaz a ormolu-0.7.2.0/data/examples/declaration/class/associated-types2-out.hs0000644000000000000000000000035407346545000024213 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} module Main where -- | Something more. class Baz a where -- | Baz bar type BazBar a -- Foo b -- Bar c -- | Baz baz type -- After type BazBaz b a c ormolu-0.7.2.0/data/examples/declaration/class/associated-types2.hs0000644000000000000000000000040707346545000023405 0ustar0000000000000000module Main where {-# LANGUAGE TypeFamilies #-} -- | Something more. class Baz a where -- | Baz bar type BazBar a -- Foo b -- Bar c -- | Baz baz type -- After type BazBaz b a c ormolu-0.7.2.0/data/examples/declaration/class/default-implementations-comments-out.hs0000644000000000000000000000045707346545000027331 0ustar0000000000000000module Main where -- | Baz class Baz a where foobar :: a -> a foobar a = barbaz (bazbar a) -- | Bar baz barbaz :: a -> a -- | Baz bar bazbar :: a -> a -- First comment barbaz a = bazbar -- Middle comment a -- Last comment bazbar a = barbaz a ormolu-0.7.2.0/data/examples/declaration/class/default-implementations-comments.hs0000644000000000000000000000054307346545000026520 0ustar0000000000000000module Main where -- | Baz class Baz a where foobar :: a -> a foobar a = barbaz (bazbar a) -- | Bar baz barbaz :: a -> a -- | Baz bar bazbar :: a -> a -- First comment barbaz a = bazbar -- Middle comment a -- Last comment bazbar a = barbaz a ormolu-0.7.2.0/data/examples/declaration/class/default-implementations-out.hs0000644000000000000000000000022007346545000025472 0ustar0000000000000000module Main where -- | Foo class Foo a where foo :: a -> a foo a = a -- | Bar class Bar a where bar :: a -> Int bar = const 0 ormolu-0.7.2.0/data/examples/declaration/class/default-implementations.hs0000644000000000000000000000024307346545000024672 0ustar0000000000000000module Main where -- | Foo class Foo a where foo :: a -> a foo a = a -- | Bar class Bar a where bar :: a -> Int bar = const 0 ormolu-0.7.2.0/data/examples/declaration/class/default-signatures-out.hs0000644000000000000000000000051107346545000024451 0ustar0000000000000000{-# LANGUAGE DefaultSignatures #-} module Main where -- | Something else. class Bar a where -- | Bar bar :: String -> String -> a -- Pointless comment default bar :: ( Read a, Semigroup a ) => a -> a -> a -- Even more pointless comment bar a b = read a <> read b ormolu-0.7.2.0/data/examples/declaration/class/default-signatures-simple-out.hs0000644000000000000000000000021307346545000025737 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: (Show a) => a -> String foo = show ormolu-0.7.2.0/data/examples/declaration/class/default-signatures-simple.hs0000644000000000000000000000022107346545000025131 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: Show a => a -> String foo = show ormolu-0.7.2.0/data/examples/declaration/class/default-signatures.hs0000644000000000000000000000056407346545000023654 0ustar0000000000000000module Main where {-# LANGUAGE DefaultSignatures #-} -- | Something else. class Bar a where -- | Bar bar :: String -> String -> a -- Pointless comment default bar :: ( Read a, Semigroup a ) => a -> a -> a -- Even more pointless comment bar a b = read a <> read b ormolu-0.7.2.0/data/examples/declaration/class/dependency-super-classes-out.hs0000644000000000000000000000067607346545000025564 0ustar0000000000000000{-# LANGUAGE FunctionalDependencies #-} module Main where -- | Something. class (MonadReader r s, MonadWriter w m) => MonadState s m | m -> s where get :: m s put :: s -> m () -- | 'MonadParsec' class ( Stream s, -- Token streams MonadPlus m -- Potential for failure ) => MonadParsec e s m | m -> e s where -- | 'getState' returns state getState :: m s -- | 'putState' sets state putState :: s -> m () ormolu-0.7.2.0/data/examples/declaration/class/dependency-super-classes.hs0000644000000000000000000000075507346545000024755 0ustar0000000000000000module Main where {-# LANGUAGE FunctionalDependencies #-} -- | Something. class ( MonadReader r s,MonadWriter w m ) => MonadState s m| m -> s where get :: m s put :: s -> m () -- | 'MonadParsec' class ( Stream s, -- Token streams MonadPlus m -- Potential for failure ) => MonadParsec e s m | m -> e s where -- | 'getState' returns state getState :: m s -- | 'putState' sets state putState :: s -> m () ormolu-0.7.2.0/data/examples/declaration/class/empty-classes-out.hs0000644000000000000000000000010007346545000023426 0ustar0000000000000000module Main where -- | Foo! class Foo a -- | Bar! class Bar a ormolu-0.7.2.0/data/examples/declaration/class/empty-classes.hs0000644000000000000000000000010507346545000022626 0ustar0000000000000000module Main where -- | Foo! class Foo a where -- | Bar! class Bar a ormolu-0.7.2.0/data/examples/declaration/class/functional-dependencies-out.hs0000644000000000000000000000051007346545000025430 0ustar0000000000000000{-# LANGUAGE FunctionalDependencies #-} module Main where -- | Something. class Foo a b | a -> b class Bar a b | a -> b, b -> a where bar :: a -- | Something else. class Baz a b c d | a b -> c d, -- Foo b c -> a d, -- Bar a c -> b d, -- Baz a c d -> b, a b d -> a b c d where baz :: a -> b ormolu-0.7.2.0/data/examples/declaration/class/functional-dependencies.hs0000644000000000000000000000050407346545000024626 0ustar0000000000000000module Main where {-# LANGUAGE FunctionalDependencies #-} -- | Something. class Foo a b | a -> b class Bar a b | a -> b, b -> a where bar :: a -- | Something else. class Baz a b c d | a b -> c d -- Foo , b c -> a d -- Bar , a c -> b d-- Baz , a c d -> b , a b d -> a b c d where baz :: a -> b ormolu-0.7.2.0/data/examples/declaration/class/multi-parameters1-out.hs0000644000000000000000000000031407346545000024220 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} class Foo a b where foo :: a -> b -- | Something. class Bar a b c d where bar :: a -> b -> c -> d class -- Before name Baz where baz :: Int ormolu-0.7.2.0/data/examples/declaration/class/multi-parameters1.hs0000644000000000000000000000035207346545000023415 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} class Foo a b where foo :: a -> b -- | Something. class Bar a b c d where bar :: a -> b -> c -> d class -- Before name Baz where baz :: Int ormolu-0.7.2.0/data/examples/declaration/class/multi-parameters2-out.hs0000644000000000000000000000035107346545000024222 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} module Main where -- | Something else. class BarBaz a -- Foo b -- Bar c -- Baz bar d -- Baz baz e -- Rest f where barbaz :: a -> f bazbar :: e -> f ormolu-0.7.2.0/data/examples/declaration/class/multi-parameters2.hs0000644000000000000000000000052407346545000023417 0ustar0000000000000000module Main where {-# LANGUAGE MultiParamTypeClasses #-} -- | Something else. class BarBaz a -- Foo b -- Bar c -- Baz bar d -- Baz baz e -- Rest f where barbaz :: a -> f bazbar :: e -> f ormolu-0.7.2.0/data/examples/declaration/class/newlines-after-where-out.hs0000644000000000000000000000011707346545000024700 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a ormolu-0.7.2.0/data/examples/declaration/class/newlines-after-where.hs0000644000000000000000000000012107346545000024066 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a ormolu-0.7.2.0/data/examples/declaration/class/newlines-and-default-decls-out.hs0000644000000000000000000000022107346545000025737 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () ormolu-0.7.2.0/data/examples/declaration/class/newlines-and-default-decls.hs0000644000000000000000000000022307346545000025134 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () ormolu-0.7.2.0/data/examples/declaration/class/newlines-and-haddocks-out.hs0000644000000000000000000000046607346545000025016 0ustar0000000000000000class Foo a where -- | Haddock foo :: a -- | Another Haddock bar :: a baz :: a -- ^ Post-Haddock raz :: a -- ^ Another Post-Haddock -- | One more Haddock qux :: a -- Comment before a Haddock -- | And one more Haddock xyz :: a -- | Haddock followed by a blank line abc :: a ormolu-0.7.2.0/data/examples/declaration/class/newlines-and-haddocks.hs0000644000000000000000000000046207346545000024205 0ustar0000000000000000class Foo a where -- | Haddock foo :: a -- | Another Haddock bar :: a baz :: a -- ^ Post-Haddock raz :: a -- ^ Another Post-Haddock -- | One more Haddock qux :: a -- Comment before a Haddock -- | And one more Haddock xyz :: a -- | Haddock followed by a blank line abc :: a ormolu-0.7.2.0/data/examples/declaration/class/newlines-between-methods-out.hs0000644000000000000000000000044107346545000025561 0ustar0000000000000000class Num a where (+) :: a -> a -> a (-) :: a -> a -> a (*) :: a -> a -> a -- Comment before definition negate :: a -> a -- Comment after definition -- Separator abs :: a -> a signum :: a -> a -- Comment between unrelated definitions fromInteger :: Integer -> a ormolu-0.7.2.0/data/examples/declaration/class/newlines-between-methods.hs0000644000000000000000000000043707346545000024761 0ustar0000000000000000class Num a where (+) :: a -> a -> a (-) :: a -> a -> a (*) :: a -> a -> a -- Comment before definition negate :: a -> a -- Comment after definition -- Separator abs :: a -> a signum :: a -> a -- Comment between unrelated definitions fromInteger :: Integer -> a ormolu-0.7.2.0/data/examples/declaration/class/poly-kinded-classes-out.hs0000644000000000000000000000015307346545000024517 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a :: k) class Bar ( a :: -- Variable * -- Star ) ormolu-0.7.2.0/data/examples/declaration/class/poly-kinded-classes.hs0000644000000000000000000000014507346545000023713 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a::k) class Bar (a -- Variable :: * -- Star ) ormolu-0.7.2.0/data/examples/declaration/class/single-parameters-out.hs0000644000000000000000000000053507346545000024273 0ustar0000000000000000module Main where -- | Something. class Foo a where foo :: a -- | Something more. class Bar a where -- | Bar bar :: a -> a -> a class Baz a where -- | Baz baz :: -- | First argument ( a, a ) -> -- | Second argument a -> -- | Return value a class BarBaz a where barbaz :: a -> b bazbar :: b -> a ormolu-0.7.2.0/data/examples/declaration/class/single-parameters.hs0000644000000000000000000000055207346545000023465 0ustar0000000000000000module Main where -- | Something. class Foo a where foo :: a -- | Something more. class Bar a where -- | Bar bar :: a -> a -> a class Baz a where -- | Baz baz :: (a, a) -- ^ First argument -> a -- ^ Second argument -> a -- ^ Return value class BarBaz a where barbaz :: a -> b bazbar :: b -> a ormolu-0.7.2.0/data/examples/declaration/class/super-classes-out.hs0000644000000000000000000000022707346545000023440 0ustar0000000000000000class Foo a class (Foo a) => Bar a class (Foo a, Bar a) => Baz a class ( Foo a, -- Foo? Bar a, -- Bar? Baz a -- Baz ) => BarBar a ormolu-0.7.2.0/data/examples/declaration/class/super-classes.hs0000644000000000000000000000023307346545000022630 0ustar0000000000000000class () => Foo a class Foo a => Bar a class (Foo a,Bar a) => Baz a class ( Foo a, -- Foo? Bar a, -- Bar? Baz a -- Baz ) => BarBar a ormolu-0.7.2.0/data/examples/declaration/class/type-operators1-out.hs0000644000000000000000000000033107346545000023721 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class (:$) a b class (:&) a b class a :* b class a -- Before operator :+ b -- After operator class ( f :. g ) a ormolu-0.7.2.0/data/examples/declaration/class/type-operators1.hs0000644000000000000000000000033207346545000023115 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class (:$) a b class (:&) a b class a:*b class a -- Before operator :+ b -- After operator class ( f :. g ) a ormolu-0.7.2.0/data/examples/declaration/class/type-operators2-out.hs0000644000000000000000000000025507346545000023727 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class a `Pair` b class a `Sum` b class (f `Product` g) a class ( f `Sum` g ) a ormolu-0.7.2.0/data/examples/declaration/class/type-operators2.hs0000644000000000000000000000025507346545000023122 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class a`Pair`b class a `Sum` b class (f`Product`g)a class ( f `Sum` g ) a ormolu-0.7.2.0/data/examples/declaration/class/type-operators3-out.hs0000644000000000000000000000032007346545000023721 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE NoStarIsType #-} class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = () ormolu-0.7.2.0/data/examples/declaration/class/type-operators3.hs0000644000000000000000000000024007346545000023115 0ustar0000000000000000{-# LANGUAGE TypeFamilies, TypeOperators, NoStarIsType, PolyKinds #-} class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = () ormolu-0.7.2.0/data/examples/declaration/data/0000755000000000000000000000000007346545000017311 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/data/ctype-out.hs0000644000000000000000000000005507346545000021576 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T ormolu-0.7.2.0/data/examples/declaration/data/ctype.hs0000644000000000000000000000006007346545000020765 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T ormolu-0.7.2.0/data/examples/declaration/data/datatype-contexts-out.hs0000644000000000000000000000016507346545000024134 0ustar0000000000000000data (IsString s) => T s = T data (IsString s) => T s = T data ( IsString s, IsString s ) => T s = T ormolu-0.7.2.0/data/examples/declaration/data/datatype-contexts.hs0000644000000000000000000000015307346545000023324 0ustar0000000000000000data IsString s => T s = T data IsString s => T s = T data ( IsString s , IsString s ) => T s = T ormolu-0.7.2.0/data/examples/declaration/data/deriving-out.hs0000644000000000000000000000007607346545000022264 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) ormolu-0.7.2.0/data/examples/declaration/data/deriving-strategies-out.hs0000644000000000000000000000037507346545000024436 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving stock (Eq, Show, Generic) deriving anyclass ( ToJSON, FromJSON ) deriving newtype (Num) deriving (Monoid) via (Sum Int) deriving (Semigroup) via (Sum Int) ormolu-0.7.2.0/data/examples/declaration/data/deriving-strategies.hs0000644000000000000000000000036507346545000023630 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving stock (Eq, Show, Generic) deriving anyclass ( ToJSON , FromJSON ) deriving newtype (Num) deriving Monoid via (Sum Int) deriving Semigroup via (Sum Int) ormolu-0.7.2.0/data/examples/declaration/data/deriving.hs0000644000000000000000000000007607346545000021457 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) ormolu-0.7.2.0/data/examples/declaration/data/empty-out.hs0000644000000000000000000000005207346545000021605 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo ormolu-0.7.2.0/data/examples/declaration/data/empty.hs0000644000000000000000000000005207346545000021000 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo ormolu-0.7.2.0/data/examples/declaration/data/existential-multiline-out.hs0000644000000000000000000000034307346545000025003 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) | forall a. (Eq a) => MkBar a data Bar = forall x y. Bar x y x y data Baz = forall x y. Baz x y x y ormolu-0.7.2.0/data/examples/declaration/data/existential-multiline.hs0000644000000000000000000000033407346545000024176 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) | forall a. Eq a => MkBar a data Bar = forall x y. Bar x y x y data Baz = forall x y. Baz x y x y ormolu-0.7.2.0/data/examples/declaration/data/existential-out.hs0000644000000000000000000000020007346545000022773 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. (a + b) => Bar a b ormolu-0.7.2.0/data/examples/declaration/data/existential-unicode-out.hs0000644000000000000000000000013707346545000024430 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = forall a. Bar ormolu-0.7.2.0/data/examples/declaration/data/existential-unicode.hs0000644000000000000000000000012407346545000023617 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = ∀ a. Bar ormolu-0.7.2.0/data/examples/declaration/data/existential.hs0000644000000000000000000000017607346545000022202 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. a + b => Bar a b ormolu-0.7.2.0/data/examples/declaration/data/fat-multiline-out.hs0000644000000000000000000000020007346545000023214 0ustar0000000000000000module Main where -- | Something. data Foo = -- | Foo Foo Int Int | -- | Bar Bar Bool Bool ormolu-0.7.2.0/data/examples/declaration/data/fat-multiline.hs0000644000000000000000000000017107346545000022416 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Int Int -- ^ Foo | Bar Bool Bool -- ^ Bar ormolu-0.7.2.0/data/examples/declaration/data/field-layout/0000755000000000000000000000000007346545000021707 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/data/field-layout/gadt-out.hs0000644000000000000000000000022307346545000023764 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char ormolu-0.7.2.0/data/examples/declaration/data/field-layout/gadt.hs0000644000000000000000000000021007346545000023153 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char ormolu-0.7.2.0/data/examples/declaration/data/field-layout/record-out.hs0000644000000000000000000000024207346545000024324 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo { -- | Something foo :: Foo Int Int, -- | Something else bar :: Bar Char Char } ormolu-0.7.2.0/data/examples/declaration/data/field-layout/record.hs0000644000000000000000000000022707346545000023522 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo { foo :: Foo Int Int -- ^ Something , bar :: Bar Char Char -- ^ Something else } ormolu-0.7.2.0/data/examples/declaration/data/field-layout/variants-out.hs0000644000000000000000000000017707346545000024704 0ustar0000000000000000module Main where -- | Foo. data Foo = -- | Something Foo Int Int | -- | Something else Bar Char Char ormolu-0.7.2.0/data/examples/declaration/data/field-layout/variants.hs0000644000000000000000000000017007346545000024070 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo Int Int -- ^ Something | Bar Char Char -- ^ Something else ormolu-0.7.2.0/data/examples/declaration/data/gadt-syntax-out.hs0000644000000000000000000000011507346545000022712 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where MKFoo :: a -> (a -> Bool) -> Foo ormolu-0.7.2.0/data/examples/declaration/data/gadt-syntax.hs0000644000000000000000000000011707346545000022107 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where { MKFoo :: a -> (a->Bool) -> Foo } ormolu-0.7.2.0/data/examples/declaration/data/gadt/0000755000000000000000000000000007346545000020230 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/data/gadt/multiline-out.hs0000644000000000000000000000061307346545000023373 0ustar0000000000000000{-# LANGUAGE ExplicitForAll #-} module Main where -- | Here goes a comment. data Foo a where -- | 'Foo' is wonderful. Foo :: forall a b. (Show a, Eq b) => -- foo -- bar a -> b -> Foo 'Int -- | But 'Bar' is also not too bad. Bar :: Int -> Maybe Text -> Foo 'Bool -- | So is 'Baz'. Baz :: forall a. a -> Foo 'String (:~>) :: Foo a -> Foo a -> Foo a ormolu-0.7.2.0/data/examples/declaration/data/gadt/multiline-where-out.hs0000644000000000000000000000052207346545000024502 0ustar0000000000000000data Foo a b c where Foo :: a -> b -> c -> Foo a b c data Foo :: Type -> Type -> Type where Foo :: Foo a b data Foo a b c :: Type -> Type -> Type -> Type where Foo :: Foo a b c data Vec :: Type -> Type -> Type where Nil :: Vec a Ze Cons :: a -> Vec a n -> Vec a (Su n) ormolu-0.7.2.0/data/examples/declaration/data/gadt/multiline-where.hs0000644000000000000000000000051107346545000023673 0ustar0000000000000000data Foo a b c where Foo :: a -> b -> c -> Foo a b c data Foo :: Type -> Type -> Type where Foo :: Foo a b data Foo a b c :: Type -> Type -> Type -> Type where Foo :: Foo a b c data Vec :: Type -> Type -> Type where Nil :: Vec a Ze Cons :: a -> Vec a n -> Vec a (Su n) ormolu-0.7.2.0/data/examples/declaration/data/gadt/multiline.hs0000644000000000000000000000057407346545000022574 0ustar0000000000000000module Main where {-# LANGUAGE ExplicitForAll #-} -- | Here goes a comment. data Foo a where -- | 'Foo' is wonderful. Foo :: forall a b. (Show a, Eq b) -- foo -- bar => a -> b -> Foo 'Int -- | But 'Bar' is also not too bad. Bar :: Int -> Maybe Text -> Foo 'Bool -- | So is 'Baz'. Baz :: forall a. a -> Foo 'String (:~>) :: Foo a -> Foo a -> Foo a ormolu-0.7.2.0/data/examples/declaration/data/gadt/multiple-declaration-out.hs0000644000000000000000000000030007346545000025500 0ustar0000000000000000data GADT0 a where GADT01, GADT02 :: Int -> GADT0 a data GADT1 a where GADT11, GADT12 :: Int -> GADT1 a data GADT2 a where GADT21, GADT21, GADT22 :: Int -> GADT2 a ormolu-0.7.2.0/data/examples/declaration/data/gadt/multiple-declaration.hs0000644000000000000000000000027307346545000024704 0ustar0000000000000000data GADT0 a where GADT01, GADT02 :: Int -> GADT0 a data GADT1 a where GADT11 , GADT12 :: Int -> GADT1 a data GADT2 a where GADT21 , GADT21 , GADT22 :: Int -> GADT2 a ormolu-0.7.2.0/data/examples/declaration/data/gadt/record-out.hs0000644000000000000000000000032307346545000022645 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: {fooX :: Int} -> Foo Bar :: { fooY :: Int, fooBar, fooBaz :: Bool, fooFoo, barBar, bazBaz :: Int } -> Foo ormolu-0.7.2.0/data/examples/declaration/data/gadt/record.hs0000644000000000000000000000034307346545000022042 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: { fooX :: Int } -> Foo Bar :: { fooY :: Int , fooBar, fooBaz :: Bool , fooFoo , barBar , bazBaz :: Int } -> Foo ormolu-0.7.2.0/data/examples/declaration/data/gadt/simple-out.hs0000644000000000000000000000052007346545000022657 0ustar0000000000000000{-# LANGUAGE ExplicitForAll #-} module Main where -- | Here goes a comment. data Foo a where -- | 'Foo' is wonderful. Foo :: forall a b. (Show a, Eq b) => a -> b -> Foo 'Int Bar :: Int -> Text -> -- | But 'Bar' is also not too bad. Foo 'Bool Baz :: forall a. a -> -- | So is 'Baz'. Foo 'String ormolu-0.7.2.0/data/examples/declaration/data/gadt/simple.hs0000644000000000000000000000046107346545000022056 0ustar0000000000000000module Main where {-# LANGUAGE ExplicitForAll #-} -- | Here goes a comment. data Foo a where -- | 'Foo' is wonderful. Foo :: forall a b. (Show a, Eq b) => a -> b -> Foo 'Int Bar :: Int -> Text -> Foo 'Bool -- ^ But 'Bar' is also not too bad. Baz :: forall a. a -> Foo 'String -- ^ So is 'Baz'. ormolu-0.7.2.0/data/examples/declaration/data/gadt/strictness-out.hs0000644000000000000000000000017107346545000023571 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int ormolu-0.7.2.0/data/examples/declaration/data/gadt/strictness.hs0000644000000000000000000000017107346545000022764 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int ormolu-0.7.2.0/data/examples/declaration/data/gadt/unicode-out.hs0000644000000000000000000000012307346545000023013 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo :: Type -> Type where Foo :: a -> Foo a ormolu-0.7.2.0/data/examples/declaration/data/gadt/unicode.hs0000644000000000000000000000012707346545000022212 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo ∷ Type → Type where Foo ∷ a → Foo a ormolu-0.7.2.0/data/examples/declaration/data/infix-out.hs0000644000000000000000000000003107346545000021561 0ustar0000000000000000data Foo a b = a `Foo` b ormolu-0.7.2.0/data/examples/declaration/data/infix.hs0000644000000000000000000000003107346545000020754 0ustar0000000000000000data Foo a b = a `Foo` b ormolu-0.7.2.0/data/examples/declaration/data/kind-annotations-out.hs0000644000000000000000000000041707346545000023734 0ustar0000000000000000data Something (n :: Nat) = Something data Format (k :: *) (k' :: *) (k'' :: *) type Parens1 = Proxy '(a :: A, b :: (B :: *)) type Parens2 = Proxy '((a :: A), (b :: B)) type family Foo a where Foo '(a :: Int, b :: Bool) = Int Foo '((a :: Int), (b :: Bool)) = Int ormolu-0.7.2.0/data/examples/declaration/data/kind-annotations.hs0000644000000000000000000000041607346545000023126 0ustar0000000000000000data Something (n :: Nat) = Something data Format (k :: *) (k' :: *) (k'' :: *) type Parens1 = Proxy '(a :: A, b :: (B :: *)) type Parens2 = Proxy '((a :: A), (b :: B)) type family Foo a where Foo '(a :: Int, b :: Bool) = Int Foo '((a :: Int), (b :: Bool)) = Int ormolu-0.7.2.0/data/examples/declaration/data/multiline-arg-parens-out.hs0000644000000000000000000000022207346545000024505 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) ormolu-0.7.2.0/data/examples/declaration/data/multiline-arg-parens.hs0000644000000000000000000000023507346545000023704 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) ormolu-0.7.2.0/data/examples/declaration/data/multiline-names-out.hs0000644000000000000000000000044707346545000023562 0ustar0000000000000000data Foo a b = Foo a b data a :-> b = Arrow (a -> b) data (f :* g) a = f a :* g a data ( f :+ g ) a = L (f a) | R (g a) data a `Arrow` b = Arrow' (a -> b) data (f `Product` g) a = f a `Product` g a data ( f `Sum` g ) a = L' (f a) | R' (g a) ormolu-0.7.2.0/data/examples/declaration/data/multiline-names.hs0000644000000000000000000000044207346545000022750 0ustar0000000000000000data Foo a b = Foo a b data a :-> b = Arrow (a -> b) data (f :* g) a = f a :* g a data (f :+ g) a = L (f a) | R (g a) data a `Arrow` b = Arrow' (a -> b) data (f `Product` g) a = f a `Product` g a data (f `Sum` g) a = L' (f a) | R' (g a) ormolu-0.7.2.0/data/examples/declaration/data/multiline-out.hs0000644000000000000000000000022407346545000022452 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = -- | One Foo | -- | Two Bar Int | -- | Three Baz deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/multiline.hs0000644000000000000000000000021107346545000021641 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = Foo -- ^ One | Bar Int -- ^ Two | Baz -- ^ Three deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/newtype-out.hs0000644000000000000000000000011707346545000022144 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/newtype.hs0000644000000000000000000000012007346545000021331 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/operators-out.hs0000644000000000000000000000057407346545000022476 0ustar0000000000000000data ErrorMessage' s = -- | Show the text as is. Text s | -- | Pretty print the type. -- @ShowType :: k -> ErrorMessage@ forall t. ShowType t | -- | Put two pieces of error message next -- to each other. ErrorMessage' s :<>: ErrorMessage' s | -- | Stack two pieces of error message on top -- of each other. ErrorMessage' s :$$: ErrorMessage' s ormolu-0.7.2.0/data/examples/declaration/data/operators.hs0000644000000000000000000000057407346545000021671 0ustar0000000000000000data ErrorMessage' s = -- | Show the text as is. Text s | -- | Pretty print the type. -- @ShowType :: k -> ErrorMessage@ forall t. ShowType t | -- | Put two pieces of error message next -- to each other. ErrorMessage' s :<>: ErrorMessage' s | -- | Stack two pieces of error message on top -- of each other. ErrorMessage' s :$$: ErrorMessage' s ormolu-0.7.2.0/data/examples/declaration/data/partly-documented-out.hs0000644000000000000000000000021007346545000024103 0ustar0000000000000000data Optimisation = PETransform | -- | partial eval and associated transforms GeneralisedNatHack deriving (Show, Eq, Generic) ormolu-0.7.2.0/data/examples/declaration/data/partly-documented.hs0000644000000000000000000000020007346545000023275 0ustar0000000000000000data Optimisation = PETransform | GeneralisedNatHack -- ^ partial eval and associated transforms deriving (Show, Eq, Generic) ormolu-0.7.2.0/data/examples/declaration/data/record-multi-const-out.hs0000644000000000000000000000036007346545000024203 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { -- | X fooX :: Int, -- | Y fooY :: Int } | Bar { -- | X barX :: Int, -- | Y barY :: Int } deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/record-multi-const.hs0000644000000000000000000000026507346545000023402 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int -- ^ X , fooY :: Int -- ^ Y } | Bar { barX :: Int -- ^ X , barY :: Int -- ^ Y } deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/record-out.hs0000644000000000000000000000053707346545000021735 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { -- | X fooX :: Int, -- | Y fooY :: Int, -- | BarBaz fooBar, fooBaz :: NonEmpty (Identity Bool), -- | GagGog fooGag, fooGog :: NonEmpty ( Indentity Bool ), -- | Huh! fooFoo, barBar :: Int } deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/record-singleline-out.hs0000644000000000000000000000014307346545000024055 0ustar0000000000000000module Main where -- | Something. data Foo = Foo {fooX :: Int, fooY :: Int} deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/record-singleline.hs0000644000000000000000000000014707346545000023254 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int , fooY :: Int } deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/record.hs0000644000000000000000000000050107346545000021117 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int -- ^ X , fooY :: Int -- ^ Y , fooBar, fooBaz :: NonEmpty (Identity Bool) -- ^ BarBaz , fooGag, fooGog :: NonEmpty (Indentity Bool) -- ^ GagGog , fooFoo , barBar :: Int -- ^ Huh! } deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/simple-broken-out.hs0000644000000000000000000000022607346545000023221 0ustar0000000000000000module Main where -- | Here we go. data Foo = Foo {unFoo :: Int} deriving (Eq) -- | And once again. data Bar = Bar {unBar :: Int} deriving (Eq) ormolu-0.7.2.0/data/examples/declaration/data/simple-broken.hs0000644000000000000000000000023607346545000022415 0ustar0000000000000000module Main where -- | Here we go. data Foo = Foo { unFoo :: Int } deriving (Eq) -- | And once again. data Bar = Bar { unBar :: Int } deriving (Eq) ormolu-0.7.2.0/data/examples/declaration/data/simple-out.hs0000644000000000000000000000014507346545000021743 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/simple.hs0000644000000000000000000000014607346545000021137 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) ormolu-0.7.2.0/data/examples/declaration/data/single-constructor-with-haddock-out.hs0000644000000000000000000000035507346545000026665 0ustar0000000000000000data FutureSumType = -- | This is what the documentation for this type looks like. -- It is pretty awkward that the @--@s aren't aligned. SingleConstructor { someRecordField :: Bool, someOtherRecordField :: Int } ormolu-0.7.2.0/data/examples/declaration/data/single-constructor-with-haddock.hs0000644000000000000000000000034107346545000026053 0ustar0000000000000000data FutureSumType = -- | This is what the documentation for this type looks like. -- It is pretty awkward that the @--@s aren't aligned. SingleConstructor { someRecordField :: Bool, someOtherRecordField :: Int } ormolu-0.7.2.0/data/examples/declaration/data/strictness-out.hs0000644000000000000000000000023107346545000022647 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 {a :: {-# UNPACK #-} Maybe Int && Bool} ormolu-0.7.2.0/data/examples/declaration/data/strictness.hs0000644000000000000000000000023407346545000022045 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 { a :: {-# UNPACK #-} Maybe Int && Bool } ormolu-0.7.2.0/data/examples/declaration/data/type-data-out.hs0000644000000000000000000000026207346545000022342 0ustar0000000000000000type data Universe = Character | Number | Boolean type data Maybe a = Just a | Nothing type data P :: Type -> Type -> Type where MkP :: (a ~ Natural, b ~~ Char) => P a b ormolu-0.7.2.0/data/examples/declaration/data/type-data.hs0000644000000000000000000000030007346545000021526 0ustar0000000000000000type data Universe = Character | Number | Boolean type data Maybe a = Just a | Nothing type data P :: Type -> Type -> Type where MkP :: (a ~ Natural, b ~~ Char) => P a b ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-0-out.hs0000644000000000000000000000013607346545000024757 0ustar0000000000000000data Foo = -- | Bar Bar -- | Field 1 Field1 -- | Field 2 Field2 ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-0.hs0000644000000000000000000000012207346545000024145 0ustar0000000000000000data Foo = -- | Bar Bar Field1 -- ^ Field 1 Field2 -- ^ Field 2 ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-1-out.hs0000644000000000000000000000005507346545000024760 0ustar0000000000000000data X = B -- | y !Int C ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-1.hs0000644000000000000000000000004507346545000024152 0ustar0000000000000000data X = B !Int -- ^ y C ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-2-out.hs0000644000000000000000000000061707346545000024765 0ustar0000000000000000-- | Describes what sort of dictionary to generate for type class instances data Evidence = -- | An existing named instance NamedInstance (Qualified Ident) | -- | Computed instances WarnInstance -- | Warn type class with a user-defined warning message SourceType | -- | The IsSymbol type class for a given Symbol literal IsSymbolInstance PSString deriving (Show, Eq) ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-2.hs0000644000000000000000000000057407346545000024162 0ustar0000000000000000-- | Describes what sort of dictionary to generate for type class instances data Evidence -- | An existing named instance = NamedInstance (Qualified Ident) -- | Computed instances | WarnInstance SourceType -- ^ Warn type class with a user-defined warning message | IsSymbolInstance PSString -- ^ The IsSymbol type class for a given Symbol literal deriving (Show, Eq) ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-3-out.hs0000644000000000000000000000006607346545000024764 0ustar0000000000000000data A = A -- | a number Int Bool ormolu-0.7.2.0/data/examples/declaration/data/unnamed-field-comment-3.hs0000644000000000000000000000004507346545000024154 0ustar0000000000000000data A = A {- | a number -} Int Bool ormolu-0.7.2.0/data/examples/declaration/data/with-comment-out.hs0000644000000000000000000000004107346545000023060 0ustar0000000000000000data A = B -- C | -- D E ormolu-0.7.2.0/data/examples/declaration/data/with-comment.hs0000644000000000000000000000004607346545000022260 0ustar0000000000000000data A = B -- C -- D | E ormolu-0.7.2.0/data/examples/declaration/data/with-weird-haddock-out.hs0000644000000000000000000000013607346545000024130 0ustar0000000000000000data PlusLevel' t = -- | @n + ℓ@. Plus Integer (LevelAtom' t) deriving (Show, Data) ormolu-0.7.2.0/data/examples/declaration/data/with-weird-haddock.hs0000644000000000000000000000013107346545000023316 0ustar0000000000000000data PlusLevel' t = Plus Integer (LevelAtom' t) -- ^ @n + ℓ@. deriving (Show, Data) ormolu-0.7.2.0/data/examples/declaration/default/0000755000000000000000000000000007346545000020024 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/default/default-out.hs0000644000000000000000000000007707346545000022615 0ustar0000000000000000default (Int, Foo, Bar) default ( Int, Foo, Bar ) ormolu-0.7.2.0/data/examples/declaration/default/default.hs0000644000000000000000000000014507346545000022004 0ustar0000000000000000default ( Int , Foo , Bar ) default ( Int , Foo, Bar ) ormolu-0.7.2.0/data/examples/declaration/deriving/0000755000000000000000000000000007346545000020207 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/deriving/multiline-out.hs0000644000000000000000000000035007346545000023350 0ustar0000000000000000deriving instance Eq Foo deriving stock instance Show Foo deriving anyclass instance ToJSON Foo deriving newtype instance Data Foo deriving via Foo Int instance Triple A B C ormolu-0.7.2.0/data/examples/declaration/deriving/multiline.hs0000644000000000000000000000041607346545000022546 0ustar0000000000000000deriving instance Eq Foo deriving stock instance Show Foo deriving anyclass instance ToJSON Foo deriving newtype instance Data Foo deriving via Foo Int instance Triple A B C ormolu-0.7.2.0/data/examples/declaration/deriving/overlapping-out.hs0000644000000000000000000000033207346545000023674 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo ormolu-0.7.2.0/data/examples/declaration/deriving/overlapping.hs0000644000000000000000000000035007346545000023067 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo ormolu-0.7.2.0/data/examples/declaration/deriving/singleline-out.hs0000644000000000000000000000055107346545000023502 0ustar0000000000000000deriving instance Eq Foo deriving stock instance Show Foo deriving anyclass instance ToJSON Foo deriving newtype instance Data Foo deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo deriving via Int instance Triple A B C ormolu-0.7.2.0/data/examples/declaration/deriving/singleline.hs0000644000000000000000000000054407346545000022677 0ustar0000000000000000deriving instance Eq Foo deriving stock instance Show Foo deriving anyclass instance ToJSON Foo deriving newtype instance Data Foo deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo deriving via Int instance Triple A B C ormolu-0.7.2.0/data/examples/declaration/foreign/0000755000000000000000000000000007346545000020031 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/foreign/foreign-export-out.hs0000644000000000000000000000047107346545000024144 0ustar0000000000000000foreign export ccall foo :: Int -> IO Int -- | 'foreignTomFun' is a very important thing foreign export ccall "tomography" foreignTomFun :: StablePtr Storage {- Storage is bad -} -> TomForegin foreign export {- We can't use capi here -} ccall "dynamic" export_nullaryMeth :: (IO HRESULT) -> IO (Ptr ()) ormolu-0.7.2.0/data/examples/declaration/foreign/foreign-export.hs0000644000000000000000000000046607346545000023343 0ustar0000000000000000foreign export ccall foo :: Int -> IO Int -- | 'foreignTomFun' is a very important thing foreign export ccall "tomography" foreignTomFun :: StablePtr Storage {- Storage is bad -} -> TomForegin foreign export {- We can't use capi here -} ccall "dynamic" export_nullaryMeth :: (IO HRESULT) -> IO (Ptr ()) ormolu-0.7.2.0/data/examples/declaration/foreign/foreign-import-out.hs0000644000000000000000000000122607346545000024134 0ustar0000000000000000{-# LANGUAGE CApiFFI #-} foreign import ccall safe foo :: Int -> IO Int -- | 'bar' is a very important thing foreign import stdcall "baz" bar :: String -> Int -> IO String foreign import stdcall unsafe "boo" -- Here is a comment about my foreign function boo :: Int -> Text -> IO Array foreign import javascript baz :: String -> Int -> IO Foo foreign import {- We use capi here -} capi "pi.h value pi" c_pi :: CDouble foreign import stdcall {- This is a bad place for a comment -} "dynamic" dyn_gluBeginSurface :: -- | This 'FunPtr' is extremely dangerous, beware FunPtr (Ptr GLUnurbs -> IO ()) -> Ptr GLUnurbs -> IO () ormolu-0.7.2.0/data/examples/declaration/foreign/foreign-import.hs0000644000000000000000000000121207346545000023322 0ustar0000000000000000{-# LANGUAGE CApiFFI #-} foreign import ccall safe foo :: Int -> IO Int -- | 'bar' is a very important thing foreign import stdcall "baz" bar :: String -> Int -> IO String foreign import stdcall unsafe "boo" -- Here is a comment about my foreign function boo :: Int -> Text -> IO Array foreign import javascript baz :: String -> Int -> IO Foo foreign import {- We use capi here -} capi "pi.h value pi" c_pi :: CDouble foreign import stdcall {- This is a bad place for a comment -} "dynamic" dyn_gluBeginSurface :: FunPtr (Ptr GLUnurbs -> IO ()) -- ^ This 'FunPtr' is extremely dangerous, beware -> Ptr GLUnurbs -> IO () ormolu-0.7.2.0/data/examples/declaration/instance/0000755000000000000000000000000007346545000020204 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/instance/associated-data-out.hs0000644000000000000000000000042607346545000024375 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where data Bar Int = IntBar Int Int instance Foo Double where newtype Bar Double = DoubleBar Double Double instance Foo [a] where data Bar [a] = ListBar [Bar a] data Baz [a] = ListBaz ormolu-0.7.2.0/data/examples/declaration/instance/associated-data.hs0000644000000000000000000000051307346545000023565 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where data Bar Int = IntBar Int Int instance Foo Double where newtype Bar Double = DoubleBar Double Double instance Foo [a] where data Bar [a] = ListBar [Bar a] data Baz [a] = ListBaz ormolu-0.7.2.0/data/examples/declaration/instance/associated-types-out.hs0000644000000000000000000000027407346545000024631 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where type Bar Int = Double instance Foo Double where type Bar Double = [Double] type Baz Double = [Double] ormolu-0.7.2.0/data/examples/declaration/instance/associated-types.hs0000644000000000000000000000033107346545000024016 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where type Bar Int = Double instance Foo Double where type Bar Double = [Double] type instance Baz Double = [Double] ormolu-0.7.2.0/data/examples/declaration/instance/contexts-comments-out.hs0000644000000000000000000000030707346545000025037 0ustar0000000000000000instance ( Read a, -- Foo Read b, Read ( c, -- Bar d ) ) => Read ( a, -- Baz b, ( c, -- Quux d ) ) where readsPrec = undefined ormolu-0.7.2.0/data/examples/declaration/instance/contexts-comments.hs0000644000000000000000000000027007346545000024231 0ustar0000000000000000instance ( Read a, -- Foo Read b , Read ( c, -- Bar d ) ) => Read ( a, -- Baz b ,( c, -- Quux d ) ) where readsPrec = undefined ormolu-0.7.2.0/data/examples/declaration/instance/contexts-out.hs0000644000000000000000000000034507346545000023216 0ustar0000000000000000instance (Eq a) => Eq [a] where (==) _ _ = False instance ( Ord a, Ord b ) => Ord (a, b) where compare _ _ = GT instance (Show a, Show b) => Show ( a, b ) where showsPrec _ _ = showString "" ormolu-0.7.2.0/data/examples/declaration/instance/contexts.hs0000644000000000000000000000032607346545000022410 0ustar0000000000000000instance Eq a=>Eq [a] where (==) _ _ = False instance ( Ord a, Ord b ) => Ord (a,b) where compare _ _ = GT instance (Show a, Show b) => Show ( a, b ) where showsPrec _ _ = showString "" ormolu-0.7.2.0/data/examples/declaration/instance/data-family-instances-gadt-out.hs0000644000000000000000000000030707346545000026437 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Bar Int a where SameBar :: Bar Int Int CloseBar :: Bar Int Double OtherBar :: Bar Int a ormolu-0.7.2.0/data/examples/declaration/instance/data-family-instances-gadt.hs0000644000000000000000000000031607346545000025632 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Bar Int a where SameBar :: Bar Int Int CloseBar :: Bar Int Double OtherBar :: Bar Int a ormolu-0.7.2.0/data/examples/declaration/instance/data-family-instances-newtype-out.hs0000644000000000000000000000021307346545000027207 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } ormolu-0.7.2.0/data/examples/declaration/instance/data-family-instances-newtype.hs0000644000000000000000000000021307346545000026402 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } ormolu-0.7.2.0/data/examples/declaration/instance/data-family-instances-out.hs0000644000000000000000000000043107346545000025520 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Foo Int = FooInt Int data instance Foo [Int] = IntListFoo ( Int, Int ) ( Double, Double ) data instance Bar Double a = DoubleBar Double (Bar a) ormolu-0.7.2.0/data/examples/declaration/instance/data-family-instances.hs0000644000000000000000000000045407346545000024720 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Foo Int = FooInt Int data instance Foo [ Int ] = IntListFoo ( Int, Int ) ( Double, Double ) data instance Bar Double a = DoubleBar Double (Bar a) ormolu-0.7.2.0/data/examples/declaration/instance/empty-instance-out.hs0000644000000000000000000000005407346545000024304 0ustar0000000000000000instance Typeable Int instance Generic Int ormolu-0.7.2.0/data/examples/declaration/instance/empty-instance.hs0000644000000000000000000000006107346545000023475 0ustar0000000000000000instance Typeable Int instance Generic Int where ormolu-0.7.2.0/data/examples/declaration/instance/instance-sigs-multiple-out.hs0000644000000000000000000000023107346545000025741 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [a] -> [a] -> [a] (<*>) _ _ = [] ormolu-0.7.2.0/data/examples/declaration/instance/instance-sigs-multiple.hs0000644000000000000000000000024207346545000025136 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [ a ] -> [ a ] -> [ a ] (<*>) _ _ = [] ormolu-0.7.2.0/data/examples/declaration/instance/instance-sigs-out.hs0000644000000000000000000000031607346545000024114 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT ormolu-0.7.2.0/data/examples/declaration/instance/instance-sigs.hs0000644000000000000000000000036107346545000023307 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT ormolu-0.7.2.0/data/examples/declaration/instance/multi-parameter-out.hs0000644000000000000000000000017207346545000024455 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put ormolu-0.7.2.0/data/examples/declaration/instance/multi-parameter.hs0000644000000000000000000000020207346545000023642 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put ormolu-0.7.2.0/data/examples/declaration/instance/newlines-after-where-out.hs0000644000000000000000000000011707346545000025377 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined ormolu-0.7.2.0/data/examples/declaration/instance/newlines-after-where.hs0000644000000000000000000000012107346545000024565 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined ormolu-0.7.2.0/data/examples/declaration/instance/newlines-between-methods-out.hs0000644000000000000000000000075507346545000026270 0ustar0000000000000000instance (Num a) => Num (Diff a) where D u dudx + D v dvdx = D (u + v) (dudx + dvdx) D u dudx - D v dvdx = D (u - v) (dudx - dvdx) D u dudx * D v dvdx = D (u * v) (u * dvdx + v * dudx) -- Comment before definition negate (D u dudx) = D (-u) (-dudx) negate (Z u dudx) = undefined -- Comment after definition -- Separator abs (D u _) = D (abs u) (signum u) signum (D u _) = D (signum u) 0 -- Comment between unrelated definitions fromInteger n = D (fromInteger n) 0 ormolu-0.7.2.0/data/examples/declaration/instance/newlines-between-methods.hs0000644000000000000000000000075107346545000025457 0ustar0000000000000000instance Num a => Num (Diff a) where D u dudx + D v dvdx = D (u + v) (dudx + dvdx) D u dudx - D v dvdx = D (u - v) (dudx - dvdx) D u dudx * D v dvdx = D (u * v) (u * dvdx + v * dudx) -- Comment before definition negate (D u dudx) = D (-u) (-dudx) negate (Z u dudx) = undefined -- Comment after definition -- Separator abs (D u _) = D (abs u) (signum u) signum (D u _) = D (signum u) 0 -- Comment between unrelated definitions fromInteger n = D (fromInteger n) 0 ormolu-0.7.2.0/data/examples/declaration/instance/overlappable-instances-out.hs0000644000000000000000000000040407346545000026004 0ustar0000000000000000instance {-# OVERLAPPABLE #-} Eq Int where (==) _ _ = False instance {-# OVERLAPPING #-} Ord Int where compare _ _ = GT instance {-# OVERLAPS #-} Eq Double where (==) _ _ = False instance {-# INCOHERENT #-} Ord Double where compare _ _ = GT ormolu-0.7.2.0/data/examples/declaration/instance/overlappable-instances.hs0000644000000000000000000000042307346545000025200 0ustar0000000000000000instance {-# OVERLAPPABLE #-} Eq Int where (==) _ _ = False instance {-# OVERLAPPING #-} Ord Int where compare _ _ = GT instance {-# OVERLAPS #-} Eq Double where (==) _ _ = False instance {-# INCOHERENT #-} Ord Double where compare _ _ = GT ormolu-0.7.2.0/data/examples/declaration/instance/single-parameter-out.hs0000644000000000000000000000023707346545000024606 0ustar0000000000000000instance Monoid Int where (<>) x y = x + y instance Enum Int where fromEnum x = x toEnum = \x -> x instance Foo Int where foo x = x; bar y = y ormolu-0.7.2.0/data/examples/declaration/instance/single-parameter.hs0000644000000000000000000000025307346545000023777 0ustar0000000000000000instance Monoid Int where (<>) x y = x+y instance Enum Int where fromEnum x = x toEnum = \x -> x instance Foo Int where { foo x = x; bar y = y } ormolu-0.7.2.0/data/examples/declaration/instance/type-family-instances-out.hs0000644000000000000000000000037707346545000025601 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} type instance Foo Int = Int type instance Foo [Int] = ( Int, Int ) type instance Bar Int [Int] Double = (Int, Double) type instance Bar [Int] [Int] Double = ( Int, Double ) ormolu-0.7.2.0/data/examples/declaration/instance/type-family-instances.hs0000644000000000000000000000041207346545000024762 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} type instance Foo Int = Int type instance Foo [Int] = ( Int, Int ) type instance Bar Int [Int] Double = ( Int, Double ) type instance Bar [Int] [Int] Double = ( Int, Double ) ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/0000755000000000000000000000000007346545000021026 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/basic1-out.hs0000644000000000000000000000032207346545000023326 0ustar0000000000000000{-# RULES "fold/build" foldr k z (build g) = g k z #-} {-# RULES "fusable/aux" fusable x (aux y) = faux x y #-} {-# RULES "map/map" map f (map g xs) = map (f . g) xs #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/basic1.hs0000644000000000000000000000030607346545000022523 0ustar0000000000000000{-# RULES "fold/build" foldr k z (build g) = g k z #-} {-# RULES "fusable/aux" fusable x (aux y) = faux x y #-} {-# RULES "map/map" map f (map g xs) = map (f . g) xs #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/basic2-out.hs0000644000000000000000000000064207346545000023334 0ustar0000000000000000{-# RULES "++" xs ++ ys = augment (\c n -> foldr c n xs) ys "concat" xs `concat` ys = augment (\c n -> foldr c n xs) ys #-} {-# RULES "++" xs ++ ys = augment (\c n -> foldr c n xs) ys "concat" xs `concat` ys = augment (\c n -> foldr c n xs) ys "map/Double" fmap f xs = foldr (++) f xs #-} {-# RULES "fb' >\\ (Request b' fb )" forall fb' b' fb. fb' >\\ (Request b' fb) = fb' b' >>= \b -> fb' >\\ fb b #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/basic2.hs0000644000000000000000000000065607346545000022534 0ustar0000000000000000{-# RULES "++" xs ++ ys = augment (\c n -> foldr c n xs) ys "concat" xs `concat` ys = augment (\c n -> foldr c n xs) ys #-} {-# RULES "++" xs ++ ys = augment (\c n -> foldr c n xs) ys; "concat" xs `concat` ys = augment (\c n -> foldr c n xs) ys; "map/Double" fmap f xs = foldr (++) f xs #-} {-# RULES "fb' >\\ (Request b' fb )" forall fb' b' fb . fb' >\\ (Request b' fb ) = fb' b' >>= \b -> fb' >\\ fb b; #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/empty-out.hs0000644000000000000000000000002107346545000023316 0ustar0000000000000000{-# RULES #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/empty.hs0000644000000000000000000000002307346545000022513 0ustar0000000000000000{-# RULES #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/forall-0-out.hs0000644000000000000000000000022307346545000023600 0ustar0000000000000000{-# RULES "fold/build" forall k z. foldr k z (build g) = g k z #-} {-# RULES "fusable/aux" forall x y. fusable x (aux y) = faux x y #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/forall-0.hs0000644000000000000000000000022007346545000022770 0ustar0000000000000000{-# RULES "fold/build" forall k z . foldr k z (build g) = g k z #-} {-# RULES "fusable/aux" forall x y. fusable x (aux y) = faux x y #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/forall-1-out.hs0000644000000000000000000000061207346545000023603 0ustar0000000000000000{-# RULES "rd_tyvs" forall a. forall (x :: a). id x = x #-} {-# RULES "rd_tyvs'" forall f a. forall (x :: f a). id x = x #-} {-# RULES "rd_tyvs''" forall (a :: *). forall (x :: a). id x = x #-} {-# RULES "rd_tyvs_multiline1" forall (a :: *). forall (x :: a). id x = x #-} {-# RULES "rd_tyvs_multiline2" forall ( a :: * ). forall ( x :: a ). id x = x #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/forall-1.hs0000644000000000000000000000060607346545000023001 0ustar0000000000000000{-# RULES "rd_tyvs" forall a. forall (x :: a). id x = x #-} {-# RULES "rd_tyvs'" forall f a. forall (x :: f a). id x = x #-} {-# RULES "rd_tyvs''" forall (a :: *). forall (x :: a). id x = x #-} {-# RULES "rd_tyvs_multiline1" forall (a :: *). forall (x :: a). id x = x #-} {-# RULES "rd_tyvs_multiline2" forall (a :: *). forall (x :: a). id x = x #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/never-active-out.hs0000644000000000000000000000007607346545000024562 0ustar0000000000000000{-# RULES "map-loop" [~] forall f. map' f = map' (id . f) #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/never-active.hs0000644000000000000000000000010307346545000023744 0ustar0000000000000000{-# RULES "map-loop" [ ~ ] forall f . map' f = map' (id . f) #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/phase-out.hs0000644000000000000000000000043107346545000023265 0ustar0000000000000000{-# RULES "map/map" [2] map f (map g xs) = map (f . g) xs #-} {-# RULES "map/map" [1] forall x y z. map f (map g xs) = map (f . g) xs #-} {-# RULES "++" [~1] forall xs ys. xs ++ ys = augment (\c n -> foldr c n xs) ys #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/phase.hs0000644000000000000000000000040007346545000022454 0ustar0000000000000000{-# RULES "map/map" [2] map f (map g xs) = map (f . g) xs #-} {-# RULES "map/map" [1] forall x y z. map f (map g xs) = map (f . g) xs #-} {-# RULES "++" [~1] forall xs ys. xs ++ ys = augment (\c n -> foldr c n xs) ys #-}ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude1-out.hs0000644000000000000000000000074107346545000023712 0ustar0000000000000000{-# RULES "map/map" forall f g xs. map f (map g xs) = map (f . g) xs "map/append" forall f xs ys. map f (xs ++ ys) = map f xs ++ map f ys #-} {-# RULES "map" [~1] forall f xs. map f xs = build (\c n -> foldr (mapFB c f) n xs) "mapList" [1] forall f. foldr (mapFB (:) f) [] = map f "mapFB" forall c f g. mapFB (mapFB c f) g = mapFB c (f . g) #-} {-# RULES "map/map" [~2] forall f g xs. map f (map g xs) = map (f . g) xs "f" op True y = False "g" op True y = False #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude1.hs0000644000000000000000000000102307346545000023077 0ustar0000000000000000{-# RULES "map/map" forall f g xs. map f (map g xs) = map (f.g) xs "map/append" forall f xs ys. map f (xs ++ ys) = map f xs ++ map f ys #-} {-# RULES "map" [~1] forall f xs. map f xs = build (\c n -> foldr (mapFB c f) n xs) "mapList" [1] forall f. foldr (mapFB (:) f) [] = map f "mapFB" forall c f g. mapFB (mapFB c f) g = mapFB c (f.g) #-} {-# RULES "map/map" [~2] forall f g xs. map f (map g xs) = map (f.g) xs; "f" op True y = False; "g" op True y = False #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude2-out.hs0000644000000000000000000000221707346545000023713 0ustar0000000000000000{-# RULES "fold/build" forall k z (g :: forall b. (a -> b -> b) -> b -> b). foldr k z (build g) = g k z "foldr/augment" forall k z xs (g :: forall b. (a -> b -> b) -> b -> b). foldr k z (augment g xs) = g k (foldr k z xs) "foldr/id" foldr (:) [] = \x -> x "foldr/app" [1] forall ys. foldr (:) ys = \xs -> xs ++ ys -- Only activate this from phase 1, because that's -- when we disable the rule that expands (++) into foldr -- The foldr/cons rule looks nice, but it can give disastrously -- bloated code when commpiling -- array (a,b) [(1,2), (2,2), (3,2), ...very long list... ] -- i.e. when there are very very long literal lists -- So I've disabled it for now. We could have special cases -- for short lists, I suppose. -- "foldr/cons" forall k z x xs. foldr k z (x:xs) = k x (foldr k z xs) "foldr/single" forall k z x. foldr k z [x] = k x z "foldr/nil" forall k z. foldr k z [] = z "augment/build" forall (g :: forall b. (a -> b -> b) -> b -> b) (h :: forall b. (a -> b -> b) -> b -> b). augment g (build h) = build (\c n -> g c (h c n)) "augment/nil" forall (g :: forall b. (a -> b -> b) -> b -> b). augment g [] = build g #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude2.hs0000644000000000000000000000237207346545000023110 0ustar0000000000000000{-# RULES "fold/build" forall k z (g::forall b. (a->b->b) -> b -> b) . foldr k z (build g) = g k z "foldr/augment" forall k z xs (g::forall b. (a->b->b) -> b -> b) . foldr k z (augment g xs) = g k (foldr k z xs) "foldr/id" foldr (:) [] = \x -> x "foldr/app" [1] forall ys. foldr (:) ys = \xs -> xs ++ ys -- Only activate this from phase 1, because that's -- when we disable the rule that expands (++) into foldr -- The foldr/cons rule looks nice, but it can give disastrously -- bloated code when commpiling -- array (a,b) [(1,2), (2,2), (3,2), ...very long list... ] -- i.e. when there are very very long literal lists -- So I've disabled it for now. We could have special cases -- for short lists, I suppose. -- "foldr/cons" forall k z x xs. foldr k z (x:xs) = k x (foldr k z xs) "foldr/single" forall k z x. foldr k z [x] = k x z "foldr/nil" forall k z. foldr k z [] = z "augment/build" forall (g::forall b. (a->b->b) -> b -> b) (h::forall b. (a->b->b) -> b -> b) . augment g (build h) = build (\c n -> g c (h c n)) "augment/nil" forall (g::forall b. (a->b->b) -> b -> b) . augment g [] = build g #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude3-out.hs0000644000000000000000000000054707346545000023720 0ustar0000000000000000{-# LANGUAGE MagicHash #-} {-# RULES "x# `eqChar#` x#" forall x#. x# `eqChar#` x# = True "x# `neChar#` x#" forall x#. x# `neChar#` x# = False "x# `gtChar#` x#" forall x#. x# `gtChar#` x# = False "x# `geChar#` x#" forall x#. x# `geChar#` x# = True "x# `leChar#` x#" forall x#. x# `leChar#` x# = True "x# `ltChar#` x#" forall x#. x# `ltChar#` x# = False #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude3.hs0000644000000000000000000000054707346545000023113 0ustar0000000000000000{-# LANGUAGE MagicHash #-} {-# RULES "x# `eqChar#` x#" forall x#. x# `eqChar#` x# = True "x# `neChar#` x#" forall x#. x# `neChar#` x# = False "x# `gtChar#` x#" forall x#. x# `gtChar#` x# = False "x# `geChar#` x#" forall x#. x# `geChar#` x# = True "x# `leChar#` x#" forall x#. x# `leChar#` x# = True "x# `ltChar#` x#" forall x#. x# `ltChar#` x# = False #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude4-out.hs0000644000000000000000000000060107346545000023710 0ustar0000000000000000{-# RULES "unpack" [~1] forall a. unpackCString # a = build (unpackFoldrCString # a) "unpack-list" [1] forall a. unpackFoldrCString # a (:) [] = unpackCString # a "unpack-append" forall a n. unpackFoldrCString # a (:) n = unpackAppendCString # a n -- There's a built-in rule (in PrelRules.lhs) for -- unpackFoldr "foo" c (unpackFoldr "baz" c n) = unpackFoldr "foobaz" c n #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/prelude4.hs0000644000000000000000000000063507346545000023112 0ustar0000000000000000{-# RULES "unpack" [~1] forall a . unpackCString# a = build (unpackFoldrCString# a) "unpack-list" [1] forall a . unpackFoldrCString# a (:) [] = unpackCString# a "unpack-append" forall a n . unpackFoldrCString# a (:) n = unpackAppendCString# a n -- There's a built-in rule (in PrelRules.lhs) for -- unpackFoldr "foo" c (unpackFoldr "baz" c n) = unpackFoldr "foobaz" c n #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/type-signature-out.hs0000644000000000000000000000040507346545000025146 0ustar0000000000000000{-# RULES "fold/build" forall k z (g :: forall b. (a -> b -> b) -> b -> b). foldr k z (build g) = g k z #-} {-# RULES "fold/build" forall k z ( g :: forall b. (a -> b -> b) -> b -> b ). foldr k z (build g) = g k z #-} ormolu-0.7.2.0/data/examples/declaration/rewrite-rule/type-signature.hs0000644000000000000000000000041707346545000024344 0ustar0000000000000000{-# RULES "fold/build" forall k z (g :: forall b. (a -> b -> b) -> b -> b). foldr k z (build g) = g k z #-} {-# RULES "fold/build" forall k z (g :: forall b. (a -> b -> b) -> b -> b). foldr k z (build g) = g k z #-} ormolu-0.7.2.0/data/examples/declaration/role-annotation/0000755000000000000000000000000007346545000021511 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/role-annotation/multi-line-out.hs0000644000000000000000000000016407346545000024732 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom ormolu-0.7.2.0/data/examples/declaration/role-annotation/multi-line.hs0000644000000000000000000000020007346545000024114 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom ormolu-0.7.2.0/data/examples/declaration/role-annotation/single-line-out.hs0000644000000000000000000000024107346545000025055 0ustar0000000000000000{-# LANGUAGE MagicHash #-} {-# LANGUAGE RoleAnnotations #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ ormolu-0.7.2.0/data/examples/declaration/role-annotation/single-line.hs0000644000000000000000000000024007346545000024247 0ustar0000000000000000{-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE MagicHash #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ ormolu-0.7.2.0/data/examples/declaration/signature/complete/0000755000000000000000000000000007346545000022211 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/complete/complete-out.hs0000644000000000000000000000014407346545000025161 0ustar0000000000000000{-# COMPLETE A, B, C :: Foo #-} {-# COMPLETE A, B #-} {-# COMPLETE A, B, C :: Foo #-} ormolu-0.7.2.0/data/examples/declaration/signature/complete/complete.hs0000644000000000000000000000023007346545000024350 0ustar0000000000000000{-# ComPlETe A , B, C:: Foo #-} {-# COMPLETE A , B #-} {-# ComPlETE A , B, C :: Foo#-} ormolu-0.7.2.0/data/examples/declaration/signature/fixity/0000755000000000000000000000000007346545000021715 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/fixity/infix-out.hs0000644000000000000000000000003307346545000024167 0ustar0000000000000000infix 0 infix 9 <^-^> ormolu-0.7.2.0/data/examples/declaration/signature/fixity/infix.hs0000644000000000000000000000003207346545000023361 0ustar0000000000000000infix 0 infix 9 <^-^> ormolu-0.7.2.0/data/examples/declaration/signature/fixity/infixl-out.hs0000644000000000000000000000004707346545000024350 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** ormolu-0.7.2.0/data/examples/declaration/signature/fixity/infixl.hs0000644000000000000000000000004607346545000023542 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** ormolu-0.7.2.0/data/examples/declaration/signature/fixity/infixr-out.hs0000644000000000000000000000004207346545000024351 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& ormolu-0.7.2.0/data/examples/declaration/signature/fixity/infixr.hs0000644000000000000000000000004107346545000023543 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& ormolu-0.7.2.0/data/examples/declaration/signature/inline/0000755000000000000000000000000007346545000021657 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/inline/conlike-out.hs0000644000000000000000000000013507346545000024443 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} ormolu-0.7.2.0/data/examples/declaration/signature/inline/conlike.hs0000644000000000000000000000013507346545000023636 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} ormolu-0.7.2.0/data/examples/declaration/signature/inline/inline-out.hs0000644000000000000000000000035107346545000024275 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINE foo #-} {-# INLINE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINE [~2] baz #-} reVector :: Bundle u a -> Bundle v a {-# INLINE reVector #-} reVector = M.reVector ormolu-0.7.2.0/data/examples/declaration/signature/inline/inline.hs0000644000000000000000000000036507346545000023475 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINE foo #-} {-# INLINE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINE [~2] baz #-} reVector :: Bundle u a -> Bundle v a {-# INLINE reVector #-} reVector = M.reVector ormolu-0.7.2.0/data/examples/declaration/signature/inline/inlineable-out.hs0000644000000000000000000000024107346545000025117 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINEABLE foo #-} {-# INLINEABLE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINEABLE [~2] baz #-} ormolu-0.7.2.0/data/examples/declaration/signature/inline/inlineable.hs0000644000000000000000000000025407346545000024316 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINEABLE foo #-} {-# INLINEABLE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINEABLE [~2] baz #-} ormolu-0.7.2.0/data/examples/declaration/signature/inline/noinline-out.hs0000644000000000000000000000031607346545000024633 0ustar0000000000000000foo :: Int -> Int foo = id {-# NOINLINE foo #-} {-# NOINLINE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# NOINLINE [~2] baz #-} blub :: Int -> Int blub = baz {-# OPAQUE blub #-} ormolu-0.7.2.0/data/examples/declaration/signature/inline/noinline.hs0000644000000000000000000000033007346545000024022 0ustar0000000000000000foo :: Int -> Int foo = id {-# NOINLINE foo #-} {-# NOINLINE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# NOINLINE [~2] baz #-} blub :: Int -> Int blub = baz {-# opaque blub #-} ormolu-0.7.2.0/data/examples/declaration/signature/minimal/0000755000000000000000000000000007346545000022027 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/minimal/minimal-out.hs0000644000000000000000000000030207346545000024611 0ustar0000000000000000class Foo a where {-# MINIMAL (==) | ((/=), foo) #-} {-# MINIMAL a | ( b, c, d | e, f ) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool ormolu-0.7.2.0/data/examples/declaration/signature/minimal/minimal.hs0000644000000000000000000000027407346545000024014 0ustar0000000000000000class Foo a where {-# MINIMAL (==) |( (/=) , foo) #-} {-# MINIMAL a | (b , c , d | e , f) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool ormolu-0.7.2.0/data/examples/declaration/signature/pattern/0000755000000000000000000000000007346545000022056 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/pattern/multiline-out.hs0000644000000000000000000000036307346545000025223 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type pattern TypeSignature, FunctionBody, PatternSignature, WarningPragma :: [RdrName] -> HsDecl GhcPs ormolu-0.7.2.0/data/examples/declaration/signature/pattern/multiline.hs0000644000000000000000000000036607346545000024421 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type pattern TypeSignature , FunctionBody , PatternSignature , WarningPragma :: [RdrName] -> HsDecl GhcPs ormolu-0.7.2.0/data/examples/declaration/signature/pattern/single-line-out.hs0000644000000000000000000000016207346545000025424 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type ormolu-0.7.2.0/data/examples/declaration/signature/pattern/single-line.hs0000644000000000000000000000016207346545000024617 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type ormolu-0.7.2.0/data/examples/declaration/signature/set-cost-centre/0000755000000000000000000000000007346545000023420 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre-out.hs0000644000000000000000000000032207346545000027575 0ustar0000000000000000f x y = g (x + y) where g z = z {-# SCC g #-} {-# SCC f #-} withString x y = x + y {-# SCC withString "cost_centre_name" #-} withString' x y = x + y {-# SCC withString' "cost_centre_name" #-} ormolu-0.7.2.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre.hs0000644000000000000000000000032307346545000026771 0ustar0000000000000000f x y = g (x + y) where g z = z {-# SCC g #-} {-# SCC f #-} withString x y = x + y {-# SCC withString "cost_centre_name" #-} withString' x y = x + y {-# SCC withString' "cost_centre_name" #-} ormolu-0.7.2.0/data/examples/declaration/signature/specialize/0000755000000000000000000000000007346545000022531 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/specialize/specialize-instance-out.hs0000644000000000000000000000055707346545000027633 0ustar0000000000000000data Foo a = Foo a data VT v m r = VT v m r instance (Eq a) => Eq (Foo a) where {-# SPECIALIZE instance Eq (Foo [(Int, Bar)]) #-} (==) (Foo a) (Foo b) = (==) a b instance (Num r, V.Vector v r, Factored m r) => Num (VT v m r) where {-# SPECIALIZE instance ( (Factored m Int) => Num (VT U.Vector m Int) ) #-} VT x + VT y = VT $ V.zipWith (+) x y ormolu-0.7.2.0/data/examples/declaration/signature/specialize/specialize-instance.hs0000644000000000000000000000056007346545000027020 0ustar0000000000000000data Foo a = Foo a data VT v m r = VT v m r instance (Eq a) => Eq (Foo a) where {-# SPECIALIZE instance Eq (Foo [(Int, Bar)]) #-} (==) (Foo a) (Foo b) = (==) a b instance (Num r, V.Vector v r, Factored m r) => Num (VT v m r) where {-# SPECIALIZE instance ( Factored m Int => Num (VT U.Vector m Int)) #-} VT x + VT y = VT $ V.zipWith (+) x y ormolu-0.7.2.0/data/examples/declaration/signature/specialize/specialize-out.hs0000644000000000000000000000076207346545000026027 0ustar0000000000000000foo :: (Num a) => a -> a foo = id {-# SPECIALIZE foo :: Int -> Int #-} {-# SPECIALIZE INLINE foo :: Float -> Float #-} {-# SPECIALIZE NOINLINE [2] bar :: Int -> Int #-} bar :: (Num a) => a -> a bar = id baz :: (Num a) => a -> a baz = id {-# SPECIALIZE [~2] baz :: Int -> Int #-} {-# SPECIALIZE fits13Bits :: Int -> Bool, Integer -> Bool #-} {-# SPECIALIZE fits13Bits :: Int -> Bool, Integer -> Bool #-} fits13Bits :: (Integral a) => a -> Bool fits13Bits x = x >= -4096 && x < 4096 ormolu-0.7.2.0/data/examples/declaration/signature/specialize/specialize.hs0000644000000000000000000000100307346545000025207 0ustar0000000000000000foo :: Num a => a -> a foo = id {-# SPECIALIZE foo :: Int -> Int #-} {-# SPECIALIZE INLINE foo :: Float -> Float #-} {-# SPECIALIZE NOINLINE [2] bar :: Int -> Int #-} bar :: Num a => a -> a bar = id baz :: Num a => a -> a baz = id {-# SPECIALIZE [~2] baz :: Int -> Int #-} {-# SPECIALIZE fits13Bits :: Int -> Bool, Integer -> Bool #-} {-# SPECIALIZE fits13Bits :: Int -> Bool , Integer -> Bool #-} fits13Bits :: Integral a => a -> Bool fits13Bits x = x >= -4096 && x < 4096 ormolu-0.7.2.0/data/examples/declaration/signature/0000755000000000000000000000000007346545000020401 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/standalone-kind-out.hs0000644000000000000000000000034607346545000024620 0ustar0000000000000000{-# LANGUAGE StandaloneKindSignatures #-} type T :: (k -> Type) -> k -> Type data T m a = MkT (m a) (T Maybe (m a)) type C1 :: Type -> Constraint class C1 a type F :: Type -> Type type family F type G :: Type type G = a ormolu-0.7.2.0/data/examples/declaration/signature/standalone-kind.hs0000644000000000000000000000036007346545000024007 0ustar0000000000000000{-# LANGUAGE StandaloneKindSignatures #-} type T :: (k -> Type) -> k -> Type data T m a = MkT (m a) (T Maybe (m a)) type C1 :: Type -> Constraint class C1 a type F :: Type -> Type type family F type G :: Type type G = a ormolu-0.7.2.0/data/examples/declaration/signature/type/0000755000000000000000000000000007346545000021362 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/signature/type/arguments-out.hs0000644000000000000000000000034607346545000024533 0ustar0000000000000000{-# LANGUAGE RankNTypes #-} functionName :: (C1, C2, C3, C4, C5) => a -> b -> ( forall a. (C6, C7) => LongDataTypeName -> a -> AnotherLongDataTypeName -> b -> c ) -> (c -> d) -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/arguments.hs0000644000000000000000000000036107346545000023723 0ustar0000000000000000{-# LANGUAGE RankNTypes #-} functionName :: (C1, C2, C3, C4, C5) => a -> b -> (forall a. (C6, C7) => LongDataTypeName -> a -> AnotherLongDataTypeName -> b -> c ) -> (c -> d) -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/context-multi-line-out.hs0000644000000000000000000000013107346545000026257 0ustar0000000000000000functionName :: ( C1, C2, C3 ) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/context-multi-line.hs0000644000000000000000000000014007346545000025452 0ustar0000000000000000functionName :: ( C1 , C2 , C3 ) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/context-single-line-out.hs0000644000000000000000000000011507346545000026410 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/context-single-line.hs0000644000000000000000000000011507346545000025603 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/infix-promoted-type-constructor-out.hs0000644000000000000000000000016407346545000031032 0ustar0000000000000000fun1 :: Def ('[Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[Ref s (Stored Uint32), IBool] ':-> IBool) ormolu-0.7.2.0/data/examples/declaration/signature/type/infix-promoted-type-constructor.hs0000644000000000000000000000016607346545000030227 0ustar0000000000000000fun1 :: Def ('[ Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[ Ref s (Stored Uint32), IBool] ':-> IBool) ormolu-0.7.2.0/data/examples/declaration/signature/type/long-function-name-out.hs0000644000000000000000000000007707346545000026227 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/long-function-name.hs0000644000000000000000000000007707346545000025422 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/long-multiline-applications-out.hs0000644000000000000000000000043007346545000030143 0ustar0000000000000000functionName :: (C1, C2, C3, C4, C5) => forall a b c. a -> b -> ( LongDataTypeName AnotherLongDataTypeName AnotherLongDataTypeName2 AnotherLongDataTypeName3 -> a -> AnotherLongDataTypeName4 -> b -> c ) -> (c -> d) -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/long-multiline-applications.hs0000644000000000000000000000045607346545000027346 0ustar0000000000000000functionName :: (C1, C2, C3, C4, C5) => forall a b c . a -> b -> ( LongDataTypeName AnotherLongDataTypeName AnotherLongDataTypeName2 AnotherLongDataTypeName3 -> a -> AnotherLongDataTypeName4 -> b -> c ) -> (c -> d) -> (a, b, c, d) ormolu-0.7.2.0/data/examples/declaration/signature/type/multi-value-out.hs0000644000000000000000000000016007346545000024764 0ustar0000000000000000foo, bar :: Int foo = 1 bar = 2 a, b, c :: Int a = 1 b = 2 c = 3 foo, bar, baz :: Int bar = 2 baz = 3 ormolu-0.7.2.0/data/examples/declaration/signature/type/multi-value.hs0000644000000000000000000000015607346545000024164 0ustar0000000000000000foo, bar :: Int foo = 1 bar = 2 a, b, c :: Int a = 1 b = 2 c = 3 foo, bar, baz :: Int bar = 2 baz = 3 ormolu-0.7.2.0/data/examples/declaration/signature/type/unicode-out.hs0000644000000000000000000000013007346545000024143 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo :: forall a. (Show a) => a -> String foo = const () ormolu-0.7.2.0/data/examples/declaration/signature/type/unicode.hs0000644000000000000000000000012507346545000023342 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo ∷ ∀a. Show a ⇒ a → String foo = const () ormolu-0.7.2.0/data/examples/declaration/signature/type/unrelated-out.hs0000644000000000000000000000022307346545000024503 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz ormolu-0.7.2.0/data/examples/declaration/signature/type/unrelated.hs0000644000000000000000000000022307346545000023676 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz ormolu-0.7.2.0/data/examples/declaration/splice/0000755000000000000000000000000007346545000017657 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/splice/bracket-declaration-out.hs0000644000000000000000000000071307346545000024717 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} [d|data T a where Foo :: T ()|] foo = [d| foo :: Int -> Char bar = 42 |] [d| data T = T deriving (Eq, Ord, Enum, Bounded, Show) |] $(do [d|baz = baz|]) $(singletons [d|data T = T deriving (Eq, Ord, Enum, Bounded, Show)|]) $( singletons [d| data T = T deriving (Eq, Ord, Enum, Bounded, Show) |] ) foo = [d| type X = * |] foo = [d| type X = * data A |] ormolu-0.7.2.0/data/examples/declaration/splice/bracket-declaration.hs0000644000000000000000000000071207346545000024111 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} [d| data T a where Foo :: T () |] foo = [d| foo:: Int -> Char bar = 42 |] [d| data T = T deriving (Eq, Ord, Enum, Bounded, Show) |] $( do [d| baz = baz |] ) $(singletons [d| data T = T deriving (Eq, Ord, Enum, Bounded, Show) |]) $(singletons [d| data T = T deriving (Eq, Ord, Enum, Bounded, Show) |]) foo = [d|type X = * |] foo = [d| type X = * data A |] ormolu-0.7.2.0/data/examples/declaration/splice/bracket-out.hs0000644000000000000000000000027007346545000022432 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t|Char|] foo = [|| foo bar ||] foo = [t| * |] foo = [t| a -> * -> a |] ormolu-0.7.2.0/data/examples/declaration/splice/bracket-unicode-out.hs0000644000000000000000000000014007346545000024052 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = [|x|] ormolu-0.7.2.0/data/examples/declaration/splice/bracket-unicode.hs0000644000000000000000000000014407346545000023251 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = ⟦x⟧ ormolu-0.7.2.0/data/examples/declaration/splice/bracket.hs0000644000000000000000000000026107346545000021625 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t| Char |] foo = [|| foo bar ||] foo = [t| * |] foo = [t|a -> * -> a|] ormolu-0.7.2.0/data/examples/declaration/splice/grouped-splices-out.hs0000644000000000000000000000020207346545000024117 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) ormolu-0.7.2.0/data/examples/declaration/splice/grouped-splices.hs0000644000000000000000000000020207346545000023312 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) ormolu-0.7.2.0/data/examples/declaration/splice/quasiquote-out.hs0000644000000000000000000000022107346545000023213 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] ormolu-0.7.2.0/data/examples/declaration/splice/quasiquote.hs0000644000000000000000000000021507346545000022411 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] ormolu-0.7.2.0/data/examples/declaration/splice/quotes-out.hs0000644000000000000000000000022707346545000022341 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option ormolu-0.7.2.0/data/examples/declaration/splice/quotes.hs0000644000000000000000000000022707346545000021534 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option ormolu-0.7.2.0/data/examples/declaration/splice/splice-decl-out.hs0000644000000000000000000000023107346545000023200 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(foo bar) $foo $$(foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] ormolu-0.7.2.0/data/examples/declaration/splice/splice-decl.hs0000644000000000000000000000025107346545000022375 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $( foo bar) $foo $$( foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] ormolu-0.7.2.0/data/examples/declaration/splice/typed-splice-out.hs0000644000000000000000000000010507346545000023416 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$( foo bar ) x = $$foo ormolu-0.7.2.0/data/examples/declaration/splice/typed-splice.hs0000644000000000000000000000012507346545000022613 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$( foo bar ) x = $$foo ormolu-0.7.2.0/data/examples/declaration/splice/untyped-splice-out.hs0000644000000000000000000000013107346545000023760 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $(foo bar) x = $( foo bar ) x = $foo ormolu-0.7.2.0/data/examples/declaration/splice/untyped-splice.hs0000644000000000000000000000016107346545000023156 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $( foo bar ) x = $( foo bar ) x = $foo ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/0000755000000000000000000000000007346545000024657 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/infix-out.hs0000644000000000000000000000051307346545000027134 0ustar0000000000000000type family (x :: N) + (y :: N) :: N where 'Zero + y = y 'Succ n + y = 'Succ (n + y) type family (x :: N) `LEQ` (y :: N) :: Bool where 'Zero `LEQ` y = 'True 'Succ n `LEQ` 'Zero = 'False 'Succ n `LEQ` 'Succ m = n `LEQ` m type family ((x :: N) `Weird` (y :: N)) (z :: N) :: Bool where 'Zero `Weird` 'Zero 'Zero = 'True ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/infix.hs0000644000000000000000000000051307346545000026327 0ustar0000000000000000type family (x :: N) + (y :: N) :: N where 'Zero + y = y 'Succ n + y = 'Succ (n + y) type family (x :: N) `LEQ` (y :: N) :: Bool where 'Zero `LEQ` y = 'True 'Succ n `LEQ` 'Zero = 'False 'Succ n `LEQ` 'Succ m = n `LEQ` m type family ((x :: N) `Weird` (y :: N)) (z :: N) :: Bool where 'Zero `Weird` 'Zero 'Zero = 'True ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/injective-out.hs0000644000000000000000000000020107346545000027771 0ustar0000000000000000type family Id a = result | result -> a where Id a = a type family G (a :: k) b c = foo | foo -> k b where G a b c = (a, b) ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/injective.hs0000644000000000000000000000020007346545000027163 0ustar0000000000000000type family Id a = result | result -> a where Id a = a type family G (a :: k) b c = foo | foo -> k b where G a b c = (a, b) ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/multi-line-out.hs0000644000000000000000000000046207346545000030101 0ustar0000000000000000type family Id a = result | result -> a where Id a = a type family G (a :: k) b c = foo | foo -> k b where G a b c = (a, b) type family F a :: * -> * where F Int = Double F Bool = Char F a = String type family F a where F a -- foo = a ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/multi-line.hs0000644000000000000000000000044707346545000027277 0ustar0000000000000000type family Id a = result | result -> a where Id a = a type family G (a :: k) b c = foo | foo -> k b where G a b c = (a, b) type family F a :: * -> * where F Int = Double F Bool = Char F a = String type family F a where F a -- foo = a ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/no-annotation-out.hs0000644000000000000000000000010607346545000030601 0ustar0000000000000000type family F a where F Int = Double F Bool = Char F a = String ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/no-annotation.hs0000644000000000000000000000011207346545000027771 0ustar0000000000000000type family F a where F Int = Double F Bool = Char F a = String ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/promotion-out.hs0000644000000000000000000000005507346545000030046 0ustar0000000000000000type family Foo a where Foo '( 'x', a) = a ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/promotion.hs0000644000000000000000000000005507346545000027241 0ustar0000000000000000type family Foo a where Foo '( 'x', a) = a ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/simple-out.hs0000644000000000000000000000016707346545000027315 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/simple.hs0000644000000000000000000000017407346545000026506 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/type-arguments-out.hs0000644000000000000000000000020007346545000030774 0ustar0000000000000000type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/type-arguments.hs0000644000000000000000000000020007346545000030167 0ustar0000000000000000type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/with-comments-out.hs0000644000000000000000000000022107346545000030611 0ustar0000000000000000type family LT a b where -- 0 LT 0 _ = True -- 1 LT 1 0 = False LT 1 _ = True -- 2 LT 2 0 = False LT 2 1 = False LT 2 _ = True ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/with-comments.hs0000644000000000000000000000022307346545000030006 0ustar0000000000000000type family LT a b where -- 0 LT 0 _ = True -- 1 LT 1 0 = False LT 1 _ = True -- 2 LT 2 0 = False LT 2 1 = False LT 2 _ = True ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/with-equal-sign-out.hs0000644000000000000000000000006107346545000031033 0ustar0000000000000000type family TF a b = result where TF a b = Int ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/with-equal-sign.hs0000644000000000000000000000006107346545000030226 0ustar0000000000000000type family TF a b = result where TF a b = Int ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/with-forall-out.hs0000644000000000000000000000013207346545000030244 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool ormolu-0.7.2.0/data/examples/declaration/type-families/closed-type-family/with-forall.hs0000644000000000000000000000013207346545000027437 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/0000755000000000000000000000000007346545000023340 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/no-annotation-out.hs0000644000000000000000000000007307346545000027265 0ustar0000000000000000module Main where -- | Documentation. data family Array e ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/no-annotation.hs0000644000000000000000000000007407346545000026461 0ustar0000000000000000module Main where -- | Documentation. data family Array e ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/simple-out.hs0000644000000000000000000000011207346545000025764 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/simple.hs0000644000000000000000000000011307346545000025160 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/type-arguments-out.hs0000644000000000000000000000017707346545000027472 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M ormolu-0.7.2.0/data/examples/declaration/type-families/data-family/type-arguments.hs0000644000000000000000000000017707346545000026665 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/0000755000000000000000000000000007346545000023410 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/injective-out.hs0000644000000000000000000000010407346545000026524 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/injective.hs0000644000000000000000000000010307346545000025716 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/no-annotation-out.hs0000644000000000000000000000011107346545000027326 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/no-annotation.hs0000644000000000000000000000011207346545000026522 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/operator-out.hs0000644000000000000000000000004507346545000026403 0ustar0000000000000000type family a ! b type family a . b ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/operator.hs0000644000000000000000000000004407346545000025575 0ustar0000000000000000type family a ! b type family a . b ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/simple-out.hs0000644000000000000000000000010207346545000026033 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type ormolu-0.7.2.0/data/examples/declaration/type-families/type-family/simple.hs0000644000000000000000000000010307346545000025227 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type ormolu-0.7.2.0/data/examples/declaration/type-synonyms/0000755000000000000000000000000007346545000021256 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/type-synonyms/multi-line-out.hs0000644000000000000000000000041507346545000024476 0ustar0000000000000000import Servant.API type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> "route2" :> ApiRoute2 -- comment here :<|> OmitDocs :> "i" :> ASomething API type A -- foo = B ormolu-0.7.2.0/data/examples/declaration/type-synonyms/multi-line.hs0000644000000000000000000000041707346545000023673 0ustar0000000000000000import Servant.API type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> "route2" :> ApiRoute2 -- comment here :<|> OmitDocs :> "i" :> ASomething API type A -- foo = B ormolu-0.7.2.0/data/examples/declaration/type-synonyms/simple-out.hs0000644000000000000000000000017607346545000023714 0ustar0000000000000000module Main where -- | Documentation. type Foo a b c = Bar c a b type a ~> b = TyFun a b -> Type type (a :+: b) c d e = () ormolu-0.7.2.0/data/examples/declaration/type-synonyms/simple.hs0000644000000000000000000000017707346545000023110 0ustar0000000000000000module Main where -- | Documentation. type Foo a b c = Bar c a b type a ~> b = TyFun a b -> Type type (a :+: b) c d e = () ormolu-0.7.2.0/data/examples/declaration/type-synonyms/with-weird-haddock-out.hs0000644000000000000000000000010107346545000026065 0ustar0000000000000000type Elims = -- | eliminations ordered left-to-right. [Elim] ormolu-0.7.2.0/data/examples/declaration/type-synonyms/with-weird-haddock.hs0000644000000000000000000000007607346545000025273 0ustar0000000000000000type Elims = [Elim] -- ^ eliminations ordered left-to-right. ormolu-0.7.2.0/data/examples/declaration/type/0000755000000000000000000000000007346545000017361 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/type/forall-out.hs0000644000000000000000000000011707346545000022000 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a ormolu-0.7.2.0/data/examples/declaration/type/forall.hs0000644000000000000000000000012007346545000021165 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a ormolu-0.7.2.0/data/examples/declaration/type/lits-out.hs0000644000000000000000000000006107346545000021472 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () ormolu-0.7.2.0/data/examples/declaration/type/lits.hs0000644000000000000000000000006407346545000020670 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () ormolu-0.7.2.0/data/examples/declaration/type/misc-kind-signatures-out.hs0000644000000000000000000000037107346545000024563 0ustar0000000000000000instance DemoteNodeTypes ('[] :: [NodeType]) where demoteNodeTypes _ = [] b :: (Bool :: *) b = True unP :: forall {k} (a :: k). P a -> Proxy a data ProxyKInvis (a :: k) :: forall k. k -> Type data ProxyKVis k (a :: k) :: forall k -> k -> Type ormolu-0.7.2.0/data/examples/declaration/type/misc-kind-signatures.hs0000644000000000000000000000037207346545000023757 0ustar0000000000000000instance DemoteNodeTypes ('[] :: [NodeType]) where demoteNodeTypes _ = [] b :: (Bool :: *) b = True unP :: forall {k} (a :: k). P a -> Proxy a data ProxyKInvis (a :: k) :: forall k. k -> Type data ProxyKVis k (a :: k) :: forall k -> k -> Type ormolu-0.7.2.0/data/examples/declaration/type/promotion-0-out.hs0000644000000000000000000000027007346545000022704 0ustar0000000000000000type Foo = Cluster '[ 'NodeCore, 'NodeRelay', 'NodeEdge] type Query = Query '[] '[] DB '[ 'NotNull 'PGint4] (RowPG RawElementData) data T = T' | T'T type S0 = ' T' type S1 = ' T'T ormolu-0.7.2.0/data/examples/declaration/type/promotion-0.hs0000644000000000000000000000027107346545000022100 0ustar0000000000000000type Foo = Cluster '[ 'NodeCore, 'NodeRelay', 'NodeEdge ] type Query = Query '[] '[] DB '[ 'NotNull 'PGint4] (RowPG RawElementData) data T = T' | T'T type S0 = ' T' type S1 = ' T'T ormolu-0.7.2.0/data/examples/declaration/type/promotion-1-out.hs0000644000000000000000000000047707346545000022716 0ustar0000000000000000type S2 = Proxy ('[ '[], '[]]) type S4 = Proxy ('( 'Just, ' T'T)) type S5 = Proxy ('[ 'Just, 'TT'T]) type S6 = Proxy ('( '(), '())) type S7 = Proxy ('( 'a, 'b)) type S8 = Proxy ('[Int, Bool]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool)] type X = () '`PromotedInfix` () type A = '[ 'a'] ormolu-0.7.2.0/data/examples/declaration/type/promotion-1.hs0000644000000000000000000000050707346545000022103 0ustar0000000000000000type S2 = Proxy ( '[ '[], '[] ]) type S4 = Proxy ( '( 'Just, ' T'T)) type S5 = Proxy ( '[ 'Just, ' TT'T]) type S6 = Proxy ( '( '(), '() )) type S7 = Proxy ( '( 'a, 'b )) type S8 = Proxy ( '[ Int, Bool ]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool) ] type X = () '`PromotedInfix` () type A = '[ 'a' ] ormolu-0.7.2.0/data/examples/declaration/type/splice-out.hs0000644000000000000000000000007507346545000022003 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $(bar [t|Int|]) ormolu-0.7.2.0/data/examples/declaration/type/splice.hs0000644000000000000000000000011207346545000021166 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $( bar [t|Int|] ) ormolu-0.7.2.0/data/examples/declaration/type/type-applications-out.hs0000644000000000000000000000011607346545000024165 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False ormolu-0.7.2.0/data/examples/declaration/type/type-applications.hs0000644000000000000000000000011607346545000023360 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False ormolu-0.7.2.0/data/examples/declaration/type/visible-forall-out.hs0000644000000000000000000000020607346545000023432 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type ormolu-0.7.2.0/data/examples/declaration/type/visible-forall.hs0000644000000000000000000000020607346545000022625 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type ormolu-0.7.2.0/data/examples/declaration/value/function/0000755000000000000000000000000007346545000021341 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/application-0-out.hs0000644000000000000000000000014507346545000025142 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 ormolu-0.7.2.0/data/examples/declaration/value/function/application-0.hs0000644000000000000000000000011707346545000024334 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 ormolu-0.7.2.0/data/examples/declaration/value/function/application-1-out.hs0000644000000000000000000000022307346545000025140 0ustar0000000000000000main = do x y z main = case foo of x -> a foo a b main = do if x then y else z foo a b ormolu-0.7.2.0/data/examples/declaration/value/function/application-1.hs0000644000000000000000000000016207346545000024335 0ustar0000000000000000main = do x y z main = case foo of x -> a foo a b main = do if x then y else z foo a b ormolu-0.7.2.0/data/examples/declaration/value/function/application-2-out.hs0000644000000000000000000000047307346545000025150 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = do $( bar ) baz foo = do $$( bar ) baz foo = do do (+ 1) 2 foo = do do (+ 1) 2 foo = do case () of () -> (+ 1) 2 foo = do case () of () -> (+ 1) 2 foo = do \case 2 -> 3 2 foo = do \case 2 -> 3 2 ormolu-0.7.2.0/data/examples/declaration/value/function/application-2.hs0000644000000000000000000000044307346545000024340 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = do $( bar ) baz foo = do $$( bar ) baz foo = do do (+1) 2 foo = do do (+1) 2 foo = do case () of () -> (+1) 2 foo = do case () of () -> (+1) 2 foo = do \case 2 -> 3 2 foo = do \case 2 -> 3 2 ormolu-0.7.2.0/data/examples/declaration/value/function/arg-breakpoints-out.hs0000644000000000000000000000002507346545000025567 0ustar0000000000000000foo bar = body ormolu-0.7.2.0/data/examples/declaration/value/function/arg-breakpoints.hs0000644000000000000000000000002507346545000024762 0ustar0000000000000000foo bar = body ormolu-0.7.2.0/data/examples/declaration/value/function/arithmetic-sequences-out.hs0000644000000000000000000000032707346545000026626 0ustar0000000000000000foo = [0 ..] foo' = [0 .. 5] bar x = [ 0 .. x ] baz x = [ 1, 3 .. x ] barbaz x = [0, 1 ..] arst = [0 :: Int ..] brst = [0, 1 :: Int ..] crst = [0 :: Int .. 10] drst = [0, 1 :: Int .. 10] ormolu-0.7.2.0/data/examples/declaration/value/function/arithmetic-sequences.hs0000644000000000000000000000031307346545000026014 0ustar0000000000000000foo = [0..] foo' = [0..5] bar x = [ 0..x ] baz x = [ 1, 3 .. x ] barbaz x = [ 0, 1.. ] arst = [0 :: Int ..] brst = [0, 1 :: Int ..] crst = [0 :: Int .. 10] drst = [0, 1 :: Int .. 10] ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/0000755000000000000000000000000007346545000022473 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/multiline-case-out.hs0000644000000000000000000000014207346545000026544 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/multiline-case.hs0000644000000000000000000000013007346545000025734 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-applications-out.hs0000644000000000000000000000044007346545000027261 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc a -> a -< x foolr x = proc a -> x >- a bar f x = proc ( y, z, w ) -> f -- The value -< ( x, -- Foo w, -- Bar z -- Baz ) baz x = proc a -> a -<< x bazlr x = proc a -> x >>- a ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-applications.hs0000644000000000000000000000043107346545000026454 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc a -> a -< x foolr x = proc a -> x >- a bar f x = proc ( y, z, w ) -> f -- The value -< ( x, -- Foo w, -- Bar z -- Baz ) baz x = proc a -> a -<< x bazlr x = proc a -> x >>- a ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-applications2-out.hs0000644000000000000000000000035707346545000027352 0ustar0000000000000000{-# LANGUAGE Arrows #-} t = proc ys -> (| f (\y -> returnA -< y) |) ys g x = proc (y, z) -> ( case compare x y of LT -> \a -> returnA -< x + a EQ -> \b -> returnA -< y + z + b GT -> \c -> returnA -< z + x ) 1 ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-applications2.hs0000644000000000000000000000035307346545000026541 0ustar0000000000000000{-# LANGUAGE Arrows #-} t = proc ys -> (| f (\y -> returnA -< y) |) ys g x = proc (y, z) -> ( case compare x y of LT -> \a -> returnA -< x + a EQ -> \b -> returnA -< y + z + b GT -> \c -> returnA -< z + x ) 1 ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-cases-out.hs0000644000000000000000000000054207346545000025674 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> case a of Left b -> f -< b bar f g h j = proc a -> case a of Left ( (a, b), (c, d) ) -> f (a <> c) -< b <> d Right (Left a) -> h -< a Right (Right b) -> j -< b baz = proc x -> (f -< x) `catchA` \case Right a -> f -< a Left e -> h -< e ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-cases.hs0000644000000000000000000000065607346545000025075 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f =proc a -> case a of Left b -> f - case a of Left ( (a, b), (c, d) ) -> f (a <> c) -< b <> d Right (Left a) -> h -< a Right (Right b) -> j -< b baz = proc x -> (f -< x) `catchA` \case Right a -> f -< a Left e -> h -< e ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-do-complex-out.hs0000644000000000000000000000311507346545000026644 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f g h ma = proc ( (a, b), (c, d), (e, f) ) -> do -- Begin do (x, y) <- -- GHC parser fails if layed out over multiple lines f -- Call into f ( a, c -- Tuple together arguments ) ( b, d ) -< ( b + 1, -- Funnel into arrow d * b ) if x `mod` y == 0 -- Basic condition then case e of -- Only left case is relevant Left ( z, w ) -> \u -> -- Procs can have lambdas let v = u -- Actually never used ^ 2 in ( returnA -< -- Just do the calculation (x + y * z) ) else do let u = x -- Let bindings bind expressions, not commands -- Could pattern match directly on x i <- case u of 0 -> (g . h -< u) n -> ( ( h . g -< y -- First actual use of y ) ) returnA -< () -- Sometimes execute effects if i > 0 then ma -< () else returnA -< () returnA -< ( i + x * y -- Just do the calculation ) traverseA_ f = proc (e, (xs, s)) -> (| foldlA' (\() x -> do (e, (x, s)) >- f; () >- returnA) |) () xs ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-do-complex.hs0000644000000000000000000000271007346545000026037 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f g h ma = proc ( (a, b), (c, d), (e, f) ) -> do -- Begin do (x,y) -- GHC parser fails if layed out over multiple lines <- f -- Call into f (a, c) -- Tuple together arguments (b, d) -< (b + 1, -- Funnel into arrow d * b) if x `mod` y == 0 -- Basic condition then case e -- Only left case is relevant of Left (z, w) -> \u -> -- Procs can have lambdas let v = u -- Actually never used ^ 2 in (returnA -< -- Just do the calculation (x + y * z)) else do let u = x -- Let bindings bind expressions, not commands -- Could pattern match directly on x i <- case u of 0 -> (g . h -< u) n -> ( (h . g -< y) -- First actual use of y ) returnA -< () -- Sometimes execute effects if i > 0 then ma -< () else returnA -< () returnA -< (i + x * y) -- Just do the calculation traverseA_ f = proc (e, (xs, s)) -> (| foldlA' (\() x -> do { (e, (x, s)) >- f; () >- returnA }) |) () xs ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-do-simple1-out.hs0000644000000000000000000000055507346545000026554 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar f = proc a -> do b <- f -< a barbar f g = proc a -> do b <- f -< a returnA -< b barbaz f g = proc (a, b) -> do c <- f -< a d <- g -< b bazbar f = proc a -> do a <- f -< a foo = proc x -> do returnA -< x 1 foo a = proc x -> case Left x of Left x -> returnA -< x a ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-do-simple1.hs0000644000000000000000000000056107346545000025744 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar f = proc a -> do b <- f -< a barbar f g = proc a -> do b <- f -< a returnA -< b barbaz f g = proc (a, b) -> do c <- f -< a d <- g -< b bazbar f = proc a -> do a <- f -< a foo = proc x -> do returnA -< x 1 foo a = proc x -> case Left x of Left x -> returnA -< x a ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-do-simple2-out.hs0000644000000000000000000000045007346545000026547 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> do f -< a bazbaz f g h = proc (a, b, c) -> do x <- f b -< a y <- g b -< b z <- h x y -< ( a, b, c ) returnA -< (x, y, z) bar f = proc x -> do { f -< x } <+> do f -< x ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-do-simple2.hs0000644000000000000000000000050107346545000025737 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> do f -< a bazbaz f g h = proc (a, b, c) -> do x <- f b -< a y <- g b -< b z <- h x y -< ( a, b, c ) returnA -< (x, y, z) bar f = proc x -> do {f -< x} <+> do f -< x ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-form-do-indent-out.hs0000644000000000000000000000024307346545000027416 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-form-do-indent.hs0000644000000000000000000000023707346545000026614 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-forms1-out.hs0000644000000000000000000000050407346545000026003 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo0 f g x y = proc _ -> (| f (g -< (x, y)) |) foo1 f g h x = proc (y, z) -> (| test ( h f . h g -< y x . y z ) ( h g . h f -< y z . y x ) |) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-forms1.hs0000644000000000000000000000044607346545000025203 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo0 f g x y = proc _ -> (| f (g -< (x, y)) |) foo1 f g h x = proc (y, z) -> (| test ( h f . h g -< y x . y z ) ( h g . h f -< y z . y x) |) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-forms2-out.hs0000644000000000000000000000150307346545000026004 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar0 f g h x = proc (y, z) -> (| test (h f . (h g) -< (y x) . y z) ((h g) . h f -< y z . (y x)) |) bar1 f g x y = proc _ -> (f -< x) &&& (g -< y) bar2 f g h x = proc (y, z) -> (h f . (h g) -< (y x) . y z) ||| ((h g) . h f -< y z . (y x)) bar3 f g h x = proc (y, z) -> ( (h f . h g) -< (y x) . y z ) ||| ( (h g . h f) -< y z . (y x) ) bar4 = proc x -> case x of Just f -> f -< () Nothing -> x -< () <+> do g -< x expr' = proc x -> do returnA -< x <+> do symbol Plus -< () y <- term -< () expr' -< x + y <+> do symbol Minus -< () y <- term -< () expr' -< x - y bar f = proc (a, b) -> do (f a -< b) >-> (\y -> f b >- a) >-> (\y -> f b >- a) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-forms2.hs0000644000000000000000000000154007346545000025200 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar0 f g h x = proc (y, z) -> (| test (h f.(h g) -< (y x).y z)((h g) . h f- (f -< x)&&&(g -< y) bar2 f g h x = proc (y, z) -> (h f.(h g) -< (y x).y z) ||| ((h g) . h f- ((h f.h g) -< (y x).y z) ||| ((h g . h f) - case x of Just f -> f -< () Nothing -> x -< () <+> do g -< x expr' = proc x -> do returnA -< x <+> do symbol Plus -< () y <- term -< () expr' -< x + y <+> do symbol Minus -< () y <- term -< () expr' -< x - y bar f = proc (a, b) -> do (f a -< b) >-> (\y -> f b >- a) >-> (\y -> f b >- a) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-ifs-out.hs0000644000000000000000000000030207346545000025351 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> if a then f -< 0 else f -< 1 bar f g = proc a -> if f a then f . g -< a else g -< b ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-ifs.hs0000644000000000000000000000027607346545000024556 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> if a then f-<0 else f-<1 bar f g = proc a -> if f a then f . g -< a else g -< b ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-lambdas-out.hs0000644000000000000000000000026107346545000026177 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo = proc a -> \f b -> a -< f b -- Foo bar = proc x -> \f g h -> \() -> \(Left (x, y)) -> -- Tuple value f (g (h x)) -< y ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-lambdas.hs0000644000000000000000000000026307346545000025374 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo = proc a-> \f b->a- \f g h -> \() -> \( Left (x,y )) -> -- Tuple value f (g (h x)) -< y ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-lets-out.hs0000644000000000000000000000025507346545000025546 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> let b = a in f -< b bar f g = proc a -> let h = f . g a j = g . h in id -< (h, j) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-lets.hs0000644000000000000000000000027407346545000024742 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> let b = a in f -< b bar f g = proc a -> let h = f . g a j = g . h in id -< (h, j) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-parentheses-out.hs0000644000000000000000000000040407346545000027114 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> (f -< a) bar f g = proc a -> ( ( (f) ( g ) ) -< ( ( ( ( ( ( g a ) ) ) ) ) ) ) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/proc-parentheses.hs0000644000000000000000000000024207346545000026307 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> ( f -< a ) bar f g = proc a -> ( ((f) ( g )) -< ((((( (g a) ))))) ) ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/recursive-procs-out.hs0000644000000000000000000000043507346545000026771 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f g = proc (x, y) -> do rec a <- f y -< x b <- g x -< y bar -< ( a, b ) rec p <- f p -< a rec q <- g q -< b ormolu-0.7.2.0/data/examples/declaration/value/function/arrow/recursive-procs.hs0000644000000000000000000000033107346545000026157 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f g = proc (x, y) -> do rec a <- f y -< x b <- g x -< y bar -< ( a, b ) rec p <- f p -< a rec q <- g q-< b ormolu-0.7.2.0/data/examples/declaration/value/function/awkward-comment-0-out.hs0000644000000000000000000000035307346545000025740 0ustar0000000000000000mergeErrorReply :: ParseError -> Reply s u a -> Reply s u a mergeErrorReply err1 reply -- XXX where to put it? = case reply of Ok x state err2 -> Ok x state (mergeError err1 err2) Error err2 -> Error (mergeError err1 err2) ormolu-0.7.2.0/data/examples/declaration/value/function/awkward-comment-0.hs0000644000000000000000000000037007346545000025132 0ustar0000000000000000mergeErrorReply :: ParseError -> Reply s u a -> Reply s u a mergeErrorReply err1 reply -- XXX where to put it? = case reply of Ok x state err2 -> Ok x state (mergeError err1 err2) Error err2 -> Error (mergeError err1 err2) ormolu-0.7.2.0/data/examples/declaration/value/function/awkward-comment-1-out.hs0000644000000000000000000000041707346545000025742 0ustar0000000000000000doForeign :: Vars -> [Name] -> [Term] -> Idris LExp doForeign x = x where splitArg tm | (_, [_, _, l, r]) <- unApply tm -- pair, two implicits = do let l' = toFDesc l r' <- irTerm (sMN 0 "__foreignCall") vs env r return (l', r') ormolu-0.7.2.0/data/examples/declaration/value/function/awkward-comment-1.hs0000644000000000000000000000041207346545000025130 0ustar0000000000000000doForeign :: Vars -> [Name] -> [Term] -> Idris LExp doForeign x = x where splitArg tm | (_, [_,_,l,r]) <- unApply tm -- pair, two implicits = do let l' = toFDesc l r' <- irTerm (sMN 0 "__foreignCall") vs env r return (l', r') ormolu-0.7.2.0/data/examples/declaration/value/function/backticks-lhs-out.hs0000644000000000000000000000015507346545000025225 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True ormolu-0.7.2.0/data/examples/declaration/value/function/backticks-lhs.hs0000644000000000000000000000021607346545000024416 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True ormolu-0.7.2.0/data/examples/declaration/value/function/backticks-out.hs0000644000000000000000000000002407346545000024434 0ustar0000000000000000foo x y = x `bar` y ormolu-0.7.2.0/data/examples/declaration/value/function/backticks.hs0000644000000000000000000000002407346545000023627 0ustar0000000000000000foo x y = x `bar` y ormolu-0.7.2.0/data/examples/declaration/value/function/blank-lines-let-out.hs0000644000000000000000000000007607346545000025466 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z ormolu-0.7.2.0/data/examples/declaration/value/function/blank-lines-let.hs0000644000000000000000000000007707346545000024662 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z ormolu-0.7.2.0/data/examples/declaration/value/function/blank-lines-where-out.hs0000644000000000000000000000007207346545000026010 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 ormolu-0.7.2.0/data/examples/declaration/value/function/blank-lines-where.hs0000644000000000000000000000007307346545000025204 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 ormolu-0.7.2.0/data/examples/declaration/value/function/block-arguments-out.hs0000644000000000000000000000052507346545000025601 0ustar0000000000000000f1 = foo do bar f2 = foo do bar f3 = foo case True of True -> bar False -> baz f4 = foo let a = 3 in b f5 = foo let a = 3 b = a in b f6 = foo if bar then baz else not baz f7 = foo \x -> y f8 = foo \x -> y f9 = foo do { bar } baz f10 = foo do a do b do c f11 = do a do b do c do d ormolu-0.7.2.0/data/examples/declaration/value/function/block-arguments.hs0000644000000000000000000000054107346545000024772 0ustar0000000000000000f1 = foo do bar f2 = foo do bar f3 = foo case True of True -> bar False -> baz f4 = foo let a = 3 in b f5 = foo let a = 3 b = a in b f6 = foo if bar then baz else not baz f7 = foo \x -> y f8 = foo \x -> y f9 = foo do { bar } baz f10 = foo do { a } do { b } do c f11 = do a do b do c do d ormolu-0.7.2.0/data/examples/declaration/value/function/builtin-syntax-out.hs0000644000000000000000000000001607346545000025471 0ustar0000000000000000x = return () ormolu-0.7.2.0/data/examples/declaration/value/function/builtin-syntax.hs0000644000000000000000000000001607346545000024664 0ustar0000000000000000x = return () ormolu-0.7.2.0/data/examples/declaration/value/function/case-empty-out.hs0000644000000000000000000000015307346545000024550 0ustar0000000000000000absurd x = case x of {} absurd = \case {} absurd x = case x of {} absurd = \case {} foo = case () of {} 1 ormolu-0.7.2.0/data/examples/declaration/value/function/case-empty.hs0000644000000000000000000000014507346545000023744 0ustar0000000000000000absurd x = case x of absurd = \case absurd x = case x of {} absurd = \case {} foo = case () of {} 1 ormolu-0.7.2.0/data/examples/declaration/value/function/case-multi-line-guards-out.hs0000644000000000000000000000040307346545000026752 0ustar0000000000000000withGuards :: Int -> Int withGuards x = case x of x | x > 10 -> foo + bar x | x > 5 -> 10 _ -> 20 case x of '-' | not isUrl -> case xs of _ -> emitc '-' '*' | not isUrl -> case xs of _ -> emitc '*' ormolu-0.7.2.0/data/examples/declaration/value/function/case-multi-line-guards.hs0000644000000000000000000000040107346545000026143 0ustar0000000000000000withGuards :: Int -> Int withGuards x = case x of x | x > 10 -> foo + bar x | x > 5 -> 10 _ -> 20 case x of '-' | not isUrl -> case xs of _ -> emitc '-' '*' | not isUrl -> case xs of _ -> emitc '*' ormolu-0.7.2.0/data/examples/declaration/value/function/case-multi-line-out.hs0000644000000000000000000000050307346545000025470 0ustar0000000000000000foo :: Int -> Int foo x = case x of 5 -> 10 _ -> 12 bar :: Int -> Int bar x = case x of 5 -> if x > 5 then 10 else 12 _ -> 12 baz :: Int -> Int baz x = case x of 5 -> 10 _ -> 12 quux :: Int -> Int quux x = case x of x -> x funnyComment = -- comment case () of () -> () ormolu-0.7.2.0/data/examples/declaration/value/function/case-multi-line.hs0000644000000000000000000000050407346545000024664 0ustar0000000000000000foo :: Int -> Int foo x = case x of 5 -> 10 _ -> 12 bar :: Int -> Int bar x = case x of 5 -> if x > 5 then 10 else 12 _ -> 12 baz :: Int -> Int baz x = case x of 5 -> 10 _ -> 12 quux :: Int -> Int quux x = case x of x -> x funnyComment = -- comment case () of () -> () ormolu-0.7.2.0/data/examples/declaration/value/function/case-single-line-out.hs0000644000000000000000000000025407346545000025622 0ustar0000000000000000foo :: Int -> Int foo x = case x of x -> x foo :: IO () foo = case [1] of [_] -> "singleton"; _ -> "not singleton" foo = case [1] of { [] -> foo; _ -> bar } `finally` baz ormolu-0.7.2.0/data/examples/declaration/value/function/case-single-line.hs0000644000000000000000000000025407346545000025015 0ustar0000000000000000foo :: Int -> Int foo x = case x of x -> x foo :: IO () foo = case [1] of [_] -> "singleton"; _ -> "not singleton" foo = case [1] of { [] -> foo; _ -> bar } `finally` baz ormolu-0.7.2.0/data/examples/declaration/value/function/complex-list-out.hs0000644000000000000000000000027307346545000025124 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something, \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar, baz qux ] ormolu-0.7.2.0/data/examples/declaration/value/function/complex-list.hs0000644000000000000000000000027107346545000024315 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something , \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar , baz qux ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/0000755000000000000000000000000007346545000024212 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-monad-out.hs0000644000000000000000000000045407346545000030465 0ustar0000000000000000{-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE TransformListComp #-} quux' xs ys = [ ( x, y ) | x <- xs, y <- ys, then group by -- First comment ( x + y ) using -- Second comment groupWith -- Third comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-monad.hs0000644000000000000000000000036207346545000027656 0ustar0000000000000000{-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE TransformListComp #-} quux' xs ys = [ (x, y) | x <- xs, y <- ys, then group by -- First comment (x + y) using -- Second comment groupWith -- Third comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line1-out.hs0000644000000000000000000000026007346545000031522 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo' xs ys = [ ( x, y ) | x <- xs, y <- ys, then -- First comment reverse -- Second comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line1.hs0000644000000000000000000000022107346545000030712 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo' xs ys = [ (x, y) | x <- xs, y <- ys, then -- First comment reverse -- Second comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line2-out.hs0000644000000000000000000000034007346545000031522 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} bar' xs ys = [ ( x, y ) | x <- xs, y <- ys, then -- First comment sortWith by ( x + y -- Second comment ) ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line2.hs0000644000000000000000000000025407346545000030721 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} bar' xs ys = [ (x, y) | x <- xs, y <- ys, then -- First comment sortWith by (x + y) -- Second comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line3-out.hs0000644000000000000000000000030107346545000031520 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} baz' xs ys = [ ( x, y ) | x <- xs, y <- ys, then group using -- First comment permutations -- Second comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line3.hs0000644000000000000000000000024707346545000030724 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} baz' xs ys = [ (x, y) | x <- xs, y <- ys, then group using -- First comment permutations -- Second comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line4-out.hs0000644000000000000000000000040707346545000031530 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} quux' xs ys = [ ( x, y ) | x <- xs, y <- ys, then group by -- First comment ( x + y ) using -- Second comment groupWith -- Third comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-multi-line4.hs0000644000000000000000000000031507346545000030721 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} quux' xs ys = [ (x, y) | x <- xs, y <- ys, then group by -- First comment (x + y) using -- Second comment groupWith -- Third comment ] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-single-line-out.hs0000644000000000000000000000046607346545000031600 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo xs ys = [(x, y) | x <- xs, y <- ys, then reverse] bar xs ys = [(x, y) | x <- xs, y <- ys, then sortWith by (x + y)] baz xs ys = [(x, y) | x <- xs, y <- ys, then group using permutations] quux xs ys = [(x, y) | x <- xs, y <- ys, then group by (x + y) using groupWith] ormolu-0.7.2.0/data/examples/declaration/value/function/comprehension/transform-single-line.hs0000644000000000000000000000046607346545000030773 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo xs ys = [(x, y) | x <- xs, y <- ys, then reverse] bar xs ys = [(x, y) | x <- xs, y <- ys, then sortWith by (x + y)] baz xs ys = [(x, y) | x <- xs, y <- ys, then group using permutations] quux xs ys = [(x, y) | x <- xs, y <- ys, then group by (x + y) using groupWith] ormolu-0.7.2.0/data/examples/declaration/value/function/do-single-multi-out.hs0000644000000000000000000000004107346545000025506 0ustar0000000000000000foo = do ( bar baz ) ormolu-0.7.2.0/data/examples/declaration/value/function/do-single-multi.hs0000644000000000000000000000003507346545000024704 0ustar0000000000000000foo = do (bar baz) ormolu-0.7.2.0/data/examples/declaration/value/function/do-where-out.hs0000644000000000000000000000006307346545000024213 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 ormolu-0.7.2.0/data/examples/declaration/value/function/do-where.hs0000644000000000000000000000006307346545000023406 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 ormolu-0.7.2.0/data/examples/declaration/value/function/do/0000755000000000000000000000000007346545000021743 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/do/applications-and-parens-out.hs0000644000000000000000000000034407346545000027621 0ustar0000000000000000warningFor var place = do guard $ isVariableName var guard . not $ isInArray var place || isGuarded place ( if includeGlobals || isLocal var then warningForLocals else warningForGlobals ) var place ormolu-0.7.2.0/data/examples/declaration/value/function/do/applications-and-parens.hs0000644000000000000000000000033207346545000027011 0ustar0000000000000000warningFor var place = do guard $ isVariableName var guard . not $ isInArray var place || isGuarded place (if includeGlobals || isLocal var then warningForLocals else warningForGlobals) var place ormolu-0.7.2.0/data/examples/declaration/value/function/do/blocks-out.hs0000644000000000000000000000042707346545000024364 0ustar0000000000000000foo = do bar foo = do bar; baz foo = do bar baz foo = do do { foo; bar }; baz readInClause = do do lookAhead g_Do parseNote ErrorC 1063 "You need a line feed or semicolon before the 'do'." <|> do optional g_Semi void allspacing return things ormolu-0.7.2.0/data/examples/declaration/value/function/do/blocks.hs0000644000000000000000000000051607346545000023556 0ustar0000000000000000foo = do bar foo = do { bar; baz } foo = do { bar ; baz } foo = do { do {foo; bar}; baz } readInClause = do do { lookAhead g_Do; parseNote ErrorC 1063 "You need a line feed or semicolon before the 'do'."; } <|> do { optional g_Semi; void allspacing; } return things ormolu-0.7.2.0/data/examples/declaration/value/function/do/comment-alignment-out.hs0000644000000000000000000000022107346545000026515 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux ormolu-0.7.2.0/data/examples/declaration/value/function/do/comment-alignment.hs0000644000000000000000000000022107346545000025710 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux ormolu-0.7.2.0/data/examples/declaration/value/function/do/comment-spacing-out.hs0000644000000000000000000000005707346545000026172 0ustar0000000000000000foo = do bar -- foo baz -- foo quux ormolu-0.7.2.0/data/examples/declaration/value/function/do/comment-spacing.hs0000644000000000000000000000005707346545000025365 0ustar0000000000000000foo = do bar -- foo baz -- foo quux ormolu-0.7.2.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain-out.hs0000644000000000000000000000032007346545000027140 0ustar0000000000000000module A (a) where a :: Int a = do f . do g $ do 1 + 2 * 3 $ ( 6 * 5 + 4 ) b = f a <> 1 + 2 <> do 3 c = f b $ 1 + 2 $ do 3 ormolu-0.7.2.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain.hs0000644000000000000000000000032007346545000026333 0ustar0000000000000000module A (a) where a :: Int a = do f . do g $ do 1 + 2 * 3 $ ( 6 * 5 + 4 ) b = f a <> 1 + 2 <> do 3 c = f b $ 1 + 2 $ do 3 ormolu-0.7.2.0/data/examples/declaration/value/function/do/expr-out.hs0000644000000000000000000000016107346545000024060 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz ormolu-0.7.2.0/data/examples/declaration/value/function/do/expr.hs0000644000000000000000000000015507346545000023256 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz ormolu-0.7.2.0/data/examples/declaration/value/function/do/hang-rhs-arrow-out.hs0000644000000000000000000000027307346545000025745 0ustar0000000000000000foo = do something <- case bar of Foo -> return 1 Bar -> return 2 somethingElse <- case boom of Foo -> return 1 Bar -> return 2 quux something somethingElse ormolu-0.7.2.0/data/examples/declaration/value/function/do/hang-rhs-arrow.hs0000644000000000000000000000027307346545000025140 0ustar0000000000000000foo = do something <- case bar of Foo -> return 1 Bar -> return 2 somethingElse <- case boom of Foo -> return 1 Bar -> return 2 quux something somethingElse ormolu-0.7.2.0/data/examples/declaration/value/function/do/let-out.hs0000644000000000000000000000041207346545000023665 0ustar0000000000000000main = do a <- bar let a = b; c = d baz d let e = f g = h return c -- single line let-where samples n f = do gen <- newQCGen let rands g = g1 : rands g2 where (g1, g2) = split g return $ rands gen trickyLet = do foo let x = 5 in bar x ormolu-0.7.2.0/data/examples/declaration/value/function/do/let.hs0000644000000000000000000000042007346545000023057 0ustar0000000000000000main = do a <- bar let a = b; c = d baz d let e = f g = h return c -- single line let-where samples n f = do gen <- newQCGen let rands g = g1 : rands g2 where (g1, g2) = split g return $ rands gen trickyLet = do foo let x = 5 in bar x ormolu-0.7.2.0/data/examples/declaration/value/function/do/operator-and-parens-out.hs0000644000000000000000000000037507346545000026772 0ustar0000000000000000scientifically :: (Scientific -> a) -> Parser a scientifically h = do something ( I.satisfy (\w -> w == 'e' || w == 'E') *> fmap (h . Sci.scientific signedCoeff . (e +)) (signed decimal) ) <|> return (h $ Sci.scientific signedCoeff e) ormolu-0.7.2.0/data/examples/declaration/value/function/do/operator-and-parens.hs0000644000000000000000000000037507346545000026165 0ustar0000000000000000scientifically :: (Scientific -> a) -> Parser a scientifically h = do something ( I.satisfy (\w -> w == 'e' || w == 'E') *> fmap (h . Sci.scientific signedCoeff . (e +)) (signed decimal) ) <|> return (h $ Sci.scientific signedCoeff e) ormolu-0.7.2.0/data/examples/declaration/value/function/do/recursive-do-mdo-out.hs0000644000000000000000000000020507346545000026265 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) ormolu-0.7.2.0/data/examples/declaration/value/function/do/recursive-do-mdo.hs0000644000000000000000000000016107346545000025461 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) ormolu-0.7.2.0/data/examples/declaration/value/function/do/recursive-do-rec-out.hs0000644000000000000000000000033407346545000026262 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} foo = do rec a <- b + 5 let d = c b <- a * 5 something c <- a + b print c rec something $ do x <- a print x y <- c print y ormolu-0.7.2.0/data/examples/declaration/value/function/do/recursive-do-rec.hs0000644000000000000000000000034007346545000025452 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} foo = do rec a <- b + 5 let d = c b <- a * 5 something c <- a + b print c rec something $ do x <- a print x y <- c print y ormolu-0.7.2.0/data/examples/declaration/value/function/equality-constraints-out.hs0000644000000000000000000000006007346545000026700 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined ormolu-0.7.2.0/data/examples/declaration/value/function/equality-constraints.hs0000644000000000000000000000006007346545000026073 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined ormolu-0.7.2.0/data/examples/declaration/value/function/explicit-type-out.hs0000644000000000000000000000004507346545000025301 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int ormolu-0.7.2.0/data/examples/declaration/value/function/explicit-type.hs0000644000000000000000000000004107346545000024470 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int ormolu-0.7.2.0/data/examples/declaration/value/function/fancy-forall-0-out.hs0000644000000000000000000000043307346545000025214 0ustar0000000000000000wrapError :: forall outertag innertag t outer inner m a. ( forall x. Coercible (t m x) (m x), forall m'. (HasCatch outertag outer m') => HasCatch innertag inner (t m'), HasCatch outertag outer m ) => (forall m'. (HasCatch innertag inner m') => m' a) -> m a ormolu-0.7.2.0/data/examples/declaration/value/function/fancy-forall-0.hs0000644000000000000000000000041307346545000024405 0ustar0000000000000000wrapError :: forall outertag innertag t outer inner m a. ( forall x. Coercible (t m x) (m x) , forall m'. HasCatch outertag outer m' => HasCatch innertag inner (t m') , HasCatch outertag outer m ) => (forall m'. HasCatch innertag inner m' => m' a) -> m a ormolu-0.7.2.0/data/examples/declaration/value/function/fancy-forall-1-out.hs0000644000000000000000000000043507346545000025217 0ustar0000000000000000magnify :: forall outertag innertag t outer inner m a. ( forall x. Coercible (t m x) (m x), forall m'. (HasReader outertag outer m') => HasReader innertag inner (t m'), HasReader outertag outer m ) => (forall m'. (HasReader innertag inner m') => m' a) -> m a ormolu-0.7.2.0/data/examples/declaration/value/function/fancy-forall-1.hs0000644000000000000000000000041507346545000024410 0ustar0000000000000000magnify :: forall outertag innertag t outer inner m a. ( forall x. Coercible (t m x) (m x) , forall m'. HasReader outertag outer m' => HasReader innertag inner (t m') , HasReader outertag outer m ) => (forall m'. HasReader innertag inner m' => m' a) -> m a ormolu-0.7.2.0/data/examples/declaration/value/function/guards-out.hs0000644000000000000000000000032207346545000023764 0ustar0000000000000000baz :: Int -> Int baz x | x < 0 = x baz x | otherwise = x multi_baz :: Int -> Int multi_baz x | x < 42 = x multi_baz x | x < 0 = x multi_baz x | otherwise = x quux :: Int -> Int quux x | x < 0 = x quux x = x ormolu-0.7.2.0/data/examples/declaration/value/function/guards.hs0000644000000000000000000000032207346545000023157 0ustar0000000000000000baz :: Int -> Int baz x | x < 0 = x baz x | otherwise = x multi_baz :: Int -> Int multi_baz x | x < 42 = x multi_baz x | x < 0 = x multi_baz x | otherwise = x quux :: Int -> Int quux x | x < 0 = x quux x = x ormolu-0.7.2.0/data/examples/declaration/value/function/if-multi-line-out.hs0000644000000000000000000000042707346545000025160 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then foo x + 100 else case x of 1 -> 10 _ -> 20 baz :: Int -> Bar baz x = if x > 5 then \case Foo -> bar else do undefined ormolu-0.7.2.0/data/examples/declaration/value/function/if-multi-line.hs0000644000000000000000000000042007346545000024344 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then foo x + 100 else case x of 1 -> 10 _ -> 20 baz :: Int -> Bar baz x = if x > 5 then \case Foo -> bar else do undefined ormolu-0.7.2.0/data/examples/declaration/value/function/if-single-line-out.hs0000644000000000000000000000015107346545000025301 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then 10 else 12 ormolu-0.7.2.0/data/examples/declaration/value/function/if-single-line.hs0000644000000000000000000000015107346545000024474 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then 10 else 12 ormolu-0.7.2.0/data/examples/declaration/value/function/if-with-comment-out.hs0000644000000000000000000000015707346545000025514 0ustar0000000000000000foo = if undefined then -- then comment undefined else -- else comment do undefined ormolu-0.7.2.0/data/examples/declaration/value/function/if-with-comment.hs0000644000000000000000000000016407346545000024705 0ustar0000000000000000foo = if undefined -- then comment then undefined -- else comment else do undefined ormolu-0.7.2.0/data/examples/declaration/value/function/implicit-params-out.hs0000644000000000000000000000037707346545000025604 0ustar0000000000000000{-# LANGUAGE ImplicitParams #-} sortBy :: (a -> a -> Bool) -> [a] -> [a] sortBy = undefined sort :: (?cmp :: a -> a -> Bool) => [a] -> [a] sort = sortBy ?cmp sort' :: ( ?cmp :: a -> a -> Bool, ?foo :: Int ) => [a] -> [a] sort' = sort ormolu-0.7.2.0/data/examples/declaration/value/function/implicit-params.hs0000644000000000000000000000041007346545000024763 0ustar0000000000000000{-# LANGUAGE ImplicitParams #-} sortBy :: (a -> a -> Bool) -> [a] -> [a] sortBy = undefined sort :: (?cmp :: a -> a -> Bool) => [a] -> [a] sort = sortBy ?cmp sort' :: (?cmp :: a -> a -> Bool ,?foo :: Int) => [a] -> [a] sort' = sort ormolu-0.7.2.0/data/examples/declaration/value/function/infix/0000755000000000000000000000000007346545000022456 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/infix/applicative-out.hs0000644000000000000000000000005707346545000026122 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' ormolu-0.7.2.0/data/examples/declaration/value/function/infix/applicative.hs0000644000000000000000000000005707346545000025315 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' ormolu-0.7.2.0/data/examples/declaration/value/function/infix/comments-out.hs0000644000000000000000000000010107346545000025434 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar ormolu-0.7.2.0/data/examples/declaration/value/function/infix/comments.hs0000644000000000000000000000010107346545000024627 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar ormolu-0.7.2.0/data/examples/declaration/value/function/infix/do-out.hs0000644000000000000000000000022507346545000024220 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/do.hs0000644000000000000000000000022607346545000023414 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-1-out.hs0000644000000000000000000000054207346545000026476 0ustar0000000000000000module Main where foo = fmap escapeLeadingDollar . dropPaddingSpace . dropWhileEnd T.null . fmap (T.stripEnd . T.pack) . lines $ unpackHDS docStr foo = when (GHC.xopt Cpp dynFlags && not cfgTolerateCpp) $ throwIO (OrmoluCppEnabled path) foo = bar $ baz $ quux x = case l of { A -> B } $ case q of r -> s ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-1.hs0000644000000000000000000000053607346545000025674 0ustar0000000000000000module Main where foo = fmap escapeLeadingDollar . dropPaddingSpace . dropWhileEnd T.null . fmap (T.stripEnd . T.pack) . lines $ unpackHDS docStr foo = when (GHC.xopt Cpp dynFlags && not cfgTolerateCpp) $ throwIO (OrmoluCppEnabled path) foo = bar $ baz $ quux x = case l of { A -> B } $ case q of r -> s ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-2-out.hs0000644000000000000000000000022607346545000026476 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-2.hs0000644000000000000000000000023007346545000025664 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-3-out.hs0000644000000000000000000000014607346545000026500 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-3.hs0000644000000000000000000000012607346545000025671 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-4-out.hs0000644000000000000000000000006507346545000026501 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-4.hs0000644000000000000000000000005507346545000025673 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-5-out.hs0000644000000000000000000000015307346545000026500 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-5.hs0000644000000000000000000000014307346545000025672 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-6-out.hs0000644000000000000000000000016307346545000026502 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c ormolu-0.7.2.0/data/examples/declaration/value/function/infix/dollar-chains-6.hs0000644000000000000000000000015307346545000025674 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c ormolu-0.7.2.0/data/examples/declaration/value/function/infix/esqueleto-0-out.hs0000644000000000000000000000041707346545000025764 0ustar0000000000000000import Database.Esqueleto.Experimental foo = select $ do t <- from $ table @Bar `innerJoin` table @Baz `on` do \(br :& bz) -> whatever where_ $ t ^. BarInt ==. val 3 &&. t ^. BarName `in_` valList ["hello", "world"] ormolu-0.7.2.0/data/examples/declaration/value/function/infix/esqueleto-0.hs0000644000000000000000000000036607346545000025162 0ustar0000000000000000import Database.Esqueleto.Experimental foo = select $ do t <- from $ table @Bar `innerJoin` table @Baz `on` do \(br :& bz) -> whatever where_ $ t ^. BarInt ==. val 3 &&. t ^. BarName `in_` valList ["hello", "world"] ormolu-0.7.2.0/data/examples/declaration/value/function/infix/esqueleto-1-out.hs0000644000000000000000000000032407346545000025762 0ustar0000000000000000import qualified Database.Esqueleto.Experimental as E foo = E.from $ E.table `E.innerJoin` E.table `E.on` ( \(a :& b) -> a E.^. AField E.==. b E.^. BField ) ormolu-0.7.2.0/data/examples/declaration/value/function/infix/esqueleto-1.hs0000644000000000000000000000031407346545000025154 0ustar0000000000000000import qualified Database.Esqueleto.Experimental as E foo = E.from $ E.table `E.innerJoin` E.table `E.on` ( \(a :& b) -> a E.^. AField E.==. b E.^. BField ) ormolu-0.7.2.0/data/examples/declaration/value/function/infix/hanging-out.hs0000644000000000000000000000032107346545000025226 0ustar0000000000000000f = unFoo . foo bar baz 3 $ do act ret g = unFoo . foo bar baz 3 $ do act ret update = do foobar `catch` \case a -> a foo = bar ++ case foo of a -> a ormolu-0.7.2.0/data/examples/declaration/value/function/infix/hanging.hs0000644000000000000000000000031507346545000024424 0ustar0000000000000000f = unFoo . foo bar baz 3 $ do act ret g = unFoo . foo bar baz 3 $ do act ret update = do foobar `catch` \case a -> a foo = bar ++ case foo of a -> a ormolu-0.7.2.0/data/examples/declaration/value/function/infix/hspec-expectation-out.hs0000644000000000000000000000034407346545000027243 0ustar0000000000000000import Test.Hspec my_tests = do context "my context" $ it "does something" $ property $ \pos xs0 xs1 -> FancyError pos xs0 <> FancyError pos xs1 `shouldBe` (FancyError pos (E.union xs0 xs1) :: PE) ormolu-0.7.2.0/data/examples/declaration/value/function/infix/hspec-expectation.hs0000644000000000000000000000034407346545000026436 0ustar0000000000000000import Test.Hspec my_tests = do context "my context" $ it "does something" $ property $ \pos xs0 xs1 -> FancyError pos xs0 <> FancyError pos xs1 `shouldBe` (FancyError pos (E.union xs0 xs1) :: PE) ormolu-0.7.2.0/data/examples/declaration/value/function/infix/lenses-out.hs0000644000000000000000000000102207346545000025103 0ustar0000000000000000import Control.Lens lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] foo = a & b .~ 2 & c .~ 3 wreq = let opts = defaults & auth ?~ awsAuth AWSv4 "key" "secret" & header "Accept" .~ ["application/json"] & header "Runscope-Bucket-Auth" .~ ["1example-1111-4yyyy-zzzz-xxxxxxxx"] in getWith opts ormolu-0.7.2.0/data/examples/declaration/value/function/infix/lenses.hs0000644000000000000000000000100107346545000024273 0ustar0000000000000000import Control.Lens lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] foo = a & b .~ 2 & c .~ 3 wreq = let opts = defaults & auth ?~ awsAuth AWSv4 "key" "secret" & header "Accept" .~ ["application/json"] & header "Runscope-Bucket-Auth" .~ ["1example-1111-4yyyy-zzzz-xxxxxxxx"] in getWith opts ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-colon-do-out.hs0000644000000000000000000000014207346545000027022 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-colon-do.hs0000644000000000000000000000012607346545000026217 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-eq-out.hs0000644000000000000000000000016607346545000026154 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-eq.hs0000644000000000000000000000015007346545000025340 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-gt-out.hs0000644000000000000000000000017407346545000026160 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-gt.hs0000644000000000000000000000015007346545000025345 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-lt-out.hs0000644000000000000000000000016707346545000026167 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-lt.hs0000644000000000000000000000014707346545000025360 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-s-out.hs0000644000000000000000000000011007346545000025776 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-l-s.hs0000644000000000000000000000010207346545000025172 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1-out.hs0000644000000000000000000000020007346545000027415 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1.hs0000644000000000000000000000016207346545000026617 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2-out.hs0000644000000000000000000000020507346545000027423 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2.hs0000644000000000000000000000016707346545000026625 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1-out.hs0000644000000000000000000000025507346545000027572 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1.hs0000644000000000000000000000016507346545000026765 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2-out.hs0000644000000000000000000000030107346545000027563 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) == p($) p :: Int p = 1 `seq` 2 `seq` 3 `seq` 4 $ 5 `seq` 6 `seq` 7 `seq` 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2.hs0000644000000000000000000000021107346545000026756 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) == p($) p :: Int p = 1 `seq` 2 `seq` 3 `seq` 4 $ 5 `seq` 6 `seq` 7 `seq` 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal-out.hs0000644000000000000000000000021207346545000027440 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) == p(b) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal.hs0000644000000000000000000000017407346545000026642 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) == p(b) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1-out.hs0000644000000000000000000000021007346545000027423 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1.hs0000644000000000000000000000016407346545000026626 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2-out.hs0000644000000000000000000000021207346545000027426 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2.hs0000644000000000000000000000016607346545000026631 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar-out.hs0000644000000000000000000000021207346545000027432 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar.hs0000644000000000000000000000016607346545000026635 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal-out.hs0000644000000000000000000000022007346545000027444 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) > p(b) f :: Int f = 1 ^^ 2 ^^ 3 ^^ 4 ++ 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal.hs0000644000000000000000000000017407346545000026647 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) > p(b) f :: Int f = 1 ^^ 2 ^^ 3 ^^ 4 ++ 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1-out.hs0000644000000000000000000000020107346545000027430 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1.hs0000644000000000000000000000016107346545000026630 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2-out.hs0000644000000000000000000000020607346545000027436 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2.hs0000644000000000000000000000016607346545000026636 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar-out.hs0000644000000000000000000000020107346545000027435 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar.hs0000644000000000000000000000016107346545000026635 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal-out.hs0000644000000000000000000000021407346545000027454 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) < p(b) g :: Int g = 1 ++ 2 ++ 3 ++ 4 ^^ 5 ++ 6 ++ 7 ++ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal.hs0000644000000000000000000000017407346545000026654 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) < p(b) g :: Int g = 1 ++ 2 ++ 3 ++ 4 ^^ 5 ++ 6 ++ 7 ++ 8 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon-out.hs0000644000000000000000000000012107346545000027116 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon.hs0000644000000000000000000000011307346545000026312 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar-out.hs0000644000000000000000000000012707346545000027267 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar.hs0000644000000000000000000000011307346545000026455 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal-out.hs0000644000000000000000000000013107346545000027275 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal.hs0000644000000000000000000000012307346545000026471 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 ormolu-0.7.2.0/data/examples/declaration/value/function/infix/qualified-ops-out.hs0000644000000000000000000000037707346545000026370 0ustar0000000000000000lenses = Just $ M.fromList $ "type" Foo..= ("user.connection" :: Text) Bar.# "connection" Foo..= uc Bar.# "user" Foo..= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing Bar.# [] ormolu-0.7.2.0/data/examples/declaration/value/function/infix/qualified-ops.hs0000644000000000000000000000035007346545000025552 0ustar0000000000000000lenses = Just $ M.fromList $ "type" Foo..= ("user.connection" :: Text) Bar.# "connection" Foo..= uc Bar.# "user" Foo..= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing Bar.# [] ormolu-0.7.2.0/data/examples/declaration/value/function/infix/qualified-prelude-out.hs0000644000000000000000000000037407346545000027224 0ustar0000000000000000module StreamSpec where import Prelude (($)) import qualified Prelude spec :: Spec spec = do describe "Comparing list function to" $ do qit "yieldMany" $ \(mono :: Seq Int) -> yieldMany mono `checkProducer` otoList mono ormolu-0.7.2.0/data/examples/declaration/value/function/infix/qualified-prelude.hs0000644000000000000000000000044007346545000026411 0ustar0000000000000000module StreamSpec where import qualified Prelude import Prelude (($)) spec :: Spec spec = do describe "Comparing list function to" $ do qit "yieldMany" $ \(mono :: Seq Int) -> yieldMany mono `checkProducer` otoList mono ormolu-0.7.2.0/data/examples/declaration/value/function/infix/simple-out.hs0000644000000000000000000000026407346545000025112 0ustar0000000000000000(*) :: Int -> Int -> Int x * y = z foo :: Int -> Int -> Int x `foo` y = z bar :: Int -> Int -> Int -> Int (x `bar` y) z = z multiline :: Int -> Int -> Int x `multiline` y = z ormolu-0.7.2.0/data/examples/declaration/value/function/infix/simple.hs0000644000000000000000000000026407346545000024305 0ustar0000000000000000(*) :: Int -> Int -> Int x * y = z foo :: Int -> Int -> Int x `foo` y = z bar :: Int -> Int -> Int -> Int (x `bar` y) z = z multiline :: Int -> Int -> Int x `multiline` y = z ormolu-0.7.2.0/data/examples/declaration/value/function/infix/tricky-colon-chain-out.hs0000644000000000000000000000011007346545000027304 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] ormolu-0.7.2.0/data/examples/declaration/value/function/infix/tricky-colon-chain.hs0000644000000000000000000000012207346545000026502 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] ormolu-0.7.2.0/data/examples/declaration/value/function/infix/unicode-out.hs0000644000000000000000000000006307346545000025244 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) ormolu-0.7.2.0/data/examples/declaration/value/function/infix/unicode.hs0000644000000000000000000000006307346545000024437 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-case-out.hs0000644000000000000000000000063707346545000024641 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} foo = bar (\case JKey {} -> True; _ -> False) foo :: Int -> Int foo = \case 5 -> 10 i | i > 5 -> 11 _ -> 12 foo :: Maybe a -> Maybe a -> Maybe a -> Int foo = \cases Nothing Just {} Nothing -> 1; _ _ _ -> 0 foo :: Maybe Int -> Maybe Int -> Int foo = \cases (Just a) (Just a) -> a + a _ _ -> 0 foo :: Bool -> Bool -> Bool foo = \cases True True -> True _ _ -> False ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-case.hs0000644000000000000000000000065407346545000024033 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} foo = bar (\case JKey{} -> True; _ -> False) foo :: Int -> Int foo = \case 5 -> 10 i | i > 5 -> 11 _ -> 12 foo :: Maybe a -> Maybe a -> Maybe a -> Int foo = \cases Nothing Just{} Nothing -> 1; _ _ _ -> 0 foo :: Maybe Int -> Maybe Int -> Int foo = \cases (Just a) (Just a) -> a + a _ _ -> 0 foo :: Bool -> Bool -> Bool foo = \cases True True -> True _ _ -> False ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-multi-line1-out.hs0000644000000000000000000000040607346545000026060 0ustar0000000000000000foo :: a -> a -> a foo x = \y -> x bar :: Int -> Int -> Int bar x = \y -> if x > y then 10 else 12 foo = prop "is inverse to closure" $ \(f :: StaticPtr (Int -> Int)) (x :: Int) -> (unclosure . closure) f x == deRefStaticPtr f x ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-multi-line1.hs0000644000000000000000000000037507346545000025260 0ustar0000000000000000foo :: a -> a -> a foo x = \y -> x bar :: Int -> Int -> Int bar x = \y -> if x > y then 10 else 12 foo = prop "is inverse to closure" $ \(f :: StaticPtr (Int -> Int)) (x :: Int) -> (unclosure . closure) f x == deRefStaticPtr f x ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-multi-line2-out.hs0000644000000000000000000000046107346545000026062 0ustar0000000000000000tricky0 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky1 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky2 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-multi-line2.hs0000644000000000000000000000045307346545000025256 0ustar0000000000000000tricky0 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky1 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt tricky2 = flip all (zip ws gs) $ \(wt, gt) -> canUnify poly_given_ok wt gt || go False wt gt ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-single-line-out.hs0000644000000000000000000000037507346545000026133 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE TemplateHaskell #-} foo :: a -> a -> a foo x = \y -> x bar :: a -> a -> a bar x = \y -> x baz :: a -> a -> a baz = \ ~x ~y -> x zag :: a -> a -> a zag = \ !x !y -> x spl :: a -> a spl = \ $([p|x|]) -> x ormolu-0.7.2.0/data/examples/declaration/value/function/lambda-single-line.hs0000644000000000000000000000037707346545000025330 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE TemplateHaskell #-} foo :: a -> a -> a foo x = \y -> x bar :: a -> a -> a bar x = \y -> x baz :: a -> a -> a baz = \ ~x ~y -> x zag :: a -> a -> a zag = \ !x !y -> x spl :: a -> a spl = \ $([p|x|]) -> x ormolu-0.7.2.0/data/examples/declaration/value/function/let-multi-line-out.hs0000644000000000000000000000061507346545000025345 0ustar0000000000000000foo :: Int -> Int foo x = let z = y y = x in z + 100 bar :: Int -> Int bar x = let z = y y = x in z + 100 inlineComment :: Int -> Int inlineComment = let {- join -} go = case () of () -> undefined in go implicitParams :: (HasCallStack) => Int implicitParams = let ?cs = ?callstack in foo cs sitting = foo $ let x = 20 in x ormolu-0.7.2.0/data/examples/declaration/value/function/let-multi-line.hs0000644000000000000000000000060607346545000024540 0ustar0000000000000000foo :: Int -> Int foo x = let z = y y = x in z + 100 bar :: Int -> Int bar x = let z = y y = x in z + 100 inlineComment :: Int -> Int inlineComment = let {- join -} go = case () of () -> undefined in go implicitParams :: HasCallStack => Int implicitParams = let ?cs = ?callstack in foo cs sitting = foo $ let x = 20 in x ormolu-0.7.2.0/data/examples/declaration/value/function/let-nested-out.hs0000644000000000000000000000004607346545000024546 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] ormolu-0.7.2.0/data/examples/declaration/value/function/let-nested.hs0000644000000000000000000000004607346545000023741 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] ormolu-0.7.2.0/data/examples/declaration/value/function/let-single-line-out.hs0000644000000000000000000000046307346545000025475 0ustar0000000000000000foo :: a -> a foo x = let x = x in x foo x = let x = z where z = 2 in x foo x = let x = z where { z = 2 }; a = 3 in x foo x = let g :: Int -> Int; g = id in () let a = b; c = do { foo; bar }; d = baz in b let a = case True of { True -> foo; False -> bar }; b = foo a in b foo x = let ?g = id; ?f = g in x ormolu-0.7.2.0/data/examples/declaration/value/function/let-single-line.hs0000644000000000000000000000046607346545000024673 0ustar0000000000000000foo :: a -> a foo x = let x = x in x foo x = let x = z where z = 2 in x foo x = let x = z where { z = 2; }; a = 3 in x foo x = let {g :: Int -> Int; g = id} in () let a = b; c = do { foo; bar }; d = baz in b let a = case True of { True -> foo; False -> bar }; b = foo a in b foo x = let {?g = id; ?f = g} in x ormolu-0.7.2.0/data/examples/declaration/value/function/lexical-negation-out.hs0000644000000000000000000000015307346545000025724 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y ormolu-0.7.2.0/data/examples/declaration/value/function/lexical-negation.hs0000644000000000000000000000015307346545000025117 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y ormolu-0.7.2.0/data/examples/declaration/value/function/list-comprehensions-out.hs0000644000000000000000000000063007346545000026506 0ustar0000000000000000foo x = [a | a <- x] bar x y = [(a, b) | a <- x, even a, b <- y, a != b] barbaz x y z w = [ (a, b, c, d) -- Foo | a <- x, -- Bar b <- y, -- Baz any even [a, b], c <- z * z ^ 2, -- Bar baz d <- w + w, -- Baz bar all even [ a, b, c, d ] ] a = do [ c | c <- d ] ormolu-0.7.2.0/data/examples/declaration/value/function/list-comprehensions.hs0000644000000000000000000000055107346545000025703 0ustar0000000000000000foo x = [a |a<-x] bar x y = [ (a, b) | a<-x, even a , b<-y, a != b ] barbaz x y z w = [ (a, b, c, d) | -- Foo a <- x, -- Bar b<-y, -- Baz any even [a, b], c <- z * z ^ 2, -- Bar baz d <- w + w, -- Baz bar all even [ a, b, c, d ] ] a = do [ c | c <- d ] ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-0-out.hs0000644000000000000000000000014207346545000025440 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-0.hs0000644000000000000000000000013407346545000024634 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-1-out.hs0000644000000000000000000000044707346545000025451 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l] ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-1.hs0000644000000000000000000000045507346545000024643 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> [ "GlobalSecondaryIndexUpdates" .= l ] ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-2-out.hs0000644000000000000000000000027407346545000025450 0ustar0000000000000000-- A list of the element and all its parents up to the root node. getPath tree t = t : case Map.lookup (getId t) tree of Nothing -> [] Just parent -> getPath tree parent ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-2.hs0000644000000000000000000000030207346545000024633 0ustar0000000000000000-- A list of the element and all its parents up to the root node. getPath tree t = t : case Map.lookup (getId t) tree of Nothing -> [] Just parent -> getPath tree parent ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-3-out.hs0000644000000000000000000000043307346545000025446 0ustar0000000000000000foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls ormolu-0.7.2.0/data/examples/declaration/value/function/list-notation-3.hs0000644000000000000000000000043307346545000024641 0ustar0000000000000000foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls foo = reportSDoc "tc.cc" 30 $ sep $ do (prettyTCM q <+> " before compilation") : do map (prettyTCM . map unArg . clPats) cls ormolu-0.7.2.0/data/examples/declaration/value/function/multi-way-if-out.hs0000644000000000000000000000027507346545000025032 0ustar0000000000000000{-# LANGUAGE MultiWayIf #-} foo x = if | x == 5 -> 5 bar x y = if | x > y -> x | x < y -> y | otherwise -> x baz = if | p -> f | otherwise -> g x ormolu-0.7.2.0/data/examples/declaration/value/function/multi-way-if.hs0000644000000000000000000000026607346545000024225 0ustar0000000000000000{-# LANGUAGE MultiWayIf #-} foo x = if | x == 5 -> 5 bar x y = if | x > y -> x | x < y -> y | otherwise -> x baz = if | p -> f | otherwise -> g x ormolu-0.7.2.0/data/examples/declaration/value/function/multiline-arguments-out.hs0000644000000000000000000000012607346545000026506 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) ( Bar x y ) z = x ormolu-0.7.2.0/data/examples/declaration/value/function/multiline-arguments.hs0000644000000000000000000000011107346545000025673 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) (Bar x y) z = x ormolu-0.7.2.0/data/examples/declaration/value/function/multiple-guards-out.hs0000644000000000000000000000030007346545000025611 0ustar0000000000000000foo :: Int -> Int foo x | x == 5 = 10 | otherwise = 12 bar :: Int -> Int bar x | x == 5 = foo x + foo 10 | x == 6 = foo x + foo 20 | otherwise = foo 100 ormolu-0.7.2.0/data/examples/declaration/value/function/multiple-guards.hs0000644000000000000000000000026507346545000025016 0ustar0000000000000000foo :: Int -> Int foo x | x == 5 = 10 | otherwise = 12 bar :: Int -> Int bar x | x == 5 = foo x + foo 10 | x == 6 = foo x + foo 20 | otherwise = foo 100 ormolu-0.7.2.0/data/examples/declaration/value/function/multiple-matches-out.hs0000644000000000000000000000005007346545000025752 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 ormolu-0.7.2.0/data/examples/declaration/value/function/multiple-matches.hs0000644000000000000000000000005007346545000025145 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 ormolu-0.7.2.0/data/examples/declaration/value/function/negation-out.hs0000644000000000000000000000031607346545000024306 0ustar0000000000000000foo :: Int foo = (-2) bar :: Int bar = -2 baz :: Int baz = -2 neg :: Int -> Int neg x = (-x) neg x = -x neg x = -x weird :: Int -> Int -> Int weird x y = x - y pat = \case -1 -> 1 pat = \case -1 -> 1 ormolu-0.7.2.0/data/examples/declaration/value/function/negation.hs0000644000000000000000000000032107346545000023475 0ustar0000000000000000foo :: Int foo = (-2) bar :: Int bar = -2 baz :: Int baz = - 2 neg :: Int -> Int neg x = (- x) neg x = - x neg x = -x weird :: Int -> Int -> Int weird x y = x -y pat = \case -1 -> 1 pat = \case - 1 -> 1 ormolu-0.7.2.0/data/examples/declaration/value/function/negative-literals-out.hs0000644000000000000000000000016607346545000026124 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = -x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 ormolu-0.7.2.0/data/examples/declaration/value/function/negative-literals.hs0000644000000000000000000000016707346545000025320 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = - x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 ormolu-0.7.2.0/data/examples/declaration/value/function/newline-single-line-body-out.hs0000644000000000000000000000036207346545000027303 0ustar0000000000000000function :: Int -> Int function a = aReallyLongFunctionNameThatShouldStayOnThisLineToAvoidOverflowing 10000 a function' :: String -> String function' s = case s of "ThisString" -> -- And a comment here is okay "Yay" _ -> "Boo" ormolu-0.7.2.0/data/examples/declaration/value/function/newline-single-line-body.hs0000644000000000000000000000037007346545000026475 0ustar0000000000000000function :: Int -> Int function a = aReallyLongFunctionNameThatShouldStayOnThisLineToAvoidOverflowing 10000 a function' :: String -> String function' s = case s of "ThisString" -> -- And a comment here is okay "Yay" _ -> "Boo" ormolu-0.7.2.0/data/examples/declaration/value/function/operator-comments-0-out.hs0000644000000000000000000000030707346545000026315 0ustar0000000000000000foo = bar ++ {- some comment -} case foo of a -> a foo = bar ++ {- some comment -} case foo of a -> a foo = bar ++ case foo {- some comment -} of a -> a ormolu-0.7.2.0/data/examples/declaration/value/function/operator-comments-0.hs0000644000000000000000000000031107346545000025503 0ustar0000000000000000foo = bar ++ {- some comment -} case foo of a -> a foo = bar ++ {- some comment -} case foo of a -> a foo = bar ++ case foo of {- some comment -} a -> a ormolu-0.7.2.0/data/examples/declaration/value/function/operator-comments-1-out.hs0000644000000000000000000000027607346545000026323 0ustar0000000000000000foo = bar ++ -- some comment case foo of a -> a foo = bar ++ case foo of -- some comment a -> a foo = bar ++ case foo of -- some comment a -> a ormolu-0.7.2.0/data/examples/declaration/value/function/operator-comments-1.hs0000644000000000000000000000030007346545000025502 0ustar0000000000000000foo = bar ++ -- some comment case foo of a -> a foo = bar ++ -- some comment case foo of a -> a foo = bar ++ case foo of -- some comment a -> a ormolu-0.7.2.0/data/examples/declaration/value/function/operator-comments-2-out.hs0000644000000000000000000000007707346545000026323 0ustar0000000000000000x = y ++ f g -- commentA -- commentB -- commentC ormolu-0.7.2.0/data/examples/declaration/value/function/operator-comments-2.hs0000644000000000000000000000007607346545000025515 0ustar0000000000000000x = y ++ -- commentA -- commentB f g -- commentC ormolu-0.7.2.0/data/examples/declaration/value/function/operator-fixity-defaulting-out.hs0000644000000000000000000000030507346545000027765 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 ormolu-0.7.2.0/data/examples/declaration/value/function/operator-fixity-defaulting.hs0000644000000000000000000000031307346545000027157 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 ormolu-0.7.2.0/data/examples/declaration/value/function/operator-hash-with-unboxed-sums-out.hs0000644000000000000000000000016007346545000030653 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) ormolu-0.7.2.0/data/examples/declaration/value/function/operator-hash-with-unboxed-sums.hs0000644000000000000000000000016007346545000030046 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) ormolu-0.7.2.0/data/examples/declaration/value/function/operator-hash-without-unboxed-sums-out.hs0000644000000000000000000000011407346545000031402 0ustar0000000000000000module Foo ((#<|)) where (#<|) :: Int -> Int -> Int (#<|) = (+) (+) = (+) ormolu-0.7.2.0/data/examples/declaration/value/function/operator-hash-without-unboxed-sums.hs0000644000000000000000000000012207346545000030574 0ustar0000000000000000module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) ormolu-0.7.2.0/data/examples/declaration/value/function/operator-sections-out.hs0000644000000000000000000000016507346545000026164 0ustar0000000000000000foo = (0 +) bar = (<> "hello") baz = ( 1 * 2 + ) ( * 3 ^ 5 ) quux = (,) <$> foo <$> bar ormolu-0.7.2.0/data/examples/declaration/value/function/operator-sections.hs0000644000000000000000000000015707346545000025360 0ustar0000000000000000foo = (0 +) bar = ( <> "hello" ) baz = ( 1 * 2 + ) ( * 3 ^ 5) quux = (,) <$> foo <$> bar ormolu-0.7.2.0/data/examples/declaration/value/function/operators-0-out.hs0000644000000000000000000000012107346545000024647 0ustar0000000000000000import Control.Lens.Operators a = b & c .~ d & e %~ f g ormolu-0.7.2.0/data/examples/declaration/value/function/operators-0.hs0000644000000000000000000000011307346545000024043 0ustar0000000000000000import Control.Lens.Operators a = b & c .~ d & e %~ f g ormolu-0.7.2.0/data/examples/declaration/value/function/operators-1-out.hs0000644000000000000000000000004007346545000024650 0ustar0000000000000000foo = f . g =<< h . i ormolu-0.7.2.0/data/examples/declaration/value/function/operators-1.hs0000644000000000000000000000003407346545000024046 0ustar0000000000000000foo = f . g =<< h . i ormolu-0.7.2.0/data/examples/declaration/value/function/operators-2-out.hs0000644000000000000000000000010707346545000024655 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 ormolu-0.7.2.0/data/examples/declaration/value/function/operators-2.hs0000644000000000000000000000007507346545000024054 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 ormolu-0.7.2.0/data/examples/declaration/value/function/operators-3-out.hs0000644000000000000000000000016207346545000024657 0ustar0000000000000000import Control.Arrow foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc ormolu-0.7.2.0/data/examples/declaration/value/function/operators-3.hs0000644000000000000000000000014607346545000024054 0ustar0000000000000000import Control.Arrow foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc ormolu-0.7.2.0/data/examples/declaration/value/function/operators-4-out.hs0000644000000000000000000000017107346545000024660 0ustar0000000000000000import Control.Arrow foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs ormolu-0.7.2.0/data/examples/declaration/value/function/operators-4.hs0000644000000000000000000000015507346545000024055 0ustar0000000000000000import Control.Arrow foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs ormolu-0.7.2.0/data/examples/declaration/value/function/operators-5-out.hs0000644000000000000000000000006007346545000024656 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux ormolu-0.7.2.0/data/examples/declaration/value/function/operators-5.hs0000644000000000000000000000005207346545000024052 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux ormolu-0.7.2.0/data/examples/declaration/value/function/operators-6-out.hs0000644000000000000000000000031307346545000024660 0ustar0000000000000000import Servant.API type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) ormolu-0.7.2.0/data/examples/declaration/value/function/operators-6.hs0000644000000000000000000000033207346545000024054 0ustar0000000000000000import Servant.API type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) ormolu-0.7.2.0/data/examples/declaration/value/function/operators-7-out.hs0000644000000000000000000000004207346545000024660 0ustar0000000000000000foo c = case c of { _ -> c } : [] ormolu-0.7.2.0/data/examples/declaration/value/function/operators-7.hs0000644000000000000000000000003607346545000024056 0ustar0000000000000000foo c = case c of {_->c} : [] ormolu-0.7.2.0/data/examples/declaration/value/function/overindentation-out.hs0000644000000000000000000000026707346545000025717 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } ormolu-0.7.2.0/data/examples/declaration/value/function/overindentation.hs0000644000000000000000000000022307346545000025102 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } ormolu-0.7.2.0/data/examples/declaration/value/function/overloaded-labels-out.hs0000644000000000000000000000147707346545000026077 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this) (#that) baz = #Foo #"Hello world!" #"\"" #3 #"\n" -- from https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.6.1-alpha3/testsuite/tests/overloadedrecflds/should_run/T11671_run.hs -- unnecessary once https://github.com/tweag/ormolu/issues/821 lands main = traverse_ putStrLn [ #a, #number17, #do, #type, #Foo, #3, #"199.4", #17a23b, #f'a', #'a', #', #''notTHSplice, #"...", #привет, #こんにちは, #"3", #":", #"Foo", #"The quick brown fox", #"\"", (++) #hello #world, (++) #"hello" #"world", #"hello" # 1, -- equivalent to `(fromLabel @"hello") # 1` f "hello" #2 -- equivalent to `f ("hello"# :: Addr#) 2` ] ormolu-0.7.2.0/data/examples/declaration/value/function/overloaded-labels.hs0000644000000000000000000000135407346545000025264 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this ) ( #that) baz = #Foo #"Hello world!" #"\"" #3 #"\n" -- from https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.6.1-alpha3/testsuite/tests/overloadedrecflds/should_run/T11671_run.hs -- unnecessary once https://github.com/tweag/ormolu/issues/821 lands main = traverse_ putStrLn [ #a , #number17 , #do , #type , #Foo , #3 , #"199.4" , #17a23b , #f'a' , #'a' , #' , #''notTHSplice , #"..." , #привет , #こんにちは , #"3" , #":" , #"Foo" , #"The quick brown fox" , #"\"" , (++) #hello#world , (++) #"hello"#"world" , #"hello"# 1 -- equivalent to `(fromLabel @"hello") # 1` , f "hello"#2 -- equivalent to `f ("hello"# :: Addr#) 2` ] ormolu-0.7.2.0/data/examples/declaration/value/function/parallel-comprehensions-complex-out.hs0000644000000000000000000000111007346545000030766 0ustar0000000000000000baz x y z w = [ ( a, b, c, d, e, f, g, h, i, j ) | a <- -- Foo 1 x, -- Foo 2 b <- -- Bar 1 y, -- Bar 2 a `mod` b -- Value == 0 | c <- -- Baz 1 z * z -- Baz 2 -- Baz 3 | d <- w -- Other | e <- x * x -- Foo bar | f <- -- Foo baz 1 y + y -- Foo baz 2 | h <- z + z * w ^ 2 -- Bar foo | i <- -- Bar bar 1 a + b, -- Bar bar 2 -- Bar bar 3 j <- -- Bar baz 1 a + b -- Bar baz 2 ] ormolu-0.7.2.0/data/examples/declaration/value/function/parallel-comprehensions-complex.hs0000644000000000000000000000151207346545000030167 0ustar0000000000000000baz x y z w = [ (a,b,c,d,e, f,g,h,i,j) | a<- -- Foo 1 x, -- Foo 2 b<- -- Bar 1 y, -- Bar 2 a `mod` b -- Value == 0| c<- -- Baz 1 z * -- Baz 2 z| -- Baz 3 d<- w | -- Other e <- x * x | -- Foo bar f -- Foo baz 1 <- y + y | -- Foo baz 2 h <- z + z * w ^ 2 | -- Bar foo i <- -- Bar bar 1 a + -- Bar bar 2 b, -- Bar bar 3 j <- -- Bar baz 1 a + b -- Bar baz 2 ] ormolu-0.7.2.0/data/examples/declaration/value/function/parallel-comprehensions-single-line-out.hs0000644000000000000000000000016607346545000031537 0ustar0000000000000000foo x y = [(a, b) | a <- x | b <- y] bar x y z w = [(a, b, c, d) | a <- x, b <- y, a `mod` b == 0 | c <- z | d <- w] ormolu-0.7.2.0/data/examples/declaration/value/function/parallel-comprehensions-single-line.hs0000644000000000000000000000014507346545000030727 0ustar0000000000000000foo x y = [(a,b) | a<-x | b<-y] bar x y z w = [(a,b,c,d) | a<-x, b<-y, a`mod`b == 0|c<-z|d<-w ] ormolu-0.7.2.0/data/examples/declaration/value/function/parens-out.hs0000644000000000000000000000003007346545000023763 0ustar0000000000000000f = p (do foo; bar) baz ormolu-0.7.2.0/data/examples/declaration/value/function/parens.hs0000644000000000000000000000003007346545000023156 0ustar0000000000000000f = p (do foo; bar) baz ormolu-0.7.2.0/data/examples/declaration/value/function/parenthesis-lhs-out.hs0000644000000000000000000000017307346545000025614 0ustar0000000000000000(!=!) 2 y = 1 x !=! y = 2 x ?=? [] = 123 (?=?) x (_ : []) = 456 x ?=? _ = f x x where f x 7 = 789 x `f` _ = 101 ormolu-0.7.2.0/data/examples/declaration/value/function/parenthesis-lhs.hs0000644000000000000000000000020307346545000025001 0ustar0000000000000000(!=!) 2 y = 1 x !=! y = 2 x ?=? [] = 123 (?=?) x (_:[]) = 456 x ?=? _ = f x x where f x 7 = 789 x `f` _ = 101 ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/0000755000000000000000000000000007346545000023016 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/as-pattern-out.hs0000644000000000000000000000010507346545000026231 0ustar0000000000000000main = case [1] of xs@(x : _) -> print (x, xs) xs@[] -> print xs ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/as-pattern.hs0000644000000000000000000000010307346545000025422 0ustar0000000000000000main = case [1] of xs@(x:_) -> print (x, xs) xs@[] -> print xs ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/famous-cardano-pattern-out.hs0000644000000000000000000000026207346545000030531 0ustar0000000000000000( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ) :<|> ( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/famous-cardano-pattern.hs0000644000000000000000000000024007346545000027720 0ustar0000000000000000( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ):<|>( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/many-guards-in-singleline-out.hs0000644000000000000000000000014507346545000031141 0ustar0000000000000000foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/many-guards-in-singleline.hs0000644000000000000000000000014507346545000030334 0ustar0000000000000000foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/multiline-case-pattern-out.hs0000644000000000000000000000041007346545000030540 0ustar0000000000000000readerBench doc name = runPure $ case (getReader name, getWriter name) of ( Right (TextReader r, rexts), Right (TextWriter w, wexts) ) -> undefined f xs = case xs of [ a, b ] -> a + b g xs = case xs of ( a : bs ) -> a + b ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/multiline-case-pattern.hs0000644000000000000000000000037207346545000027742 0ustar0000000000000000readerBench doc name = runPure $ case (getReader name, getWriter name) of (Right (TextReader r, rexts), Right (TextWriter w, wexts)) -> undefined f xs = case xs of [ a, b ] -> a + b g xs = case xs of (a: bs) -> a + b ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/multiline-guard-statement-out.hs0000644000000000000000000000014107346545000031257 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/multiline-guard-statement.hs0000644000000000000000000000012507346545000030454 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/multiple-guard-statements-out.hs0000644000000000000000000000014707346545000031301 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5, y <- 6 = case x of 5 -> True _ -> False ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/multiple-guard-statements.hs0000644000000000000000000000013107346545000030465 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5, y <- 6 = case x of 5 -> True _ -> False ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern-out.hs0000644000000000000000000000022607346545000027300 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline ( n + 1 ) = n n :: Int (n + 1) = 3 ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern.hs0000644000000000000000000000021007346545000026464 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline(n + 1) = n n :: Int (n + 1) = 3 ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/pattern-bind-out.hs0000644000000000000000000000015407346545000026546 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/pattern-bind.hs0000644000000000000000000000015107346545000025736 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern-out.hs0000644000000000000000000000024507346545000030273 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern.hs0000644000000000000000000000024607346545000027467 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/record-patterns-out.hs0000644000000000000000000000041107346545000027267 0ustar0000000000000000foo :: Boom -> Int foo Boom {..} = 10 bar0 :: Boom -> Int bar0 Boom {boom} = boom bar1 :: Boom -> Int bar1 Boom {boom = b} = b baz :: Boom -> Int baz Boom {boom = b, ..} = b quux :: Boom -> Int quux Boom { boom = a, foom = b, .. } = a + b ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/record-patterns.hs0000644000000000000000000000040107346545000026461 0ustar0000000000000000foo :: Boom -> Int foo Boom {..} = 10 bar0 :: Boom -> Int bar0 Boom {boom} = boom bar1 :: Boom -> Int bar1 Boom { boom = b } = b baz :: Boom -> Int baz Boom { boom = b, .. } = b quux :: Boom -> Int quux Boom { boom = a , foom = b , .. } = a + b ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/sig-pattern-out.hs0000644000000000000000000000007507346545000026416 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/sig-pattern.hs0000644000000000000000000000010107346545000025577 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/splice-pattern-out.hs0000644000000000000000000000027007346545000027110 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $( x + y ) -> () $( y "something" ) -> () ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/splice-pattern.hs0000644000000000000000000000025207346545000026303 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $(x + y) -> () $(y "something") -> () ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/strictness-out.hs0000644000000000000000000000006007346545000026354 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/strictness.hs0000644000000000000000000000005707346545000025555 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern-out.hs0000644000000000000000000000050507346545000030100 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} v = True where (# _x #) = (# True #) p = True where (# _x | #) = (# | True #) q = True where (# | _x | #) = (# | True | #) z = True where (# | | _x #) = (# | | True #) z_multiline = True where (# | | _x #) = (# | | True #) ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern.hs0000644000000000000000000000047207346545000027276 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} v = True where (# _x #) = (# True #) p = True where (# _x | #) = (# | True #) q = True where (# | _x | #) = (# | True | #) z = True where (# | | _x #) = (# | | True #) z_multiline = True where (# | | _x #) = (# | | True #) ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/view-pattern-out.hs0000644000000000000000000000031607346545000026604 0ustar0000000000000000{-# LANGUAGE ViewPatterns #-} example f (f -> 4) = True f (t -> Nothing) = "Nothing" f (t -> Just _) = "Just" g ((f, _), f -> 4) = True multiline ( t -> Foo bar baz ) = True ormolu-0.7.2.0/data/examples/declaration/value/function/pattern/view-pattern.hs0000644000000000000000000000033407346545000025777 0ustar0000000000000000{-# LANGUAGE ViewPatterns #-} example f ( f -> 4 ) = True f (t -> Nothing) = "Nothing" f (t -> Just _) = "Just" g ((f, _), f -> 4) = True multiline (t -> Foo bar baz) = True ormolu-0.7.2.0/data/examples/declaration/value/function/pragmas-out.hs0000644000000000000000000000052607346545000024137 0ustar0000000000000000sccfoo = {-# SCC foo #-} 1 sccbar = {-# SCC "barbaz" #-} "hello" foo = do {-# SCC "foo" #-} fmap succ $ do {-# SCC "bar" #-} pure 1 -- CORE pragma got removed in https://gitlab.haskell.org/ghc/ghc/-/commit/12f9035200424ec8104484f154a040d612fee99d corefoo = {-# CORE "foo"#-} 1 corebar = {-# CORE "bar baz"#-} "hello" ormolu-0.7.2.0/data/examples/declaration/value/function/pragmas.hs0000644000000000000000000000051207346545000023325 0ustar0000000000000000sccfoo = {-# SCC foo#-} 1 sccbar = {-# SCC "barbaz"#-} "hello" foo = do {-# SCC "foo" #-} fmap succ $ do {-# SCC "bar" #-} pure 1 -- CORE pragma got removed in https://gitlab.haskell.org/ghc/ghc/-/commit/12f9035200424ec8104484f154a040d612fee99d corefoo = {-# CORE "foo"#-} 1 corebar = {-# CORE "bar baz"#-} "hello" ormolu-0.7.2.0/data/examples/declaration/value/function/prefix-out.hs0000644000000000000000000000002207346545000023771 0ustar0000000000000000foo x y = (+) x y ormolu-0.7.2.0/data/examples/declaration/value/function/prefix.hs0000644000000000000000000000002207346545000023164 0ustar0000000000000000foo x y = (+) x y ormolu-0.7.2.0/data/examples/declaration/value/function/quasi-quotes-out.hs0000644000000000000000000000025007346545000025137 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] ormolu-0.7.2.0/data/examples/declaration/value/function/quasi-quotes.hs0000644000000000000000000000024507346545000024336 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] ormolu-0.7.2.0/data/examples/declaration/value/function/record/0000755000000000000000000000000007346545000022617 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/function/record/constructors-out.hs0000644000000000000000000000116307346545000026531 0ustar0000000000000000foo = Foo {a = 3} bar = Bar { abc = foo, def = Foo {a = 10} } baz = Baz {} sym = Foo {(+) = 3} aLongVariableName = ALongRecordName { short = baz, aLongRecordFieldName = YetAnotherLongRecordName { yetAnotherLongRecordFieldName = "a long string" }, aLongRecordFieldName2 = Just YetAnotherLongRecordName { yetAnotherLongRecordFieldName = "a long string", yetAnotherLongRecordFieldName = Just "a long string" }, aLongRecordFieldName3 = do foo bar } ormolu-0.7.2.0/data/examples/declaration/value/function/record/constructors.hs0000644000000000000000000000134307346545000025724 0ustar0000000000000000foo = Foo { a = 3 } bar = Bar { abc = foo, def = Foo {a = 10} } baz = Baz{ } sym = Foo { (+) = 3 } aLongVariableName = ALongRecordName { short = baz, aLongRecordFieldName = YetAnotherLongRecordName { yetAnotherLongRecordFieldName = "a long string" }, aLongRecordFieldName2 = Just YetAnotherLongRecordName { yetAnotherLongRecordFieldName = "a long string", yetAnotherLongRecordFieldName = Just "a long string" }, aLongRecordFieldName3 = do foo bar } ormolu-0.7.2.0/data/examples/declaration/value/function/record/hanging-after-equal-con-out.hs0000644000000000000000000000015507346545000030355 0ustar0000000000000000foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.7.2.0/data/examples/declaration/value/function/record/hanging-after-equal-con.hs0000644000000000000000000000012707346545000027547 0ustar0000000000000000foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.7.2.0/data/examples/declaration/value/function/record/hanging-after-equal-update-out.hs0000644000000000000000000000015507346545000031060 0ustar0000000000000000foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.7.2.0/data/examples/declaration/value/function/record/hanging-after-equal-update.hs0000644000000000000000000000012707346545000030252 0ustar0000000000000000foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.7.2.0/data/examples/declaration/value/function/record/inter-comments-out.hs0000644000000000000000000000014507346545000026724 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } ormolu-0.7.2.0/data/examples/declaration/value/function/record/inter-comments.hs0000644000000000000000000000011507346545000026114 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } ormolu-0.7.2.0/data/examples/declaration/value/function/record/record-dot-out.hs0000644000000000000000000000050307346545000026020 0ustar0000000000000000{-# LANGUAGE OverloadedRecordDot #-} {-# LANGUAGE OverloadedRecordUpdate #-} data Foo = Foo {bar :: Foo} mfoo = fmap (.bar) $ Nothing bar = (Foo 1).bar fooplus f n = f {foo = f.bar + n} nestedFoo f = f.bar.bar.bar.bar.bar nestedFooUpdate f = f {bar.bar = f.bar} <> f {bar.bar.bar.bar} operatorUpdate f = f {(+) = 1} ormolu-0.7.2.0/data/examples/declaration/value/function/record/record-dot.hs0000644000000000000000000000051307346545000025214 0ustar0000000000000000{-# LANGUAGE OverloadedRecordDot #-} {-# LANGUAGE OverloadedRecordUpdate #-} data Foo = Foo { bar :: Foo } mfoo = fmap (.bar) $ Nothing bar = ( Foo 1).bar fooplus f n = f{foo = f.bar + n} nestedFoo f = f.bar.bar.bar.bar.bar nestedFooUpdate f = f {bar.bar = f.bar } <> f {bar.bar.bar.bar} operatorUpdate f = f { (+) = 1 } ormolu-0.7.2.0/data/examples/declaration/value/function/record/updaters-out.hs0000644000000000000000000000016207346545000025606 0ustar0000000000000000foo x = x {a = 3} bar x = x { abc = foo, def = Foo {a = 10} } baz x = x {} sym x = x {(+) = 4} ormolu-0.7.2.0/data/examples/declaration/value/function/record/updaters.hs0000644000000000000000000000015307346545000025001 0ustar0000000000000000foo x = x { a = 3 } bar x = x { abc = foo, def = Foo {a = 10} } baz x = x{ } sym x = x { (+) = 4 } ormolu-0.7.2.0/data/examples/declaration/value/function/record/wildcards-out.hs0000644000000000000000000000024407346545000025734 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo {x, y} bar x y z = Bar { x, y, z, .. } baz = Baz {..} ormolu-0.7.2.0/data/examples/declaration/value/function/record/wildcards.hs0000644000000000000000000000023407346545000025126 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo { x, y } bar x y z = Bar { x, y, z, .. } baz = Baz { .. } ormolu-0.7.2.0/data/examples/declaration/value/function/simple-out.hs0000644000000000000000000000002307346545000023766 0ustar0000000000000000bar x = x baz = x ormolu-0.7.2.0/data/examples/declaration/value/function/simple.hs0000644000000000000000000000002207346545000023160 0ustar0000000000000000bar x = x baz = x ormolu-0.7.2.0/data/examples/declaration/value/function/splice-out.hs0000644000000000000000000000016107346545000023757 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") ormolu-0.7.2.0/data/examples/declaration/value/function/splice.hs0000644000000000000000000000016107346545000023152 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") ormolu-0.7.2.0/data/examples/declaration/value/function/static-pointers-out.hs0000644000000000000000000000032607346545000025633 0ustar0000000000000000{-# LANGUAGE StaticPointers #-} foo :: StaticPtr Int foo = static 5 bar :: StaticPtr [Int] bar = static [ 1, 2, 3 ] baz :: StaticPtr Bool baz = static ( fun 1 2 ) ormolu-0.7.2.0/data/examples/declaration/value/function/static-pointers.hs0000644000000000000000000000031707346545000025026 0ustar0000000000000000{-# LANGUAGE StaticPointers #-} foo :: StaticPtr Int foo = static 5 bar :: StaticPtr [Int] bar = static [ 1 , 2, 3 ] baz :: StaticPtr Bool baz = static (fun 1 2) ormolu-0.7.2.0/data/examples/declaration/value/function/strings-out.hs0000644000000000000000000000013707346545000024174 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&barbaz" baz = "foo\ \bar\ \baz" ormolu-0.7.2.0/data/examples/declaration/value/function/strings.hs0000644000000000000000000000014607346545000023367 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&bar\ \baz" baz = "foo\ \bar\ \baz" ormolu-0.7.2.0/data/examples/declaration/value/function/tricky-parens-out.hs0000644000000000000000000000006007346545000025271 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) ormolu-0.7.2.0/data/examples/declaration/value/function/tricky-parens.hs0000644000000000000000000000006007346545000024464 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) ormolu-0.7.2.0/data/examples/declaration/value/function/tuple-sections-out.hs0000644000000000000000000000011607346545000025456 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = (,,5,6,7,,,) ormolu-0.7.2.0/data/examples/declaration/value/function/tuple-sections.hs0000644000000000000000000000012707346545000024653 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = ( ,,5,6, 7,,, ) ormolu-0.7.2.0/data/examples/declaration/value/function/tuples-out.hs0000644000000000000000000000017707346545000024023 0ustar0000000000000000foo = (1, 2, 3) bar = ( 1, 2, 3 ) handleStuff = ( let foo = foo in foo, let bar = bar in bar ) ormolu-0.7.2.0/data/examples/declaration/value/function/tuples.hs0000644000000000000000000000017707346545000023216 0ustar0000000000000000foo = ( 1,2,3 ) bar = ( 1, 2, 3 ) handleStuff = ( let foo = foo in foo , let bar = bar in bar ) ormolu-0.7.2.0/data/examples/declaration/value/function/type-applications-and-splice-out.hs0000644000000000000000000000015707346545000030167 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [|sing @ $(symFQN name)|] ormolu-0.7.2.0/data/examples/declaration/value/function/type-applications-and-splice.hs0000644000000000000000000000016107346545000027355 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [| sing @ $(symFQN name) |] ormolu-0.7.2.0/data/examples/declaration/value/function/type-applications-out.hs0000644000000000000000000000045707346545000026155 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} foo = f @String a b c bar = f @(Maybe Int) a b baz = f @Int @String a b goo = hash @(HASH TPraosStandardCrypto) @ByteString "And the lamb lies down on Broadway" test x = case x of Foo @t -> show @t 0 Bar @t @u v -> "" ormolu-0.7.2.0/data/examples/declaration/value/function/type-applications.hs0000644000000000000000000000042507346545000025343 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} foo = f @String a b c bar = f @(Maybe Int) a b baz = f @Int @String a b goo = hash @(HASH TPraosStandardCrypto) @ByteString "And the lamb lies down on Broadway" test x = case x of Foo @t -> show @t 0 Bar @t @u v -> "" ormolu-0.7.2.0/data/examples/declaration/value/function/typed-expressions-out.hs0000644000000000000000000000006707346545000026212 0ustar0000000000000000foo x = x :: Int bar x = Just x :: Maybe String ormolu-0.7.2.0/data/examples/declaration/value/function/typed-expressions.hs0000644000000000000000000000006007346545000025376 0ustar0000000000000000foo x = x::Int bar x = Just x :: Maybe String ormolu-0.7.2.0/data/examples/declaration/value/function/typed-hole-out.hs0000644000000000000000000000006507346545000024555 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ ormolu-0.7.2.0/data/examples/declaration/value/function/typed-hole.hs0000644000000000000000000000006507346545000023750 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ ormolu-0.7.2.0/data/examples/declaration/value/function/unboxed-string-lit-out.hs0000644000000000000000000000005407346545000026237 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# ormolu-0.7.2.0/data/examples/declaration/value/function/unboxed-string-lit.hs0000644000000000000000000000005407346545000025432 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# ormolu-0.7.2.0/data/examples/declaration/value/function/unboxed-sums-out.hs0000644000000000000000000000044707346545000025140 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} foo :: (# Int | Bool #) foo = (# 1 | #) bar :: (# Int | Int | Int | Int #) bar = (# | | 2 | #) baz :: (# Int | Int | Int | Int | Int | Int | Int | Int | Int #) baz = (# | | | 10 | | | | | #) type UbxPair = (# | #) ormolu-0.7.2.0/data/examples/declaration/value/function/unboxed-sums.hs0000644000000000000000000000036507346545000024332 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} foo :: (# Int|Bool #) foo = (# 1 | #) bar :: (#Int|Int|Int|Int #) bar = (# | |2| #) baz :: (# Int | Int | Int | Int | Int | Int | Int | Int | Int #) baz = (# | | | 10 | | | | | #) type UbxPair = (# | #) ormolu-0.7.2.0/data/examples/declaration/value/function/unboxed-tuples-out.hs0000644000000000000000000000016507346545000025462 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1, 2, 3 #) bar = (# 1, 2, 3 #) unit :: (# #) unit = (# #) ormolu-0.7.2.0/data/examples/declaration/value/function/unboxed-tuples.hs0000644000000000000000000000015407346545000024653 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1,2,3 #) bar = (# 1, 2, 3 #) unit :: (##) unit = (##) ormolu-0.7.2.0/data/examples/declaration/value/function/where-nested-out.hs0000644000000000000000000000027107346545000025074 0ustar0000000000000000foo = bar where f1 = f1 where f1 = 3 f2 = f2 where f2 = 3 foo2 = bar where f1 = f1 where { f1 = 3; f1' = 4 }; f2 = f2 where f2 = 3; f2' = 4 ormolu-0.7.2.0/data/examples/declaration/value/function/where-nested.hs0000644000000000000000000000030007346545000024260 0ustar0000000000000000foo = bar where f1 = f1 where f1 = 3 f2 = f2 where f2 = 3 foo2 = bar where { f1 = f1 where { f1 = 3; f1' = 4 }; f2 = f2 where { f2 = 3; f2' = 4 } } ormolu-0.7.2.0/data/examples/declaration/value/function/where-out.hs0000644000000000000000000000034007346545000023611 0ustar0000000000000000foo :: Int -> Int foo x = f x where f z = z bar :: Int -> Int bar x = f x where f :: Int -> Int f z = z baz :: Int -> Int baz x = q where y = x z = y q = z emptyWhere :: Int emptyWhere = 5 where ormolu-0.7.2.0/data/examples/declaration/value/function/where.hs0000644000000000000000000000034007346545000023004 0ustar0000000000000000foo :: Int -> Int foo x = f x where f z = z bar :: Int -> Int bar x = f x where f :: Int -> Int f z = z baz :: Int -> Int baz x = q where y = x z = y q = z emptyWhere :: Int emptyWhere = 5 where ormolu-0.7.2.0/data/examples/declaration/value/other/0000755000000000000000000000000007346545000020635 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/other/comments-get-before-op-out.hs0000644000000000000000000000034007346545000026251 0ustar0000000000000000main :: IO () main = do migrateSchema [ migration1, migration1, migration3 -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Data ] `finally` Log.close ormolu-0.7.2.0/data/examples/declaration/value/other/comments-get-before-op.hs0000644000000000000000000000037607346545000025455 0ustar0000000000000000main :: IO () main = do migrateSchema [ migration1 , migration1 , migration3 -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Data ] `finally` Log.close ormolu-0.7.2.0/data/examples/declaration/value/other/line-multi-line-out.hs0000644000000000000000000000007207346545000025001 0ustar0000000000000000x :: [Int] x = [ 1, 2, somethingSomething 3 ] ormolu-0.7.2.0/data/examples/declaration/value/other/line-multi-line.hs0000644000000000000000000000007007346545000024172 0ustar0000000000000000x :: [Int] x = [ 1 , 2 , somethingSomething 3 ] ormolu-0.7.2.0/data/examples/declaration/value/other/line-single-line-out.hs0000644000000000000000000000003107346545000025123 0ustar0000000000000000x :: [Int] x = [1, 2, 3] ormolu-0.7.2.0/data/examples/declaration/value/other/line-single-line.hs0000644000000000000000000000002707346545000024323 0ustar0000000000000000x :: [Int] x = [1,2,3] ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/0000755000000000000000000000000007346545000023066 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/bidirectional-out.hs0000644000000000000000000000054407346545000027042 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE PatternSynonyms #-} pattern Arrow t1 t2 = App "->" [t1, t2] pattern Arrow {t1, t2} = App "->" [t1, t2] pattern Arrow { t1, t2 } = App "->" [t1, t2] pattern Int = App "Int" [] pattern Maybe {t} = App "Maybe" [t] pattern Maybe t = App "Maybe" [t] pattern a :< b <- (a, b) ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/bidirectional.hs0000644000000000000000000000056407346545000026237 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE NamedFieldPuns #-} pattern Arrow t1 t2 = App "->" [t1, t2] pattern Arrow{t1,t2} = App "->" [t1,t2] pattern Arrow{t1 , t2} = App "->" [t1, t2] pattern Int = App "Int" [] pattern Maybe{t} = App "Maybe" [t] pattern Maybe t = App "Maybe" [t] pattern a :< b <- (a , b) ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional-out.hs0000644000000000000000000000045207346545000031371 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern P a <- C a where P a = C a pattern HeadC x <- x : xs where HeadC x = [x] pattern HeadC' x <- x : xs where HeadC' x = [x] pattern Simple <- "Simple" where Simple = "Complicated" pattern a :< b <- (a, b) where a :< b = (a, b) ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional.hs0000644000000000000000000000044307346545000030564 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern P a <- C a where P a = C a pattern HeadC x <- x:xs where HeadC x = [x] pattern HeadC' x <- x:xs where HeadC' x = [x] pattern Simple <- "Simple" where Simple = "Complicated" pattern a :< b <- (a , b) where a :< b = (a, b) ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/unidirectional-out.hs0000644000000000000000000000047107346545000027242 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Head x <- x : xs pattern Head' x <- x : xs pattern Head'' {x} <- x : xs pattern FirstTwo {x, y} <- x : (y : xs) pattern FirstTwo' { x, y } <- x : (y : xs) pattern Simple <- "Simple" pattern WithTypeSig :: String pattern WithTypeSig <- "WithTypeSig" ormolu-0.7.2.0/data/examples/declaration/value/pattern-synonyms/unidirectional.hs0000644000000000000000000000046307346545000026436 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Head x <- x:xs pattern Head' x <- x:xs pattern Head''{x} <- x:xs pattern FirstTwo{x,y} <- x : (y : xs) pattern FirstTwo'{x , y} <- x : (y:xs) pattern Simple <- "Simple" pattern WithTypeSig :: String pattern WithTypeSig <- "WithTypeSig" ormolu-0.7.2.0/data/examples/declaration/warning/0000755000000000000000000000000007346545000020045 5ustar0000000000000000ormolu-0.7.2.0/data/examples/declaration/warning/warning-multiline-out.hs0000644000000000000000000000016207346545000024652 0ustar0000000000000000{-# WARNING test, foo [ "These are bad functions", "Really bad!" ] #-} test :: IO () test = pure () ormolu-0.7.2.0/data/examples/declaration/warning/warning-multiline.hs0000644000000000000000000000014407346545000024045 0ustar0000000000000000{-# WArNING test, foo ["These are bad functions", "Really bad!"] #-} test :: IO () test = pure () ormolu-0.7.2.0/data/examples/declaration/warning/warning-single-line-out.hs0000644000000000000000000000047107346545000025061 0ustar0000000000000000{-# DEPRECATED test, foo "This is a deprecation" #-} {-# WARNING test "This is a warning" #-} test :: IO () test = pure () bar = 3 {-# DEPRECATED bar "Bar is deprecated" #-} {-# DEPRECATED baz "Baz is also deprecated" #-} baz = 5 data Number = Number Dobule {-# DEPRECATED Number "Use Scientific instead." #-} ormolu-0.7.2.0/data/examples/declaration/warning/warning-single-line.hs0000644000000000000000000000050207346545000024247 0ustar0000000000000000{-# Deprecated test, foo "This is a deprecation" #-} {-# WARNING test ["This is a warning" ] #-} test :: IO () test = pure () bar = 3 {-# Deprecated bar "Bar is deprecated" #-} {-# DEPRECATED baz "Baz is also deprecated" #-} baz = 5 data Number = Number Dobule {-# DEPRECATED Number "Use Scientific instead." #-} ormolu-0.7.2.0/data/examples/import/0000755000000000000000000000000007346545000015425 5ustar0000000000000000ormolu-0.7.2.0/data/examples/import/comments-inside-imports-out.hs0000644000000000000000000000011107346545000023350 0ustar0000000000000000-- x import qualified -- x Bar import qualified -- x Baz import Foo ormolu-0.7.2.0/data/examples/import/comments-inside-imports.hs0000644000000000000000000000011707346545000022551 0ustar0000000000000000import -- x Foo import -- x qualified Bar import qualified -- x Baz ormolu-0.7.2.0/data/examples/import/comments-per-import-out.hs0000644000000000000000000000006607346545000022511 0ustar0000000000000000-- (1) import Bar -- (2) import Baz -- (3) import Foo ormolu-0.7.2.0/data/examples/import/comments-per-import.hs0000644000000000000000000000006607346545000021704 0ustar0000000000000000import Foo -- (1) import Bar -- (2) import Baz -- (3) ormolu-0.7.2.0/data/examples/import/deduplication-bug-out.hs0000644000000000000000000000025007346545000022162 0ustar0000000000000000import Foo1 (Bar1 (..), Baz1) import Foo2 (Bar2 (..), Baz2) import Foo3 (Bar3 (x1, x2, x3)) import Foo4 (Bar4 (x1, x2)) import Foo5 (Bar5 (x1)) import Foo6 (Bar6 (..)) ormolu-0.7.2.0/data/examples/import/deduplication-bug.hs0000644000000000000000000000031507346545000021357 0ustar0000000000000000import Foo1 (Bar1, Baz1, Bar1(..)) import Foo2 (Bar2(..), Baz2, Bar2) import Foo3 (Bar3(x1,x3), Bar3(x1, x2)) import Foo4 (Bar4(x1), Bar4(x2)) import Foo5 (Bar5, Bar5(x1)) import Foo6 (Bar6(x1), Bar6(..)) ormolu-0.7.2.0/data/examples/import/explicit-imports-out.hs0000644000000000000000000000031207346545000022076 0ustar0000000000000000import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad (return, (>>), (>>=)), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) ormolu-0.7.2.0/data/examples/import/explicit-imports-with-comments-out.hs0000644000000000000000000000014407346545000024675 0ustar0000000000000000import qualified MegaModule as M ( -- (1) -- (2) Either, -- (3) (<<<), (>>>), ) ormolu-0.7.2.0/data/examples/import/explicit-imports-with-comments.hs0000644000000000000000000000013107346545000024064 0ustar0000000000000000import qualified MegaModule as M ( (>>>) -- (1) , (<<<) -- (2) , Either -- (3) ) ormolu-0.7.2.0/data/examples/import/explicit-imports.hs0000644000000000000000000000023607346545000021276 0ustar0000000000000000import qualified MegaModule as M ((>>>), MonadBaseControl, void, MaybeT(..), join, Maybe(Nothing, Just), liftIO, Either, (<<<), Monad(return, (>>=), (>>))) ormolu-0.7.2.0/data/examples/import/explicit-prelude-out.hs0000644000000000000000000000004507346545000022044 0ustar0000000000000000import Aaa import Zzz import Prelude ormolu-0.7.2.0/data/examples/import/explicit-prelude.hs0000644000000000000000000000004507346545000021237 0ustar0000000000000000import Aaa import Prelude import Zzz ormolu-0.7.2.0/data/examples/import/merging-0-out.hs0000644000000000000000000000006107346545000020350 0ustar0000000000000000import Foo import Foo (bar, foo) import Foo as F ormolu-0.7.2.0/data/examples/import/merging-0.hs0000644000000000000000000000007507346545000017550 0ustar0000000000000000import Foo import Foo (foo) import Foo (bar) import Foo as F ormolu-0.7.2.0/data/examples/import/merging-1-out.hs0000644000000000000000000000006307346545000020353 0ustar0000000000000000import "bar" Foo (bar) import "foo" Foo (baz, foo) ormolu-0.7.2.0/data/examples/import/merging-1.hs0000644000000000000000000000010507346545000017543 0ustar0000000000000000import "foo" Foo (foo) import "bar" Foo (bar) import "foo" Foo (baz) ormolu-0.7.2.0/data/examples/import/merging-2-out.hs0000644000000000000000000000010107346545000020345 0ustar0000000000000000import Foo hiding (bar4, foo2) import qualified Foo (bar3, foo1) ormolu-0.7.2.0/data/examples/import/merging-2.hs0000644000000000000000000000015207346545000017546 0ustar0000000000000000import qualified Foo (foo1) import Foo hiding (foo2) import qualified Foo (bar3) import Foo hiding (bar4) ormolu-0.7.2.0/data/examples/import/misc-out.hs0000644000000000000000000000020707346545000017520 0ustar0000000000000000import A hiding ( foobarbazqux, ) import {-# SOURCE #-} safe qualified Module as M hiding (a, b, c, d, e, f) import Name hiding () ormolu-0.7.2.0/data/examples/import/misc.hs0000644000000000000000000000035607346545000016720 0ustar0000000000000000import A hiding ( foobarbazqux , foobarbazqux , foobarbazqux , foobarbazqux , foobarbazqux , foobarbazqux , foobarbazqux ) import Name hiding () import {-# SOURCE #-} safe qualified Module as M hiding (a, b, c, d, e, f) ormolu-0.7.2.0/data/examples/import/nested-explicit-imports-out.hs0000644000000000000000000000020607346545000023360 0ustar0000000000000000import qualified MegaModule as M ( Either, Monad ( return, (>>), (>>=) ), (<<<), (>>>), ) ormolu-0.7.2.0/data/examples/import/nested-explicit-imports.hs0000644000000000000000000000012707346545000022555 0ustar0000000000000000import qualified MegaModule as M ((>>>), Either, (<<<), Monad( return, (>>=), (>>))) ormolu-0.7.2.0/data/examples/import/qualified-post-out.hs0000644000000000000000000000022707346545000021515 0ustar0000000000000000{-# LANGUAGE ImportQualifiedPost #-} import Data.Text qualified (a, b, c) import Data.Text qualified hiding (a, b, c) import Data.Text qualified as T ormolu-0.7.2.0/data/examples/import/qualified-post.hs0000644000000000000000000000022707346545000020710 0ustar0000000000000000{-# LANGUAGE ImportQualifiedPost #-} import qualified Data.Text as T import qualified Data.Text (a, c, b) import Data.Text qualified hiding (c, b, a) ormolu-0.7.2.0/data/examples/import/qualified-prelude-out.hs0000644000000000000000000000011107346545000022160 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude ormolu-0.7.2.0/data/examples/import/qualified-prelude.hs0000644000000000000000000000011107346545000021353 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude ormolu-0.7.2.0/data/examples/import/simple-out.hs0000644000000000000000000000022307346545000020054 0ustar0000000000000000import Data.Text import Data.Text (a, b, c) import Data.Text hiding (a, b, c) import qualified Data.Text (a, b, c) import qualified Data.Text as T ormolu-0.7.2.0/data/examples/import/simple.hs0000644000000000000000000000035507346545000017255 0ustar0000000000000000import Data.Text import Data.Text import qualified Data.Text as T import qualified Data.Text (a, c, b) import Data.Text (a, b, c) import Data.Text hiding (c, b, a) import Data.Text (a, b, c, b, a) import Data.Text hiding (c, b, a, b, c) ormolu-0.7.2.0/data/examples/import/sorted-export-list-out.hs0000644000000000000000000000006107346545000022353 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) ormolu-0.7.2.0/data/examples/import/sorted-export-list.hs0000644000000000000000000000006107346545000021546 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) ormolu-0.7.2.0/data/examples/import/sorted-out.hs0000644000000000000000000000003307346545000020062 0ustar0000000000000000import A import B import C ormolu-0.7.2.0/data/examples/import/sorted-package-imports-out.hs0000644000000000000000000000020207346545000023144 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import D import "a" Ab import "b" Aa import "b" Bb import "c" Ba import "zzzz" Z import "this" Y ormolu-0.7.2.0/data/examples/import/sorted-package-imports.hs0000644000000000000000000000020307346545000022340 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import "b" Aa import "a" Ab import "c" Ba import D import "b" Bb import "this" Y import "zzzz" Z ormolu-0.7.2.0/data/examples/import/sorted.hs0000644000000000000000000000003307346545000017255 0ustar0000000000000000import B import A import C ormolu-0.7.2.0/data/examples/module-header/0000755000000000000000000000000007346545000016626 5ustar0000000000000000ormolu-0.7.2.0/data/examples/module-header/double-dot-with-names-out.hs0000644000000000000000000000032507346545000024077 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} module ExportSyntax (A (.., NoA), Q (F, ..), G (T, .., U)) where data A = A | B pattern NoA = B data Q a = Q a pattern F a = Q a data G = G | H pattern T = G pattern U = H ormolu-0.7.2.0/data/examples/module-header/double-dot-with-names.hs0000644000000000000000000000032007346545000023265 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} module ExportSyntax ( A(.., NoA), Q(F,..), G(T,..,U)) where data A = A | B pattern NoA = B data Q a = Q a pattern F a = Q a data G = G | H pattern T = G pattern U = H ormolu-0.7.2.0/data/examples/module-header/double-shebangs-out.hs0000644000000000000000000000005207346545000023026 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack ormolu-0.7.2.0/data/examples/module-header/double-shebangs.hs0000644000000000000000000000005207346545000022221 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack ormolu-0.7.2.0/data/examples/module-header/empty-haddock-out.hs0000644000000000000000000000002207346545000022512 0ustar0000000000000000module Test where ormolu-0.7.2.0/data/examples/module-header/empty-haddock.hs0000644000000000000000000000003207346545000021706 0ustar0000000000000000-- | -- module Test where ormolu-0.7.2.0/data/examples/module-header/empty-out.hs0000644000000000000000000000000007346545000021113 0ustar0000000000000000ormolu-0.7.2.0/data/examples/module-header/empty.hs0000644000000000000000000000000007346545000020306 0ustar0000000000000000ormolu-0.7.2.0/data/examples/module-header/leading-empty-line-out.hs0000644000000000000000000000052507346545000023455 0ustar0000000000000000-- | -- Module : Text.Megaparsec -- Copyright : © 2015–2019 Megaparsec contributors -- © 2007 Paolo Martini -- © 1999–2001 Daan Leijen -- License : FreeBSD -- -- Maintainer : Mark Karpov -- Stability : experimental -- Portability : portable module Main where ormolu-0.7.2.0/data/examples/module-header/leading-empty-line.hs0000644000000000000000000000052507346545000022650 0ustar0000000000000000-- | -- Module : Text.Megaparsec -- Copyright : © 2015–2019 Megaparsec contributors -- © 2007 Paolo Martini -- © 1999–2001 Daan Leijen -- License : FreeBSD -- -- Maintainer : Mark Karpov -- Stability : experimental -- Portability : portable module Main where ormolu-0.7.2.0/data/examples/module-header/multiline-empty-comment-out.hs0000644000000000000000000000004107346545000024560 0ustar0000000000000000module Foo ( -- test ) where ormolu-0.7.2.0/data/examples/module-header/multiline-empty-comment.hs0000644000000000000000000000005007346545000023753 0ustar0000000000000000module Foo ( -- test ) where ormolu-0.7.2.0/data/examples/module-header/multiline-empty-out.hs0000644000000000000000000000003107346545000023117 0ustar0000000000000000module Foo ( ) where ormolu-0.7.2.0/data/examples/module-header/multiline-empty.hs0000644000000000000000000000004007346545000022312 0ustar0000000000000000module Foo ( ) where ormolu-0.7.2.0/data/examples/module-header/multiline-out.hs0000644000000000000000000000006007346545000021765 0ustar0000000000000000module Foo ( foo, bar, baz, ) where ormolu-0.7.2.0/data/examples/module-header/multiline-with-comments-out.hs0000644000000000000000000000054307346545000024567 0ustar0000000000000000{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -- | Header. module My.Module ( -- * Something foo, bar, -- * Another thing (), {- some other thing -} foo2, -- yet another foo3, -- third one baz, bar2, -- a multiline comment -- the second line bar3, module Foo.Bar.Baz, ) where -- Wow ormolu-0.7.2.0/data/examples/module-header/multiline-with-comments.hs0000644000000000000000000000055007346545000023760 0ustar0000000000000000-- | Header. {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module My.Module ( -- * Something foo, bar, -- * Another thing (), {- some other thing -} foo2 -- yet another ,foo3 -- third one ,baz, bar2 -- a multiline comment -- the second line ,bar3 , module Foo.Bar.Baz ) where -- Wow ormolu-0.7.2.0/data/examples/module-header/multiline.hs0000644000000000000000000000004407346545000021162 0ustar0000000000000000module Foo ( foo, bar, baz) where ormolu-0.7.2.0/data/examples/module-header/multiline2-out.hs0000644000000000000000000000006007346545000022047 0ustar0000000000000000module Foo ( foo, bar, baz, ) where ormolu-0.7.2.0/data/examples/module-header/multiline2.hs0000644000000000000000000000004407346545000021244 0ustar0000000000000000module Foo ( foo, bar, baz) where ormolu-0.7.2.0/data/examples/module-header/named-section-out.hs0000644000000000000000000000021607346545000022514 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo, bar, ) where -- $explanation -- -- Here it goes. ormolu-0.7.2.0/data/examples/module-header/named-section.hs0000644000000000000000000000021407346545000021705 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo , bar ) where -- $explanation -- -- Here it goes. ormolu-0.7.2.0/data/examples/module-header/preceding-comment-with-haddock-out.hs0000644000000000000000000000014407346545000025732 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () ormolu-0.7.2.0/data/examples/module-header/preceding-comment-with-haddock.hs0000644000000000000000000000014407346545000025125 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () ormolu-0.7.2.0/data/examples/module-header/shebang-out.hs0000644000000000000000000000013007346545000021370 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" ormolu-0.7.2.0/data/examples/module-header/shebang-with-pragmas-out.hs0000644000000000000000000000011107346545000023770 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () ormolu-0.7.2.0/data/examples/module-header/shebang-with-pragmas.hs0000644000000000000000000000011107346545000023163 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () ormolu-0.7.2.0/data/examples/module-header/shebang.hs0000644000000000000000000000013007346545000020563 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" ormolu-0.7.2.0/data/examples/module-header/simple-out.hs0000644000000000000000000000002207346545000021252 0ustar0000000000000000module Main where ormolu-0.7.2.0/data/examples/module-header/simple-with-comments-out.hs0000644000000000000000000000005407346545000024053 0ustar0000000000000000-- | Here we go. module Main where -- Wow. ormolu-0.7.2.0/data/examples/module-header/simple-with-comments.hs0000644000000000000000000000005507346545000023247 0ustar0000000000000000-- | Here we go. module Main where -- Wow. ormolu-0.7.2.0/data/examples/module-header/simple.hs0000644000000000000000000000002207346545000020445 0ustar0000000000000000module Main where ormolu-0.7.2.0/data/examples/module-header/singleline-empty-out.hs0000644000000000000000000000006207346545000023252 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where ormolu-0.7.2.0/data/examples/module-header/singleline-empty.hs0000644000000000000000000000006207346545000022445 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where ormolu-0.7.2.0/data/examples/module-header/singleline-out.hs0000644000000000000000000000004107346545000022113 0ustar0000000000000000module Foo (foo, bar, baz) where ormolu-0.7.2.0/data/examples/module-header/singleline.hs0000644000000000000000000000004307346545000021310 0ustar0000000000000000module Foo ( foo, bar, baz ) where ormolu-0.7.2.0/data/examples/module-header/stack-header-0-out.hs0000644000000000000000000000013707346545000022460 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.7.2.0/data/examples/module-header/stack-header-0.hs0000644000000000000000000000013407346545000021650 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.7.2.0/data/examples/module-header/stack-header-1-out.hs0000644000000000000000000000016407346545000022461 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.7.2.0/data/examples/module-header/stack-header-1.hs0000644000000000000000000000016107346545000021651 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.7.2.0/data/examples/module-header/stack-header-2-out.hs0000644000000000000000000000030607346545000022460 0ustar0000000000000000#!/usr/bin/env stack {- stack script --resolver lts-6.25 --package turtle --package "stm async" --package http-client,http-conduit -} {-# LANGUAGE OverloadedStrings #-} main = return () ormolu-0.7.2.0/data/examples/module-header/stack-header-2.hs0000644000000000000000000000030607346545000021653 0ustar0000000000000000#!/usr/bin/env stack {- stack script --resolver lts-6.25 --package turtle --package "stm async" --package http-client,http-conduit -} {-# LANGUAGE OverloadedStrings #-} main = return () ormolu-0.7.2.0/data/examples/module-header/warning-pragma-list-multiline-out.hs0000644000000000000000000000023407346545000025651 0ustar0000000000000000module Test {-# DEPRECATED [ "This module is deprecated.", "Please use OtherModule instead." ] #-} ( foo, bar, baz, ) where ormolu-0.7.2.0/data/examples/module-header/warning-pragma-list-multiline.hs0000644000000000000000000000020607346545000025043 0ustar0000000000000000module Test {-# DEPRECATED ["This module is deprecated.", "Please use OtherModule instead." ]#-} ( foo , bar , baz ) where ormolu-0.7.2.0/data/examples/module-header/warning-pragma-multiline-out.hs0000644000000000000000000000014007346545000024674 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah ormolu-0.7.2.0/data/examples/module-header/warning-pragma-multiline.hs0000644000000000000000000000013607346545000024074 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah ormolu-0.7.2.0/data/examples/module-header/warning-pragma-out.hs0000644000000000000000000000011307346545000022674 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where ormolu-0.7.2.0/data/examples/module-header/warning-pragma-singleton-list-out.hs0000644000000000000000000000010007346545000025641 0ustar0000000000000000module Test {-# WARNING "There's only one line here." #-} where ormolu-0.7.2.0/data/examples/module-header/warning-pragma-singleton-list.hs0000644000000000000000000000010607346545000025042 0ustar0000000000000000module Test {-# WArnING ["There's only one line here."] #-} where ormolu-0.7.2.0/data/examples/module-header/warning-pragma.hs0000644000000000000000000000010307346545000022066 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where ormolu-0.7.2.0/data/examples/other/0000755000000000000000000000000007346545000015234 5ustar0000000000000000ormolu-0.7.2.0/data/examples/other/argument-comment-out.hs0000644000000000000000000000022607346545000021657 0ustar0000000000000000foo :: -- | Documentation Int -> Bool foo _ = True foo :: (Foo a) => -- | Foo Int -> Int foo :: (Foo a) => -- | Foo Int -> Int ormolu-0.7.2.0/data/examples/other/argument-comment.hs0000644000000000000000000000021307346545000021046 0ustar0000000000000000foo :: Int -- ^ Documentation -> Bool foo _ = True foo :: Foo a => Int -- ^ Foo -> Int foo :: Foo a => Int -- ^ Foo -> Int ormolu-0.7.2.0/data/examples/other/ascii-out.hs0000644000000000000000000000037607346545000017473 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} ormolu-0.7.2.0/data/examples/other/ascii.hs0000644000000000000000000000037607346545000016666 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} ormolu-0.7.2.0/data/examples/other/comment-after-preceding-haddock-out.hs0000644000000000000000000000013407346545000024465 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b ormolu-0.7.2.0/data/examples/other/comment-after-preceding-haddock.hs0000644000000000000000000000013407346545000023660 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b ormolu-0.7.2.0/data/examples/other/comment-alignment-out.hs0000644000000000000000000000014307346545000022011 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> -- | Something a -- | Bar. bar :: a ormolu-0.7.2.0/data/examples/other/comment-alignment.hs0000644000000000000000000000014207346545000021203 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> a -- ^ Something -- | Bar. bar :: a ormolu-0.7.2.0/data/examples/other/comment-before-hanging-out.hs0000644000000000000000000000005307346545000022706 0ustar0000000000000000x = Just -- comment do foo bar ormolu-0.7.2.0/data/examples/other/comment-before-hanging.hs0000644000000000000000000000005307346545000022101 0ustar0000000000000000x = Just -- comment do foo bar ormolu-0.7.2.0/data/examples/other/comment-empty-let-out.hs0000644000000000000000000000005407346545000021754 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 ormolu-0.7.2.0/data/examples/other/comment-empty-let.hs0000644000000000000000000000005407346545000021147 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 ormolu-0.7.2.0/data/examples/other/comment-following-preceding-gap-out.hs0000644000000000000000000000011507346545000024535 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege ormolu-0.7.2.0/data/examples/other/comment-following-preceding-gap.hs0000644000000000000000000000011507346545000023730 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege ormolu-0.7.2.0/data/examples/other/comment-glued-together-out.hs0000644000000000000000000000011307346545000022747 0ustar0000000000000000module Main (main) where -- | Foo. -- Bar main :: IO () main = return () ormolu-0.7.2.0/data/examples/other/comment-glued-together.hs0000644000000000000000000000011507346545000022144 0ustar0000000000000000module Main (main) where {- | Foo. -} -- Bar main :: IO () main = return () ormolu-0.7.2.0/data/examples/other/comment-inside-construct-out.hs0000644000000000000000000000023307346545000023330 0ustar0000000000000000xs = [ outer list item, [ inner list first item, inner list second item -- inner list last item commented ], outer list item ] ormolu-0.7.2.0/data/examples/other/comment-inside-construct.hs0000644000000000000000000000023407346545000022524 0ustar0000000000000000xs = [ outer list item, [ inner list first item, inner list second item -- inner list last item commented ], outer list item ] ormolu-0.7.2.0/data/examples/other/comment-multiline-after-out.hs0000644000000000000000000000011107346545000023127 0ustar0000000000000000foo :: -- | start index Int -> -- | length Int -> t a -> t a ormolu-0.7.2.0/data/examples/other/comment-multiline-after.hs0000644000000000000000000000010307346545000022323 0ustar0000000000000000foo :: Int {- ^ start index -} -> Int {- ^ length -} -> t a -> t a ormolu-0.7.2.0/data/examples/other/comment-spacing-out.hs0000644000000000000000000000013307346545000021456 0ustar0000000000000000-- | Something. foo :: -- | Foo. Int -> -- | Bar. IO () foo _ = pure () -- comment ormolu-0.7.2.0/data/examples/other/comment-spacing.hs0000644000000000000000000000012707346545000020654 0ustar0000000000000000-- |Something. foo :: -- |Foo. Int -> -- |Bar. IO () foo _ = pure () --comment ormolu-0.7.2.0/data/examples/other/comment-style-transform-out.hs0000644000000000000000000000043207346545000023205 0ustar0000000000000000-- | -- Module: Data.Aeson.TH -- Copyright: (c) 2011-2016 Bryan O'Sullivan -- (c) 2011 MailRank, Inc. -- License: BSD3 -- Stability: experimental -- Portability: portable module Main where -- | -- -- Here is a snippet: -- -- @ -- x = y + 2 -- @ x = y + 2 ormolu-0.7.2.0/data/examples/other/comment-style-transform.hs0000644000000000000000000000040007346545000022373 0ustar0000000000000000{-| Module: Data.Aeson.TH Copyright: (c) 2011-2016 Bryan O'Sullivan (c) 2011 MailRank, Inc. License: BSD3 Stability: experimental Portability: portable -} module Main where {- | Here is a snippet: @ x = y + 2 @ -} x = y + 2 ormolu-0.7.2.0/data/examples/other/comment-trailing-space-out.hs0000644000000000000000000000012307346545000022733 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A ormolu-0.7.2.0/data/examples/other/comment-trailing-space.hs0000644000000000000000000000012307346545000022126 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A ormolu-0.7.2.0/data/examples/other/comment-two-blocks-out.hs0000644000000000000000000000016607346545000022124 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in [ "Control" * "Monad" -- Foo -- Bar ] ormolu-0.7.2.0/data/examples/other/comment-two-blocks.hs0000644000000000000000000000017007346545000021312 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in ["Control" * "Monad" -- Foo -- Bar ] ormolu-0.7.2.0/data/examples/other/consequetive-pipe-comments-out.hs0000644000000000000000000000007307346545000023665 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 ormolu-0.7.2.0/data/examples/other/consequetive-pipe-comments.hs0000644000000000000000000000007407346545000023061 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 ormolu-0.7.2.0/data/examples/other/cpp/0000755000000000000000000000000007346545000016016 5ustar0000000000000000ormolu-0.7.2.0/data/examples/other/cpp/continuation-out.hs0000644000000000000000000000021007346545000021662 0ustar0000000000000000{-# LANGUAGE CPP #-} foo :: Int foo = 5 #define message_for(a, b) \ printf(#a " and " #b ": We love you!\n") bar :: Int bar = 6 ormolu-0.7.2.0/data/examples/other/cpp/continuation.hs0000644000000000000000000000021007346545000021055 0ustar0000000000000000{-# LANGUAGE CPP #-} foo :: Int foo = 5 #define message_for(a, b) \ printf(#a " and " #b ": We love you!\n") bar :: Int bar = 6 ormolu-0.7.2.0/data/examples/other/cpp/cpp-and-imports-out.hs0000644000000000000000000000013307346545000022171 0ustar0000000000000000{-# LANGUAGE CPP #-} module Bug where #ifdef flag constant :: Int constant = 1312 #endif ormolu-0.7.2.0/data/examples/other/cpp/cpp-and-imports.hs0000644000000000000000000000013307346545000021364 0ustar0000000000000000{-# LANGUAGE CPP #-} module Bug where #ifdef flag constant :: Int constant = 1312 #endif ormolu-0.7.2.0/data/examples/other/cpp/lonely-hash-out.hs0000644000000000000000000000041007346545000021375 0ustar0000000000000000{-# LANGUAGE CPP #-} module Main (main) where import Data.Void import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec import Text.Megaparsec.Char # if !MIN_VERSION_base(4,13,0) import Data.Semigroup ((<>)) # endif main :: IO () main = return () ormolu-0.7.2.0/data/examples/other/cpp/lonely-hash.hs0000644000000000000000000000041007346545000020570 0ustar0000000000000000{-# LANGUAGE CPP #-} module Main (main) where import Data.Void import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec import Text.Megaparsec.Char # if !MIN_VERSION_base(4,13,0) import Data.Semigroup ((<>)) # endif main :: IO () main = return () ormolu-0.7.2.0/data/examples/other/cpp/separation-0a-out.hs0000644000000000000000000000024507346545000021623 0ustar0000000000000000{-# LANGUAGE CPP #-} instance (Stream s) => Monad (ParsecT e s m) where return = pure (>>=) = pBind #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif ormolu-0.7.2.0/data/examples/other/cpp/separation-0a.hs0000644000000000000000000000024407346545000021015 0ustar0000000000000000{-# LANGUAGE CPP #-} instance Stream s => Monad (ParsecT e s m) where return = pure (>>=) = pBind #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif ormolu-0.7.2.0/data/examples/other/cpp/separation-0b-out.hs0000644000000000000000000000030107346545000021615 0ustar0000000000000000{-# LANGUAGE CPP #-} instance (Stream s) => Monad (ParsecT e s m) where return = pure (>>=) = pBind #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif foo :: Int foo = undefined ormolu-0.7.2.0/data/examples/other/cpp/separation-0b.hs0000644000000000000000000000030007346545000021007 0ustar0000000000000000{-# LANGUAGE CPP #-} instance Stream s => Monad (ParsecT e s m) where return = pure (>>=) = pBind #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif foo :: Int foo = undefined ormolu-0.7.2.0/data/examples/other/cpp/separation-1a-out.hs0000644000000000000000000000060507346545000021624 0ustar0000000000000000{-# LANGUAGE CPP #-} decompressingPipe :: (PrimMonad m, MonadThrow m, MonadResource m) => CompressionMethod -> ConduitT ByteString ByteString m () decompressingPipe Store = C.awaitForever C.yield decompressingPipe Deflate = Z.decompress $ Z.WindowBits (-15) #ifdef ENABLE_BZIP2 decompressingPipe BZip2 = BZ.bunzip2 #else decompressingPipe BZip2 = throwM BZip2Unsupported #endif ormolu-0.7.2.0/data/examples/other/cpp/separation-1a.hs0000644000000000000000000000060707346545000021021 0ustar0000000000000000{-# LANGUAGE CPP #-} decompressingPipe :: (PrimMonad m, MonadThrow m, MonadResource m) => CompressionMethod -> ConduitT ByteString ByteString m () decompressingPipe Store = C.awaitForever C.yield decompressingPipe Deflate = Z.decompress $ Z.WindowBits (-15) #ifdef ENABLE_BZIP2 decompressingPipe BZip2 = BZ.bunzip2 #else decompressingPipe BZip2 = throwM BZip2Unsupported #endif ormolu-0.7.2.0/data/examples/other/cpp/separation-1b-out.hs0000644000000000000000000000064107346545000021625 0ustar0000000000000000{-# LANGUAGE CPP #-} decompressingPipe :: (PrimMonad m, MonadThrow m, MonadResource m) => CompressionMethod -> ConduitT ByteString ByteString m () decompressingPipe Store = C.awaitForever C.yield decompressingPipe Deflate = Z.decompress $ Z.WindowBits (-15) #ifdef ENABLE_BZIP2 decompressingPipe BZip2 = BZ.bunzip2 #else decompressingPipe BZip2 = throwM BZip2Unsupported #endif foo :: Int foo = undefined ormolu-0.7.2.0/data/examples/other/cpp/separation-1b.hs0000644000000000000000000000064307346545000021022 0ustar0000000000000000{-# LANGUAGE CPP #-} decompressingPipe :: (PrimMonad m, MonadThrow m, MonadResource m) => CompressionMethod -> ConduitT ByteString ByteString m () decompressingPipe Store = C.awaitForever C.yield decompressingPipe Deflate = Z.decompress $ Z.WindowBits (-15) #ifdef ENABLE_BZIP2 decompressingPipe BZip2 = BZ.bunzip2 #else decompressingPipe BZip2 = throwM BZip2Unsupported #endif foo :: Int foo = undefined ormolu-0.7.2.0/data/examples/other/cpp/separation-2a-out.hs0000644000000000000000000000024007346545000021620 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif ormolu-0.7.2.0/data/examples/other/cpp/separation-2a.hs0000644000000000000000000000024007346545000021013 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif ormolu-0.7.2.0/data/examples/other/cpp/separation-2b-out.hs0000644000000000000000000000027407346545000021630 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif foo :: Int foo = undefined ormolu-0.7.2.0/data/examples/other/cpp/separation-2b.hs0000644000000000000000000000027407346545000021023 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif foo :: Int foo = undefined ormolu-0.7.2.0/data/examples/other/cpp/shifted-out.hs0000644000000000000000000000110307346545000020600 0ustar0000000000000000{-# LANGUAGE CPP #-} sinkData h compression = do (uncompressedSize, crc32, compressedSize) <- case compression of Store -> withCompression dataSink Deflate -> withCompression $ Z.compress 9 (Z.WindowBits (-15)) .| dataSink #ifdef ENABLE_BZIP2 BZip2 -> withCompression $ BZ.bzip2 .| dataSink #else BZip2 -> throwM BZip2Unsupported #endif return DataDescriptor { ddCRC32 = fromIntegral crc32, ddCompressedSize = compressedSize, ddUncompressedSize = uncompressedSize } ormolu-0.7.2.0/data/examples/other/cpp/shifted.hs0000644000000000000000000000105407346545000020000 0ustar0000000000000000{-# LANGUAGE CPP #-} sinkData h compression = do (uncompressedSize, crc32, compressedSize) <- case compression of Store -> withCompression dataSink Deflate -> withCompression $ Z.compress 9 (Z.WindowBits (-15)) .| dataSink #ifdef ENABLE_BZIP2 BZip2 -> withCompression $ BZ.bzip2 .| dataSink #else BZip2 -> throwM BZip2Unsupported #endif return DataDescriptor { ddCRC32 = fromIntegral crc32 , ddCompressedSize = compressedSize , ddUncompressedSize = uncompressedSize } ormolu-0.7.2.0/data/examples/other/cpp/simple-import-out.hs0000644000000000000000000000040607346545000021760 0ustar0000000000000000{-# LANGUAGE CPP #-} module Main (main) where import Data.Void import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec import Text.Megaparsec.Char #if !MIN_VERSION_base(4,13,0) import Data.Semigroup ((<>)) #endif main :: IO () main = return () ormolu-0.7.2.0/data/examples/other/cpp/simple-import.hs0000644000000000000000000000040607346545000021153 0ustar0000000000000000{-# LANGUAGE CPP #-} module Main (main) where import Data.Void import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec import Text.Megaparsec.Char #if !MIN_VERSION_base(4,13,0) import Data.Semigroup ((<>)) #endif main :: IO () main = return () ormolu-0.7.2.0/data/examples/other/disabling/0000755000000000000000000000000007346545000017170 5ustar0000000000000000ormolu-0.7.2.0/data/examples/other/disabling/closing-comment-in-disabled-region-out.hs0000644000000000000000000000004607346545000027061 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" ormolu-0.7.2.0/data/examples/other/disabling/closing-comment-in-disabled-region.hs0000644000000000000000000000004607346545000026254 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" ormolu-0.7.2.0/data/examples/other/disabling/empty-disabled-region-out.hs0000644000000000000000000000016707346545000024521 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} ormolu-0.7.2.0/data/examples/other/disabling/empty-disabled-region.hs0000644000000000000000000000016707346545000023714 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} ormolu-0.7.2.0/data/examples/other/disabling/line-pragma-in-disabled-region-out.hs0000644000000000000000000000023407346545000026156 0ustar0000000000000000module Foo (foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} ormolu-0.7.2.0/data/examples/other/disabling/line-pragma-in-disabled-region.hs0000644000000000000000000000023407346545000025351 0ustar0000000000000000module Foo(foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} ormolu-0.7.2.0/data/examples/other/disabling/normalize-magic-comments-out.hs0000644000000000000000000000021107346545000025224 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE -} {-ORMOLU_ENABLE -} bar = baz {- ORMOLU_DISABLE -} baz=foo ormolu-0.7.2.0/data/examples/other/disabling/normalize-magic-comments.hs0000644000000000000000000000022007346545000024417 0ustar0000000000000000 {-ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE-} {-ORMOLU_ENABLE -} bar=baz {- ORMOLU_DISABLE-} baz=foo ormolu-0.7.2.0/data/examples/other/disabling/preserve-empty-lines-out.hs0000644000000000000000000000014507346545000024430 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 ormolu-0.7.2.0/data/examples/other/disabling/preserve-empty-lines.hs0000644000000000000000000000014607346545000023624 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 ormolu-0.7.2.0/data/examples/other/disabling/preserve-trailing-whitespace-out.hs0000644000000000000000000000007407346545000026126 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} ormolu-0.7.2.0/data/examples/other/disabling/preserve-trailing-whitespace.hs0000644000000000000000000000007607346545000025323 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} ormolu-0.7.2.0/data/examples/other/disabling/single-definition-out.hs0000644000000000000000000000023107346545000023734 0ustar0000000000000000module Foo (foo, bar) where {- ORMOLU_DISABLE -} foo :: Int -> Int foo = (+5) {- ORMOLU_ENABLE -} bar :: Bool -> Bool bar True = True bar False = True ormolu-0.7.2.0/data/examples/other/disabling/single-definition.hs0000644000000000000000000000023107346545000023127 0ustar0000000000000000module Foo (foo,bar) where {- ORMOLU_DISABLE -} foo :: Int -> Int foo = (+5) {- ORMOLU_ENABLE -} bar :: Bool -> Bool bar True = True bar False = True ormolu-0.7.2.0/data/examples/other/disabling/suffix-comment-out.hs0000644000000000000000000000003407346545000023272 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo ormolu-0.7.2.0/data/examples/other/disabling/suffix-comment.hs0000644000000000000000000000003407346545000022465 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo ormolu-0.7.2.0/data/examples/other/disabling/whole-file-out.hs0000644000000000000000000000020607346545000022362 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True ormolu-0.7.2.0/data/examples/other/disabling/whole-file.hs0000644000000000000000000000021507346545000021555 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True ormolu-0.7.2.0/data/examples/other/empty-forall-out.hs0000644000000000000000000000035007346545000021006 0ustar0000000000000000-- Empty foralls are handled correctly in different situations. data D = forall. D Int data G where G :: forall. Int -> G f :: forall. a -> a f x = x type family T x where forall. T x = x {-# RULES "r" r a = () #-} ormolu-0.7.2.0/data/examples/other/empty-forall.hs0000644000000000000000000000035407346545000020205 0ustar0000000000000000-- Empty foralls are handled correctly in different situations. data D = forall. D Int data G where G :: forall. Int -> G f :: forall. a -> a f x = x type family T x where forall. T x = x {-# RULES "r" forall. r a = () #-} ormolu-0.7.2.0/data/examples/other/empty-haddock-out.hs0000644000000000000000000000007407346545000021127 0ustar0000000000000000module Test ( test, ) where test :: test data T = T ormolu-0.7.2.0/data/examples/other/empty-haddock.hs0000644000000000000000000000013607346545000020321 0ustar0000000000000000-- | module Test ( -- | test, ) where -- | test :: -- | test data T = T {- ^ -} ormolu-0.7.2.0/data/examples/other/following-comment-last-0-out.hs0000644000000000000000000000012107346545000023125 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. ormolu-0.7.2.0/data/examples/other/following-comment-last-0.hs0000644000000000000000000000012107346545000022320 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. ormolu-0.7.2.0/data/examples/other/following-comment-last-1-out.hs0000644000000000000000000000015407346545000023134 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more ormolu-0.7.2.0/data/examples/other/following-comment-last-1.hs0000644000000000000000000000015407346545000022327 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more ormolu-0.7.2.0/data/examples/other/following-comment-last-2-out.hs0000644000000000000000000000016407346545000023136 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B ormolu-0.7.2.0/data/examples/other/following-comment-last-2.hs0000644000000000000000000000016407346545000022331 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B ormolu-0.7.2.0/data/examples/other/following-comment-last-3-out.hs0000644000000000000000000000015007346545000023132 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. -- even on second line ormolu-0.7.2.0/data/examples/other/following-comment-last-3.hs0000644000000000000000000000015007346545000022325 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. -- even on second line ormolu-0.7.2.0/data/examples/other/haddock-sections-out.hs0000644000000000000000000000007707346545000021623 0ustar0000000000000000-- $weird #anchor# -- -- Section 1 -- $normal -- -- Section 2 ormolu-0.7.2.0/data/examples/other/haddock-sections.hs0000644000000000000000000000007707346545000021016 0ustar0000000000000000-- $weird #anchor# -- -- Section 1 -- $normal -- -- Section 2 ormolu-0.7.2.0/data/examples/other/haddock-without-module-header-out.hs0000644000000000000000000000005007346545000024177 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar ormolu-0.7.2.0/data/examples/other/haddock-without-module-header.hs0000644000000000000000000000005107346545000023373 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar ormolu-0.7.2.0/data/examples/other/inline-comment-0-out.hs0000644000000000000000000000004007346545000021442 0ustar0000000000000000x = ({-a-} b, c) y = ({-a-} b) ormolu-0.7.2.0/data/examples/other/inline-comment-0.hs0000644000000000000000000000003607346545000020642 0ustar0000000000000000x = ({-a-}b, c) y = ({-a-}b) ormolu-0.7.2.0/data/examples/other/inline-comment-1-out.hs0000644000000000000000000000056607346545000021460 0ustar0000000000000000showPs env ((n, _, Let _ t v) : bs) = " " ++ show n ++ " : " ++ showEnv env ({- normalise ctxt env -} t) ++ " = " ++ showEnv env ({- normalise ctxt env -} v) ++ "\n" ++ showPs env bs showPs env ((n, _, b) : bs) = " " ++ show n ++ " : " ++ showEnv env ({- normalise ctxt env -} (binderTy b)) ++ "\n" ++ showPs env bs ormolu-0.7.2.0/data/examples/other/inline-comment-1.hs0000644000000000000000000000054407346545000020647 0ustar0000000000000000showPs env ((n, _, Let _ t v):bs) = " " ++ show n ++ " : " ++ showEnv env ({- normalise ctxt env -} t) ++ " = " ++ showEnv env ({- normalise ctxt env -} v) ++ "\n" ++ showPs env bs showPs env ((n, _, b):bs) = " " ++ show n ++ " : " ++ showEnv env ({- normalise ctxt env -} (binderTy b)) ++ "\n" ++ showPs env bs ormolu-0.7.2.0/data/examples/other/invalid-haddock-1-out.hs0000644000000000000000000000025307346545000021554 0ustar0000000000000000test = undefined where a :: -- \** foo Int -> -- \| misplaced -- blablabla Int -- \|misplaced -- blablabla a = undefined ormolu-0.7.2.0/data/examples/other/invalid-haddock-1.hs0000644000000000000000000000025407346545000020750 0ustar0000000000000000test = undefined where a :: -- ** foo Int -> -- | misplaced -- blablabla Int -- |misplaced -- blablabla a = undefined ormolu-0.7.2.0/data/examples/other/invalid-haddock-2-out.hs0000644000000000000000000000021007346545000021546 0ustar0000000000000000test = undefined where -- \| Comment -- 2nd invalid line a = undefined -- \| A multiline -- \| comment b = b ormolu-0.7.2.0/data/examples/other/invalid-haddock-2.hs0000644000000000000000000000020507346545000020745 0ustar0000000000000000test = undefined where -- | Comment -- 2nd invalid line a = undefined -- | A multiline -- | comment b = b ormolu-0.7.2.0/data/examples/other/invalid-haddock-double-trigger-out.hs0000644000000000000000000000025707346545000024333 0ustar0000000000000000test = foo -- \|| Invalid haddock, with double trigger -- \|| second line + bar -- \||Invalid haddock 2, with double trigger -- \||second line + baz ormolu-0.7.2.0/data/examples/other/invalid-haddock-double-trigger.hs0000644000000000000000000000023507346545000023522 0ustar0000000000000000test = foo -- || Invalid haddock, with double trigger -- || second line + bar -- ||Invalid haddock 2, with double trigger -- ||second line + baz ormolu-0.7.2.0/data/examples/other/invalid-haddock-weird-out.hs0000644000000000000000000000006707346545000022531 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- \|# ${ ormolu-0.7.2.0/data/examples/other/invalid-haddock-weird.hs0000644000000000000000000000006507346545000021722 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- |# ${ ormolu-0.7.2.0/data/examples/other/linear-arrows-out.hs0000644000000000000000000000040307346545000021157 0ustar0000000000000000{-# LANGUAGE LinearTypes #-} {-# LANGUAGE UnicodeSyntax #-} type a % b = (a, b) type Foo a m b = a % m -> b type Bar a m b = a %m -> b type Baz = a %1 -> b type M = a %1 -> b %m -> c %1 -> d test :: a %1 -> b %1 -> c %m -> d test = test ormolu-0.7.2.0/data/examples/other/linear-arrows.hs0000644000000000000000000000037507346545000020362 0ustar0000000000000000{-# LANGUAGE LinearTypes #-} {-# LANGUAGE UnicodeSyntax #-} type a % b = (a,b) type Foo a m b = a % m -> b type Bar a m b = a %m -> b type Baz = a ⊸ b type M = a %1 -> b %m -> c %1 -> d test :: a ⊸ b %1 -> c %m -> d test = test ormolu-0.7.2.0/data/examples/other/merging-comments-out.hs0000644000000000000000000000037207346545000021652 0ustar0000000000000000foo xs = baz where bar = catMaybes [ lookup langKey gets, -- 1 lookup langKey cookies, -- 2 lookupText langKey session -- 3 ] ++ xs -- 4 -- Blah baz = addTwoLetters (id, Set.empty) bar ormolu-0.7.2.0/data/examples/other/merging-comments.hs0000644000000000000000000000043507346545000021045 0ustar0000000000000000foo xs = baz where bar = catMaybes [ lookup langKey gets -- 1 , lookup langKey cookies -- 2 , lookupText langKey session -- 3 ] ++ xs -- 4 -- Blah baz = addTwoLetters (id, Set.empty) bar ormolu-0.7.2.0/data/examples/other/multiline-comments-reindent-out.hs0000644000000000000000000000010307346545000024022 0ustar0000000000000000{- And so here we have a multiline comment. Indeed. -} ormolu-0.7.2.0/data/examples/other/multiline-comments-reindent.hs0000644000000000000000000000021107346545000023215 0ustar0000000000000000 {- And so here we have a multiline comment. Indeed. -} ormolu-0.7.2.0/data/examples/other/multiline-forall-out.hs0000644000000000000000000000134707346545000021661 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} -- Multiline foralls are consistent across all declarations data D = forall ( f :: * -> * -> * ) (x :: *) (y :: *). D (f x y) data G where G :: forall ( f :: * -> * -> * ) (x :: *) (y :: *). f x y -> G f :: forall ( f :: * -> * -> * ) (x :: *) (y :: *). f x y -> () f = const () type family T f x y where forall ( f :: * -> * -> * ) (x :: *) (y :: *). T f x y = f x y {-# RULES "r" forall ( f :: * -> * -> * ) (x :: *) (y :: *). r (a :: f x y) = () #-} ormolu-0.7.2.0/data/examples/other/multiline-forall.hs0000644000000000000000000000122707346545000021051 0ustar0000000000000000{-# LANGUAGE RankNTypes, PolyKinds, GADTs, TypeFamilies #-} -- Multiline foralls are consistent across all declarations data D = forall (f :: * -> * -> *) (x :: *) (y :: *) . D (f x y) data G where G :: forall (f :: * -> * -> *) (x :: *) (y :: *) . f x y -> G f :: forall (f :: * -> * -> *) (x :: *) (y :: *) . f x y -> () f = const () type family T f x y where forall (f :: * -> * -> *) (x :: *) (y :: *) . T f x y = f x y {-# RULES "r" forall (f :: * -> * -> *) (x :: *) (y :: *) . r (a :: f x y) = () #-} ormolu-0.7.2.0/data/examples/other/multiple-blank-line-comment-out.hs0000644000000000000000000000013107346545000023675 0ustar0000000000000000module A where a = b [ f {-, -} ] ormolu-0.7.2.0/data/examples/other/multiple-blank-line-comment.hs0000644000000000000000000000012407346545000023072 0ustar0000000000000000module A where a = b [ f {-, -} ] ormolu-0.7.2.0/data/examples/other/necessary-brackets-out.hs0000644000000000000000000000024207346545000022163 0ustar0000000000000000insertEmDash = Text.concat . map \case { x | x == "--" -> "—"; x -> x } . Text.groupBy ((==) `on` Char.isSpace) foo f a b c = f do { a } + f do { b } + f do c ormolu-0.7.2.0/data/examples/other/necessary-brackets.hs0000644000000000000000000000023707346545000021362 0ustar0000000000000000insertEmDash = Text.concat . map \case{ x | x == "--" -> "—"; x -> x } . Text.groupBy ((==) `on` Char.isSpace) foo f a b c = f do {a} + f do {b} + f do {c} ormolu-0.7.2.0/data/examples/other/overly-indented-out.hs0000644000000000000000000000031607346545000021505 0ustar0000000000000000tagCloudField :: -- | Destination key String -> -- | Smallest font size, in percent Double -> -- | Biggest font size, in percent Double -> -- | Input tags Tags -> -- | Context Context a ormolu-0.7.2.0/data/examples/other/overly-indented.hs0000644000000000000000000000050107346545000020674 0ustar0000000000000000tagCloudField :: String -- ^ Destination key -> Double -- ^ Smallest font size, in percent -> Double -- ^ Biggest font size, in percent -> Tags -- ^ Input tags -> Context a -- ^ Context ormolu-0.7.2.0/data/examples/other/pragma-comments-after-out.hs0000644000000000000000000000023307346545000022564 0ustar0000000000000000{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} -- TODO: Fix and delete this pragma {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ormolu-0.7.2.0/data/examples/other/pragma-comments-after.hs0000644000000000000000000000023307346545000021757 0ustar0000000000000000{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- TODO: Fix and delete this pragma {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} ormolu-0.7.2.0/data/examples/other/pragma-comments-out.hs0000644000000000000000000000037707346545000021476 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- TODO This extension is probably too dangerous, remove it. {-# LANGUAGE RecordWildCards #-} -- Avoid warning produced by TH. {-# OPTIONS_GHC -fno-warn-overlapping-patterns #-} -- | Header comment. module Foo () where ormolu-0.7.2.0/data/examples/other/pragma-comments.hs0000644000000000000000000000040207346545000020656 0ustar0000000000000000-- | Header comment. {-# LANGUAGE OverloadedStrings #-} -- Avoid warning produced by TH. {-# OPTIONS_GHC -fno-warn-overlapping-patterns #-} -- TODO This extension is probably too dangerous, remove it. {-# LANGUAGE RecordWildCards #-} module Foo () where ormolu-0.7.2.0/data/examples/other/pragma-no-header-out.hs0000644000000000000000000000012507346545000021502 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} ormolu-0.7.2.0/data/examples/other/pragma-no-header.hs0000644000000000000000000000014107346545000020673 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGuagE ViewPatterns #-} {-# language DataKinds, LambdaCase #-} ormolu-0.7.2.0/data/examples/other/pragma-out.hs0000644000000000000000000000053407346545000017646 0ustar0000000000000000{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -O2 -H 300 #-} {-# OPTIONS_GHC -Wall -Werror #-} {-# OPTIONS_HADDOCK prune, show-extensions #-} -- | Header comment. module Foo () where ormolu-0.7.2.0/data/examples/other/pragma-sorting-out.hs0000644000000000000000000000051507346545000021330 0ustar0000000000000000{-# LANGUAGE GHC2021 #-} {-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- This gap is necessary for stylish Haskell not to re-arrange -- NoMonoLocalBinds before TypeFamilies {-# LANGUAGE NoMonoLocalBinds #-} module Foo ( bar, ) where ormolu-0.7.2.0/data/examples/other/pragma-sorting.hs0000644000000000000000000000055107346545000020523 0ustar0000000000000000{-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE GHC2021 #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NondecreasingIndentation #-} -- This gap is necessary for stylish Haskell not to re-arrange -- NoMonoLocalBinds before TypeFamilies {-# LANGUAGE NoMonoLocalBinds #-} module Foo ( bar ) where ormolu-0.7.2.0/data/examples/other/pragma.hs0000644000000000000000000000055007346545000017037 0ustar0000000000000000-- | Header comment. {-# LANGUAGE LambdaCase #-} {-#LANGuagE ViewPatterns #-} {-# LANGUAGE OverloadedStrings#-} {-# OPTIONS_GHC -Wall -Werror #-} {-# language DataKinds, LambdaCase #-} {-# OPTIONS_HADDOCK prune, show-extensions #-} {-# OPTIONS_GHC -O2 -H 300 #-} {-# language IncoherentInstances , AllowAmbiguousTypes #-} module Foo () where ormolu-0.7.2.0/data/examples/other/trailing-whitespace-out.hs0000644000000000000000000000016707346545000022344 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 ormolu-0.7.2.0/data/examples/other/trailing-whitespace.hs0000644000000000000000000000020107346545000021524 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 ormolu-0.7.2.0/data/parse-failures/0000755000000000000000000000000007346545000015217 5ustar0000000000000000ormolu-0.7.2.0/data/parse-failures/disabling-preserves-error-location.hs0000644000000000000000000000020107346545000024451 0ustar0000000000000000module Main (main) where {- ORMOLU_DISABLE -} foo Int foo Int foo 5 EU>>>> {- ORMOLU_ENABLE -} main :: IO () main = return <<<ormolu-0.7.2.0/data/parse-failures/line-pragma.hs0000644000000000000000000000023007346545000017742 0ustar0000000000000000module Foo (foo,bar,baz) where bar = foo {-# LINE 113 "Abc.hs" #-} foo = (some <$> ( automatically $ generated ))))))))) invalid Haskell code baz = bar ormolu-0.7.2.0/extract-hackage-info/0000755000000000000000000000000007346545000015350 5ustar0000000000000000ormolu-0.7.2.0/extract-hackage-info/hackage-info.bin0000644000000000000000000350365407346545000020376 0ustar0000000000000000 ABList Data.AbList:/ Data.AbneList:// AC-Boolean Data.Boolean&& || AC-MiniTest Test.AC.Test?/= ?< ?<= ?= ?> ?>= AC-VectorData.Vector.Class*| /| |* |/ ADPfusionADP.Fusion.Core% ...:|<<<|||~~ ADP.Fusion.Core.Multi:|ADP.Fusion.Core.TH**> <|| ADP.Fusion.Core.TH.Backtrack**> <|| AERN-RealData.Number.ER.Real.Approx*: +: -: /: /\ \/ %Data.Number.ER.Real.Approx.Elementary** **: AERN-RnToRm"Data.Number.ER.RnToRm.UnitDom.Base*^ +^ -^ AFSM Control.AFSM &&&&****++++<<<<<<<^>>>>>>>^^<<<^>>>||||Control.AFSM.Core &&&&****++++<<<<<<<^>>>>>>>^^<<<^>>>||||Control.AFSM.SMFunctor>>>= Advise-me Bayes.Evidence.== .=~ Database.Data! Domain.Logic.Utils<=>=====>Domain.Logic.Views.&&..->..<->..||.Domain.Math.Power.Utils=/====Recognize.Data.Attribute > <||> <~> ==> Recognize.Parsing.Interpretation>*<>+<>-<>/<>>*<<>>+<<>>/<<>^<Recognize.Parsing.Parse|>Recognize.SubExpr.Symbols<&> Util.String// AgataTest.Agata.Base$> *> .> >=> Test.AgataTH<++> AgdaAgda.Compiler.Backend setTCLensAgda.Compiler.JS.Pretty$+$$++$<+>Agda.Interaction.JSON #= .!= .: .:! .:? .= <=< >=>@= Agda.Syntax.Internal:#Agda.Syntax.Parser.Alex.&&. .||. Agda.Syntax.Parser.LexActionsandThenAgda.Termination.CallGraph>*< Agda.Termination.CallMatrix>*< Agda.Termination.Order.*. Agda.TypeChecking.Monad.Base setTCLensAgda.TypeChecking.Pretty$$$+$<+><> Agda.TypeChecking.Primitive.Base-->.-->..--><#> <..> <@> <@@> Agda.TypeChecking.Substitute:#"Agda.TypeChecking.Substitute.Class++#Agda.Utils.Applicative?$> ?*> Agda.Utils.Bag! Agda.Utils.BoolSet\\ Agda.Utils.Functor$><$><&><.> Agda.Utils.Lens%%=%=%==.=<&>^.Agda.Utils.List!! !!! Agda.Utils.List1!! :|<|Agda.Utils.Monad<$<$><*>==<< Agda.Utils.Pretty$$$+$<+><>Agda.Utils.Semigroup<>Agda.Utils.SmallSet\\ Agda.Utils.Tuple-*-/\Animas FRP.Animas# --> -=> >-- >=- FRP.Animas.AffineSpace.+^ .-. .-^ FRP.Animas.MergeableRecord~+~ FRP.Animas.Miscellany# FRP.Animas.VectorSpace*^ ^+^ ^-^ ^/ AnnotationsAnnotations.MultiRec.Any$? Annotations.MultiRec.ErrorAlg&ArrayRefData.ArrayBZ.IArray! // Data.ArrayBZ.Internals.IArray! // Data.SyntaxSugar+= -= .<- .= =: AspectAGLanguage.Grammars.AspectAG#.*.+++ .#.#.. .*.+..+:.:+..:+:.==.⋈▹◃ Language.Grammars.AspectAG.HList.:.:.*Language.Grammars.AspectAG.RecordInstances#.*..#.*.==. AttoBencodeData.AttoBencode.: .= BASICLanguage.BASIC:= < <= <> == > >= ^ BNFCBNFC.PrettyPrint$++$ <=> BNFC.Utils++++++++-++.+>.> BNFC-metaLanguage.LBNF.Compiletime! HappyStk BiGULGenerics.BiGUL.Lib==>Generics.BiGUL.Lib.HuStudies==> BiobaseBiobase.Types.Ring.*. .+. .^. .^^. BiobaseTypesBiobase.Types.Index+. -. BlammoBlammo.Logging.=:#BooleanData.Boolean.Overload&&/=<<===>>=||CCA Control.CCA&&& *** <<< >>> CMCompareBioInf.CMCompare<*> CTRexData.OpenRecords .! .+ .++ .- .| :!= ::<-| ::= :<- :<-! :<-| := CVCV.ImageMathOp #* #+ #- #< #> -| |* |+ |- |< |> CV.ImageOp#> &#& <# <## CV.Pixelwise<$$> <+> Utils.Point>/ CabalDistribution.Utils.Json.= Cabal-ide-backendDistribution.Compat.ReadP+++ <++ Cabal-syntaxDistribution.Compat.Lens #%~#~%=%~&.=.~?=?~^#^.Distribution.Compat.ParsingDistribution.Compat.Prelude)!! $$!&&****>+++-. //=:|<<$<$><*<*><+><<>> <=<><|>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq||Distribution.Compat.Semigroup<>Distribution.FieldGrammar^^^ CartesianCartesian.Types:+ CascadeCascade:>>> =>=: >=>: Cascade.Operators# #~ ~# Cascade.Product*: :* CassavaData.Csv.! .: .= ChartGraphics.Rendering.Chart.Grid./. .|. ChasingBottomsTest.ChasingBottoms.SemanticOrd/=!/\!!>=!\/! CheatSheet CheatSheet## ChristmasTreeText.GRead.Grammar.#. .*. ClassLawsTest.ClassLaws.Core=.= Test.ClassLaws.TestingDatatypes+++ ClassyPreludePrelude.Classy$ $! * + - . <> ^ Prelude.Math** / ^^ CleanClean.Applicative*> <* <*> Clean.Arrow<<< >>> >>^ ^>> ||| Clean.Core& * + . <#> <|> Clean.Functor<$ <$> <&> Clean.Lens%~ .~ ^. Clean.Monad=<< >> >>= ColorGraphics.Color.Algebra//Graphics.Color.Model//Graphics.Color.Space//Graphics.Color.Space.RGB//$Graphics.Color.Space.RGB.Alternative//CommandSystem.Command->-> ->> ->>> <-<- <<- <<<- ConstraintKinds#Control.ConstraintKinds.Applicative<*> Control.ConstraintKinds.Functor<$> Control.ConstraintKinds.Monad>> >>= ContractDevelopment.Contract& =: >-> >>-> |> CoroutineControl.Monad.Indexed>> >>= Crypto!Codec.Encryption.RSA.NumberTheory/| DBFunctor Etl.Julius:->:.:=> RTable.Core.   <=<DOH%Network.DigitalOcean.Utils.Pagination/? DOMData.DOM.WBTypes/\ DPutilsDP.Backtraced.Core<|><|>DSH Database.DSH!! && ++ /= < <= <| == > >= >> >>= ? |> || Deadpan-DDPWeb.DDP.Deadpan.Websockets?>>> Decimal Data.Decimal*. DeepArrowControl.Arrow.DeepArrow->| Data.FunArr$$ DrHyloLanguage.Pointfree.Syntax:**: :*: :++: :+: :-> :.: :/\: :\/: Language.Pointwise.Syntax:&: :@: EEConfigEEConfig! Earley Text.EarleyText.Earley.Grammar EdisonAPIData.Edison.Sym! ++ /\ <| \/ \\ |= |> EdisonCoreData.Edison.Concrete.FingerTreelconsEncode Encode.ExPlus<|> Encode.Extend<|> Encode.Mapper<-> <.> |+| |-| |.| |:| PureFP.OrdMap? |-> PureFP.OrdSet<++> <\\> PureFP.Parsers.AmbExTrie:&: PureFP.Parsers.AmbTrie:&: PureFP.Parsers.Parser/> <+>  <:> EnumMap Data.EnumMap! \\ EuroIT Data.EuroIT$^ EuterpeaEuterpea.Music/=: :+: :=: FPrettyText.PrettyPrint.FPretty<$$> <$> <+>   <> FerryCoreDatabase.Ferry.SyntaxTyped.-> :=> FieldTripGraphics.FieldTrip.Transform*% FileManipSystem.FilePath.Find &&? .&.? /=? /~? <=? =? >? ||? ~~? System.FilePath.GlobPattern/~ ~~ FileManipCompatSystem.FilePath.FindCompat &&? .&.? /=? <=? =? >? ||? FilePather,System.FilePath.FilePather.FilePathPredicate.!. .&&. .||. FileSystemSystem.FileSystem.Operators-: <-: <: <<: =: ?: System.FileSystem.Utils$$ <|> Fin Data.Fin.List!! :.FiniteCategoriesMath.Categories.FinSet||!|| Math.Categories.FunctorCategory->$ ->£ <-@<- <-@<= <=@<- <=@<= =>$ Math.Category@ @? FirstPrelude FirstPrelude!! $&&* + ++- . /= < <= == > >= >> >>= ^ seq||Folly Folly.Formula/\ \/ ForSyDeForSyDe.Shallow.Signal!- +-+ -: :- ForSyDe.Shallow.Vector:> <+> <: FramesFrames&::. <+> Frames.Rec&:GHood Debug.Observe<< GLM GLM.Tokenizer?> GPipe-CoreGraphics.GPipe.Linear!!*!!/!*!*!!+!!-!$**!*!!*^^*^+^^-^^/GTALibGTA.Core<.> >## >#> >=< >== >=> Gamgine Gamgine.Bool<&&><||>Gamgine.Control? Gamgine.Gfx<<<<<<<<<GenI Data.FullList!: ++ Data.FullList.Internal!: ++ NLP.GenI.Builder>--> NLP.GenI.General!+! NLP.GenI.Pretty<+> <>GeodeticData.Geo.Coord!.! |..| |.| Data.Geo.Position|*| GrammarProducts FormalLanguage.GrammarProduct.Op.+ >< GrempaData.Parser.Grempa.Grammar<# <#> <@ <@> HABQT HABQTlib.Data<+>HARM Arm.ParseLib+++ HAppS-DataHAppS.Data.HList.&. HAppS-IxSetHAppS.Data.IxSet &&& @* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= ||| HAppS-StateHAppS.State.ComponentSystem:+: HCard Data.HCard@@ HDRUtilsGraphics.Image.PixelMap!! !/ !/= != HERAData.Number.Real<. >. HGamer3DHGamer3D# -: -| <: <| HGamer3D-CommonHGamer3D.Common# #+ #: #? ?# HJScript HJScript.Ajax<&> =: HJScript.Lang# #! #. .!=. .&&. .*. .+. .+=. .-. ./. .<. .<=. .=. .==. .>. .>=. .||. <|> ? HJScript.XMLGenerator:= HLearn-algebra!HLearn.Algebra.Structures.Modules*. .* /. #HLearn.Algebra.Structures.Triangles<| |> HLearn.Algebra.Types.HList::: HLearn.Algebra.Types.Indexing! # HList Data.HList # .!. .*..-..<++..<..=..==..@.:$$::<>:HConsData.HList.CommonMain.==.HConsData.HList.FakePrelude:$$::<>:Data.HList.HListHConsData.HList.HListPrelude.*.Data.HList.Labelable.==.Data.HList.Record.!. .*..-..<++..<..=..@.HMap Data.HMap! \\ HMockTest.HMock.Rule|->|=>HNumericHNum.CSV# HNum.Vector %*% %-*-% %-+-% %---% %/% .! .* .*. .+ .- ./ .: .^ HQuQ.Types$*$ $+$ $/$ HSFFIGHSFFIG.FieldAccess--> <-- ==> HSH HSH.Command-|- HSoMHSoM.Examples.IntervalTrainer->> .|. =>> HStringTemplateText.StringTemplate|=HTFTest.Framework.Pretty$$$+$<+><=> HUnitTest.HUnit.Base@=?@?@?=~:~=?~?~?= HUnit-DiffTest.HUnit.Diff@==? @?== HUnit-PlusTest.HUnitPlus.Base@=?@?@?=~:~=?~?~?= HUnit-approxTest.HUnit.Approx@?~@~?~?~~~?HaLeXLanguage.HaLex.DfaMonad<-> Language.HaLex.Parser<$> <*><|>Language.HaLex.Util<-> HaTeXText.LaTeX.Base<>Text.LaTeX.Base.Commands%: & Text.LaTeX.Base.Math !: !^ *:+--+/=:<: <=: =:>: >=: ^: Text.LaTeX.Base.Syntax<>Text.LaTeX.Packages.AMSMath !: !^ *:+--+/=:<: <=: =:>: >=: ^: Text.LaTeX.Packages.TikZ.Simple->> Text.LaTeX.Packages.TikZ.Syntax->- ->> HaXPathHaXPath # &&././/./=.<.<=.=.>.>=.|.||.HaXPath.Operators # &&././/./=.<.<=.=.>.>=.|.||.HaXPath.Schematic # &&././/./=.<.<=.=.>.>=.||.HaXPath.Schematic.Operators # &&././/./=.<.<=.=.>.>=.||.HaXmlText.XML.HaXml.Combinators />:>andThenguardsooounionwhenwithwithout|>|Text.XML.HaXml.Html.Generate! ? Text.XML.HaXml.Schema.Parse||| !Text.XML.HaXml.Xtract.Combinators/> | HackMailHackMail.Data.Path+/+ :/: HandsomeSoupText.HandsomeSoup! HarmTrace-BaseHarmTrace.Base.Chord.PitchClass&/= &== HaskRel#Database.HaskRel.Relational.Unicode# × ∅ ∈ ∉ ∋ ∌ ∖ ∣ ∩ ∪ ≔ ⊂ ⊃ ⊆ ⊇ ⊠ ⋈ ⋉ ⋊ ▻ ◅ Database.HaskRel.Support &= +- >< ><= >=< >=<= >≤ ± ≠ ≤ ≥ ≥< ≥≤ HaskellForMathsMath.Algebra.Field.Extension/> <*> <+> #Math.Algebra.Group.PermutationGroup *- -* -*- -^ -^^ .^ .^^ // ~^~^^ ~~^ Math.Algebra.LinearAlgebra ! *>*>><*><*>><+><-><.><<*><<*>><<+>><<->>"Math.Algebra.NonCommutative.NCPoly%%^- Math.Algebras.Commutative%%Math.Algebras.NonCommutative%%Math.Algebras.Quaternions<.> ^- Math.Algebras.Structures*. Math.Algebras.TensorProductdsumedsumftetfMath.Algebras.VectorSpace*><*<+><->Math.Combinatorics.Matroid/// \\\ 'Math.Combinatorics.StronglyRegularGraph+^ +^^ Math.Common.ListSet\\ %Math.CommutativeAlgebra.GroebnerBasis! "Math.CommutativeAlgebra.Polynomial%%*->Math.Core.Utils^-(Math.Projects.ChevalleyGroup.Exceptional%^ %Math.Projects.KnotTheory.LaurentMPoly^^^ $Math.Projects.MiniquaternionGeometry<* Math.Projects.RootSystem+-+ +|+ "Math.QuantumAlgebra.TensorCategory>>> HipmunkPhysics.Hipmunk.Shape.==. Hoed Debug.Hoed<< === Debug.Hoed.Observe<< Debug.NoHoed<< Holumbus-SearchengineHolumbus.Data.PrefixTree! Holumbus.Data.PrefixTree.Core! .++. HsParrot Language.PIR--> .& .- <-& <-- <:= <== HsPerl5Language.Perl5.! .$ .$! .: HsYAML Data.YAML.!= .: .:! .:? .= Hsmtlib$Hsmtlib.Solvers.Cmd.Parser.CmdResult<#> "Hsmtlib.Solvers.Cmd.Parser.Parsers<++> <:> I1MI1M.Analizador+++ >*>IFS Graphics.IFS<+>  Graphics.IFS.Geometry<*> IOSpec Test.IOSpec:+:Test.IOSpec.Types:+:ImperativeHaskell"Control.Monad.Imperative.Internals& =: "Control.Monad.Imperative.Operators%. %=: /. ==. ~. IndexedListData.List.Indexed.Conic:-: Data.List.Indexed.Counted::: InfixApplicativeControl.Applicative.Infix<^ ^> ↾ ↿ IntervalMapData.IntervalMap.Generic.Lazy! \\ Data.IntervalMap.Generic.Strict! \\ Data.IntervalMap.Lazy! \\ Data.IntervalMap.Strict! \\ Data.IntervalSet\\ IrcIrc|! IsNull Data.IsNull<\> JSON-CombinatorText.JSON.Combinator-? -?? -| -|| Text.JSON.JSONPrepend-->>: ->: JYU-Utils Utils.DynMap=: JdhData.Jdh.Json.Generic=: JsonGrammarLanguage.JsonGrammar:- JuicyPixelsCodec.Picture.Metadata:=> JustParseData.JustParse.Combinator<|> <||> Kawaii-Parser Parser.Parser<+>KiCSCurry.Module.Prelude $! $!! $# $## & :< =:<= == === >>= KleislifyControl.Kleislify->^ <-^ <=^ =>^ ^-> ^<- ^<= ^=> KulittaKulitta.EuterpeaSpecial&&& *** +++ /=: :+: :=: <+> <<<<<^>>>>>^^<<^>>||| Kulitta.PTGG:-> Kulitta.QuotientSpaces// LATS!LinearAlgebra.TypedSpaces.Classes! LinearAlgebra.TypedSpaces.Matrix# #> <# <.> LParseText.LParse.Prebuilt<< LambdaDesignerLambdaDesigner.Op!% !* !+ !== !^ <$$> LambdaHack"Game.LambdaHack.Client.AI.Strategy.=>.|!Game.LambdaHack.Client.UI.Overlay<+:><\:>!Game.LambdaHack.Common.PointArray! // Game.LambdaHack.Core.Prelude0!! $$!&&&&&*******>+++-. //=<<$<$!><$$><$><*<*><+><=<=<<>=<<==>>=>=>>>>>=\\^^^blamedivdivUpelemmodnotElemquotremseq showFailureswith||LastikSystem.Build.Args-~> ^^^ ~: ~? ~~ ~~> ~~~> System.Build.CompilePaths=>> System.Build.Runner !!! ++>> +>> ->- >-- >-> >== >===> >=>=> System.Build.Scala.Scalac? System.Build.Scala.Scaladoc? LogicLogic&& <=> ==> ^ || LucuNetwork.HTTP.Lucu.Parser<|> MFlow MFlow.Forms**> ++>  <* <** <*> <++ <+> <<< <|> >:> |*> |+| MFlow.Forms.Blaze.Html<< MFlow.Forms.Internals!> **> <** <+> MFlow.Forms.WebApi MHask MHask.Arrow~<~ ~>~ MIPNumeric.Optimization.MIP.Base.<=..==..>=.MagicHaskeller "Control.Monad.Search.Combinatorial/\ \/ MagicHaskeller.Classification/ /< / MagicHaskeller.FastRatio% :% MagicHaskeller.LibExcel<> MagicHaskeller.LibTH--#!! --#/= --#< --#<= MagicHaskeller.Minimal~=MagicHaskeller.PolyDynamicdynApp MapData.Map.Class!? MapWithCurryTF$# MapWith<-^^->MeasureData.Measure.ConvertDouble..> <.. Data.Measure.RelativeDouble.*. ./. MemoTrie Data.MemoTrie:->:@.@ MetaObjectMO.Util?<=>? ?==? Modulo Number.Modulo=== MonatronControl.Monatron.Open<@> Monocle Monocle.Core\* \. \== MuCheckTest.MuCheck.MuOp*==>* ==> ==>* ~~> Test.MuCheck.Utils.Print./. NMap Data.NMap! .<.> NanoProlog%Language.Prolog.NanoProlog.NanoProlog:<-: NoHoedDebug.Hoed.Pure<< NonEmptyListData.List.NonEmpty.: |: NumberTheory NumberTheory.% .* .+ .- ./ :+ Nussinov78BioInf.GAPlike<** OGL"Graphics.Rendering.OGL.GL.StateVar$$= $= $=! $~ $~! OmegaData.Presburger.Omega.Expr *| |&&| |*| |+| |-| |/=| |<=| |<| |==| |>=| |>| OpenAFPOpenAFP.Prelude.Utils$$$=%%=%:%=%?+=@=OpenAFP.Types.Chunk ..............><..<==<~~=====>~~~~>OpenSCADGraphics.OpenSCAD# Graphics.OpenSCAD.Unicode∖ ∩ ∪ ⊕ ⊖ Operads Math.Operad.*. OrdinalsMath.Ordinals.MultiSet++. .++. .: ^: PArrows(Text.ParserCombinators.PArrow.Combinator>>! PSQueue Data.PSQueue:->Data.PSQueue.Internal:->PageIOText.PageIO.Parser<$$> ParaisoLanguage.Paraiso.OM.Builder $Language.Paraiso.OM.Builder.Internal Language.Paraiso.Prelude&& ++ || Parallel-Arrows-DefinitionParrows.Definition... |&&&| |***| Parrows.Skeletons.Topology|>>>| PermuteEffectsControl.Permute*. Piso Data.Piso:- PreludePrelude$$$!$>&&&* ** *> + - . / /= :| < <$ <$><* <*> <= <=<<> <|> =<<== > >= >=>>> >>= ^^^elemnotElemon||PrimitiveArrayData.PrimitiveArray.Checked! !? :.:>Data.PrimitiveArray.Class! !? Data.PrimitiveArray.Index.Class:.:>QIOQIO.Heap? QIO.Vec<**> <++> <@@> QIO.VecEq<+> <.> <@> QuickCheckTest.QuickCheck.&&..&..||.=/======>>< Test.QuickCheck.Arbitrary>< QuickCheck-safeTest.QuickCheck.Safe.&&. .&. .||. =/==== ==> >< RBTreeData.Tree.RBTree<RSolve.MapLike! RSolve.PropLogic:&&:&&::=>::||:||: Ranged-setsData.Ranged.Boundaries/>/Data.Ranged.RangedSet-!--/\--<--<=--?--\/- RasterificGraphics.Rasterific.Linear^*^+^^-^^/RattusRattus<## <#> |## |#| Rattus.Arrow&&& *** Rattus.Stream::: Rattus.Strict+++ :!:* Rattus.Yampa --> -:> -=> <<^ >-- >=- >>>>>^ ^<< ^>> ReadArgsReadArgs:& RefSerializeData.RefSerialize.Parser<|>RepLibGenerics.RepLib.R:*: Generics.RepLib.RepAux::: ReplicateEffectsControl.Replicate*! *? RxHaskellSignal>>: SBenchTest.SBench.STerm<$> SSTGSSTG.Core.Execution.Support<*> >>= SciBaseTypesAlgebra.Structure.Semiringplustimes⊕⊗SciFlowScientific.Workflow~> $Scientific.Workflow.Internal.Builder~> SemigroupData.Semigroup.++. <++> SessionLoggerSystem.Log.SessionLogger>>>= >>>>= SetData.Set.Class⊆ ShellCheckShellCheck.Prelude!!! Shpadoinkle-lensShpadoinkle.Lens%><%Shpadoinkle-routerShpadoinkle.Router:>>SimpleHSimpleH.Applicative*> <* <**> <*> SimpleH.Arrow>>^ ^>> SimpleH.Core & * + +++ . <#> <<< <|> >>> SimpleH.Functor:**: <$ <$> <&> ||| SimpleH.Lens %%- %%~ %- %~ -. .+ .- <.> ^. ^.. ^? ^?? SimpleH.Monad <*= <=< =- =<< =~ >=> >> >>= >>>= >>>>= SimpleH.Parser<+> >*> SimpleH.Reactive// <*|> <|*> SizeCompareData.SizeCompare|<=| |<| |==| |>=| |>| SmtLibSmtlib.Parsers.CommonParsers<++> <:> Spock Web.Spock Spock-api Web.Spock.Api Spock-coreWeb.Spock.Core StateVar Data.StateVar$=$=!$~$~!Strafunski-StrategyLib2Data.Generics.Strafunski.StrategyLib.StrategyInfix-+>>>>>>->>>=Stream Data.Stream!! <:>Cons StrictCheckTest.StrictCheck:*Test.StrictCheck.Examples.Lists%$ %* Test.StrictCheck.Examples.Map! Test.StrictCheck.Shaped% SyntaxMacrosLanguage.Grammars.Grammar<=> ^= Language.Grammars.SyntaxMacros+>> ^| TCacheData.TCache.IndexQuery.&&..<..<=..==..>..>=..||.TLTTest.TLT@/=@/=-@<@<-@<=@<=-@==@==-@>@>-@>=@>=-~:~::~::-Test.TLT.Assertion~:~::~::-Test.TLT.Standard @/=@/=-@<@<-@<=@<=-@==@==-@>@>-@>=@>=-TTTASLanguage.AbstractSyntax.TTTAS2&&& *** >>> TeX-my-mathMath.LaTeX.Internal.Display$<>>$Math.LaTeX.Internal.MathExprZ*..*+..+-\--→.../⊂<.<<.≤<==<=>==>=→=⸪|◝|◞|◞◝°±×،،..،⁀ ₌₌←-←=↦↪∀:∃:∄:∈∉∋∌∏∑∓∖∗ ∘∝∥∧∨∩∪∫∼≃≅≈≠≡≤≤.<≤.≤≥≪≫⊂⊃⊆⊇⊎⊕⊗⋂⋃⋆ ␣◝ ◝⁀ ◞ ◞∏◞∑◞∫◞∮◞⋂◞⋃◞◝◞⨄⟂⧵⨄⩵⩵!⪡⪢⸪⸪=Math.LaTeX.Preluded$<>%$>&&~!&~:&~?&~~!&~~:*..*+..+-\--→.../⊂<.<<.≤<==<=>==>=→=⸪>$|->|◝|◞|◞◝°±×،،..،⁀ ₌₌←-←=↦↪∀:∃:∄:∈∉∋∌∏∑∓∖∗ ∘∝∥∧∨∩∪∫∼≃≅≈≠≡≤≤.<≤.≤≥≪≫⊂⊃⊆⊇⊎⊕⊗⋂⋃⋆ ␣◝ ◝⁀ ◞ ◞∏◞∑◞∫◞∮◞⋂◞⋃◞◝◞⨄⟂⧵⨄⩵⩵!⪡⪢⸪⸪= TernaryTreesData.Map.StringMap! Data.Map.TernaryMap! TestExplodeTestExplode.TestExplode&-& TicTacToeData.TicTacToe.Board--> -?-> TopTop.Constraint.Equality.==. Top.Constraint.Polymorphism.::. !Top.Implementation.TypeGraph.Path:+: :|: <++> Top.Solver.SwitchCombinator|>>| Top.Types.Primitive.->. Top.Types.Qualification.=>. Top.Types.Substitution@@ @@@ |-> TreeStructures Data.Tree.AVL!! Data.Tree.Splay!! TrieMap Data.TrieMap! \\ Data.TrieSet\\ TypeComposeControl.Compose$*&&&% ***#***% *:* *::* *<~:$:*::->::. <~~>~>*Data.Bijection--->:<->:UISFFRP.UISF.AuxFunctions~++ FRP.UISF.Widget.Construction// UnixutilsSystem.Unix.FilePath<++> UrlDispNetwork.UrlDisp|. |/ |// |? |\ |\\ UsefulUseful.Dictionary #! #!! #*- #*? #+ #++ #- #? #?! #?? #\\ Useful.General! !/ != % ? ?! ?? UtilityTMControl.Monad.TM.=<<. .>>=. ValveValueKeyvalue Text.ValveVKV.:^:Vec Data.Vec.Base:. VecN Data.VecN:> WashNGoWASH.CGI.Style:=: :^: WASH.HTML.HTMLMonad98## WASH.HTML.HTMLMonadBase@@ WeakSets Data.WeakMap! !? \\ |!| |.| |?| Data.WeakMap.Safe|!| |.| |?| Data.WeakSet\\ |&| |*| |+| |-| |^| ||| Data.WeakSet.Safe|&| |*| |+| |-| |^| ||| Math.PureSet&&&& |||| WebrexpText.Webrexp.GraphWalker WhebWeb.Wheb Web.Wheb.Routes WiredData.Hardware.Internal.+ >< Data.Logical.Knot*= Data.Logical.Let=== Lava.Patterns-<- ->- -|- .<. .>. XSaiga AGParser2*> <|> Yampa FRP.Yampa -->-:>-=>>-->=-attachgatejoinElMergemergerMergetagFRP.Yampa.Basic-->-:>-=>>-->=-FRP.Yampa.DelaysfbyFRP.Yampa.EventattachgatejoinElMergemergerMergetagFRP.Yampa.EventSandThenFRP.Yampa.Task abortWhentimeOut Yampa-core FRP.Yampa# --> -=> >-- >=- FRP.Yampa.Basic--> -=> >-- >=- FRP.Yampa.Core>>> FRP.Yampa.MergeableRecord~+~ FRP.Yampa.Miscellany# Z-Data Z.Data.JSON.!.: .:! .:? .= Z.Data.JSON.Base.!.: .:! .:? .= Z.Data.JSON.Converter Z.Data.ParserZ.Data.Parser.Base Z-MessagePackZ.Data.MessagePack.!.: .:! .:? .= Z.Data.MessagePack.Base.!.: .:! .:? .= ZipperAGLanguage.Grammars.ZipperAG.$ .| 6Language.Grammars.ZipperAG.Examples.HTMLTableFormatter.#. .$ .| Zora Zora.List$$ <$*> Zwaluw Web.Zwaluw:- <> abcBridge Data.ABC.AIG=== Data.ABC.GIA=== abt Abt.Class.Abt$$ // \\ Abt.Class.HEq1=== Abt.Types.View:$ :\ accelerateData.Array.Accelerate! !! $&&&***+++-. //=:.::.<<===>>->>=??|Ix^^^divmodquotrem||Data.Array.Accelerate.Data.Bits .&..|.rotaterotateLrotateRshiftshiftLshiftRxor"Data.Array.Accelerate.Data.Complex:+::+"Data.Array.Accelerate.Data.Functor$><$<$>!Data.Array.Accelerate.Data.Monoid<> Data.Array.Accelerate.Data.Ratio%$Data.Array.Accelerate.Data.Semigroup<>accelerate-blas+Data.Array.Accelerate.Numeric.LinearAlgebra#><#<.><>><acl2 Language.ACL2<. <=. >. >=. acme-cadre Acme.Cadre<&> acme-flipping-tables Acme.Error ╯°□°╯ acme-functors Acme.Functors~~Acme.Functors.Classes *>/=<$<*<*><>==>>>>= acme-hq9plus Acme.HQ9Plus+ acme-kitchen-sinkControl.Applicative.Acme>$< acme-lolcatAcme.LOLCAT.IO? acme-omitted Acme.Omitted... acme-operatorsAcme.Operators.Base2!! $ $> % & && &&& * ** *** *> + ++ +++ - . .&. .|. / /= :+ < <$ <$!> <$> <* <**> <*> <<< <<^ <= <=< <> <|> =<< == > >= >=> >> >>= >>> >>^ \\ ^ ^<< ^>> ^^ || ||| acme-php Prelude.PHP&& <> || acme-pointful-numbers Acme.Pointful. active Data.Active->>|>> actsData.Act--><--act•ad Numeric.AD:-Numeric.AD.Double:- Numeric.AD.Internal.Tower.Double:!Numeric.AD.Jet:-Numeric.AD.Mode*^^*^/adaptive-containersData.Adaptive.List++ adhoc-fixturesData.Fixtures.Adhoc&:&> adp-multiADP.Multi.Combinators... <<< >>> ||| ~~~ aern2-mfunAERN2.Linear.Vector.Type! +++ aern2-mpAERN2.MP.Enclosure+-AERN2.MP.Float.Operators*.*^+.+^-.-^/./^ aern2-real AERN2.Real?AERN2.Real.Type?aeson Data.Aeson.!= .: .:! .:? .= Data.Aeson.Encoding.Internal>*<><Data.Aeson.Internal Data.Aeson.KeyMap!? Data.Aeson.Types.!= .: .:! .:? .= aeson-better-errorsData.Aeson.BetterErrors.! <|> Data.Aeson.BetterErrors.Internal.! <|> aeson-commitData.Aeson.Commit.:> aeson-compatData.Aeson.Compat.!= .: .:! .:? .= aeson-decode AesonDecode^?aeson-derivingData.Aeson.Deriving.Generic&:=$Data.Aeson.Deriving.Internal.Generic&Data.Aeson.Deriving.Known:===> aeson-filthyData.Aeson.Filthy.:$ .:~ .=$ aeson-native Data.Aeson.: .:? .= Data.Aeson.Types.: .:? .= aeson-pickerData.Aeson.Picker|--|-? aeson-quickData.Aeson.Quick.! .% .? aeson-utilsData.Aeson.Utils.=? affineAlgebra.Affine.+.-.-.agda-language-serverRender.RichText<+>aigData.AIG.Interface=== Data.AIG.Operations! ++ airAir.Data.Monoid+ Air.Data.Record.SimpleLabel=: Air.Light!! - . / < <-> > ^ air-specAir.Spec=== airbrakeAirbrake:| airship Airship.Route#> #>=  aivikaSimulation.Aivika.Circuit?> Simulation.Aivika.SystemDynamics./=. .<. .<=. .==. .>. .>=. aivika-transformersSimulation.Aivika.Trans.Circuit?> &Simulation.Aivika.Trans.SystemDynamics./=. .<. .<=. .==. .>. .>=. ajhc C.Generate& *# +# =* Doc.DocLike<$> <+> <> Doc.Pretty<$$>   E.Demand:=> FrontEnd.Representation:=> FrontEnd.Tc.Type:=> Grin.Grin:-> :>>= Util.IntBag! Util.Seq<> Util.SetLike\\ Util.TrueSet\\ Util.UnionSolve@<= @<=@ @= @=@ @>= @>=@ alertaAlerta!= !~ =. ~. alex-tools AlexTools<-> AlexToolsBin<-> algAlgebra*+-/<>× Data.BitSet.&?¬ Relation.Binary.Comparison<>∸ ≡≢≤≥algebra Numeric.Additive.Class+ Numeric.Additive.Group- Numeric.Algebra* *. + - .* / /~ < <~ > >~ \\ ^ ~~ Numeric.Algebra.Class* *. .* Numeric.Algebra.Division/ \\ ^ Numeric.Decidable.Units^? Numeric.Field.Fraction% Numeric.Map$@Numeric.Module.Class*. .* Numeric.Order.Class/~ < <~ > >~ ~~ algebraic-graphs Algebra.Graph===Algebra.Graph.Example.Todo>*< ~*~ Algebra.Graph.Export<+>Algebra.Graph.Export.Dot:= Algebra.Graph.Label<+><.>Algebra.Graph.Labelled-<>-#Algebra.Graph.Labelled.AdjacencyMap-<>-Algebra.Graph.NonEmpty===algebraic-preludeAlgebraicPrelude** ^^^allocated-processorControl.Processor--< alloyData.Generics.Alloy.Effect:-* Data.Generics.Alloy.Pure:- Data.Generics.Alloy.Route:-@ @-> altcompositionData.AltComposition%***.* %***.** %**.* %**.** %**.*** %*.* %*.** %*.*** %.** %.*** %.**** &&\*%*.* *%*.** *%*.*** *%.* *%.** *%.*** **%.* **%.** **%.*** .$?. ||\§ alternative-extraControl.AlternativeExtra$< alternative-ioData.Alternative.IO.Lifted<||> altfloatData.Floating.Classes** Data.Poset<  <= <==> > >= amazonka-coreNetwork.AWS.Data.Headers.#.#?=#Network.AWS.Data.JSON.!= .: .:> .:? .=.?> Network.AWS.Data.Query=:Network.AWS.Data.XML.@.@?@=@@=Network.AWS.Lens #%~&.~<&><>~?~^.^?Network.AWS.Prelude.!= .!@.#.#?.: .:> .:? .=.?> .@.@?:|<$><*><><|>=#=:@=@@= amazonka-testTest.AWS.Prelude #%~&.~<&><>~?~^.^?ambyAmby.= ampersandDatabaseDesign.Ampersand .!. .*. .-. ./. ./\. .:. .<>. .==. .\. .\/. .|-. <==> >- analyzeAnalyze.Common<&> annihilatorControl.Annihilator<|< >|> annotated-wl-pprint!Text.PrettyPrint.Annotated.Leijen<$$> <$> <+>   <> ansi-pretty'Text.PrettyPrint.ANSI.Leijen.AnsiPretty<$$><+>ansi-terminal-game Terminal.Game #%%.<%.>%^>&***===|||ansi-wl-pprintText.PrettyPrint.ANSI.Leijen<$$><$><+><>%Text.PrettyPrint.ANSI.Leijen.Internal<$$><$><+>anticivNetwork.Anticiv.Masks#-> #->> #|| & .|| "Network.Anticiv.Modules.Mafia.Core #< #> %& %&& %| %|& &< &> <># <>& "Network.Anticiv.Modules.Mafia.Data:-> antimirovData.Regex.Antimirov.Subtyping<: "Data.Regex.Antimirov.SubtypingList<: antiope-messagesAntiope.Messages.Via/// antiope-s3Antiope.S3.Syntax antiquoter Language.Haskell.AntiQuoter.Base<<> <<>> <>> antispliceGame.Antisplice.Action!&& !|| #&& #|| Game.Antisplice.MaskedSkills&-> &?-> +& +? -&?-> Game.Antisplice.Skills!+ !+> #- #-> #->> >!+ >!+> antlr-haskellLanguage.ANTLR4&&& hashWithSaltText.ANTLR.Allstar.Stacks# Text.ANTLR.Set\\ hashWithSalt aop-prelude AOPPrelude&&*+++-. //=<<===>>=divmod|| ap-normalize ApNormalize&<$>^<*>^ApNormalize.Aps<$>^<*>^ ap-reflect Debug.Reflect-$--*-:$ apecsApecs$=$~ Apecs.System$=$~ apecs-stmApecs.STM.Prelude$=$~ api-builderNetwork.API.Builder.Routes=. api-rpc-pegnetPegNet.RPC.Types.Balances.:?? PegNet.RPC.Types.Issuance.:?? PegNet.RPC.Types.Rates.:?? PegNet.RPC.Types.SyncStatus.:?? PegNet.RPC.Types.Transaction.:?? api-tools Data.API.JSON.:. .:: Data.API.Utils?! ?!? Data.Binary.Serialise.CBOR.Extra<$!>apiaryControl.Monad.Apiary.Filter=!: =*: =+: =: =?!: =?: ?? Data.Apiary.Extension+> Data.Apiary.Routing+| insert Data.Apiary.Routing.Dict:= apparText.Appar.ByteString*><$<$><*<**><*><|>Text.Appar.LazyByteString*><$<$><*<**><*><|>Text.Appar.String*><$<$><*<**><*><|> applicableData.Applicable$* apply-unordered-monoControl.Apply.Unordered.Mono??!approx Data.Approx/~=~inRangeinTol safeInRange approximateData.Approximate.Mass&?^?|?arch-hs$Distribution.ArchHs.Internal.Prelude<|>\\arduino-copilotCopilot.Arduino,!! # $$!&&****>+++-. .!! .&..<<. .>>. .^. .|.//= < <$<$><*<*><= <>=:=<<== ==> > >= >>>>=@: ^ ^^elemnotElemquotremseq||arithmoiMath.NumberTheory.Moduli.Class^%moduloMath.NumberTheory.Primes.IntSet\\ .Math.NumberTheory.Quadratic.EisensteinIntegers:+,Math.NumberTheory.Quadratic.GaussianIntegers:+array Data.Array! // Data.Array.IArray! // array-builderData.Builder.Catenable:<:>Data.Builder.Catenable.Bytes:<:>Data.Builder.Catenable.Text:<:> array-forthLanguage.ArrayForth.State! arrow-extrasControl.Arrow.Extras$<<$>><<$>*>>>$arxSystem.Posix.ARX.CLI.Options<@>arxivNetwork.Api.Arxiv/*/ /+/ /-/ asanaAsana.Api.Prelude)!! $$!&&&&&*******>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||asn1-ber-syntaxAsn.Resolve.Category>-> assert-failureControl.Exception.Assert.Sugarblamefailure forceEither showFailureswithtwith assoc-listData.AssocList.List.Eq! !? assoc-listlikeData.AssocList.ListLike.Eq! !? atermATerm.SimpPretty<>atom Language.Atom! !. &&. .&. .<<. .>>. .|. /=. <. <=. <== ==. >. >=. ||. Language.Atom.Expressions! !. &&. .&. .<<. .>>. .|. /=. <. <=. ==. >. >=. ||. Language.Atom.Language<== atpATP.FOL /\<=><~>=/======>?= \/|-~= atp-haskellData.Logic.ATP.Equate.=.Data.Logic.ATP.Formulas⊤ ⊥ Data.Logic.ATP.Lib|-> |=> ∅ Data.Logic.ATP.Lit.~.¬Data.Logic.ATP.Pretty<>Data.Logic.ATP.Prop.&. .<=>. .=>. .|. :&: :<=>: :=>: :|: <==><=>==>· →↔⇒⇔∧∨⊃Data.Logic.ATP.Quantified:!: :?: ∀∃ attoparsecData.Attoparsec.ByteString Data.Attoparsec.ByteString.Char8.*> <*. Data.Attoparsec.ByteString.LazyData.Attoparsec.CombinatorData.Attoparsec.Internal.Types<>Data.Attoparsec.Text.*> <*. Data.Attoparsec.Text.Lazy.*> <*. attoparsec-parsecData.Attoparsec.Text.Parsec attoparsec-textData.Attoparsec.Text.*> <*.  authoringText.Authoring.Label./ <> auto Control.Auto-->-?>Control.Auto.Blip&><&mergeLmergeRControl.Auto.Blip.InternalmergeLmergeRControl.Auto.Interval<|!><|?>compIControl.Auto.Switch-->-?> autodocodec Autodocodec.=   Autodocodec.Codec.=   autoprocAutoproc.Classifier% .&&. .||. aviation-weight-balanceData.Aviation.WB.Arm.ArmRange.->.avroData.Avro.Encoding.ToAvro.= awesome-preludeAwesomePrelude$> & awsAws.Iam.Internal<>aws-arnNetwork.AWS.ARN.Internal.Lens.~^.^?aws-ec2 Aws.Query+++ aws-sdk-xml-unorderedCloud.AWS.Lib.Parser.Unordered.- .< .= axiomGHCJS.HPlay.Cell.=GHCJS.HPlay.View++>++.~<$<$!><$><*<**><*><.><=<<><|>=<<>=>>>>>=\\^.elemnotElembackpropNumeric.Backprop%~~.~~^^.^^.. ^^?^^?!Numeric.Backprop.Num%~~.~~^^.^^.. ^^?^^?!Numeric.Backprop.Op**. *. +. -. /. :&~. Prelude.Backprop$><$<$>Prelude.Backprop.Num$><$<$>balkon/Data.Text.ParagraphLayout.ParagraphConstruction>| >|< |< |<>| ballast Ballast.Types-&- bamboo Bamboo.Helper^^ barbies Data.Barbie/*/*/base.Control.Applicative*><$<$><*<**><*><|> Control.Arrow &&&***+++<+><<<<<^>>>>>^^<<^>>|||Control.Category. <<<>>> Control.Monad<$<$!><=<=<<>=>>>>>=Control.Monad.Instances<$>>>>= Data.Bits!<<.!>>..&..<<..>>..^..|.rotaterotateLrotateRshiftshiftLshiftRxor Data.Bool&&|| Data.Complex:+Data.Eq/=== Data.FoldableelemnotElem Data.Function$&. on Data.Functor$><$<$><&>Data.Functor.ComposeCompose Data.Functor.Contravariant$<>$>$$<>$< Data.List!! ++\\elemnotElemData.List.NonEmpty!! :|<| Data.Monoid<>Data.Ord<<=>>= Data.Ratio%Data.Semigroup<>Data.Type.Bool&&||Data.Type.Equality:~::~~:==~~~ Data.Type.Ord<<=<=?>=>=?>? Data.Typeable:~::~~:GHC.Arr! // GHC.Base$$!*>++. :|<$<*<**><*><><|>=<<>>>>=GHC.Bits .&..|.rotaterotateLrotateRshiftshiftLshiftRxorGHC.Concparpseq GHC.Conc.Syncparpseq GHC.Desugar>>> GHC.Exts*#*##**## +#+##-#-##/##/=#/=##<#<##<=#<=##==#==##>#>##>=#>=##seq~~~ GHC.Float** GHC.Generics:*::+::.:GHC.IO.SubSystemGHC.List!! ++elemnotElemGHC.Num*+- GHC.OldList!! ++\\elemnotElemGHC.Real %/:% ^^%^ ^^^^%^^ divmodquotrem GHC.TypeError:$$::<>: GHC.TypeLits *+-:$$::<>:<=<=?DivMod^ GHC.TypeNats*+-<=<=?DivMod^Numeric**Prelude%!! $$!&&****>+++-. //=<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq||~Text.ParserCombinators.ReadP+++<++Text.ParserCombinators.ReadPrec+++ <++ Type.Reflection:~::~~: base-compatControl.Monad.Compat<$<$!><=<=<<>=>>>>>=Data.Bits.Compat!<<.!>>..<<..>>..^.Data.Function.Compat&Data.Functor.Compat$><$<&>Data.List.NonEmpty.Compat!! :|<|Data.Monoid.Compat<>Data.Semigroup.Compat<>Prelude.Compat$!! $$!&&****>+++-. //=<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq||base-compat-batteriesControl.Monad.Compat<$<$!><=<=<<>=>>>>>=Data.Functor.Compat$><$<&>Data.List.NonEmpty.Compat!! :|<|Data.Monoid.Compat<>Data.Semigroup.Compat<>Data.Type.Equality.Compat:~::~~:==~~ base-prelude BasePreludeN!! $$!$<$>%&&&&&&*******>++++++-. .&..|.//=:+:|:~::~~:<<$<$!><$><&><*<**><*><+><<<<<^<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>>>^Compose \\^^<<^>>^^divelemmodnotElemonparpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor|||||BasePrelude.DataTypes:+:|BasePrelude.Operators($$!$<$>%&&&**>+-. .&..|.//=<<$<$><&><*<**><*><=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=^^^||base-unicode-symbols Control.Applicative.Unicode∅ ⊛Control.Arrow.Unicode⁂⋘⋙⧻⫴Control.Category.Unicode∘ ⋘⋙Control.Monad.Unicode=≪↢↣≫≫=Data.Bool.Unicode¬ ∧∨⊻⊼⊽Data.Eq.Unicode≠≡≢Data.Foldable.Unicode∈∉∋∌Data.Function.Unicode∘ Data.List.Unicode ‼ ∆ ∈∉∋∌∖ ∩∪⧺Data.Monoid.Unicode∅ ⊕Data.Ord.Unicode≤≥≮≯Prelude.Unicode¬ ×÷‼ ∈∉−∘ ∣∤∧∨≠≡≢≤≥≮≯⊥ ⋅⧺basement Basement.Bits.&..<<..>>..^..|.rotateLrotateRBasement.Compat.Base$$!&&*>. /=<<$<$><*<*><=<>==>>=>>>>=seq||Basement.Compat.ExtList!! Basement.Compat.Semigroup<>Basement.Imports$$!&&*>. /=<<$<$><*<*><=<>==>>=>>>>=seq|| Basement.Nat*+-<=<=?^Basement.Numerical.Additive+!Basement.Numerical.Multiplicative*/^Basement.Numerical.Subtractive-Basement.Types.OffsetSize+. .==# Basement.Types.Word128* + - Basement.Types.Word256* + - basement-cd Basement.Bits.&..<<..>>..^..|.rotateLrotateRBasement.Compat.Base$$!&&*>. /=<<$<$><*<*><=<>==>>=>>>>=seq||Basement.Compat.ExtList!! Basement.Compat.Semigroup<>Basement.Imports$$!&&*>. /=<<$<$><*<*><=<>==>>=>>>>=seq|| Basement.Nat*+-<=<=?^Basement.Numerical.Additive+!Basement.Numerical.Multiplicative*/^Basement.Numerical.Subtractive-Basement.Types.OffsetSize+. .==# Basement.Types.Word128* + - Basement.Types.Word256* + - basenData.BaseN.Internal!!  basex-clientBaseXClient.Utils<$$> basic-prelude BasicPrelude++ CorePrelude"$$!&&&&& * ** *** *> + - . / /= < <$ <$><* <*> <.><= <><|> =<<== > >= >=>>> >>= ^^^on||bdcsBDCS.DB==?BDCS.Utils.Monad>>?bddTest.Bdd^?= beamDatabase.Beam.Backend.Sqlite3++. Database.Beam.Query&&. /=. <. <=. ==. >. >=. ||. beam-coreDatabase.Beam.Query&&.&&?.**./=*./=./=?.<*.<-.<.<=*.<=.<|>.==*.==.==?.>*.>.>=*.>=.between_div_inQuery_in_like_mod_ similarTo_||.||?.Database.Beam.Schema.Tables:*: beam-postgresDatabase.Beam.Postgres!. !~*. !~. #> #>> ++. -&&- -&<- -&>- -*- -+- --|-- -.- -<<- -<@- -># ->$ ->># ->>$ ->>- -@> -@>- <@ <@- ? ?& ?| @> @@ ~*. ~. beam-thDatabase.Beam.TH.Internal<+><~>~> bearriver FRP.BearRiver-->-:>>-->=- FRP.Yampa&&&****^ +++-->-:><+><<<<<^>-->=->>>>>>^ >>^^+^^-^^/ ^<<^>>^>>> dot|||bed-and-breakfastNumeric.Matrix<-> <|> bench-showBenchShow.Internal.Pretty<+>bencodeData.BEncode.Parser<|> bencoding Data.BEncode.:.=!.=?<$>!<$>?<*>!<*>? benri-hspecTest.Hspec.BenriendsJustendsLeft endsRightendsThen berkeleydbData.BerkeleyDB! berp Berp.Base % * + - . / < <= =: == > >= @@ besoutBezout+: betweenData.Function.Between.Lazy<^@@^ <^@@^> <^@^ <^@^> <^@~ <~@@~ <~@@~> <~@~ <~@~> ^@@^ ^@@^> ^@^ ^@^> ^@~ ~$$~ ~$~ ~@@^ ~@@^> ~@@~ ~@@~> ~@~ ~@~> Data.Function.Between.Strict<^@@^ <^@@^> <^@^ <^@^> <^@~ <~@@~ <~@@~> <~@~ <~@~> ^@@^ ^@@^> ^@^ ^@^> ^@~ ~$$~ ~$~ ~@@^ ~@@^> ~@@~ ~@@~> ~@~ ~@~> %Data.Function.Between.Strict.Internal. bidirectional Data.IParser.= bifunctorControl.Categorical.Bifunctor<***><⁂> bifunctorsData.Biapplicative*>><<$>><<*<<**>><<*>>Data.Bifunctor.Functor:->bimap Data.Bimap! !> !? !?> binData.Wrd.&. .|. binary-communicatorData.BinaryCom+| binary-indexed-treeData.BinaryIndexedTree! Data.BinaryIndexedTree.ST! binary-parsersData.Binary.Parser binary-treeData.Tree.Binary.Leafy:*: binarydeferData.Binary.Defer<< <> >>= bio Bio.Sequence! Bio.Sequence.SeqData! ? biohazardBio.Adna:-> bang Bio.Bam.Rec:* Bio.Base:!:pow Bio.PreludeJ!! $$!$>%&&&&&&*******>++++++-. .&..|.//=:+:|:~::~~:<<$<$!><$><&><*<**><*><+><<<<<^<=<=<<><|>=<<==>>=>=>>>>>=>>>>>^\\^^<<^>>^^divelem hashWithSaltmodnotElemonparpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor||||| Bio.Streaming:><|>Compose Bio.Util.Numeric<#>bioinformatics-toolkitBio.RealWorld.ENCODE& |! |@ Bio.Utils.BitVector! bishbosh"BishBosh.Evaluation.QuantifiedGame<=>===BishBosh.Model.Game/~=~ bit-vectorData.Vector.Bit==~ bitcoin-hsBitcoin.Crypto.EC.Projective=~=bitcoin-payment-channelBitcoin.BIP32.DetDerive/:| Bitcoin.Internal.Util<>bitcoin-scriptingLanguage.Bitcoin.Miniscript.: bitsetData.BitSet.Dynamic\\ Data.BitSet.Generic\\ Data.BitSet.Word\\ bitstreamData.Bitstream !! appendelemnotElem∅ ∈∉∋∌⧺Data.Bitstream.Generic !! appendelemnotElem∅ ∈∉∋∌⧺Data.Bitstream.Lazy !! appendelemnotElem∅ ∈∉∋∌⧺bitwiseData.Array.BitArray! !!! !? // bitwise-enum Data.Enum.Set\\ Data.Enum.Set.Base\\ bizzleludePrelude*$$!$>&&&&&&> &>= *******>+-. //=<<$<$><&> <*<*><=<><|>==>>=>=>>>>>=>>>^^^divelemmodonquotrem|>|| bizzlelude-js Bizzlelude<&> |> blank-canvasGraphics.Blank#blasData.Matrix.Class.IMatrix<**> <*> Data.Matrix.Class.ISolve<\> <\\> Data.Tensor.Class.ITensor! *> // Data.Vector.Dense<.> blaze-html-contribText.Blaze.Extra!# !. blaze-markup Text.Blaze! !? Text.Blaze.Internal! !? blazeMarkerControl.Monad.FreeMarker $< $<< &~ +~ -~ <=~ <~ =~ >: >=~ >~ blazeT Text.BlazeT! !? Text.BlazeT.Internal! !? bleBluetooth.Internal.Types blubber-serverBlubber.Server.Vector^*^ ^+^ ^-^ ^/^ blucontrol Blucontrol!>Blucontrol.Monad.Control.Concat!>$Blucontrol.Monad.PrepareValue.Linear:.:|==>bludigonBludigon!>Bludigon.Control.Concat!>Bludigon.Gamma.Linear:.:|==> board-gamesGame.Mastermind.CodeSet#*&*& boardgame BoardgameunlessboltData.PackStream.!= .: .:? .= Database.Bolt.Protocol.Ver1#: #:? #= !Database.Bolt.Protocol.Ver1.Types#: #:? #= boltzmann-samplersBoltzmann.Data.Oracle#! ? ?! Boltzmann.Species<.> bookhoundBookhound.ParserCombinators<#><|>>>>|* |+ |++ |? bookkeeper Bookkeeper%:&=:?:Bookkeeper.Internal%:=:?: boolean-likeCombinator.Booly<&< <^> <|< >&>>|>boolexpr Data.BoolExpr/\ \/ boomboxData.Boombox.Boombox>-$ >-> @-$ @-> @.$ boomerangText.Boomerang.Combinators<>Text.Boomerang.ErrorText.Boomerang.HStack:-Text.Boomerang.Prim.~ Text.Boomerang.Strings Text.Boomerang.Texts boop Control.OOP-->==>Control.OOP.Base-->-->>==>>-->bootsControl.Monad.Factory<<<<>>>> boots-appBoots& boots-web Boots.Web:.boundBound=<<<>>>= Bound.Class=<<<>>>= bound-extras Bound.ScopeT>>>>= Control.Monad.Module>>== bound-simple Bound.Simple>>>= bounded-arrayData.Array.Bounded! // box Box.Codensity<$|><*|>boxesText.PrettyPrint.Boxes/+/ // <+> <> bpathPath Path.Internal breakpointDebug.Breakpoint.GhcFacade!$$ $+$ *><$><*<*><+> <.> <> SynFunasJoinIdasJoinId_maybeconsBag idCafInfo mkCoreApp mkCoreAppsmkFunTy mkInvisFunTymkInvisFunTyMany mkVisFunTymkVisFunTyMany setIdAritysetIdCallArity setIdCprInfosetIdDemandInfo setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdStrictnesssetIdUnfoldingsetInlineActivationsetInlinePragmasnocBagbrick Brick.Forms@@= Brick.TypeszoomBrick.Widgets.Core<+> <=> bricks Bricks.Term/@@\ /@\ |-> bricks-internalBricks.Internal.Prelude<&>Bricks.Internal.Seq<||> bricks-syntaxBricks.Expression.Construction&<>brittany9Language.Haskell.Brittany.Internal.Config.Types.Instances.:?= *Language.Haskell.Brittany.Internal.Prelude.$$!$>%&&&&&&*******>+++-. //=:|<<$<$!><$><*<*><<<<=<=<<><|>=<<==>>=>=>>>>>=>>>^divelemmodnotElemquotremseq||/Language.Haskell.Brittany.Internal.PreludeUtils.> <&!> <&>broadcast-chan-testsBroadcastChan.Test@=?@?@?=bson Data.Bson!? :==:=?btc-lsp BtcLsp.Import;$$!$!!$>%%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodquotremseqxor||BtcLsp.Import.External;$$!$!!$>%%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodquotremseqxor||BtcLsp.Import.Psql!=.&&.+=./=.<.=.==.>.>=.?. FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. ||. BtcLsp.Yesod.Import.NoFoundationP!=.$$!$!!$$$$+$$++$$+-$=$=+$>%&&&&&*******=.*>++++=.--=.. .: .=.|//<-./=/=.:#: <<$<$><&&><&><*<**><*><-.<.<.><=<=.<=<<><|<|><||>=$=$$+=$$++=$$+-=$==.=<<====.>>.>=>=.>=>>>>>=\\ ^^^div hashWithSaltmodonquotremseq||||. buchhaltungBuchhaltung.Utils<&>Buchhaltung.ZipEdit2?? buffer-builderData.BufferBuilder.Json.=.=#rowbuffon-machinesData.Buffon.Machine/\ \/ bugzillaWeb.Bugzilla.Search .&&. ./=. ./=~. .<. .<=. .==. .=~. .>. .>=. .||. bugzilla-redhatWeb.RedHatBugzilla.Search .&&../=../=~. .<..<=..==..=~. .>..>=..||. buildableData.Buildable<| |> buildboxBuildBox.Data.Log<| >< |> BuildBox.Pretty% %% bulletPhysics.Bullet.Raw.C2HS .&..|.rotaterotateLrotateRshiftshiftLshiftRxor bulletproofsBulletproofs.Utils^+^ ^-^ busterApp.DebugEventBus<~< >~> |~| App.EventBus<~< >~> |~| bvData.BitVector!. #/=.<.<<.<<<.<=.==.>.>=.>>.>>>.@. @: @@ ashrrolrorsgesgtshlshrsleslt bytebuildData.Bytes.Builder.Boundedappend bytesmithData.Bytes.ParserorElseData.Bytes.Parser.Rebindable>> >>= bytestringData.ByteString!? conssnocData.ByteString.Builder.Prim>$<>*<%Data.ByteString.Builder.Prim.Internal>$<>*<Data.ByteString.Char8!? conssnocData.ByteString.Lazy!? conscons'snocData.ByteString.Lazy.Char8!? conscons'snocData.ByteString.Short!? conssnocData.ByteString.Short.Internal!? conssnocbytestringparser!Data.ParserCombinators.Attoparsec 'Data.ParserCombinators.Attoparsec.Char8 *Data.ParserCombinators.Attoparsec.Internal bytestringparser-temporary!Data.ParserCombinators.Attoparsec 'Data.ParserCombinators.Attoparsec.Char8 *Data.ParserCombinators.Attoparsec.Internal bytestringreadp'Text.ParserCombinators.ReadP.ByteString+++ <++ c-dslLanguage.C.DSL.Decl.= Language.C.DSL.Exp ! # & &* /=: <-- <: <=: ==: >: >=: cabal-cache HaskellWorks.CabalCache.Location<.> cabal-debianDebian.Debianize.?= Debian.Debianize.Prelude! .?= cabal-fmtCabalFmt.Prelude&&&&on cabal-installDistribution.Client.Utils.Json.=Distribution.Deprecated.ReadP+++<++cabal-install-solver"Distribution.Solver.Compat.Prelude)!! $$!&&****>+++-. //=:|<<$<$><*<*><+><<>> <=<><|>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq||#Distribution.Solver.Modular.Version.&&. .||. cabal-queryDistribution.Query:& :| cafeteria-prelude Prelude.Basic$ . Prelude.List.Partial!! Prelude.List.Total++ Prelude.Number.Float** Prelude.Number.Num* + - Prelude.Number.Real/ ^ ^^ Prelude.Source.Control.Monad=<< Prelude.Source.GHC.Base$ ++ . >> >>= Prelude.Source.GHC.Classes&& /= < <= == > >= || Prelude.Source.GHC.Float** Prelude.Source.GHC.List!! Prelude.Source.GHC.Num* + - Prelude.Source.GHC.Real/ ^ ^^ Prelude.Source.Prelude$! Prelude.Strict$! Prelude.TypeClass /= < <= =<< == > >= >> >>= caffegraphNN.Graph>- >-> cairo-canvasGraphics.Rendering.Cairo.Canvas!@ cake Cake.Actions++? Cake.Core==> cake3Development.Cake3.=  System.FilePath.Wrapper.=  calamityCalamity.HTTP.Internal.Request=:? Calamity.HTTP.Internal.Route//Calamity.Internal.SnowflakeMap! Calamity.Internal.Utils.= .?= <.><<$>><<*>>calamity-commandsCalamityCommands.Internal.Utils<.><<$>><<*>>caldimsLanguage.CalDims.Helpers#&&# Language.CalDims.Types#*# #+# #-# #/# #==# #^# #~# camfortCamfort.Analysis<>Camfort.Analysis.Logger<>Camfort.Helpers.Vec!! )Camfort.Specification.Stencils.PartialOrd/= < <= == > >= Language.Fortran.Model.Util*.. ..* <$$> can-i-hazControl.Monad.Except.CoHas<$<$!><=<=<<>=>>>>>=Control.Monad.Reader.Has<$<$!><=<=<<>=>>>>>=canonMath.NumberTheory.Canon7 <<<<<^>>>>> <<<<<^^>>>>> <<<<^>>>> <<<<^^>>>> <<<^>>> <<<^^>>> <<^>> <<^^>> <^ <^> <^^> >^ |<^>| |<^^>| ~<<<<^>>>>~ ~<<<^>>>~ ~<<^>>~ ~<^>~ ~^~ ~|<<<<^>>>>|~ ~|<<<^>>>|~ ~|<<^>>|~ ~|<^>|~ ~|^|~ ~~<<<<^>>>>~~ ~~<<<^>>>~~ ~~<<^>>~~ ~~<^>~~ ~~^~~ ~~|<<<<^>>>>|~~ ~~|<<<^>>>|~~ ~~|<<^>>|~~ ~~|<^>|~~ ~~|^|~~ ~~~<<<<^>>>>~~~ ~~~<<<^>>>~~~ ~~~<<^>>~~~ ~~~<^>~~~ ~~~^~~~ ~~~|<<<<^>>>>|~~~ ~~~|<<<^>>>|~~~ ~~~|<<^>>|~~~ ~~~|<^>|~~~ ~~~|^|~~~ ~~~~<<<<^>>>>~~~~ ~~~~<<<^>>>~~~~ ~~~~<<^>>~~~~ ~~~~<^>~~~~ ~~~~^~~~~ ~~~~|<<<<^>>>>|~~~~ ~~~~|<<<^>>>|~~~~ ~~~~|<<^>>|~~~~ ~~~~|<^>|~~~~ ~~~~|^|~~~~ ~~~~~^~~~~~ Math.NumberTheory.Canon.Simple%<^ >^ capabilityCapability.Accessors:.: capatazControl.Concurrent.Capataz&Control.Concurrent.Capataz.Lens&^.cartelCartel&&& ||| Cartel.Ast&&& ||| Cartel.Render<+> cas-storeData.CAS.ContentStore:^casa-abbreviations-and-acronyms:Data.Aviation.Casa.AbbreviationsAndAcronyms.Render.Spacing<-> cascadingData.CSS.Build$= case-insensitive-matchData.CaseInsensitive.Eq^/= ^== Data.CaseInsensitive.Ord^< ^<= ^> ^>= cassavaData.Csv.! .: .= cassetteText.Cassette.Prim--> <> <|> casterSystem.Log.Caster$:<:>System.Log.Caster.Core$:<:>System.Log.Caster.Monad$:<:>catalystControl.Category.Cartesian&&& ||| Control.Category.Monoidal*** +++ <+> categoriesControl.Category.Cartesian&&& ||| categoryControl.Categorical.Functor<$>Control.Categorical.Monad<=<=<==>=>=>category-extrasControl.Allegory.<=. Control.Category.Cartesian&&& ||| Control.Comonad.>> =>> Control.Functor.Zap>$< >>$<< Control.Monad.HigherOrder=**<< >>**= Control.Monad.Indexed=<<< >>>= Control.Monad.Parameterized=*<< >>* >>*= cayley-dicksonMath.CayleyDickson**. *. +. -. .* .+ .- /. cdar-mBoundData.CDAR.Dyadic:^cefSystem.Log.CEF<> cflpCFLP! :! ? CFLP.Constraints.Boolean.&&. .||. CFLP.Types.Bool=== CFLP.Types.List^: cfn-flipCfnFlip.Prelude%!! $$!&&****>+++-. //=<<$<$><*<*><=<=<<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq|| chalkboardGraphics.Chalkboard.Board*> <* <*> chalmers-lava2000Lava.Operators %% <#><&><==<==><=><|>==>>>== |-> Lava.Patterns->--|-charset Data.CharSet\\ chassisChassis$$>&&&&***. /=:&:. :|<<$<$><*><<<<<=<=<>=<<===>=>>$<>=>=>>>>>=>>>chattyText.Chatty.Interactor.<$. .|. Text.Chatty.Printer.>. .>>. Text.Chatty.Scanner.<. .<<. chatty-textText.Chatty.Parser?? ??? chatty-utilsData.Chatty.Hetero:-: Data.Chatty.ListBuilder>-< checkersTest.QuickCheck.Checkers.&.=-=Test.QuickCheck.Instances.Tuple>****< >***< >**< >*< chez-graterChez.Grater.Internal.Prelude<|>chiphunk Chiphunk.Low$=choraleChorale.Common.*.**.***<< chpControl.Concurrent.CHP.Alt<&> <->  Control.Concurrent.CHP.Parallel<|*|> <||> chp-plusControl.Concurrent.CHP.Arrow*&&&* ***** *<<<* *>>>* Control.Concurrent.CHP.Connect<=> <=>| |<=> |<=>| Control.Concurrent.CHP.Test=*= chp-specControl.Concurrent.CHPSpec.Alt<->  )Control.Concurrent.CHPSpec.LazySmallCheck>< \/ #Control.Concurrent.CHPSpec.Parallel<|*|> <||> chr-coreCHR.Types.Rule/\<==><=><=>> <\><\>> =!=!!==>==>> =@=|@=\!\/|>chr-dataCHR.Data.FastSeq:++: :+:: ::+: CHR.Data.Lens.FCLabels=$:=$^:=.=:^$=^* ^.^=CHR.Data.Lens.MicroLens=$:=$^:=:^$=^* ^.^=CHR.Data.VarMp varmpPlus|\> chr-pretty CHR.Pretty>#<>-#-<>-<>-|-<>|<chronosChronos... church-listData.Church.List!! \\ churrosControl.Churro&&&***<<<>>>Control.Churro.Types>>>> circle Circle.Types-&- citeproc-hsText.CSL.Eval.Names<+> Text.CSL.Eval.Output<++> Text.CSL.Output.Plain<+> <> claferLanguage.Clafer.Front.AbsClafer>- Language.Clafer.Generator.Concat+++'Language.Clafer.Intermediate.TypeSystem+++ clashCLasH.HardwareTypes! ++ +> <+ clash-libClash.Rewrite.Combinators!->>-!>-!->>->Data.Text.Prettyprint.Doc.Extra<+>clash-lib-hedgehogClash.Hedgehog.Core.Monad<|> clash-preludeClash.Class.BitPack! Clash.Class.BitPack.BitIndex! Clash.Class.Exp^ Clash.Class.HasDomain.Common:$$$::++::<<>>:Clash.Explicit.Prelude !! +++>>:<:><<+ConsseqVseqVXClash.Explicit.Prelude.Safe !! +++>>:<:><<+ConsseqVseqVXClash.Explicit.Signal.&&../=..<..<=..==..>..>=..||.Clash.HaskellPrelude!$$!&&****>+-. //=<<$<$><*<*><=<>=<<==>>=>>>>=^^divelemmodnotElemquotremseq|| Clash.Prelude!! +++>>.&&../=..<..<=..==..>..>=..||.:<:><<+<^> ConsregMayberegister registerBseqVseqVXClash.Prelude.BitIndex! Clash.Prelude.Mealy<^> Clash.Prelude.Safe !! +++>>:<:><<+<^> Cons registerBseqVseqVXClash.Promoted.NataddSNatdivSNatmodSNatmulSNatpowSNatsubSNat Clash.Signal .&&../=..<..<=..==..>..>=..||.regMayberegisterClash.Signal.Internal .&&../=..<..<=..==..>..>=..||.:-Clash.Sized.BitVector++# Clash.Sized.Internal.BitVector*# +# ++# -# Clash.Sized.Internal.Index*# +# -# Clash.Sized.Internal.Signed*# +# -# Clash.Sized.Internal.Unsigned*# +# -# Clash.Sized.Vector !! +++>>:<:><<+ConsseqVseqVXClash.Verification.DSL#|#|&||->|=>|||~>Clash.XExceptiondeepseqX defaultSeqXhwSeqX seqErrorXseqX clash-shake Clash.Shake|> classy-prelude ClassyPrelude/$$!$!!&&&&&*******>+++-. //=<<$<$><&&><*<**><*><.><=<=<<><|><||>=<<==>>=>=>>>>>=\\ ^^^div hashWithSaltmodonquotremseq||classy-prelude-conduitClassyPrelude.Conduit $$$$+$$++$$+-$=$=+.|=$=$$+=$$++=$$+-=$=clayClay# $= &** *= -: |~ ~= Clay.BoxbsColor Clay.Color*.+.-. Clay.Comments commenting Clay.Property! Clay.Selector # $= ** *= @= ^= |+ |= |> |~ ~= Clay.Size*@@*@+@@-@@/Clay.Stylesheet&-: ||> cleffCleff++:>:>>Cleff.Internal++Cleff.Internal.Monad:>:>>Cleff.Internal.Rec++:>clerkClerk+>|$||*||+||-||/||:||^| clevelandTest.Cleveland?-@/=@==@@/=@@==Test.Cleveland.Internal.Actions@/=@==@@/=@@==*Test.Cleveland.Internal.Actions.Assertions@/=@==@@/=@@==Test.Cleveland.Util?-clif Clif.Algebra*: .|./>/\<.><\ Clif.Internal*: .:clist Data.CList:.closedClosedequalsClosed.Internalequals clustering AI.Clustering.Hierarchical.Types! cmdargsSystem.Console.CmdArgs.Annotate&=+=:=:=+ System.Console.CmdArgs.Implicit&= +=:=System.Console.CmdArgs.Quote&=# cmdlibSystem.Console.CmdLib%% %+ %: %> +% <% <+< cmt Cmt.Utility co-log-coreColog.Core.Action &>*<<&<<==>>>$>$<>*>*<>|<cobot Bio.Chain! // cobot-ioBio.Sequence.Functions.Sequence! !? Bio.Utils.Map!?! Bio.Utils.Vector!?! code-builder Code.Build <++> <+> <+| <-> >< ><| |>+<| |>< |><| Code.Build.Haskell.=. Code.Build.JavaScript.=. Code.Build.PHP.=. Code.Build.Ruby.=. code-conjureConjure.Engine$$ -$--%- -&&--*--++--+--.- -.. -..- -... -...- -/=--:--<--<=--==>--?- -|- -||-// //- :$ Conjure.Expr$$ $$** $$|< -$--%- -&&--*--++--+--.- -.. -..- -... -...- -/=--:--<--<=--==>--?- -|- -||-// //- :$ >$$< codecControl.Monad.Codec=. codeforces-cliCodeforces.Logging<~> codeworld-api CodeWorld&<>CodeWorld.Reflex&<> coerce-utilData.Coerce.Util#. .# coercible-subtypesData.Type.Coercion.SubarrRprodRsumRcoercible-utilsCoercibleUtils#. .# CoercibleUtils.Compose#. .# cognimeta-utilsCgm.Control.Combinators./ .// ./// .//// Cgm.Control.InFunctor$* >$< Cgm.Data.Functor<$$> Cgm.Data.Monoid◊ coinbase-exchangeCoinbase.Exchange.Types.Socket.:?? coincident-root-lociMath.RootLoci.Geometry.Mobius./=. .<. .<=. .==. .>. .>=. collada-types#Graphics.Formats.Collada.Vector2D3D *. <>crossdotparvturnturnLturnNLturnNRturnRcollect-errorsControl.CollectErrors~! Control.CollectErrors.Type~! Numeric.CollectErrors~! collectionsData.Collections! // <| >< \\ |> Data.Map.AVL! \\ Data.Ranged.Boundaries/>/ Data.Ranged.RangedSet-!- -/\- -<- -<=- -?- -\/- Data.Set.AVL\\ Data.Set.Enum\\ Data.Trie! collections-apiData.Collections! // <| >< \\ |> colorful-monoidsData.Monoid.Colorful<>Data.Monoid.Colorful.Flat<> colorlessColorless.Client.Expr-< <.> <: <:> columbiaData.Columbia.CompoundData##. #. comark-parserComark.ParserCombinatorsComark.ParserCombinators.PrimcombinatMath.Combinat.ASCII=== ||| Math.Combinat.Permutations!!! multiplyPermutationcombinat-compatMath.Combinat.ASCII=== ||| Math.Combinat.Permutationsmultiplycombinator-interactiveData.Combinator:$ combobufferData.RingBuffer! Data.RingBuffer.Class! Data.RingBuffer.MapBuffer! Data.RingBuffer.SeqBuffer! comfort-arrayData.Array.Comfort.Boxed! // append"Data.Array.Comfort.Boxed.Unchecked! appendData.Array.Comfort.Shape::+Data.Array.Comfort.Storable! // append#Data.Array.Comfort.Storable.Private! // %Data.Array.Comfort.Storable.Unchecked! // append comfort-glpk Numeric.GLPK.*<=.==.>=.>=<. commander-cliOptions.Commander&+<+> commutativeData.Commutative<~> comonadControl.Comonad $><$<$><<=<@<@><@@>=<==>==>>@> compaRESTData.OpenApi.Compare.Paths<<<>>>SnocData.OpenApi.Compare.Subtree<<<>>> compact-mapData.CompactMap! compact-sequences!Data.CompactSequence.Deque.Simple:<conssnoc|>*Data.CompactSequence.Deque.Simple.Internal:<<| conssnoc|>!Data.CompactSequence.Queue.Simple:<snoc|>*Data.CompactSequence.Queue.Simple.Internal:<snoc|>!Data.CompactSequence.Stack.Simple:<<|cons*Data.CompactSequence.Stack.Simple.Internal:<<|conscompact-stringData.CompactString.Internal:*: compact-string-fixData.CompactString.Internal:*: comparseControl.Monad.Parser.Class<|>compdataData.Comp.Annotation:&::*:Data.Comp.Mapping&|->Data.Comp.Multi.Annotation:&:Data.Comp.Multi.HFunctor:->:.::=>Data.Comp.Multi.Mapping&|->Data.Comp.Multi.Ops:&::*::+::<::=:Data.Comp.Multi.Projection:*::<Data.Comp.Multi.Sum:+::<:Data.Comp.Multi.Variables&|-> Data.Comp.Ops:&::*::+::<::=:Data.Comp.Projection:< Data.Comp.Sum:+::<::=:Data.Comp.Thunk#>#>>Data.Comp.Variables&|->compdata-automataData.Comp.Automata&>*< |*| |->Data.Comp.MacroAutomata:^: compdata-dags Data.Comp.AG& >*< |*| |-> Data.Comp.Dag.AG& >*< |*| |-> Data.Comp.Dag.PAG& :*: >*< |*| |-> Data.Comp.PAG& :*: >*< |*| |-> compdata-fixplateData.Comp.Fixplate.:.:..::.::..::::+::<:compdata-paramData.Comp.Param.Annotation:&: :*: Data.Comp.Param.Multi.Annotation:&: :*: Data.Comp.Param.Multi.Ops:&: :*: Data.Comp.Param.Ops:&: :*: compensatedNumeric.Compensated*^ +^ complex-genericData.Complex.Generic:+ Data.Complex.Generic.Class*. .* .+/.composable-associationsData.ComposableAssociation:<> compose-ltr!Data.Function.Compose.LeftToRight$> .> <$ <. composite-baseComposite.Record:!::&:*::^: compositionData.Composition.*.**.***.****.*****.******.******* .********.:.:..::.::..:::.:::..::::.::::.∘ composition-extra Control.Monad.Syntax>>== >>=== >>==== >>===== >>====== Control.Monad.Syntax.Five=.===<< ==.==<< ===.=<< ====.<< =====<< Control.Monad.Syntax.Four=.==<< ==.=<< ===.<< ====<< Control.Monad.Syntax.Six=.====<< ==.===<< ===.==<< ====.=<< =====.<< ======<< Control.Monad.Syntax.Three=.=<< ==.<< ===<< Control.Monad.Syntax.Two=.<< ==<< Data.Function.Apply-$ --$ ---$ ----$ "Data.Function.Contravariant.Syntax-. -.* -.** -.*** -.**** -.***** -.****** -.******* -.******** -.: -.:. -.:: -.::. -.::: -.:::. -.:::: -.::::. Data.Function.Flip<----> <---> <--> <-> Data.Function.Slip<<~> <<~~> <<~~~> <~>> <~~>> <~~~>> Data.Function.Syntax ********. *******. ******. *****. ****. ***. **. *. Data.Function.Twist<<<~~>> <<<~~>>> <<<~~~>> <<<~~~>>> <<~~>> <<~~>>> <<~~~>> <<~~~>>> Data.Functor.Syntax/<$$$$$> <$$$$$~> <$$$$$~~> <$$$$$~~~> <$$$$> <$$$$~> <$$$$~~> <$$$$~~~> <$$$> <$$$~> <$$$~~> <$$$~~~> <$$> <$$~> <$$~~> <$$~~~> <$~> <$~~> <$~~~> <*.$> <.$$$$> <.$$$> <.$$> <.$> <.*$$$$> <.*$$$> <.*$$> <.*$> <.**$$$$> <.**$$$> <.**$$> <.**$> <~$$$$$> <~$$$$> <~$$$> <~$$> <~$> <~~$$$$$> <~~$$$$> <~~$$$> <~~$$> <~~$> <~~~$$$$$> <~~~$$$$> <~~~$$$> <~~~$$> <~~~$> composition-preludeControl.Composition &&:+>-$-..$.*.**.***.****.*****.******.@.@@.@@@.@@@@.@@@@@<&><**><-=**<<-=*<<=**<<=*<<=<<~@~<>-=**>>-=*>>=**>>=*>>=>on~@~compound-typesCompoundTypes.Lazy*+-/CompoundTypes.Strict*+-/ compstratData.Comp.Multi.Strategic+> >+> computational-algebraAlgebra.LinkedMatrix! <--> <||> Algebra.Matrix! <--> <||> Algebra.Prelude.Core%.*.Algebra.Ring.Ideal addToIdeal Algebra.Ring.Polynomial.Class!* *< *|< >* >|* divModPolynomial divPolynomial modPolynomialAlgebra.Scalar.*. computationsControl.Computation### +:+ -:- Control.Computation.Resourceful>^ >^^ ^> ^^> concatenativeControl.Concatenative&&. &. **. *. .&. .*. >>. >>@ concurrent-machinesData.Machine.Concurrent<~ <~< >~>~> condControl.Conditional <&&> <<| <| <||> ? ?. ?<> ?? |> |>> ⊲ ⊳ Data.Algebra.Boolean&& --> <--> || conductive-baseSound.Conductive.MutableMap+@ -@ ?@ conduino Data.Conduino&|.||.conduit Data.Conduit $$$$+$$++$$+-$=$=+.|=$=$$+=$$++=$$+-=$=Data.Conduit.Internal$$$$+$$++$$+-$=$=+.|<+< =$=$$+=$$++=$$+-=$=>+> conduit-findData.Conduit.Find=~ conduit-resumablesinkData.Conduit.ResumableSink+$$ ++$$ -++$$ conduit-vfsData.Conduit.VFS.Import& confererConferer.Config&Conferer.FromConfig/. Conferer.Key/. Conferer.Key.Internal/. config-iniData.Ini.Config.Bidir&.=.=? config-schemaConfig.Schema.Spec configifierData.Configifier:*> >>. configurationData.Configuration! <@> configuration-toolsConfiguration.Utils.CommandLine %::*>.::<$<$><*<**><*><|>Configuration.Utils.ConfigFile!..: %.:..:Configuration.Utils.Internal&<&>Configuration.Utils.Operators%<$<<*<>$>>*>×conkinConkin<$><*> connection-stringData.ConnectionString! connectionsData.Connection<<<>>>divideselectData.Connection.Cast<<<>>>divideselectData.Connection.Ratio:% Data.Lattice///\\/\\xor Data.Order /~<~>~?~pcomparepgtpltpmaxpmin~~Data.Order.Interval...Data.Order.Property<=>==>xorData.Order.Syntax /=<<===>>=compare comparingmaxminconstrained-categoriesControl.Applicative.Constrained<**><*>Control.Arrow.Constrained$&&&***+++ <<<>>>|||Control.Category.Constrained$~. $Control.Category.Constrained.Prelude$!! $$!$~&&***+++-. //=<<$><**><*><<<=<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq||0Control.Category.Constrained.Reified.PolyPattern:&&&:***:<<<:>>>Control.Category.Hask#!! $$!&&****>+++-//=<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq||Control.Functor.Constrained<$>Control.Monad.Constrained<<<=<=<<>=>>>>>=constrained-categoryControl.Category.Constrained∘ Data.Functor.Constrained<$>constrained-monadsControl.Monad.Constrained *> <$ <$><* <**><*> <=<<|> =<<>=>>>>>= Control.Monad.Constrained.Ap>>>>= Control.Monad.Constrained.IntSet\\ constraintData.Constraint\\ constraint-classesControl.ConstraintClasses! !? <$>:<*>:<|>:=<<:>>=: constraintsData.Constraint&&& *** :- :=> \\⊢ Data.Constraint.Deferrable:~::~~:Data.Constraint.NatDivModData.Constraint.Symbol++constraints-derivingData.Constraint&&& *** :- :=> \\⊢ constrictor Constrictor<$!>fmap'liftM' construct Construct*><$<*<+> <|>constructive-algebraAlgebra.Matrix!!! Algebra.Structures.ExplicitUnits%| ~= Algebra.Structures.Field Algebra.Structures.Group<+> Algebra.Structures.Module*> <* Algebra.Structures.Ring<*> <+> <-> <^> container-classesData.Containers!! ++ containersData.IntMap.Internal! !? \\ Data.IntMap.Lazy! !? \\ Data.IntMap.Strict! !? \\ Data.IntMap.Strict.Internal! !? \\ Data.IntSet\\ Data.IntSet.Internal\\ Data.Map.Internal! !? \\ Data.Map.Lazy! !? \\ Data.Map.Strict! !? \\ Data.Map.Strict.Internal! !? \\ Data.Sequence!? :<:<|:>:|><|><|>Data.Sequence.Internal!? :<:<|:>:|><|><|>Data.Sequence.Internal.SortingIQConsITQConsQConsTQConsData.Set\\ Data.Set.Internal\\ $Utils.Containers.Internal.StrictPair:*:containers-unicode-symbolsData.IntMap.Lazy.Unicode ∅ ∆ ∈∉∋∌∖ ∩∪Data.IntMap.Strict.Unicode ∅ ∆ ∈∉∋∌∖ ∩∪Data.IntSet.Unicode∅ ∆ ∈∉∋∌∖ ∩∪⊂⊃⊄⊅⊆⊇⊈⊉Data.Map.Lazy.Unicode ∅ ∆ ∈∉∋∌∖ ∩∪Data.Map.Strict.Unicode ∅ ∆ ∈∉∋∌∖ ∩∪Data.Sequence.Unicode∅ ⊲⊳⋈Data.Set.Unicode∅ ∆ ∈∉∋∌∖ ∩∪⊂⊃⊄⊅⊆⊇⊈⊉containers-verified Data.IntSet\\ contiguousData.Primitive.Contiguous<$ continueControl.Monad.Continue contra-tracerControl.Tracer>$contracheck-applicativeControl.Validation.Check :*?>?>>?~>?~>>testtest'test'_test_Control.Validation.Class+?+Control.Validation.Patch:* testPatch testPatch' testPatch'_ testPatch_contravariant-extrasContravariant.Extras>*< control-bool Control.Bool<&&> <&=> <|=> <||> control-dotdotdotControl.DotDotDot... … control-dsl Control.Dsl<=< =<< >=> >> >>= control-invariantsControl.Invariant!.##===Control.Precondition! control-monad-freeControl.Monad.Free<$!><=<=<<>=>>> >>= cookbook!Cookbook.Ingredients.Lists.Modify? coordinateData.Geodetic.LL<◦> copilot-coreCopilot.Core.Type.Equality=~= copilot-frp-sketchCopilot.FRPSketch.Internals=:@: copilot-language Copilot.Language.Operators.Array.!! "Copilot.Language.Operators.BitWise.&..<<. .>>. .^. .|."Copilot.Language.Operators.Boolean&&==> ||Copilot.Language.Operators.Eq/= == #Copilot.Language.Operators.Integral^ Copilot.Language.Operators.Ord< <= > >= !Copilot.Language.Operators.Struct# #Copilot.Language.Operators.Temporal++Copilot.Language.Prelude$$!****>+-. /<$<$><*<*><>=<<>>>>=^^elemnotElemquotremseqcopilot-librariesCopilot.Library.Utils!! core-programCore.System.Pretty<+>core-webserver-warpCore.Webserver.Router corneaCornea.Prelude<!!? $$!$!!$<$>&&&&&&&&^ ****>+++-. //=:|<<$<$!><$><&><*<**><*><<$>><<<<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>?:??Compose ^^^div hashWithSaltmodonquotremseqxor||||^ coroutine-objectControl.Monad.Trans.Crtn<==| couch-hsDatabase.CouchDB.ViewServer.Map.: .:? .= "Database.CouchDB.ViewServer.Reduce.: .:? .= craftwerkGraphics.Craftwerk.Core.Style<== <=> === ==> crdtData.Semilatticemergecrf-chain2-tiersData.CRF.Chain2.Tiers.Array!? critbitData.CritBit.Map.Lazy! \\ Data.CritBit.Set\\ crjdt-haskell Data.Crjdt&-< .>=: crypto-api Crypto.Util.::. crypto-classicalCrypto.Classical.Util|.| cryptolCryptol.TypeCheck.Parseable$$Cryptol.TypeCheck.Subst!$.$@@ Cryptol.TypeCheck.TCon:->Cryptol.TypeCheck.Type=#==/= >==tFunCryptol.TypeCheck.TypePat|%| |->| |-| |/=| |/| |=| |>=| |^| Cryptol.Utils.PP$$<+><.>Cryptol.Utils.Patterns&&& <~ >< ||| ~> ~~> csound-expression Csound.Base*><$<$><**><*><|> Csound.TypesequalsTo greaterThangreaterThanEqualslessThanlessThanEquals notEqualsTocsound-expression-typedCsound.Typed.Types.PrimequalsTo greaterThangreaterThanEqualslessThanlessThanEquals notEqualsTo css-selectorsCss3.Selector.Core.# .$= .*= .+ ... .: .:: .= .> .@ .^= .| .|= .~ .~= :.:: css-simpleCss? |> Css.Internal? |> csv-conduitData.CSV.Conduit.Conversion.! .: .= cubicbezierGeom2D$*^.^ Math.BernsteinPoly*~~*~+~- curl-aesonNetwork.Curl.Aeson... currency-convertData.Currency.Convert<|-|> curry-baseCurry.Base.LLParseComb<$-><$><**><*-><*><-*><.><\><\\><|><|?>optCurry.Base.LexCombthenPthenP_Curry.Base.Position@> Curry.Base.Pretty$++$ $-$ curry-frontend Base.Utils++!curvesGraphics.Curves+++ ++> +.+ <++ <-> <> >< Graphics.Curves.Attribute:= :~ custom-prelude CustomPrelude.: <&> <@> cybus Cybus.Mat.:.::.|.||cypherDatabase.Cypher.Lucene.&. .-. .<. .=. .>. .|. d10D10.Char.Arithmetic* + - D10.Num.Arithmetic* + - D10.Safe.Arithmetic* + - dagData.Graph.DAG.Edge.Utils:@-> :@->$### :@->$$### dahditDahdit:<|:|>darcs Darcs.Patch.Ident=/^\= =\^/= Darcs.Patch.RepoPatch=/\==\/=Darcs.Patch.V2.Non*> *>> >* >>* Darcs.Patch.V3.Core+| -| Darcs.Patch.Witnesses.Eq=/\==\/=Darcs.Patch.Witnesses.Ordered +<++<<++>++>>+:/\::<::>:>::\/::||: Darcs.Prelude#!! $$!&&****>+++-. //=<<$<$><*<*><=<>=<<==>>=>>>>=^^divelemmodnotElemquotremseq||Darcs.UI.Options.Core?^ Darcs.Util.Printer$$$+$<+><> darcs-betaDarcs.Patch.FileName/// Darcs.Patch.V2.Non*> *>> >* >>* Darcs.Witnesses.Eq=/\= =\/= Darcs.Witnesses.Ordered +<+ +>+ :/\: :< :<: :> :>: :\/: :||: Printer$$ <+> <>  data-accessor Data.Accessor%:%=.> <. =:^.^:^=Data.Accessor.Basic$%.> <. ^.^:^=Data.Accessor.MonadState%:%=data-accessor-monadLibData.Accessor.MonadLib%: %= data-accessor-monads-fdData.Accessor.Monad.FD.State%: %= data-accessor-monads-tfData.Accessor.Monad.TF.State%: %= data-accessor-mtlData.Accessor.Monad.MTL.State%:%=data-accessor-transformersData.Accessor.Monad.Trans.RWS%:%=Data.Accessor.Monad.Trans.State%:%= data-aviaryData.Aviary.Functional&&& *** *> +++ . .>> <$ <$> <* <**> <*> <<< <<^ <=< =<< =>> >=> >> >>= >>> >>^ ^<< ^>> ||| data-basic Data.Basic&&./=.<.<=.==.>.>=.||.Internal.Data.Basic.Compare&&./=.<.<=.==.>.>=.||. data-category Data.Category.Data.Category.CartesianClosed^^^ Data.Category.Coproduct:+++: Data.Category.Enriched.Functor%% :<*>: Data.Category.Enriched.Limit->> Data.Category.Functor% :% Data.Category.Limit&&&***+++|||#Data.Category.NaturalTransformation! data-diverseData.Diverse.Many.//./\.appendconsManysnocMany snocMany'Data.Diverse.Many.Internal.//./\.appendconsManysnocMany snocMany'data-diverse-lensData.Diverse.Profunctor.Many makeBesides makeBesidesKthenMake thenMakeKData.Diverse.Profunctor.Which chooseBetweenchooseBetweenK chooseWith thenChoose thenChooseK data-easy Data.Easy??$?&&?&&\?+?|@@ data-emoticonsData.PopCulture.Emoticons1*〃。・・。 //∇// //・// ^-^* ^∀^** ^∇^** ^◇^ °-°* °-°〃 °∇° °□° ´∀` ´・~・ ‐°‐ ≧∀≦ ⋟﹏⋞ ⋟~⋞ ┬──┬ ╥﹏╥ ╥~╥ ╯°□° ◉・・ ●・・ ★ ̄∀ ̄★ 〃´∀` 〃∇〃 〃▽〃 〃.. 〃。・・。 〃・〃 ・-・ ・.・ ・∀´ ・∀・ ・∇´ ・・ ・・? ・・?? ・・??? ・・; ・﹏・ ・~・ --~ .. ^∀^ ^∇^ ^~^ 。・・。  ̄^ ̄ data-filepath Data.FilePath data-filter Data.Filter<&&><||>==> =?= data-flags Data.Flags .*..+..-../~..<=..>=..~. containsAll containsNone containsSomedata-function-meldData.Function.Meld$$ $* *$ data-hasData.Has:*: data-indexData.List.Index!! data-intervalData.IntegerInterval/=!/=?/=??!>=!>=?>=??>?>?? Data.Interval/=!/=?/=??!>=!>=?>=??>?>??Data.IntervalMap.Lazy! \\ Data.IntervalMap.Strict! \\ data-lensControl.Category.Product*** Data.Lens.Common^! ^!%=^!*=^!+=^!-=^!/=^!=^$^$!^%%=^%=^*=^+=^-=^. ^/=^=Data.Lens.Lazy!%%=!%=!&&=!*=!+=!-=!/=!=!||=%%=%=&&=*=+=-=//=||=~=Data.Lens.Partial.Common ^$^%%=^%=^*=^+=^-=^. ^/=^=Data.Lens.Partial.Lazy %%= %= &&=*=+=-=//=||=~= Data.Lens.Strict!%%=!%=!&&=!*=!+=!-=!/=!=!||=%%=%=&&=*=+=-=//=||=~= data-lens-fd Data.Lens!%%=!%=!&&=!*=!+=!-=!/=!=!||=%%=%=&&=*=+=-=//=||=~=data-lens-lightData.Lens.Light!%=!=%=^. ~= data-namedData.Named.Tree<> data-pprint Data.PPrint=== data-sketches,DataSketches.Quantiles.RelativeErrorQuantile:< :<= data-sketches-coreBDataSketches.Quantiles.RelativeErrorQuantile.Internal.DoubleBuffer! FDataSketches.Quantiles.RelativeErrorQuantile.Internal.InequalitySearch:< :<= :> :>= 2DataSketches.Quantiles.RelativeErrorQuantile.Types:< :<= data-store Data.Store .&& ./= .: .:. .< .<= .== .> .>= .|| :. Data.Store.Internal.Type:. Data.Store.Selection.&& ./= .< .<= .== .> .>= .|| data-tensor Data.Tensor>< >?< ?<> ?>< data-timeout Data.Timeout# #<#> data-typeData.Type.TList:*: data-validationData.Validation =::asdclabelDCLabel.NanoEDSL./\. .\/. <> >< DCLabel.Safe./\. .\/. <> >< dclabel-eci11DCLabel.NanoEDSL./\. .\/. <> >< DCLabel.Safe./\. .\/. <> >< ddc-coreDDC.Type.Exp.GenericmakeTFun DDC.Type.Exp.Generic.CompoundsmakeTFun ~> DDC.Type.Exp.Simple$: kFun tFun tImpl DDC.Type.Exp.Simple.Compounds$: kFun tFun tImpl ddc-source-tetraDDC.Source.Tetra.ExpmakeTFun ~> DDC.Source.Tetra.Exp.CompoundsmakeTFun ~> dead-simple-jsonText.DeadSimpleJSON? Text.DeadSimpleJSON.Query? decidableData.Type.Predicate-->-->#-?>-?>#Data.Type.Predicate.Logic&&&<==>==>|||decision-diagramsData.DecisionDiagram.BDD.&&..<=>..=>..||.Data.DecisionDiagram.ZDD\\ deep-map Data.Map.Deep @! @!| @>@? @?? @??| @?| @|\\ deep-transformationsTransformation$Transformation.Deep<$>Transformation.Full<$>Transformation.Rank2<$>Transformation.Shallow<$> deepcontrolDeepControl.Applicative****-> ****-| ****| ***-* ***-*> ***-*| ***--> ***--| ***-> ***-| ***| **-* **-** **-**> **-**| **-*-> **-*-| **-*> **-*| **--* **--*> **--*| **---> **---| **--> **--| **-> **-| **| *-* *-** *-*** *-***> *-***| *-**-> *-**-| *-**> *-**| *-*-* *-*-*> *-*-*| *-*--> *-*--| *-*-> *-*-| *-*> *-*| *--* *--** *--**> *--**| *--*-> *--*-| *--*> *--*| *---* *---*> *---*| *----> *----| *---> *---| *--> *--| *-> *-| *>> *>>> *>>>> *>>>>> *| -* -** -*** -**** -****> -****| -***-> -***-| -***> -***| -**-* -**-*> -**-*| -**--> -**--| -**-> -**-| -**> -**| -*-* -*-** -*-**> -*-**| -*-*-> -*-*-| -*-*> -*-*| -*--* -*--*> -*--*| -*---> -*---| -*--> -*--| -*-> -*-| -*> -*| --* --** --*** --***> --***| --**-> --**-| --**> --**| --*-* --*-*> --*-*| --*--> --*--| --*-> --*-| --*> --*| ---* ---** ---**> ---**| ---*-> ---*-| ---*> ---*| ----* ----*> ----*| .* .** .*** .**** .***** <$| <****- <***- <***-* <***-- <**- <**-* <**-** <**-*- <**-- <**--* <**--- <*- <*-* <*-** <*-*** <*-**- <*-*- <*-*-* <*-*-- <*-- <*--* <*--** <*--*- <*--- <*---* <*---- <*| <-* <-** <-*** <-**** <-***- <-**- <-**-* <-**-- <-*- <-*-* <-*-** <-*-*- <-*-- <-*--* <-*--- <--* <--** <--*** <--**- <--*- <--*-* <--*-- <---* <---** <---*- <----* <<$| <<* <<*| <<<$| <<<* <<<*| <<<<$| <<<<* <<<<*| <<<<<$| <<<<<* <<<<<*| <| |$> |$>> |$>>> |$>>>> |$>>>>> |* |** |*** |**** |****- |***- |***-* |***-- |**- |**-* |**-** |**-*- |**-- |**--* |**--- |*- |*-* |*-** |*-*** |*-**- |*-*- |*-*-* |*-*-- |*-- |*--* |*--** |*--*- |*--- |*---* |*---- |*> |*>> |*>>> |*>>>> |*>>>>> |-* |-** |-*** |-**** |-***- |-**- |-**-* |-**-- |-*- |-*-* |-*-** |-*-*- |-*-- |-*--* |-*--- |--* |--** |--*** |--**- |--*- |--*-* |--*-- |---* |---** |---*- |----* |> DeepControl.Monadx---->= ---->~ --->-= --->-~ --->= --->>= --->>~ --->~ -->--= -->--~ -->-= -->->= -->->~ -->-~ -->= -->>-= -->>-~ -->>= -->>>= -->>>~ -->>~ -->~ -< ->---= ->---~ ->--= ->-->= ->-->~ ->--~ ->-= ->->-= ->->-~ ->->= ->->>= ->->>~ ->->~ ->-~ ->= ->>--= ->>--~ ->>-= ->>->= ->>->~ ->>-~ ->>= ->>>-= ->>>-~ ->>>= ->>>>= ->>>>~ ->>>~ ->>~ ->~ <-< >- >----= >----~ >---= >--->= >--->~ >---~ >--= >-->-= >-->-~ >-->= >-->>= >-->>~ >-->~ >--~ >-= >-> >->--= >->--~ >->-= >->->= >->->~ >->-~ >->= >->>-= >->>-~ >->>= >->>>= >->>>~ >->>~ >->~ >-~ >>---= >>---~ >>--= >>-->= >>-->~ >>--~ >>-= >>->-= >>->-~ >>->= >>->>= >>->>~ >>->~ >>-~ >>== >>=> >>>--= >>>--~ >>>-= >>>->= >>>->~ >>>-~ >>>= >>>=> >>>>-= >>>>-~ >>>>= >>>>=> >>>>>= >>>>>=> >>>>>~ >>>>~ >>>~ >>~ DeepControl.Monad.Morph5|*****| |****| |***-*| |***| |**-**| |**-*| |**--*| |**| |*-***| |*-**| |*-*-*| |*-*| |*--**| |*--*| |*---*| |*| |-****| |-***| |-**-*| |-**| |-*-**| |-*-*| |-*--*| |-*| |--***| |--**| |--*-*| |--*| |---**| |---*| |----*| |<<<<<| |<<<<| |<<<| |<<| |<| |>=> |>>= |>>=> |>>>= |>>>=> |>>>>= |>>>>>= |>>>>>| |>>>>>~ |>>>>| |>>>>~ |>>>| |>>>~ |>>| |>>~ |>| |>~ DeepControl.Monad.Trans.Identity9*****: ****-: ****: ***-*: ***--: ***-: ***: **-**: **-*-: **-*: **--*: **---: **--: **-: **: *-***: *-**-: *-**: *-*-*: *-*--: *-*-: *-*: *--**: *--*-: *--*: *---*: *----: *---: *--: *-: *: -****: -***-: -***: -**-*: -**--: -**-: -**: -*-**: -*-*-: -*-*: -*--*: -*---: -*--: -*-: -*: --***: --**-: --**: --*-*: --*--: --*-: --*: ---**: ---*-: ---*: ----*: deeplearning-hsDeepLearning.ConvNet>-> deepseqControl.DeepSeq$!!<$!!>deepseqdefinitive-base Algebra.Applicative*> <* <**> <*> Algebra.Arrow>>^ ^>> Algebra.Classes<*> =>> >>= Algebra.Core $^ & * + +++ - . / <#> <<< <|> >>> Algebra.Functor:**: <$ <$> <&> ||| Algebra.Lens %%- %%~ %- %~ -. .+ .- <.> ^. ^.. ^? ^?? Algebra.Monad.Base<*= <=< =<< >=> >> >>>= >>>>= Algebra.Monad.Cont>>~ Algebra.Monad.Error!+ Algebra.Monad.State=- =~ ^>= Data.Containers# #? *>>> Data.Containers.Sequence++ definitive-parserLanguage.Parser<*< <+> >*> definitive-reactive Data.Reactive// <*|> <|*> dejafu#Test.DejaFu.Conc.Internal.Threading~= Test.DejaFu.Refinement->- === =>= dense Data.Dense*^^*^+^^-^^/Data.Dense.Boxed! !? // Data.Dense.Generic! !? // Data.Dense.Storable! !? // Data.Dense.Unboxed! !? // dep-tDep.EnvCompose Dep.Phases>> >>= Compose dep-t-advice Dep.Advice:*And Dep.IOAdvice:*AndDep.ReaderAdvice:*AndDep.SimpleAdvice:*Anddependent-hashmapData.Dependent.HashMap! :=> dependent-mapData.Dependent.Map! \\ Data.Dependent.Map.Internal:*: dependent-sumData.Dependent.Sum:=>==>derivation-treesDerivationTrees! <> DerivationTrees.CPTS+: :- === deriveData.Derive.DSL.HSE<**<++><+?><^^>=~= ?~= Language.Haskell<**<++><+?><^^>=~= ?~= Language.Haskell.TH.Helper &&: &&:: ++: ++:: ->: .: .:: ==: >: >>: >>:: >>=: derive-gadt"Language.Haskell.Derive.Gadt.Unify.->. |.| deriving-compatData.Deriving.InternalViaData.Deriving.ViaViaderiving-trans!Control.Monad.Trans.Compose.Infix..>./>.|>!Control.Monad.Trans.Compose.Stack:..>:.|>derp Text.Derp<|> <~> ==> derp-libText.Derp.Combinator<~ ~> dhallDhall.Deriving<<<Dhall.Marshal.Encode>$<>*<>|<dia-baseGraphics.Diagrams*. .*. .+. .-. <|> >-< ~~ diagramsGraphics.Rendering.Diagrams## // <> #Graphics.Rendering.Diagrams.Layouts## // <> !Graphics.Rendering.Diagrams.Types*. .*. .+. .-. diagrams-contrib Diagrams.TwoD.Layout.Constrained=.======^='Diagrams.TwoD.Path.Metafont.Combinators-..-.--. diagrams-core Diagrams.Core*. .>.>>:-:<-> atopDiagrams.Core.Names.>.>>Diagrams.Core.Points*. Diagrams.Core.Transform:-:<-> Diagrams.Core.Typesatop diagrams-lib Diagrams.Angle@@Diagrams.CombinatorsatopbeneathDiagrams.Coordinates:&^&Diagrams.LocatedatDiagrams.Names.>.>>Diagrams.Points*. Diagrams.Prelude#%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*>*~+=+~-=-~.=.@=.@~.~//=//~:<:>:~:<#%=<#%~<#=<#~<$<$><%=<%@=<%@~<%~<&&=<&&~<&><*<**=<**~<*=<*><*~<+=<+~<-=<-~<. <.=<.~=<<<>~<<>=<<>~<=<>~$?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingmagnifysnoczoom|>||=||~Diagrams.TrailLike~~ Diagrams.TwoD===|||Diagrams.TwoD.Combinators===||| Diagrams.Util###dialogDialog<> diff-locDiffLoc.Interval:.. DiffLoc.Shift.+.-.? DiffLoc.Unsafe.-.difference-monoidData.Monoid.Diff:-: Data.Monoid.Diff.Internal:-: digestive-functorsText.Digestive.Form.:Text.Digestive.Form.Internal.: dimensionalNumeric.Units.Dimensional ****~*~~+-//~/~~^^/.Numeric.Units.Dimensional.Dimensions.TermLevel*/^.Numeric.Units.Dimensional.Dimensions.TypeLevel*/^!Numeric.Units.Dimensional.Dynamic* *~ / /~ ^ $Numeric.Units.Dimensional.FixedPoint **~*~~+-//~/~~^!Numeric.Units.Dimensional.Prelude)!! $$!&&****>*~*~~+++-. //=/~/~~<<$<$><*<*><=<>=<<==>>=>>>>=^^/^^divelemmodnotElemquotremseq||#Numeric.Units.Dimensional.UnitNames*/^"Numeric.Units.Dimensional.Variants*dimensional-tfNumeric.Units.Dimensional.TF ****~*~~+-//~/~~^^+^/ dimensionsData.Type.List+++::+Data.Type.Lits*+-:$$::<>:DivMod^Numeric.Dimensions:- \\Numeric.Dimensions.Dim*+-:*^Numeric.Dimensions.Idx:*Numeric.Tuple.Lazy!*$**!*$:!:$:*Numeric.Tuple.Strict!*$**!*$:!:$:*Numeric.TypedList:* dingo-coreDingo.Selector.+. .>*. .>. .~. dinoDino.Expression&&-->./ /=:-><<++> <. <=====!>>=||Dino.Interpretation:×: Dino.Prelude!! $$!****>+++-. /<$<$><*<*><>=<<>>>>=^^^divelemmodnotElemquotremseqdirectory-treeSystem.Directory.Tree:/ dirtreeSystem.DirTree.* .*. .*> ./ discoDisco.Effects.State%=.= Disco.Names.- Disco.Pretty.DSL$+$ <+> <> Disco.Subst@@ |-> Disco.Types:*::+::->: Disco.Util! ==> discokitty Discokitty@@@ !Discokitty.Examples.LesJustesMain? discord-haskellDiscord.Internal.Rest.Prelude/?Discord.Internal.Types.Prelude.== .=? Discord.Types.== .=? discrete-intervals Data.Interval++? +/-.../=! /=? ! >=! >=? >? ||? distributed-closureControl.Distributed.Closure/->distributed-process-fsmControl.Distributed.Process.FSM*> .| <| ^. |> ~> ~? ~@ distributed-process-lifted"Control.Distributed.Process.Lifted.: distributionData.Distribution.CoreandThendistribution-opensuseOpenSuse.Prelude)!! $$!&&&&^ ****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||||^ ditto Ditto.Core@$dixiDixi.API|: djinn-libDjinn.LJTFormula&:-><->|:dlist Data.DListcons snoc Data.DList.DNonEmpty:|cons snoc dlist-nonemptyData.DList.NonEmptycons snoc dmcc DMCC.Prelude1$$!$!!$>&&&&&*******>+++-. //=<<$<$><&&><&><*<**><*><.><=<=<<><|<|><||>=<<==>>=>=>>>>>=\\ ^^^div hashWithSaltmodonquotrem||dmenuDMenu.= do-notationLanguage.Haskell.DoNotation>> >>= do-notation-dsl Control.Dsl>> >>= Control.Dsl.Do>> >>= doclayoutText.DocLayout$$$+$<+> docrecordsData.DocRecord %%~&:-. -/..~:|: <<$$>> <<|>> =:=:= ^^.^^?^^?! dollaridoos Data.Money $*$**$+$$-$$/$/$$^$^^*$domplate Text.Domplate<> dormouse-uriDormouse.Url.Builder&  =: ?dotgenText.Dot.->. dotparseDotParse<|>doveLanguage.Dove.Syntax&&. <. <=. ==. >. >=. ||. dovetailDovetail.FFI.Builder~>dph-lifted-copyData.Array.Parallel!: +:+ Data.Array.Parallel.Lifted$: $:^ Data.Array.Parallel.PArray!: +:+ Data.Array.Parallel.Prelude.Bool&& || "Data.Array.Parallel.Prelude.Double * ** + - / /= < <= == > >= !Data.Array.Parallel.Prelude.Float * ** + - / /= < <= == > >= Data.Array.Parallel.Prelude.Int * + - /= < <= == > >= !Data.Array.Parallel.Prelude.Word8 * + - /= < <= == > >= dph-lifted-vsegData.Array.Parallel!: +:+ "Data.Array.Parallel.Lifted.Closure$: $:^ Data.Array.Parallel.Prelude.Base * + - /= < <= == > >= Data.Array.Parallel.Prelude.Bool&& || "Data.Array.Parallel.Prelude.Double * ** + - / /= < <= == > >= Data.Array.Parallel.Prelude.Int * + - /= < <= == > >= !Data.Array.Parallel.Prelude.Word8 * + - /= < <= == > >= Data.Array.Parallel.Prim$: dph-parData.Array.Parallel!: +:+ Data.Array.Parallel.Lifted$: $:^ Data.Array.Parallel.PArray!: +:+ Data.Array.Parallel.Prelude&& || "Data.Array.Parallel.Prelude.Double/ !Data.Array.Parallel.Prelude.Float/ dph-prim-interfaceData.Array.Parallel.Unlifted+:+ dph-prim-parData.Array.Parallel.Unlifted+:+ dph-prim-seqData.Array.Parallel.Unlifted+:+ .Data.Array.Parallel.Unlifted.Sequential.Vector++ dph-seqData.Array.Parallel!: +:+ Data.Array.Parallel.Lifted$: $:^ Data.Array.Parallel.PArray!: +:+ Data.Array.Parallel.Prelude&& || "Data.Array.Parallel.Prelude.Double/ !Data.Array.Parallel.Prelude.Float/ dpor Test.DPOR&+& Test.DPOR.Schedule:| drClickOnControl.MonadicFRP:| <^> drinkeryData.Drinkery.Distiller$&+&++$++&dsmcDSMC.Util.Vector.* .^ <+> <-> >< dsp DSP.Basic^!dsvDSV<<<<<<- >-> >>>>>>- dualizerCategorical.Dual.Example<^< =>> >^> ducklingDuckling.Types.Document! dumb-casCAS.Dumb%$>&~!&~:&~?&~~!&~~::=:CAS.Dumb.Symbols%$>&~~!&~~:7CAS.Dumb.Symbols.Unicode.MathLatin_RomanGreek.Qualified%$>;CAS.Dumb.Symbols.Unicode.MathLatin_RomanGreek__BopomofoGaps%$> CAS.Dumb.Tree&~!&~:&~?:=:=:dunaiData.MonadicStreamFunction.Core>>>^ ^>>> #Data.MonadicStreamFunction.Parallel&|& *|* dunai-core#Data.MonadicStreamFunction.Parallel&|& *|* Data.MonadicStreamFunction.Util>>>^ ^>>> Data.VectorSpace*^ ^* ^+^ ^-^ ^/ dvdaDvda:* Dvda.FunGraph:* dwarf Data.Dwarf!? dwarf-el Data.Dwarf!? dynaDyna<@<@>|> dyna-brick Dyna.Brick&&**^+:+ .+^.-..-^/=*<*<+> <.><=*<=> <@<@>=:= ==*>*>=*^*^+^^-^^/||*Dyna.Brick.Frp<@<@> dyna-glossDyna.Gloss.Frp<@<@>dynamicDynamic! dynamic-cabal!Distribution.Client.Dynamic.Query=<<< >>>= dynamic-pipelineDynamicPipeline .*. :<+>:=>|=>|=>||>=>|>=>||>>|>>>DynamicPipeline.Channel|=>|=>||>=>|>=>|DynamicPipeline.Flow:<+>:=>DynamicPipeline.Stage|>>|>>> dynamic-pp Text.Format <$$> <$> <+>   <> dynamodb-simpleDatabase.DynamoDB<.>Database.DynamoDB.Filter&&./=.<.<=.==.>.>=.||.Database.DynamoDB.Update+=.-=.=. dzen-dhall DzenDhall.AST=>> dzen-utilsSystem.Dzen.Base+++ +-+ +/+ +<+ +=+ System.Dzen.Process## eachEach~! Each.Invoke~! easy-bitcoinNetwork.EasyBitcoin=== easy-fileSystem.EasyFile<.> easytensorNumeric.DataFrame.Contraction%*Numeric.DataFrame.SubSpace.!Numeric.DataFrame.Type! :*:*:Numeric.Matrix%*Numeric.Vector.*.·×easytestEasyTest/=====EasyTest.Internal/=====edeText.EDE.=Text.EDE.Filters@: Text.EDE.Internal.Filters@: Text.EDE.Internal.Types edenmodulesControl.Parallel.Eden# $# Control.Parallel.Eden.EdenConcHs# $# edis Database.Edis>>>edit Data.Edit<=<>=> effect-monadControl.Effect>> >>= Control.Effect.Parameterised>> >>= ,Control.Effect.Parameterised.ExtensibleState>> >>= &Control.Effect.Parameterised.SafeFiles>> >>= Control.Effect.Reader:-> Control.Effect.State:! :-> Control.Effect.Writer:-> effectful-coreEffectful.NonDet<|>effective-aspects-mzvAOP.Internal.OpenApp# effectsControl.Effects.State=:effinControl.Monad.Effect:+ :- eigen Eigen.Matrix! Eigen.SparseMatrix! eioEIO>> >>= electrs-clientElectrsClient.Import.External:$$!$!!$>%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodquotremseqxor||elevatorControl.Elevator*++* elisionControl.Arrow.Elision &&& *** +++ // />> <>^ ^<< ^>> ||| elm-compiler Elm.Utils<| |> elm-syntaxLanguage.Elm.Expression++ << <| >> |> elynx-toolsELynx.Tools.Equality=~= email-headerNetwork.Email.Header.DocemdNumeric.EMD.SiftsiftAndsiftOremgm Generics.EMGM:*: Generics.EMGM.Representation:*: endoData.Monoid.Endo.Fold&$ <&$> entwine Entwine.P!$$!$>&&&**>+-. /=<<$<$><*<**><*><=<><|>=<<==>>=>>>>=andAdivelemnotElemonorA|| enum-text-rioText.Enum.RIO.Fmt+|+|||+|++||++||||+||++|||++|| enumeratorData.Enumerator$$ $= <==< =$ =$= ==<< >==> >>== Data.Enumerator.Internal$$ <==< ==<< >==> >>== enumfunData.EnumFun.Lazy! Data.EnumFun.Strict! enummapmapData.EnumMapMap.Lazy:& Data.EnumMapMap.Strict:& Data.EnumMapSet:& enummapsData.EnumMap.Lazy! !? \\ Data.EnumMap.Strict! !? \\ Data.EnumSet\\ enummapsetData.EnumMap.Lazy! \\ Data.EnumMap.Strict! \\ Data.EnumSet\\ enummapset-thData.EnumMap.Lazy! EnumMap\\ Data.EnumMap.Strict! EnumMap\\ Data.EnumSet\\ enumsetData.EnumBitSet.&..-..|.envparseEnv<=<<>>=>envy System.Envy.!= .= epassControl.Concurrent.Mailbox.>  epic Epic.Epic!. +> @@ epollSystem.Linux.Epoll.Base=~ eq Data.Eq.Type:=Data.Eq.Type.Hetero:==equational-reasoningProof.Equational :- :/\::=::\/::~:=<=====>==~=BecausebecauseProof.Propositional/\\/ equivalenceData.Equivalence.Monad=== error-continuationsControl.Monad.Trans.EitherCont?> error-or-utilsData.ErrorOr.Validation/=!!>=! error-utilControl.Error.OperatorerrorsControl.Error.Util!? ?:?? ersaconcatData.Aviation.Ersa.Concat>.> ersatz Ersatz.Bit&&==>||Ersatz.Equatable/========# Ersatz.Orderable<=?<=?# =?>?Ersatz.Relation! escape-artistText.EscapeArtist/<>/^$espialImport.NoFoundationO!=.$$!$!!$$$$+$$++$$+-$=$=+$>&&&&&*******=.*>++++=.--=.. .: .=.|//<-./=/=.:#: <<$<$><&&><&><*<**><*><-.<.<.><=<=.<=<<><|<|><||>=$=$$+=$$++=$$+-=$==.=<<====.>>.>=>=.>=>>>>>=\\ ^^^div hashWithSaltmodonquotremseq||||. esqueletoDatabase.Esqueleto!=.% &&.*.*=.++.+.+=.-.-=././=.<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. ilikelike||.Database.Esqueleto.Experimental(!=.% &&.*.*=.++.+.+=.-.-=././=.:&<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. crossJoincrossJoinLateral fullOuterJoinilike innerJoininnerJoinLateralleftJoinleftJoinLaterallikeon rightJoin||.)Database.Esqueleto.Experimental.From.Join :& crossJoincrossJoinLateral fullOuterJoin innerJoininnerJoinLateralleftJoinleftJoinLateralon rightJoin$Database.Esqueleto.Internal.Internal!=.% &&.*.*=.++.+.+=.-.-=././=.:&<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. ilikelike||.Database.Esqueleto.Legacy!=.% &&.*.*=.++.+.+=.-.-=././=.<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. ilikelike||."Database.Esqueleto.PostgreSQL.JSON #-.#>.#>>.--.-.->.->>.<@.?&.?.?|.@>.||.essence-of-live-coding LiveCoding&&&***+++:~::~~:<+><<<<<^>>>>>>= >>>== >>^^<<^>>|||LiveCoding.Exceptions>>>= >>>== eternal Control.Eternal.Syntax.Operators<<| <| |> |>> euphoriaFRP.Euphoria.Event<$?><-*?><@ <@> <~~> evedWeb.Eved..<|> :<|>Web.Eved.Internal.<|> :<|>eveffControl.Ev.Eff:* event-list!Data.EventList.Relative.MixedBody.//.!Data.EventList.Relative.MixedTime.//. event-monadControl.Monad.Event.BasicEvents& &- ?: ?:: @: eventloopEventloop.Utility.Vectors|* |+| |-| |/ eventsourcingDatabase.CQRS.TabularData:~"Database.CQRS.TabularData.Internal:~ eventstoreDatabase.EventStore:|<>eventuo11y-dslObserve.Event.DSL≔Observe.Event.Syntax≔every-bit-countsGames+> PGames+> exact-realData.CReal.Internal *..*.*././^ mulBounded mulBoundedL plusIntegershiftLshiftRexhWeb.Exhentai.Utils!! ^..:^?: exhaustiveControl.Exhaustive&:exotic-list-monadsControl.Monad.List.Exotic<> "Control.Monad.List.NonEmpty.Exotic+++ <> exp-pairs Math.ExpPairs:/:<.<=.>.>=.Math.ExpPairs.LinearForm:/:expandUtils* + ? explainable-predicatesTest.Predicates==~ Test.Predicates.HUnit@?~ explicit-constraint-lens Lens.Explicit%%~%~&. .~^.Lens.Explicit.Core∘ explicit-exception)Control.Monad.Exception.Asynchronous.LazyappendappendMbindTcontinue continueM maybeAbortsimultaneousBindsimultaneousBindM+Control.Monad.Exception.Asynchronous.StrictappendappendMbindTcontinue continueM maybeAbortsimultaneousBindsimultaneousBindM#Control.Monad.Exception.Synchronous alternative alternativeTmergemergeTexplicit-sharingControl.Monad.Sharing.Classes? exposed-containers Data.IntMap.Base! \\ Data.IntMap.Lazy! \\ Data.IntMap.Strict! \\ Data.IntSet\\ Data.IntSet.Base\\ Data.Map.Base! \\ Data.Map.Lazy! \\ Data.Map.Strict! \\ Data.Sequence:< :> <| >< |> Data.Set\\ Data.Set.Base\\ Data.StrictPair:*: express Data.Express$$ // //- :$ Data.Express.Core$$ :$ Data.Express.Express -:->:->>:->>>:->>>>:->>>>>:->>>>>>: ->>>>>>>: ->>>>>>>>: ->>>>>>>>>: ->>>>>>>>>>: ->>>>>>>>>>>:->>>>>>>>>>>>:Data.Express.Fixtures-$--%- -&&--*--++--+--.- -.. -..- -... -...- -/=--:--<--<=--==--==>--?- -|- -||-Data.Express.Map// //- Data.Express.Utils.List+++Data.Express.Utils.TH|++| |=>| Data.Express.Utils.Typeable->:: expressionsData.Expression.&..->../=..<-..<->..|.Data.Expression.Arithmetic.*. .+..<..<=..>..>=..\.Data.Expression.Equality.=.Data.Expression.Parser !Data.Expression.Utils.Indexed.Sum:+:expressoExpresso.: .= extended-categoriesCategory. Category.Product:><: Functor:.: Monoidal<> Product&&& *** extended-containersData.AMT! !? <|><|> extensibleData.ExtensibleCompose Data.Extensible.Class:>Data.Extensible.Field<@=>@:>@=@==Data.Extensible.MatchcaseOfData.Extensible.Plain<%<%|Data.Extensible.Product++ happendData.Extensible.Sum<:|extensible-dataData.Extensible.Product:*= Data.Extensible.Sum:+? extensible-effectsControl.Eff.Extend^$ ^|> Control.Eff.Logic.Core! >>- extensible-skeletonData.Extensible.Effect@!? extensible-spData.Extensible.Product<& extism-manifest Extism.JSON.= .? .?? extraControl.Monad.Extra&&^ ||^ Data.List.Extra!? Data.List.NonEmpty.Extra!? |:|>Data.Tuple.Extra&&&***Extra!? &&&&&^ ***|:|>||^ extrapolateTest.Extrapolate+|:$ ==>><\/\\//Test.Extrapolate.Core+|==>><\/\\//Test.Extrapolate.Expr-&&-Test.Extrapolate.Generalizable*/=* *<* *<=* *==* Test.Extrapolate.TypeBinding==: Test.Extrapolate.Utils+++factoryFactory.Data.Exponential<^=~Factory.Data.Monomial<*><=>=~Factory.Data.Polynomial*=Factory.Data.PrimeFactors>*<>/<>^Factory.Data.Ring=*==+==-==^&Factory.Math.Implementations.Factorial!/!fadnoFadno.Notation/: Fadno.Note%@:|:fair-predicates Data.Answer/\ \/ fake Fake.Cover&>>=faktoryFaktory.Prelude'!! $$!&&****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||fallible Data.Fallible!?=!????=???falsifyTest.Falsify.Predicate.$ fast-downward FastDownward?= fast-loggerSystem.Log.FastLogger.Internal<>fastsumData.Sum:<:<:fayFay.Compiler.Prelude+!! $$!&&&&&*******>++++++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemnotElemonquotremseq|||||fay-base Data.Function<*> Data.Ratio% Data.Text<> Prelude !! $$!&&***+++-. //=<<=<=<=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||fay-hsxHTML:= fay-simplejson SimpleJSON.< .> fbFacebook#= fclabels Data.Label>-IsoforData.Label.Monadic=.=:Data.Label.PointIsoData.Label.Poly>-forfeldspar-languageFeldspar.BitVector++ Feldspar.Core:+ Feldspar.Core.Collection! Feldspar.Core.Frontend==== ===> Feldspar.Core.Frontend.Array|> Feldspar.Core.Frontend.Binding$< .< Feldspar.Core.Frontend.Bits.&. .<<. .>>. .|. ⊕ Feldspar.Core.Frontend.Complex+. Feldspar.Core.Frontend.Condition? Feldspar.Core.Frontend.Eq/= == Feldspar.Core.Frontend.Floating** Feldspar.Core.Frontend.Integral^ Feldspar.Core.Frontend.Logic&& &&* || ||* Feldspar.Core.Frontend.Ord< <= > >= Feldspar.Core.Types:> Feldspar.FixedPoint?! Feldspar.Lattice/\ \/ Feldspar.Matrix*** .* .+ .- Feldspar.Option Feldspar.Repa!: ++ ... :. Feldspar.Vector.Internal++ ... Feldspar.Vector.Push++ ffeedFriendFeed.Types.Import-=> fficxx#FFICXX.Generate.Util.HaskellSrcExtstyapptyfunfft Math.FFT.BasehasfglData.Graph.Inductive.Graph& Data.Graph.Inductive.Query.Monad><fieldsData.Record.Field.Basic.# =: =~ Data.Record.Field.Combinators # #$ *# <##> <#> <.#> <=: <=~ =* Data.Record.Field.Indexable#! #!! filemanipSystem.FilePath.Find &&? .&.? /=? /~? <=? =? >? ||? ~~? System.FilePath.GlobPattern/~ ~~ filepath System.FilePath-<.><.>System.FilePath.Posix-<.><.>System.FilePath.Windows-<.><.> System.OsPath-<.> <.>  #System.OsPath.Data.ByteString.Short!? conssnoc*System.OsPath.Data.ByteString.Short.Word16!? conssnocSystem.OsPath.Posix-<.> <.>  System.OsPath.Posix.Internal-<.><.>System.OsPath.Windows-<.> <.>  System.OsPath.Windows.Internal-<.><.>filepath-bytestring System.FilePath.Posix.ByteString-<.><.>"System.FilePath.Windows.ByteString-<.><.> filepather"System.FilePath.FilePather.Compose-<<-->>- System.FilePath.FilePather.Posix-<.> filepatternSystem.FilePattern?== filtrableData.Filtrable<$?><*?>fin-int Data.Fin.Int *! *% *? +! +% +? -! -% -? find-conduitData.Conduit.Find=~ fingertreeData.FingerTree:<:><|><|>fingertree-psqueueData.FingerTree.PSQueue:-> fingertree-tfData.FingerTree:< :> <| >< |> finiteFinite # #<< <<# \# |/=| |<=| |<| |==| |>=| |>| finite-tableData.Finite.Table! finite-typelits Data.FiniteequalsfinitoAI.Search.FiniteDomain.Int#/=#<#<=#=#>#>=/\\/first-class-familiesFcf $&&***--><$><*><=<=<<||Fcf.Combinators$<$><*><=<=<< Fcf.Data.Bool&&||Fcf.Data.Common***Fcf.Data.Function& Fcf.Utils-->first-class-instancesFCI==>FCI.Internal.Definitions==>first-class-patternsData.Pattern.Base->><|>Data.Pattern.Base.Tuple<+> Data.Pattern.Base.TypeList:++: Data.Pattern.Common-->-?>/\ \/ fitspecTest.FitSpec.Utils*** ... fixed-lengthData.FixedLength!: fixed-listData.FixedList:. fixed-pointData.Fixed.Binary*! *. /! /. fixed-vectorData.Vector.Fixed! fixerFixer:| fixplateData.Generics.Fixplate<$elemData.Generics.Fixplate.Functor:*::+:flacCodec.Audio.FLAC.Metadata=->flat Flat.Encoder<> flatbuffers FlatBuffers.Internal.Compiler.TH~> flatparseFlatParse.Basic<|>FlatParse.Basic.Parser<|>FlatParse.Stateful<|>FlatParse.Stateful.Parser<|> flexible-timeData.FlexibleTime.+ .- flowFlow!>.> flow-erControl.Flower.Applicative.Lazy*$>**$>*><$*<$**<*!Control.Flower.Applicative.Strict*$!>**$!>||<|>Control.Flower.Apply.Strict!<!>!Control.Flower.Compose.> <. Control.Flower.Functor.Lazy$><$Control.Flower.Functor.Strict$!>>$>>=<<$=<<$flpLanguage.Floorplan.Core.Syntax:# :+ ::: :@ :|| Language.Floorplan.ParserHappyStk Language.Rust.Data.Position# Language.Rust.Parser.NonEmpty<| |: |> Language.Rust.Pretty.Util<##> <#> <+>  fluid-idlFluid.Client.Expr-< <.> <: <:> fmtFmt+|+|||+|++||++||||+||++|||++||Fmt.Internal.Core+|+|||+|++||++||||+||++|||++||fnWeb.Fn!=> // /? ==> fn-extraWeb.Fn.Extra.Heist&= for-freeControl.ForFree:< foreign-var Foreign.Var$= $=! $~ $~! formatting Formatting% %+ %.<%+> Formatting.Internal% %+ %.<%+> Formatting.Internal.Raw<>forsyde-shallowForSyDe.Shallow.Core.Signal!-+-+-::-ForSyDe.Shallow.Core.Vector:><+><: fortran-srcLanguage.Fortran.AST:|Language.Fortran.AST.AListaConsLanguage.Fortran.PrettyPrint foscam-sortData.Foscam.Sort.FilenamePath/<>/ foundation Foundation$$!&&**>+-. //=<<$<$><*<*><=<><|>=<<==>>=>=>>>>>=^^^onseq||Foundation.Bits .&..<<. .>>. .|.rotaterotateLrotateRshiftshiftLshiftRxorFoundation.Check===Foundation.Collection! Foundation.Conduit.|Foundation.Numerical*+-/^Foundation.Parser<|>Foundation.VFS Foundation.VFS.Path fp-ieeeNumeric.Floating.IEEE*+-/ genericAdd genericDiv genericMul genericSubfpipe Control.FPipe$> .> <$ <. frameFrame-.- Frame.GUI+> <+ Frame.Model-.- Frame.Utilities? ?? Frame.View-.- fraxlControl.Monad.Fraxl|:|Control.Monad.Trans.Fraxl|:| freckle-appFreckle.App.Env<=<<>>=>Freckle.App.Prelude)$$!&&&&&*******>+++-. //=<<$<$$><$><*<*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||Freckle.App.Test4$$!&&&&&*******>+++-. //=<<$<$$><$><*<*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseqshouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith||freeControl.Alternative.FreeApControl.Comonad.Cofree:<Control.Comonad.Trans.Cofree:<free-categoriesControl.Category.Free. :<<:>>free-operationalControl.Alternative.Operational:<**> Control.Applicative.Operational:<**> Control.Monad.Operational.Simple:>>= Control.Monad.Trans.Operational:>>= Control.MonadPlus.Operational:>>= free-vector-spacesData.VectorSpace.Free *^.+^.-.<.>^*^ ^+^^-^^/!^/^free-vl Control.Monad.Free.VanLaarhovenE.:. freeludeFreelude.Impl.Classes *> . <$ <$><* <**><*> <<< =<<>> >>= >>> Freelude.Impl.ExoFunctor$$!freer Data.FTCQueue>< |> Data.Open.Union<$ freer-effects Data.FTCQueue>< |> freer-indexedControl.XApplicative*>:<**>:<*:<*>:Control.XMonad<$!>:<=<:=<<:>=>:>>:>>=:Control.XMonad.Do>>>>= freer-simpleControl.Monad.Freer~> Data.FTCQueue>< |> Data.OpenUnion:++:Data.OpenUnion.Internal:++: freesoundSound.Freesound.Search& fresco-binding Fresco.Entity#: fresnel Fresnel.Fold^?Fresnel.Getter^.Fresnel.Review#Fresnel.Setter %~**~*~+~-~.~/~^^~^~fresnel-fused-effectsFresnel.Effect%=*=+=-=.=//=<~?=fridayVision.Histogram! Vision.Image.Class! !? Vision.Primitive.Shape:. frisbyText.Parsers.Frisby####>*>->>////><$<$><*<**><*><++><<-<><|>frontText.Blaze.Front! !? Text.Blaze.Front.Internal! !? frp-arduino Arduino.DSL=:~> frpnowControl.FRPNow.BehaviorEnd.: Control.FRPNow.EvStream<@@> Control.FRPNow.Lib<@> Control.FRPNow.Time*^ ^+^ ^-^ ^/ fst FST.RRegTypes<*> <.> FST.RegTypes:&: :.: :|: <&> <-> <|> |> fudgets AllFudgets-*--+--==-=.> >#+< >#==< >*<>+#< >+<>..=<>.=<>=..<>=.<>==#< >==<>=^<>=^^<>^=<>^^=<ifCthenCConnectF:&: >&< Fudgets -*--+--==-=.> >#+< >#==< >*<>+<>==<>=^<>=^^<>^=<>^^=< full-sessionsControl.Concurrent.FullSession>>> >>>= funcmp FMP.Picture #& .&..--..-........|-||=|||||||| FMP.Types **.*./= .< .<= .=.== <*<+funcons-valuesFuncons.Operations=/= === functional-arrowControl.Arrow.Let<<<& Control.Arrow.Monad=<<< >>>= functor-applyData.Bifunctor.Apply.>> <<$>> <<. <<..>> <<.>> Data.Functor.Alt Data.Functor.Apply$> .> <$ <$> <. <..> <.> Data.Functor.Bind $> -<- -<< ->- .> <$ <$> <. <..> <.> >>- functor-combinatorsControl.Monad.Freer.Church:>>= Control.Natural.IsoF<~>~>Data.Functor.Combinator!$!!*!!+!:*::+:<~>ComposeT ~>!Data.Functor.Contravariant.Divise<:> Data.HBifunctor.Associative!$!!*!!+!Data.HFunctor.Route:<$>::>$<: functor-comboFunctorCombo.Functor:*: :*:! <~ ~> FunctorCombo.Pair:# FunctorCombo.Strict:*! FunctorCombo.StrictMemo! functor-infixData.Functor.Infix(<$$$$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$><$$$$$$$$$$$$$><$$$$$$$$$$$$> <$$$$$$$$$$$> <$$$$$$$$$$> <$$$$$$$$$> <$$$$$$$$> <$$$$$$$><$$$$$$><$$$$$><$$$$><$$$><$$><$><&&&&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&><&&&&&&&&&&&&&><&&&&&&&&&&&&> <&&&&&&&&&&&> <&&&&&&&&&&> <&&&&&&&&&> <&&&&&&&&> <&&&&&&&><&&&&&&><&&&&&><&&&&><&&&><&&><&>functor-monadicData.Functor.Monadic$> .> <$< <$=< >$> >=$> |> functor-productsData.Type.Functor.Product:&:&|Data.Type.Functor.XProduct::& functor-utilsData.Functor.Utils$|. .:.:..::.::.<$|><<$>><<*>><<<$>>><<<*>>> <<<<$>>>> <<<<*>>>> <<<<<$>>>>> <<<<<*>>>>><|$>Compose |$∘ ∘∘ ∘∘∘ ∘∘∘∘∘∘∘∘∘functorsData.Functor.Syntax& . .: .:: funflowControl.Funflow.ContentStore:^fungll-combinatorsGLL.ParserCombinators**>**>>><$$<$$><**<**><**>><**>>><::=<::=><:=<:=><<**><<<**<<<**><||>funpatLanguage.FunPat.Interface~> Language.FunPat.Match.=. :=: fused-effectsControl.Algebra:+:~<~Control.Algebra.Handler~<~Control.Effect.Choose<|>Control.Effect.NonDet<|>Control.Effect.Sum:+:fused-effects-lensControl.Effect.Lens%=*=+=-=.=//=<~?=fused-effects-opticsControl.Effect.Optics%=.=<~ ?=fused-effects-squealControl.Effect.Squeal$! !+!-!-!#-.&*: +!.! .#>.#>>.& .&&.-..->.->>./=.<.<=.==.>.>=.? .?& .?| .| .||:*::::=>:>><-> <@ >>>@> @@ fusionFusion>-> futharkFuthark.Analysis.HORep.SOAC:< :> <| |> Futhark.Analysis.PrimExp.&&..&. .<..<<. .<=..==..>..>=..>>. .^. .|. .||.~*~~+~~-~~/~~==~Futhark.CodeGen.ImpCode:>>: Futhark.CodeGen.ImpGen<--<~~Futhark.Util.Pretty fuzzcheckTest.FuzzCheck?> fuzzysetData.FuzzySet.Internal|>fwglFWGL.Graphics.Generic*~> -= := :~> ~~ ~~> FWGL.Graphics.Types:= :~> FWGL.Shader! # $ && * + - . / :- < <= == > >= ^ || FWGL.Shader.Language.Functions! # && * + - / /= < <= == > >= ^ || FWGL.Shader.Shader:- g4ip-proverG4ipProver.Proposition/\<==<=>==>\/ galois-fieldData.Field.Galois*^gaspAlgebra.Category. Algebra.Classes **^+-/=.=^^+divmodAlgebra.Linear*<<+> · × ⊗ ⊙ gcodehsData.GCode.Generate<#> Data.GCode.Types& gdp Data.Refined$: ... ...> ...? :::?Logic.Propositional &&-->/\AndImpliesOr\/||∧∨Theory.Equality====. gedcomData.Gedcom.Internal.Common<&>gelatin-shadersGelatin.Shaders.TypeLevel:& general-preludePrelude.General$! * + - / generic-dataGeneric.Data.Internal.CompatDiv"Generic.Data.Internal.Microsurgery%~Generic.Data.Microsurgery%~generic-data-surgeryGeneric.Data.Surgery:>>Generic.Data.Surgery.Internal:>>generic-deepseqControl.DeepSeq$!! generic-derivingGenerics.Deriving.Semigroupgsappend gsappend'gsappenddefaultgeneric-functor!Generic.Functor.Internal.Implicit:+Generic.Functor.Multimap:+generic-labelsData.Generic.Labels:= Data.Label:= generic-lensData.Generics.Internal.VL.~^.generic-lens-coreData.GenericLens.Internal?? 'Data.Generics.Internal.Families.Collect\\$Data.Generics.Product.Internal.HList:>(Data.Generics.Product.Internal.Positions generics-sop Generics.SOP-.->:*:.:AndCompose genericserialize$Data.Generics.Serialization.Standard=>> >>$ genvalidity-propertyTest.Validity.Property.Utils<==> ===> genvalidity-sydtest Test.Syd.Validity.Property.Utils<==> ===> geo-ukData.Geo.OSGM02Tab! geomancy Geomancy *^ .+^.-..-^^* ^+^^-^^/ dot Geomancy.Mat4!* Geomancy.Point.+^.-..-^Geomancy.Quaternion^* ^/ Geomancy.Swizzle.@ Geomancy.Transform!. Geomancy.Vec2^* ^/ Geomancy.Vec3^* ^/ Geomancy.Vec4^* ^/ Geomancy.Vector*^ ^* ^+^^-^^/ dotgf GF.Support+++++++++++++++- ++-GF.Text.Pretty$$$+$<+><> PGF.Haskell! !$ !* +++ghc GHC.Cmm.Graph<*> GHC.CoreAppmkAppsmkCoAppsmkTyApps mkVarApps GHC.Core.Make mkCoreApp mkCoreAppsGHC.Core.Map.Expr>.>|>|>>GHC.Core.TyCo.RepmkFunTy mkInvisFunTymkVisFunTyMany GHC.Core.TypemkFunTy mkInvisFunTymkVisFunTyMany GHC.Data.BagconsBagsnocBagGHC.Data.Graph.Inductive.Graph& GHC.Data.List.Infinite!! ++GHC.Data.MaybeorElseGHC.Data.OrdListappOLconsOLsnocOLGHC.Data.TrieMap>.>|>|>>GHC.HsToCore.Monad*><$><*<*> GHC.JS.Make.!.!=..!==..&&..<..<<. .<=..==..===..>..>=..>>. .>>>. .^.|. .||.|=||= GHC.PluginsasJoinIdasJoinId_maybe idCafInfomkFunTy mkInvisFunTymkVisFunTyMany setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragmaGHC.Prelude.Basic)!! $$!&& ****>+++-. .&..|.//= < <$<$><*<*><= =<<== > >= >>>>=^^^divelemmodnotElemquotremrotaterotateLrotateRshiftxor|| GHC.Tc.Gen.ExprSynFunGHC.Tc.Solver.CanonicalandWhenContinueGHC.Tc.Types.Evidence<.> GHC.Tc.Utils.TcTypeSynFun mkInvisFunTymkVisFunTyMany GHC.Types.IdasJoinIdasJoinId_maybe idCafInfo setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragmaGHC.Types.Id.Info setArityInfo setCafInfo setCprSigInfo setDemandInfo setDmdSigInfosetInlinePragInfo setOccInfosetOneShotInfo setRuleInfosetUnfoldingInfoGHC.Utils.Misc<&&><||>GHC.Utils.Monad*><$><*<*>GHC.Utils.Outputable$$ $+$ <+> <> GHC.Utils.Ppr$$$+$<+><>GHC.Wasm.ControlFlow<> ghc-bignumGHC.Num.Primitives&&#||#ghc-corroborateGHC.Corroborate$$ <+> <> thenCmp GhcApi.GhcPlugins($$ $+$ <&&><+> <> <||>AppasJoinIdasJoinId_maybe idCafInfomkAppsmkCoApps mkCoreApp mkCoreApps mkInvisFunTymkTyApps mkVarApps mkVisFunTy setArityInfo setCafInfo setDemandInfo setIdAritysetIdCallAritysetIdDemandInfo setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdStrictnesssetIdUnfoldingsetInlineActivationsetInlinePragInfosetInlinePragmasetLevityInfoWithTypesetNeverLevPoly setOccInfosetOneShotInfo setRuleInfosetStrictnessInfosetUnfoldingInfothenCmp ghc-dump-utilGhcDump.Pretty<$$> ghc-justdoit GHC.JustDoIt… GHC.LJT==> ghc-lib GHC.Cmm.Graph<*> GHC.Data.Graph.Inductive.Graph& GHC.HsToCore.Monad*><$><*<*> GHC.JS.Make.!.!=..!==..&&..<..<<. .<=..==..===..>..>=..>>. .>>>. .^.|. .||.|=||= GHC.PluginsasJoinIdasJoinId_maybe idCafInfomkFunTy mkInvisFunTymkVisFunTyMany setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragmaGHC.Tc.Gen.ExprSynFunGHC.Tc.Solver.CanonicalandWhenContinueGHC.Wasm.ControlFlow<> Language.Haskell.TH.CodeDo>> >>= ghc-lib-parserGHC.CoreAppmkAppsmkCoAppsmkTyApps mkVarApps GHC.Core.Make mkCoreApp mkCoreAppsGHC.Core.Map.Expr>.>|>|>>GHC.Core.TyCo.RepmkFunTy mkInvisFunTymkVisFunTyMany GHC.Core.TypemkFunTy mkInvisFunTymkVisFunTyMany GHC.Data.BagconsBagsnocBagGHC.Data.List.Infinite!! ++GHC.Data.MaybeorElseGHC.Data.OrdListappOLconsOLsnocOLGHC.Data.TrieMap>.>|>|>>GHC.Prelude.Basic*!! $$!&&****>+++-. .&..|.//=<<$<$><*<*><==<<==>>=>>>>=^^^divelemmodnotElemquotremrotaterotateLrotateRseqshiftxor||GHC.Tc.Types.Evidence<.> GHC.Tc.Utils.TcTypeSynFun mkInvisFunTymkVisFunTyMany GHC.Types.IdasJoinIdasJoinId_maybe idCafInfo setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragmaGHC.Types.Id.Info setArityInfo setCafInfo setCprSigInfo setDemandInfo setDmdSigInfosetInlinePragInfo setOccInfosetOneShotInfo setRuleInfosetUnfoldingInfoGHC.Utils.Misc<&&><||>GHC.Utils.Monad*><$><*<*>GHC.Utils.Outputable$$ $+$ <+> <> GHC.Utils.Ppr$$$+$<+><>Language.Haskell.TH.PprLib$$$+$<+><>ghc-mod GhcMod.Error modifyError'GhcMod.Options.DocUtils$$$$$ <$$><=><||>GhcMod.Options.Help\\ GhcMod.Pretty<+>:ghc-prim GHC.Classes&&/=<<===>>=||GHC.Prim*#*##**## +#+##-#-##/##/=#/=##<#<##<=#<=##==#==##>#>##>=#>=##seqGHC.PrimopWrappers*# *## **## +# +## -# -## /## /=# /=## <# <## <=# <=## ==# ==## ># >## >=# >=## GHC.Types~~~ ghc-proofs GHC.Proof=/====ghc-source-genGHC.SourceGen.Binds<--GHC.SourceGen.Expr@::@ GHC.SourceGen.Overloaded@@GHC.SourceGen.Type-->==>ghc-tcplugin-apiGHC.TcPlugin.API:-::|:mkVisFunTyManyGHC.TcPlugin.API.Internal:-::|:ghc-typelits-extraGHC.TypeLits.ExtraDivModghc-typelits-presburgerGHC.TypeLits.Presburger.Types :&&:*:+:-:/=:<:<=:==:>:>=:|| ghci-diagrams DrawDiagrams*. .*. .+. .-. <|> >-< ghci-hexcalc Data.GHex .%.&.++./.<<.>>.@.^.|ghcideDevelopment.IDE<+><>Development.IDE.GHC.Compat.CoremkFunTy mkInvisFunTymkInvisFunTyMany mkVisFunTymkVisFunTyMany%Development.IDE.GHC.Compat.Outputable$$ <+> Development.IDE.GHC.Compat.UtilorElse ghcjs-base Data.JSStringcons#Data.JSString.Internal.Fusion.Types:*: JavaScript.Array! JavaScript.JSON.Types.Instances.!= .: .:? .= JavaScript.JSON.Types.Internal! ^! ghcjs-base-stub Data.JSStringconsJavaScript.Array! ghcjs-hplayGHCJS.HPlay.Cell.=GHCJS.HPlay.View++> gingersnapGingersnap.Core.! .!? git-remote-ipfs$Network.IPFS.Git.RemoteHelper.Format% githubGitHub.Data.Content.=? GitHub.Internal.Prelude.!= .: .:? .=<><|> hashWithSalt github-dataGitHub.Data.Content.=? github-rest GitHub.REST.: :=GitHub.REST.KeyValue:=glambdaLanguage.Glambda.Util$$ glazierGlazier.Command.Exec orMaybeExecglibSystem.Glib.Attributes::=::~:=:=>:~:~>glircClient.State.Window:- gllGLL.Combinators.BinaryInterface**>**>>><$$<$$><**<**><**>><**>>><::=<::=><:=<:=><<**><<<**<<<**><||>GLL.Combinators.Interface**>**>>><$$<$$><**<**><**>><**>>><::=<::=><:=<:=><<**><<<**<<<**><||> glob-posixSystem.Directory.Glob<>global Data.Global=:: gloss$Graphics.Gloss.Data.Point.Arithmetic*+- gltf-codecCodec.GlTF.Prelude.!= .: .:? goal-core Goal.Core'$$!!&&&*******>++++-. .! .: .= <$<$!!><$!><$><*<**><*><<<<<^<=<=<<=?<|>=<<>=>>>>>=>>>>>^Div^^<<^>>on||| goal-geometryGoal.Geometry.Manifold#Goal.Geometry.Map>$> >.> Goal.Geometry.Map.Linear<$< <*<.< >$+> >$< >+> >.+> >.< Goal.Geometry.Vector#*.>/><.>goal-probabilityGoal.Probability.Conditional*<$<*<.<>$>*>.>* gofer-prelude Prelude.Gofer!! $ && * + ++ - . / /= < <= == > >= \\ ^ || gogolNetwork.Google! Network.Google.Auth.Scope! gogol-coreNetwork.Google.Data.JSON.!= .: .:? .=Network.Google.Prelude,!! #$$!&&****>+++-. .!= .: .:? .=//=:<|>:><<$<$><*<*><=<>=<<==>>=>>>>=^^.^^divelem hashWithSaltmodnotElemquotrem|| google-driveNetwork.Google.Drive.Search?!= ?&& ?< ?<= ?= ?> ?>= ?|| google-searchLanguage.Google.Search.Simple/\ \/ gore-and-ashControl.Wire.Core&&&! ***! Control.Wire.Event&> <& Control.Wire.Switch--> >-- gpsGeo.Computations/\ \/ grab Control.Grab/ graknGrakn-: .: <: grammar-combinators+Text.GrammarCombinators.Base.ProductionRule $>> $>>* $|>> $|>>* *>>> <||| >>> >>>* >||| ||| grammatical-parsers Text.Grampa<<|>grapefruit-frpFRP.Grapefruit.Signal#><#<#>sfApp*FRP.Grapefruit.Signal.Incremental.Sequence<| >< |> grapefruit-records Data.Record:& := Data.Record.Contextapp grapefruit-uiGraphics.UI.Grapefruit.Comp<<| >>| |<< |>> Graphics.UI.Grapefruit.Itemwithgraph-rewritingGraphRewriting.Pattern<|> %GraphRewriting.Pattern.InteractionNet:-: GraphRewriting.Rule>>> graph-traceGraph.Trace.Internal.GhcFacade$$ $+$ *><$><*<*><+> <.> <> consBag mkCoreApp mkCoreAppsmkFunTy mkInvisFunTymkInvisFunTyMany mkVisFunTymkVisFunTyManysnocBag graph-utilsData.Graph.EasyGrapher:=> graphics-drawingcombinatorsGraphics.DrawingCombinators%% graphiteData.Graph.Types--> <-> graphql-api GraphQL.API:>GraphQL.Internal.API:>GraphQL.Internal.Resolver:<>GraphQL.Resolver:<>graphql-clientData.GraphQL.Bootstrap.=graphtedPrelude.Graphted *><$<$> <*<**><*><+> <|> =<<>>>>=graphvizData.GraphViz.Parsing *><$<$><*<**><*><|>applydiscardData.GraphViz.Printing<$$><++><+>besideData.GraphViz.Types.Graph&Data.GraphViz.Types.Monadic--> <-> graqlGraql-: .: <: greskell Data.Greskell$.&.-:.: <$.><*.>=: Data.Greskell.Extra<=:> <=?> Data.Greskell.GTraversal$.&.<$.><*.>Data.Greskell.GTraversal.Gen$.&.<$.><*.>Data.Greskell.Graph-:=: greskell-coreData.Greskell.GraphSON.: gridMath.Geometry.GridMap! grids Data.Grid// Data.Grid.Internal.Errors:$$::<>:?!Data.Grid.Internal.Grid// grisette Grisette.Core # #~ &&~/=~<=~<~==~>=~>~||~"Grisette.Core.Control.Monad.UnionM#~ Grisette.Core.Data.Class.Bool&&~/=~==~==~~||~!Grisette.Core.Data.Class.Function# Grisette.Core.Data.Class.SOrd<=~<=~~<~<~~>=~>=~~>~>~~(Grisette.Core.Data.Class.SimpleMergeable#~ Grisette.IR.SymPrim-->-~>::= =->=~>/Grisette.IR.SymPrim.Data.Prim.InternedTerm.Term-->#Grisette.IR.SymPrim.Data.Prim.Model::= Grisette.IR.SymPrim.Data.SymPrim--> -~>:= =~>#Grisette.IR.SymPrim.Data.TabularFun=->Grisette.Lib.Base!!~ >>=~ >>~ Grisette.Lib.Control.Monad>>=~ >>~ Grisette.Lib.Data.List!!~ groundhogDatabase.Groundhog &&./=.<.<=.=.==.>.>=.||.~>Database.Groundhog.Core~>Database.Groundhog.Expression &&./=.<.<=.=.==.>.>=.||.Database.Groundhog.Generic.Sql<>groundhog-postgresql#Database.Groundhog.Postgresql.Array! !: <@ @> &Database.Groundhog.Postgresql.Geometry# ## && &< &<| &> *.+.-./.<-> << <<| <@ <^ >> >^ ?# ?- ?-| ?| ?|| @> |&> |>> ~= $Database.Groundhog.Postgresql.HStore->. <@ ?& ?| @> group-theory Data.Group><~~Data.Group.Additive+-×Data.Group.Multiplicative*/^Data.Group.Permutation$--$groups Data.Group~~guarded-rewritingGenerics.Instant.Rewriting+-> // h-booruHBooru.Parsers.FieldParsers<:+> h-raylibRaylib.Util.Math /*/ /+/ /-/ |* |*| |+ |+| |- |-| |.| |/ |/| hBDD Data.Boolean--> /\ <-- <-> \/ hPDBBio.PDB*| |* Bio.PDB.Structure*| |* Bio.PDB.Structure.List! ++ Bio.PDB.Structure.Vector*| |* hScraperHScraper.Query>=> |>> ~=~ hSimpleDBNetwork.AWS.SimpleDB:= hTensorNumeric.LinearAlgebra.Array! !> .*~> Numeric.LinearAlgebra.Array.Util! !> |*|~>Numeric.LinearAlgebra.Exterior/\\/!Numeric.LinearAlgebra.Multivector-|/\\/habloPretty.$ hackage-securityHackage.Security.TUF.FileMap! Hackage.Security.Trusted<$$> Hackage.Security.Util.Path<.>  hactorsControl.Concurrent.Actor! !>   hadoop-rpcData.Hadoop.HdfsPath hafarNumeric.AffineForm.* .+ #Numeric.AffineForm.ExplicitRounding*/ *\ +/ +\ -/ -\ haiji Text.Haiji:->hailsHails.Data.Hson-: =: Hails.PolicyModule.DSL<== ==> hakaru Language.Hakaru.CodeGen.AST.!=. .&&. .*. .*=. .+. .+=. .-. .->. ... ./. .<. .<=. .=. .==. .>. .>=. .||. Language.Hakaru.Parser.AST:*EtPEt'Language.Hakaru.Runtime.LogFloatPrelude! ** Language.Hakaru.Runtime.Prelude! Language.Hakaru.Syntax.AST:$:*Language.Hakaru.Syntax.DatumEtPEtLanguage.Hakaru.Syntax.IClassesCons1Language.Hakaru.Syntax.Prelude! &&****>+-//=<<$><*<*><=<|> ==>>=>>>>=^^^app thRootOf ||Language.Hakaru.Syntax.SArgs:*Language.Hakaru.Types.CoercionCConsLanguage.Hakaru.Types.DataKind:->:@Language.Hakaru.Types.SingSEtSFunSPlushakka Hakka.Actor! hakoText.Hako.Html<++> hakyllHakyll.Core.Identifier.Pattern.&&..||.halide-haskellLanguage.Halide! eqgtgteltlteneqhamsqlDatabase.HamSql.Internal.Utils<-> <><\> Database.YamSql.Internal.SqlId// <.> hamtmap Data.HamtMap! hamusicMusic.Analysis.PF! -|- >< hanabi-dealer Game.Hanabi||| haphviz Text.Dot.Gen--> .: =: happstack-foundationHappstack.Foundation:= happstack-ixsetHappstack.Data.IxSet &&& @* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= ||| happstack-stateHappstack.State.ComponentSystem:+: happstack-utilHappstack.Util.Common.^ happy-metaText.Happy.QuoteHappyStk haqueryHaquery-.haquil Data.Qubit*^*^^^*^*^^^*harg Options.Harg:*:+:->Options.Harg.Het.HList:+:->Options.Harg.Het.Prod:*harp Harp.Match+++ harpyHarpy.CodeGenMonad@@ hasData.Has& .> ^- ^. ^: ^= hasbolt Database.Bolt=: Database.Bolt.Lazy=: hasbolt-extrasDatabase.Bolt.Extras:&&:==:||Database.Bolt.Extras.DSL # -:.# .: :!-::!->::&&::-!::<-!::||:<-:Database.Bolt.Extras.DSL.Typed!-:!->:-:.&<-:=: Database.Bolt.Extras.Graph# hascasCQL# hascat-libHascat.Toolkit// hashable Data.Hashable hashWithSalthashable-accelerate#Data.Array.Accelerate.Data.Hashable hashWithSalthashmap Data.HashMap! \\ Data.HashSet\\ hashmap-ioData.IOHashMap! !? Data.IOHashMap.STM! !? hashring Data.HashRing! hask Hask.Category! $ . \\ Hask.Iso# haskell-adminAdminwith haskell-admin-core Admin.Components.ComponentsClasswith haskell-bitmex-rest BitMEX.Core-&- haskell-ciHaskellCI.OptionsGrammar^^^HaskellCI.Prelude-!! $$!&&&****>+++-. .~//=/\:|<<$<$><&><*<*><=<><|>=<<==>>=>>>>=\/^^.^^divelemmodnotElemonquotremseq||HaskellCI.Travis.Yaml^^^ HaskellCI.YamlSyntax~> haskell-conll Data.TagLabel:+:haskell-course-preludes Prelude.OldIO. Prelude.Week0&& * *. + +. - -. . /= /=. < <. <= <=. <> == ==. > >. >= >=. >> || haskell-generateLanguage.Haskell.Generate.Monad<>$ $Language.Haskell.Generate.PreludeDef<>. haskell-giData.GI.CodeGen.ModulePath/. haskell-gi-base Data.GI.Base:=:=>:~:~>Data.GI.Base.Attributes:=:=>:~:~>Data.GI.Base.ShortPrelude$++. /=:=:=>:~:~><$>=<<==>=>>>>>=haskell-neo4j-clientDatabase.Neo4j|: Database.Neo4j.Types<> |: haskell-src-extsLanguage.Haskell.Exts.SrcLoc<**<++><+?><^^>Language.Haskell.Exts.Syntax=~= haskell-src-meta&Language.Haskell.Meta.Syntax.Translate.->. Language.Haskell.Meta.Utils|$||->| |.| haskell-src-meta-mwottonLanguage.Haskell.Meta.QQ.SKI:$ &Language.Haskell.Meta.Syntax.Translate.->. Language.Haskell.Meta.Utils|$| |->| |.| haskell-tools-ast-trf3Language.Haskell.Tools.AnnTrf.SourceTemplateHelpers<> "haskell-tools-builtin-refactoringsALanguage.Haskell.Tools.Refactor.Builtin.ExtensionOrganizer.ExtMap:&&: :||: haskell2010 Control.Monad<=< =<< >=> >> >>= Data.Array! // Data.Bits.&. .|. Data.Complex:+ Data.List!! ++ \\ Data.Ratio% Prelude!! $ $! && * ** + ++ - . / /= < <= =<< == > >= >> >>= ^ ^^ || haskell2020Control.Applicative*><*<**><*><|> Control.Monad<=<=<<>=>>>>>= Data.Array! // Data.Bits .&..|.rotaterotateLrotateRshiftshiftLshiftRxor Data.Complex:+ Data.List!! ++\\elemnotElem Data.Ratio%Prelude !! $$!&&****>+++-. //=<<*<*><==<<==>>=>>>>=^^^divelemmodnotElemquotrem|| haskell98Array! // Complex:+ List!! ++ \\ Monad=<< >> >>= Prelude!! $ $! && * ** + ++ - . / /= < <= =<< == > >= >> >>= ^ ^^ || Ratio% haskell98librariesArray! // Complex:+ List!! ++ \\ Monad=<< >> >>= Ratio% haskelldbDatabase.HaskellDB! !. # .%. .&&. .*. .++. .+. .-. ./. .<. .<=. .<>. .==. .>. .>=. .||. << <<- Database.HaskellDB.DBLayout# Database.HaskellDB.Database!. Database.HaskellDB.HDBRec! # .=. Database.HaskellDB.Query.%. .&&. .*. .++. .+. .-. ./. .<. .<=. .<>. .==. .>. .>=. .||. << <<- haskellishLanguage.Haskellish<*!>   haskelzincInterfaces.MZAST !. #/.#|.$$ % =.@@where_|:Interfaces.MZBuiltIns!=.*.++.+.-.->...././\.<-.<->.<.<=.=.=>.>=.\/.haskgameGraphics.UI.HaskGame.Vector2*** haskhol-coreHaskHOL.Core.Lib#<< <#< <#>  \\ hasklepiasHasklepias.Reexports!>$&&*>++. .> <<*<*><. <=<|==>>=>>>>=|>|| haskoin-coreHaskoin.Keys.Extended++/ haskoin-store-dataHaskoin.Store.WebCommon<++> <+> <:> haskoonFactis.Haskoon.WebHsp:= haskore Haskore.Basic.Duration%+ Haskore.Basic.Tempo=/= "Haskore.Interface.CSound.Orchestra&&* /=* <* <=* ==* >* >=* ||* Haskore.Music+:+ /=: =:= Haskore.Music.GeneralMIDI+:+ =:= Haskore.Music.Rhythmic+:+ =:= Haskore.Music.Standard+:+ =:= Medium+:+ =:= Medium.Plain.Binary:+: :=: haskore-vintageHaskore.Basics/=: :+: :=: =:= hasktorch-codegenCodeGen.Prelude$!! $$!&&****>+++-. //=<<$<$><*<*><=<><|>=<<==>>=>>>>=^^^divelemmodnotElemquotrem||hasktorch-indef$Torch.Indef.Dynamic.Tensor.Math.Blas<.> )Torch.Indef.Dynamic.Tensor.Math.Pointwise^*^ ^+^ ^-^ ^/^ Torch.Indef.Static.Tensor!! #Torch.Indef.Static.Tensor.Math.Blas!* !*! <.> 'Torch.Indef.Static.Tensor.Math.Pairwise*^ +^ -^ /^ ^*^+^-^/(Torch.Indef.Static.Tensor.Math.Pointwise^*^ ^+^ ^-^ ^/^ Torch.Indef.Types.: haskus-binaryHaskus.Binary.Bits.&. .|. Haskus.Binary.Bits.Bitwise.&. .|. Haskus.Number.BitNat.*. .+. .-. ./. .<<. .>>. Haskus.Number.Int+#-#<#<=#==#>#>=#Haskus.Number.NaturalRange.++. haskus-utilsHaskus.Utils.Flow <.< <=<<|<||<|||>.> >=>|>||>|||>Haskus.Utils.HArray>~:~> Haskus.Utils.MultiState>:> >~:> Haskus.Utils.STM.TMap! haskus-utils-compatHaskus.Utils.Text% %.conshaskus-utils-dataHaskus.Utils.HListHConsHaskus.Utils.InfList:> Haskus.Utils.List++\\elemnotElemhaskus-utils-typesHaskus.Utils.Types.Error:$$::<>:Haskus.Utils.Types.Nat*+-<=<=?DivMod^haskus-utils-variantHaskus.Utils.ContFlow>%:>>-:>>:%:>>:-:>>::>>:>Haskus.Utils.Variant.Syntax>> >>= hasql-simple Hasql.Simple->. ->? hasqlator-mysqlDatabase.MySQL.Hasqlator &&.*.++.+.-././=.<.<=.=.>.>=.||.Database.MySQL.Hasqlator.Typed &&./=.:=<.<=.=.>.>=.@@ ||. hasqly-mysqlDatabase.Hasqly.+ .- .> haste-compiler Haste.App<.> Haste.App.Concurrent!  Haste.Object# Haste.Serialize.: .:? haste-perchHaste.App.Perch! Haste.Perch! hat Hat.Array!! !// *! *// +! +// Hat.Complex+:+ :+ Hat.Control.Monad !<=< !=<< !>=> !>> !>>= *=<< *>=> +=<< +>=> |>> |>>= Hat.Data.List!!! !++ !\\ *!! *++ +!! +++ Hat.List!!! !++ !\\ *!! *++ +!! +++ Hat.Monad!=<< !>> !>>= *=<< +=<< |>> |>>= Hat.Prelude$!!! !$ !$! !&& !++ !. !/ !=<< !>> !>>= !^ !^^ !|| *!! *$ *$! *&& *++ *. *=<< *^ *^^ *|| +!! +$ +$! +&& +++ +. +=<< +^ +^^ +|| |/ |>> |>>= Hat.PreludeBasicx!!! !$ !$! !% !&& !++ !. !/ !=<< !>> !>>= !^ !^^ !|| *!! *$ *$! *% *&& *++ *. *=<< *^ *^^ *|| +!! +#!##=%=#!#$=^^== +#!&!=%=#!&$=#&== +#!^$=%=#!^&=$*== +##!^=%=##!>=%+== +##&&=%=##&+=&^== +##@%=%=##@*=*@== +#$$*=%=#$$^=+>== +#$^#=%=#$^*=#&== +#%$$=%=#%$+=$*== +#&#=*=#&#=%+- +#>#=*=#>#=%>** +#^*=*=#^*=%*/ +$ +$! +% +%#>*=%^=%#>*=%@== +%$$%=*=%$$%=&%<= +%$$&=*=%$$&=&%< +%$$@=*=%$$@=*#* +%$$^=*=%$$^=*&+ +%$%@=*=%$%@=&$/ +%$^=*=%$^=$@>> +%+!=%=%+!=#^== +&#^=%=&#>=$&== +&& +&@$=*=&@$=&><= +&^@=*=&^@=&>== +*!+=*#=*!+=*$== +*$!=*=*$#=%#>>= +*$@=*#=*$@=*$== +*&+=&=*&+=$$>>= +**&=$#=**&=$$== +*+*=%=*+*=$&== +*++=%=*++=$&/= +*+>=%=*+>=$&< +*^!=%=*^!=$&<= +*^#=%=*^#=$&>= +*^$=%=*^$=$&> +*^*=$=*^*=$^+ +*^+=$=*^+=$@- +*^^=$=*^^=$@* ++$%=%=+$%=$@== ++$&=%=+$&=$@/= ++$>=%=+$>=$@>= ++$@=%=+$@=$@<= ++$^=%=+$^=$@< ++%!=%=+%!=$@> ++%%=$=+%%=%!+ ++%&=$=+%&=%!- ++%*=$=+%*=%!* +++ ++>=*=+>=%+/= ++>@=%=+>@=$+/ ++@!=%=+@!=$+<= ++@#=%=+@#=$+>= ++@$=%=+@$=$+> ++@*=$=+@*=$@+ ++@+=$=+@+=$@- ++@^=$=+@^=$@* ++^*=%=+^*=$+== ++^+=%=+^+=$+/= ++^>=%=+^>=$+< +. +:% +=<< +>!%=*=>!%=%>>>= +>#+=%=>#+=%>== +>%#=%=>%#=**== +>&^=%=>&^=^#== +>+*=%=>++=**== +>@^=%=>@@=++== +@+=*=@+=&#<= +@>=*=@>=&#> +@@%=%=@@*=$+== +@@=*=@@=&#>= +@^=*=@^=&#< +^ +^!=*=^!=%+== +^*%=%=^*%=$^== +^*&=%=^*&=$^/= +^*>=%=^*>=$^>= +^*@=%=^*@=$^<= +^*^=%=^*^=$^< +^+!=%=^+!=$^> +^+%=$=^+%=$>+ +^+&=$=^+&=$>- +^+*=$=^+*=$>* +^^ +^^+=%=^^+=$^/ +|| :% |/ |>> |>>= Hat.Ratio!% *% +% haxl Haxl.CorepAndpOrHaxl.Core.Monad:<$> :>>= Haxl.Core.ParallelpAndpOr Haxl.Prelude/!! $$!&&****>+++-. .&&.++ ./=.<.<=.==.>.>=.||//=<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElempAndpOrquotremseq||hbayesBayes.BayesianNetwork.!. .&. .==. .|. ~~ Bayes.Continuous=: Bayes.Factor=: Bayes.InfluenceDiagram=: ~~ hbf HBF.Types<&> hcg-minus Data.CG.Minus~= hcomSystem.Win32.Com### System.Win32.Com.HDirect.HDirect.+.hcube HCube.Utility<* |**| |*| ~> ~| hdfSound.DF.Uniform.Faust~. ~: ~:> ~<: ~~ hdiffData.HDiff.Patch.Merge// Languages.RTree:>: hdirectGetOpt-= -== -=== -==== -? PP$$ $+$ <+> <> Utils# heart-coreHeart.Core.Prelude'!! $$!&&****>+++-. //=:<|:|><<$<$><*<*><=<><|>=<<==>>=>>>>=^^^divelem hashWithSaltmodnotElemquotrem||hedgehogHedgehog/=====Hedgehog.Internal.Gen:.Hedgehog.Internal.Prelude$!! $$!&&****>+++-. //=<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq||Hedgehog.Internal.Property/=====hedgehog-classesHedgehog.Classesheqheq1heq2hneqhneq2 hedgehog-fnHedgehog.Function.Internal:->hedgehog-servantHedgehog.Servant:*:heggData.Equality.Graph.Lens%~.~^.Data.Equality.Saturation:=:|!Data.Equality.Saturation.Rewrites:=:|Data.Equality.Utils.IntToIntMap! Data.Equality.Utils.SizedList|: heidiHeidi!: heliumHelium.Main.CompileUtils===> 1Helium.StaticAnalysis.Inferencers.KindInferencing<==> 1Helium.StaticAnalysis.Inferencers.TypeInferencing|^| 'Helium.StaticAnalysis.Messages.Messages<:> >:> 3Helium.StaticAnalysis.Miscellaneous.TypeConstraints !::! !:::! !<=! !<==! .::. .:::. .<=. .<==. .==. .===. Helium.Utils.Texts:-> helmFRP.Helm.Signal<~ ~~ her-lexerLanguage.Haskell.Her.Parsley<*^ hercules-ci-agentHercules.Effect=: hercules-ci-cnix-exprHercules.CNix.Expr.Context=: Hercules.CNix.Expr.Schema#. #? #?! #?? $? ->.->?.$ ::.::?>>$. >>$? >>. >>? |! hermitHERMIT.Dictionary.Reasoning$$ $$$ --> /\ === ==> \/ HERMIT.External.& .+ .|| HERMIT.Kure<$> <*> heshHesh !> !>> &> &>> .= /> />>  Hesh.Process !> !>> &> &>> .= /> />>  hetero-dictData.Hetero.Dict:= Data.Hetero.DynDict:= Data.Hetero.KVList:= hevm EVM.Concrete^ EVM.Types.&&./=.<.<=.==.>.>=.|| hexpat-lensText.XML.Expat.Lens.Generic./ Text.XML.Expat.Lens.Unqualified./ hexpat-streamparserText.XML.Expat.StreamParser<|>hextraHextra.Applicative<.> <::><:><<>>Hextra.Conditional$? Hextra.Function.< .> <. <.- >. Hextra.Integral\* \+ \- Hextra.List!!? Hextra.Num<-> heyting-algebrasAlgebra.Boolean==>Algebra.Heyting.BoolRing<+><.> Algebra.Heyting.CounterExample===hformat Text.Format~%~~ hgeometricAlgebra.Geometric.Clip/\ <+> \/ \\ hgeometry Data.Geometry*^.+^.-..-^^*^+^^-^^/Data.Geometry.Transformation|.| Data.Geometry.Vector*^.+^.-..-^^*^+^^-^^/hgeometry-combinatorialData.Ext:+ Data.LSeq:<:<<:<|:>:|><|><|> hgeometry-ipe Ipe.IpeOut! hgrepLanguage.Haskell.HGrep.Prelude$$!$>&&&*> . /= < <$ <$><* <**><*> <= <><|> == > >= >> >>= on|| hi3status Hi3Status%% hiedbHieDb:. HieDb.Compat<+> higherorderData.Bool.Higher?? highjson Data.HighJson.-> .= .=? :&:+::|:@-> highlighterText.Highlighter.Types:. highlighter2Text.Highlighter.Types:. hindent!HIndent.Pretty.Combinators.Indent|=>!HIndent.Pretty.Combinators.Switch<-|> hindley-milnerLanguage.HM.Theta<@> hintLanguage.Haskell.Interpreter:= hinterLanguage.Haskell.Interpreter:= hinze-streamsData.Stream.Hinze.Idiom<> Data.Stream.Hinze.NumExt/ ^ Data.Stream.Hinze.Stream** // <: << \/ hipGraphics.Image|*| Graphics.Image.ColorSpace+::+Graphics.Image.Interface|*| Graphics.Image.Processing.Binary!&&!!/=!!!!>=!!||!.&&../=..<..<=..==..>..>=..||.!Graphics.Image.Processing.Complex!+!hipeData.Geometry.Ipe.IGC<| hist-pl-transliterNLP.HistPL.Transliter#> .| .|. >#> >+> histogram-fillData.Histogram.Bin.Bin2D>< Data.Histogram.Fill-<<<<-<<-$<<-|< <+> <.> <> >>> hjugement Majority.RanknCkhjugement-protocolVoting.Protocol.Arithmetic*+-/^Voting.Protocol.Utilso2 hkd-recordsData.HKD.Records:>:~>hlatexLanguage.LaTeX!$!$?$?★ Language.LaTeX.Builder!$!$?$?★ "Language.LaTeX.Builder.MonoidUtils<&&> <><||> ⊕Language.LaTeX.Printer$$ $$$ Language.LaTeX.Slicer^$hledgerHledger.Cli.Script!! $>*>++-<.><<$<$!><$><&><*<**><*><.><=<=<<|>=<<>>=>=>>>>>=@=?@?@?=@@ \\elemnotElem hledger-libHledger.Data.Amount@@ hledger-webHledger.Web.Import8!! !=.$$!&&****=.*>++++=.--=.. .: .=//<-./=/=.:#: <<$<$!><$><*<*><-.<.<=<=.<=<<>=.=<<====.>>.>=>=.>=>>>>>=^^^divelemmodnotElemquotremseq||||.hlist Data.HList:.hls-cabal-pluginIde.Plugin.Cabal.Parse:| hls-graphDevelopment.IDE.Graph.Classes/=== hashWithSalthls-plugin-apiIde.Plugin.Properties&hls-test-utilsTest.Hls|? hlyMusic.LilyPond.Light.Annotation& &# Music.LilyPond.Light.Notation# ## ##@ #@ hmatrixNumeric.LinearAlgebra!#>#><#<.><><\>Numeric.LinearAlgebra.Data ! ./.===>< ? ?? |> |||¿ Numeric.LinearAlgebra.Devel#|//applyapplyRawNumeric.LinearAlgebra.HMatrix<·>¦——Numeric.LinearAlgebra.Static ##>&<.><><\> <·>===|||hmatrix-backprop%Numeric.LinearAlgebra.Static.Backprop##>&<.><><·>===||| hmatrix-glpkNumeric.LinearProgramming#:&: :<=: :==: :>=: hmatrix-nlopt Numeric.NLOPT:|hmatrix-staticData.Packed.Static.Matrix>< @@> Data.Packed.Static.Vector@> 'Numeric.LinearAlgebra.Static.Algorithms<-> <.> <> <\> <|> hmemdb Data.HMemDb:&&: :&: :*: :+: hmm-lapackMath.HiddenMarkovModel.PatternappendhmpfrData.Number.MPFR.InternalshiftLhmtMusic.Theory.Time.Bel1990.R~> Music.Theory.Time.KeyKit.Parser>>~ Music.Theory.Tuning.Wilson^. Music.Theory.Xenakis.Sieve∩∪⋄hmt-baseMusic.Theory.Function.:.::.:::.::::.:::::hnetcdfData.NetCDF.Metadata#hnixNix.Effects.Basic Nix.ExeccallFuncNix.Expr.Shorthands$!=$&&$*$+$++$-$->$/$//$<$<=$=$==$>$>=$||==>@. @.<|> @@ Nix.Frames:~::~~:Nix.LintlintApp Nix.Prelude<!!? $$!$!!$<$>&&&&&&&&^ ****>+++-. //=:|<<$<$!><$><&><*<**><*><<$>><<<<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>?:??Compose ^^^div hashWithSaltmodonquotremseqxor||||^ Nix.Type.Type:~> Nix.UtilshnnAI.HNN.FF.Network--> ho-rewritingData.Rewriting.Rules$$ $- -$ -$- ===> hobbitsData.Binding.Hobbits:++::> Data.Binding.Hobbits.NameMap! \\ Data.Binding.Hobbits.NameSet\\ Data.Type.RList:++::> hoist-errorControl.Monad.Error.Hoist<%!?><%?>holmes Data.Holmes.$ .%..&&.*.*..+.-././../=.<.<=.==.>.>=.>>= .||<<- Data.Propagator.$ .%..&&.*.*..+.-././../=.<.<=.==.>.>=.>>= .|| homeomorphicData.Homeomorphic<<| Data.Homeomorphic.Internal<<| hommageSound.Hommage.Envelope Sound.Hommage.Notation-=- ->- :+: :=: Sound.Hommage.Parameter:$ := :>> :? <> >< Sound.Hommage.Signal:><: Sound.Hommage.Sound.=> <*> <+> ==> homotupleData.Tuple.Homotuple<$> <*> <>>>= hoodDebug.Hood.Observe<< hood-offDebug.Hood.Observe<< hood2Debug.Hood.Observe<< hoodle-builderText.Hoodle.Builder<>Text.Hoodle.Builder.V0_1_1<>Text.Hoodle.Builder.V0_2_2<>Text.Hoodle.Builder.V0_3<> hoodle-core Hoodle.Util# hoodle-render#Graphics.Hoodle.Render.Type.HitTest:- hooplCompiler.Hoopl<*>|*><*|hoppy-generatorForeign.Hoppy.Generator.Spec~:hopsHOPS.GF.Series!^! .* ./ ?^! ohoraData.Time.Hora.Future- hoscSound.Osc.Text>>~ hpack Hpack.Yaml.: .:? hpathHPath hpath-filepathSystem.Posix.FilePath<.>  hplaygroundHaste.HPlay.Cell.= Haste.HPlay.View**> ++>  << <<< hpp Hpp.StringSig:. Hpp.Types%=.=hpqtypesData.Monoid.Utils<+>"Database.PostgreSQL.PQTypes.Format:*: Database.PostgreSQL.PQTypes.SQLhpsGraphics.PS.PS>+>Graphics.PS.Path+++ hpythonLanguage.Python.DSL(&.!=.%.%=.&.&=.*.**.**=.*=.+.+=.-.-=././/.//=./=.:.<.<<.<<=.<=.=.==.>.>=.>>.>>=.@.@=.^.^=.|.|=/> in_isNot_is_notIn_ hreq-core Data.Hlist:.Hreq.Core.API.Internal:=:>Hreq.Core.API.MediaType// hs-fltkGraphics.UI.FLTK.Widget+|+ ::= ::=> := :=> hs-functorsControl.Comonad<<==<==>==>>Control.Semigroupoid. Data.Functor.Contravariant>$ >$< Data.Profunctor&&&***+++<<^>>^^<<^>>|||hs-ixData.Functor.Indexed *><*<**><*><<=<=<=<<=<==>==>>>=>>>=hs-java JVM.Common! hs-opentelemetry-apiOpenTelemetry.Resource.= .=? hs-pattransAnalysis<+> Discovery:@ ??Transformations$<<=> >$>$<~~ Types.@ .@@ hs-pkg-configData.PkgConfig<.>  ~/= ~< ~<= ~= ~> ~>= hs-profunctorsData.Profunctor<<^>>^^<<^>> hs-twitterWeb.Twitter.Types.Import-=> hs-watchman%System.Directory.Watchman.BSER.Parser.: $System.Directory.Watchman.Expression.&&.|| hsSqlite3Database.Sqlite3:. hsc3Sound.Sc3.Common.Math.Operator/=** <** <=** ==** >** >=** Sound.Sc3.Common.Monad.Operators *.+.-..*.*..+.+..-.-../././.Sound.Sc3.Ugen.Util.<<. .>>. hsc3-lang#Sound.SC3.Lang.Collection.Extension*. +. -. /. Sound.SC3.Lang.Core.: .:: .::: .:::: .::::: Sound.SC3.Lang.Pattern.P.Event<| hscassandraDatabase.Cassandra=: =| hscimWeb.Scim.Test.Util hsdevControl.Apply.Util& HsDev.Database.SQLite:.:=HsDev.Tools.AutoFix.+. .-. ~~HsDev.Tools.Ghc.Prelude!! ++\\elemnotElem HsDev.Util.:: .::? .::?! hsgnutlsNetwork.GnuTLS.Attributes::= ::~ := :=> :~ :~> hsgnutls-yjNetwork.GnuTLS.Attributes::= ::~ := :=> :~ :~> hsgsomData.Datamining.Clustering.Gsom*. .* <+> <-> %Data.Datamining.Clustering.Gsom.Input*. .* <+> <-> hslua-packagingHsLua.Packaging.Function####?<#>=#>=?>since hslua-typing HsLua.Typing#|# hspHSP.XMLGenerator:= <: <<: <<@ <@ hsparqlDatabase.HSparql.QueryGenerator*. +. .!=..&&..*..+..-...|.../..//..:. .<..<=..==..>..>=..|..||.?. hspec-attoparsecTest.Hspec.Attoparsec~> ~?> Test.Hspec.Attoparsec.Source~> ~?> hspec-expectationsTest.Hspec.Expectations shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrowhspec-expectations-jsonTest.Hspec.Expectations.Json shouldBeJsonshouldBeUnorderedJsonshouldMatchJsonshouldMatchOrderedJsonhspec-expectations-liftedTest.Hspec.Expectations.Lifted shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWithhspec-expectations-pretty-diffTest.Hspec.Expectations.Pretty shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrow hspec-metaTest.Hspec.Meta shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrowhspec-multicheckTest.Hspec.Multicheck==> hspec-serverTest.Hspec.Server.Core@== @>= hspec-waiTest.Hspec.Wai<:> Test.Hspec.Wai.Matcher<:> Test.Hspec.Wai.QuickCheck==>hsprayMath.Algebra.Hspray*^.^^**^^*^^+^^-^ hsshellscript HsShellScript -&>--&>>--<-->-->>--|--|==>-=>>-=|-=|= hsverilogHsVerilog.Simulation<== HsVerilog.Verilog.DSL.: >< hsxHSX.XMLGenerator:= <<: <<@ hsx-xhtml HSX.Layout<> ^^ htlset Data.HtsSet:+ html Text.Html! +++ << html-parse-utilText.HTML.Parser.Util~/= ~== htoml-parseData.Toml.Parse.!=.:.:? htsMusic.Typesetting.Literal& &. htssets Data.HtsCSet:+ Data.HtsSet:+http-directoryNetwork.HTTP.Directory+/+ http-kinderNetwork.HTTP.Kinder.MediaType/. /? http-mediaNetwork.HTTP.Media/. // /: /? Network.HTTP.Media.MediaType/. // /: /? http-ponyNetwork.HTTP.Pony.Helper-http-pony-serve-wai"Network.HTTP.Pony.Serve.Wai.Helper- http-queryNetwork.HTTP.Query+/+huffHuff/\\/hum Hum.Utils?humble-prelude HumblePrelude$$!&&****>+-. //=<<$<$><*<*><=<>=<<==>>=>>=^^^divelemmodquotrem||HumblePrelude.Extras&<&><|> hunit-dejafuTest.HUnit.DejaFu->- === =>= hunt-searchengineHunt.Common.BasicTypes<> Hunt.Utility.:: .::: .== .=? .\. huzzyHuzzy.Base.Sets?&& ?|| Huzzy.Base.Systems=*> =|> Huzzy.TypeOne.Sets?&& ?|| Huzzy.TypeOne.Systems=*> =|> Huzzy.TypeTwo.Interval.Sets?&& ?|| Huzzy.TypeTwo.Interval.Systems=*> =|> Huzzy.TypeTwo.ZSlices.Sets?&& ?|| Huzzy.TypeTwo.ZSlices.Systems=*> =|> hvect Data.HVect!! :&:<++>hw-aesonHaskellWorks.Data.Aeson.!=.?=hw-bitsHaskellWorks.Data.Bits.BitWise.&..<..>..?. .^..|. hw-fingertreeHaskellWorks.Data.FingerTree:<:><|><|>hw-fingertree-strict#HaskellWorks.Data.FingerTree.Strict:<:><|><|> hw-hedgehogHaskellWorks.Hedgehog/== ?== hw-ip+HaskellWorks.Data.Network.Ip.Internal.Appar#<*># hw-mqueryHaskellWorks.Data.MQuery/^. /^.. >>^.>>^.. hw-parserHaskellWorks.Data.Parser hw-primHaskellWorks.Data.AtIndex!!! HaskellWorks.Data.Ops<|><|>HaskellWorks.Data.Product:*: hw-rankselect#HaskellWorks.Data.RankSelect.BitSeq<|><|>,HaskellWorks.Data.RankSelect.Internal.BitSeq#<| |># hw-uriHaskellWorks.Data.Uri.Location-<.><.>hw-xmlHaskellWorks.Data.Xml.Decode/> />>   <@> ?> @> ~> hx Haskell.X.Ops->> <$> =>> |> Haskell.X.Prelude-!! $ $! && &&& * ** *** *> + ++ +++ - ->> . / /= < <$ <$> <* <**> <*> <+> <<< <<^ <= <=< <> <|> =<< == > >= >=> >> >>= >>> >>^ ^ ^<< ^>> ^^ || ||| hxtControl.Arrow.ArrowIf:-> Control.Arrow.ArrowList$<$<$$<<$<<<$<<<<>.>>.Control.Arrow.ArrowTree//>/>> ..> .> .>> /> :-> <.> >:@->@@ Hydra.Impl.Haskell.Dsl.Grammars>:Hydra.Impl.Haskell.Dsl.Types-->>:@@ hydrogen-cli-argsHydrogen.CliArgs! ? ~: ~= ~? hydrogen-parsingHydrogen.Parsing<+< >+> hydrogen-preludeHydrogen.Prelude! $$ $$$ $$$$ $$$$$ .& .^ .| <$$$$$> <$$$$> <$$$> <$$> =~ =~~ ? |> hydrogen-prelude-parsecHydrogen.Prelude.Parsec<++> <:> hydrogen-utilHydrogen.Util.CliArgs~: Hydrogen.Util.Parsec<+< >+> hylolib Data.EnumMap! HyLo.Formula :&::-->::/=: :<-->::<: :<=: :=: :>: :>=: :|: HyLo.Model?? |/= |= hypergeomatrixMath.HypergeoMatrix+: hypertypesHyper#*##>:*:Hyper.Class.Morph#?> Hyper.Class.Nodes#*##> Hyper.Recurse##>>#**##>>hypherDatabase.Neo4j|: hz3Z3.Opts+? ide-backend-commonIdeSession.Strict.List++ \\ IdeSession.Strict.Map! \\ ideasIdeas.Common.Classes!-> <&&> <-! <-> <||> Ideas.Common.Environment? Ideas.Common.Id#@> Ideas.Common.Library!-> !~>#$< &&& *** +++ .%..*../..@..|.:~> <&&> <+> <-! <-> <<<<||> >>>? @> |>||| Ideas.Common.Predicate<&&> <||> Ideas.Common.Rewriting:~> "Ideas.Common.Rewriting.RewriteRule:~> #Ideas.Common.Rewriting.Substitution@+@@@|->Ideas.Common.Strategy!~>.%..*../..@..|.|>Ideas.Common.Strategy.Choice./. .|. |->|> !Ideas.Common.Strategy.Combinators!~>.%..*../..@..|.|>Ideas.Common.Strategy.Derived!*> <%> <@> Ideas.Common.Strategy.Legacy<%><*><@><|>>|>Ideas.Common.Strategy.Sequence.*. ~> "Ideas.Common.Strategy.StrategyTree.=.Ideas.Common.Traversal.Utils>=>>|<Ideas.Common.View$< &&& *** +++ <+> <<<>>>||| Ideas.Encoding.Encoder// #Ideas.Service.FeedbackScript.Syntax:<>: Ideas.Service.Types.->Ideas.Text.HTML<#> Ideas.Text.XML.=. := Ideas.Text.XML.Document:= Ideas.Utils.Parsing*><$<$><*<**><*><..>Ideas.Utils.Uniplate|* |- ||* ideas-math-types Domain.Algebra.Boolean<&&> <||> >< Domain.Algebra.Field|*||+||-||/|Domain.Algebra.Group<><>-Domain.Algebra.Law:==:Domain.Algebra.SmartGroup.&&..*..+..-../..||.Domain.Logic.Formula:&&::->::<->::||:Domain.Logic.Views.&&..->..<->..||.Domain.Math.Data.OrList<>Domain.Math.Data.Relation ./=..<..<=..==..>..>=..~=.:<::<=::==::>::>=:Domain.Math.Expr.Data:*: :+: :-: :/: Domain.Math.Expr.Symbols^Domain.Math.Expr.Views.*..+..-../..^. identiconGraphics.Identicon:+ identifiersData.Identifiers.Hashable! Data.Identifiers.ListLike! idiomaticGeneric.Applicative.IdiomCompieeeData.AEq=== ~== ieee754Data.AEq=== ~== ifIf? ?> ihaskellIHaskellPreludeB$$!%&&**#*##**## *>++#+##++--#-##. //##/=/=#/=##:% :|<<#<##<$<$!><$><*<**><*><=<=#<=##<=<<>=<<====#==##>>#>##>=>=#>=##>=>>>>>=\\^^%^ ^^^^%^^ divelemmodnotElemonquotremseq||~~ imagemagick+Graphics.ImageMagick.MagickCore.Types.MBits^&^ ^|^ imm Imm.Pretty<++> <+><>imperative-edslLanguage.Embedded.CExp #! #!=#% #&& #<#<=#==#>#>=#|| ?Language.Embedded.Imperative:+: implImpl$$ :->implicitGraphics.Implicit.Definitions⋯* ⋯/ )Graphics.Implicit.ExtOpenScad.Definitions:$ := implicit-hieHie.Cabal.Parserimplicit-params Data.Implicit$$ $~ ~$ imprint Data.Imprint<:>improveLanguage.ImProve&&. *. --> -| /. /=. <. <=. <== ==. ==> >. >=. ||. in-other-wordsControl.Effect.Alt<|>Control.Effect.Internal.Utils#. .# incipit-base Incipit.Base1$$!$>&&&&&&**>+++-. /=:$$::<>::|<<$<$!><$><&><*<**><*><<<<=<=<<=?<><|>=<<==>>$>$<>=>=>>>>>=>>>Compose DivMod^^^onseqxor||Incipit.FoldableelemIncipit.Fractional/ Incipit.TypeError%<> incipit-core IncipitCore++incremental-computingData.Incremental$$ Data.Incremental.Tuple&&& incremental-parserControl.Applicative.Monoid+<*>><"Text.ParserCombinators.Incremental+<*><<|><||>><2Text.ParserCombinators.Incremental.LeftBiasedLocal+<*><<|><||>><,Text.ParserCombinators.Incremental.Symmetric+<*><<|><||>><incremental-sat-solverData.Boolean.SatSolver:&&: :||: indentsText.Parsec.Indent<*/> <+/> <-/>  index-coreControl.IMonad.Core?>?>=Control.IMonad.Do>>>>=Control.IMonad.Restrict!>!>= <.> =!>indexedControl.Monad.Indexed=<<<>>>=Data.Functor.Indexed*>><<$>><<*<<*>>indexed-containers Data.NList<++><:>indexed-profunctorsData.Profunctor.Indexed#. .#indices Data.Index:. indigoIndigo^!!!:!@!~##!## #-> #:#=#@#~$$!$!!$>%%>&&&&&&&&= ****= *>+++++@+:+= +@--:-= -@. ....:.~//->//->/=:% :&:->:-|::-> :=:>:|<<$<$!><$><&><*<**><*><<$>><<<<<<= <=<=<<><|>=:=<<==>>=>=>>>>>=>>>>>>= ?:?@Compose ^^%^ ^..^= ^^^^%^^ hashWithSaltonquotremseq||||= ~> Indigo.Backend.Prelude:$$!$!!$>%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodonquotremseqxor||Indigo.Common.State## <$>>> Indigo.Frontend.Expr!!!!:!@!~#!#:#@#~%&&*+++@+:+@--:-@.://=<<<<<=<>==>>=>>>?:?@^||Indigo.Frontend.Language #=&&= *= += -= //-><<<= =:>>>= ^= ||= Indigo.Lorentz ##-> %>&/->:&:->:-|::-> :=:>~> Indigo.Prelude&$$!$!!$>&&&&***>++. ....~:% :|<$<$!><$><&><*<**><*><<$>><=<<|>=<<>=>>>>>=Compose ^%^ ^..^^^^%^^ hashWithSaltonquotremseq inferno-typesInferno.Types.Type.->Inferno.Types.VersionControl&< inferno-vcInferno.VersionControl.Types&< infinite-listData.List.Infinite!! ... .... :<\\ inflist Data.InfList!!! +++ ::: influxdbDatabase.InfluxDB% Database.InfluxDB.Format% inilist Data.Ini.List+> <+ inject-functionControl.InjFun-< -<| >- >-| |-> ||-> inline-rData.Vector.SEXP! !? ++// elemnotElemForeign.R.Constraints:∈H.Prelude.Interactive=== Language.R.HExp=== input-parsersText.Parser.Deterministic<<|>inspection-testingTest.Inspection=/- =/= =/~ ==- === ==~ instant-genericsGenerics.Instant.Base:*: intcodeIntcode! >>> Intcode.Machine! intensional-datatysIntensional.Types:=> interlude-l Interlude##%%=#%%~#%=#%~#=#~$$!$!!$>%%%=%%@=%%@~%%~%=%@=%@~%~&&&&&=&&^&&~&~*****=**~*=*>*~++++=+~--=-~. .&.... .=.> .@=.@~.|..~///=//~/=:% :*::+:+::.::|:~:<<#%=<#%~<#=<#~<$<$!><$><%=<%@=<%@~<%~<&&=<&&><&&~<&><*<**=<**><**~<*=<*><*~<+=<+~<-=<-~<. <.=<.> <.~><<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*>> <<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<<>=<>~<||=<||><||~<~=<<==>>=>=>>>>>=?=???~^^#^%^ ^.^..^=^?^?!^@.^@..^@?^@?!^^^^%^^ ^^=^^~^~divelem hashWithSaltmodnotElemonquotremrotaterotateLrotateRshiftshiftLshiftRxor|>||||=||^||~internData.Interned.IntSet\\ interval Data.Interval..< ..<....<<....<= ..<=....>....>=....>>..<.. <..<<..<=<=.. <=..<<=..<=interval-algebraIntervalAlgebra.Core.+. <+> <|> >< interval-functorData.Functor.Interval...interval-patterns Data.Interval+/- ... :<-->::<--|::<->::<-|::<>::<|::|-->::|--|::|->::|-|::|>::||:\\ intervalsNumeric.Interval+/-.../=! /=? ! >=! >=? >? Numeric.Interval.Internal+/-.../=! /=? ! >=! >=? >? Numeric.Interval.Kaucher .../=! /=? ! >=! >=? >? Numeric.Interval.NonEmpty .../=! /=? ! >=! >=? >? "Numeric.Interval.NonEmpty.Internal .../=! /=? ! >=! >=? >? intrinsic-superclasses&Language.Haskell.TH.Instances.Internal <$!><&> <=<<>=<<>=>>> >>= notElem,Language.Haskell.TH.Instances.Internal.Utils<&> introIntro=$$!$<$>&&&&&^ ****>+-. .&..:.|.//=:|<<$<$!><$><&><*<**><*><<<<=<=<<><>^<|>=<<==>>$>$$<>$<>=>=>>>=>>>?:^^^divelem hashWithSaltmodnotElemonquotremrotaterotateLrotateRshiftxor||||^ inventoryMatchSigs.Matching.Env/\ invertibleControl.Invertible.BiArrow<-><<^^>>^^^^<<^^>>Control.Invertible.Functor<$>Control.Invertible.Monoidal$<*<:<->:>$>$<>*>*<>*<<>*<<<>*<<<<>>*<>>*<<>>>*<>>>>*<>|>|<|<Data.Invertible.Bijection:<->:<->Data.Invertible.Function. Data.Invertible.Monad=<<->>="Data.Invertible.PartialIsomorphism<$> Data.Invertible.Prelude. <$><->invertible-grammarData.InvertibleGrammar:-Data.InvertibleGrammar.Base:-invertible-syntaxText.Syntax.Classes<*> <|> Text.Syntax.Combinators*> <* <+> io-choiceControl.Exception.IOChoice||>!Control.Exception.IOChoice.Lifted||> io-machineIOMcn>>> ipfsNetwork.IPFS.Prelude5$$!$!!$>%~&&&&&*******>+++-. .~//=:|<<$<$!><$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=>>>?~^^.^..^?^^divelemmodnotElemonquotremseq||iprouteData.IP>:> irc-fun-colorNetwork.IRC.Fun.Color.Style#> <# irc-fun-messagesNetwork.Irc.Messages.MaskmatchesirealData.Number.IReal+- -+- ! ? ?? !Data.Number.IReal.IRealOperations+- -+- ! ? ?? Data.Number.IReal.Rounded+- -+- ! ? ?? isobmff%Data.ByteString.IsoBaseFileFormat.Box$::+:.:<>:|+Data.ByteString.IsoBaseFileFormat.ReExportsi######### ######### ###################################################################################################################################################!#################################$####################################'#######################################*##########################################-#############################################0################################################3###################################################6######################################################9#########################################################<############################################################?###############################################################B##################################################################E#####################################################################H########################################################################&&*+--*-*---*-/-.&..+..+:.|.:#:$$::+.:+::+?:+^:<>::=:=.:>>=::>>>::>>>^::^+:^>>>::~:~::~?:~~:<$$--><$$><++><+><:$$--><:$$><:><=<=?<><||>==?::@:@::DivMod^^^rotaterotateLrotateRshiftshiftLshiftRxor||~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~9~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Data.Kind.Extra:#:>>=::>>>::>>>^::^>>>::~:Data.Type.BitRecords.Assert?::Data.Type.BitRecords.Core.+..+::+.:+::+?:+^:=:=.:^+:~:~?@:@::^^Data.Type.BitRecords.Structure//<>isobmff-builder%Data.ByteString.IsoBaseFileFormat.Box$::+ isotopeIsotope|*| |+| |-| iterIOData.IterIO.Inum.| .|$ |$ |. Data.IterIO.Parse $> *> <$ <$> <* <**> <*> <++> <:>  <|> >$> \/ iterateeData.Iteratee.Iteratee$= <>< =$ ><> >>> iteratee-mtlData.Iteratee.Iteratee>>> ival Data.Interval:–: ivorIvor.TT>+> >-> >=> >|> ivory Ivory.Language! #! #. #> .% .& .&&./ .= .^ .| .||/=?:-> <=?=?>?? ~> Ivory.Language.Array! Ivory.Language.BitData.Array#! Ivory.Language.BitData.BitData#. #> Ivory.Language.Bits.& .^ .| Ivory.Language.IBool .&&.||/=?<=?=?>?? Ivory.Language.IIntegral.% ./ Ivory.Language.Init.= Ivory.Language.Proc:-> Ivory.Language.Struct~> %Ivory.Language.Syntax.Concrete.ParserHappyStk ivory-optsIvory.Opts.Overflow<+> ivory-stdlibIvory.Stdlib.Control==> Ivory.Stdlib.Operators%= %=! += ~>* ix!Control.Categorical.Monad.Indexed<=<=<==>=>=>ixmonadControl.Effect>> >>= Control.Effect.Helpers.Mapping:-> Control.Effect.Reader:-> Control.Effect.State:! :-> ixset Data.IxSet &&&@* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= ||| ixset-typedData.IxSet.Typed &&&@* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= |||ixshaderGraphics.IxShader&&& +=-=.:.=Graphics.IxShader.IxShader>> >>= Graphics.IxShader.Ops.Mult.*Graphics.IxShader.Qualifiers *** +-//=<<===>>=jallaNumeric.Jalla.CVector|.* |.+ |.- |./ ||* ||+ ||- Numeric.Jalla.Indexable! Numeric.Jalla.Matrix ## ##! ##+ ##- #.* #.+ #.- #./ #| |# java-bridge Foreign.Java--> ::= jbiSystem.JBI.Commands.Tool.&&..||. jet-streamJet& <&> jmacro$Language.Javascript.JMacro.TypeCheck<: <<:> =.= Language.Javascript.JMacro.Util != $ $$ &&. <<> =:== join Join.Join.=. joinlist Data.JoinList++ :< :> joint#Control.Joint.Abilities.Transformer:>Control.Joint.Core:.:=~>Control.Joint.Operators$>>= <$$$$> <$$$> <$$> <****> <***> <**> >>=$ jordanJordan>$ js-good-parts Language.JavaScript.NonEmptyList<:> jsaddle Data.JSStringcons#Data.JSString.Internal.Fusion.Types:*:JavaScript.Array! Language.Javascript.JSaddle! !! ###<#<##"Language.Javascript.JSaddle.Object! !! ###<#<##jscLanguage.Javascript.JSC.Object! !! # <# jsmwLanguage.JSMW.Arith=/= === Language.JSMW.Cond--> Language.JSMW.Monad:= json-altData.Aeson.AutoType.Alternative:|:altjson-rpc-clientNetwork.JsonRpc.Client::: json-rpc-serverNetwork.JsonRpc.Server:+: json-schemaData.JSON.Schema.Combinators<+><|> json-streamData.JsonStream.Parser.!.:.:?.|json2 Data.JSON2+= .= Data.JSON2.Query<+> >>> jsonlogicJsonLogic.IO.Operation! !! != !== % * + - / < <= == === > >= JsonLogic.Pure.Operation! !! != !== % * + - / < <= == === > >= jspathText.JSONb.Path:=> judgeLogic.Judge.Prover.Tableau:= jukebox Jukebox.Form.=. .=>. /\ :=::@: \/ |+| |=> Jukebox.Name::: Jukebox.TPTP.ParsecJukebox.Toolbox=>>=>>=Jukebox.UnionFind:> =:= justified-containersData.Map.Justified! jvm-binaryLanguage.JVM.Type<:> kangarooText.PrettyPrint.JoinPrint<+> <> kansas-lavaLanguage.KansasLava.Protocols$$stackFstackP|$|Language.KansasLava.Types&:> Language.KansasLava.Utils .!. .&&../=. .<..<=..==..>..>=..^..||.karabiner-configKarabiner.Config!>? ?!?? ??! |+||->karpsSpark.Core.Column/- // Spark.Core.Functions.+ .- ./ @@ #Spark.Core.Internal.ArithmeticsImpl.+ .- ./ Spark.Core.Internal.CanRename@@ Spark.Core.Internal.Projections/- // Spark.Core.Internal.Utilities<&> <>kawaiiNetwork.Wai.Serve.Middleware<#>keera-hails-reactivelensesData.ReactiveLens<$$$> keera-hails-reactivevaluesControl.GFunctor<$$>Data.ReactiveValue&.& <:= <^> =:= =:> kerryKerry.Internal.Prelude(!! $$!&&****>+++-. //=<<$<$!><$><*<**><*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotrem||Kerry.Internal.Serial.=? keyed Data.Keyed! !? Data.MKeyed!! !!? keyed-valsKeyedVals.Handle.Typed//keyed-vals-hspec-testsTest.KeyedVals.Hspec:| keylayoutsKeyboard:! :? keysData.Key! <#$>keystoreData.KeyStore.Types.AesonCompat.!= .: .:! .:? .= kibroKibro<<$ kind-applyData.PolyKinded:&&:Data.PolyKinded.Atom:&::=>>:Data.PolyKinded.Functor:^: kind-generics Generics.Kind:*::+: kind-integer KindInteger *+-/=/=?====?DivRem^ kind-rational KindRational*+-//=/=?====? kleene-listData.List.Kleene.Internal*<>+ +<>* :*:+:-Data.List.Kleene.Plus!! :+:-Data.List.Kleene.Star!! :*:-kmonadKMonad.Prelude##%%=#%%~#%=#%~#=#~$$!$!!$>%%=%%@=%%@~%%~%=%@=%@~%~&&&&&&&&=&&~&~********=**~*=*>*~++++=+~--=-~. ... .=.> .@=.@~.~///=//~/=:<:>:|:~:<<#%=<#%~<#=<#~<$<$!><$><%=<%@=<%@~<%~<&&=<&&~<&><*<**=<**~<*=<*><*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<<>=<>~<||=<||~<~=<<==>>$>=>=>>>>>=>>>?=???~^^#^.^..^=^?^?!^@.^@..^@?^@?!^^^^=^^~^~consdivelemfailingmagnifymodnotElemonquotremseqsnoczoom|>||||=||~kmp-dfaAlgorithms.DFA.KMP==! kneadData.Array.Knead.Expression &&* .&.* .|.* /=* <* <=* ==* >* >=* ||* $Data.Array.Knead.Parameterized.Slice$:. 'Data.Array.Knead.Parameterized.Symbolic! Data.Array.Knead.Shape.Cubic#:. :. Data.Array.Knead.Simple.Fold$:. Data.Array.Knead.Simple.Slice$:. Data.Array.Knead.Simple.Symbolic! knit-haskell(Knit.Report.Input.Visualization.Diagrams####%%=#%%~#%=#%~#. #=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*. *=*>*^*~+=+~-=->>-~.# .+^.-..-^.=.>.>>.@=.@~.~//=//~:&:-::<:>:~:<#%=<#%~<#=<#~<$<$><%=<%@=<%@~<%~<&&=<&&~<&><*<**=<**~<*=<*><*~<+=<+~<-=<-> <-~<. <.=<.~=<<<>~<<>=<<>~<<>=<>~$?=???~@@^#^&^*^+^^-^^.^..^/^=^?^?!^@.^@..^@?^@?!^^=^^~^~atatopbeneathconsfailingmagnifysnoczoom|>|>> ||=|||||~~~ knots Knots.Free# $!!! .# Knots.Prelude:% Knots.Util.* krapshSpark.Core.Column// Spark.Core.ColumnFunctions.+ Spark.Core.Functions@@ Spark.Core.Internal.Utilities<&> <>@@ krpc Remote.KRPC==> ==>@ kubernetes-client-coreKubernetes.OpenAPI.Core-&-kuifjeLanguage.Kuifje.Distribution>>= Language.Kuifje.Semantics==> =>> kure#Language.KURE.Combinators.Transform>+> Language.KURE.MonadCatch<+Language.KURE.Path@@ labeled-treeData.LabeledTree::> labelsLabels:= Labels.Internal:= lagrangianNumeric.AD.Lagrangian<=> lambda-cubeLambdaCube.STLC.AstExtLCAppExtLCArrLCAppLCArr LCNeutAppLambdaCube.SystemF.AstExtLCAppExtLCArr ExtLCTAppLCAppLCArr LCNeutApp LCNeutTAppLCTAppLambdaCube.SystemFw.Ast ExtLCAppExtLCArr ExtLCKArr ExtLCTApp ExtLCTTAppLCAppLCArrLCKArr LCNeutApp LCNeutTAppLCTAppLCTTAppLambdaCube.SystemFw_.Ast ExtLCAppExtLCArr ExtLCKArr ExtLCTTAppLCAppLCArrLCKArr LCNeutAppLCTTApplambda-placeholdersLanguage.LambdaPlaceholders.$. .@. lambdabotLambdabot.Main:=> lambdabot-coreLambdabot.Main:=>==>lambdabot-utilsLambdabot.Util<$> <+> <.>  <> lambdacube-compilerLambdaCube.Compiler.Core:~>Appapp_#LambdaCube.Compiler.DesugaredSourceSAppHSAppVLambdaCube.Compiler.Pretty<$$> <+>  DAppLambdaCube.Compiler.Utils<&> lambdacube-edslLambdaCube.Language@# @% @& @&& @* @*. @+ @- @. @.* @.*. @/ @/= @< @<< @<= @== @> @>= @>> @^ @| @|| LambdaCube.Language.Type:+: :. lambdacube-engine%Graphics.LambdaCube.Loader.ParserUtil<$= <*= lambdacube-gl LambdaCube.GL@: @= LambdaCube.GL.Input@= lambdacube-irLambdaCube.PipelineSchemaUtil@: lame-testerTester.DialectandAlsobutAlso excludingTo runningTo language-bashLanguage.Bash.Pretty$+$ $++$ <++> language-boogieLanguage.Boogie.Intervals// <: Language.Boogie.Util|!=| |%| |&| |*| |+| |-| |/| |<=>| |<=| |<| |=>| |=| |>=| |>| ||| language-c-inlineLanguage.C.Inline.ObjC--> <: ==> language-c-quoteLanguage.C.Parser.ParserHappyStk rconsLanguage.C.Smart+====language-c99-simpleLanguage.C99.Simple.Expr!.! .!= .% .%= .& .&& .&= .* .*= .+ .++ .+= .- .-- .-= ./ ./= .< .<< .<<= .<= .= .== .> .>= .>> .>>= .^ .^= .| .|= .|| .~ language-cssLanguage.Css.Build !.= /#/-/./:/><:>|= ~= language-eiffelLanguage.Eiffel.PrettyPrint$?$  language-puppetXPrelude<$$> <+>  <> language-rustLanguage.Rust.Data.Position# language-shLanguage.Sh.Syntax :&&: :< :<& :<< :<<- :<> := :> :>& :>> :>| :||: laopLAoP.Dist.Internal?? LAoP.Matrix.Internal-|-./.|===><|||LAoP.Matrix.Nat-|-./.|===><|||LAoP.Matrix.Type-|-./.|===><||| LAoP.Relation-|-===><|||LAoP.Relation.Internal-|-===><||| LAoP.Utils. LAoP.Utils.Internal. lapack Numeric.LAPACK.Format##Numeric.LAPACK.Matrix#! ##*###/##*##*###*\#*|#+##-##/\#\###\|-*#-/#.*#===\*#\\#addsub|*-|||Numeric.LAPACK.Matrix.ArrayaddsubNumeric.LAPACK.Matrix.Diagonal%%%Numeric.LAPACK.Matrix.Hermitian*%%%#Numeric.LAPACK.Matrix.Square|=|!Numeric.LAPACK.Matrix.Superscript#^Numeric.LAPACK.Matrix.Symmetric#%%%# Numeric.LAPACK.Matrix.Triangular#%%%%%%#Numeric.LAPACK.Output/+/ <+> Numeric.LAPACK.Vector+++-*|.*|addappendsub|+||-| large-anonData.Record.Anon-.->:.:Compose Data.Record.Anon.Overloading>>>|||large-genericsData.Record.Generic-.->:.: large-recordsData.Record.Overloading>>>||| lasercutter Lasercutter<&&> <*?<|><||> latticesAlgebra.Heyting<=>==>Algebra.Heyting.Free:/\::=>::\/:Algebra.Heyting.Free.Expr:/\::=>::\/:Algebra.Lattice/\\/Algebra.Lattice.Free:/\::\/:Algebra.Lattice.Unicode∧∨⟹⟺lawless-concurrent-machinesData.Machine.Concurrent<~< >~>lawz Test.Logic<==>==> layouting Data.Layout<+>lazify Data.Lazify$~ Data.Lazify.Generic$~ Data.Lazify.Generic.Internal$~ Data.Lazify.Internal$~ lazy-hashData.LazyHash.Class# <#>lazy-hash-cacheData.LazyHash.Cache<#>Data.LazyHash.Cache.Int<#> lazy-searchControl.Search&&&==>||| Data.Coolean!&& !=> !|| &&&==>|||lazyboyLazyboy.Prelude&& /= < == > || lazysmallcheckTest.LazySmallCheck==> >< \/ lazysplinesNumeric.LazySplines# extendWhen extrapForward satisfying splitWhen trimSmart trimmingTolcaData.LCA.Online~=Data.LCA.Online.Monoidal~=Data.LCA.Online.Naive~= ld-intervalsLuminescentDreams.Data.Interval<..<<..<=<=..<<=..<= ldap-client Ldap.Client::= :<= := :=* :>= :~= Ldap.Client.Search::= :<= := :=* :>= :~= lean-peanoNumeric.Peano.Typelevel*+- leancheckTest.LeanCheck+|==>><\/\\//Test.LeanCheck.Core+|==>><\/\\//Test.LeanCheck.Error!==!+|==>><?==?\/\\//$Test.LeanCheck.Function.ListsOfPairs-->> Test.LeanCheck.Utils.Operators $=&&&&&&&&&&&&=$=========>=||=||||||| Test.LeanCheck.Utils.TypeBinding-:-:>->:->:>->>:->>:>->>>:->>>:>->>>>:->>>>:>->>>>>:->>>>>:>->>>>>>: ->>>>>>:> ->>>>>>>: ->>>>>>>:> ->>>>>>>>: ->>>>>>>>:> ->>>>>>>>>: ->>>>>>>>>:> ->>>>>>>>>>: ->>>>>>>>>>:> ->>>>>>>>>>>:->>>>>>>>>>>:>->>>>>>>>>>>>:>- leanpub-wreq Leanpub.Wreq:= learn-physics Physics.Learn *^.+^.-..-^<.>><^*^+^^-^^/Physics.Learn.CarrotVec*^<.>><^*^+^^-^^/Physics.Learn.CommonVec><Physics.Learn.Ket<>Physics.Learn.QuantumMat#> <# <> Physics.Learn.SimpleVec*^<.>><^*^+^^-^^/Physics.Learn.StateSpace.+^.-..-^leksahIDE.Core.Types?>>= lensControl.Lens.Combinators:~:>$consfailingmagnifysnoczoomControl.Lens.Cons:<:><|conssnoc|>Control.Lens.Equality:~:Control.Lens.Fold^..^?^?!^@..^@?^@?!Control.Lens.Getter>$^.^@.Control.Lens.Indexed.> <. <.> Control.Lens.LensH#%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~&&~<#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~=<<<>~<<>=<<>~< .@=.@~.~//=//~<#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<=<>~||=||~Control.Lens.Plated... Control.Lens.Review#Control.Lens.Setter#%=%@=%@~%~&&=&&~**=**~*=*~+=+~-=-~.=.@=.@~.~//=//~<.=<.~<>=<>~=<.>~=~<<.>=<<.>~<=<~<<<.>=<<<.>~<<=<<~ lens-actionControl.Lens.Action^!^!!^!?^@!^@!!^@!? lens-errorsControl.Lens.Error%%&~%&~.&~^&.^&..^&? lens-family Lens.Family2 %~&&&~*~+~-~.~//~<>~^.^..^?||~Lens.Family2.State.Lazy%!=%%=%=&&!=&&=*!=*=+!=+=-!=-=.=//!=//=<>!=<>=<~||!=||=Lens.Family2.State.Strict%!=%%=%=&&!=&&=*!=*=+!=+=-!=-=.=//!=//=<>!=<>=<~||!=||=lens-family-core Lens.Family %~&&&~*~+~-~.~//~<>~^.^..^?||~Lens.Family.State.Lazy%!=%%=%=&&!=&&=*!=*=+!=+=-!=-=.=//!=//=<>!=<>=<~||!=||=Lens.Family.State.Strict%!=%%=%=&&!=&&=*!=*=+!=+=-!=-=.=//!=//=<>!=<>=<~||!=||=lens-filesystemControl.Lens.FileSystem lens-labels Lens.Labels%~&. .~^.Lens.Labels.Prism#lens-typelevelData.Type.Lens %%~ %.~ %^. %^.. %^? %^?! %~.@ .~^.^..^?^?! lens-utilsControl.Lens.Utils##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-=-~... .=.> .@=.@~.~//=//~:<:><#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<=<>~$?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingmagnifysnoczoom|>||=||~lens-witherableWitherable.LensfilterOf mapMaybeOfwitherOflenses Data.Lenses$%$=less-arbitraryTest.LessArbitrary$$$? <$$$> lgtkLGtk*** . libcspm Util.Monad$$ libffi-dynamicForeign.DynamicconsDynForeign.WrapperconsWraplibgraphData.Graph.Libgraph--> libjenkinsJenkins.Rest.Method-&--/--=--?- libjwt-typedLibjwt.PrivateClaims->>.! .::< liblawless Boomerang∘ Machine↢↣⇜ ⇝ ⧻⫴Path<++><.>libmpd Network.MPD%? /=? /~? =? ~? libolegControl.ExtensibleDS:@ Control.Poly2:*: Data.Class1+$ Data.Class2*$$ +$$ Lambda.CCG/ \\ Language.DefinitionTree:*: :+: Language.TDPE--> Language.TEval.EvalN:+ Language.TEval.EvalTaglessF+: Language.TEval.EvalTaglessI:+ Language.TEval.TEvalNC:+ :> Language.TEval.TEvalNR:+ :> Language.TEval.TInfLetI:+ :> Language.TEval.TInfLetP:+ :> Language.TEval.TInfT:+ :> Language.TEval.TInfTEnv:+ :> Language.TEval.TInfTM:+ :> >>= System.IterateeM==<< >. >>== Text.PrintScan:^ Text.PrintScanF^ Text.TotalPrintF^ lieLie.LieAlgebra<|> |*| |+| |.| LieExample.SU3|-| ||| lifted-protoludeProtolude.Lifted$!&ligdGenerics.LIGD.Base:*: lima Converter&?~limpNumeric.Limp.Program.Constraint:!:&&:<:<=:==:>:>=Numeric.Limp.Program.Linear*..*.+..-.lin-alg"Numeric.LinearAlgebra.Matrix.Class.+. .-. Numeric.LinearAlgebra.Vector*> <%> <*> <+> <-> <.>  lindaNumeric.Matrix@@> linear Linear.Affine#. .# .+^.-..-^Linear.Covector$* Linear.Matrix!!*!!/!*!*!!+!!-!*!*!!Linear.Plucker>< Linear.Vector*^^*^+^^-^^/linear-accelerate#Data.Array.Accelerate.Linear.Matrix!!*!!/!*!*!!+!!-!*!*!!$Data.Array.Accelerate.Linear.Plucker><'Data.Array.Accelerate.Linear.Projection$$$$$$#Data.Array.Accelerate.Linear.Vector *^+^-^/^^*^+^+^^-^-^^/ linear-baseControl.Functor.Linear<$<$><&><*>>>>>=Control.Optics.Linear.Iso.> Control.Optics.Linear.Lens.> Control.Optics.Linear.Prism.> Control.Optics.Linear.Traversal.> "Data.Array.Mutable.Unlifted.LinearlseqData.Bool.Linear&&||Data.Functor.Linear<$<$><*>Data.List.Linear++Data.Monoid.Linear<>Data.Num.Linear*+-Data.Ord.Linear/=<<===>>=compareData.Profunctor.Linear***Data.Replicator.Linear<*>Data.Unrestricted.Linearlseq Data.V.Linear<*>Prelude.Linear$$!&**. /<*^^^divlseqmodquotremseqStreaming.Linear:>Streaming.Prelude.Linear:>elemlinear-genericsGenerics.Linear:*::+::.:linear-grammarLinear.Grammar.*. .+. .<=. .==. .=>. linear-maps Data.IdMap! Data.IdMap.Static! :. Data.LinkMap! Data.Sequence.IdMap:< :> <| >< |> Data.Sequence.IdMap2:< :> <| >< |> linear-smcControl.Category.Constrained .//× ∘⊗▵ ▵! ▿ ▿! Control.Category.Linear!: ::: linear-vect Linear.Class &! &* &+ &- &. &^ *& *. .* .*. linearmap-categoryMath.LinearMap.Category -+$>-+|>.<.⊗<$|<.>^>+<\$|$||&>·⊕⊗#Math.LinearMap.Category.Derivatives*∂.∂/∂*Math.LinearMap.Category.Instances.Deriving.+^.+~^.-..-~!.-~..-~^ linkedhashmapData.LinkedHashMap.IntMap! Data.LinkedHashMap.Seq! linnetLinnet//:+: |+|~>~>>Linnet.Endpoint//|+|~>~>>Linnet.Internal.Coproduct:+: Linnet.Internal.HList:::lioLIO canFlowToglblub speaksFor LIO.DCLabel%%/\\/ LIO.Label canFlowToglblub speaksForliquid-fixpointLanguage.Fixpoint.Misc<<= =>> #Language.Fixpoint.Types.Refinements&.& |.| Language.Fixpoint.Utils.Builder<+> Text.PrettyPrint.HughesPJ.Compat$$$+$<+><->liquid-prelude"Language.Haskell.Liquid.Equational***==.?eqLanguage.Haskell.Liquid.Prelude==>(Language.Haskell.Liquid.ProofCombinators&&& ***=<===!==.====>=?Language.Haskell.Liquid.RTick<*><\><\\>=//<=/<=<<=\<=\\<>//=>/=>>=>\=>\\=)Language.Haskell.Liquid.RTick.Combinators&&&***.<==.>==<.<=.<=>.<=>?<=?.==>?==?>.>=.>=?>?>~>.>~>???<==?>== liquidhaskell&Language.Haskell.Liquid.Constraint.Env+++= += -= ?= Language.Haskell.Liquid.GHC.APIAppasJoinIdasJoinId_maybe idCafInfomkAppsmkCoAppsmkFunTy mkInvisFunTymkTyApps mkVarApps mkVisFunTy setIdAritysetIdCallAritysetIdDemandInfo setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdStrictnesssetIdUnfoldingsetInlineActivationsetInlinePragmaLanguage.Haskell.Liquid.Misc!? .&&. .||. <-> 'Language.Haskell.Liquid.Synthesize.Misc<$$> &Language.Haskell.Liquid.Types.Equality=*= list-extrasPrelude.Listless$$!&&***+-. //=<<$<==<<==>>=>>>>=^^^divmodquotremseq||list-transformerList.Transformer<|> list-tupleData.Tuple.List!! !!! list-zipperData.ListZipper ##>$$>%%>&&>*>>.>><##<$$<$~<%%<&&<<*<<.listsafeData.List.Safe!! little-earley Little.Earley:|:|:Little.Earley.Internal.Core::> Little.Earley.Internal.Tree.:|: :|:>< |:live-sequencerBool&&||Function$. Midi+:+=:=llrbtreeData.Set.BUSplay=== Data.Set.Splay=== llvm LLVM.Core& LLVM.Util.Arithmetic%&& %|| ? ?? llvm-dslLLVM.DSL.Expression &&* .&.* .|.* /=* <* <=* ==* >* >=* ||* LLVM.DSL.Parameter$# llvm-general-pureLLVM.General.AST.Instruction:= llvm-general-quoteLLVM.General.Quote.AST:= llvm-hs-pureLLVM.AST.Instruction:= LLVM.Prelude%!! $$!&&****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divmodquotremseq||llvm-ht LLVM.Core$+ & LLVM.Util.Arithmetic %&& %/= %< %<= %== %> %>= %|| ? ?? llvm-pretty Text.LLVM-: :>=: llvm-tfLLVM.Util.Arithmetic %&&%/=%<%<=%==%>%>=%||??? lmdb-simpleDatabase.LMDB.Simple.View! !? loc Data.Loc.Area+ - Data.Loc.Internal.Prelude$$>&&&*>. //=:|<<$<$><&> <*<*><<<<=<>==>>=>>>>=>>>divelemon|| Data.Loc.Span+ - local-searchControl.Search.Local<: =:= >: Control.Search.Local.Eager!!! located-baseData.List.Located!! log-baseLog.=logfloatData.Number.LogFloatpowData.Number.PartialOrdeqgegtleltmaxPOminPOneloggerSystem.Log.Format<:> logic-TPTPCodec.TPTP.Base.!=..&..<=..<=>..<~>..=..=>..|..~&..~. .~|.:!=: :&: :<=: :<=>: :<~>: :=: :=>: :|: :~&: :~: :~|: logic-classes Data.Boolean:&&: :||: Data.Boolean.SatSolver:&&: :||: Data.Logic.Classes.Combine.&. .<=. .<=>. .<~>. .=>. .|. .~&. .~|. :&: :<=>: :=>: :|: :~: <=> ==> ⇒ ⇔ ∧ ∨ Data.Logic.Classes.Constants⊨ ⊭ Data.Logic.Classes.Equals.!=. .=. ≡ ≢ Data.Logic.Classes.FirstOrder! ? ∀ ∃ Data.Logic.Classes.Negate.~. ¬ Data.Logic.Harrison.Lib|-> |=> ∅ Data.Logic.Types.Harrison.Equal:=: logictControl.Monad.Logic.Class>>-logict-sequenceControl.Monad.Logic.Sequence:<%Control.Monad.Logic.Sequence.Internal:<lolCrypto.Lol.Factored\\Crypto.Lol.Prelude"!! $$!%&&****>+++-. //=<<$<==<<==>>=>>>>=^ ^-^/^?divelemmodnotElemquotrem||Crypto.Lol.Tests=~= Crypto.Lol.Types.FiniteField^^ Crypto.Lol.Utils.ShowType** lol-appsCrypto.Lol.Applications.SymmBGV+longboiLongboi++longshotCrypto.Longshot.Internal<%> lorentzLorentz4! ##-> $$: %!%%!%>&&-&?--$-$?. /->/=.:&:->:-|::-> ::::=:><-$><.<=.<>==.>->>.>=.>> ?::|%!||&||*||+||-||.|.||/=||:||<<||<=||<||==||>=||>>||>||@||^||||~> Lorentz.ADT/->:&:= Lorentz.Base#%>&:->Lorentz.ContractRegistry?:: !Lorentz.CustomArith.RationalArith%!%%!Lorentz.Entrypoints:>Lorentz.Entrypoints.Core:>Lorentz.Entrypoints.Doc#-> Lorentz.Expr$: |%!||&||*||+||-||.|.||/=||:||<<||<=||<||==||>=||>>||>||@||^||||Lorentz.Prelude! $&. <>Lorentz.Rebound/=.<.<=.==.>.>=.>> Lorentz.ReferencedByName:=Lorentz.Run.Simple&-&?--$-$?:::<-$>Lorentz.StoreClass:-|::-> ~> Lorentz.StoreClass.Extra.Lorentz.ViewBase>->?:: Lorentz.Zip## ::: lp-diagramsGraphics.Diagrams.Core<======~= >==Graphics.Diagrams.Object#.<. :%> Graphics.Diagrams.Point.=.Graphics.Diagrams.Types*- lsp-typesLanguage.LSP.Types|? ltkGraphics.UI.Editor.Parameters<<<- lucid-extrasLucid.Bootstrap3$:luiGraphics.UI.LUI.Accessor<^ ^. ^: ^> lumberjack Lumberjack|# luminanceGraphics.Luminance.Buffer@! @? Graphics.Luminance.Core.Tuple:. !Graphics.Luminance.Shader.Program.= <> maamFP.Prelude.Core%# #! *$ *∘ *⋅ + - / <×> <⋅> >> >>= ^ ^$ ^*$ ^*∘ ^*⋅ ^∘ ^⋅ × ↦ ∈ ∘ ∘∘ ∧ ∨ ≟ ≤ ≥ ≫ ≫= ≫=* ⋚ ⌿ ♯$ ♯⋅ ⧺ FP.Prelude.DSL◇$ ◇⇨ ◇⋅ ◇⋅| FP.Prelude.Effects<|> <⊓> <⊔> <⧺> FP.Prelude.Lattice>< ⊑ ⊑⊒ ⊒ ⊓ ⊔ ⊟ FP.Prelude.Lib=≫ FP.Prelude.Morphism⌾ macMAC.FlexibleLb<<*>> machinesData.Machine.Pipe+>>>+>>>~>~>Data.Machine.Process<~ ~> magicbane Magicbane!? .!= .: .:! .:? .= :<|> ?: Magicbane.App:<|> magma Data.Magma<> magmas Data.Group// <<<>\\ Data.Magma<<mainland-prettyText.PrettyPrint.Mainland<+/><+><|>managed-functions Managed.Agent! !? manateeManatee.Action.Basic==> manatee-anythingManatee.Plugin.Anything.Main<=> manatee-coreManatee.Toolkit.General.Basic<< Manatee.Toolkit.General.Functor<<<= <<=< =>>> >=>> Manatee.Toolkit.General.List?! Manatee.Toolkit.General.Maybe>?>= >?>=> ?>= ?>=> Manatee.Toolkit.General.Misc=~^ mangopay Web.MangoPay?+ manifoldsData.Function.Differentiable?->?<?>?|:Data.Manifold.FibreBundle:@.Data.Manifold.PseudoAffine.+~^.-~!.-~..-~^.−.Data.Manifold.Shade:±|±|✠Data.Manifold.TreeCover:±|±|Data.Manifold.WithBoundary!-| .+^| .--! .--. .-| |+^ manifolds-coreMath.Manifold.Core.PseudoAffine.+~^.-~!.-~..-~^ map-classesControl.Class.Impl.Map! Control.Class.Map! map-syntaxData.Map.Syntax#!###? mapalgebraGeography.MapAlgebra:.markdown-unlitText.Markdown.Unlit:&::|: marked-prettyText.PrettyPrint.MarkedHughesPJ$$ $+$ <+> <> markovData.MarkovAlgo:-> :->. markov-chain-usage-model MarkovChain.*.-./^*markov-processesData.Distribution markov-realization Markov.Extra>*<marxup MarXup.Math$$$ =:^^^ MarXup.PrettyPrint<$$$><$$><+>massivData.Massiv.Array!!>!?!?>.....:????>Data.Massiv.Array.Numeric!*!!+!!-!!.! !/!!>< !>< .><. .^.^^/.><. divAmodAquotAremAData.Massiv.Core.Index:.:>Data.Massiv.Vector!!?.....: massiv-testTest.Massiv.Utils.&&..||.:~::~~:<$<$!><=<=/==<<=====>>< >=>>>>>=shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrow math-extrasMath.Extras.Double/~= ~= math-gradsMath.Grads.Algo.Interaction/~= ~= Math.Grads.Graph!. !> ?. ?> math-programmingMath.Programming*..*.+..-../.<=.<=..==.==..>=.>=.<=.==.>=.Math.Programming.Dsl .<=.<=..==.==..>=.>=.<=.==.>=.Math.Programming.LinExpr*..*.+..-../mathflow MathFlow.Core%* <+><-- matplotlibGraphics.Matplotlib###%@@Graphics.Matplotlib.Internal###%@@matrices Data.Matrix! Data.Matrix.Class! Data.Matrix.Generic! Data.Matrix.Sparse.Generic! Data.Matrix.Storable! Data.Matrix.Symmetric.Generic! Data.Matrix.Unboxed! matrix Data.Matrix! <-> <|> matrix-market-pureData.MatrixMarket:+ matrix-staticData.Matrix.Static! !. .* <-> <|> ^* matterhornMatterhorn.Config.Schema Matterhorn.Prelude&<|>^.^?mattermost-apiNetwork.Mattermost.Util~= maxentNumeric.MaxEnt.=. maxent-learner-hw!Text.PhonotacticLearner.Util.Ring⊕ ⊖ ⊗ ⊙ maybenchTest.Maybench.Command<@> Test.Maybench.Utils<++> <| |> mcmcMcmc@~Mcmc.Monitor.Parameter>$<Mcmc.Monitor.ParameterBatch>$< Mcmc.Proposal@~ median-streamData.MedianStream+> <+ megaparsecText.MegaparsecmelfData.Elf~: membershipType.Membership:>Type.Membership.HListHConsType.Membership.Internal:>HConsmemdbDatabase.Immutable! memorable-bitsData.Memorable.- .| Data.Memorable.Internal.- .| menshen Data.Menshen=~ ??:merge Data.Merge*>.! .?<*<*><|> metamorphicAlib/\ >< Graph\\ methodControl.Method.Internal:*metric Data.Metric<-> Data.Metric.Class<-> mezzoMezzo$++Mezzo.Render.MIDI>< Mezzo.Render.Transform+++ >< mezzolens Mezzolens.~ ^. ^.. ^? Mezzolens.State.Lazy %%= %= &&= *= += -= .= //= <>= <~ ||= Mezzolens.State.Strict %%= %= &&= *= += -= .= //= <>= <~ ||= mfsolve Math.MFSolve=&====mgeneric Data.MGeneric:**: :*: :++: :@: microaesonData.Aeson.Micro.!= .: .:! .:? .=microformats2-parserData.Microformats2.Parser.Util##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-=-~.!= ... ./ .: .:! .:? .= .> .@=.@~.~//=//~:<:><#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<=<>~$ ?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingsnoc|>||=||~ microgrooveData.Microgroove! microlens Lens.Micro%~&+~-~.~<%~<&><<%~<<.~<>~?~^.^..^?^?!failingLens.Micro.Internal#. .# microlens-mtlLens.Micro.Mtl%=&~*=+=-=.=//=<%=<.=<<%=<<.=minioperationalControl.Monad.Operational.Mini:>>= $Control.Monad.Trans.Operational.Mini:>>= minitypeset-opengl'Graphics.Rendering.MiniTypeset.Document<#> <-> <|> miniutterNLP.Miniutter.English<+>minlen Data.MinLenmlconsmiosSAT.Mios.Util.BoolExp-!- -&&&- -&- -=- ->- -|- -|||- mismi-pP$$!$>&&&**>+-. /=<<$<$><*<**><*><=<><|>=<<==>>=>>>>=elemon||mismi-s3 Mismi.S3.Data// Mismi.S3.Internal+/ mismi-s3-coreMismi.S3.Core.Data// miso Miso.Effect#> <# Miso.Util=: mit-3qvpPyAi6mH Mit.Prelude.!! $$!$>&&&****>+++-. //=<<$<$!><$><&> <*<*><<<<=<=<<><|>=<<==>>=>=>>>>>=>>>^^^divelemmodnotElemonquotremseq|| mix-arrowsControl.Arrow.Mix.Category~>>= Control.Arrow.Mix.Utilities->> mixed-types-num MixedTypesNumPrelude%Numeric.MixedTypes.AddSub+-Numeric.MixedTypes.Bool&&||Numeric.MixedTypes.Div/Numeric.MixedTypes.Eq!/=!!==!/===?==?Numeric.MixedTypes.Literals!! Numeric.MixedTypes.Mul*Numeric.MixedTypes.Ord !!!>=!<<=>>=?<=??=??>?Numeric.MixedTypes.Power^^^ Numeric.MixedTypes.PreludeHiding$$!*>++. <$<$><*<*><>=<<>>>>=elemnotElemseqNumeric.OrdGenericBool&&/=<<===>>=||ml-wLanguage.ML.TypeCheck:>: mmorphControl.Monad.Morph<|<=<|>|>|>=Control.Monad.Trans.ComposeComposeT mockazoData.Component.Mock:~:modData.Mod^% Data.Mod.Word^%modelicaparser Language.Modelica.Parser.Utility~* ~+ moeText.HTML.Moe2.DSL.Kawaii~> Text.HTML.Moe2.DSL.Markdown ! # ## ### #### ##### ###### * *** <> >> Text.HTML.Moe2.Element! Text.HTML.Moe2.Utils/ monad-logger-aesonControl.Monad.Logger.Aeson.=:##Control.Monad.Logger.Aeson.Internal:#monad-logger-prefixControl.Monad.Logger.Prefix prefixLogs monad-lrsMath.LinearRecursive.Monad*> <* <+- <+> <-> <:- monad-paramControl.Monad.Parameterized=<< >> >>= monad-resumption#Control.Monad.Resumption.Connectors<||> !Control.Monad.Resumption.Reactive<~> monad-skeletonControl.Monad.Skeleton:>>=Control.Monad.Skeleton.Internal|> monad-stateControl.Monad.Record$: $:: <$: <-> <: <:: <:< <<: <<:: <=: =: =:: >$$> >$< >$> monad-statevarControl.Monad.StateVar$= $=! $~ $~! monad-unifyControl.Monad.Unify$? =:= =?= monad-var MonadVar.Lens.! ./monadLib-composeMonadLib.Compose<<< >>> monadfibreControl.Monad.Fibre<&&> <||> monadic-bangMonadicBang.Internal:<- MonadicBang.Utils?? monadiccp Control.CP.FD.Interface! @!! @%@&&@*@+@++@-@.. @/@/=@:@<@<=@=@>@>=@?@??@||Control.CP.SearchTree/\\/ Control.Mixin.Mixin<@>Control.Search.Combinator.And<&> Control.Search.Combinator.Or<|> Control.Search.Generator $/= $< $<= $== $> $>= <@> @$ @++@ @. @> @>>>@ Control.Search.GeneratorInfo@@ Control.Search.Language$/= $< $<= $== $> $>= &&& <== >>> @-> @< @<= @== @=> @> @>= ||| Control.Search.Stat#/ #< #<= #= #> #>= Data.Expr.Data<<>>Data.Expr.Sugar! @!! @%@&&@*@+@++@-@.. @/@/= @:@<@<=@= @>@>=@?@??@|| monadplusControl.Monad.Plus<$<$!><=<=<<>=>>>>>=monky Monky.Utility sdivBound sdivUBoundmono-traversable Data.NonNull<|monoid Data.Monoids<> monoid-extrasData.Monoid.Cut:||:Data.Monoid.MList*::::Data.Monoid.Split:| monoid-ownsData.Monoid.Owns+ monoid-subclassesData.Monoid.Monus<\>Data.Semigroup.Cancellativemonoidal-containersData.IntMap.Monoidal! \\ Data.IntMap.Monoidal.Strict! \\ Data.Map.Monoidal! !? \\ Data.Map.Monoidal.Strict! !? \\ monoidal-functorsControl.Category.Cartesian/\ \/ Control.Category.Tensor# #Data.Bifunctor.Monoidal.Specialized&&&&|***+++|&||| monoidplusData.Monoid.Plus|*| |+| |-| |/| monoidsData.Group.Sugar- .\. / ^^ Data.Monoid.Sugar* + ^ monomerMonomer.Core.Combinators styleActivestyleActiveSet styleBasic styleBasicSet styleDisabledstyleDisabledSet styleFocusstyleFocusHoverstyleFocusHoverSet styleFocusSet styleHover styleHoverSetMonomer.Core.StyleUtil nodeEnabled nodeFocusablenodeKey nodeVisiblemonopati!System.Monopati.Posix.Combinators <-^> <.^>      <^> <^^> <~^> monusData.Monoid.Monus-monus-weighted-searchControl.Monad.Heap:<Control.Monad.Heap.List:- Data.Monus|-|,MonusWeightedSearch.Internal.CoerceOperators#. .# <#$>moo Moo.GeneticAlgorithm.Constraints .< .<. .<= .<=. .==. .>. .>=. <. <=. more-containers Data.Multimap! Data.Multiset! more-extensible-effects Data.FTCQueue>< |> morley Morley.Michelson.TypeCheck.Types-:&:/::&::: Morley.Michelson.Typed//->:#:- AnnsCons AnnsTyConsSeq!Morley.Michelson.Typed.AnnotationAnnsCons AnnsTyConsMorley.Michelson.Typed.Haskell//->(Morley.Michelson.Typed.Haskell.Instr.Sum//->Morley.Michelson.Typed.Instr:#SeqMorley.Michelson.Typed.Scope:- Morley.Util.Binary##:#:Morley.Util.Named! <:!><:?>Morley.Util.Peano|-Morley.Util.SizedList::<:<appendMorley.Util.SizedList.Types::<:<Morley.Util.Type++==Morley.Util.TypeLits:$$::<>:Morley.Util.Typeable:~: morley-clientMorley.Util.BatchingsubmitThenParsemorley-preludeMorley.Prelude.Boolean&&||Prelude9$$!$!!$>%~&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodonquotremseqxormorley-upgradeable,Lorentz.Contracts.Upgradeable.EntrypointWise/==>Lorentz.UStore.Migration.Blocks$:<-->morpheus-graphql-client%Data.Morpheus.Client.CodeGen.Internal.: .:? .=morpheus-graphql-code-gen-utilsData.Morpheus.CodeGen.Printer.<> morpheus-graphql-coreData.Morpheus.Internal.Ext<:> Data.Morpheus.Internal.Utils<:> morphismsControl.Morphism!# $&. .^. ?morphisms-functors Control.Functor.Contravariant$< >$ >$< Control.Functor.Covariant$> <$ <$> %Control.Functor.Covariant.Alternative<+> %Control.Functor.Covariant.Applicative*> <* <*> .Control.Functor.Covariant.Composition.Bindable<=< =<< >=> >>= 2Control.Functor.Covariant.Composition.Distributive>>- 0Control.Functor.Covariant.Composition.Extendable<<= =<= =>= =>> 1Control.Functor.Covariant.Composition.Traversable->> Control.Functor.Invariant<$< >$> Data.Functor.Product:&: morphisms-objectsControl.Object.Chain< <= > >= Control.Object.Semigroup<> Control.Object.Semilattice/\ \/ Control.Object.Semiring>< Control.Object.Setoid&&/= == || mosaico-libGraphics.Mosaico.Diagrama:-: :|: motoMoto*motor Motor.FSM!+!-!-->:=>>> Motor.FSM.Sugar!+!-!-->:=mpeffControl.Mp.Eff:* mpolynomialsMath.Algebra.MultiPol*^^**^^*^^+^^-^mpppcText.PrettyPrint.MPPPC.OneDim<$$> <$> <+>   <> Text.PrettyPrint.MPPPC.TwoDim/+/ // <+> <> mpreludeMPrelude$$>&&&*+. /=<<$<$><&><*><=<=<<><|>=<<==>>=>>>>=||mps MPS.Light- . / < <-> > ^ msMath.MetricSpace<-> msh Language.MSH.! .$ <: >: mtl-unleashedControl.Lens.States%= .= <.= <>~ ++> >:> mu-rpcMu.Named:|: Mu.Server:<&>::<|>::<||>::|: mu-schema Mu.Schema:*:-> Mu.Schema.Class:-> Mu.Schema.Definition:-> Mu.Schema.Interpretation:*multext-east-msdData.MultextEastMsd=~= multi-containers Data.Multimap! Data.Multimap.Internal! Data.Multimap.Set! Data.Multimap.Set.Internal! Data.Multimap.Table! !? Data.Multimap.Table.Internal! !? multicurryableMulticurryable:* multilinearMultilinear.Class $$|$| /\<<<|<<|\/|==||>>|>>>Multilinear.Generic.MultiCore! *. +. -. .* .+ .- Multilinear.Generic.Sequential! *. +. -. .* .+ .- Multilinear.Index!=!multimap Data.MultiMap! Data.SetMap! multipass Data.Pass:& :* :+ :- @# @@ @@@ Data.Pass.Calc:& Data.Pass.Eval@@ Data.Pass.Eval.Naive@@@ Data.Pass.L:* :+ @# Data.Pass.Thrist:- multirecGenerics.MultiRec.Base:*::+::>:Generics.MultiRec.Fold&:-> Generics.MultiRec.FoldAlg&Generics.MultiRec.FoldAlgK&Generics.MultiRec.FoldK&:-> Generics.MultiRec.TEq:=:multisetData.IntMultiSet\\ Data.MultiSet\\ multiset-combMath.Combinatorics.Multiset+: multistateData.HList.HList:+: multivariantControl.Invertible.BiArrow.Free:- Test.Multivariant.Classes<***> <+++> ~> murderLanguage.Grammars.Murder+>> ^= ^| music-diatonicMusic.Diatonic.Note$# music-pitchMusic.Pitch.Common.Semitones/:= =:= music-scoreData.Functor.Rep.Lens! Music.Score.Part Music.Time.Juxtapose<| |> Music.Time.Transform*| |* |/ Music.Time.Types<-< <-> >-> mustache Text.Mustache~=~>Text.Mustache.Types~=~>↝⥱mutable Data.Mutable:!>Data.Mutable.Instances:!>Data.Mutable.PartscompMP mvcMVC<> myxine-clientMyxine##@@mzvControl.Monad.Mask:&: n-ary-functor NAryFunctor-#- namedNamed! Named.Internal! named-recordsData.NamedRecord:+ := named-sopData.NamedSOP.Type%++ :->SConsnamelistText.Namelist.Types:* := nano-erlControl.Concurrent.NanoErl! nanoparsecData.Nanoparsec.*> <*.  nanospec Test.HspecshouldBe shouldReturnnaturalNatural!! !!! natural-arithmeticArithmetic.Nat<=?  net-spiderNetSpider.Interval<..<<..<=<=..<<=..<=NetSpider.Query<..<<..<=<=..<<=..<=netcoreFrenetic.NetCore<%> <&&> <+> <||> ==> Frenetic.NetCore.Short<%> <&&> <+> <||> ==> netlib-carrayNumeric.Netlib.CArray.Utility^! netlib-comfort-array#Numeric.Netlib.ComfortArray.Utility^! netriumContract %&&%*%+%-%/%<%<=%==%>%>=%|| Observable %&&%*%+%-%/%<%<=%==%>%>=%||netspecNetwork.NetSpec.: Network.NetSpec.ByteString! Network.NetSpec.Json! Network.NetSpec.Text! nettle-frpNettle.FRPControl.AFRP # *^ --> -=> >-- >=- ^+^ ^-^ ^/ Nettle.FRPControl.NettleSF<+> ==> !Nettle.FRPControl.PacketPredicate<&> <|> |- !Nettle.FRPControl.SwitchInterface<+> nettle-netkitNettle.Netkit.LabUtil# <--> @@ nettle-openflowNettle.IPv4.IPAddress// netwireControl.Wire.Core&&&! ***! Control.Wire.Event&><&Control.Wire.Switch-->>--network-api-supportNetwork.Api.Support<>Network.Api.Support.Request<> network-houseNet.Bits.!. Net.PacketParsing# #! <# network-transport-testsNetwork.Transport.Tests.Traced>> >>= neuralData.MyPrelude& .~ <.>  <> ^. Data.Utils.Matrix!!! !!? <%%> Data.Utils.Vector! !? <%> <+> <-> neural-network-baseData.NeuralNetwork:++ neural-network-blashs!Data.NeuralNetwork.Backend.BLASHS<<+ <<= niagraData.Niagra.DSL.= ? Data.Niagra.Selector! # .+. .>. .~. <::> <:> <||> |$=| |*=| |=| |^=| ||=| |~=| nice-htmlText.Html.Nice:$ :- := Text.Html.Nice.FreeMonad:- := Text.Html.Nice.Internal:$ :- := Text.Html.Nice.Writer!nix-eval Language.Eval$$Language.Eval.Internal$$nixpkgs-update OurPrelude&<&><><|>>>>noether Lemmata.Applicative<<*>> Lemmata.Base$! Lemmata.Bool&&^<&&><||>||^Lemmata.Functor$><$ <$><<$>> Lemmata.Monad<$!><=<=<<>=>>> >>= Lemmata.Semiring<.> Noether.Algebra.Linear.API%< %<~ >% ~>% Noether.Algebra.Single.API&&*+-/||Noether.Equality== nomLanguage.Nominal.Abs:@>Language.Nominal.Binder:@@!@>@@ @@! @@. Language.Nominal.Equivar$$!Language.Nominal.Examples.SystemF:-> @. @: 'Language.Nominal.Examples.UntypedLambda:@ Language.Nominal.SMonad+<< >>+ Language.Nominal.Utilities.: non-empty Data.NonEmpty!:append appendLeft appendRightData.NonEmpty.Classappendcons Data.Optional?:non-empty-zipperData.List.NonEmptyZipper|: non-negativeNumeric.NonNegative.Class-| addnonempty-alternative Data.NonEmpty:<: :>: nonempty-containersData.IntMap.NonEmpty! !? \\ Data.IntSet.NonEmpty\\ Data.Map.NonEmpty! !? \\ Data.Sequence.NonEmpty !? :<||:||><|><><|NESeq|>|><Data.Sequence.NonEmpty.Internal:<||:||><|><NESeq|><Data.Set.NonEmpty\\ nonempty-vectorData.Vector.NonEmpty! !? ++ // nonempty-wrapper Data.NonEmpty<||>nonempty-wrapper-textData.Text.Lazy.NonEmptyconsData.Text.NonEmptycons nonemptymapData.Map.NonEmpty!? nonfreeData.Monoid.Nonfree◇ nonlinearNonlinear.Matrix!!*!!/!*!*!*!*!!Nonlinear.Vector*^^*^/noodleLanguage.Noodle.Parsing.Generic<|> not-in-base NIB.Pointfree &&* ..% ..%.. ...% ...@ ..@ >>* ^.. ^... ||* nri-preludeBasics&&*+++-////=<<< <=<|==>>=>> ^|>|| NriPrelude<*>>>=nsisDevelopment.NSIS %&&%/=%<%<=%==%>%>=%||&?@=nuhaMath.Nuha.Base! !! |! |!! ||! ||!! |||! |||!! Math.Nuha.Numeric*|+|-|/||*|**|*||+|+||-|-||.||/|^numberData.Number.Peano// numbered-semigroupsData.Semigroup.Numbered=== ||| ── ━━ │ ┃ ██ ■ numbersData.Number.Vectorspace*> <+> numeric-domainsNumeric.Domain<..< <..<= <=..< <=..<= numeric-preludeAlgebra.Additive+-<*>.+<*>.-<*>.-$Algebra.Algebraic^/Algebra.DimensionTerm%*%%/%Algebra.DivisibleSpace Algebra.Field/^-Algebra.IntegralDomaindivmodAlgebra.LatticednupAlgebra.Module*><*>.*> Algebra.Monoid<*> Algebra.NonNegative-|addAlgebra.RealIntegralquotremAlgebra.RightModule<* Algebra.Ring*^Algebra.Transcendental**^?Algebra.Vector*><+>eqMathObj.LaurentPolynomial! MathObj.Permutation.CycleList*> Number.Complex+:-: Number.DimensionTerm&*&&/&*& Number.Peano&&~Number.Quaternion+:: Number.Ratio%:% Number.ResidueClass.Check/:ConsNumber.ResidueClass.Maybe/:ConsNumericPrelude#!! $$!%&&****>+++-. //=<<$<==<<==>>=>>>>=^^-^/^?divelemmodnotElemquotremseq||NumericPrelude.Base!! $$!&&++. /=<<$<==<<==>>=>>>>=elemnotElemseq||NumericPrelude.List.Checked!! NumericPrelude.List.Generic!! NumericPrelude.Numeric%****>+-/^^-^/^?divmodquotrem numeric-questFraction// :-: QuantumVector *>+>:* :+> :<+ :<| :|> <*<+<><|><|>Tensor# ## <*><<*>> numeric-toolsNumeric.Classes.Indexing! numerical&Control.NumericalApplicative.Backwards<**> Numerical.Array.Shape:*numhask NumHask*** *.++.--..*.+.-.///. /\:% :+++. /=<<$<$><*<*><=<>=<<==>>=>>>>=elemnotElemseq||numhask-preludeNumHask.Prelude4$$!!$>%&&&&&^*>++. .&..|./=:*::+::.::|:~:<<$<$!><$><&&><&><*<**><*><=<=<<><|><||>=<<==>>=>=>>>>>=elem hashWithSaltnotElemonrotaterotateLrotateRshiftshiftLshiftRxor||||^ numhask-space NumHask.Space+/-...>.<|.|.||<||>|NumHask.Space.Point<.>numtypeNumeric.NumType*+-/ numtype-dkNumeric.NumType.DK.Integers*+-/^ numtype-tfNumeric.NumType.TF* + - / nurbs Linear.NURBS≃ ≄ ⊕ nvfetcherNvFetcher.PackageSet%~&.~?~^.nvim-hsNeovim+:Neovim.Classes+:<+>nyx-gamePlay.Engine.Utils.: o-clock Time.Rational%::% >=%Time.Timestamp*:*+:+-%--:-/:/obddOBDD.Operation&&==>|| objectiveControl.Object.Instance.-..-?- Control.Object.Object@!= @-@<<@@>>@@>>^@||@ @~^>>@ observableControl.Observable*:~* *:~. .:~* .:~. observable-sharing Data.Ref.Map! ocaml-export OCaml.Export:<|>:>OCaml.Internal.Common<$+$> oeis2Math.OEIS.Internal+. +.+ .+ oiData.OI.Combinator|/| |:| |><| |>| Data.OI.IFun|->| |::| |<>| Data.OI.Internal## =: ?? okapiOkapi.Function ombraGraphics.Rendering.Ombra.Shader~< ~<* (Graphics.Rendering.Ombra.Shader.Language! *. .* .*. ^| ^|^ Graphics.Rendering.Ombra.Vector*. .* .*. ^| ^|^ one-linerGenerics.OneLiner.Internal.: oneormoreData.OneOrMore.Operators++ oo-prototypesData.Prototype.-> op Control.Op-<$<.><$<<.<<<<<<<^<=<<|=$<=*<=<$<=<<>$=>$>>$>->$>=>*=>=>>>>>=>>>>>^^<<^>>|>opaleye$Opaleye.Internal.HaskellDB.PrimQuery:#> :#>> :& :&& :&< :&> :* :+ :- :-> :->> :-|- :/ :< :<< :<= :<> :<@ := :== :> :>= :>> :? :?& :?| :@> :^ :| :|| :~ Opaleye.Internal.Helpers.:.:..::.::.Opaleye.Internal.Operators.&&.==.||Opaleye.Operators*+-.#>.#>>.&&.&<.&>.++ .->.->>.-|-./=./==.<.<<.<=.<@.==.===.>.>=.>>.?.?&.?|.@>.||/opaleye-sqliteOpaleye.SQLite.Internal.Helpers.:.:..::.::.Opaleye.SQLite.Operators .&&.++ ./=.<.<=.==.>.>=.|| open-pandocText.Pandoc.Shared>>~ open-unionData.OpenUnion@>Data.OpenUnion.Internal@!>@>openapi-petstoreOpenAPIPetstore.Core-&-openapi3Data.OpenApi.Internal.Utils<+> opencvOpenCV.TypeLevel::: openglesGraphics.OpenGLES.Core$= &= opentracing OpenTracing:&<+>OpenTracing.Propagation:&<+> optics-coreData.Maybe.Optics%? Optics.AffineFoldafailingOptics.Cons.Core:<:><|conssnoc|> Optics.FoldfailingsummingOptics.Indexed.Core% %> <% <%> Optics.Internal.Optic% %% %& Optics.Internal.Utils#. .#Optics.IxAffineFold iafailing Optics.IxFoldifailingisummingOptics.IxTraversaliadjoinOptics.Operators !~#%!~%~.~?!~?~^.^..^?Optics.Operators.Unsafe^?! Optics.Optic% %% %& &<&>Optics.Traversaladjoin optics-extra Optics.Cons:<:><|conssnoc|>Optics.Indexed%> <% <%> Optics.State.Operators %%=%=.=<%=<.=<<%=<<.=<> <> Options.Applicative.Help.Pretty.$. <$$><+>Options.Applicative.Internal optparse-genericOptions.Generic::: optstreamOptions.OptStream.Classes#->#>-#><#<##-><##><#-<#-><#><$?><&?><-#<-##><-#><-|><|->orcOrc.Combinators Orc.Monad<+> order-statisticsStatistics.Order@! @# @@ ordered Data.Poset <==> ordered-containersData.Map.Ordered /\| <>|<|>|\\ |/\ |<|<>|>Data.Map.Ordered.Strict /\| <>|<|>|\\ |/\ |<|<>|>Data.Set.Ordered /\| <>|<|>|\\ |/\ |<|<>|>ordersData.PartialOrder.: ordrea FRP.Ordrea<@ <@> orgstat OrgStat.Util??~ ormoluOrmolu.Terminal.QualifiedDo>> ory-hydra-client OryHydra.Core-&-osetData.Set.Ordered<>|<|>|\\ |<|<>|>Data.Set.Ordered.Classes<>|<|>|\\ |<|<>|>Data.Set.Ordered.OSet<>|<|>|\\ |<|<>|> overloaded Overloaded%% consOverloaded.Categories%% Overloaded.ListsconsOverloaded.Lists.BidiconsovertureOverture!> .>  packstreamData.PackStream=: Data.PackStream.Internal.Type=: pact-time Pact.Time*^.+^.-.Pact.Time.Internal*^.+^.-. pads-haskellLanguage.Pads.PadsParser<++> <||> =@=Language.Pads.PadsPrinter+++ palindromes,Data.Algorithms.Palindromes.PalindromesUtils=:= pandocText.Pandoc.Parsing<+?><|>pandoc-citeprocText.CSL.Eval.Names<++> <+> pandoc-typesText.Pandoc.Builder<>pandora$Pandora.Core.Functor.::.:::::|.:::|:.::|:::=:=>:=>< <:=<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>~>Pandora.Core.Interpreted -#=-#=$> -=: <$=#- <~<~~<~~~<~~~~<~~~~~<~~~~~~<~~~~~~~ <~~~~~~~~=#-&Pandora.Paradigm.Algebraic.Exponential% &.:.."Pandora.Paradigm.Algebraic.Functor8-*-*-*--+--*--+ ---*---+ ----*----+ -----*-----+ ------*------+ -------*-------+ --------* --------+ <-*-<-*-*-<-*--<-*---<-*----<-*----- <-*------ <-*------- <-*-------- <-+-<-|-<-|-<-|->-|-<-||-<-||--<-||---<-||---- <-||----- <-||------ <-||------- <-||-------- <-|||- <-|||-- <-|||--- <-|||---- <-|||----- <-|||------ <-|||------- <-|||-------- <<-/- >-|-<-|->-|->-|->-||->-||-->-||--->-||---- >-||----- >-||------ >-||------- >-||-------- "Pandora.Paradigm.Algebraic.Product:*:<:*:>Pandora.Paradigm.Algebraic.Sum:+:9Pandora.Paradigm.Controlflow.Effect.Transformer.Comonadic:<7Pandora.Paradigm.Controlflow.Effect.Transformer.Monadic:>'Pandora.Paradigm.Controlflow.Observable*:~* *:~. .:~* .:~. %Pandora.Paradigm.Controlflow.Pipeline=*= Pandora.Paradigm.Inventory=<> ~<> &Pandora.Paradigm.Inventory.Some.Optics#=@>>> @>>>'Pandora.Paradigm.Primary.Functor.Tagged:#Pandora.Paradigm.Schemes.TT<::<<::>>::<>::>Pandora.Paradigm.Schemes.TU<:.<<:.>>:.<>:.>Pandora.Paradigm.Schemes.TUT<:<.>:<<:<.>:><:>.<:<<:>.<:>>:<.>:<>:<.>:>>:>.<:<>:>.<:>Pandora.Paradigm.Schemes.T_U<:.:<<:.:>>:.:<>:.:>Pandora.Paradigm.Schemes.UT<.:<<.:>>.:<>.:>Pandora.Pattern.Category -------->------->------>----->---->--->--><--<---<----<-----<------<------- <--------Pandora.Pattern.Functor.Adjoint --------|-------|------|-----|----|---|--|-||-|--|---|----|-----|------|------- |-------- Pandora.Pattern.Functor.Bindable=<<==<<===<<====<<=====<<======<< =======<<%Pandora.Pattern.Functor.Contravariant >$$< >$< >-|->-|-->-|--->-|---->-|----- >-|------ >-|------- >-|-------- >-|-|-!Pandora.Pattern.Functor.Covariant<$$$> <$$> <$> <-|-<-|--<-|---<-|----<-|----- <-|------ <-|------- <-|-------- <-|-|-<-|-|--<-|-|--- <-|-|---- <-|-|----- <-|-|------ <-|-|------- <-|-|-|-$Pandora.Pattern.Functor.Distributive -------<<------<<-----<<----<<---<<--<<-<<"Pandora.Pattern.Functor.Extendable<<=<<==<<===<<====<<=====<<====== <<======= <<======== !Pandora.Pattern.Functor.Invariant#Pandora.Pattern.Functor.Traversable<-/-<-/--<-/---<-/----<-/----- <-/------ <-/------- <-/-/-Pandora.Pattern.Object.Chain< <=<=>> >=Pandora.Pattern.Object.Group- Pandora.Pattern.Object.Ringoid* Pandora.Pattern.Object.Semigroup+ "Pandora.Pattern.Object.Semilattice/\ \/ Pandora.Pattern.Object.Setoid!===?=Pandora.Pattern.Semigroupoid. %Pandora.Pattern.Transformer.Hoistable/|\pansitePansite%%>>pantryPantry.Internal.AesonExtended .!= ..!= ...: ...:? ..: ..:? .: .:! .:? .= pantry-tmpPantry.Internal.AesonExtended .!= ..!= ...: ...:? ..: ..:? .: .:! .:? .= papa-base-export$Papa.Base.Export.Control.Applicative*> <$<$><* <**><*> <|> !Papa.Base.Export.Control.Category. Papa.Base.Export.Control.Monad<$!>>> >>= Papa.Base.Export.Data.Bool&&||Papa.Base.Export.Data.Eq/= == Papa.Base.Export.Data.FoldablenotElemPapa.Base.Export.Data.Function$&onPapa.Base.Export.Data.Functor$><$ <$>Papa.Base.Export.Data.List\\elemnotElem#Papa.Base.Export.Data.List.NonEmpty:| Papa.Base.Export.Data.Ord< <= > >= Papa.Base.Export.Data.Ratio%Papa.Base.Export.Data.Semigroup<> Papa.Base.Export.Prelude$&&***+-//=<<$<$><*><===>>=^^^elemmodnotElemquotrem||papa-base-implementPapa.Base.Implement.Data.List++ papa-bifunctors-exportPapa.Bifunctors.Export*>> <<$>><<* <<**>><<*>> papa-includePapa.Include.Data.Functor.Apply*> <* >> Papa.Include.Data.Functor.Bind=<< >>= Papa.Include.Data.List++ :| Papa.Include.Data.Semigroupoid. papa-lens-implementPapa.Lens.Implement.Data.List!! papa-prelude-lensPapa.Prelude.Lens.Data.List!! papa-prelude-semigroupoids-Papa.Prelude.Semigroupoids.Data.Functor.Apply*> <* >> ,Papa.Prelude.Semigroupoids.Data.Functor.Bind=<< >>= ,Papa.Prelude.Semigroupoids.Data.Semigroupoid. papa-prelude-semigroups!Papa.Prelude.Semigroups.Data.List++ :| papa-semigroupoids-exportPapa.Semigroupoids.Export-<--<<->-.> .>>  <. <..><.> <<$>><<. <<..>><<.>> >>- papillon Text.Papillon<$><*>Text.Papillon.Core<$><*>parallelControl.ParallelparpseqControl.Parallel.Strategies $| $|| -| -|| .| .|| >| >|| dot usingusingIO Control.Sequsing parameterized!Parameterized.Control.Applicative&*>&<*&<*>&<|>Parameterized.Control.Monad&<=<&=<<&>=>&>>&>>=Parameterized.Data.Semigroup&<>parameterized-dataData.Param.FSVec! +++><+parameterized-utilsData.Parameterized.BoolRepr%&&%||:~:Data.Parameterized.Classes:~: hashWithSaltData.Parameterized.Context! !^ :> <++> Data.Parameterized.Ctx::> Data.Parameterized.List!! :<Data.Parameterized.NatRepr*+-:~:<=Data.Parameterized.Peano:~: parcom-libText.Parcom.Core <|> paripari Text.PariPariText.PariPari.Internal.Class<|>"Text.PariPari.Internal.Combinators<|> parquet-hs Parquet.Utilsparsec Text.Parsec<|>Text.Parsec.Perm<$$><$?><|?><||>Text.Parsec.Prim<|>"Text.ParserCombinators.Parsec.Perm<$$><$?><|?><||>"Text.ParserCombinators.Parsec.Prim<|> parsec-classText.Parsec.Class<|> parsec-free Text.Parsec<|>Text.Parsec.Perm<$$><$?><|?><||>Text.Parsec.Prim<|> parsec-utilsText.Parsec.Utils$: +: -: .: <: =: parsec1"Text.ParserCombinators.Parsec.Prim*><$<$><*<*><|>parsec2"Text.ParserCombinators.Parsec.Perm<$$> <$?> <|?> <||> "Text.ParserCombinators.Parsec.Prim <|> parsec3 Text.Parsec <|> Text.Parsec.Perm<$$> <$?> <|?> <||> Text.Parsec.Prim <|> parsekText.ParserCombinators.Class<<|>&Text.ParserCombinators.Parsek.Position *><$<$><*<**><*><<|><|>parser-combinatorsControl.Applicative.Combinators<|>Control.Monad.Combinators<|> parser241Parser.ProductRule& ---> --> >>> |/ |> !Parser.ProductRule.Internal.Maker& ---> --> >>> |/ |> parsersText.Parser.CombinatorsText.Parser.Permutation<$$><$?><|?><||> parsestarData.STAR.Path->// ./ /<> parsimony Parsimony*> <$ <$> <* <*>  <|> parsleyParsley>*< Parsley.Alternative<+><|>Parsley.Applicative $>*><$<$><&><*<**><*><:><~<~>>>~>Parsley.InputExtras:> Parsley.Precedence+<>+Parsley.Selective>?>>??>||= parsley-coreParsley.Internal*> <* <*> <|> >*< )Parsley.Internal.Backend.Machine.InputRep:> Parsley.Internal.Common.Indexed/\ :*: :< \/ |> Parsley.Internal.Common.Utils>*< Parsley.Internal.Core.InputTypes:> Parsley.Internal.Core.Primitives*> <* <*> <|> partial-isomorphisms Control.Isomorphism.Partial.Prim*** <$>||| partial-lensData.Lens.Partial.Common^%= ^/= ^= Data.Lens.Partial.Lazy%%= %= //= ~= partial-orderData.PartialOrd/= < <= == > >= partial-records Data.Partial? partial-semigroupData.PartialSemigroup<>?Data.PartialSemigroup.Generics<>?passageLanguage.Passage// pastaPasta.!.& .= .| // :| pasta-curves PastaCurves*+-patatPatat.PrettyPrint<$$><+>patch Data.Patch~~ patch-combinators Data.Patch-:: >-> path Path.Posix-<.><.> Path.Windows-<.><.> path-extra Path.Extended<#><&> path-like Path.Like/> path-utils Path.Utils paths System.Path-<.><.>System.Path.Lens<.>~~pathtype System.Path<++><.>System.Path.Generic<++><.>pattern-matcherLanguage.Pattern.Compiler:= pattern-trieData.Trie.Pattern|> pcre-heavyText.Regex.PCRE.Heavy=~ ≈ pcre-lessText.Regex.Less<< =~ pcre-light-extraText.Regex.PCRE.Light.Extra=~ peano-infNumber.Peano.Inf-| pedersen-commitment PrimeField|*| |+| pencilPencil.Content<<| <| <|| pennyPenny.Lincoln.Equivalent==~ penny-libPenny.Lincoln.Equivalent==~ percent-formatText.PercentFormat% %% %%% %%%% %%%%% %%%%%% +% -% -%% -%%% -%%%% -%%%%% -%%%%%% /% Text.PercentFormat.Quotient%perdureDatabase.Perdure.Persistent&. >. |. perf Perf.Types$| |$| |+| permuteText.ParserCombinators.Perm<$$> <$?> <|?> <||> persistData.Persist.Internal:!:persistable-recordDatabase.Record.FromSql<&>Database.Record.Persistable<&> Database.Record.ToSql<&> persistentDatabase.Persist!=.*=.+=.-=./<-./=.<-.<.<=.=.==.>.>=.||.persistent-documentationDatabase.Persist.Documentation# --^ 'Database.Persist.Documentation.Internal# --^ persistent-event-source%Database.Esqueleto.Monad.Experimental(!=.% &&.*.*=.++.+.+=.-.-=././=.:&<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. crossJoincrossJoinLateral fullOuterJoinilike innerJoininnerJoinLateralleftJoinleftJoinLaterallikeon rightJoin||.Database.Esqueleto.Monad.Legacy!=.% &&.*.*=.++.+.+=.-.-=././=.<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. ilikelike||.persistent-eventsource%Database.Esqueleto.Monad.Experimental(!=.% &&.*.*=.++.+.+=.-.-=././=.:&<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. crossJoincrossJoinLateral fullOuterJoinilike innerJoininnerJoinLateralleftJoinleftJoinLaterallikeon rightJoin||.Database.Esqueleto.Monad.Legacy!=.% &&.*.*=.++.+.+=.-.-=././=.<# <&> <.<=.=.==.>.>=.?. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. ilikelike||.persistent-iprouteDatabase.Persist.IP<.<. <:<. <:<= >.>. >:>. >:>= persistent-migrationDatabase.Persist.Migration:= ~> Database.Persist.Migration.Core:= ~> persistent-mongoDBDatabase.Persist.MongoDB&->.&~>.->.=:=~.?&->.?&~>.addToSet anyBsonEqanyEqinList nestAnyEq nestBsonEqnestEqnestGenestInnestLenestNe nestNotInnestSetninListpullpullAllpush~>.persistent-mtlDatabase.Persist.Sql.Shim!=.*=.+=.-=./<-./=.<-.<.<=.=.==.>.>=.||.persistent-postgresql Database.Persist.Postgresql.JSON<@.?&.?.?|.@>.persistent-testInit==@>=>@/=@==@=?@?=persistent-vectorData.Vector.Persistent// pgDatabase.PostgreSQL.Simple:. Database.PostgreSQL.Simple.Types:. pg-store#Database.PostgreSQL.Store.RowParser<*>$>>$>>=$ pgp-wordlist&Data.Text.PgpWordlist.Internal.AltList:<>phaser Codec.Phaser$#$>#>>>#Codec.Phaser.Common$#$<#>Codec.Phaser.Core$#$>#>>>##phonetic-languages-phonetics-basicsPhladiprelio.General.Base~= physicsPhysics.Units.Arithmetic*</<>*<>+<>-<>/>/< picoparsecData.Picoparsec Data.Picoparsec.Combinator pierPier.Core.Artifact/> pier-corePier.Core.Artifact/>pinboard Pinboard.Util pinchPinch.: .:? .= ?= Pinch.Internal.Pinchable.: .:? .= ?= pinchotPinchot Pinchot.Rulespinned-warningsInternal.GhcFacade $$ $+$ *><$><*<*><+> <.> <> consBag mkCoreApp mkCoreAppssnocBagpipedPiped.| |. Piped.Compose.| |. pipelineControl.Pipeline=*= pipesPipes<-<<~>->>~~<~> Pipes.Core+>>//<//>//<+<<<+<\\<~<>+>>>~>\\>~>\<\\>\~<< pipes-async Pipes.Async>&> pipes-coreControl.Pipe.Combinators$$ Control.Pipe.Common<+< >+> Control.Pipe.Monoidal*** pipes-extras Pipes.Extras+++ pipes-files Pipes.Files=~ pipes-ioPipes.IOStream>->+ pipes-protolude Pipes.Monad<$!><=<=<<>=>>> >>= pipes-shell Pipes.Shell>?> pisigmaLanguage.PiSigma.Syntax-*- ->- :.. plailudePlailude!? .: .:. ~+~ planet-mitchell. Applicative*> <* <*> <|> Array// Array.Partial! Bits.&. .&.~.|. .|.~Bool&&|| ByteStringsnocByteString.Latin1conssnocByteString.Lazyconscons'snocCategory. <<<>>>Comonad<<=<@ <@> <@@>=<==>==>>@> Contravariant$<>$ >$$<>$<Equality/= == Eval$!$!!<$!!>dot usingFile-<.><.>FoldablenotElemFunction$$!&onFunctor $>-<<.> .>>  <$ <$><&><. <.> <<. <<.>> >>- Graph.Inductive& Json.Decode.!= .: .:! .:? Json.Encode.=List++\\ List.Buildercons snoc List.Partial!! List1:| List1.Partial!! Logic>>-Mitchell.Prelude($$!$>%~&&&* ** *> + ++- . .~/ /= < <$ <$><&><* <*> <<<<= <=<<> <|> =<<== > >= >=>>>= >>>^^.^?^^notElem||Monad <$!><=<<|<=<<=<|>=>>>= >|>|>= Num.Floating** Num.Fractional/ ^^Num.Num* + - ^ Num.Ratio% Optic.Fold^..^?Optic.Fold.Unsafe^?! Optic.Getting^. Optic.Prism:<:><|conssnoc|> Optic.Setter %~&&~**~*~+~-~.~//~^^~^~||~Ord< <= > >= ParallelismparpseqReadermagnifyRegex=~ Semigroup<> Semilattice/\ \/ Signal addSignal deleteSignal StatezoomTextconsplanet-mitchell-testTestshouldBe shouldReturn shouldSatisfyplanktonPlankton.Additive+ - -~ ~- Plankton.Basis.*. .+. .-. ./. Plankton.Field** ^^ Plankton.Magma⊕ Plankton.Metric≈Plankton.Module *. +. -. .* .+ .- ./ /. <.> >< Plankton.Multiplicative* / /~ ~/ platPlat=: plot-light/Graphics.Rendering.Plot.Light.Internal.Geometry ## #> -. .* <.> <\> ^+^ ^-^ ~= plotsPlots&=&~~ Plots.Util&=&~~pluginsSystem.Plugins.Utils<+> <.><>plumbersControl.Plumbers6$& $&& $&&& $&&* $&&< $&&> $&&^ $&* $&*& $&** $&*< $&*> $&*^ $&< $&<& $&<* $&<< $&<> $&<^ $&> $&>& $&>* $&>< $&>> $&>^ $&^ $&^& $&^* $&^< $&^> $&^^ $* $*& $*&& $*&* $*&< $*&> $*&^ $** $**& $*** $**< $**> $**^ $*< $*<& $*<* $*<< $*<> $*<^ $*> $*>& $*>* $*>< $*>> $*>^ $*^ $*^& $*^* $*^< $*^> $*^^ $< $<& $<&& $<&* $<&< $<&> $<&^ $<* $<*& $<** $<*< $<*> $<*^ $<< $<<& $<<* $<<< $<<> $<<^ $<> $<>& $<>* $<>< $<>> $<>^ $<^ $<^& $<^* $<^< $<^> $<^^ $> $>& $>&& $>&* $>&< $>&> $>&^ $>* $>*& $>** $>*< $>*> $>*^ $>< $><& $><* $><< $><> $><^ $>> $>>& $>>* $>>< $>>> $>>^ $>^ $>^& $>^* $>^< $>^> $>^^ $^ $^& $^&& $^&* $^&< $^&> $^&^ $^* $^*& $^** $^*< $^*> $^*^ $^< $^<& $^<* $^<< $^<> $^<^ $^> $^>& $^>* $^>< $^>> $^>^ $^^ $^^& $^^* $^^< $^^> $^^^ *& *&& *&&& *&&* *&&< *&&> *&&^ *&* *&*& *&** *&*< *&*> *&*^ *&< *&<& *&<* *&<< *&<> *&<^ *&> *&>& *&>* *&>< *&>> *&>^ *&^ *&^& *&^* *&^< *&^> *&^^ ** **& **&& **&* **&< **&> **&^ *** ***& **** ***< ***> ***^ **< **<& **<* **<< **<> **<^ **> **>& **>* **>< **>> **>^ **^ **^& **^* **^< **^> **^^ *< *<& *<&& *<&* *<&< *<&> *<&^ *<* *<*& *<** *<*< *<*> *<*^ *<< *<<& *<<* *<<< *<<> *<<^ *<> *<>& *<>* *<>< *<>> *<>^ *<^ *<^& *<^* *<^< *<^> *<^^ *> *>& *>&& *>&* *>&< *>&> *>&^ *>* *>*& *>** *>*< *>*> *>*^ *>< *><& *><* *><< *><> *><^ *>> *>>& *>>* *>>< *>>> *>>^ *>^ *>^& *>^* *>^< *>^> *>^^ *^ *^& *^&& *^&* *^&< *^&> *^&^ *^* *^*& *^** *^*< *^*> *^*^ *^< *^<& *^<* *^<< *^<> *^<^ *^> *^>& *^>* *^>< *^>> *^>^ *^^ *^^& *^^* *^^< *^^> *^^^ Control.Plumbers.Monadm<< <<& <<&& <<&&& <<&&* <<&&< <<&&> <<&&^ <<&* <<&*& <<&** <<&*< <<&*> <<&*^ <<&< <<&<& <<&<* <<&<< <<&<> <<&<^ <<&> <<&>& <<&>* <<&>< <<&>> <<&>^ <<&^ <<&^& <<&^* <<&^< <<&^> <<&^^ <<* <<*& <<*&& <<*&* <<*&< <<*&> <<*&^ <<** <<**& <<*** <<**< <<**> <<**^ <<*< <<*<& <<*<* <<*<< <<*<> <<*<^ <<*> <<*>& <<*>* <<*>< <<*>> <<*>^ <<*^ <<*^& <<*^* <<*^< <<*^> <<*^^ <<< <<<& <<<&& <<<&* <<<&< <<<&> <<<&^ <<<* <<<*& <<<** <<<*< <<<*> <<<*^ <<<< <<<<& <<<<* <<<<< <<<<> <<<<^ <<<> <<<>& <<<>* <<<>< <<<>> <<<>^ <<<^ <<<^& <<<^* <<<^< <<<^> <<<^^ <<> <<>& <<>&& <<>&* <<>&< <<>&> <<>&^ <<>* <<>*& <<>** <<>*< <<>*> <<>*^ <<>< <<><& <<><* <<><< <<><> <<><^ <<>> <<>>& <<>>* <<>>< <<>>> <<>>^ <<>^ <<>^& <<>^* <<>^< <<>^> <<>^^ <<^ <<^& <<^&& <<^&* <<^&< <<^&> <<^&^ <<^* <<^*& <<^** <<^*< <<^*> <<^*^ <<^< <<^<& <<^<* <<^<< <<^<> <<^<^ <<^> <<^>& <<^>* <<^>< <<^>> <<^>^ <<^^ <<^^& <<^^* <<^^< <<^^> <<^^^ <=& <=&& <=&&& <=&&* <=&&< <=&&> <=&&^ <=&* <=&*& <=&** <=&*< <=&*> <=&*^ <=&< <=&<& <=&<* <=&<< <=&<> <=&<^ <=&> <=&>& <=&>* <=&>< <=&>> <=&>^ <=&^ <=&^& <=&^* <=&^< <=&^> <=&^^ <=* <=*& <=*&& <=*&* <=*&< <=*&> <=*&^ <=** <=**& <=*** <=**< <=**> <=**^ <=*< <=*<& <=*<* <=*<< <=*<> <=*<^ <=*> <=*>& <=*>* <=*>< <=*>> <=*>^ <=*^ <=*^& <=*^* <=*^< <=*^> <=*^^ <=< <=<& <=<&& <=<&* <=<&< <=<&> <=<&^ <=<* <=<*& <=<** <=<*< <=<*> <=<*^ <=<< <=<<& <=<<* <=<<< <=<<> <=<<^ <=<> <=<>& <=<>* <=<>< <=<>> <=<>^ <=<^ <=<^& <=<^* <=<^< <=<^> <=<^^ <=> <=>& <=>&& <=>&* <=>&< <=>&> <=>&^ <=>* <=>*& <=>** <=>*< <=>*> <=>*^ <=>< <=><& <=><* <=><< <=><> <=><^ <=>> <=>>& <=>>* <=>>< <=>>> <=>>^ <=>^ <=>^& <=>^* <=>^< <=>^> <=>^^ <=^ <=^& <=^&& <=^&* <=^&< <=^&> <=^&^ <=^* <=^*& <=^** <=^*< <=^*> <=^*^ <=^< <=^<& <=^<* <=^<< <=^<> <=^<^ <=^> <=^>& <=^>* <=^>< <=^>> <=^>^ <=^^ <=^^& <=^^* <=^^< <=^^> <=^^^ >=& >=&& >=&&& >=&&* >=&&< >=&&> >=&&^ >=&* >=&*& >=&** >=&*< >=&*> >=&*^ >=&< >=&<& >=&<* >=&<< >=&<> >=&<^ >=&> >=&>& >=&>* >=&>< >=&>> >=&>^ >=&^ >=&^& >=&^* >=&^< >=&^> >=&^^ >=* >=*& >=*&& >=*&* >=*&< >=*&> >=*&^ >=** >=**& >=*** >=**< >=**> >=**^ >=*< >=*<& >=*<* >=*<< >=*<> >=*<^ >=*> >=*>& >=*>* >=*>< >=*>> >=*>^ >=*^ >=*^& >=*^* >=*^< >=*^> >=*^^ >=< >=<& >=<&& >=<&* >=<&< >=<&> >=<&^ >=<* >=<*& >=<** >=<*< >=<*> >=<*^ >=<< >=<<& >=<<* >=<<< >=<<> >=<<^ >=<> >=<>& >=<>* >=<>< >=<>> >=<>^ >=<^ >=<^& >=<^* >=<^< >=<^> >=<^^ >=> >=>& >=>&& >=>&* >=>&< >=>&> >=>&^ >=>* >=>*& >=>** >=>*< >=>*> >=>*^ >=>< >=><& >=><* >=><< >=><> >=><^ >=>> >=>>& >=>>* >=>>< >=>>> >=>>^ >=>^ >=>^& >=>^* >=>^< >=>^> >=>^^ >=^ >=^& >=^&& >=^&* >=^&< >=^&> >=^&^ >=^* >=^*& >=^** >=^*< >=^*> >=^*^ >=^< >=^<& >=^<* >=^<< >=^<> >=^<^ >=^> >=^>& >=^>* >=^>< >=^>> >=^>^ >=^^ >=^^& >=^^* >=^^< >=^^> >=^^^ >>& >>&& >>&&& >>&&* >>&&< >>&&> >>&&^ >>&* >>&*& >>&** >>&*< >>&*> >>&*^ >>&< >>&<& >>&<* >>&<< >>&<> >>&<^ >>&> >>&>& >>&>* >>&>< >>&>> >>&>^ >>&^ >>&^& >>&^* >>&^< >>&^> >>&^^ >>* >>*& >>*&& >>*&* >>*&< >>*&> >>*&^ >>** >>**& >>*** >>**< >>**> >>**^ >>*< >>*<& >>*<* >>*<< >>*<> >>*<^ >>*> >>*>& >>*>* >>*>< >>*>> >>*>^ >>*^ >>*^& >>*^* >>*^< >>*^> >>*^^ >>< >><& >><&& >><&* >><&< >><&> >><&^ >><* >><*& >><** >><*< >><*> >><*^ >><< >><<& >><<* >><<< >><<> >><<^ >><> >><>& >><>* >><>< >><>> >><>^ >><^ >><^& >><^* >><^< >><^> >><^^ >>> >>>& >>>&& >>>&* >>>&< >>>&> >>>&^ >>>* >>>*& >>>** >>>*< >>>*> >>>*^ >>>< >>><& >>><* >>><< >>><> >>><^ >>>> >>>>& >>>>* >>>>< >>>>> >>>>^ >>>^ >>>^& >>>^* >>>^< >>>^> >>>^^ >>^ >>^& >>^&& >>^&* >>^&< >>^&> >>^&^ >>^* >>^*& >>^** >>^*< >>^*> >>^*^ >>^< >>^<& >>^<* >>^<< >>^<> >>^<^ >>^> >>^>& >>^>* >>^>< >>^>> >>^>^ >>^^ >>^^& >>^^* >>^^< >>^^> >>^^^ pnmCodec.PNM.Parse++ podenvPodenv.Prelude%~.~?~ ^.pointedalternativeControl.Alternative.Pointed <|!> pointless-funData.Function.Pointless!~>$::.! .:.^ ~>pointless-haskellGenerics.Pointless.Bifctrable:*!| :+!| :@!| Generics.Pointless.Combinators! -|- /\ <> >< ? ?? \/ Generics.Pointless.Fctrable:*!: :+!: :@!: #Generics.Pointless.MonadCombinators-||- /|\ <<= >|< pointless-lenses%Generics.Pointless.Lenses.Combinators!/\< !< !\/< #\/< -|-< .< .\/< /\!< ><< ?< \/!< \/$< \/.< \/< polarData.Complex.Polar:< polar-configfilePolar.ConfigFile|$||%||=|polyData.Poly.Laurent^- Data.Poly.Multi.Laurent^- Data.Poly.Sparse.Laurent^- poly-controlControl.Applicative.Poly<<*>> Control.Monad.Poly>>>= Control.Monad.Shuffle$>>= poly-rec Data.GenRec# .*..=.Data.GenRec.RecInstances.Record##.**..==.polynomials-bernsteinAlgebra.Polynomials.Bernstein? polyparse #Text.ParserCombinators.HuttonMeijer+++*Text.ParserCombinators.HuttonMeijerWallace+++ Text.ParserCombinators.Poly.BaseapplydiscardText.ParserCombinators.Poly.LexonFail"Text.ParserCombinators.Poly.ParseronFail!Text.ParserCombinators.Poly.PlainonFail!Text.ParserCombinators.Poly.StateonFail%Text.ParserCombinators.Poly.StateLazyapplydiscard'Text.ParserCombinators.Poly.StateParseronFailpolysemyPolysemy.Internal.TH.Common:->polysemy-opticsOptics.Polysemy,!~#% %!~%% %%=%& %=%> %? %~&.=.~:<:><% <%=<%> <&><.=<<%=<<.=< polysemy-path Polysemy.Path polysemy-req Polysemy.Req/:/~=:polysemy-resumePolysemy.Resume!! !> !>>  !>> >@>@>@-@>@~~@~@>Polysemy.Several:::polysoupText.XML.PolySoup.Combine//>/><^<^>>/>>^>^>pontarius-xmppNetwork.Xmpp.Internal+++ <~ popkeyPopKey! porpoise Web.Porpoise. portray-diff-hunitData.Portray.Diff.HUnit@-? @?- portray-diff-quickcheckData.Portray.Diff.QuickCheck=-=portsControl.Concurrent.Ports<-$ <-- <-> <== Control.Concurrent.Processes>| Control.Concurrent.SVars<< Control.Concurrent.ThreadUtils& &> <&> posData.Pos*!+!posableGenerics.POSable.Representation++ posix-pathsSystem.Posix.FilePath<.>  postgresql-queryDatabase.PostgreSQL.Query:.postgresql-simpleDatabase.PostgreSQL.Simple:. Database.PostgreSQL.Simple.Types:.postgresql-simple-namedPgNamed=? postgresql-txDatabase.PostgreSQL.Tx.HEnvConspostgresql-tx-query.Database.PostgreSQL.Tx.Query.Internal.Reexport:.postgresql-tx-squeal/Database.PostgreSQL.Tx.Squeal.Internal.Reexport5! !+!-!-!#-.&&< &> *.*:+!-|- .! .#>.#>>.& .&&.*.-..->.->>./=.<.<=.<@ .==.>.>=.? .?& .?| .| .||:*::::=>:>><-> <..<<..<=<<@ <=..<<=..<=<@ >>>@&& @* @+ @- @> @>. @>> @@ postgresql-typedDatabase.PostgreSQL.Typed.Range<@ @> @>. postieNetwork.Mail.Postie>->powerpcLanguage.PowerPC.RTL &&. /=. <. <=. <== ==. >. >=. ||. pqueueData.PQueue.Max!! Data.PQueue.Min!! pqueue-mtlData.Queue.Class:-> pragludePraglude##%%=#%%~#%=#%~#=#~$%%=%%@=%%@~%%~%=%@=%@~%~&&&& &&=&&~&~*** **=**~*=*~+++ +=+~-=-~. ... .=.> .@=.@~.~//=//~< <#%=<#%~<#=<#~<$ <$!><%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+> <+~<-=<-~<. <.=<.> <.~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<<^<<^=<<^^=<<^^~<<^~<<||=<<||~<<~<= <=<<> <>=<>~ <||=<||~<~=<<> >$ >= >=>>> >>= >>>>>^?=???~^#^.^..^<<^=^>>^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingnotElemonsnoc|>||=||| ||~~> preamblePreamble!! ##%%=#%%~#%=#%~#=#~$$!%%=%%@=%%@~%%~%=%@=%@~%~&&&&&&&&=&&~&~* ** *****=**~*=*> *~+ +++=+~- -.- -/- -:- -=-|- -~. ... .=.> .@=.@~.~/ //=//~/= :<:>< <#%=<#%~<#=<#~<$ <$!><$><%=<%@=<%@~<%~<&&=<&&~<&><* <**=<**~<*=<*> <*~<+=<+~<-=<-~<. <.=<.><.~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<<>=<>~<||=<||~<~=. =<<== > >$ >= >=>>> >>= ?=???~\\^^#^.^..^=^?^?!^@.^@..^@?^@?!^^^^=^^~^~consfailingnotElemonsnoc|>||||=||~precisPrecis.Utils.PPShowS<+> <> precursorPrecursor.Algebra.Eq/= == Precursor.Algebra.Ord< <= > >= Precursor.Algebra.Ring- Precursor.Algebra.Semigroup<> Precursor.Algebra.Semiring* + Precursor.Coerce#. Precursor.Control.Alternative<|> Precursor.Control.Applicative*> <* <**><*> Precursor.Control.Category &&& *** +++ . <+> <<<<<^>>>>>^^<<^>>||| Precursor.Control.Functor$><$ <$><&><-<>->Precursor.Control.Monad<$!><=<=<<>=>>> >>= Precursor.Data.Bool&&||Precursor.Function$&.:onPrecursor.Numeric.Integral% // Precursor.Structure.Foldable!! notElem pred-trieData.Trie.Pred.Interface./ Data.Trie.Pred.Interface.Types./ predicate-classData.Predicate.Class&& || predicate-transformersPredicateTransformers! ==> predicate-typed Predicate.Core $&&&&&~<..><<>>>>>||||~~>Predicate.Data.Bits.&..^..|.Predicate.Data.Either+++|||Predicate.Data.Enum...Predicate.Data.Lifted$$$&*><$<$><&><*<*><:><|>>>=>|>|>|>Predicate.Data.List+++::+Predicate.Data.Monoid<>Predicate.Data.Numeric%***+--%/^Predicate.Data.Ordering/=/=~<<=<=~<~====!===~==~>>=>=~>~Predicate.Data.Tuple&&&&****|+Predicate.Misc%% %& <%>~>Predicate.Util:#prednote Prednote.Core&&& ||| pregame Pregame.Base$!prelatePrelate.Prelude%~&+~-~.~<%~<&><<%~<<.~<>~?~^.^..^?^?!failingprelude-compat Data.List2010!! ++\\ Prelude2010!! $$!&&***+++-. //=<<==<<==>>=>>>>=^^^divmodquotrem|| prelude-edsl Prelude.EDSL$ * ** *> + - . / <$ <$> <* <*> >> >>= prelude-extrasPrelude.Extras /=#/=##<#<##<=#<=##==# ==## >#>##>=#>=##prelude-generalizePrelude.Generalize!! !!! $ ++ .: .:: .::: <>>= >>== >>=\/ >>=|\/ >>=|| >>=||| ? \\ prelude-safeenumPrelude.SafeEnumprecedessucceeds preludeplus PreludePlus#!! $$!&&* ** *> + ++- . / /= :| < <$ <$!><$><* <*> <= <=<<> =<<== > >= >=>>> >>= \\^^^notElem||PreludePlus.Unicode=≪÷٪— ↤↤∘↦∈∉∖∘ ∧∨∩∪≠≡≤≥≫≫=⌥ ⧺⩀preql Preql.Imports$>*>:~::~~:<$<$!><$><&><*<**><*><=<<|>=<<>=>>>>>=elemnotElem presburgerData.Integer.SAT :&& :* :+ :- :/= :< :<= :== :> :>= :|| prettify Text.Pretty<+> <->   prettyText.PrettyPrint$$$+$<+><>Text.PrettyPrint.Annotated$$$+$<+><>#Text.PrettyPrint.Annotated.HughesPJ$$$+$<+><>Text.PrettyPrint.HughesPJ$$$+$<+><>pretty-compactText.PrettyPrint.Compact$$ <$$> <+>   Text.PrettyPrint.Compact.Core$$ pretty-simple#Text.Pretty.Simple.Internal.Printer:.. pretty-typesData.Type.Pretty<$$--><$$><++><+><:$$--><:$$><:><||>prettyFunctionComposing Control.PFC° prettyprinter Prettyprinter<+><>Prettyprinter.Internal<+>prettyprinter-combinatorsPrettyprinter.Combinators##-->:->(prettyprinter-compat-annotated-wl-pprint!Text.PrettyPrint.Annotated.Leijen<$$> <$> <+>  <>#prettyprinter-compat-ansi-wl-pprintText.PrettyPrint.ANSI.Leijen<$$> <$> <+>   <>prettyprinter-compat-wl-pprintText.PrettyPrint.Leijen<$$> <$> <+>   <> prim-uniqData.Unique.Tag:~:primalControl.Prim.Evalseq Data.Prim#. .# Foreign.Prim*#*##**## +#+##-#-##/##/=#/=##<#<##<=#<=##==#==##>#>##>=#>=##seqprimitive-addrData.Primitive.Addr minusAddrplusAddrremAddrprimitive-containersData.Set.Lifted\\ Data.Set.Unboxed\\ primus Primus.Error.@ Primus.Num1.*.+.-Primus.TypeLevel++ pringletonsData.Singletons.Map! \\ printcessPrintcess.PrettyPrinting+>.=\> afterEach beforeEach betweenEach~> printf-safeText.Printf.Safe%<%> prizmData.Prizm.Color<~> Data.Prizm.Types<$$$> <***> prob-fxEnv:= <:> probability Numeric.Probability.Distribution//%>>=??=<<??Numeric.Probability.Percentage////* Numeric.Probability.Simulation~*.~.~.. processing"Graphics.Web.Processing.Core.Types #&& #/= #< #<= #== #> #>= #|| +.+ procex Procex.Quick|>product-isomorphic$Data.Functor.ProductIsomorphic.Class|$| |*| ||| product-profunctorsData.Profunctor.Product***! ***$ **** +++! profunctor-arrowsData.Profunctor.Arrow$$$&&&***+++|||profunctor-miscData.Profunctor.Arrow$$$&&&***+++|||Data.Profunctor.Misc+@@@profunctor-monadProfunctor.Monad=.Profunctor.Monad.Cofunctor=.=:Profunctor.Monad.Core:- Profunctor.Monad.Monad*><$><*<*>>>>>=Profunctor.Monad.Profunctor=.profunctor-opticsData.Profunctor.Optic.Carrier.#. Data.Profunctor.Optic.Combinator&&&&&****++++<<*>>||||Data.Profunctor.Optic.Fold^..^?failingData.Profunctor.Optic.Setter..=..~.=.~<>=<>~Data.Profunctor.Optic.Traversal&&&&****++++<<*>>||||Data.Profunctor.Optic.View^.Data.Profunctor.Optic.Zoomzoom profunctorsData.Profunctor:->Data.Profunctor.Types:->Data.Profunctor.Unsafe#. .#progress-reportingControl.Monad.Progress>>> project-m36ProjectM36.Shortcuts !! #:#::#:=&&&>< ?= @@ @~|||prolensProlens%~.~^.prologLanguage.Prolog+++ prologueProloguec!! $$!$>$|%~&&&&&.****>+-. .:.:..::.::..~//=:$$::<>::|:~:<<$<$><$>=<$|><$|>=<&><*<**><*><<<<$>><<$>>=<<*>><<<$>>><<<$>>>=<<<*>>> <<<<$>>>> <<<<$>>>>= <<<<*>>>> <<<<<$>>>>> <<<<<$>>>>>= <<<<<*>>>>><<=<=<=<<=<<<=<<<<=<<<<<><@<@><@@><|$><|$>=<|>=<<=<<&=<====>==>>>>=>=>>>>>$>>=>>=>>>>=>>>>>=>>>~ @>Compose ^^.^?^^divelemmodnotElemonquotrem|$||||.∘ ∘∘ ∘∘∘ ∘∘∘∘∘∘∘∘∘Prologue.Control.Monad<<<=<<=<<<=<<<<=<<<<=<<=<<&>=>>>>>$>>=>>=>>>>=>>>>>=>>>~ Prologue.Data.Basic &&&&./=<<===>>=||||.Prologue.Data.FoldableelemPrologue.Data.Num ***+-/^^^divmodquotremPrologue.Data.Traversable<$>=<$|>=<<$>>=<<<$>>>= <<<<$>>>>= <<<<<$>>>>>=<|$>=prolude Prolude.Aeson.!= .: .:? .= Prolude.Core"$&&&****>+++-. //=<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodquotremseq||Prolude.Esqueleto !=.&&.:&<.<=.=.==.>.>=.?. ^. ||. Prolude.Lens.~Prolude.MongoDB!<-: !=: <-: <: <=: =:>: >=: Prolude.Servant:<|>:>promises Data.Promise!= proof-combinatorsLiquidHaskell.ProofCombinators***==.==?? prop-unitPropUnit/===== propellor Propellor!&<>Propellor.PropAccum!&&^Propellor.Property==>Propellor.Property.Ccache:+ Propellor.Property.Debootstrap:+ Propellor.Property.Firewall:-Propellor.Property.Versioned--><|>Propellor.Types Propellor.Types.Container-<- ->- Propellor.Types.MetaTypes&&Propellor.Utilities<&&><||>propertyTest.Property.Util<==>==>prosidyProsidy.Types.Series:<::<<::>::>>:prosidycProsidy.Compile.Core<|>Prosidy.Compile.DSL&>&>> proto-lensData.ProtoLens.Encoding.Bytes Data.ProtoLens.Encoding.Parser Data.ProtoLens.Prism#proto-lens-jsonpbData.ProtoLens.JSONPB.: .= Data.ProtoLens.JSONPB.Class.: .= proto3-suiteProto3.Suite.JSONPB.: .= Proto3.Suite.JSONPB.Class.: .= protocolControl.Protocol->:protocol-buffersText.ProtocolBuffers.Header<=< protolude Protolude?$$!$!!$>%&&&&&^****>+++-. .&..|.//=:*::+:+::.::|:~:<<$<$><&&><&><*<**><*><<$>><<*>><=<|><||>==>>=^^%^ ^^^^%^^ divelem hashWithSaltmodnotElemonquotremrotaterotateLrotateRseqshiftshiftLshiftRxor||||^Protolude.Applicative<<*>>Protolude.Base$!%***+++-/^^%^ ^^^^%^^ divmodquotremseqProtolude.Bool&&^<&&><||>||^Protolude.Functor$><$<$><&><<$>>Protolude.Monad<$!><=<=<<>=>>>>>=Protolude.Partial!! Protolude.Semiring<.> proton Data.Profunctor.Arrow &&& *** +++ <+> <<^ >>^ ^<< ^>> ||| Examples.Flowers>--Proton #%%~%~&.~<+> >-?.^.^.. ^? Proton.Algebraic>-?. Proton.Fold<+> ^.. ^? Proton.Getter^. Proton.Review# Proton.Setter%~.~Proton.Traversal%%~ provenienceControl.Provenience<%%><%><%?><:><^>Language.Parser.Ptera.Syntax:*<::><:><^>(Language.Parser.Ptera.Syntax.SafeGrammar<:><^> ptera-coreLanguage.Parser.Ptera.Prelude&!! $!&&&****>+++-. //=:|<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq||ptera-thLanguage.Parser.Ptera.TH:*<::><:><^>Language.Parser.Ptera.TH.Syntax:*<::><:><^>ptrdiffForeign.Ptr.Diff.* pugs-hsregex RRegex.Syntax!~~ =~ =~~ purebred-emailData.IMF.Syntax<<>> purenixPureNix.Prelude)!! $$!&&****>+++-. //=<<$<$!><$><*<**><*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq|| purescriptLanguage.PureScript-:>Language.PureScript.Environment-:>purescript-astLanguage.PureScript.Environment-:>purescript-bridge"Language.PureScript.Bridge.Builder<|>^== putlensesGenerics.Putlenses.Language-|-< .< .\/< ><< ><<< \/.< \/< puzzle-draw Draw.Grid.--. pvectorData.Vector.Persistent! !? // :|>>< |> Data.Vector.Persistent.Internal! !<<.!>>.!? // :|>>< |> .Data.Vector.Persistent.Internal.CoercibleUtils#. .# q4c12-twofingerQ4C12.TwoFinger.Internal<*.><.*>qc-oi-testgeneratorTest.OITestGenerator=!= ===> Test.OITestGenerator.Axiom=!= ===> qchasOperations.QuantumOperations* <*> |> |><| QC! !#>#>:+ <#<.><><\>===>< ? ?? |||¿ qlinearQLinear.Operations*~+~~*~~+~+~~-~quaalude Essentials$$>&*>. /=<<$<$><&><*<**><*><<<<=<=<<>=<<==>>=>=>>>=>>>quackData.Uri.Quack.= quantfinQuant.VectorOps *. +. -. .* .*. .+ .+. .- .-. ./ ./. /. queryparserDatabase.Sql.Position?<> queuelikeData.Queue.Class:-> quibble-coreDatabase.Quibble&.&&./= .== .||quick-generatorTesting.QuickGenerator.++ .| ?* ??* quickcheck-assertionsTest.QuickCheck.Assertions/=? <=? =? >? ?/= ?< ?<= ?== ?> ?>= ?~== ~==? quickcheck-dynamic%Test.QuickCheck.DynamicLogic.Internal||| Test.QuickCheck.StateModel:=:==quickcheck-higherorderTest.QuickCheck.HigherOrder:->:=::==>=?+Test.QuickCheck.HigherOrder.Internal.TestEq=?-Test.QuickCheck.HigherOrder.Internal.Testable:=::==>quickcheck-propertiesTest.QuickCheck.Property.Common.&&. .==. .||. quickcheck-state-machineTest.StateMachine.Logic.&&.//./=.<.<=.==.=>.>.>=.||:&& :/= :< :<= :== :=> :> :>= :|| member notMemberTest.StateMachine.Markov-</->-Test.StateMachine.Types.Rank2<$> Test.StateMachine.Z! !? .! .%.=:->:/->:<-><**><+<-|<|<||> intersect isSubsetOfunion|->|>~=$quickcheck-state-machine-distributed StateMachine! ? quickcheck-with-counterexamplesTest.QuickCheck.Counterexamples:&:=/======>>< quickpullQuickpull.EqShow=== Quickpull.Formatting<+> quickspec QuickSpec:- =~=QuickSpec.Internal.Term:$: QuickSpec.Internal.Typeapply quipperQuipper.&&../=..==. controlledQuipper.Generic.&&../=..==. Quipper.Monad controlled quipper-coreQuipper.&&../=..==. controlledQuipper.Generic.&&../=..==. Quipper.Monad controlledquiverControl.Quiver+>->> +>>-> >&> >->> >->>+ >>-> >>->+ Control.Quiver.SP>:> >>! >>? raftData.Tuple.Util$$ Math.Monad *? +? -? /? ?* ?*? ?+ ?+? ?- ?-? ?/ ?/? ral Data.RAList! !? Data.RAList.NonEmpty! !? Data.RAVec! Data.RAVec.NonEmpty! Data.RAVec.Tree! Data.RAVec.Tree.DF! ralist Data.RAList!! ++:|ConsconselemnotElemData.RAList.Co!! ++:.:|ConsRConsconselemrallodRallod==> ramus Ramus.Signal<~~>~~range Data.Range*=* *=+ +=* +=+ Data.Ranges*=* *=+ +=* +=+ range-set-listData.RangeSet.IntMap\\ Data.RangeSet.List\\ Data.RangeSet.Map\\ ranged-listData.List.Length+++++.++.+++..:+:.Data.List.Range +++++.++.+++...:++.:..:+:++:.:.. rank2classesRank2$<$><*>~> ratio-int Data.RatioInt% raven-haskellSystem.Log.Raven.Interfaces.=: raw-feldsparFeldspar:+<$<$!><=<=<<>=>>>>>=Feldspar.Data.Array:>Feldspar.Data.Vector++ ...Feldspar.Frontend! &&.&..<<..>>..|./=<<===>>=?shiftLshiftRxor||⊕ rawfilepathData.ByteString.RawFilePathconssnoc RawFilePath setStderrsetStdin setStdoutRawFilePath.Process setStderrsetStdin setStdoutrazData.Raz.Core.Sequence!? Data.Raz.Sequence.Internal:< <| >< ?! |> rdioh Rdioh.Util<+> react-fluxReact.Flux.Internal&= React.Flux.PropertiesAndEvents$= &= @= react-haskellReact.Rebindable>> reactive-baconReactive.Bacon.Core==> >>=! Reactive.Bacon.EventStream===> reactive-bananaReactive.Banana.Combinators<@<@>@>reactive-banana-automationReactive.Banana.Automation=: reactive-banana-bunch!Reactive.Banana.Bunch.Combinators<@>reactive-banana-wxReactive.Banana.WX:== reader-soupControl.Monad.ReaderSoup:&=:reasonable-lensControl.Lens.Getter^. Control.Lens.Setter %= %~ & *= *~ += +~ -= -~ .= .~ //= /~ rebaseRebase.Preludep!! #. $$!$!!$<$>%&&&&&&*******>++++++--<--<<->-. .#.&..>.>>.|.//=:+:->:|:~::~~:<<$<$!!><$!><$><&&> <&><*<**><*.><*><*?<+><.<.*><..><.><<$>><<.<<..>><<.>><<<<<=<<^<=<=<<><@<@><@@><|><||> =<<=<====>==>>>>$>$$<>$<>=>=>>>>>->>=>>>>>^@>Compose \\^^<<^>>^^divelem hashWithSaltmodnotElemonparpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor|||||~~rec-defData.Recursive.Bool&& || Data.Recursive.DualBool&& || rec-smallarrayData.Rec.SmallArray++/++/ /~/ :++::~:<#>~>records Data.Record:& := Data.Record.Combinators!!! /// <<*>> \\\ recursion-schemes-ix Data.IComonad~~>Data.IFunction~~> Data.IFunctor~~>Data.IFunctor.Foldable::<~~>Data.IFunctor.ICofree::< Data.IMonad~~>red-black-recordData.RBR:*:.:And redis-respData.Redis.Command:| redis-schemaDatabase.Redis.Schema:*::.:/ referencesControl.Reference.Combinators&&+&&|&Control.Reference.Operators !-!=!|!~.-.=.~^.^?refinedRefined&&||refineryRefinery.Tactic<%><@> reflex Reflex.Class<@<@>Reflex.DynamicHConsreflex-dom-coreReflex.Dom.Class=:Reflex.Dom.Widget.Input&.~ reflex-gi-gtk Reflex.GI.Gtk:==:==>:~~:~~>Reflex.GI.Gtk.Output:==:==>:~~:~~>reflex-transformers Reflex.Monad:>> >-> reformControl.Applicative.Indexed*>><<$>><<*<<**>> <<*>>Text.Reform.Core++><++reg-alloc-graph-colorRegAlloc.Nodes∈ RegAlloc.UGraph! ∈ RegAlloc.UGraph.Private! regexText.RE.Replace!$ !$$ !$$? !$? Text.RE.TDFA*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.TDFA.ByteString*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.TDFA.ByteString.Lazy*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.TDFA.Sequence*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.TDFA.String*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.TDFA.Text*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.TDFA.Text.Lazy*=~ *=~/ =~ =~~ ?=~ ?=~/ regex-applicativeText.Regex.Applicative=~regex-applicative-textText.Regex.Applicative.Text=~ regex-doText.Regex.Do.Match.Latin~* ~? Text.Regex.Do.Match.Utf8~* ~? Text.Regex.Do.Replace.Template< > Text.Regex.Do.Split-/ / /- regex-pcreText.Regex.PCRE=~ =~~ Text.Regex.PCRE.Wrap=~ =~~ regex-pcre-builtinText.Regex.PCRE=~ =~~ Text.Regex.PCRE.Wrap=~ =~~ regex-posixText.Regex.Posix=~ =~~ Text.Regex.Posix.Wrap=~ =~~ regex-tdfaData.IntMap.CharMap2! \\ Data.IntMap.EnumMap2! \\ Data.IntSet.EnumSet2\\ Text.Regex.TDFA=~ =~~ regex-tdfa-rcData.IntMap.CharMap2! \\ Data.IntMap.EnumMap2! \\ Data.IntSet.EnumSet2\\ Text.Regex.TDFA=~ =~~ regex-with-pcre Text.RE.PCRE*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.PCRE.ByteString*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.PCRE.ByteString.Lazy*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.PCRE.Sequence*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.PCRE.String*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.PCRE.Text*=~ *=~/ =~ =~~ ?=~ ?=~/ Text.RE.PCRE.Text.Lazy*=~ *=~/ =~ =~~ ?=~ ?=~/ regexcharRegExChar.ExtendedRegExChar+~/~=~RegExChar.RegExOptsChar=~regexdot RegExDot.BracketExpressionMember=~RegExDot.ConsumptionProfile<>|+| RegExDot.DSL #->#:#->#?:#->:#->?:#:*:*?:+:+?:-:<~>?:??:RegExDot.RegEx+~.* .*? /~=~RegExDot.Repeatable^#^#->^#->#^#->#?^#->?registryData.Registry.Registry+:<+<+><:registry-hedgehogTest.Tasty.Hedgehogx/== === registry-options$Data.Registry.Options.DisplayHelpBox<:> regression-simpleMath.Regression.Simple.LinAlgaddmultregularGenerics.Regular.Base:*: Generics.Regular.Functions.Fold& rel8Rel8$*$+$?&&./=./=:/=?<.<:<=.<=:<=?<>.:==.==:==?>.>:>=.>=:>=?>?over||.Rel8.Expr.Text!~!~*++.~*~. Rel8.Tabulatethroughrelacion Data.Relacion<$| <| |$> |> relation Data.Relation<-< >-> Data.Relation.Ops<$| <| |$> |> relational-query Database.Relational<-#overDatabase.Relational.Arrow:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'#Database.Relational.Monad.Aggregateover)Database.Relational.Monad.Trans.Assigning<-#Database.Relational.Pi<.>Database.Relational.Pi.Unsafe<.>Database.Relational.Projectable!!??.*..+..-../..<..<=..<>..=..>..>=..||.><??!?!??*??+??-??/????||?and'in'likelike' likeMaybe likeMaybe'or'Database.Relational.Sequence$$ $$! Database.Relational.Setexceptexcept' exceptAll exceptAll'fullfull'innerinner' intersect intersect' intersectAll intersectAll'leftleft'on'rightright'unionunion'unionAll unionAll'relational-record!Database.Relational.Documentation&!.*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><?!?!??+?and'exceptfullin'inner intersectleftleft'likelike'on'or'overrightunionunion'|$| |*| relational-record-examples!Database.Relational.Query.SQLite3:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'relational-schemasDatabase.Custom.IBMDB2:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'Database.Custom.MySQL:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'Database.Custom.Oracle:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'Database.Custom.PostgreSQL:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'Database.Custom.SQLServer:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'Database.Custom.SQLite3:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'reludeRelude.Applicative*><*<**><*><|> Relude.Base$!/=<<===>>=seqRelude.Bool.Guard&&^ ||^ Relude.Bool.Reexport&&||Relude.Container.Reexport hashWithSaltRelude.DeepSeq$!!Relude.Extra.Lens%~.~^.Relude.Extra.Map!? Relude.Extra.Newtype#. Relude.Extra.Type++Relude.Function$&&&&. <<<>>>onRelude.Functor.Fmap<&><<$>>??Relude.Functor.Reexport$<$><$<$>>$>$$<>$<Compose Relude.List!!? Relude.List.NonEmpty:|Relude.List.Reexport++Relude.Monad.Maybe?:Relude.Monad.Reexport<$!><=<=<<>=>>>>>= Relude.Monoid<>Relude.Numeric ***+-/^^^divmodquotremxor Relude.Unsafe!! repaData.Array.Repa! *^++ +^-^/^Data.Array.Repa.Index:.$Data.Array.Repa.Operators.IndexSpace++ !Data.Array.Repa.Operators.Mapping*^+^-^/^Data.Array.Repa.ShapedeepSeq repa-arrayData.Repa.Array! Data.Repa.Array.Auto! Data.Repa.Array.Generic! Data.Repa.Array.Generic.Index:. repa-convertData.Repa.Convert.Formats:*: repa-scalarData.Repa.Scalar.Product:*: repr Prelude.Repr^ ^^ Text.Repr reprojectData.Reproject@@reqNetwork.HTTP.Req/:/~=:rereRERE>>>=\/ RERE.Type>>>=\/rerouteWeb.Routing.Combinators Web.Routing.SafeRouting resolv Network.DNS:.:respondWeb.Respond.Path rest-coreRest.Api------/ -----/----/---/--/-/ Rest.Error>|<mapE rest-rewriteArith<# DSL#* #+ #- .+<~>~>Set/\ \/ rethinkdbDatabase.RethinkDB! !? #&&*+-//=<<===>>=||Database.RethinkDB.Datum.: .:? .= Database.RethinkDB.Functions! !? #&&*+-//=<<===>>=||Database.RethinkDB.ReQL?:= rethinkdb-client-driverDatabase.RethinkDB.: .:? .= rethinkdb-wereHamsterDatabase.RethinkDB! !! # && * + ++ - . / /= := < <= == =~ > >= \\ || Database.RethinkDB.Functions! !! # && * + ++ - . / /= < <= == =~ > >= \\ || Database.RethinkDB.ReQL:= retrie Retrie.SYB:~::~~:retroclash-libRetroClash.CPU.:=RetroClash.Utils!!. .!! .!!. ./=.<.<=.<|.<|..<|>..==.>.>=.|>./=.<=.==.|>. reverse-applyControl.Apply.Reverse& &! <&> rewriting Generics.Regular.Rewriting.Rules:~> rhine FRP.Rhine)&&&&-&******* *-**^ +++++++ ++@-->-@-<+><-<<<<<<^>-->--^ >->>>-^>>>>>>^ >>^@++@>-^ @>>^ @@@||^+^^--> ^->>^->@ ^-^^/ ^<<^>>^>>> ^>>@ dot||@||||||| FRP.Rhine.ClSF.Core &&&***+++<+><<<<<^>>>>>^^<<^>>|||FRP.Rhine.ClSF.Util<-<>->FRP.Rhine.Clock &&&***+++<+><<<<<^>>>>>^^<<^>>|||"FRP.Rhine.Reactimation.Combinators ++@-->-@->--@++@>-^ @>>^ @@@||^->@ ^>>@ ||@FRP.Rhine.ResamplingBuffer.Util&-&*-*>>-^^->>FRP.Rhine.SN.Combinators**** ++++ >--^ >>>^ ^--> ^>>> |||| riakNetwork.Riak.CRDT.Types-/:| mapUpdateribbitDatabase.Ribbit:>AndAs Equals FromGt Gte LeftJoinLt Lte NotEquals OnOrWhereribosomeRibosomeringsData.Semifield/\\^^Data.Semimodule*..*./.\/.\. lscaleDef rscaleDefData.Semimodule.Combinator !#!*!*!#!#.*!*..#.#..*.*.innerData.Semimodule.Free !#!#!!*!*!#!*!comultrunCovrunVec Data.Semiring***+++-<<^rioRIO%~.~^.^..^?RIO.ByteStringconssnocRIO.ByteString.Lazyconscons'snoc RIO.FilePath-<.><.>RIO.HashMap.Partial! RIO.LensfailingRIO.List++\\elemnotElemRIO.List.Partial!! RIO.Map!? \\ RIO.Map.Partial! RIO.NonEmpty:|<|RIO.NonEmpty.Partial!! RIO.Prelude/$$!$!!$>&&&&&&*******>+++-. //=<<$<$!><$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=>>>^^^divelemmodnotElemonquotremseq||RIO.Prelude.Types:|RIO.Seq!? :<:<|:>:|><|><|>RIO.Set\\ RIO.Textcons RIO.Text.Lazycons RIO.Vector!? ++elemnotElemRIO.Vector.Boxed!? ++elemnotElemRIO.Vector.Boxed.Partial! // RIO.Vector.Partial! // RIO.Vector.Storable!? ++elemnotElemRIO.Vector.Storable.Partial! // RIO.Vector.Unboxed!? ++elemnotElemRIO.Vector.Unboxed.Partial! // rio-prettyprintRIO.PrettyPrint<+> Text.PrettyPrint.Leijen.Extended<+> riversData.Rivers.Idiom<> Data.Rivers.Streams<<| <|| |!| |~| rleData.RLE++ :><rmonadControl.RMonad<=< =<< >=> >> >>= ron RON.Prelude'!! $$>%&&&**>+++-. //=:|<<$<$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=?:^^^elemmodon||RON.Semilattice≼ ropeData.Rope.Annotated:*: Data.Rope.Annotation.Product:*: rope-utf16-splayData.SplayTree<||> rose-treesData.Tree.Rose@-> roundedNumeric.Rounded !*!!+!!-!!/!!/=!!!!>=!.*..+..-.Numeric.Rounded.Interval+/-... /=! /=? ! >=! >=? >? rounded-hw'Numeric.Rounded.Hardware.Interval.Classdisjoint equalAsSetinteriorprecedes strictLessstrictPrecedessubset weaklyLess roundtrip Control.Isomorphism.Partial.Prim*** <$>||| Text.Roundtrip.Classes<*><|><||>Text.Roundtrip.Combinators*><*<+>route-planningData.Geo.Route.Comment Data.Geo.Route.Description<~> Data.Geo.Route.Elevation<^> Data.Geo.Route.Name<.> Data.Geo.Route.Symbol<@> Data.Geo.Route.Track--| -| ..| .| |--| |-| |..| |.| Data.Geo.Route.TrackHeader<..> <..^ Data.Geo.Route.Waypoint-.- .<.> <%> <.?> ~<.> row-typesData.Row .!.+.-.//.==.\.\/.\\:+:==≈Data.Row.Dictionaries:- \\Data.Row.Internal .!.+.-.//.==.\.\/.\\:-> ≈Data.Row.Records .!.$.+.-.//.==.\:+:==≈Data.Row.Variants.!.+.-.==.\.\/.\\≈rowdyRowdy///: rowdy-yesod Rowdy.Yesod!/!///:rp-tree Data.RPTree.* ^+^ ^-^ rpmSystem.Rpm.Combinators.&&. ./=. .<. .<=. .==. .>. .>=. .||. rrb-vectorData.RRBVector! !? <|><|> rsagl-frpRSAGL.FRP.Message<<*>> rstreamRStream!! !? ++elemnotElemrtcm Data.RTCM3<<>> rtorrent-rpcNetwork.RTorrent.Action<+> !Network.RTorrent.Action.Internals<+> Network.RTorrent.Command:*: "Network.RTorrent.Command.Internals:*: Network.RTorrent.CommandList:*: <+> ruffFractal.RUFF.Types.Complex:+ Fractal.RUFF.Types.Ratio% %! :% ruin Data.Ruin<@rmaprmapArsplatrsplatAData.Ruin.Core<@ Data.Ruin.RrmapARrmapRrsplatARrsplatRs-cargotData.SCargot.Repr.Basic::: safe-json Data.SafeJSON.:$ .:$! .:$? .=$ Data.SafeJSON.Test<=?>=? safe-lazy-ioSystem.IO.Lazy.Input.Extra!>>= =<< Text.Printf.Safe.Core:% :- :<> safe-tensor Math.Tensor.*.+.- .°Math.Tensor.Safe&*&+&-safepath Data.Path-<.> <.>  Data.Path.Internal-<.> <.>  sai-shape-sybSAI.Data.Generics.Shape.SYB~~ salakSalak.?:.?=:|:saltineCrypto.Saltine.Internal.Util!&&! !||! salviaNetwork.Salvia.Interface& salvia-protocolNetwork.Protocol.Uri/+ Network.Protocol.Uri.Path/+ sandwichTest.Sandwich.Internal:> Test.Sandwich.Misc:> sandwich-slack'Test.Sandwich.Formatters.Slack.Internal??sarifData.Aeson.Optional.!= .: .:! .:? .=.=? satchmo Satchmo.Array! Satchmo.Boolean&& || Satchmo.Map.Data! Satchmo.Relation.Data! satyrosSatyros.QFIDL.Expressible::<=? ::<>? ::=? ::>? sayable Text.Sayable&!&!$*&!*&!+*&!?&%&*&+&+*&-&<&<*&> sbv Data.SBV#.&&./=./==.<.<+>.<=.<=>.==.===.=>.>.>=.^ .||.~&.~|===Data.SBV.Control|->Data.SBV.Internals.&&.<+>.<=>.=>.||.~&.~| Data.SBV.List!! ++.:Data.SBV.Rational.% Data.SBV.Set\\ Data.SBV.String!! ++.:Data.SBV.Tools.Overflow*!+!-!/!Data.SBV.Trans#.&&./=./==.<.<+>.<=.<=>.==.===.=>.>.>=.^ .||.~&.~|===Data.SBV.Trans.Control|->Data.SBV.Tuple^.scalpelText.HTML.Scalpel//@: @=@=~atDepth scalpel-coreText.HTML.Scalpel.Core//@: @=@=~atDepthscanf Text.Scanf% :+ Text.Scanf.Internal% :+ scc#Control.Concurrent.SCC.Configurable&& ... >& >-> >| || Control.Concurrent.SCC.Parallel&& ... >& >-> >| || !Control.Concurrent.SCC.Sequential&& ... >& >-> >| || scenegraphGraphics.SceneGraph.Basic<+><->  scheduleData.Rsv.RMMap! schemasSchemas.Internal<.>scholdocText.Pandoc.Pretty$$ $+$ <+> <> scholdoc-citeprocText.CSL.Eval.Names<++> <+> scholdoc-typesText.Pandoc.Builder<> sci-ratio Data.SciRatio.^ ^! ^^! science-constants-dimensional%Science.Constants.Dimensional.Private~~ scyther-proofText.PrettyPrint.Class$$ $-$ $--$ <-> <> sdl2SDL$=$=!$~$~!sdp SDP.Comparing<=> SDP.Estimate./=./=..<.<..<=.<=..==.==..>.>..>=.>=./=.<.<.=><=.<=.><==>==.>.>=. SDP.Finite:& SDP.Linear!^ ++:<:>exceptfilter SDP.LinearM!#>SDP.Map! !? *$ .! .$ // SDP.MapM!>!?>*? .? >! SDP.Ratio:%SDP.SafePrelude +? ...<=<< >>=<< >>=> ??+?-?: ?^SDP.Set/?\ /\ \+/ \/ \?/ \\ \^/ SDP.Shaped!! SDP.Unboxed!# !># sdp-io Data.FilePath:.:..:/://seakaleDatabase.Seakale.Store&&./=#/=./=~<#<.<=#<=.<=~<~=. ==#==.==~>#>.>=#>=.>=~>~||.Database.Seakale.Types<:><:|seakale-postgresqlDatabase.Seakale.PostgreSQL<:><:|seldaDatabase.Selda! $=&&=*=+=-=.&&./=.<.<$>.<=.==.>.>=.||:*::+:-:=<>? fromisInlikesuchThat||=Database.Selda.Nullable ?! ?*?+?-?/?/=?<?<=?==?>?>= selda-jsonDatabase.Selda.JSON~>selda-postgresqlDatabase.Selda.PostgreSQLauthon selectiveControl.Selective<&&> <*?<||> Control.Selective.Multi~>seleniumTest.Selenium.Interactive$$ Test.Selenium.Pretty<&> <:> <=>  semi-isoControl.Category.Structures*** +++ /+/ Control.SIArrow#<< #>> */ /$/ /$~ /* /*/ /?/ <<# <<^ >># >>^ ^<< ^>> semibounded-latticesAlgebra.SemiBoundedLattice--> //\ /\\ \\\ semigroupoid-extrasData.Semifunctor# semigroupoidsData.Bifunctor.Apply.>><<$>><<.<<..>><<.>>Data.Functor.AltData.Functor.Apply $>.><$<$><*.><.<.*><..><.>Data.Functor.Bind $>-<--<<->-.><$<$><.<..><.>>>-Data.Functor.Bind.Class .>.>><*.><.<.*><.><<.<<.>>>>-Semigroupoids.Do*> <* <*> >> >>= semigroupoids-doSemigroupoids.Do<*> >> >>= semigroupoids-syntaxData.Functor.Apply.Syntax>> Data.Functor.Bind.Syntax>>= semilatticesData.Semilattice.Join\/Data.Semilattice.Meet/\ semiring-num Data.Semiring<+><.>semiring-simple Data.Semiring<+> <.> semiringsData.Euclideandividequotrem Data.Field/divide Data.Semiring*+-^minusplustimes semver-range Data.SemVerAndEqGeqGtLeqLtOrmatches separatedData.Separated+- +: -+ -: <++> seqlocBio.SeqLoc.ShiftedVector!? // sequence Data.Sequence.FastQueue.Internal:>Data.Sequence.Queue.Internal:* Data.SequenceClass:< :> <|><|> sequent-coreLanguage.SequentCore.Syntax=~= serokell-utilSerokell.Util.Lens%%=%?= serpentine Serpentine:& servServ.Api:> serv-waiServ.Wai.Prelude& Serv.Wai.Rec++ :& <+> =: servant Servant.API:-:<|>:>Servant.API.Alternative:<|>Servant.API.Generic:-Servant.API.Sub:>servant-benchmarkServant.Benchmark:>: :|:Servant.Benchmark.Generator:>: :|:servant-checked-exceptions-core)Servant.Checked.Exceptions.Internal.Prism<>~ servant-cliServant.CLI.Internal.PStruct##:>#:>$:>%:>?:>branchnoteservant-client-coreServant.Client.Core.HasClient///:Servant.Client.Core.Reexport///: servant-jsServant.JS.Internal:<|>:> servant-namedServant.API.Named:= servant-quickcheckServant.QuickCheck<%>&Servant.QuickCheck.Internal.Predicates<%>servant-serverServant.Server.++ :.Servant.Server.Internal.Context.++ :. servant-snapServant.Server.Internal.Context:. servant-util'Servant.Util.Combinators.ErrorResponses$/Servant.Util.Combinators.Filtering.Construction ?/?/<?/<=?/=?/>?/>=?/~ textContains textIContains textILiketextLikeServant.Util.Common.HList.*.HConsServant.Util.Common.PolyKinds&&==||servant-validateServant.Validate.Internal:<sessionsControl.Concurrent.Session.= =~= ~> ~|||~ ~||~ ~|~ &Control.Concurrent.Session.Base.SMonad~>> ~>>= 'Control.Concurrent.Session.Interleaving  Control.Concurrent.Session.Pid=~= ~|||~ "Control.Concurrent.Session.Runtime~||~ &Control.Concurrent.Session.SessionType~> ~|~ +Control.Concurrent.Session.SessionTypeMonad.= ~|~ Control.Concurrent.Session.Types=~= sessiontypesControl.SessionTypes:!> :*: :?> <&<&>Control.SessionTypes.Indexed<*> >> >>= !Control.SessionTypes.MonadSession<&<&>Control.SessionTypes.Types:!> :*: :?> set-monadData.Set.Monad\\ set-of Data.Set.Of+set-with Data.SetWith\\ setoid Data.Setoid=~=\\∪ setops Data.SetOps∅ ∩ ∪ setsData.Set.Class\\ Data.Set.Ordered.Many\\ Data.Set.Ordered.Many.With\\ Data.Set.Ordered.Unique.Finite\\ Data.Set.Ordered.Unique.With\\ Data.Set.Unordered.Many\\ Data.Set.Unordered.Unique\\ sexp-grammarLanguage.Sexp.Located:< Compose Language.SexpGrammar.:.:?:-<<<>>> sexpressoData.SExpresso.SExpr::: shady-gen Shady.Complex:+ Shady.Language.Exp/=^ :^ <+> ==^ Shady.Language.GLSL=: =:: Shady.Language.Glom:* Shady.Language.Type# :*: :->: =--= =-= =:= === Shady.Misc>+> Shady.Vec:< <+> Text.PrettyPrint.Leijen.DocExpr$$ shady-graphicsShady.ITransform*: shakeDevelopment.Shake%>&%>&?>?== ?>|%>~>Development.Shake.Classes/=== hashWithSaltDevelopment.Shake.FilePath-<.><.>shake-language-c'Development.Shake.Language.C.BuildFlags>>>= shake-pathDevelopment.Shake.Path$%> $&%> shake-plus Development.Shake.Plus.FileRules%> |%> shake-plus-extended)Development.Shake.Plus.Extended.FileRules%^> /%> /|%> |%^> shakersDevelopment.Shakers8!! $$!%>&%>&&&&&&*>&?>* ** *****>*>*>>+ ++- . / /= < <$ <$!><$><* <*> <-> <.><:> <= <=<<=> <><|>=<<== > >= >=>>> >>= ?== ?>?>>\\^^^notElemon|%>|*>||~>shanaSystem.Shana.Utils- . < <|> > ^ she ShePrelude:$#$#$#: shell-conduitData.Conduit.Shell$|Data.Conduit.Shell.Process$| shell-monadControl.Monad.Shell & -&&- -|- -||- <& >& |< |> |>> shellishShellish# <$$> <$> <.>  shellmate Control.Shell<$!><=<=<<>=>>>>>=|>shellmetShellmet$?$^$|shellyShelly-|- <$><.>  Shelly.Lifted-|- <$><.>  Shelly.Pipe-|- <$><.>  shhShh&!> &> <<< <|>>> |!>|> Shh.Internal&!> &> <<< <|>>> |!>|>shikensuShikensu.Utilities!~> ~> shineGraphics.Shine.Picture<> shivers-cfgCommon↦ short-vecData.Vec.Short! ++Data.Vec.Short.Explicit! ++Data.Vec.Short.Internal! ++shortbytestringData.ByteString.Short!? conssnocData.ByteString.Short.Word16!? conssnoc shortcircuitControl.Shortcircuit&& ?? || show-combinatorsText.Show.Combinators&|.=.@| appendFieldsshowAppshpiderNetwork.Shpider.Pairs=: shwiftyShwifty&sibe Numeric.Sibe:- sieve Data.Sieve++? siffletGraphics.UI.Sifflet.LittleGtk::= ::~ := :=> :~ :~> sifflet-libGraphics.UI.Sifflet.LittleGtk::= ::~ := :=> :~ :~> signableData.Signable.Import:$$! $!!$>%%~ &&&&&&****>+++-. ... .~ //=:% :|<<$<$!><$><&><*<**><*><<$>> <=<=<<><|>=<<==>>=>=>>>>>=?: Compose ^^%^ ^. ^.. ^? ^^^^%^^ divmodonquotremxor|| silkscreen Silkscreen<+> simple-actorsControl.Concurrent.Actors<-> <.|> simple-affine-spaceData.AffineSpace.+^.-..-^Data.VectorSpace*^ ^+^^-^^/ dot simple-cmd SimpleCmd+-+simple-cmd-args SimpleCmdArgs<|>simple-conduitConduit.Simple$$$==$=$=Conduit.Simple.Compat$$$==$=$= simple-cssSimpleCss.Tricks.Layouts^- ^| simple-enumerationData.Enumeration<+> >< Data.Enumeration.Invertible<+> >< simple-loggerControl.Logger.Simple<> simple-money Data.Money^* ^+^ ^-^ ^/ simple-nixNix.Expr=$= simple-pascalLanguage.Pascal.Types# simple-pipe Data.Pipe++++ =$= =@= |||| simple-reflectDebug.SimpleReflect.Vars@@ ⊕⊗ simple-rope Data.Rope.< <> >. simple-ui Simple.UI.All.=^. simple-units Units.Simple.*.+.-./ simple-vec3 Data.Vec3.*.^ <+><->><Data.Vec3.Class.*.^ <+><->>< simplelru Data.Cache<| |> Data.LRUCache.IO-|> <|- simplepreludePrelude !! $ $! && ++ . =<< >> >>= || simplexmqSimplex.Messaging.Util<$$><$?>simplistic-genericsGenerics.Simplistic:***::**::*::+::.:Generics.Simplistic.Util&&&***:*:<.>sindre Sindre.KeyVal<$$><$?><|?><||> singlethongs Singlethongs:~:singleton-dictData.Type.Dict!? %:!? singletonsData.Singletons@@ @@@#@$ @@@#@$$ @@@#@$$$ ~>~>@#@$~>@#@$$~>@#@$$$Data.Singletons.Decide%~:~:Data.Singletons.Sigma:%&::&:singletons-baseControl.Applicative.Singletons#%*>%<$%<$>%<*%<**>%<*>%<|>*>*>@#@$*>@#@$$*>@#@$$$<$<$><$>@#@$<$>@#@$$ <$>@#@$$$<$@#@$<$@#@$$<$@#@$$$<*<**><**>@#@$ <**>@#@$$ <**>@#@$$$<*><*>@#@$<*>@#@$$ <*>@#@$$$<*@#@$<*@#@$$<*@#@$$$<|><|>@#@$<|>@#@$$ <|>@#@$$$Control.Monad.Singletons%<$!>%<=<%=<<%>=>%>>%>>=<$!><$!>@#@$ <$!>@#@$$ <$!>@#@$$$<=<<=<@#@$<=<@#@$$ <=<@#@$$$=<<=<<@#@$=<<@#@$$ =<<@#@$$$>=>>=>@#@$>=>@#@$$ >=>@#@$$$>>>>=>>=@#@$>>=@#@$$ >>=@#@$$$>>@#@$>>@#@$$>>@#@$$$Data.Bool.Singletons%&&%||&&@#@$&&@#@$$&&@#@$$$||@#@$||@#@$$||@#@$$$Data.Eq.Singletons %/=%==/=/=@#@$/=@#@$$/=@#@$$$====@#@$==@#@$$==@#@$$$Data.Function.Singletons$$@#@$$@#@$$$@#@$$$%$%&%. &&@#@$&@#@$$&@#@$$$. .@#@$ .@#@$$ .@#@$$$ .@#@$$$$ OnOnSym0OnSym1OnSym2OnSym3OnSym4sOnData.Functor.Compose.Singletons ComposeSym0 ComposeSym1 SCompose Data.Functor.Singletons$>$>@#@$$>@#@$$$>@#@$$$%$>%<$%<$>%<&><$<$><$>@#@$<$>@#@$$ <$>@#@$$$<$@#@$<$@#@$$<$@#@$$$<&><&>@#@$<&>@#@$$ <&>@#@$$$Data.List.NonEmpty.Singletons%!! %<| :%|:|@#@$:|@#@$$:|@#@$$$Data.List.Singletons!! !!@#@$ !!@#@$$ !!@#@$$$ %!! %++%\\++++@#@$++@#@$$++@#@$$$:@#@$:@#@$$:@#@$$$SCons\\\\@#@$\\@#@$$\\@#@$$$Data.Ord.Singletons%<%<=%>%>=<<=<=@#@$<=@#@$$<=@#@$$$<@#@$<@#@$$<@#@$$$>>=>=@#@$>=@#@$$>=@#@$$$>@#@$>@#@$$>@#@$$$Data.Semigroup.Singletons%<><><>@#@$<>@#@$$<>@#@$$$Data.Singletons.Base.TH4%&&%*>%. %/=%<%<$%<*%<*>%<=%<>%==%>%>=%~&&@#@$&&@#@$$&&@#@$$$*>. .@#@$ .@#@$$ .@#@$$$ .@#@$$$$ /=:@#@$:@#@$$:@#@$$$<<$<$@#@$<$@#@$$<$@#@$$$<*<*><*>@#@$<*>@#@$$ <*>@#@$$$<=<><>@#@$<>@#@$$<>@#@$$$====@#@$==@#@$$==@#@$$$>>=>@#@$>@#@$$>@#@$$$SConsData.Singletons.Base.TypeError :$$::$$:@#@$ :$$:@#@$$ :$$:@#@$$$:%$$::%<>::<>::<>:@#@$ :<>:@#@$$ :<>:@#@$$$GHC.TypeLits.Singletons%<=?%^<=?@#@$<=?@#@$$ <=?@#@$$$DivSym0DivSym1DivSym2ModSym0ModSym1ModSym2QuotQuotSym0QuotSym1QuotSym2RemRemSym0RemSym1RemSym2^@#@$^@#@$$^@#@$$$sDivsModsQuotsRemPrelude.Singletons!! !!@#@$ !!@#@$$ !!@#@$$$ $$!$!@#@$$!@#@$$$!@#@$$$$@#@$$@#@$$$@#@$$$%!! %$%$!%&&%*%*>%+%++%-%. %/=%<%<$%<$>%<*%<*>%<=%<>%=<<%==%>%>=%>>%>>=%||&&@#@$&&@#@$$&&@#@$$$**>*>@#@$*>@#@$$*>@#@$$$*@#@$*@#@$$*@#@$$$+++++@#@$++@#@$$++@#@$$$+@#@$+@#@$$+@#@$$$--@#@$-@#@$$-@#@$$$. .@#@$ .@#@$$ .@#@$$$ .@#@$$$$ /=/=@#@$/=@#@$$/=@#@$$$:@#@$:@#@$$:@#@$$$<<$<$><$>@#@$<$>@#@$$ <$>@#@$$$<$@#@$<$@#@$$<$@#@$$$<*<*><*>@#@$<*>@#@$$ <*>@#@$$$<*@#@$<*@#@$$<*@#@$$$<=<=@#@$<=@#@$$<=@#@$$$<><>@#@$<>@#@$$<>@#@$$$<@#@$<@#@$$<@#@$$$=<<=<<@#@$=<<@#@$$ =<<@#@$$$====@#@$==@#@$$==@#@$$$>>=>=@#@$>=@#@$$>=@#@$$$>>>>=>>=@#@$>>=@#@$$ >>=@#@$$$>>@#@$>>@#@$$>>@#@$$$>@#@$>@#@$$>@#@$$$SConsSeqSeqSym0SeqSym1SeqSym2sSeq||@#@$||@#@$$||@#@$$$ singletons-thData.Singletons.TH%~singular-factoryMath.Singular.Factory.GFTables>>>Math.Singular.Factory.Parser<||>sitepipeSitePipe##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-<.>-=-~.!= ... .: .:! .:? .=.> .@=.@~.~//=//~:<:>:~:<#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.><.~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<=<>~ $?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingmagnifysnoczoom|>||=||~ size-basedControl.Enumerable.Count!!* sized Data.Sized !! %!! ++:-:-:::<:><||> sized-grid SizedGridCompose SizedGrid.Coord:| sized-vectorData.Vector.Sized!! %!! sized-wrapper Data.Sized<<>>sized-wrapper-textData.Text.Lazy.SizedconsData.Text.Sizedcons skeletal-setData.SkeletalSet=~=\\∪ sketch-frp-copilotSketch.FRP.Copilot.Types=:@: skew-listData.SkewList.Lazy! !? Data.SkewList.Lazy.Internal! !? Data.SkewList.Strict! !? Data.SkewList.Strict.Internal! !? skulk Skulk.Deep<$$>>=>=>>==>>>= slack-webWeb.Slack.Experimental.Blocks<+> small-bytearray-builderData.ByteArray.Builder.Boundedappend smallcapsText.SmallCaps.Config&&& ||| smallcheckTest.SmallCheck==>Test.SmallCheck.Series<~>><>>-\/smtLibSMTLib1.<. .>. =/= === SMTLib2.Core=/= === ==> smtlib2Language.SMTLib2.#. .&..*..+..-../../=..:..<..<=..==..=>..>..>=..|.div'mod'rem'$Language.SMTLib2.Internals.Interface.#. .&..*..+..-../../=..:..<..<=..==..=>..>..>=..|.div'mod'rem'snap-appData.Monoid.Operator++ Text.Blaze.Extra!# !. snap-coreSnap.Internal.Parsing snap-extrasSnap.Extras.CoreUtils-/- snap-predicatesData.Predicate:&: :*: :|: :||: snaplet-postgresql-simpleSnap.Snaplet.PostgresqlSimple:.snaplet-sqlite-simpleSnap.Snaplet.SqliteSimple:. snowchecked Data.Snowchecked.Internal.Import.&..|.shiftLshiftRsolgaSolga:<|> sop-coreData.SOP-.->:*:.:AndCompose Data.SOP.BasicFunctors:.:Data.SOP.Classes-.->Data.SOP.ConstraintAndCompose Data.SOP.NP:* souffle-dslLanguage.Souffle.DSL .!=.% .<.<=.=.>.>=.^ \/ |-sousit Data.SouSiT$$ $= =$ =$= =+= =+|= Data.SouSiT.Sink=||= Data.SouSiT.Source$$ =+= =+|= Data.SouSiT.Transform$= =$ =$= sparse-lin-alg Math.LinearAlgebra.Sparse.Matrix# // <| |> ·× × ×· Math.LinearAlgebra.Sparse.Vector! · sparse-linear-algebraData.Sparse.Common>< Data.Sparse.SpMatrix#~# #~#^ #~^# -=- -||- @@! Numeric.LinearAlgebra.Class ## ##^ #> #^# *..* ./<# <.> <\> @@ ^+^ ^-^ Numeric.LinearAlgebra.Sparse## ##^ #> #^# #~# #~#^ #~^# -=- -||- .*./<# <.> <\> >< sparse-tensor Math.Tensor&&&+&&&>&&.+&&.>&*&+&-&.&.&+&.&>&..+&..>+>.&&+.&&>.&.+.&.>..&+..&>...+...> sparsebitData.SparseBIT*. .& .&. .** .| .|. =:= sparsecheck SparseCheck& *** -+- :- :-> :|: =/= === ? \/ |<=| |<| |>=| |>| spatial-rotationsMath.Rotations.Class°spawnControl.Concurrent.Spawn|*| speMath.Spe.*. .+. .^ <*. <^ >< speciesMath.Combinatorics.Species:*: >< @@ Math.Combinatorics.Species.Class>< @@ %Math.Combinatorics.Species.Structures:*: speculateTest.Speculate.Reason|==||>Test.Speculate.Reason.Order>||>|>|Test.Speculate.Utils! *** ++++- ..: .: thn speechmaticsSpeechmatics.JSON.PeekJob.:?? Speechmatics.JSON.PostJob.:?? spice FRP.Spice^* ^*> ^+ ^+> ^- ^-> ^. ^.> spineGenerics.Spine.Base:&: :<>: :> spirosPrelude.NotSpiros<>Prelude.SpirosmappendGenericsappendGenericPrelude.Spiros.Classes!****>+-.&..|.//=<$<*<*><=<><|>==>$>=>>>>=divelem hashWithSaltmodquotremrotaterotateLrotateRshiftshiftLshiftRxorPrelude.Spiros.Reexports1!! $$!&&&&&&*******>++++++-. //=:|<$<$><*<**><*><<<<=<=<<><|>=<<==>$>=>=>>>>>=>>>\\^^^divelem hashWithSaltmodnotElemonquotrem|||||Prelude.Spiros.Utilities$> -:< <&>> greaterThanlessThanratiospirv-reflect-typesData.SpirV.Reflect.Enums.Common.&&. spirv-reflect-yamlData.SpirV.Reflect.Yaml.Parsers.? splayData.Splay.Sequence<| |> splaytreeData.SplayTree<| >< |> sprinklesWeb.Sprinkles.Prelude&!! $$!&&* ** *> + ++ - -<.>. / /= < <$ <$!><$><* <**><*> <.><= <=<<> <|> =<<== > >= >=>>> >>= ^^^notElem||Web.Sprinkles.Rule<|+> sqelSqel*>:>> Sqel.Data.Dd:> Sqel.Kind++ Sqel.Type*>> sql-simpleDatabase.Sql.Simple+:+ :. Database.Sql.Simple.Internal+:+ :. sql-wordsLanguage.SQL.Keyword.Concat .<..<=..<>..=..>..>=..||.<++><.> andin'or|*| sqlite-simpleDatabase.SQLite.Simple:.:=Database.SQLite.Simple.Types:.squaresControl.Arrow.Square*** +++ >>> Control.Comonad.Square<=< Control.Monad.Square>=> Data.Square===|||squeal-postgresql Squeal.PostgreSQL.Definition>>>Squeal.PostgreSQL.Expression&<@@&& @>'Squeal.PostgreSQL.Expression.Comparison./=.<.<=.==.>.>=!Squeal.PostgreSQL.Expression.Json #-..#>.#>>.-..->.->>.? .?& .?| "Squeal.PostgreSQL.Expression.Logic.&&.||"Squeal.PostgreSQL.Expression.Range&< &> -|- .<@ <..<<..<=<<@ <=..<<=..<=@* @+ @- @>. @>> 'Squeal.PostgreSQL.Expression.TextSearch.! .& .| <-> @@ !Squeal.PostgreSQL.Expression.Time!+!-!-!+!Squeal.PostgreSQL.Render<+> Squeal.PostgreSQL.Session.Encode#.*..#.*Squeal.PostgreSQL.Type.Alias! :::Squeal.PostgreSQL.Type.List*::*:>>Squeal.PostgreSQL.Type.Schema:=>squeal-postgresql-ltreeSqueal.PostgreSQL.LTree%<@%?%@%@>%~&?&@&~<@%?%?&?<@?@?@>?~@%@&@>%~%~&srclocData.Loc<-->srcspansrtree Data.SRTree^.Data.SRTree.Internal^.ssspAws.SSSP-/- stack Stack.Prelude7$$!$!!$>%~&&&&&&*******>+++-. .|.~//=:|<<$<$!><$><&><*<*><+> <=<=<<><|>=<<==>>=>=>>>>>=>>>^^.^..^?^^divelemmodnotElemonquotremseq|| stack-prismData.StackPrism:- Data.StackPrism.Generic:- Data.StackPrism.TH:- staged-ggStaged.GHC.Generics:**::++::@@:Staged.GHC.Generics.Types:**::++::@@:stan Stan.NameMeta baseNameFromghcPrimNameFrom textNameFromunorderedNameFromStan.Pattern.Edsl&&&? |||Stan.Pattern.Type|->|:: state-recordData.Record.StateFields// stateful-mtlControl.Monad.Trans.Operations>>=? statisticsStatistics.Types± statistics-dirichlet Math.Statistics.Dirichlet.Matrix! !!! !Math.Statistics.Dirichlet.Mixture!!! statistics-skinnyStatistics.Types± status-notifier-itemStatusNotifier.Util<..><<$>>>>=/ stdio Std.Data.JSON.: .:! .:?  Std.Data.JSON.Base.: .:! .:?  Std.Data.ParserStd.Data.Parser.Base steeloverseer Sos.Utils<|||> step-functionData.Function.Step! "Data.Function.Step.Discrete.Closed! Data.Function.Step.Discrete.Open! stepwiseControl.Monad.Stepwise.Examples<<|> stgi Data.Stack:< <>> stitchStitch.=?Stitch.Combinators-:.=? stm-conduitData.Conduit.Async$$&$=&=$&=$=&Data.Conduit.TMChan<=> >=<stomplNetwork.Mom.Stompl.Frame<| >|< |> storablevectorData.StorableVector.Lazyappend Data.StorableVector.Lazy.PatternappendData.StorableVector.Lazy.Typedappend stream-fusionControl.Monad.Stream<=< =<< >=> >> >>= Data.List.Stream!! ++ \\ streamingData.Functor.Of:> Streaming:><><|>Compose Streaming.Prelude:>streamly Streamly <>aheadasyncparallelserialwAsyncwSerial|$|$.|&|&.&Streamly.Internal.Data.Stream.IsStream!! .:consconsM|$.|&.|:0Streamly.Internal.Data.Stream.IsStream.Eliminate!! |$.|&.-Streamly.Internal.Data.Stream.IsStream.ExpandaheadasyncparallelserialwAsyncwSerial/Streamly.Internal.Data.Stream.IsStream.Generate.:consconsM|:0Streamly.Internal.Data.Stream.IsStream.Transform|$|&+Streamly.Internal.Data.Stream.IsStream.Type.:consconsM|:$Streamly.Internal.Data.Stream.SerialconsconsMwSerialStreamly.Prelude!! .:aheadasyncconsconsMparallelserialwAsyncwSerial|$|$.|&|&.|: streamly-coreStreamly.Data.StreamKappendconsconsM interleaveStreamly.Internal.BaseCompat#. /Streamly.Internal.Data.Stream.StreamD.Eliminate!! %Streamly.Internal.Data.Stream.StreamK!! .:appendconsconsM interleave*Streamly.Internal.Data.Stream.StreamK.Type.:appendconsconsM interleave interleaveFst interleaveMinStreamly.Internal.Data.Unfoldbind"Streamly.Internal.Data.Unfold.TypebindstreamsData.Stream.Future:<Data.Stream.Future.Skew:<<|Data.Stream.Infinite!! :>&Data.Stream.Infinite.Functional.Zipper!! :~<| Data.Stream.Infinite.Skew!! <|strictData.Strict.Tuple:!: strict-baseData.Strict.List:! Data.Strict.List.NonEmpty:| Data.Strict.Tuple:!: strict-base-typesData.Tuple.Strict:!:strict-containers.Data.Strict.ContainersUtils.Autogen.StrictPair:*:$Data.Strict.HashMap.Autogen.Internal! !? +Data.Strict.HashMap.Autogen.Internal.Strict! !? "Data.Strict.HashMap.Autogen.Strict! !? #Data.Strict.IntMap.Autogen.Internal! !? \\ !Data.Strict.IntMap.Autogen.Strict! !? \\ *Data.Strict.IntMap.Autogen.Strict.Internal! !? \\ Data.Strict.Map.Autogen.Internal! !? \\ Data.Strict.Map.Autogen.Strict! !? \\ 'Data.Strict.Map.Autogen.Strict.Internal! !? \\ Data.Strict.Sequence.Autogen!? :<:<|:>:|><|><|>%Data.Strict.Sequence.Autogen.Internal!? :<:<|:>:|><|><|>-Data.Strict.Sequence.Autogen.Internal.SortingIQConsITQConsQConsTQConsData.Strict.Vector.Autogen! !? ++// elemnotElem strict-dataData.StrictList+!+:! \!\ Data.StrictVector! !? strict-typesData.Strict.Forced Data.Strict.HashMap! string-combinatorsData.String.Combinators$$ <+> <> string-conversionsData.String.Conversions<>string-variantsData.StringVariants<=<>| Data.StringVariants.NonEmptyText<=<>| stringtable-atomStringTable.AtomMap! \\ StringTable.AtomSet\\ stripe-coreWeb.Stripe.StripeRequest-&- Web.Stripe.Util stripe-testsWeb.Stripe.Test.Prelude$-&- . /===>> >>= stripe-wreq Stripe.Wreq:= strong-path StrongPath structs Data.Struct# Data.Struct.Internal# structural-inductionInduction.Structural:~ structured-cliSystem.Console.StructuredCLI>+ structured-mongoDB!Database.MongoDB.Structured.Query .! .&& .* ./= .< .<= .== .> .>= .|| subG Data.SubG%@%^ subcategoriesControl.Subcategory.Alternative%Control.Subcategory.Alternative.ClassControl.Subcategory.Applicative.> <. <.>%Control.Subcategory.Applicative.Class.> <. <.>Control.Subcategory.Bind-<<>>-Control.Subcategory.Functor<$:<$:>$Control.Subcategory.RebindableSyntax*+-/===>> >>= subhaskSubHask++ SubHask.Algebra%! !? && * ** *. *.. *= + +. += - -= .* .*. .*.= .*= .+ .+= ..*.. ./ ./. ./.= ./= / /= < <= <> == ==> > >< >= ^ ^^ || SubHask.Category$ $! $$ . <<< >>> SubHask.Monad<*> <=< =<< >=> >> >>= subnetNetwork.Subnet.Binary.&&. .+. .-. .||. subzeroControl.Applicative.SubZero<-$> <-|> summoner-tuiSummoner.Tui.GroupBorder|>sunroof-compilerLanguage.Sunroof! # $$ := Language.Sunroof.Selector! Language.Sunroof.Types# $$ := super-user-sparkSuperUserSpark.Utils&&& <$$> <**> supermonad Control.Super.Monad*> <$ <* <*> >> >>= Control.Super.Monad.Alternative<|> Control.Super.Monad.Constrained*> <$ <* <*> >> >>= +Control.Super.Monad.Constrained.Alternative<|> )Control.Super.Monad.Constrained.Functions<$!><$><**> <=<=<<>=>'Control.Super.Monad.Constrained.Functor<$ 'Control.Super.Monad.Constrained.Prelude=<<Control.Super.Monad.Functions<$<$!><$><**> <=<=<<>=>Control.Super.Monad.Prelude=<<'Control.Super.Monad.PreludeWithoutMonad!! $$!&&* ** + ++- . / /= < <$ <$><= == > >= ^^^notElem|| superrecord SuperRecord&&.&:&:-++: :&:= supply-chain SupplyChain>+ >- >-> SupplyChain.JobAndVendor>+ >- SupplyChain.Vendor>-> supply-chain-coreSupplyChain.Core.Connect>+>->->suspendControl.Concurrent.Suspend.+. !Control.Concurrent.Suspend.Lifted.+. svData.Sv.:=: ==<<>$>>==sv-coreData.Sv.Decode.Core.:==<<>>==Data.Sv.Encode.Core< ?>> svg-builder Graphics.Svg<>Graphics.Svg.Attributes->><<-svg-builder-fork Graphics.Svg<>Graphics.Svg.Attributes->><<- svg-iconsSvgIcons.Core.Utils.:swagger-petstoreOpenAPIPetstore.Core-&- swagger2Data.Swagger.Internal.Utils<+> swarm Data.BoolExpr/\ \/ Swarm.Language.Syntax:$:Swarm.Language.Typecheck=:=Swarm.Language.Types:*::+::->: Swarm.Util%%=<%=<+=<<.=<>=?Swarm.Util.Location.+^.-..-^Swarm.Util.Yaml..!= ..: ..:? syb-with-class"Data.Generics.SYB.WithClass.Basics:~::~~:sydtestTest.Syd shouldBe shouldContain shouldEndWith shouldNotBeshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrowTest.Syd.Expectation shouldBe shouldContain shouldEndWith shouldNotBeshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrow sydtest-wai Test.Syd.Wai<:> Test.Syd.Wai.Matcher<:> symSym.Internal.CLongArrayat unsafeAt Sym.Perm.Constructions/+/\-\symantic"Language.Symantic.Compiling.Module:= Language.Symantic.Compiling.ReadCtxTyS Language.Symantic.Compiling.TermCtxTeSapp"Language.Symantic.Interpreting.DupDupLanguage.Symantic.Typing.KindKiFunLanguage.Symantic.Typing.List++Language.Symantic.Typing.Type ##>#~:$:@ :~::~~:TypesStyApp tyQual~>!Language.Symantic.Typing.VariableVarS symantic-baseSymantic.Syntaxes.Classes$. .>.@ :!:<%><&><*&><+&><+><-><.<.><><|>==concatequalSymantic.Syntaxes.DataConcatConsSymantic.Syntaxes.Reify--> symantic-cliSymantic.CLI.API:!:<.>althelpsymantic-documentSymantic.Document.Lang<+>symantic-grammar%Language.Symantic.Grammar.ContextFree&><&Language.Symantic.Grammar.EBNFebnf_arg!Language.Symantic.Grammar.Regular.*><*.<+> Language.Symantic.Grammar.Source setSource symantic-httpSymantic.HTTP.API:!:<.> symantic-lib !Language.Symantic.Lib.Alternative<|>!Language.Symantic.Lib.Applicative*><*<*>Language.Symantic.Lib.Bool&&xor||Language.Symantic.Lib.Eq/===Language.Symantic.Lib.FoldableelemLanguage.Symantic.Lib.Functioncomp Language.Symantic.Lib.Functor<$<$>Language.Symantic.Lib.IntegraldivmodquotremLanguage.Symantic.Lib.List list_consLanguage.Symantic.Lib.Monad>=>>>=Language.Symantic.Lib.Num*+-Language.Symantic.Lib.Ord<<=>>=Language.Symantic.Lib.Semigroup<> symantic-parserParsers.Utils.Attoparsec<+> <:> <~> >?> symantic-xmlSymantic.XML.RelaxNG.Language*:* :* :-:::: :|: syntacticLanguage.Syntactic.Syntax:$:+: :-> Language.Syntactic.Traversal:* synthesizer Sound.Signal++ Sound.Signal.StrictBlock++ Synthesizer.ApplicativeUtility$# $: $:: $^ .: .^ Synthesizer.Dimensional.Arrow&&& *** <<< <<^ >>> >>^ ^<< ^>> &Synthesizer.Dimensional.Causal.Process $/- $/: &&& *** <<< <<^ >>> >>^ ^<< ^>> Synthesizer.Dimensional.Process$# $: $:: $^ .: .^ -Synthesizer.Dimensional.RateAmplitude.Control#| #|- #|= -|# =|# |# ,Synthesizer.Dimensional.RateAmplitude.Signal$& $- &*>^ &*^ Synthesizer.Generic.Control#| #|- #|= -|# =|# |# Synthesizer.Interpolation.Class+.* Synthesizer.Piecewise#| #|- #|= -|# =|# |# Synthesizer.Plain.Control#| #|- #|= -|# =|# |# %Synthesizer.SampleRateContext.Control#| #|- #|= -|# =|# |# "Synthesizer.SampleRateContext.Rate$# $: $:: $^ .: .^ $Synthesizer.SampleRateContext.Signal$- synthesizer-coreSynthesizer.ApplicativeUtility$#$:$::$^.: .^ Synthesizer.Causal.Class$*$<$>Synthesizer.Interpolation.Class+.*Synthesizer.Piecewise#|#|-#|=-|#=|#|#Synthesizer.State.SignalappendSynthesizer.Storable.Signalappendsynthesizer-dimensionalSynthesizer.Dimensional.Arrow$/-$/:apply &Synthesizer.Dimensional.Causal.Process $/-$/:&&&***<<<<<^>>>>>^^<<^>>apply applyFst Synthesizer.Dimensional.Process$#$:$::$^.: .^ +Synthesizer.Dimensional.RateAmplitude.Piece#|#|-#|=-|#=|#|#Synthesizer.Dimensional.Signal$& $-&*>^&*^Synthesizer.Dimensional.Wave&*~synthesizer-llvmSynthesizer.LLVM.Causal.Process$* $*# $< $<# $> $># /Synthesizer.LLVM.CausalParameterized.Functional$& &|& 3Synthesizer.LLVM.CausalParameterized.FunctionalPlug$& &|& ,Synthesizer.LLVM.CausalParameterized.Process$* $< $> Synthesizer.LLVM.Complex+: Synthesizer.LLVM.Parameter$# Synthesizer.LLVM.Server.Common$/ Synthesizer.LLVM.Simple.Value %&& %/= %< %<= %== %> %>= %|| ? ?? system-extra System.Docker:-- system-filepathFilesystem.Path<.>  t-regexData.MultiGenerics:**: Data.Regex.Generics# <.> <<- <||> ^* Data.Regex.MultiGenerics! <.> <<- <||> ? ^* Data.Regex.MultiRules->> ->>> Data.Regex.Rules->> ->>> tabular Text.Tabular+----+ +.+ +====+ ^..^ ^|^ ^||^ taffybarSystem.Taffybar.Util<||><|||>?? tag-streamText.HTML.TagStream.Parser||. tagged-listData.List.Tagged:. tagsoupText.HTML.TagSoup~/= ~== tagstream-conduitText.HTML.TagStream.ByteString||. Text.HTML.TagStream.Text||. talashTalash.Chunked! tamarin-prover-termTerm.Builtin.Convenience# *: tamarin-prover-theoryTheory.Model.Formula.&&. .<=>. .==>. .||. tamarin-prover-utilsExtension.Data.Label=: Text.PrettyPrint.Class$$ $-$ $--$ <-> <> tamper Text.Tamper! tapioca Data.Tapioca:| <-><:>tarCodec.Archive.TarNexttar-bytestringCodec.Archive.TarNexttargetTest.Target.Util::: taskellTaskell.Data.Seq<#> tasty-bddTest.Tasty.Bdd@?/= @?=^?/= ^?= tasty-dejafuTest.Tasty.DejaFu->- === =>= tasty-hsluaTest.Tasty.HsLua=:?: tasty-hunitTest.Tasty.HUnit@=?@?@?=tasty-hunit-compatTest.Tasty.HUnit@=?@?@?=tasty-inspection-testingTest.Tasty.Inspection==- === ==~ tasty-quickcheckTest.Tasty.QuickCheck.&&..&..||.=/======>>< tasty-smallcheckTest.Tasty.SmallCheck==>taxData.Tax<> tdocText.TDoc.Core! +++<<teamsData.Teams.Graph.$. .|. telegram-bot-simpleTelegram.Bot.Simple.Eff<# template-haskellLanguage.Haskell.TH.CodeDo>> >>= Language.Haskell.TH.PprLib$$$+$<+><>temporal-mediaTemporal.Class*| +:+ +| =:= Temporal.Media=:/ temporal-music-notationTemporal.Music.Score! *| +:+ +| =:/ =:= tenData.Ten:*::+::.:Data.Ten.Applicative*>!<*!<*>!Data.Ten.Functor<$!<$>!Data.Ten.Sigma:**ten-lens Data.Ten.Lens!=!=?ten-unordered-containersData.Ten.HashMap:**tensor Data.Tensor! Data.Tensor.LinearAlgebra*. .*. .+. ⊗ Data.TypeAlgebra<*> <+> Data.TypeList!! .|. <++> Data.TypeList.MultiIndex:|: tensor-safeTensorSafe.Network:~>:~~tensors Data.Tensor! terminfoSystem.Console.Terminfo.Base<#>termonadTermonad.Prelude3$$!$!!$>&&&&&&*******>+++-. //=<<$<$><&&><&><*<**><*><.><=<=<<><|<|><||>=<<==>>=>=>>>>>=\\ ^^^div hashWithSaltmodonquotremseq||terrahsTerraHS.Algebras.Base.Category$*$ test-funTest.Fun:+:->Test.Fun.Internal.Generic:+>*> >-> Test.Fun.Internal.Pretty%:.~%Test.Fun.Internal.Types:->test-invariantTest.Invariant&> <=>    <~~ @~> testcontainersTestContainers&TestContainers.Docker&TestContainers.Tasty&testpackTest.QuickCheck.Tools@=? @?= text Data.TextconsData.Text.Internalmulmul32mul64$Data.Text.Internal.Builder.Functions<>Data.Text.Internal.Fusion.Types:*:Data.Text.Lazyconstext-and-plots Text.DocL/: Text.DocL.Javascript/: text-builder-linearData.Text.Builder.Linear.Buffer$<|%<|&<|.<|<|<|#><|>|>#|>$|>%|>&|>.|>……<|Data.Text.Builder.Linear.Core><text-containersData.TextArray.Unboxed!? Data.TextMap.Unboxed.Lazy!? Data.TextSet.Unboxed!? text-ldapText.LDAP.Dataelem'inBounds inSBoundsnotElem' text-position Data.Position<++> text-printer Text.Printer<+><-><> text-regionData.Text.Region.Types.+. .-. text-shortData.Text.Short!? text-utf8 Data.TextconsData.Text.Internalmulmul32mul64$Data.Text.Internal.Builder.Functions<>Data.Text.Internal.Fusion.Types:*: Data.Text.Lazyconstext1Data.Text1.Text1+:.:.<><>.textPlotTextPlot.+ .- .| tfpType.Data.Num.Decimal.Number:< :> th-alphaLanguage.Haskell.TH.Alpha@=th-buildLanguage.Haskell.TH.Build--> .:: \-> th-casAlgebra.CAS.Type:*: :+: :-: :/: :^: th-desugar Language.Haskell.TH.Desugar.OMap\\ 'Language.Haskell.TH.Desugar.OMap.Strict\\ Language.Haskell.TH.Desugar.OSet\\ themoviedb$Network.API.TheMovieDB.Internal.Date.:: theoremquestTheoremQuest.Logic:-> =. thespianControl.Concurrent.Actor▷ ◁ thihAssump:>: Pred:=> <:> Subst+-> @@ threepenny-editorsGraphics.UI.Threepenny.Editors*-*|-*-*-|*|*|%Graphics.UI.Threepenny.Editors.Layout:-*- :|*| $Graphics.UI.Threepenny.Editors.Types*-*|-*-*-|*|*|threepenny-guiGraphics.UI.Threepenny.Core ##+#.*><$<$><*<**><*><@<@><|>Reactive.Threepenny<@<@>tickleData.Tickle.Get!!- !+ !- .>> <<. tictactoe3dGame.TicTacToe3D.Vector3! // tidalSound.Tidal.Core'# %| **| *| ++| +| -| /| <| <~ >| |% |%| |* |** |**| |*| |+ |++ |++| |+| |- |-| |/ |/| |< |<| |> |>| ||% ||* ||** ||+ ||++ ||- ||/ ||< ||> ~> Sound.Tidal.Pattern*><*<<*Sound.Tidal.Utils!!! time-recurrenceData.Time.Recurrence.AndThen>==> tinylogSystem.Logger.Message+++.=~~tip-haskell-frontendTip.&&. .||. =/= === ==> Tip.Prelude$ && * + ++ - . /= < <= == > >= ^ || tip-libTip.Core// /\ =/= === ===> ==> \/ Tip.Haskell.Repr::: Tip.Pretty$\ Tip.Pretty.Isabelle$-$ Tip.Types:=>: :@: titlecaseData.Text.Titlecase.Internal<#> tlex-core#Language.Lexer.Tlex.Machine.Pattern:^: :|: Language.Lexer.Tlex.Prelude&!! $!&&&****>+++-. //=:|<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq||tmp-procSystem.TmpProc.Docker&:HConsSystem.TmpProc.TypeLevel&:HConstmp-proc-postgresSystem.TmpProc.Docker.PostgresHConstmp-proc-rabbitmqSystem.TmpProc.Docker.RabbitMQHConstmp-proc-redisSystem.TmpProc.Docker.RedisHConstmp-proc-zipkinSystem.TmpProc.Docker.ZipkinHConstnetTNET.: .= todosTodos.Formatters<++> toml-reader-parse TOML.Parse.!=.:.:? tomland Toml.Codec.Di.=Toml.Codec.TypesToml.Parser.CoreToml.Type.Edsl=: Toml.Type.Key<| tonaludeTonalude/$$!$!!$>&&&&&&*******>+++-. //=<<$<$!><$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=>>>^^^divelemmodnotElemonquotremseq|| tonaparser TonaParser.|| topNetwork.Top.Pipes>->topaz Topaz.Rec<: Topaz.Types++tophatTophat>>>totalLens.Family.Complete&&&&Lens.Family.Total& total-map Data.TotalMap! tower Tower.Algebra* ** *. + +. - -. .* .*. .+ .+. .- .-. ./ ./. / /.  >< ^ ⊕ toxcoreNetwork.Tox.Time+ - toysolver ToySolver.Arith.Cooper.|. ToySolver.Arith.Cooper.Base.|. ToySolver.Arith.DifferenceLogic:-:<=ToySolver.Arith.Simplex.<..<=..==..>..>=.&ToySolver.Data.AlgebraicNumber.Complex:+ToySolver.Data.Boolean.&&..<=>..=>..||.ToySolver.Data.FOL.Arith:*: :+: :/: ToySolver.Data.OrdRel./=..<..<=..==..>..>=.ToySolver.Data.Polynomialdivmodtpdb TPDB.Pretty$$ <+> <>TPDB.Xml&|traced Debug.Traced%&& %/= %< %<= %== %> %>= %|| tractionTraction.Prelude%$$>&&&**>+-. //=<<$<$!><$><*<**><*><=<=<<><|>=<<==>>=>=>>>>>=^divelemmodnotElemquotrem||traildbSystem.TrailDB:. ^. transformations&Generics.MultiRec.Transformations.Path<.> transformers-composeControl.Monad.Compose.Class<<< >>> transientTransient.Base**><**<***Transient.Internals!> **><**<***<| Transient.Parse|- translatable-intsetData.IntSet.Translatable\\ translateText.Language.Internals- . trasa Trasa.Core.&./treemapData.TreeMap.Strict<| \\ Data.TreeMap.Strict.Zipperaxis_at axis_filtertreeseqData.TreeSeq.Strict.Zipperaxis_at axis_filteraxis_filter_current trek-lens Trek.Lens%>focusingtrialTrial:-::-alt triangulation'Graphics.Triangulation.GJPTriangulation+< trifectaText.Trifecta.Rendering.# :@ :^ :~ tropicalData.Semiring.Tropical.*. .+. ./. .^. tropical-geometryGeometry.ConvexHull2>*< Polynomial.Prelude!* truthyData.Bool.Class&&* ||* tsweb TsWeb.Db.Beam&&.&&?.**./=*./=./=?. <*.<-.<.<=*.<=.<|>.==*.==.==?. >*.>.>=*.>=.between_div_in_like_mod_ similarTo_||.||?.tubesTubes-< >- >< |> ~> Tubes.Core-< >- >< |> ~> tuple-appendData.Tuple.Append+++++><++Data.Tuple.Append.Class+++++><++ tuple-morphData.Tuple.Morph.Append++@ turtleTurtle &*><$><&><*<*><.><=<<><|>>=> Turtle.Format% Turtle.Prelude.&&..||.turtle-optionsTurtle.Options.Parsers<:> Turtle.Options.Timecode<+> twee Twee.Array! Twee.Constraints&&& ||| Twee.Rule:=: twee-lib Twee.Base<< Twee.Constraints&&& ||| Twee.Equation:=: Twee.Pretty$$$+$<#><+> Twee.Term<< twentefpFPPrac.Prelude!! twentefp-numberFPPrac!! twentysevenData.Tuple.Extra|:| Data.Vector.Storable.Allocated! Rubik.Cube.Coord!$ !. Rubik.Misc<&> <>^ ?? Rubik.Solver>$< |*| |.| twilioTwilio.Internal.Parser<&> twine Text.Twine=: twitchTwitch|#|%|+|-|>twitter-conduit$Web.Twitter.Conduit.Request.Internal:= tyData.Ty=:= type-alignedData.TASequence:< :> <| >< |> type-combinators Data.Type.Boolean.&&.==.?.^^.||<==>==>Data.Type.Conjunction.&.Data.Type.Disjunction>+<>|< Data.Type.Nat.*.+.^Data.Type.Product::<:>>:>::Data.Type.Product.Env.\\ Data.Type.Product.Lifted:>>>>:Data.Type.Vector*:+:.++:+Type.Class.Higher<# <## <### <=# <=## <=### =###==##==#=># >## >### >--->>-->>->>=# >=## >=### >>->>-->>--->>=->>=-->>=--->>=~>>~Type.Class.Witness////?//?+=?==??=\\ type-compare Kinds.Ord /=/=? <<=<=?>=>=?>?type-eqType.Eq|> Type.Eq.Higher|$| |.| ||$|| ||.|| Type.Eq.Poly|$| |.| type-equalityData.Type.Equality.Hetero:~~: type-errors Type.Errors:$$::<>:type-errors-prettyType.Errors.Pretty%<>•⊕type-functions Data.TypeFun:-> type-indexed-queuesData.Queue.Binomial:- TypeLevel.Singletons*.+.-.<=.^. type-levelData.TypeLevel.Bool&& || Data.TypeLevel.Num.Ops * + - < <= == > >= ^ Data.TypeLevel.Num.Reps:* type-level-bstType.BST! !? .:. <$*> <$*?> |> type-level-kv-list Data.KVList&. &.? &.?? &=&=>:=type-level-sets Data.Type.Map:-> type-level-tfData.TypeLevel.Num.Ops* + - < <= > >= ^ Data.TypeLevel.Num.Reps:* type-map Data.TypeMap.Dynamic<: Data.TypeMap.Dynamic.Alt<: Data.TypeMap.Internal.Dynamic<: !Data.TypeMap.Internal.Dynamic.Alt<: Data.TypeMap.Internal.List<|conssnoc|>Data.TypeMap.Internal.Map<|conssnoc|>Data.TypeMap.Internal.Vector<|conssnoc|>Data.TypeMap.List<|conssnoc|>Data.TypeMap.Map<|conssnoc|>Data.TypeMap.Vector<|conssnoc|> type-naturalData.Type.Natural%*%+%-%-. %<=?%=?%>?%^%~*+--.<<=<=?>=>=?>?DivMod^sDivsModData.Type.Natural.Lemma.Order %-. %=?%>?-.<>=>=?>?Data.Type.Ordinal@+ type-of-html Html.Type#&:#: :&::= :>:@ :|:type-operatorsControl.Type.Operator$$$&<+> <=> <^^>type-rigData.TypeRig.Productable***><***<***>Data.TypeRig.Summable<+++>type-settheory Type.Function:***: Type.Set:×: type-specTest.TypeSpec.Group-/-Test.TypeSpec.Internal.Apply~>Test.TypeSpecCrazy3######### ######### ###################################################################################################################################################!#################################$####################################'#######################################*##########################################-#############################################0################################################3###################################################6######################################################9#########################################################<############################################################?###############################################################B##################################################################E#####################################################################H########################################################################-*-*---*~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~9~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ type-unary TypeUnary.Vec<+>typecheck-plugin-nat-simpleData.Log.+.typed-duration Data.Duration# typed-timeData.Time.Format.Typed:<> typedflowTypedFlow.Layers.Core# TypedFlow.Layers.RNN.++. .--. .-. TypedFlow.TF+· ∙⊕⊘⊙⊝TypedFlow.Types:& <-- typelevelType.Applicative<*> Type.Bool&& Type.Error:$$::<>:Type.Error_old:$$::<>: Type.Functor<$> Type.Monoid<>Type.Operators$$$&typelevel-tensorData.Tensor.TypeLevel! :~ typelits-witnessesGHC.TypeLits.Compare%<=? GHC.TypeLits.Witnesses%* %+ %- %<=? %^ typenums Data.TypeLits*+-//=/=?:$$::% :<>:<<=<=?====?>>=DivModQuotRem^ Data.TypeNums*+-//=/=?:% <<=<=?====?>>=DivModQuotRem^!Data.TypeNums.Arithmetic.InternalDivModQuotRemData.TypeNums.Rats:% typerboleCalculi.Lambda.Cube.HigherOrder/$Calculi.Lambda.Cube.Polymorphic\-/≣+Calculi.Lambda.Cube.Polymorphic.Unification\<⊑Calculi.Lambda.Cube.SimpleType/->====Control.Typecheckable<><> typical Data.Typical:#: typograffiti Typograffiti$$ Typograffiti.Rich$$ typson-coreTypson.JsonTree<<$><<*>Typson.Pathing:->tyro Data.Tyro%%>>%> uhc-utilUHC.Util.CHR.Rule/\<==><=><=>> <\><\>> =!=!!==>==>> =@=|@=\!\/|>UHC.Util.ScopeVarMp varmpPlus|\> UHC.Util.Utils$?UHC.Util.VarLookup|+> unboxed-containersData.Set.Unboxed\\ unboxing-vectorData.Vector.Unboxing! !? ++ // uncertainNumeric.Uncertain+/-:+/- uni-events Events.Events+>>>>>>>=Events.GuardedEvents|> uni-graphsGraphs.GraphConfigure$$$$$$$$?uni-htkHTk.Canvasitems.CanvasTag&#&^#|#|HTk.Toolkit.SimpleForm//\\ uni-utilUtil.Computation#$$ Util.Debug@: @@: Util.DeepSeq$!!deepSequnicode-preludePrelude.Unicode¬ × ÷ ⇔ ∅ ∈ ∉ ∧ ∨ ≠ ≡ ≢ ≤ ≥ ≮ ≯ ⊥ ⋅ ◦ unicode-symbols Control.Applicative.Unicode∅ ⊛ Control.Category.Unicode∘ Data.IntMap.Unicode∅ ∈ ∉ ∩ ∪ Data.IntSet.Unicode ∅ ∈ ∉ ∩ ∪ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ Data.Map.Unicode∅ ∈ ∉ ∩ ∪ Data.Monoid.Unicode∅ ⊕ Data.Sequence.Unicode∅ ⊲ ⊳ ⋈ Data.Set.Unicode ∅ ∈ ∉ ∩ ∪ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ Prelude.Unicode¬ ÷ ∈ ∉ ∘ ∧ ∨ ≡ ≢ ≤ ≥ ≮ ≯ ⊥ ⋅ unicode-tricksData.Char.Combining*^*^!unification-fdControl.Unification<:==:=====~=equalsequivsubsumesunifyControl.Unification.Ranked=:=====~=equalsequivunifyuniform-fileioUniform.FileStrings<.>  Uniform.Filenames<.>  uniform-json Uniform.Json.= uniform-pairData.UniformPair:# uniform-shake Uniform.Shake$--<.> $-<.> %>|%>Uniform.Shake.Path$%> $&%> uniform-stringsUniform.Strings<#> <+> <-> <:> <|> Uniform.Strings.Infix<#> <+> <-> <.>  <:> <|> union-mapData.UnionIntMap! \\ Data.UnionMap! \\ unipatterns UniPatterns||> uniplateData.Generics.PlateDirect|* |+ |- ||* ||+ Data.Generics.PlateTypeable|+ |- Data.Generics.Uniplate.Direct|* |+ |- ||* ||+ Data.Generics.Uniplate.Typeable|+ |- unique-logicUniqueLogic.ST.Expression=!==:=unique-logic-tfUniqueLogic.ST.TF.Expression=!==:=uniquely-represented-setsData.Tree.Braun! !? unitsData.Metrology(##*#+#-$=%%*%/%^*|*~/|:*:/:@ :^@*@+@-@/@@+@@-@~qApproxqNapproxshowIn|*|*||+||-||/|/=||/||<=||<||==||>=||>||^|^^Data.Metrology.Internal $=*~@*@+@-@/@@+@@-@~Data.Metrology.Linear*^|^#^% showInV|*^||.+^| |.-.| |.-^| |.||^*|^*||^+^||^-^||^/|^/|Data.Metrology.Poly##*#+#-%%*%/%^*|/|:*:/:@ :^qApproxqNapproxshowIn|*|*||+||-||/|/=||/||<=||<||==||>=||>||^|^^Data.Metrology.Vector(##*#+#-%%*%.%/%^*|.#/|:*:/:@ :^qApproxqNapproxshowIn|*|*^||*||+||-||.+^||.-.||.-^||.||/|/=||/||<=||<||==||>=||>||^|^*||^/||^^Data.Metrology.Z#*#+#- unittyped UnitTyped .$. .*. .+. .-. ./. .<. .<=. .==. .>. .>=. ~. UnitTyped.NoPrelude * + - . / < <= == > >= universe-baseData.Universe.Helpers+*+ +++ <+*+> universe-reverse-instancesData.Universe.Instances.Eq/===Data.Universe.Instances.Ord<<=>>= universum Universum%~.~^.^..^?Universum.Applicative*><*<**><*><|>Universum.Base$!***+-//=:% <<===>>=^^%^ ^^^^%^^ divmodquotremseqxorUniversum.Bool.Reexport&&||Universum.Container.Reexport hashWithSaltUniversum.DeepSeq$!!Universum.Function$&. onUniversum.Functor.Fmap<<$>>Universum.Functor.Reexport$>&&&<$<$><&>Compose Universum.List.Reexport++:|Universum.Monad.Maybe?:Universum.Monad.Reexport<$!><=<=<<>=>>>>>=Universum.Monoid<>Universum.TypeOps$Universum.Unsafe!! Universum.VarArg...unixSystem.Posix.Signals addSignal deleteSignal unlifted-listData.List.Unlifted. unm-hipData.Image.Arithmetic*. +. -. .* .+ .- ./ /. Data.Image.Binary ./= ./=. .< .<. .== .==. .> .>. /=. <. ==. >. unordered-containersData.HashMap.Internal! !? Data.HashMap.Internal.Strict! !? Data.HashMap.Lazy! !? Data.HashMap.Strict! !? unordered-intmapData.Unordered.IntMap! unpack-funcsControl.Monad.Unpack$~ unpacked-containers Map.Internal! !? \\ Map.Lazy! !? \\ Map.Strict! !? \\ Map.Strict.Internal! !? \\ Set\\ Set.Internal\\ unparse-attoparsecData.Attoparsec.Unparse "Data.Attoparsec.Unparse.Profunctor unusedCommon<> uom-pluginData.UnitsOfMeasure*:+:-:/:^:Data.UnitsOfMeasure.Internal*:+:-:/::/ ^:~~urldisp-happstackHappstack.UrlDisp|. |/ |// |? |\ |\\ urlencodedData.URLEncoded%!%&%=%=?%?utilUtil!!? & &=&*=*<&&><|<||><₪>onnonnn|>₪∈∉∘ ∘∘ Util.Bits.&¬ util-logictUtil.Monad.Logic.Class<~>><\/ utility-htControl.Monad.HT<=< Data.Bits.HT.<<..>>. Data.Bool.HT?:implies Data.Maybe.HT?->Data.Monoid.HT<> Text.Read.HT.> uu-cco CCO.Parsing CCO.Printing>#< >-< >//< >^< >|< uu-interleavedControl.Applicative.Interleaved<<||><><||> uu-parsinglibText.ParserCombinators.UU.Core<<|>opt'Text.ParserCombinators.UU.Demo.Examples<++> !Text.ParserCombinators.UU.Derived<$$> <..> <.> uu-tcParseLib.Abstract.Core<$><*><<|><|>>>=ParseLib.Abstract.Derived*><$<*ParseLib.Parallel.Core<$><*><<|><|>>>=ParseLib.Parallel.Derived*><$<*ParseLib.Simple.Core<$><*><<|><|>>>=ParseLib.Simple.Derived*><$<*uuagc-diagramsUU.UUAGC.Diagrams#uulib UU.PPrint<$$><$><+><>UU.Parsing.Derived<$$> <**><+><..>optUU.Parsing.Interface*><$<$><*<*><|>UU.Parsing.Merge<||> UU.Parsing.Perms~$~ ~*~ UU.Pretty.Basic>-<>//<>>$<>>$<<>>-<<>>//<<>>|<<>|< UU.Pretty.Ext>#<>-<<>>#<<>>-<>>^<<>>|<>^<>|<<UU.Util.PermTree<$$> <$?> <|?> <||> uusiDistribution.Uusi.Lens<&>Distribution.Uusi.Utils<||>uvectorData.Array.Vector:*: vacuum GHC.Vacuum.Q! != .= validaValida-?>Valida.Combinators valida-baseValida-?>Valida.Combinatorsvalidate-inputData.Validator<=<>=>validity Data.Validity<>varData.Tuple.ITuple:* :| variable-precision$Numeric.VariablePrecision.Algorithms=~= Numeric.VariablePrecision.Float-@? #Numeric.VariablePrecision.Precision.@ .@~ )Numeric.VariablePrecision.Precision.Reify.@$ variadicControl.Variadic...*> ...>>= <$>... <*... =<<... Control.Variadic.VarargsConsvaryingControl.Varying.Core<<<>>>vecData.Vec.DataFamily.SpineStrict! ++::: Data.Vec.Lazy! ++:::Data.Vec.Lazy.Inline! ++::: Data.Vec.Pull! vectData.Vect.Double.Base &! &* &+ &- &. &^ *& *. .* .*. Data.Vect.Float.Base &! &* &+ &- &. &^ *& *. .* .*. vect-floatingData.Vect.Floating.Base &! &* &+ &- &. &^ *& *. .* .*. vector Data.Vector! !? ++// elemnotElemData.Vector.Fusion.Bundle!! !? ++elemnotElem!Data.Vector.Fusion.Bundle.Monadic!! !? ++elemnotElemData.Vector.Generic! !? ++// elemnotElemData.Vector.Primitive! !? ++// elemnotElemData.Vector.Storable! !? ++// elemnotElemData.Vector.Unboxed! !? ++// elemnotElemvector-circularData.Vector.Circular++ Data.Vector.Circular.Generic++ vector-endianData.Vector.Endian! !? vector-functorlazyData.Vector.FunctorLazy! !? ++ // vector-hashtablesData.Vector.Hashtables.Internal! !. !.~ !~ <~ <~~ vector-heterogenousData.Vector.Heterogenous.HList::: vector-sizedData.Vector.Generic.Sized++ // elemnotElemData.Vector.Primitive.Sized++ // elemnotElemData.Vector.Sized++ // elemnotElemData.Vector.Storable.Sized++ // elemnotElemData.Vector.Unboxed.Sized++ // elemnotElem vector-spaceData.AdditiveGroup^+^^-^Data.AffineSpace.+^.-..-^Data.LinearMap*.* :-*Data.Maclaurin<$>>>-<D Data.VectorSpace*^<.>^*^/vector-space-pointsData.AffineSpace.Point*. vector-staticData.Vector.Generic.Static! ++ Data.Vector.Static! ++ Data.Vector.Storable.Static! ++ Data.Vector.Unboxed.Static! ++ vector-streamData.Stream.Monadic!! !? ++elemnotElem vector-textData.Container.Vector! !! Data.Text32! !? ++// elemnotElemverifiable-expressionsLanguage.Expression^>>=Language.Expression.Example^+ ^== Language.Expression.Prop*&&*->*<->*||Language.Expression.Scope^>>>= Language.Expression.Util... Language.While.Syntax.Sugar .&&.<.<=.=..== .>.>=.||\\^^^verilogLanguage.Verilog.DSL<> verismithVerismith.ResultVerismith.Tool.InternalversetVerset6$$!$<$>&&&&&^ ****>+-. //=:|<<$<$!><$><&><*<**><*><<$>><<<<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>?:^^^divelemmodnotElemonquotremseq||||^ vformat Text.Format:=vgrepControl.Lens.Compat %=%~&&~*=+=+~-=-~.=.~//=<%=<%~<&><.=<<%=<<%~<<.=<<.~<>~: :>: :>=: Language.VHDL.Ppr$++$ <++> views Data.View<<< >>> vinyl Data.Vinyl::&Data.Vinyl.ARec.InternalarconsData.Vinyl.Core:&<+><<$>><<&>> <<*>>Data.Vinyl.Derived<<$$>> =:=:= Data.Vinyl.Functor:. Data.Vinyl.Notation:&<+><<$>><<&>> <<*>>Data.Vinyl.Recursive<+> <<$>> <<&>> <<*>> Data.Vinyl.XRec::& vinyl-plusData.Vinyl.Types:& vinyl-utilsData.Vinyl.Utils.Operator/$$/ /$/ \$$\ \$\ \&&\ \||\ vinyl-vectors+Data.Vector.Vinyl.Default.Empty.Monomorphic! !? ++ // vitrea Combinators%~.?.~>-?.^.vividVivid.ByteBeat&&& <<< >>> ||| Vivid.NoPluginsNoGlobalState& AddParams Vivid.SynthDef? Vivid.SynthDef.TypesafeArgs AddParams Vivid.UGens.Algebraic~*~**~+~-~/ voicebaseJson.ProgressTypes.:?? Json.SubmitMediaTypes.:?? Json.TranscriptTypes.:?? vp-treeData.VPTree.TestData.+. vt-utilsVtUtils.Prelude! $$!&&*+-. .&..=.|.//=<<$><*><=<><|>==>>=>>>>=divmod||vtyGraphics.Vty.Image<-><|>vty-uiGraphics.Vty.Widgets.Box<++> <--> Graphics.Vty.Widgets.Core<~ <~~ Graphics.Vty.Widgets.Padding+++ Graphics.Vty.Widgets.Table.|. vulkanVulkan.CStruct.Extends:&::& vulkan-apiGraphics.Vulkan.Marshal.Create&* vulkan-utilsVulkan.Utils.Misc.&&. wahsp Web.Audio.|..||.wai-app-file-cgiNetwork.Wai.Application.Classic<.>  <\> wai-middleware-preprocessor#Network.Wai.Middleware.Preprocessor<|> >-> wai-middleware-staticNetwork.Wai.Middleware.Static<|>>->wai-middleware-static-caching%Network.Wai.Middleware.Static.Caching<|> >-> wai-predicatesData.Predicate# .&..|.:::|||Network.Wai.Predicate.Utility&wai-request-specNetwork.Wai.RequestSpec Network.Wai.RequestSpec.Parser wai-routeNetwork.Wai.Route.&../:::=~= waitfreeControl.Concurrent.Waitfree-*- wakame Wakame.Row:* wallpaper Complextra.*^wasmLanguage.Wasm.Builder.= web-inv-routeWeb.Route.Invertible!:?Web.Route.Invertible.Common:? RouteAction web-routingNetwork.Routing+| Network.Routing.Dict:= web3-ethereum+Network.Ethereum.Contract.Event.MultiFilter:&:? web3-solidityData.Solidity.Event.Internal:<webcrankWebcrank.Internal.DecisionCore<%%= webcrank-dispatchWebcrank.Dispatch ==> webdriverTest.WebDriver.Commands<==>Test.WebDriver.JSON!: .:?? webdriver-snoyTest.WebDriver.Commands <==> Test.WebDriver.Commands.Wait<&&> <||> Test.WebDriver.JSON!: weekdazeWeekDaze.Colour.RGB>+<9WeekDaze.ExecutionConfiguration.TimetableBreederFecundity>*<weighted-regexp Text.RegExp=~ welford-online-mean-variance+Statistics.Sample.WelfordOnlineMeanVariancedivide divideIntminusmultiplypluswhat4Test.Verification==>What4.Protocol.SMTLib2.Syntax./ What4.Protocol.SMTWriter.&&./=.<.<=.==.>.>=.||What4.Utils.Complex:+whim Whim.Util+: -: wild-bindWildBind.Bindingasrunwinery Codec.WineryextractConstructorextractConstructorBywith Data.With:&: witherableData.Witherable<$?><&?> Witherable<$?><&?>witness)Data.Type.Witness.General.TestHetEquality:~~:"Data.Type.Witness.Specific.Natural*+-<=DivMod^wizardWizardWizardT wizardsSystem.Console.Wizard:+: System.Console.Wizard.Internal:+: wl-pprintText.PrettyPrint.Leijen<$$><$><+><>wl-pprint-annotatedText.PrettyPrint.Annotated.WL<##><#><+><>wl-pprint-extrasText.PrettyPrint.Free<+>   <> Text.PrettyPrint.Free.Internal<+>   <> wl-pprint-textText.PrettyPrint.Leijen.Text<$$><$><++><+>beside$Text.PrettyPrint.Leijen.Text.Monadic<$$><$><++><+>besidewootData.Woot.WString!? wordpass Text.WordPass||| world-peaceData.WorldPeace.Internal.Prism<>~ worldturtleGraphics.WorldTurtle>!>>/>wreq Network.Wreq:=Network.Wreq.Types:=wreq-patchable Network.Wreq:=Network.Wreq.Types:=wreq-sb Network.Wreq:= Network.Wreq.Types:= wumpus-basicWumpus.Basic.Utils.JoinList:< :> $Wumpus.Basic.Utils.ParserCombinators wumpus-coreWumpus.Core.Geometry*# wumpus-drawingWumpus.Drawing.Paths.Base:<< :>> $Wumpus.Drawing.Text.Base.DocTextZero<+> wxGraphics.UI.WX.Attributes::= ::~ := :~ Graphics.UI.WX.Types#.+..-.wxcoreGraphics.UI.WXCore.Types#.+..-.xformatText.XFormat.Read% :%: Text.XFormat.Show% :%: <> xhtmlText.XHtml.Frameset! +++<<Text.XHtml.Strict! +++<<Text.XHtml.Table<->Text.XHtml.Transitional! +++<< xilinx-lavaLava->- >-> >=> >|> xlsxCodec.Xlsx.Writer.Internal.= .=? xlsx-tabularCodec.Xlsx.Util.Tabular.Imports &.: .=.~<$><*>?~^.^? xml-conduitText.XML.Cursor $.//$/$//$|&.//&/&//&|>=>Text.XML.Cursor.Generic $.//$/$//$|&.//&/&//&|>=>xml-conduit-decodeText.XML.Decode.HCursor$/$//%/%//&/&//*** ||| xml-conduit-selectorsText.XML.Selectors<||>Text.XML.Selectors.Types<||>xml-conduit-writerText.XML.Writer!: xml-enumeratorText.XML.Cursor $.// $/ $// $| &.// &/ &// &| >=> Text.XML.Cursor.Generic $.// $/ $// $| &.// &/ &// &| >=> xml-indexed-cursorText.XML.Cursor.Indexed $.//$/$//$|&.//&/&//&|>=> xml-isogenData.THGen.XML!!%&*+=:=??%xml-lens Text.XML.Lens... xml-opticsText.XML.Optics./ .// xml-picklersData.XML.Pickle<#> <++>    xmlgenText.XML.Generator<#><>xmonadXMonad.|. XMonad.Layout|||XMonad.ManageHook--><&&><+> <||>=? xmonad-bluetilebranchXMonad.|. XMonad.Layout||| XMonad.ManageHook--> <&&> <+> <||> =? xmonad-contribXMonad.Actions.CycleWS:&: :|: XMonad.Actions.RepeatActionrememberActionsXMonad.Actions.Search!>XMonad.Actions.TopicSpace>*> XMonad.Config.Prime.!! $$!&&****>+++---> . .|.//=<<$<$><&&> <*<*><+> <=<><||> =+=-=. =: =<<===? >>=>> >>=^^^divelemnotElemquotremseq||||| XMonad.Hooks.ManageHelpers $? -->>-?>-?>>/=? =>XMonad.Util.Loggers.| XMonad.Util.NamedActions^++^ XMonad.Util.PureX&>-$>->XMonad.Util.WindowPropertiesAnd Orxmonad-contrib-bluetilebranch XMonad.Actions.Search!> XMonad.Actions.TopicSpace>*> XMonad.Hooks.ManageHelpers-->> -?> -?>> /=? => XMonad.Util.Loggers<$> XMonad.Util.NamedActions^++^ xmonad-extrasXMonad.Util.WindowPropertiesRE~? xournal-builderText.Xournal.Builder<> xournal-render#Graphics.Xournal.Render.Type.Hitted:- xsactIndexed?? yak Network.Yak<:>Network.Yak.Types<:>yall Data.Yall.Iso$- -$ Data.Yall.Lens^$ ^>>= ||| yamYam:.yam-app Yam.Import<>yaml Data.Yaml.!= .: .:? .=Data.Yaml.Builder.= Data.Yaml.Parser.: Data.Yaml.TH.!= .: .:? .= yaml-streamly Data.Yaml.!= .: .:? .=Data.Yaml.Builder.= Data.Yaml.Parser.: Data.Yaml.TH.!= .: .:? .=yamlparse-applicativeYamlParse.Applicative  YamlParse.Applicative.Parser  yaopSystem.Console.YAOP=: yapData.YAP.Algebra* / Data.YAP.Complex:+ Data.YAP.Ratio% Prelude.YAP^ ^^ yarlData.Records.Yarl.LinkedList:> yarn-lockData.MultiKeyedMap! yarn2nixNix.Expr.Additions!!.$$=yeamerPresentation.Yeamer #%$<>======→│ →│← →│→ ↘── ↘──↖ ↘──↘ ──↖│←Presentation.Yeamer.Mathsd%$> &&~! &~: &~? &~~! &~~: *..* +..+ -\- -→ ... /⊂ <.< <.≤ <== <=> <،> ==> =→ =⸪ >$ |-> |◝ |◞ |◞◝ ° ± × ، ،..، ⁀ ₌₌ ←- ←= ↦ ↪ ∀: ∃: ∄: ∈ ∉ ∋ ∌ ∏ ∑ ∓ ∖ ∗ ∘ ∝ ∥ ∧ ∨ ∩ ∪ ∫ ∼ ≃ ≅ ≈ ≠ ≡ ≤ ≤.< ≤.≤ ≥ ≪ ≫ ⊂ ⊃ ⊆ ⊇ ⊎ ⊕ ⊗ ⋂ ⋃ ⋆ ␣ ◝ ◝⁀ ◞ ◞∏ ◞∑ ◞∫ ◞∮ ◞⋂ ◞⋃ ◞◝ ◞⨄ ⟂ ⧵ ⨄ ⩵ ⩵! ⪡ ⪢ ⸪ ⸪= 6Presentation.Yeamer.Maths.Unicode.MathLatin_RomanGreekx#%$<> %$> &&~! &~: &~? &~~! &~~: *..* +..+ -\- -→ ... /⊂ <.< <.≤ <== <=> <><،> === ========> =→ =⸪ >$ |-> ||| |◝ |◞ |◞◝ ° ± × ، ،..، ⁀ ₌₌ ←- ←= →│ →│← →│→ ↘── ↘──↖ ↘──↘↦ ↪ ∀: ∃: ∄: ∈ ∉ ∋ ∌ ∏ ∑ ∓ ∖ ∗ ∘ ∝ ∥ ∧ ∨ ∩ ∪ ∫ ∼ ≃ ≅ ≈ ≠ ≡ ≤ ≤.< ≤.≤ ≥ ≪ ≫ ⊂ ⊃ ⊆ ⊇ ⊎ ⊕ ⊗ ⋂ ⋃ ⋆ ␣ ── ──↖━━ │ │←┃ ██ ■ ◝ ◝⁀ ◞ ◞∏ ◞∑ ◞∫ ◞∮ ◞⋂ ◞⋃ ◞◝ ◞⨄ ⟂ ⧵ ⨄ ⩵ ⩵! ⪡ ⪢ ⸪ ⸪= yesod-auth-oauth2Yesod.Auth.OAuth2.Prelude.: .:? .=<> yesod-coreYesod.Core.Handler:#: Yesod.Core.Json.: .=yesod-paginatorYesod.Paginator.Prelude'!! $$!&&****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq|| yggdrasilYggdrasil.HList+++ yhccoreYhc.Core.Internal.HughesPJ$$ $+$ <+> <> yi Yi.Interact<||||> Yi.Keymap.Keys>>!>>=!?*>>?*>>!?>>?>>! Yi.Snippets&&> yi-core Yi.Interact<||||> Yi.Keymap.Keys<||>>!>>=!?*>>?*>>!?>>?>>!||> yi-language Yi.Lexer.Alex+~ ~- Yi.Regex=~ Yi.Utils+~ -~ ~- yicesMath.SMT.Yices.Syntax :*: :+: :-: :/: :/= :< :<= := :=> :> :>= yjtoolsControl.Applicative.Tools<.> Data.Bool.Tools&&& ||| yoko Data.YokoRaw.|. .|| :*: ||. ||| york-lavaLava.Bit:-> <#> <&> <=> <|> >< Lava.JList:+: Lava.Prelude=/= === ? |<=| |<| |>=| |>| Lava.Vector+> <+ <++> Recipe! --> <== |> yu-coreYu.Core.Model.Internal=@yu-utilsYu.Utils.Handler<#><%>yuiGrid Text.CxML! +++ /- ^# ^% ^. ^^. z3Z3.Opts+? zeolite-langBase.CompilerError!!>Base.Mergeable<&&><||>zephyr-copilotCopilot.Zephyr,!! # $$!&&****>+++-. .!! .&..<<. .>>. .^. .|.//= < <$<$><*<*><= <>=:=<<== ==> > >= >>>>=@: ^ ^^elemnotElemquotremseq|| zettelkast Data.Path./ zio ZIO.Trans<$<$!><=<=<<>=>>>>>=zipeditSystem.Console.ZipEdit?? zippersControl.Zipper:>:>>:@ Control.Zipper.Internal:>:>>:@ zreNetwork.ZRE.Lib==> zsyntax$Zsyntax.Labelled.Rule.BipoleRelation::: ormolu-0.7.2.0/ormolu.cabal0000644000000000000000000001324707346545000013674 0ustar0000000000000000cabal-version: 2.4 name: ormolu version: 0.7.2.0 license: BSD-3-Clause license-file: LICENSE.md maintainer: Mark Karpov tested-with: ghc ==9.2.8 ghc ==9.4.5 ghc ==9.6.2 homepage: https://github.com/tweag/ormolu bug-reports: https://github.com/tweag/ormolu/issues synopsis: A formatter for Haskell source code description: A formatter for Haskell source code. category: Development, Formatting build-type: Simple extra-source-files: data/**/*.hs data/**/*.txt data/**/*.cabal extract-hackage-info/hackage-info.bin extra-doc-files: CONTRIBUTING.md CHANGELOG.md DESIGN.md README.md source-repository head type: git location: https://github.com/tweag/ormolu.git flag dev description: Turn on development settings. default: False manual: True flag internal-bundle-fixities description: An internal ad-hoc flag that is enabled by default, Ormolu Live disables it due to missing WASM TH support. manual: True library exposed-modules: Ormolu Ormolu.Config Ormolu.Diff.ParseResult Ormolu.Diff.Text Ormolu.Exception Ormolu.Imports Ormolu.Parser Ormolu.Parser.CommentStream Ormolu.Parser.Pragma Ormolu.Parser.Result Ormolu.Printer Ormolu.Printer.Combinators Ormolu.Printer.Comments Ormolu.Printer.Internal Ormolu.Printer.Meat.Common Ormolu.Printer.Meat.Declaration Ormolu.Printer.Meat.Declaration.Annotation Ormolu.Printer.Meat.Declaration.Class Ormolu.Printer.Meat.Declaration.Data Ormolu.Printer.Meat.Declaration.Default Ormolu.Printer.Meat.Declaration.Foreign Ormolu.Printer.Meat.Declaration.Instance Ormolu.Printer.Meat.Declaration.RoleAnnotation Ormolu.Printer.Meat.Declaration.Rule Ormolu.Printer.Meat.Declaration.Signature Ormolu.Printer.Meat.Declaration.Splice Ormolu.Printer.Meat.Declaration.Type Ormolu.Printer.Meat.Declaration.TypeFamily Ormolu.Printer.Meat.Declaration.Value Ormolu.Printer.Meat.Declaration.OpTree Ormolu.Printer.Meat.Declaration.Warning Ormolu.Printer.Meat.ImportExport Ormolu.Printer.Meat.Module Ormolu.Printer.Meat.Pragma Ormolu.Printer.Meat.Type Ormolu.Printer.Operators Ormolu.Fixity Ormolu.Fixity.Imports Ormolu.Fixity.Internal Ormolu.Fixity.Parser Ormolu.Fixity.Printer Ormolu.Printer.SpanStream Ormolu.Processing.Common Ormolu.Processing.Cpp Ormolu.Processing.Preprocess Ormolu.Terminal Ormolu.Terminal.QualifiedDo Ormolu.Utils Ormolu.Utils.Cabal Ormolu.Utils.Fixity Ormolu.Utils.IO hs-source-dirs: src other-modules: GHC.DynFlags default-language: GHC2021 build-depends: Cabal-syntax >=3.10 && <3.11, Diff >=0.4 && <1.0, MemoTrie >=0.6 && <0.7, ansi-terminal >=0.10 && <1.1, array >=0.5 && <0.6, base >=4.14 && <5.0, binary >=0.8 && <0.9, bytestring >=0.2 && <0.13, containers >=0.5 && <0.7, deepseq >=1.4 && <1.6, directory ^>=1.3, file-embed >=0.0.15 && <0.1, filepath >=1.2 && <1.5, ghc-lib-parser >=9.6 && <9.7, megaparsec >=9.0, mtl >=2.0 && <3.0, syb >=0.7 && <0.8, text >=2.0 && <3.0 if flag(dev) ghc-options: -Wall -Werror -Wredundant-constraints -Wpartial-fields -Wunused-packages else ghc-options: -O2 -Wall if flag(internal-bundle-fixities) cpp-options: -DBUNDLE_FIXITIES executable ormolu main-is: Main.hs hs-source-dirs: app other-modules: Paths_ormolu autogen-modules: Paths_ormolu default-language: GHC2021 build-depends: Cabal-syntax >=3.10 && <3.11, base >=4.12 && <5.0, containers >=0.5 && <0.7, directory ^>=1.3, filepath >=1.2 && <1.5, ghc-lib-parser >=9.6 && <9.7, optparse-applicative >=0.14 && <0.19, ormolu, text >=2.0 && <3.0, th-env >=0.1.1 && <0.2 if flag(dev) ghc-options: -Wall -Werror -Wredundant-constraints -Wpartial-fields -Wunused-packages -Wwarn=unused-packages else ghc-options: -O2 -Wall -rtsopts test-suite tests type: exitcode-stdio-1.0 main-is: Spec.hs build-tool-depends: hspec-discover:hspec-discover >=2.0 && <3.0 hs-source-dirs: tests other-modules: Ormolu.CabalInfoSpec Ormolu.Diff.TextSpec Ormolu.Fixity.ParserSpec Ormolu.Fixity.PrinterSpec Ormolu.FixitySpec Ormolu.OpTreeSpec Ormolu.Parser.OptionsSpec Ormolu.Parser.ParseFailureSpec Ormolu.Parser.PragmaSpec Ormolu.PrinterSpec default-language: GHC2021 build-depends: Cabal-syntax >=3.10 && <3.11, QuickCheck >=2.14, base >=4.14 && <5.0, containers >=0.5 && <0.7, directory ^>=1.3, filepath >=1.2 && <1.5, ghc-lib-parser >=9.6 && <9.7, hspec >=2.0 && <3.0, hspec-megaparsec >=2.2, megaparsec >=9.0, ormolu, path >=0.6 && <0.10, path-io >=1.4.2 && <2.0, temporary ^>=1.3, text >=2.0 && <3.0 if flag(dev) ghc-options: -Wall -Werror -Wredundant-constraints -Wpartial-fields -Wunused-packages else ghc-options: -O2 -Wall ormolu-0.7.2.0/src/GHC/0000755000000000000000000000000007346545000012554 5ustar0000000000000000ormolu-0.7.2.0/src/GHC/DynFlags.hs0000644000000000000000000000267607346545000014632 0ustar0000000000000000{-# OPTIONS_GHC -Wno-missing-fields #-} -- Modified from ghc-lib-api-ext. module GHC.DynFlags ( baseDynFlags, ) where import GHC.Driver.Session import GHC.Platform import GHC.Settings import GHC.Settings.Config import GHC.Utils.Fingerprint fakeSettings :: Settings fakeSettings = Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc", ghcNameVersion_projectVersion = cProjectVersion }, sFileSettings = FileSettings {}, sTargetPlatform = Platform { platformArchOS = ArchOS { archOS_arch = ArchUnknown, archOS_OS = OSUnknown }, platformWordSize = PW8, platformUnregisterised = True, platformByteOrder = LittleEndian, platformHasGnuNonexecStack = False, platformHasIdentDirective = False, platformHasSubsectionsViaSymbols = False, platformIsCrossCompiling = False, platformLeadingUnderscore = False, platformTablesNextToCode = False, platformHasLibm = False, platform_constants = Nothing }, sPlatformMisc = PlatformMisc {}, sToolSettings = ToolSettings { toolSettings_opt_P_fingerprint = fingerprint0, toolSettings_pgm_F = "" } } baseDynFlags :: DynFlags baseDynFlags = defaultDynFlags fakeSettings ormolu-0.7.2.0/src/0000755000000000000000000000000007346545000012153 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu.hs0000644000000000000000000002126407346545000013771 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | A formatter for Haskell source code. This module exposes the official -- stable API, other modules may be not as reliable. module Ormolu ( -- * Top-level formatting functions ormolu, ormoluFile, ormoluStdin, -- * Configuration Config (..), ColorMode (..), RegionIndices (..), SourceType (..), defaultConfig, detectSourceType, refineConfig, DynOption (..), -- * Cabal info CabalUtils.CabalSearchResult (..), CabalUtils.CabalInfo (..), CabalUtils.getCabalInfoForSourceFile, -- * Fixity overrides and module re-exports FixityOverrides, defaultFixityOverrides, ModuleReexports, defaultModuleReexports, getDotOrmoluForSourceFile, -- * Working with exceptions OrmoluException (..), withPrettyOrmoluExceptions, ) where import Control.Exception import Control.Monad import Control.Monad.IO.Class (MonadIO (..)) import Data.Map.Strict qualified as Map import Data.Maybe (fromMaybe) import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import Debug.Trace import GHC.Driver.CmdLine qualified as GHC import GHC.Types.SrcLoc import Ormolu.Config import Ormolu.Diff.ParseResult import Ormolu.Diff.Text import Ormolu.Exception import Ormolu.Fixity import Ormolu.Parser import Ormolu.Parser.CommentStream (CommentStream (..)) import Ormolu.Parser.Result import Ormolu.Printer import Ormolu.Utils (showOutputable) import Ormolu.Utils.Cabal qualified as CabalUtils import Ormolu.Utils.Fixity (getDotOrmoluForSourceFile) import Ormolu.Utils.IO import System.FilePath -- | Format a 'Text'. -- -- The function -- -- * Needs 'IO' because some functions from GHC that are necessary to -- setup parsing context require 'IO'. There should be no visible -- side-effects though. -- * Takes file name just to use it in parse error messages. -- * Throws 'OrmoluException'. -- -- __NOTE__: The caller is responsible for setting the appropriate value in -- the 'cfgSourceType' field. Autodetection of source type won't happen -- here, see 'detectSourceType'. ormolu :: (MonadIO m) => -- | Ormolu configuration Config RegionIndices -> -- | Location of source file FilePath -> -- | Input to format Text -> m Text ormolu cfgWithIndices path originalInput = do let totalLines = length (T.lines originalInput) cfg = regionIndicesToDeltas totalLines <$> cfgWithIndices fixityMap = packageFixityMap (overapproximatedDependencies cfg) -- memoized on the set of dependencies when (cfgDebug cfg) $ do traceM $ unwords ["*** CONFIG ***", show cfg] (warnings, result0) <- parseModule' cfg fixityMap OrmoluParsingFailed path originalInput when (cfgDebug cfg) $ do forM_ warnings $ \(GHC.Warn reason (L loc msg)) -> traceM $ unwords ["*** WARNING ***", showOutputable loc, msg, showOutputable reason] forM_ result0 $ \case ParsedSnippet r -> do let CommentStream comments = prCommentStream r forM_ comments $ \(L loc comment) -> traceM $ unwords ["*** COMMENT ***", showOutputable loc, show comment] _ -> pure () -- We're forcing 'formattedText' here because otherwise errors (such as -- messages about not-yet-supported functionality) will be thrown later -- when we try to parse the rendered code back, inside of GHC monad -- wrapper which will lead to error messages presenting the exceptions as -- GHC bugs. let !formattedText = printSnippets result0 when (not (cfgUnsafe cfg) || cfgCheckIdempotence cfg) $ do -- Parse the result of pretty-printing again and make sure that AST -- is the same as AST of original snippet module span positions. (_, result1) <- parseModule' cfg fixityMap OrmoluOutputParsingFailed path formattedText unless (cfgUnsafe cfg) . liftIO $ do let diff = case diffText originalInput formattedText path of Nothing -> error "AST differs, yet no changes have been introduced" Just x -> x when (length result0 /= length result1) $ throwIO (OrmoluASTDiffers diff []) forM_ (result0 `zip` result1) $ \case (ParsedSnippet s, ParsedSnippet s') -> case diffParseResult s s' of Same -> return () Different ss -> throwIO (OrmoluASTDiffers (selectSpans ss diff) ss) (RawSnippet {}, RawSnippet {}) -> pure () _ -> throwIO (OrmoluASTDiffers diff []) -- Try re-formatting the formatted result to check if we get exactly -- the same output. when (cfgCheckIdempotence cfg) . liftIO $ let reformattedText = printSnippets result1 in case diffText formattedText reformattedText path of Nothing -> return () Just diff -> throwIO (OrmoluNonIdempotentOutput diff) return formattedText -- | Load a file and format it. The file stays intact and the rendered -- version is returned as 'Text'. -- -- __NOTE__: The caller is responsible for setting the appropriate value in -- the 'cfgSourceType' field. Autodetection of source type won't happen -- here, see 'detectSourceType'. ormoluFile :: (MonadIO m) => -- | Ormolu configuration Config RegionIndices -> -- | Location of source file FilePath -> -- | Resulting rendition m Text ormoluFile cfg path = readFileUtf8 path >>= ormolu cfg path -- | Read input from stdin and format it. -- -- __NOTE__: The caller is responsible for setting the appropriate value in -- the 'cfgSourceType' field. Autodetection of source type won't happen -- here, see 'detectSourceType'. ormoluStdin :: (MonadIO m) => -- | Ormolu configuration Config RegionIndices -> -- | Resulting rendition m Text ormoluStdin cfg = getContentsUtf8 >>= ormolu cfg "" -- | Refine a 'Config' by incorporating given 'SourceType', 'CabalInfo', and -- fixity overrides 'FixityMap'. You can use 'detectSourceType' to deduce -- 'SourceType' based on the file extension, -- 'CabalUtils.getCabalInfoForSourceFile' to obtain 'CabalInfo' and -- 'getFixityOverridesForSourceFile' for 'FixityMap'. -- -- @since 0.5.3.0 refineConfig :: -- | Source type to use SourceType -> -- | Cabal info for the file, if available Maybe CabalUtils.CabalInfo -> -- | Fixity overrides, if available Maybe FixityOverrides -> -- | Module re-exports, if available Maybe ModuleReexports -> -- | 'Config' to refine Config region -> -- | Refined 'Config' Config region refineConfig sourceType mcabalInfo mfixityOverrides mreexports rawConfig = rawConfig { cfgDynOptions = cfgDynOptions rawConfig ++ dynOptsFromCabal, cfgFixityOverrides = FixityOverrides $ Map.unions [ unFixityOverrides fixityOverrides, unFixityOverrides (cfgFixityOverrides rawConfig), unFixityOverrides defaultFixityOverrides ], cfgModuleReexports = ModuleReexports $ Map.unionsWith (<>) [ unModuleReexports reexports, unModuleReexports (cfgModuleReexports rawConfig), unModuleReexports defaultModuleReexports ], cfgDependencies = Set.union (cfgDependencies rawConfig) depsFromCabal, cfgSourceType = sourceType } where fixityOverrides = fromMaybe defaultFixityOverrides mfixityOverrides reexports = fromMaybe defaultModuleReexports mreexports (dynOptsFromCabal, depsFromCabal) = case mcabalInfo of Nothing -> -- If no cabal info is provided, assume base as a dependency by -- default. ([], defaultDependencies) Just CabalUtils.CabalInfo {..} -> -- It makes sense to take into account the operator info for the -- package itself if we know it, as if it were its own dependency. (ciDynOpts, Set.insert ciPackageName ciDependencies) ---------------------------------------------------------------------------- -- Helpers -- | A wrapper around 'parseModule'. parseModule' :: (MonadIO m) => -- | Ormolu configuration Config RegionDeltas -> -- | Fixity Map for operators PackageFixityMap -> -- | How to obtain 'OrmoluException' to throw when parsing fails (SrcSpan -> String -> OrmoluException) -> -- | File name to use in errors FilePath -> -- | Actual input for the parser Text -> m ([GHC.Warn], [SourceSnippet]) parseModule' cfg fixityMap mkException path str = do (warnings, r) <- parseModule cfg fixityMap path str case r of Left (spn, err) -> liftIO $ throwIO (mkException spn err) Right x -> return (warnings, x) -- | Detect 'SourceType' based on the file extension. detectSourceType :: FilePath -> SourceType detectSourceType mpath = if takeExtension mpath == ".hsig" then SignatureSource else ModuleSource ormolu-0.7.2.0/src/Ormolu/0000755000000000000000000000000007346545000013430 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Config.hs0000644000000000000000000001026207346545000015172 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | Configuration options used by the tool. module Ormolu.Config ( Config (..), ColorMode (..), RegionIndices (..), RegionDeltas (..), SourceType (..), defaultConfig, overapproximatedDependencies, regionIndicesToDeltas, DynOption (..), dynOptionToLocatedStr, ) where import Data.Map.Strict qualified as Map import Data.Set (Set) import Data.Set qualified as Set import Distribution.Types.PackageName (PackageName) import GHC.Generics (Generic) import GHC.Types.SrcLoc qualified as GHC import Ormolu.Fixity import Ormolu.Terminal (ColorMode (..)) -- | Type of sources that can be formatted by Ormolu. data SourceType = -- | Consider the input as a regular Haskell module ModuleSource | -- | Consider the input as a Backpack module signature SignatureSource deriving (Eq, Show) -- | Ormolu configuration. data Config region = Config { -- | Dynamic options to pass to GHC parser cfgDynOptions :: ![DynOption], -- | Fixity overrides cfgFixityOverrides :: !FixityOverrides, -- | Module reexports to take into account when doing fixity resolution cfgModuleReexports :: !ModuleReexports, -- | Known dependencies, if any cfgDependencies :: !(Set PackageName), -- | Do formatting faster but without automatic detection of defects cfgUnsafe :: !Bool, -- | Output information useful for debugging cfgDebug :: !Bool, -- | Checks if re-formatting the result is idempotent cfgCheckIdempotence :: !Bool, -- | How to parse the input (regular haskell module or Backpack file) cfgSourceType :: !SourceType, -- | Whether to use colors and other features of ANSI terminals cfgColorMode :: !ColorMode, -- | Region selection cfgRegion :: !region } deriving (Eq, Show, Functor, Generic) -- | Region selection as the combination of start and end line numbers. data RegionIndices = RegionIndices { -- | Start line of the region to format regionStartLine :: !(Maybe Int), -- | End line of the region to format regionEndLine :: !(Maybe Int) } deriving (Eq, Show) -- | Region selection as the length of the literal prefix and the literal -- suffix. data RegionDeltas = RegionDeltas { -- | Prefix length in number of lines regionPrefixLength :: !Int, -- | Suffix length in number of lines regionSuffixLength :: !Int } deriving (Eq, Show) -- | Default @'Config' 'RegionIndices'@. defaultConfig :: Config RegionIndices defaultConfig = Config { cfgDynOptions = [], cfgFixityOverrides = defaultFixityOverrides, cfgModuleReexports = defaultModuleReexports, cfgDependencies = Set.empty, cfgUnsafe = False, cfgDebug = False, cfgCheckIdempotence = False, cfgSourceType = ModuleSource, cfgColorMode = Auto, cfgRegion = RegionIndices { regionStartLine = Nothing, regionEndLine = Nothing } } -- | Return all dependencies of the module. This includes both the declared -- dependencies of the component we are working with and all potential -- module re-export targets. overapproximatedDependencies :: Config region -> Set PackageName overapproximatedDependencies Config {..} = Set.union cfgDependencies potentialReexportTargets where potentialReexportTargets = Set.fromList . concatMap toTargetPackages $ Map.elems (unModuleReexports cfgModuleReexports) toTargetPackages = concatMap $ \case (Nothing, _) -> [] (Just x, _) -> [x] -- | Convert 'RegionIndices' into 'RegionDeltas'. regionIndicesToDeltas :: -- | Total number of lines in the input Int -> -- | Region indices RegionIndices -> -- | Region deltas RegionDeltas regionIndicesToDeltas total RegionIndices {..} = RegionDeltas { regionPrefixLength = maybe 0 (subtract 1) regionStartLine, regionSuffixLength = maybe 0 (total -) regionEndLine } -- | A wrapper for dynamic options. newtype DynOption = DynOption { unDynOption :: String } deriving (Eq, Ord, Show) -- | Convert 'DynOption' to @'GHC.Located' 'String'@. dynOptionToLocatedStr :: DynOption -> GHC.Located String dynOptionToLocatedStr (DynOption o) = GHC.L GHC.noSrcSpan o ormolu-0.7.2.0/src/Ormolu/Diff/0000755000000000000000000000000007346545000014300 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Diff/ParseResult.hs0000644000000000000000000001225407346545000017111 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeepSubsumption #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | This module allows us to diff two 'ParseResult's. module Ormolu.Diff.ParseResult ( ParseResultDiff (..), diffParseResult, ) where import Data.ByteString (ByteString) import Data.Foldable import Data.Function import Data.Generics import GHC.Hs import GHC.Types.SourceText import GHC.Types.SrcLoc import Ormolu.Parser.CommentStream import Ormolu.Parser.Result import Ormolu.Utils -- | Result of comparing two 'ParseResult's. data ParseResultDiff = -- | Two parse results are the same Same | -- | Two parse results differ Different [RealSrcSpan] deriving (Show) instance Semigroup ParseResultDiff where Same <> a = a a <> Same = a Different xs <> Different ys = Different (xs ++ ys) instance Monoid ParseResultDiff where mempty = Same -- | Return 'Diff' of two 'ParseResult's. diffParseResult :: ParseResult -> ParseResult -> ParseResultDiff diffParseResult ParseResult { prCommentStream = cstream0, prParsedSource = hs0 } ParseResult { prCommentStream = cstream1, prParsedSource = hs1 } = diffCommentStream cstream0 cstream1 <> diffHsModule hs0 hs1 diffCommentStream :: CommentStream -> CommentStream -> ParseResultDiff diffCommentStream (CommentStream cs) (CommentStream cs') | commentLines cs == commentLines cs' = Same | otherwise = Different [] where commentLines = concatMap (toList . unComment . unLoc) -- | Compare two modules for equality disregarding the following aspects: -- -- * 'SrcSpan's -- * ordering of import lists -- * style (ASCII vs Unicode) of arrows, colons -- * LayoutInfo (brace style) in extension fields -- * Empty contexts in type classes -- * Parens around derived type classes -- * 'TokenLocation' (in 'LHsToken'/'LHsUniToken') -- * 'EpaLocation' diffHsModule :: HsModule GhcPs -> HsModule GhcPs -> ParseResultDiff diffHsModule = genericQuery where genericQuery :: GenericQ (GenericQ ParseResultDiff) genericQuery x y -- 'ByteString' implements 'Data' instance manually and does not -- implement 'toConstr', so we have to deal with it in a special way. | Just x' <- cast x, Just y' <- cast y = if x' == (y' :: ByteString) then Same else Different [] | typeOf x == typeOf y, toConstr x == toConstr y = mconcat $ gzipWithQ ( genericQuery `extQ` considerEqual @SrcSpan `ext1Q` epAnnEq `extQ` considerEqual @SourceText `extQ` hsDocStringEq `extQ` importDeclQualifiedStyleEq `extQ` considerEqual @(LayoutInfo GhcPs) `extQ` classDeclCtxEq `extQ` derivedTyClsParensEq `extQ` considerEqual @EpAnnComments -- ~ XCGRHSs GhcPs `extQ` considerEqual @TokenLocation -- in LHs(Uni)Token `extQ` considerEqual @EpaLocation `ext2Q` forLocated -- unicode-related `extQ` considerEqual @(HsUniToken "->" "→") `extQ` considerEqual @(HsUniToken "::" "∷") `extQ` considerEqual @(HsLinearArrowTokens GhcPs) ) x y | otherwise = Different [] considerEqualVia :: forall a. (Typeable a) => (a -> a -> ParseResultDiff) -> a -> GenericQ ParseResultDiff considerEqualVia f x (cast -> Just x') = f x x' considerEqualVia _ _ _ = Different [] considerEqualVia' f = considerEqualVia $ \x x' -> if f x x' then Same else Different [] considerEqual :: forall a. (Typeable a) => a -> GenericQ ParseResultDiff considerEqual = considerEqualVia $ \_ _ -> Same epAnnEq :: EpAnn a -> b -> ParseResultDiff epAnnEq _ _ = Same importDeclQualifiedStyleEq = considerEqualVia' f where f QualifiedPre QualifiedPost = True f QualifiedPost QualifiedPre = True f x x' = x == x' hsDocStringEq :: HsDocString -> GenericQ ParseResultDiff hsDocStringEq = considerEqualVia' ((==) `on` splitDocString) forLocated :: (Data e0, Data e1) => GenLocated e0 e1 -> GenericQ ParseResultDiff forLocated x@(L mspn _) y = maybe id appendSpan (cast `ext1Q` (Just . locA) $ mspn) (genericQuery x y) appendSpan :: SrcSpan -> ParseResultDiff -> ParseResultDiff appendSpan s' d@(Different ss) = case s' of RealSrcSpan s _ -> if not $ any (`isRealSubspanOf` s) ss then Different (s : ss) else d UnhelpfulSpan _ -> d appendSpan _ d = d classDeclCtxEq :: TyClDecl GhcPs -> GenericQ ParseResultDiff classDeclCtxEq ClassDecl {tcdCtxt = Just (L _ []), ..} tc' = genericQuery ClassDecl {tcdCtxt = Nothing, ..} tc' classDeclCtxEq tc tc' = genericQuery tc tc' derivedTyClsParensEq :: DerivClauseTys GhcPs -> GenericQ ParseResultDiff derivedTyClsParensEq (DctSingle NoExtField sigTy) dct' = genericQuery (DctMulti NoExtField [sigTy]) dct' derivedTyClsParensEq dct dct' = genericQuery dct dct' ormolu-0.7.2.0/src/Ormolu/Diff/Text.hs0000644000000000000000000002310607346545000015562 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QualifiedDo #-} {-# LANGUAGE RecordWildCards #-} -- | This module allows us to diff two 'Text' values. module Ormolu.Diff.Text ( TextDiff, diffText, selectSpans, printTextDiff, ) where import Control.Monad (unless, when) import Data.Algorithm.Diff qualified as D import Data.Foldable (for_) import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.List (foldl') import Data.Maybe (listToMaybe) import Data.Text (Text) import Data.Text qualified as T import GHC.Types.SrcLoc import Ormolu.Terminal import Ormolu.Terminal.QualifiedDo qualified as Term ---------------------------------------------------------------------------- -- Types -- | Result of diffing two 'Text's. data TextDiff = TextDiff { -- | Path to the file that is being diffed textDiffPath :: FilePath, -- | The list of differences textDiffDiffList :: DiffList, -- | Selected lines. Only hunks that contain selected lines will be -- displayed, unless 'textDiffSelectedLines' is empty, in which case the -- whole diff will be displayed. textDiffSelectedLines :: IntSet } deriving (Eq, Show) -- | List of lines tagged by 'D.Both', 'D.First', or 'D.Second'. type DiffList = [D.Diff [Text]] -- | Similar to 'DiffList', but with line numbers assigned. type DiffList' = [D.Diff [(Int, Int, Text)]] -- | Diff hunk. data Hunk = Hunk { hunkFirstStartLine :: Int, hunkFirstLength :: Int, hunkSecondStartLine :: Int, hunkSecondLength :: Int, hunkDiff :: DiffList } deriving (Show) ---------------------------------------------------------------------------- -- API -- | Diff two texts and produce a 'TextDiff'. diffText :: -- | Text before Text -> -- | Text after Text -> -- | Path to use FilePath -> -- | The resulting diff or 'Nothing' if the inputs are identical Maybe TextDiff diffText a b path = if all isBoth xs then Nothing else Just TextDiff { textDiffPath = path, textDiffDiffList = xs, textDiffSelectedLines = IntSet.empty } where xs = D.getGroupedDiff (lines' a) (lines' b) isBoth = \case D.Both _ _ -> True D.First _ -> False D.Second _ -> False -- T.lines ignores trailing blank lines lines' = T.splitOn "\n" -- | Select certain spans in the diff (line numbers are interpreted as -- belonging to the “before” state). Only selected spans will be printed. selectSpans :: [RealSrcSpan] -> TextDiff -> TextDiff selectSpans ss textDiff = textDiff {textDiffSelectedLines = xs} where xs = foldl' addOneSpan (textDiffSelectedLines textDiff) ss addOneSpan linesSoFar s = let start = srcSpanStartLine s end = srcSpanEndLine s in IntSet.union linesSoFar (IntSet.fromAscList [start .. end]) -- | Print the given 'TextDiff' as a 'Term' action. This function tries to -- mimic the style of @git diff@. printTextDiff :: TextDiff -> Term printTextDiff TextDiff {..} = Term.do (bold . put . T.pack) textDiffPath newline for_ (toHunks (assignLines textDiffDiffList)) $ \hunk@Hunk {..} -> when (isSelectedLine textDiffSelectedLines hunk) $ Term.do cyan $ Term.do put "@@ -" putShow hunkFirstStartLine put "," putShow hunkFirstLength put " +" putShow hunkSecondStartLine put "," putShow hunkSecondLength put " @@" newline for_ hunkDiff $ \case D.Both ys _ -> for_ ys $ \y -> Term.do unless (T.null y) $ put " " put y newline D.First ys -> for_ ys $ \y -> red $ Term.do put "-" unless (T.null y) $ put " " put y newline D.Second ys -> for_ ys $ \y -> green $ Term.do put "+" unless (T.null y) $ put " " put y newline ---------------------------------------------------------------------------- -- Helpers -- | Assign lines to a 'DiffList'. assignLines :: DiffList -> DiffList' assignLines = go 1 1 id where go _ _ acc [] = acc [] go !firstLine !secondLine acc (x : xs) = case x of D.Both a b -> let firstInc = length a secondInc = length b a' = zip3 (iterate (+ 1) firstLine) (iterate (+ 1) secondLine) a in go (firstLine + firstInc) (secondLine + secondInc) (acc . (D.Both a' a' :)) xs D.First a -> let firstInc = length a a' = zip3 (iterate (+ 1) firstLine) (repeat secondLine) a in go (firstLine + firstInc) secondLine (acc . (D.First a' :)) xs D.Second b -> let secondInc = length b b' = zip3 (repeat firstLine) (iterate (+ 1) secondLine) b in go firstLine (secondLine + secondInc) (acc . (D.Second b' :)) xs -- | Form 'Hunk's from a 'DiffList''. toHunks :: DiffList' -> [Hunk] toHunks = go 0 False id id [] where -- How many lines of context (that is, lines present in both texts) to -- show per hunk. margin = 3 go :: Int -> Bool -> ([Hunk] -> [Hunk]) -> (DiffList' -> DiffList') -> [(Int, Int, Text)] -> DiffList' -> [Hunk] go !n gotChanges hunksAcc currentAcc bothHistory = \case [] -> if gotChanges then let currentAcc' = addBothAfter p currentAcc p = take margin (reverse bothHistory) in case formHunk (currentAcc' []) of Nothing -> hunksAcc [] Just hunk -> hunksAcc [hunk] else hunksAcc [] (x : xs) -> case x of D.Both a _ -> let currentAcc' = addBothAfter p currentAcc p = reverse (drop (n' - margin) bothHistory') hunksAcc' = case formHunk (currentAcc' []) of Nothing -> hunksAcc Just hunk -> hunksAcc . (hunk :) bothHistory' = reverse a ++ bothHistory lena = length a n' = n + lena in if gotChanges && n' > margin * 2 then go 0 False hunksAcc' id bothHistory' xs else go n' gotChanges hunksAcc currentAcc bothHistory' xs piece -> if gotChanges then let currentAcc' = currentAcc . addBothBefore p (piece :) p = reverse bothHistory in go 0 True hunksAcc currentAcc' [] xs else let currentAcc' = addBothBefore p (piece :) p = reverse (take margin bothHistory) in go 0 True hunksAcc currentAcc' [] xs addBothBefore [] acc = acc addBothBefore p acc = (D.Both p p :) . acc addBothAfter [] acc = acc addBothAfter p acc = acc . (D.Both p p :) -- | Form a 'Hunk'. formHunk :: DiffList' -> Maybe Hunk formHunk xsRaw = do let xs = trimEmpty xsRaw hunkFirstStartLine <- listToMaybe xs >>= firstStartLine let hunkFirstLength = firstLength xs hunkSecondStartLine <- listToMaybe xs >>= secondStartLine let hunkSecondLength = secondLength xs hunkDiff = mapDiff (fmap third) xs return Hunk {..} -- | Trim empty “both” lines from beginning and end of a 'DiffList''. trimEmpty :: DiffList' -> DiffList' trimEmpty = go True id where go isFirst acc = \case [] -> acc [] [D.Both x _] -> let x' = reverse $ dropWhile (T.null . third) (reverse x) in go False (acc . (D.Both x' x' :)) [] (D.Both x _ : xs) -> let x' = dropWhile (T.null . third) x in if isFirst then go False (acc . (D.Both x' x' :)) xs else go False (acc . (D.Both x x :)) xs (x : xs) -> go False (acc . (x :)) xs firstStartLine :: D.Diff [(Int, Int, a)] -> Maybe Int firstStartLine = \case D.Both ((x, _, _) : _) _ -> Just x D.First ((x, _, _) : _) -> Just x D.Second ((x, _, _) : _) -> Just x _ -> Nothing firstLength :: [D.Diff [(Int, Int, a)]] -> Int firstLength = go 0 where go n [] = n go !n (x : xs) = case x of D.Both as _ -> go (n + length as) xs D.First as -> go (n + length as) xs D.Second _ -> go n xs secondStartLine :: D.Diff [(Int, Int, a)] -> Maybe Int secondStartLine = \case D.Both ((_, x, _) : _) _ -> Just x D.First ((_, x, _) : _) -> Just x D.Second ((_, x, _) : _) -> Just x _ -> Nothing secondLength :: [D.Diff [(Int, Int, a)]] -> Int secondLength = go 0 where go n [] = n go !n (x : xs) = case x of D.Both as _ -> go (n + length as) xs D.First _ -> go n xs D.Second as -> go (n + length as) xs mapDiff :: (a -> b) -> [D.Diff a] -> [D.Diff b] mapDiff f = fmap $ \case D.Both a b -> D.Both (f a) (f b) D.First a -> D.First (f a) D.Second b -> D.Second (f b) third :: (Int, Int, Text) -> Text third (_, _, x) = x isSelectedLine :: IntSet -> Hunk -> Bool isSelectedLine selected Hunk {..} = -- If the set of selected lines is empty, everything is selected. IntSet.null selected || not (IntSet.disjoint selected hunkOriginalLines) where hunkOriginalLines = IntSet.fromAscList (take hunkFirstLength [hunkFirstStartLine ..]) ormolu-0.7.2.0/src/Ormolu/Exception.hs0000644000000000000000000001045407346545000015726 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QualifiedDo #-} -- | 'OrmoluException' type and surrounding definitions. module Ormolu.Exception ( OrmoluException (..), printOrmoluException, withPrettyOrmoluExceptions, ) where import Control.Exception import Data.Foldable (for_) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Text (Text) import Data.Text qualified as T import Data.Void (Void) import Distribution.Parsec.Error (PError, showPError) import GHC.Types.SrcLoc import Ormolu.Diff.Text (TextDiff, printTextDiff) import Ormolu.Terminal import Ormolu.Terminal.QualifiedDo qualified as Term import System.Exit (ExitCode (..)) import System.IO import Text.Megaparsec (ParseErrorBundle, errorBundlePretty) -- | Ormolu exception representing all cases when Ormolu can fail. data OrmoluException = -- | Parsing of original source code failed OrmoluParsingFailed SrcSpan String | -- | Parsing of formatted source code failed OrmoluOutputParsingFailed SrcSpan String | -- | Original and resulting ASTs differ OrmoluASTDiffers TextDiff [RealSrcSpan] | -- | Formatted source code is not idempotent OrmoluNonIdempotentOutput TextDiff | -- | Some GHC options were not recognized OrmoluUnrecognizedOpts (NonEmpty String) | -- | Cabal file parsing failed OrmoluCabalFileParsingFailed FilePath (NonEmpty PError) | -- | Missing input file path when using stdin input and -- accounting for .cabal files OrmoluMissingStdinInputFile | -- | A parse error in a fixity overrides file OrmoluFixityOverridesParseError (ParseErrorBundle Text Void) deriving (Show) instance Exception OrmoluException where displayException = T.unpack . runTermPure . printOrmoluException -- | Print an 'OrmoluException'. printOrmoluException :: OrmoluException -> Term printOrmoluException = \case OrmoluParsingFailed s e -> Term.do bold (putOutputable s) newline put " The GHC parser (in Haddock mode) failed:" newline put " " put (T.pack e) newline OrmoluOutputParsingFailed s e -> Term.do bold (putOutputable s) newline put " Parsing of formatted code failed:" newline put " " put (T.pack e) newline OrmoluASTDiffers diff ss -> Term.do printTextDiff diff newline put " AST of input and AST of formatted code differ." newline for_ ss $ \s -> Term.do put " at " putOutputable s newline put " Please, consider reporting the bug." newline put " To format anyway, use --unsafe." newline OrmoluNonIdempotentOutput diff -> Term.do printTextDiff diff newline put " Formatting is not idempotent." newline put " Please, consider reporting the bug." newline OrmoluUnrecognizedOpts opts -> Term.do put "The following GHC options were not recognized:" newline put " " (put . T.unwords . map T.pack . NE.toList) opts newline OrmoluCabalFileParsingFailed cabalFile parseErrors -> Term.do put "Parsing this .cabal file failed:" newline for_ parseErrors $ \e -> Term.do put . T.pack $ " " <> showPError cabalFile e newline OrmoluMissingStdinInputFile -> Term.do put "The --stdin-input-file option is necessary when using input" newline put "from stdin and accounting for .cabal files" newline OrmoluFixityOverridesParseError errorBundle -> Term.do put . T.pack . errorBundlePretty $ errorBundle newline -- | Inside this wrapper 'OrmoluException' will be caught and displayed -- nicely. withPrettyOrmoluExceptions :: -- | Color mode ColorMode -> -- | Action that may throw an exception IO ExitCode -> IO ExitCode withPrettyOrmoluExceptions colorMode m = m `catch` h where h e = do runTerm (printOrmoluException e) colorMode stderr return . ExitFailure $ case e of -- Error code 1 is for 'error' or 'notImplemented' -- 2 used to be for erroring out on CPP OrmoluParsingFailed {} -> 3 OrmoluOutputParsingFailed {} -> 4 OrmoluASTDiffers {} -> 5 OrmoluNonIdempotentOutput {} -> 6 OrmoluUnrecognizedOpts {} -> 7 OrmoluCabalFileParsingFailed {} -> 8 OrmoluMissingStdinInputFile {} -> 9 OrmoluFixityOverridesParseError {} -> 10 ormolu-0.7.2.0/src/Ormolu/Fixity.hs0000644000000000000000000001343507346545000015246 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | Definitions for fixity analysis. module Ormolu.Fixity ( OpName, pattern OpName, unOpName, occOpName, FixityDirection (..), FixityInfo (..), defaultFixityInfo, FixityApproximation (..), defaultFixityApproximation, FixityOverrides (..), defaultFixityOverrides, ModuleReexports (..), defaultModuleReexports, PackageFixityMap (..), ModuleFixityMap (..), inferFixity, HackageInfo (..), hackageInfo, defaultDependencies, packageFixityMap, packageFixityMap', moduleFixityMap, applyFixityOverrides, ) where import Data.Binary qualified as Binary import Data.Binary.Get qualified as Binary import Data.ByteString.Lazy qualified as BL import Data.List.NonEmpty (NonEmpty) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.MemoTrie (memo) import Data.Set (Set) import Data.Set qualified as Set import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName, mkPackageName, unPackageName) import Language.Haskell.Syntax.ImpExp (ImportListInterpretation (..)) import Ormolu.Fixity.Imports (FixityImport (..)) import Ormolu.Fixity.Internal #if BUNDLE_FIXITIES import Data.FileEmbed (embedFile) #else import qualified Data.ByteString as B import System.IO.Unsafe (unsafePerformIO) #endif -- | The built-in 'HackageInfo' used by Ormolu. hackageInfo :: HackageInfo #if BUNDLE_FIXITIES hackageInfo = Binary.runGet Binary.get $ BL.fromStrict $(embedFile "extract-hackage-info/hackage-info.bin") #else -- The GHC WASM backend does not yet support Template Haskell, so we instead -- pass in the encoded fixity DB via pre-initialization with Wizer. hackageInfo = unsafePerformIO $ Binary.runGet Binary.get . BL.fromStrict <$> B.readFile "hackage-info.bin" {-# NOINLINE hackageInfo #-} #endif -- | Default set of packages to assume as dependencies e.g. when no Cabal -- file is found or taken into consideration. defaultDependencies :: Set PackageName defaultDependencies = Set.singleton (mkPackageName "base") -- | Compute the fixity map that is specific to the package we are formatting. packageFixityMap :: -- | Set of packages to select Set PackageName -> -- | Package fixity map PackageFixityMap packageFixityMap = packageFixityMap' hackageInfo -- | The same as 'packageFixityMap', except this specific version of the -- function allows the user to specify 'HackageInfo' used to build the final -- fixity map. packageFixityMap' :: -- | Hackage info HackageInfo -> -- | Set of packages to select Set PackageName -> -- | Package fixity map PackageFixityMap packageFixityMap' (HackageInfo m) = memoSet $ \dependencies -> -- The core idea here is to transform: -- -- Map PackageName (Map ModuleName (Map OpName FixityInfo)) -- -- into -- -- Map OpName [(PackageName, ModuleName, FixityInfo)] -- -- which we accomplish by turning 'Map's into tuples with 'Map.toList' and -- then flattening them with 'flatten :: [(a, [b])] -> [(a, b)]'. -- -- The target type results from the need to be able to quickly index by -- the operator name when we do fixity resolution later. PackageFixityMap . Map.mapMaybe NE.nonEmpty . Map.fromListWith (<>) . fmap rearrange . flatten . Map.toList . Map.map (flatten . Map.toList . Map.map Map.toList) $ Map.restrictKeys m dependencies where rearrange (packageName, (moduleName, (opName, fixityInfo))) = (opName, [(packageName, moduleName, fixityInfo)]) flatten xs = do (k, vs) <- xs v <- vs return (k, v) -- | Compute the fixity map that is specific to the module we are formatting. moduleFixityMap :: -- | Fixity information selected from dependencies of this package PackageFixityMap -> -- | A simplified representation of the import list in this module [FixityImport] -> -- | Fixity map specific to this module ModuleFixityMap moduleFixityMap (PackageFixityMap m) imports = ModuleFixityMap $ Map.insert ":" (Given colonFixityInfo) (Map.map FromModuleImports (Map.mapMaybeWithKey select m)) where select :: OpName -> NonEmpty (PackageName, ModuleName, FixityInfo) -> Maybe (NonEmpty (FixityQualification, FixityInfo)) select opName = let f (packageName, moduleName, fixityInfo) = (,fixityInfo) <$> resolveThroughImports packageName moduleName opName in NE.nonEmpty . concatMap f resolveThroughImports :: PackageName -> ModuleName -> OpName -> [FixityQualification] resolveThroughImports packageName moduleName opName = let doesImportMatch FixityImport {..} = let packageMatches = case fimportPackage of Nothing -> True Just p -> p == packageName moduleMatches = fimportModule == moduleName opMatches = case fimportList of Nothing -> True Just (Exactly, xs) -> opName `elem` xs Just (EverythingBut, xs) -> opName `notElem` xs in packageMatches && moduleMatches && opMatches in fimportQualified <$> filter doesImportMatch imports -- | Apply fixity overrides. applyFixityOverrides :: -- | User overrides FixityOverrides -> -- | Module fixity map ModuleFixityMap -> -- | Module fixity map with overrides applied ModuleFixityMap applyFixityOverrides (FixityOverrides o) (ModuleFixityMap m) = ModuleFixityMap (Map.union (Map.map Given o) m) memoSet :: (Set PackageName -> v) -> Set PackageName -> v memoSet f = memo (f . Set.fromAscList . fmap mkPackageName) . fmap unPackageName . Set.toAscList ormolu-0.7.2.0/src/Ormolu/Fixity/0000755000000000000000000000000007346545000014704 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Fixity/Imports.hs0000644000000000000000000000610707346545000016701 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | Simplified representation of the import list for the purposes of fixity -- inference. module Ormolu.Fixity.Imports ( FixityImport (..), extractFixityImports, applyModuleReexports, ) where import Data.Bifunctor (second) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName import GHC.Data.FastString qualified as GHC import GHC.Hs hiding (ModuleName) import GHC.Types.Name.Occurrence import GHC.Types.PkgQual (RawPkgQual (..)) import GHC.Types.SourceText (StringLiteral (..)) import GHC.Types.SrcLoc import Ormolu.Fixity.Internal import Ormolu.Utils (ghcModuleNameToCabal) -- | Simplified info about an import. data FixityImport = FixityImport { fimportPackage :: !(Maybe PackageName), fimportModule :: !ModuleName, fimportQualified :: !FixityQualification, fimportList :: !(Maybe (ImportListInterpretation, [OpName])) } -- | Extract 'FixityImport's from the AST. extractFixityImports :: [LImportDecl GhcPs] -> [FixityImport] extractFixityImports = fmap (extractFixityImport . unLoc) -- | Extract an individual 'FixityImport'. extractFixityImport :: ImportDecl GhcPs -> FixityImport extractFixityImport ImportDecl {..} = FixityImport { fimportPackage = case ideclPkgQual of NoRawPkgQual -> Nothing RawPkgQual strLiteral -> Just . mkPackageName . GHC.unpackFS . sl_fs $ strLiteral, fimportModule = ideclName', fimportQualified = case (ideclQualified, ideclAs') of (QualifiedPre, Nothing) -> OnlyQualified ideclName' (QualifiedPost, Nothing) -> OnlyQualified ideclName' (QualifiedPre, Just m) -> OnlyQualified m (QualifiedPost, Just m) -> OnlyQualified m (NotQualified, Nothing) -> UnqualifiedAndQualified ideclName' (NotQualified, Just m) -> UnqualifiedAndQualified m, fimportList = fmap (second (concatMap (fmap occOpName . ieToOccNames . unLoc) . unLoc)) ideclImportList } where ideclName' = ghcModuleNameToCabal (unLoc ideclName) ideclAs' = ghcModuleNameToCabal . unLoc <$> ideclAs ieToOccNames :: IE GhcPs -> [OccName] ieToOccNames = \case IEVar _ (L _ x) -> [occName x] IEThingAbs _ (L _ x) -> [occName x] IEThingAll _ (L _ x) -> [occName x] -- TODO not quite correct, but how to do better? IEThingWith _ (L _ x) _ xs -> occName x : fmap (occName . unLoc) xs _ -> [] -- | Apply given module re-exports. applyModuleReexports :: ModuleReexports -> [FixityImport] -> [FixityImport] applyModuleReexports (ModuleReexports reexports) imports = imports >>= expand where expand i = do case Map.lookup (fimportModule i) reexports of Nothing -> pure i Just exports -> let exportToImport (mpackageName, mmodule) = i { fimportPackage = mpackageName, fimportModule = mmodule } in NE.toList exports >>= expand . exportToImport ormolu-0.7.2.0/src/Ormolu/Fixity/Internal.hs0000644000000000000000000002127507346545000017023 0ustar0000000000000000{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Fixity.Internal ( OpName, pattern OpName, unOpName, occOpName, FixityDirection (..), FixityInfo (..), colonFixityInfo, defaultFixityInfo, FixityApproximation (..), defaultFixityApproximation, HackageInfo (..), FixityOverrides (..), defaultFixityOverrides, ModuleReexports (..), defaultModuleReexports, PackageFixityMap (..), ModuleFixityMap (..), FixityProvenance (..), FixityQualification (..), inferFixity, ) where import Control.DeepSeq (NFData) import Data.Binary (Binary) import Data.ByteString.Short (ShortByteString) import Data.ByteString.Short qualified as SBS import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map import Data.Maybe (fromMaybe) import Data.String (IsString (..)) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Encoding qualified as T import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName import GHC.Data.FastString (fs_sbs) import GHC.Generics (Generic) import GHC.Types.Name (OccName (occNameFS)) import GHC.Types.Name.Reader (RdrName (..), rdrNameOcc) import Ormolu.Utils (ghcModuleNameToCabal) -- | An operator name. newtype OpName = MkOpName { -- | Invariant: UTF-8 encoded getOpName :: ShortByteString } deriving newtype (Eq, Ord, Binary, NFData) -- | Convert an 'OpName' to 'Text'. unOpName :: OpName -> Text unOpName = T.decodeUtf8 . SBS.fromShort . getOpName pattern OpName :: Text -> OpName pattern OpName opName <- (unOpName -> opName) where OpName = MkOpName . SBS.toShort . T.encodeUtf8 {-# COMPLETE OpName #-} -- | Convert an 'OccName to an 'OpName'. occOpName :: OccName -> OpName occOpName = MkOpName . fs_sbs . occNameFS instance Show OpName where show = T.unpack . unOpName instance IsString OpName where fromString = OpName . T.pack -- | Fixity direction. data FixityDirection = InfixL | InfixR | InfixN deriving stock (Eq, Ord, Show, Generic) deriving anyclass (Binary, NFData) -- | Fixity information about an infix operator. This type provides precise -- information as opposed to 'FixityApproximation'. data FixityInfo = FixityInfo { -- | Fixity direction fiDirection :: FixityDirection, -- | Precedence fiPrecedence :: Int } deriving stock (Eq, Ord, Show, Generic) deriving anyclass (Binary, NFData) -- | Fixity info of the built-in colon data constructor. colonFixityInfo :: FixityInfo colonFixityInfo = FixityInfo InfixR 5 -- | Fixity that is implicitly assumed if no fixity declaration is present. defaultFixityInfo :: FixityInfo defaultFixityInfo = FixityInfo InfixL 9 -- | Approximation of fixity information that takes the uncertainty that can -- arise from conflicting definitions into account. data FixityApproximation = FixityApproximation { -- | Fixity direction if it is known faDirection :: Maybe FixityDirection, -- | Minimum precedence level found in the (maybe conflicting) -- definitions for the operator (inclusive) faMinPrecedence :: Int, -- | Maximum precedence level found in the (maybe conflicting) -- definitions for the operator (inclusive) faMaxPrecedence :: Int } deriving stock (Eq, Ord, Show, Generic) deriving anyclass (Binary, NFData) -- | Gives the ability to merge two (maybe conflicting) definitions for an -- operator, keeping the higher level of compatible information from both. instance Semigroup FixityApproximation where FixityApproximation {faDirection = dir1, faMinPrecedence = min1, faMaxPrecedence = max1} <> FixityApproximation {faDirection = dir2, faMinPrecedence = min2, faMaxPrecedence = max2} = FixityApproximation { faDirection = dir', faMinPrecedence = min min1 min2, faMaxPrecedence = max max1 max2 } where dir' = case (dir1, dir2) of (Just a, Just b) | a == b -> Just a _ -> Nothing -- | The lowest level of information we can have about an operator. defaultFixityApproximation :: FixityApproximation defaultFixityApproximation = fixityInfoToApproximation defaultFixityInfo -- | Convert from 'FixityInfo' to 'FixityApproximation'. fixityInfoToApproximation :: FixityInfo -> FixityApproximation fixityInfoToApproximation FixityInfo {..} = FixityApproximation { faDirection = Just fiDirection, faMinPrecedence = fiPrecedence, faMaxPrecedence = fiPrecedence } -- | The map of operators declared by each package grouped by module name. newtype HackageInfo = HackageInfo (Map PackageName (Map ModuleName (Map OpName FixityInfo))) deriving stock (Generic) deriving anyclass (Binary, NFData) -- | Map from the operator name to its 'FixityInfo'. newtype FixityOverrides = FixityOverrides { unFixityOverrides :: Map OpName FixityInfo } deriving stock (Eq, Show) -- | Fixity overrides to use by default. defaultFixityOverrides :: FixityOverrides defaultFixityOverrides = FixityOverrides Map.empty -- | Module re-exports newtype ModuleReexports = ModuleReexports { unModuleReexports :: Map ModuleName (NonEmpty (Maybe PackageName, ModuleName)) } deriving stock (Eq, Show) -- | Module re-exports to apply by default. defaultModuleReexports :: ModuleReexports defaultModuleReexports = ModuleReexports . Map.fromList $ [ ( "Control.Lens", l "lens" [ "Control.Lens.At", "Control.Lens.Cons", "Control.Lens.Each", "Control.Lens.Empty", "Control.Lens.Equality", "Control.Lens.Fold", "Control.Lens.Getter", "Control.Lens.Indexed", "Control.Lens.Iso", "Control.Lens.Lens", "Control.Lens.Level", "Control.Lens.Plated", "Control.Lens.Prism", "Control.Lens.Reified", "Control.Lens.Review", "Control.Lens.Setter", "Control.Lens.TH", "Control.Lens.Traversal", "Control.Lens.Tuple", "Control.Lens.Type", "Control.Lens.Wrapped", "Control.Lens.Zoom" ] ), ( "Servant", l "servant" [ "Servant.API" ] ), ( "Optics", l "optics" [ "Optics.Fold", "Optics.Operators", "Optics.IxAffineFold", "Optics.IxFold", "Optics.IxTraversal", "Optics.Traversal" ] ), ( "Test.Hspec", l "hspec-expectations" [ "Test.Hspec.Expectations" ] ) ] where l packageName xs = (Just packageName,) <$> NE.fromList xs -- | Fixity information that is specific to a package being formatted. It -- requires module-specific imports in order to be usable. newtype PackageFixityMap = PackageFixityMap (Map OpName (NonEmpty (PackageName, ModuleName, FixityInfo))) deriving stock (Eq, Show) -- | Fixity map that takes into account imports in a particular module. newtype ModuleFixityMap = ModuleFixityMap (Map OpName FixityProvenance) deriving stock (Eq, Show) -- | Provenance of fixity info. data FixityProvenance = -- | 'FixityInfo' of a built-in operator or provided by a user override. Given FixityInfo | -- | 'FixityInfo' to be inferred from module imports. FromModuleImports (NonEmpty (FixityQualification, FixityInfo)) deriving stock (Eq, Show) -- | Fixity qualification that determines how 'FixityInfo' matches a -- particular use of an operator, given whether it is qualified or -- unqualified and the module name used. data FixityQualification = UnqualifiedAndQualified ModuleName | OnlyQualified ModuleName deriving stock (Eq, Show) -- | Get a 'FixityApproximation' of an operator. inferFixity :: RdrName -> ModuleFixityMap -> FixityApproximation inferFixity rdrName (ModuleFixityMap m) = case Map.lookup opName m of Nothing -> defaultFixityApproximation Just (Given fixityInfo) -> fixityInfoToApproximation fixityInfo Just (FromModuleImports xs) -> let isMatching (provenance, _fixityInfo) = case provenance of UnqualifiedAndQualified mn -> maybe True (== mn) moduleName OnlyQualified mn -> maybe False (== mn) moduleName in fromMaybe defaultFixityApproximation . foldMap (Just . fixityInfoToApproximation . snd) $ NE.filter isMatching xs where opName = occOpName (rdrNameOcc rdrName) moduleName = case rdrName of Qual x _ -> Just (ghcModuleNameToCabal x) _ -> Nothing ormolu-0.7.2.0/src/Ormolu/Fixity/Parser.hs0000644000000000000000000001236407346545000016502 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Parser for fixity maps. module Ormolu.Fixity.Parser ( parseDotOrmolu, parseFixityDeclaration, parseModuleReexportDeclaration, -- * Raw parsers pFixity, pOperator, pModuleName, pPackageName, -- * Internal isIdentifierFirstChar, isIdentifierConstituent, isOperatorConstituent, isPackageNameConstituent, isModuleSegmentFirstChar, isModuleSegmentConstituent, ) where import Control.Monad (void, when) import Data.Bifunctor (bimap) import Data.Char (isAlphaNum, isUpper) import Data.Char qualified as Char import Data.Either (partitionEithers) import Data.List (intercalate) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as T import Data.Void (Void) import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName (PackageName, mkPackageName) import Ormolu.Fixity import Text.Megaparsec import Text.Megaparsec.Char import Text.Megaparsec.Char.Lexer qualified as L type Parser = Parsec Void Text -- | Parse textual representation of 'FixityOverrides'. parseDotOrmolu :: -- | Location of the file we are parsing (only for parse errors) FilePath -> -- | File contents to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) (FixityOverrides, ModuleReexports) parseDotOrmolu = runParser pDotOrmolu -- | Parse a single self-contained fixity declaration. parseFixityDeclaration :: -- | Text to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) [(OpName, FixityInfo)] parseFixityDeclaration = runParser (pFixity <* eof) "" -- | Parse a single self-contained module re-export declaration. parseModuleReexportDeclaration :: -- | Text to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) parseModuleReexportDeclaration = runParser (pModuleReexport <* eof) "" pDotOrmolu :: Parser (FixityOverrides, ModuleReexports) pDotOrmolu = bimap (FixityOverrides . Map.fromList . mconcat) (ModuleReexports . Map.map NE.sort . Map.fromListWith (<>)) . partitionEithers <$> many configLine <* eof where configLine = do x <- eitherP pFixity pModuleReexport void eol hidden space return x -- | Parse a single fixity declaration, such as -- -- > infixr 4 +++, >>> pFixity :: Parser [(OpName, FixityInfo)] pFixity = do fiDirection <- pFixityDirection hidden hspace1 offsetAtPrecedence <- getOffset fiPrecedence <- L.decimal when (fiPrecedence > 9) $ region (setErrorOffset offsetAtPrecedence) (fail "precedence should not be greater than 9") hidden hspace1 ops <- sepBy1 pOperator (char ',' >> hidden hspace) hidden hspace let fixityInfo = FixityInfo {..} return ((,fixityInfo) <$> ops) pFixityDirection :: Parser FixityDirection pFixityDirection = choice [ InfixL <$ string "infixl", InfixR <$ string "infixr", InfixN <$ string "infix" ] -- | See pOperator :: Parser OpName pOperator = OpName <$> (tickedOperator <|> normalOperator) where tickedOperator = between tick tick haskellIdentifier tick = char '`' haskellIdentifier = T.cons <$> letterChar <*> takeWhileP Nothing isIdentifierConstituent normalOperator = takeWhile1P (Just "operator character") isOperatorConstituent pModuleReexport :: Parser (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) pModuleReexport = do void (string "module") hidden hspace1 exportingModule <- pModuleName hidden hspace1 void (string "exports") hidden hspace1 mexportedPackage <- optional $ between (char '\"') (char '\"') pPackageName <* hidden hspace1 exportedModule <- pModuleName hidden hspace return (exportingModule, NE.singleton (mexportedPackage, exportedModule)) pModuleName :: Parser ModuleName pModuleName = ModuleName.fromString . intercalate "." <$> sepBy1 pModuleSegment (char '.') "module name" where pModuleSegment = do x <- satisfy isModuleSegmentFirstChar "capital letter" xs <- many ( satisfy isModuleSegmentConstituent "module segment continuation" ) return (x : xs) pPackageName :: Parser PackageName pPackageName = mkPackageName <$> some (satisfy isPackageNameConstituent) "package name" -- Internal predicates (exposed for testing) isIdentifierFirstChar :: Char -> Bool isIdentifierFirstChar = Char.isLetter isIdentifierConstituent :: Char -> Bool isIdentifierConstituent x = Char.isAlphaNum x || x == '_' || x == '\'' isOperatorConstituent :: Char -> Bool isOperatorConstituent x = (Char.isSymbol x || Char.isPunctuation x) && (x /= ',' && x /= '`' && x /= '(' && x /= ')') isPackageNameConstituent :: Char -> Bool isPackageNameConstituent x = x == '-' || isAlphaNum x isModuleSegmentFirstChar :: Char -> Bool isModuleSegmentFirstChar x = isAlphaNum x && isUpper x isModuleSegmentConstituent :: Char -> Bool isModuleSegmentConstituent x = x == '_' || x == '\'' || isAlphaNum x ormolu-0.7.2.0/src/Ormolu/Fixity/Printer.hs0000644000000000000000000000453307346545000016670 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Printer for fixity overrides. module Ormolu.Fixity.Printer ( printDotOrmolu, ) where import Data.Char qualified as Char import Data.List (intercalate) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict qualified as Map import Data.Semigroup (sconcat) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Lazy qualified as TL import Data.Text.Lazy.Builder (Builder) import Data.Text.Lazy.Builder qualified as B import Data.Text.Lazy.Builder.Int qualified as B import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName import Ormolu.Fixity -- | Print out a textual representation of an @.ormolu@ file. printDotOrmolu :: FixityOverrides -> ModuleReexports -> Text printDotOrmolu (FixityOverrides fixityOverrides) (ModuleReexports moduleReexports) = TL.toStrict . B.toLazyText $ (mconcat . fmap renderSingleFixityOverride . Map.toList) fixityOverrides <> (mconcat . fmap renderSingleModuleReexport . Map.toList) moduleReexports renderSingleFixityOverride :: (OpName, FixityInfo) -> Builder renderSingleFixityOverride (OpName operator, FixityInfo {..}) = mconcat [ case fiDirection of InfixL -> "infixl" InfixR -> "infixr" InfixN -> "infix", " ", B.decimal fiPrecedence, " ", if isTickedOperator operator then "`" <> B.fromText operator <> "`" else B.fromText operator, "\n" ] where isTickedOperator = maybe True (Char.isLetter . fst) . T.uncons renderSingleModuleReexport :: (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) -> Builder renderSingleModuleReexport (exportingModule, exports) = sconcat (renderSingle <$> exports) where renderSingle (mexportedPackage, exportedModule) = mconcat [ "module ", renderModuleName exportingModule, " exports ", renderOptionalPackageName mexportedPackage, renderModuleName exportedModule, "\n" ] renderOptionalPackageName = \case Nothing -> mempty Just x -> "\"" <> B.fromString (unPackageName x) <> "\" " renderModuleName :: ModuleName -> Builder renderModuleName = B.fromString . intercalate "." . ModuleName.components ormolu-0.7.2.0/src/Ormolu/Imports.hs0000644000000000000000000002030707346545000015423 0ustar0000000000000000{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} -- | Manipulations on import lists. module Ormolu.Imports ( normalizeImports, ) where import Data.Bifunctor import Data.Char (isAlphaNum) import Data.Function (on) import Data.List (foldl', nubBy, sortBy, sortOn) import Data.Map.Strict (Map) import Data.Map.Strict qualified as M import GHC.Data.FastString import GHC.Hs import GHC.Hs.ImpExp as GHC import GHC.Types.Name.Reader import GHC.Types.PkgQual import GHC.Types.SourceText import GHC.Types.SrcLoc import Ormolu.Utils (notImplemented, showOutputable) -- | Sort and normalize imports. normalizeImports :: [LImportDecl GhcPs] -> [LImportDecl GhcPs] normalizeImports = fmap snd . M.toAscList . M.fromListWith combineImports . fmap (\x -> (importId x, g x)) where g :: LImportDecl GhcPs -> LImportDecl GhcPs g (L l ImportDecl {..}) = L l ImportDecl { ideclImportList = second (fmap normalizeLies) <$> ideclImportList, .. } -- | Combine two import declarations. It should be assumed that 'ImportId's -- are equal. combineImports :: LImportDecl GhcPs -> LImportDecl GhcPs -> LImportDecl GhcPs combineImports (L lx ImportDecl {..}) (L _ y) = L lx ImportDecl { ideclImportList = case (ideclImportList, GHC.ideclImportList y) of (Just (hiding, L l' xs), Just (_, L _ ys)) -> Just (hiding, (L l' (normalizeLies (xs ++ ys)))) _ -> Nothing, .. } -- | Import id, a collection of all things that justify having a separate -- import entry. This is used for merging of imports. If two imports have -- the same 'ImportId' they can be merged. data ImportId = ImportId { importIsPrelude :: Bool, importPkgQual :: ImportPkgQual, importIdName :: ModuleName, importSource :: IsBootInterface, importSafe :: Bool, importQualified :: Bool, importAs :: Maybe ModuleName, importHiding :: Maybe ImportListInterpretationOrd } deriving (Eq, Ord) data ImportPkgQual = -- | The import is not qualified by a package name. NoImportPkgQual | -- | The import is qualified by an external package name. ImportPkgQual LexicalFastString | -- | The import is qualified by the current package being built, using the -- special @this@ package name. ImportPkgQualThis deriving stock (Eq, Ord) mkImportPkgQual :: RawPkgQual -> ImportPkgQual mkImportPkgQual = \case NoRawPkgQual -> NoImportPkgQual RawPkgQual (sl_fs -> fs) | fs == mkFastString "this" -> ImportPkgQualThis | otherwise -> ImportPkgQual (LexicalFastString fs) -- | 'ImportListInterpretation' does not have an 'Ord' instance. newtype ImportListInterpretationOrd = ImportListInterpretationOrd { unImportListInterpretationOrd :: ImportListInterpretation } deriving stock (Eq) instance Ord ImportListInterpretationOrd where compare = compare `on` toBool . unImportListInterpretationOrd where toBool Exactly = False toBool EverythingBut = True -- | Obtain an 'ImportId' for a given import. importId :: LImportDecl GhcPs -> ImportId importId (L _ ImportDecl {..}) = ImportId { importIsPrelude = isPrelude, importIdName = moduleName, importPkgQual = mkImportPkgQual ideclPkgQual, importSource = ideclSource, importSafe = ideclSafe, importQualified = case ideclQualified of QualifiedPre -> True QualifiedPost -> True NotQualified -> False, importAs = unLoc <$> ideclAs, importHiding = ImportListInterpretationOrd . fst <$> ideclImportList } where isPrelude = moduleNameString moduleName == "Prelude" moduleName = unLoc ideclName -- | Normalize a collection of import\/export items. normalizeLies :: [LIE GhcPs] -> [LIE GhcPs] normalizeLies = sortOn (getIewn . unLoc) . M.elems . foldl' combine M.empty where combine :: Map IEWrappedNameOrd (LIE GhcPs) -> LIE GhcPs -> Map IEWrappedNameOrd (LIE GhcPs) combine m (L new_l new) = let wname = getIewn new normalizeWNames = nubBy (\x y -> compareLIewn x y == EQ) . sortBy compareLIewn alter = \case Nothing -> Just . L new_l $ case new of IEThingWith _ n wildcard g -> IEThingWith EpAnnNotUsed n wildcard (normalizeWNames g) other -> other Just old -> let f = \case IEVar _ n -> IEVar NoExtField n IEThingAbs _ _ -> new IEThingAll _ n -> IEThingAll EpAnnNotUsed n IEThingWith _ n wildcard g -> case new of IEVar NoExtField _ -> error "Ormolu.Imports broken presupposition" IEThingAbs _ _ -> IEThingWith EpAnnNotUsed n wildcard g IEThingAll _ n' -> IEThingAll EpAnnNotUsed n' IEThingWith _ n' wildcard' g' -> let combinedWildcard = case (wildcard, wildcard') of (IEWildcard _, _) -> IEWildcard 0 (_, IEWildcard _) -> IEWildcard 0 _ -> NoIEWildcard in IEThingWith EpAnnNotUsed n' combinedWildcard (normalizeWNames (g <> g')) IEModuleContents _ _ -> notImplemented "IEModuleContents" IEGroup NoExtField _ _ -> notImplemented "IEGroup" IEDoc NoExtField _ -> notImplemented "IEDoc" IEDocNamed NoExtField _ -> notImplemented "IEDocNamed" IEModuleContents _ _ -> notImplemented "IEModuleContents" IEGroup NoExtField _ _ -> notImplemented "IEGroup" IEDoc NoExtField _ -> notImplemented "IEDoc" IEDocNamed NoExtField _ -> notImplemented "IEDocNamed" in Just (f <$> old) in M.alter alter wname m -- | A wrapper for @'IEWrappedName' 'GhcPs'@ that allows us to define an -- 'Ord' instance for it. newtype IEWrappedNameOrd = IEWrappedNameOrd (IEWrappedName GhcPs) deriving (Eq) instance Ord IEWrappedNameOrd where compare (IEWrappedNameOrd x) (IEWrappedNameOrd y) = compareIewn x y -- | Project @'IEWrappedName' 'GhcPs'@ from @'IE' 'GhcPs'@. getIewn :: IE GhcPs -> IEWrappedNameOrd getIewn = \case IEVar NoExtField x -> IEWrappedNameOrd (unLoc x) IEThingAbs _ x -> IEWrappedNameOrd (unLoc x) IEThingAll _ x -> IEWrappedNameOrd (unLoc x) IEThingWith _ x _ _ -> IEWrappedNameOrd (unLoc x) IEModuleContents _ _ -> notImplemented "IEModuleContents" IEGroup NoExtField _ _ -> notImplemented "IEGroup" IEDoc NoExtField _ -> notImplemented "IEDoc" IEDocNamed NoExtField _ -> notImplemented "IEDocNamed" -- | Like 'compareIewn' for located wrapped names. compareLIewn :: LIEWrappedName GhcPs -> LIEWrappedName GhcPs -> Ordering compareLIewn = compareIewn `on` unLoc -- | Compare two @'IEWrapppedName' 'GhcPs'@ things. compareIewn :: IEWrappedName GhcPs -> IEWrappedName GhcPs -> Ordering compareIewn (IEName _ x) (IEName _ y) = unLoc x `compareRdrName` unLoc y compareIewn (IEName _ _) (IEPattern _ _) = LT compareIewn (IEName _ _) (IEType _ _) = LT compareIewn (IEPattern _ _) (IEName _ _) = GT compareIewn (IEPattern _ x) (IEPattern _ y) = unLoc x `compareRdrName` unLoc y compareIewn (IEPattern _ _) (IEType _ _) = LT compareIewn (IEType _ _) (IEName _ _) = GT compareIewn (IEType _ _) (IEPattern _ _) = GT compareIewn (IEType _ x) (IEType _ y) = unLoc x `compareRdrName` unLoc y compareRdrName :: RdrName -> RdrName -> Ordering compareRdrName x y = case (getNameStr x, getNameStr y) of ([], []) -> EQ ((_ : _), []) -> GT ([], (_ : _)) -> LT ((x' : _), (y' : _)) -> case (isAlphaNum x', isAlphaNum y') of (False, False) -> x `compare` y (True, False) -> LT (False, True) -> GT (True, True) -> x `compare` y where getNameStr = showOutputable . rdrNameOcc ormolu-0.7.2.0/src/Ormolu/Parser.hs0000644000000000000000000003162707346545000015231 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Parser for Haskell source code. module Ormolu.Parser ( parseModule, manualExts, ) where import Control.Exception import Control.Monad import Control.Monad.Except (ExceptT (..), runExceptT) import Control.Monad.IO.Class import Data.Char (isSpace) import Data.Functor import Data.Generics hiding (orElse) import Data.List qualified as L import Data.List.NonEmpty qualified as NE import Data.Text (Text) import GHC.Builtin.Names (mAIN_NAME) import GHC.Data.Bag (bagToList) import GHC.Data.EnumSet qualified as EnumSet import GHC.Data.FastString qualified as GHC import GHC.Data.Maybe (orElse) import GHC.Data.StringBuffer (StringBuffer) import GHC.Driver.CmdLine qualified as GHC import GHC.Driver.Config.Parser (initParserOpts) import GHC.Driver.Errors.Types qualified as GHC import GHC.Driver.Session as GHC import GHC.DynFlags (baseDynFlags) import GHC.Hs hiding (UnicodeSyntax) import GHC.LanguageExtensions.Type (Extension (..)) import GHC.Parser qualified as GHC import GHC.Parser.Annotation qualified as GHC import GHC.Parser.Header qualified as GHC import GHC.Parser.Lexer qualified as GHC import GHC.Types.Error qualified as GHC import GHC.Types.SourceError qualified as GHC import GHC.Types.SrcLoc import GHC.Utils.Error import GHC.Utils.Exception (ExceptionMonad) import GHC.Utils.Outputable (defaultSDocContext) import GHC.Utils.Panic qualified as GHC import Ormolu.Config import Ormolu.Exception import Ormolu.Fixity hiding (packageFixityMap) import Ormolu.Fixity.Imports (applyModuleReexports, extractFixityImports) import Ormolu.Imports (normalizeImports) import Ormolu.Parser.CommentStream import Ormolu.Parser.Result import Ormolu.Processing.Common import Ormolu.Processing.Cpp (eraseCppLines) import Ormolu.Processing.Preprocess import Ormolu.Utils (incSpanLine, showOutputable, textToStringBuffer) -- | Parse a complete module from 'Text'. parseModule :: (MonadIO m) => -- | Ormolu configuration Config RegionDeltas -> -- | Package fixity map PackageFixityMap -> -- | File name (only for source location annotations) FilePath -> -- | Input for parser Text -> m ( [GHC.Warn], Either (SrcSpan, String) [SourceSnippet] ) parseModule config@Config {..} packageFixityMap path rawInput = liftIO $ do -- It's important that 'setDefaultExts' is done before -- 'parsePragmasIntoDynFlags', because otherwise we might enable an -- extension that was explicitly disabled in the file. let baseFlags = GHC.setGeneralFlag' GHC.Opt_Haddock (setDefaultExts baseDynFlags) extraOpts = dynOptionToLocatedStr <$> cfgDynOptions rawInputStringBuffer = textToStringBuffer (eraseCppLines rawInput) beginningLoc = mkSrcSpan (mkSrcLoc (GHC.mkFastString path) 1 1) (mkSrcLoc (GHC.mkFastString path) 1 1) (warnings, dynFlags) <- parsePragmasIntoDynFlags baseFlags extraOpts path rawInputStringBuffer >>= \case Right res -> pure res Left err -> throwIO (OrmoluParsingFailed beginningLoc err) let cppEnabled = EnumSet.member Cpp (GHC.extensionFlags dynFlags) implicitPrelude = EnumSet.member ImplicitPrelude (GHC.extensionFlags dynFlags) fixityImports <- parseImports dynFlags implicitPrelude path rawInputStringBuffer >>= \case Right res -> pure (applyModuleReexports cfgModuleReexports (extractFixityImports res)) Left err -> throwIO (OrmoluParsingFailed beginningLoc err) let modFixityMap = applyFixityOverrides cfgFixityOverrides (moduleFixityMap packageFixityMap fixityImports) snippets <- runExceptT . forM (preprocess cppEnabled cfgRegion rawInput) $ \case Right region -> fmap ParsedSnippet . ExceptT $ parseModuleSnippet (config $> region) modFixityMap dynFlags path rawInput Left raw -> pure $ RawSnippet raw pure (warnings, snippets) parseModuleSnippet :: (MonadIO m) => Config RegionDeltas -> ModuleFixityMap -> DynFlags -> FilePath -> Text -> m (Either (SrcSpan, String) ParseResult) parseModuleSnippet Config {..} modFixityMap dynFlags path rawInput = liftIO $ do let (input, indent) = removeIndentation . linesInRegion cfgRegion $ rawInput let pStateErrors pstate = let errs = bagToList . GHC.getMessages $ GHC.getPsErrorMessages pstate fixupErrSpan = incSpanLine (regionPrefixLength cfgRegion) rateSeverity = \case SevError -> 1 :: Int SevWarning -> 2 SevIgnore -> 3 showErr (errMsgDiagnostic -> err) = codeMsg <> msg where codeMsg = case diagnosticCode err of Just code -> "[" <> showOutputable code <> "] " Nothing -> "" msg = showOutputable . formatBulleted defaultSDocContext . diagnosticMessage GHC.NoDiagnosticOpts $ err in case L.sortOn (rateSeverity . errMsgSeverity) errs of [] -> Nothing err : _ -> Just (fixupErrSpan (errMsgSpan err), showErr err) parser = case cfgSourceType of ModuleSource -> GHC.parseModule SignatureSource -> GHC.parseSignature r = case runParser parser dynFlags path input of GHC.PFailed pstate -> case pStateErrors pstate of Just err -> Left err Nothing -> error "PFailed does not have an error" GHC.POk pstate (L _ (normalizeModule -> hsModule)) -> case pStateErrors pstate of -- Some parse errors (pattern/arrow syntax in expr context) -- do not cause a parse error, but they are replaced with "_" -- by the parser and the modified AST is propagated to the -- later stages; but we fail in those cases. Just err -> Left err Nothing -> let (stackHeader, pragmas, comments) = mkCommentStream input hsModule in Right ParseResult { prParsedSource = hsModule, prSourceType = cfgSourceType, prStackHeader = stackHeader, prPragmas = pragmas, prCommentStream = comments, prExtensions = GHC.extensionFlags dynFlags, prModuleFixityMap = modFixityMap, prIndent = indent } return r -- | Normalize a 'HsModule' by sorting its import\/export lists, dropping -- blank comments, etc. normalizeModule :: HsModule GhcPs -> HsModule GhcPs normalizeModule hsmod = everywhere (mkT dropBlankTypeHaddocks `extT` dropBlankDataDeclHaddocks `extT` patchContext) hsmod { hsmodImports = normalizeImports (hsmodImports hsmod), hsmodDecls = filter (not . isBlankDocD . unLoc) (hsmodDecls hsmod), hsmodExt = (hsmodExt hsmod) { hsmodHaddockModHeader = mfilter (not . isBlankDocString) (hsmodHaddockModHeader (hsmodExt hsmod)) }, hsmodExports = (fmap . fmap) (filter (not . isBlankDocIE . unLoc)) (hsmodExports hsmod) } where isBlankDocString = all isSpace . renderHsDocString . hsDocString . unLoc isBlankDocD = \case DocD _ s -> isBlankDocString $ docDeclDoc s _ -> False isBlankDocIE = \case IEGroup _ _ s -> isBlankDocString s IEDoc _ s -> isBlankDocString s _ -> False dropBlankTypeHaddocks = \case L _ (HsDocTy _ ty s) :: LHsType GhcPs | isBlankDocString s -> ty a -> a dropBlankDataDeclHaddocks = \case ConDeclGADT {con_doc = Just s, ..} :: ConDecl GhcPs | isBlankDocString s -> ConDeclGADT {con_doc = Nothing, ..} ConDeclH98 {con_doc = Just s, ..} :: ConDecl GhcPs | isBlankDocString s -> ConDeclH98 {con_doc = Nothing, ..} a -> a patchContext :: LHsContext GhcPs -> LHsContext GhcPs patchContext = fmap $ \case [x@(L _ (HsParTy _ _))] -> [x] [x@(L lx _)] -> [L lx (HsParTy EpAnnNotUsed x)] xs -> xs -- | Enable all language extensions that we think should be enabled by -- default for ease of use. setDefaultExts :: DynFlags -> DynFlags setDefaultExts flags = L.foldl' xopt_set (lang_set flags (Just Haskell2010)) autoExts where autoExts = allExts L.\\ manualExts allExts = [minBound .. maxBound] -- | Extensions that are not enabled automatically and should be activated -- by user. manualExts :: [Extension] manualExts = [ Arrows, -- steals proc Cpp, -- forbidden BangPatterns, -- makes certain patterns with ! fail PatternSynonyms, -- steals the pattern keyword RecursiveDo, -- steals the rec keyword StaticPointers, -- steals static keyword TransformListComp, -- steals the group keyword UnboxedTuples, -- breaks (#) lens operator MagicHash, -- screws {-# these things #-} AlternativeLayoutRule, AlternativeLayoutRuleTransitional, MonadComprehensions, UnboxedSums, UnicodeSyntax, -- gives special meanings to operators like (→) TemplateHaskell, -- changes how $foo is parsed TemplateHaskellQuotes, -- enables TH subset of quasi-quotes, this -- apparently interferes with QuasiQuotes in -- weird ways ImportQualifiedPost, -- affects how Ormolu renders imports, so the -- decision of enabling this style is left to the user NegativeLiterals, -- with this, `- 1` and `-1` have differing AST LexicalNegation, -- implies NegativeLiterals LinearTypes, -- steals the (%) type operator in some cases OverloadedRecordDot, -- f.g parses differently OverloadedRecordUpdate, -- qualified fields are not supported OverloadedLabels -- a#b is parsed differently ] -- | Run a 'GHC.P' computation. runParser :: -- | Computation to run GHC.P a -> -- | Dynamic flags GHC.DynFlags -> -- | Module path FilePath -> -- | Module contents Text -> -- | Parse result GHC.ParseResult a runParser parser flags filename input = GHC.unP parser parseState where location = mkRealSrcLoc (GHC.mkFastString filename) 1 1 buffer = textToStringBuffer input parseState = GHC.initParserState (initParserOpts flags) buffer location ---------------------------------------------------------------------------- -- Helpers taken from HLint -- | Detect pragmas in the given input and return them as a collection of -- 'DynFlags'. parsePragmasIntoDynFlags :: -- | Pre-set 'DynFlags' DynFlags -> -- | Extra options (provided by user) [Located String] -> -- | File name (only for source location annotations) FilePath -> -- | Input for parser StringBuffer -> IO (Either String ([GHC.Warn], DynFlags)) parsePragmasIntoDynFlags flags extraOpts filepath input = catchGhcErrors $ do let (_warnings, fileOpts) = GHC.getOptions (initParserOpts flags) input filepath (flags', leftovers, warnings) <- parseDynamicFilePragma flags (extraOpts <> fileOpts) case NE.nonEmpty leftovers of Nothing -> return () Just unrecognizedOpts -> throwIO (OrmoluUnrecognizedOpts (unLoc <$> unrecognizedOpts)) let flags'' = flags' `gopt_set` Opt_KeepRawTokenStream return $ Right (warnings, flags'') -- | Detect the collection of imports used in the given input. parseImports :: -- | Pre-set 'DynFlags' DynFlags -> -- | Implicit Prelude? Bool -> -- | File name (only for source location annotations) FilePath -> -- | Input for the parser StringBuffer -> IO (Either String [LImportDecl GhcPs]) parseImports flags implicitPrelude filepath input = case GHC.unP GHC.parseHeader (GHC.initParserState popts input loc) of GHC.PFailed pst -> return $ Left (showOutputable (GHC.getPsErrorMessages pst)) GHC.POk pst rdr_module -> return $ let (_warnings, errors) = GHC.getPsMessages pst in if not (isEmptyMessages errors) then Left (showOutputable (GHC.GhcPsMessage <$> errors)) else let hsmod = unLoc rdr_module mmoduleName = hsmodName hsmod main_loc = srcLocSpan (mkSrcLoc (GHC.mkFastString filepath) 1 1) mod' = mmoduleName `orElse` L (GHC.noAnnSrcSpan main_loc) mAIN_NAME explicitImports = hsmodImports hsmod implicitImports = GHC.mkPrelImports (unLoc mod') main_loc implicitPrelude explicitImports in Right (explicitImports ++ implicitImports) where popts = initParserOpts flags loc = mkRealSrcLoc (GHC.mkFastString filepath) 1 1 -- | Catch and report GHC errors. catchGhcErrors :: (ExceptionMonad m) => m (Either String a) -> m (Either String a) catchGhcErrors m = GHC.handleGhcException reportErr (GHC.handleSourceError reportErr m) where reportErr e = return $ Left (show e) ormolu-0.7.2.0/src/Ormolu/Parser/0000755000000000000000000000000007346545000014664 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Parser/CommentStream.hs0000644000000000000000000002264107346545000020003 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Functions for working with comment stream. module Ormolu.Parser.CommentStream ( -- * Comment stream CommentStream (..), mkCommentStream, -- * Comment LComment, Comment (..), unComment, hasAtomsBefore, isMultilineComment, ) where import Control.Monad ((<=<)) import Data.Char (isSpace) import Data.Data (Data) import Data.Generics.Schemes import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Map.Lazy qualified as M import Data.Maybe import Data.Set qualified as S import Data.Text (Text) import Data.Text qualified as T import GHC.Data.Strict qualified as Strict import GHC.Hs (HsModule) import GHC.Hs.Doc import GHC.Hs.Extension import GHC.Hs.ImpExp import GHC.Parser.Annotation (EpAnnComments (..), getLocA) import GHC.Parser.Annotation qualified as GHC import GHC.Types.SrcLoc import Ormolu.Parser.Pragma import Ormolu.Utils (onTheSameLine) ---------------------------------------------------------------------------- -- Comment stream -- | A stream of 'RealLocated' 'Comment's in ascending order with respect to -- beginning of corresponding spans. newtype CommentStream = CommentStream [LComment] deriving (Eq, Data, Semigroup, Monoid) -- | Create 'CommentStream' from 'HsModule'. The pragmas are -- removed from the 'CommentStream'. mkCommentStream :: -- | Original input Text -> -- | Module to use for comment extraction HsModule GhcPs -> -- | Stack header, pragmas, and comment stream ( Maybe LComment, [([LComment], Pragma)], CommentStream ) mkCommentStream input hsModule = ( mstackHeader, pragmas, CommentStream comments ) where (comments, pragmas) = extractPragmas input rawComments1 (rawComments1, mstackHeader) = extractStackHeader rawComments0 -- We want to extract all comments except _valid_ Haddock comments rawComments0 = fmap (uncurry L) . M.toAscList . flip M.withoutKeys validHaddockCommentSpans . M.fromList . fmap (\(L l a) -> (l, a)) $ allComments where -- All comments, including valid and invalid Haddock comments allComments = mapMaybe unAnnotationComment $ epAnnCommentsToList =<< listify (only @EpAnnComments) hsModule where epAnnCommentsToList = \case EpaComments cs -> cs EpaCommentsBalanced pcs fcs -> pcs <> fcs -- All spans of valid Haddock comments validHaddockCommentSpans = S.fromList . mapMaybe srcSpanToRealSrcSpan . mconcat [ fmap getLoc . listify (only @(LHsDoc GhcPs)), fmap getLocA . listify isIEDocLike ] $ hsModule where isIEDocLike :: LIE GhcPs -> Bool isIEDocLike = \case L _ IEGroup {} -> True L _ IEDoc {} -> True L _ IEDocNamed {} -> True _ -> False only :: a -> Bool only _ = True ---------------------------------------------------------------------------- -- Comment type LComment = RealLocated Comment -- | A wrapper for a single comment. The 'Bool' indicates whether there were -- atoms before beginning of the comment in the original input. The -- 'NonEmpty' list inside contains lines of multiline comment @{- … -}@ or -- just single item\/line otherwise. data Comment = Comment Bool (NonEmpty Text) deriving (Eq, Show, Data) -- | Normalize comment string. Sometimes one multi-line comment is turned -- into several lines for subsequent outputting with correct indentation for -- each line. mkComment :: -- | Lines of original input with their indices [(Int, Text)] -> -- | Raw comment string RealLocated Text -> -- | Remaining lines of original input and the constructed 'Comment' ([(Int, Text)], LComment) mkComment ls (L l s) = (ls', comment) where comment = L l . Comment atomsBefore . removeConseqBlanks . fmap T.stripEnd $ case NE.nonEmpty (T.lines s) of Nothing -> s :| [] Just (x :| xs) -> let getIndent y = if T.all isSpace y then startIndent else T.length (T.takeWhile isSpace y) n = minimum (startIndent : fmap getIndent xs) commentPrefix = if "{-" `T.isPrefixOf` s then "" else "-- " in x :| ((commentPrefix <>) . escapeHaddockTriggers . T.drop n <$> xs) (atomsBefore, ls') = case dropWhile ((< commentLine) . fst) ls of [] -> (False, []) ((_, i) : ls'') -> case T.take 2 (T.stripStart i) of "--" -> (False, ls'') "{-" -> (False, ls'') _ -> (True, ls'') startIndent -- srcSpanStartCol counts columns starting from 1, so we subtract 1 | "{-" `T.isPrefixOf` s = srcSpanStartCol l - 1 -- For single-line comments, the only case where xs != [] is when an -- invalid haddock comment composed of several single-line comments is -- encountered. In that case, each line of xs is prefixed with an -- extra space (not present in the original comment), so we set -- startIndent = 1 to remove this space. | otherwise = 1 commentLine = srcSpanStartLine l -- | Get a collection of lines from a 'Comment'. unComment :: Comment -> NonEmpty Text unComment (Comment _ xs) = xs -- | Check whether the 'Comment' had some non-whitespace atoms in front of -- it in the original input. hasAtomsBefore :: Comment -> Bool hasAtomsBefore (Comment atomsBefore _) = atomsBefore -- | Is this comment multiline-style? isMultilineComment :: Comment -> Bool isMultilineComment (Comment _ (x :| _)) = "{-" `T.isPrefixOf` x ---------------------------------------------------------------------------- -- Helpers -- | Detect and extract stack header if it is present. extractStackHeader :: -- | Comment stream to analyze [RealLocated Text] -> ([RealLocated Text], Maybe LComment) extractStackHeader = \case [] -> ([], Nothing) (x : xs) -> let comment = snd (mkComment [] x) in if isStackHeader (unRealSrcSpan comment) then (xs, Just comment) else (x : xs, Nothing) where isStackHeader (Comment _ (x :| _)) = "stack" `T.isPrefixOf` T.stripStart (T.drop 2 x) -- | Extract pragmas and their associated comments. extractPragmas :: -- | Input Text -> -- | Comment stream to analyze [RealLocated Text] -> ([LComment], [([LComment], Pragma)]) extractPragmas input = go initialLs id id where initialLs = zip [1 ..] (T.lines input) go ls csSoFar pragmasSoFar = \case [] -> (csSoFar [], pragmasSoFar []) (x : xs) -> case parsePragma (unRealSrcSpan x) of Nothing -> let (ls', x') = mkComment ls x in go ls' (csSoFar . (x' :)) pragmasSoFar xs Just pragma -> let combined ys = (csSoFar ys, pragma) go' ls' ys rest = go ls' id (pragmasSoFar . (combined ys :)) rest in case xs of [] -> go' ls [] xs (y : ys) -> let (ls', y') = mkComment ls y in if onTheSameLine (RealSrcSpan (getRealSrcSpan x) Strict.Nothing) (RealSrcSpan (getRealSrcSpan y) Strict.Nothing) then go' ls' [y'] ys else go' ls [] xs -- | Extract @'RealLocated' 'Text'@ from 'GHC.LEpaComment'. unAnnotationComment :: GHC.LEpaComment -> Maybe (RealLocated Text) unAnnotationComment (L (GHC.Anchor anchor _) (GHC.EpaComment eck _)) = case eck of GHC.EpaDocComment s -> let trigger = case s of MultiLineDocString t _ -> Just t NestedDocString t _ -> Just t -- should not occur GeneratedDocString _ -> Nothing in haddock trigger (T.pack $ renderHsDocString s) GHC.EpaDocOptions s -> mkL (T.pack s) GHC.EpaLineComment (T.pack -> s) -> mkL $ case T.take 3 s of "-- " -> s "---" -> s _ -> insertAt " " s 3 GHC.EpaBlockComment s -> mkL (T.pack s) GHC.EpaEofComment -> Nothing where mkL = Just . L anchor insertAt x xs n = T.take (n - 1) xs <> x <> T.drop (n - 1) xs haddock mtrigger = mkL . dashPrefix . escapeHaddockTriggers . (trigger <>) <=< dropBlank where trigger = case mtrigger of Just HsDocStringNext -> "|" Just HsDocStringPrevious -> "^" Just (HsDocStringNamed n) -> "$" <> T.pack n Just (HsDocStringGroup k) -> T.replicate k "*" Nothing -> "" dashPrefix s = "--" <> spaceIfNecessary <> s where spaceIfNecessary = case T.uncons s of Just (c, _) | c /= ' ' -> " " _ -> "" dropBlank :: Text -> Maybe Text dropBlank s = if T.all isSpace s then Nothing else Just s -- | Remove consecutive blank lines. removeConseqBlanks :: NonEmpty Text -> NonEmpty Text removeConseqBlanks (x :| xs) = x :| go (T.null x) id xs where go seenBlank acc = \case [] -> acc [] (y : ys) -> if seenBlank && T.null y then go True acc ys else go (T.null y) (acc . (y :)) ys -- | Escape characters that can turn a line into a Haddock. escapeHaddockTriggers :: Text -> Text escapeHaddockTriggers string | Just (h, _) <- T.uncons string, h `elem` ("|^*$" :: [Char]) = T.cons '\\' string | otherwise = string ormolu-0.7.2.0/src/Ormolu/Parser/Pragma.hs0000644000000000000000000000441307346545000016431 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | A module for parsing of pragmas from comments. module Ormolu.Parser.Pragma ( Pragma (..), parsePragma, ) where import Data.Char (isSpace) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Encoding qualified as T import GHC.Data.FastString (bytesFS, mkFastString) import GHC.Driver.Config.Parser (initParserOpts) import GHC.DynFlags (baseDynFlags) import GHC.Parser.Lexer qualified as L import GHC.Types.SrcLoc import Ormolu.Utils (textToStringBuffer) -- | Ormolu's representation of pragmas. data Pragma = -- | Language pragma PragmaLanguage [Text] | -- | GHC options pragma PragmaOptionsGHC Text | -- | Haddock options pragma PragmaOptionsHaddock Text deriving (Show, Eq) -- | Extract a pragma from a comment if possible, or return 'Nothing' -- otherwise. parsePragma :: -- | Comment to try to parse Text -> Maybe Pragma parsePragma input = do contents <- T.stripSuffix "#-}" =<< T.stripPrefix "{-#" input let (pragmaName, cs) = (T.break isSpace . T.dropWhile isSpace) contents case T.toLower pragmaName of "language" -> PragmaLanguage <$> parseExtensions cs "options_ghc" -> Just $ PragmaOptionsGHC (T.strip cs) "options_haddock" -> Just $ PragmaOptionsHaddock (T.strip cs) _ -> Nothing -- | Assuming the input consists of a series of tokens from a language -- pragma, return the set of enabled extensions. parseExtensions :: Text -> Maybe [Text] parseExtensions str = tokenize str >>= go where go = \case [L.ITconid ext] -> return [fsToText ext] (L.ITconid ext : L.ITcomma : xs) -> (fsToText ext :) <$> go xs _ -> Nothing fsToText = T.decodeUtf8 . bytesFS -- | Tokenize a given input using GHC's lexer. tokenize :: Text -> Maybe [L.Token] tokenize input = case L.unP pLexer parseState of L.PFailed {} -> Nothing L.POk _ x -> Just x where location = mkRealSrcLoc (mkFastString "") 1 1 buffer = textToStringBuffer input parseState = L.initParserState parserOpts buffer location parserOpts = initParserOpts baseDynFlags -- | Haskell lexer. pLexer :: L.P [L.Token] pLexer = go where go = do r <- L.lexer False return case unLoc r of L.ITeof -> return [] x -> (x :) <$> go ormolu-0.7.2.0/src/Ormolu/Parser/Result.hs0000644000000000000000000000224407346545000016500 0ustar0000000000000000-- | A type for result of parsing. module Ormolu.Parser.Result ( SourceSnippet (..), ParseResult (..), ) where import Data.Text (Text) import GHC.Data.EnumSet (EnumSet) import GHC.Hs import GHC.LanguageExtensions.Type import Ormolu.Config (SourceType) import Ormolu.Fixity (ModuleFixityMap) import Ormolu.Parser.CommentStream import Ormolu.Parser.Pragma (Pragma) -- | Either a 'ParseResult', or a raw snippet. data SourceSnippet = RawSnippet Text | ParsedSnippet ParseResult -- | A collection of data that represents a parsed module in Ormolu. data ParseResult = ParseResult { -- | Parsed module or signature prParsedSource :: HsModule GhcPs, -- | Either regular module or signature file prSourceType :: SourceType, -- | Stack header prStackHeader :: Maybe LComment, -- | Pragmas and the associated comments prPragmas :: [([LComment], Pragma)], -- | Comment stream prCommentStream :: CommentStream, -- | Enabled extensions prExtensions :: EnumSet Extension, -- | Fixity map for operators prModuleFixityMap :: ModuleFixityMap, -- | Indentation level, can be non-zero in case of region formatting prIndent :: Int } ormolu-0.7.2.0/src/Ormolu/Printer.hs0000644000000000000000000000170407346545000015411 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | Pretty-printer for Haskell AST. module Ormolu.Printer ( printSnippets, ) where import Data.Text (Text) import Data.Text qualified as T import Ormolu.Parser.Result import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Module import Ormolu.Printer.SpanStream import Ormolu.Processing.Common -- | Render several source snippets. printSnippets :: -- | Result of parsing [SourceSnippet] -> -- | Resulting rendition Text printSnippets = T.concat . fmap printSnippet where printSnippet = \case ParsedSnippet ParseResult {..} -> reindent prIndent $ runR ( p_hsModule prStackHeader prPragmas prParsedSource ) (mkSpanStream prParsedSource) prCommentStream prSourceType prExtensions prModuleFixityMap RawSnippet r -> r ormolu-0.7.2.0/src/Ormolu/Printer/0000755000000000000000000000000007346545000015053 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Printer/Combinators.hs0000644000000000000000000002134407346545000017673 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | Printing combinators. The definitions here are presented in such an -- order so you can just go through the Haddocks and by the end of the file -- you should have a pretty good idea how to program rendering logic. module Ormolu.Printer.Combinators ( -- * The 'R' monad R, runR, getEnclosingSpan, getEnclosingSpanWhere, isExtensionEnabled, -- * Combinators -- ** Basic txt, atom, space, newline, inci, inciIf, askSourceType, askModuleFixityMap, located, encloseLocated, located', switchLayout, Layout (..), vlayout, getLayout, breakpoint, breakpoint', -- ** Formatting lists sep, sepSemi, canUseBraces, useBraces, dontUseBraces, -- ** Wrapping BracketStyle (..), sitcc, backticks, banana, braces, brackets, parens, parensHash, pragmaBraces, pragma, -- ** Literals comma, commaDel, equals, -- ** Stateful markers SpanMark (..), spanMarkSpan, HaddockStyle (..), setSpanMark, getSpanMark, -- ** Placement Placement (..), placeHanging, ) where import Control.Monad import Data.List (intersperse) import Data.Text (Text) import GHC.Data.Strict qualified as Strict import GHC.Types.SrcLoc import Ormolu.Printer.Comments import Ormolu.Printer.Internal import Ormolu.Utils (HasSrcSpan (..), getLoc') ---------------------------------------------------------------------------- -- Basic -- | Indent the inner expression if the first argument is 'True'. inciIf :: -- | Whether to indent Bool -> -- | The expression to indent R () -> R () inciIf b m = if b then inci m else m -- | Enter a 'GenLocated' entity. This combinator handles outputting comments -- and sets layout (single-line vs multi-line) for the inner computation. -- Roughly, the rule for using 'located' is that every time there is a -- 'Located' wrapper, it should be “discharged” with a corresponding -- 'located' invocation. located :: (HasSrcSpan l) => -- | Thing to enter GenLocated l a -> -- | How to render inner value (a -> R ()) -> R () located (L l' a) f = case loc' l' of UnhelpfulSpan _ -> f a RealSrcSpan l _ -> do spitPrecedingComments l withEnclosingSpan l $ switchLayout [RealSrcSpan l Strict.Nothing] (f a) spitFollowingComments l -- | Similar to 'located', but when the "payload" is an empty list, print -- virtual elements at the start and end of the source span to prevent comments -- from "floating out". encloseLocated :: (HasSrcSpan l) => GenLocated l [a] -> ([a] -> R ()) -> R () encloseLocated la f = located la $ \a -> do when (null a) $ located (L startSpan ()) pure f a when (null a) $ located (L endSpan ()) pure where l = getLoc' la (startLoc, endLoc) = (srcSpanStart l, srcSpanEnd l) (startSpan, endSpan) = (mkSrcSpan startLoc startLoc, mkSrcSpan endLoc endLoc) -- | A version of 'located' with arguments flipped. located' :: (HasSrcSpan l) => -- | How to render inner value (a -> R ()) -> -- | Thing to enter GenLocated l a -> R () located' = flip located -- | Set layout according to combination of given 'SrcSpan's for a given. -- Use this only when you need to set layout based on e.g. combined span of -- several elements when there is no corresponding 'Located' wrapper -- provided by GHC AST. It is relatively rare that this one is needed. -- -- Given empty list this function will set layout to single line. switchLayout :: -- | Span that controls layout [SrcSpan] -> -- | Computation to run with changed layout R () -> R () switchLayout spans' = enterLayout (spansLayout spans') -- | Which layout combined spans result in? spansLayout :: [SrcSpan] -> Layout spansLayout = \case [] -> SingleLine (x : xs) -> if isOneLineSpan (foldr combineSrcSpans x xs) then SingleLine else MultiLine -- | Insert a space if enclosing layout is single-line, or newline if it's -- multiline. -- -- > breakpoint = vlayout space newline breakpoint :: R () breakpoint = vlayout space newline -- | Similar to 'breakpoint' but outputs nothing in case of single-line -- layout. -- -- > breakpoint' = vlayout (return ()) newline breakpoint' :: R () breakpoint' = vlayout (return ()) newline ---------------------------------------------------------------------------- -- Formatting lists -- | Render a collection of elements inserting a separator between them. sep :: -- | Separator R () -> -- | How to render an element (a -> R ()) -> -- | Elements to render [a] -> R () sep s f xs = sequence_ (intersperse s (f <$> xs)) -- | Render a collection of elements layout-sensitively using given printer, -- inserting semicolons if necessary and respecting 'useBraces' and -- 'dontUseBraces' combinators. -- -- > useBraces $ sepSemi txt ["foo", "bar"] -- > == vlayout (txt "{ foo; bar }") (txt "foo\nbar") -- -- > dontUseBraces $ sepSemi txt ["foo", "bar"] -- > == vlayout (txt "foo; bar") (txt "foo\nbar") sepSemi :: -- | How to render an element (a -> R ()) -> -- | Elements to render [a] -> R () sepSemi f xs = vlayout singleLine multiLine where singleLine = do ub <- canUseBraces case xs of [] -> when ub $ txt "{}" xs' -> if ub then do txt "{" space sep (txt ";" >> space) (dontUseBraces . f) xs' space txt "}" else sep (txt ";" >> space) f xs' multiLine = sep newline (dontUseBraces . f) xs ---------------------------------------------------------------------------- -- Wrapping -- | 'BracketStyle' controlling how closing bracket is rendered. data BracketStyle = -- | Normal N | -- | Shifted one level S deriving (Eq, Show) -- | Surround given entity by backticks. backticks :: R () -> R () backticks m = do txt "`" m txt "`" -- | Surround given entity by banana brackets (i.e., from arrow notation.) banana :: BracketStyle -> R () -> R () banana = brackets_ True "(|" "|)" -- | Surround given entity by curly braces @{@ and @}@. braces :: BracketStyle -> R () -> R () braces = brackets_ False "{" "}" -- | Surround given entity by square brackets @[@ and @]@. brackets :: BracketStyle -> R () -> R () brackets = brackets_ False "[" "]" -- | Surround given entity by parentheses @(@ and @)@. parens :: BracketStyle -> R () -> R () parens = brackets_ False "(" ")" -- | Surround given entity by @(# @ and @ #)@. parensHash :: BracketStyle -> R () -> R () parensHash = brackets_ True "(#" "#)" -- | Braces as used for pragmas: @{-#@ and @#-}@. pragmaBraces :: R () -> R () pragmaBraces m = sitcc $ do txt "{-#" space m breakpoint inci (txt "#-}") -- | Surround the body with a pragma name and 'pragmaBraces'. pragma :: -- | Pragma text Text -> -- | Pragma body R () -> R () pragma pragmaText body = pragmaBraces $ do txt pragmaText breakpoint body -- | A helper for defining wrappers like 'parens' and 'braces'. brackets_ :: -- | Insert breakpoints around brackets Bool -> -- | Opening bracket Text -> -- | Closing bracket Text -> -- | Bracket style BracketStyle -> -- | Inner expression R () -> R () brackets_ needBreaks open close style m = sitcc (vlayout singleLine multiLine) where singleLine = do txt open when needBreaks space m when needBreaks space txt close multiLine = do txt open if needBreaks then newline >> inci m else space >> sitcc m newline inciIf (style == S) (txt close) ---------------------------------------------------------------------------- -- Literals -- | Print @,@. comma :: R () comma = txt "," -- | Delimiting combination with 'comma'. To be used with 'sep'. commaDel :: R () commaDel = comma >> breakpoint -- | Print @=@. Do not use @'txt' "="@. equals :: R () equals = interferingTxt "=" ---------------------------------------------------------------------------- -- Placement -- | Expression placement. This marks the places where expressions that -- implement handing forms may use them. data Placement = -- | Multi-line layout should cause -- insertion of a newline and indentation -- bump Normal | -- | Expressions that have hanging form -- should use it and avoid bumping one level -- of indentation Hanging deriving (Eq, Show) -- | Place a thing that may have a hanging form. This function handles how -- to separate it from preceding expressions and whether to bump indentation -- depending on what sort of expression we have. placeHanging :: Placement -> R () -> R () placeHanging placement m = case placement of Hanging -> do space m Normal -> do breakpoint inci m ormolu-0.7.2.0/src/Ormolu/Printer/Comments.hs0000644000000000000000000002277707346545000017213 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- | Helpers for formatting of comments. This is low-level code, use -- "Ormolu.Printer.Combinators" unless you know what you are doing. module Ormolu.Printer.Comments ( spitPrecedingComments, spitFollowingComments, spitRemainingComments, spitCommentNow, spitCommentPending, ) where import Control.Monad import Data.List.NonEmpty qualified as NE import Data.Maybe (listToMaybe) import GHC.Types.SrcLoc import Ormolu.Parser.CommentStream import Ormolu.Printer.Internal ---------------------------------------------------------------------------- -- Top-level -- | Output all preceding comments for an element at given location. spitPrecedingComments :: -- | Span of the element to attach comments to RealSrcSpan -> R () spitPrecedingComments ref = do comments <- handleCommentSeries (spitPrecedingComment ref) when (not $ null comments) $ do lastMark <- getSpanMark -- Insert a blank line between the preceding comments and the thing -- after them if there was a blank line in the input. when (needsNewlineBefore ref lastMark) newline -- | Output all comments following an element at given location. spitFollowingComments :: -- | Span of the element to attach comments to RealSrcSpan -> R () spitFollowingComments ref = do trimSpanStream ref void $ handleCommentSeries (spitFollowingComment ref) -- | Output all remaining comments in the comment stream. spitRemainingComments :: R () spitRemainingComments = do -- Make sure we have a blank a line between the last definition and the -- trailing comments. newline void $ handleCommentSeries spitRemainingComment ---------------------------------------------------------------------------- -- Single-comment functions -- | Output a single preceding comment for an element at given location. spitPrecedingComment :: -- | Span of the element to attach comments to RealSrcSpan -> -- | The comment that was output, if any R (Maybe LComment) spitPrecedingComment ref = do mlastMark <- getSpanMark let p (L l _) = realSrcSpanEnd l <= realSrcSpanStart ref withPoppedComment p $ \l comment -> do lineSpans <- thisLineSpans let thisCommentLine = srcLocLine (realSrcSpanStart l) needsNewline = case listToMaybe lineSpans of Nothing -> False Just spn -> srcLocLine (realSrcSpanEnd spn) /= thisCommentLine when (needsNewline || needsNewlineBefore l mlastMark) newline spitCommentNow l comment if theSameLinePre l ref then space else newline -- | Output a comment that follows element at given location immediately on -- the same line, if there is any. spitFollowingComment :: -- | AST element to attach comments to RealSrcSpan -> -- | The comment that was output, if any R (Maybe LComment) spitFollowingComment ref = do mlastMark <- getSpanMark mnSpn <- nextEltSpan -- Get first enclosing span that is not equal to reference span, i.e. it's -- truly something enclosing the AST element. meSpn <- getEnclosingSpanWhere (/= ref) withPoppedComment (commentFollowsElt ref mnSpn meSpn mlastMark) $ \l comment -> if theSameLinePost l ref then if isMultilineComment comment then space >> spitCommentNow l comment else spitCommentPending OnTheSameLine l comment else do when (needsNewlineBefore l mlastMark) $ registerPendingCommentLine OnNextLine "" spitCommentPending OnNextLine l comment -- | Output a single remaining comment from the comment stream. spitRemainingComment :: -- | The comment that was output, if any R (Maybe LComment) spitRemainingComment = do mlastMark <- getSpanMark withPoppedComment (const True) $ \l comment -> do when (needsNewlineBefore l mlastMark) newline spitCommentNow l comment newline ---------------------------------------------------------------------------- -- Helpers -- | Output series of comments. handleCommentSeries :: -- | Output and return the next comment, if any R (Maybe LComment) -> -- | The comments outputted R [LComment] handleCommentSeries f = go where go = do mComment <- f case mComment of Nothing -> return [] Just comment -> (comment :) <$> go -- | Try to pop a comment using given predicate and if there is a comment -- matching the predicate, print it out. withPoppedComment :: -- | Comment predicate (LComment -> Bool) -> -- | Printing function (RealSrcSpan -> Comment -> R ()) -> -- | Are we done? R (Maybe LComment) withPoppedComment p f = do r <- popComment p case r of Nothing -> return () Just (L l comment) -> f l comment return r -- | Determine if we need to insert a newline between current comment and -- last printed comment. needsNewlineBefore :: -- | Current comment span RealSrcSpan -> -- | Last printed comment span Maybe SpanMark -> Bool needsNewlineBefore _ (Just (HaddockSpan _ _)) = True needsNewlineBefore l mlastMark = case spanMarkSpan <$> mlastMark of Nothing -> False Just lastMark -> srcSpanStartLine l > srcSpanEndLine lastMark + 1 -- | Is the preceding comment and AST element are on the same line? theSameLinePre :: -- | Current comment span RealSrcSpan -> -- | AST element location RealSrcSpan -> Bool theSameLinePre l ref = srcSpanEndLine l == srcSpanStartLine ref -- | Is the following comment and AST element are on the same line? theSameLinePost :: -- | Current comment span RealSrcSpan -> -- | AST element location RealSrcSpan -> Bool theSameLinePost l ref = srcSpanStartLine l == srcSpanEndLine ref -- | Determine if given comment follows AST element. commentFollowsElt :: -- | Location of AST element RealSrcSpan -> -- | Location of next AST element Maybe RealSrcSpan -> -- | Location of enclosing AST element Maybe RealSrcSpan -> -- | Location of last comment in the series Maybe SpanMark -> -- | Comment to test LComment -> Bool commentFollowsElt ref mnSpn meSpn mlastMark (L l comment) = -- A comment follows a AST element if all 4 conditions are satisfied: goesAfter && logicallyFollows && noEltBetween && (continuation || lastInEnclosing || supersedesParentElt) where -- 1) The comment starts after end of the AST element: goesAfter = realSrcSpanStart l >= realSrcSpanEnd ref -- 2) The comment logically belongs to the element, four cases: logicallyFollows = theSameLinePost l ref -- a) it's on the same line || continuation -- b) it's a continuation of a comment block || lastInEnclosing -- c) it's the last element in the enclosing construct -- 3) There is no other AST element between this element and the comment: noEltBetween = case mnSpn of Nothing -> True Just nspn -> realSrcSpanStart nspn >= realSrcSpanEnd l -- 4) Less obvious: if column of comment is closer to the start of -- enclosing element, it probably related to that parent element, not to -- the current child element. This rule is important because otherwise -- all comments would end up assigned to closest inner elements, and -- parent elements won't have a chance to get any comments assigned to -- them. This is not OK because comments will get indented according to -- the AST elements they are attached to. -- -- Skip this rule if the comment is a continuation of a comment block. supersedesParentElt = case meSpn of Nothing -> True Just espn -> let startColumn = srcLocCol . realSrcSpanStart in startColumn espn > startColumn ref || ( abs (startColumn espn - startColumn l) >= abs (startColumn ref - startColumn l) ) continuation = -- A comment is a continuation when it doesn't have non-whitespace -- lexemes in front of it and goes right after the previous comment. not (hasAtomsBefore comment) && ( case mlastMark of Just (HaddockSpan _ _) -> False Just (CommentSpan spn) -> srcSpanEndLine spn + 1 == srcSpanStartLine l _ -> False ) lastInEnclosing = case meSpn of -- When there is no enclosing element, return false Nothing -> False -- When there is an enclosing element, Just espn -> let -- Make sure that the comment is inside the enclosing element insideParent = realSrcSpanEnd l <= realSrcSpanEnd espn -- And check if the next element is outside of the parent nextOutsideParent = case mnSpn of Nothing -> True Just nspn -> realSrcSpanEnd espn < realSrcSpanStart nspn in insideParent && nextOutsideParent -- | Output a 'Comment' immediately. This is a low-level printing function. spitCommentNow :: RealSrcSpan -> Comment -> R () spitCommentNow spn comment = do sitcc . sequence_ . NE.intersperse newline . fmap txt . unComment $ comment setSpanMark (CommentSpan spn) -- | Output a 'Comment' at the end of correct line or after it depending on -- 'CommentPosition'. Used for comments that may potentially follow on the -- same line as something we just rendered, but not immediately after it. spitCommentPending :: CommentPosition -> RealSrcSpan -> Comment -> R () spitCommentPending position spn comment = do let wrapper = case position of OnTheSameLine -> sitcc OnNextLine -> id wrapper . sequence_ . NE.toList . fmap (registerPendingCommentLine position) . unComment $ comment setSpanMark (CommentSpan spn) ormolu-0.7.2.0/src/Ormolu/Printer/Internal.hs0000644000000000000000000004170007346545000017165 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | In most cases import "Ormolu.Printer.Combinators" instead, these -- functions are the low-level building blocks and should not be used on -- their own. The 'R' monad is re-exported from "Ormolu.Printer.Combinators" -- as well. module Ormolu.Printer.Internal ( -- * The 'R' monad R, runR, -- * Internal functions txt, interferingTxt, atom, space, newline, askSourceType, askModuleFixityMap, inci, sitcc, Layout (..), enterLayout, vlayout, getLayout, -- * Helpers for braces useBraces, dontUseBraces, canUseBraces, -- * Special helpers for comment placement CommentPosition (..), registerPendingCommentLine, trimSpanStream, nextEltSpan, popComment, getEnclosingSpan, getEnclosingSpanWhere, withEnclosingSpan, thisLineSpans, -- * Stateful markers SpanMark (..), spanMarkSpan, HaddockStyle (..), setSpanMark, getSpanMark, -- * Extensions isExtensionEnabled, ) where import Control.Monad import Control.Monad.Reader import Control.Monad.State.Strict import Data.Bool (bool) import Data.Coerce import Data.List (find) import Data.Maybe (listToMaybe) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Lazy qualified as TL import Data.Text.Lazy.Builder import GHC.Data.EnumSet (EnumSet) import GHC.Data.EnumSet qualified as EnumSet import GHC.LanguageExtensions.Type import GHC.Types.SrcLoc import GHC.Utils.Outputable (Outputable) import Ormolu.Config (SourceType (..)) import Ormolu.Fixity (ModuleFixityMap) import Ormolu.Parser.CommentStream import Ormolu.Printer.SpanStream import Ormolu.Utils (showOutputable) ---------------------------------------------------------------------------- -- The 'R' monad -- | The 'R' monad hosts combinators that allow us to describe how to render -- AST. newtype R a = R (ReaderT RC (State SC) a) deriving (Functor, Applicative, Monad) -- | Reader context of 'R'. This should be used when we control rendering by -- enclosing certain expressions with wrappers. data RC = RC { -- | Indentation level, as the column index we need to start from after -- a newline if we break lines rcIndent :: !Int, -- | Current layout rcLayout :: Layout, -- | Spans of enclosing elements of AST rcEnclosingSpans :: [RealSrcSpan], -- | Whether the last expression in the layout can use braces rcCanUseBraces :: Bool, -- | Enabled extensions rcExtensions :: EnumSet Extension, -- | Whether the source is a signature or a regular module rcSourceType :: SourceType, -- | Module fixity map rcModuleFixityMap :: ModuleFixityMap } -- | State context of 'R'. data SC = SC { -- | Index of the next column to render scColumn :: !Int, -- | Indentation level that was used for the current line scIndent :: !Int, -- | Rendered source code so far scBuilder :: Builder, -- | Span stream scSpanStream :: SpanStream, -- | Spans of atoms that have been printed on the current line so far scThisLineSpans :: [RealSrcSpan], -- | Comment stream scCommentStream :: CommentStream, -- | Pending comment lines (in reverse order) to be inserted before next -- newline, 'Int' is the indentation level scPendingComments :: ![(CommentPosition, Text)], -- | Whether to output a space before the next output scRequestedDelimiter :: !RequestedDelimiter, -- | An auxiliary marker for keeping track of last output element scSpanMark :: !(Maybe SpanMark) } -- | Make sure next output is delimited by one of the following. data RequestedDelimiter = -- | A space RequestedSpace | -- | A newline RequestedNewline | -- | Nothing RequestedNothing | -- | We just output a newline AfterNewline | -- | We haven't printed anything yet VeryBeginning deriving (Eq, Show) -- | 'Layout' options. data Layout = -- | Put everything on single line SingleLine | -- | Use multiple lines MultiLine deriving (Eq, Show) -- | Modes for rendering of pending comments. data CommentPosition = -- | Put the comment on the same line OnTheSameLine | -- | Put the comment on next line OnNextLine deriving (Eq, Show) -- | Run 'R' monad. runR :: -- | Monad to run R () -> -- | Span stream SpanStream -> -- | Comment stream CommentStream -> -- | Whether the source is a signature or a regular module SourceType -> -- | Enabled extensions EnumSet Extension -> -- | Module fixity map ModuleFixityMap -> -- | Resulting rendition Text runR (R m) sstream cstream sourceType extensions moduleFixityMap = TL.toStrict . toLazyText . scBuilder $ execState (runReaderT m rc) sc where rc = RC { rcIndent = 0, rcLayout = MultiLine, rcEnclosingSpans = [], rcCanUseBraces = False, rcExtensions = extensions, rcSourceType = sourceType, rcModuleFixityMap = moduleFixityMap } sc = SC { scColumn = 0, scIndent = 0, scBuilder = mempty, scSpanStream = sstream, scThisLineSpans = [], scCommentStream = cstream, scPendingComments = [], scRequestedDelimiter = VeryBeginning, scSpanMark = Nothing } ---------------------------------------------------------------------------- -- Internal functions -- | Type of the thing to output. Influences the primary low-level rendering -- function 'spit'. data SpitType = -- | Simple opaque text that breaks comment series. SimpleText | -- | Like 'SimpleText', but assume that when this text is inserted it -- will separate an 'Atom' and its pending comments, so insert an extra -- 'newline' in that case to force the pending comments and continue on -- a fresh line. InterferingText | -- | An atom that typically have span information in the AST and can -- have comments attached to it. Atom | -- | Used for rendering comment lines. CommentPart deriving (Show, Eq) -- | Output a fixed 'Text' fragment. The argument may not contain any line -- breaks. 'txt' is used to output all sorts of “fixed” bits of syntax like -- keywords and pipes @|@ in functional dependencies. -- -- To separate various bits of syntax with white space use 'space' instead -- of @'txt' " "@. To output 'Outputable' Haskell entities like numbers use -- 'atom'. txt :: -- | 'Text' to output Text -> R () txt = spit SimpleText -- | Similar to 'txt' but the text inserted this way is assumed to break the -- “link” between the preceding atom and its pending comments. interferingTxt :: -- | 'Text' to output Text -> R () interferingTxt = spit InterferingText -- | Output 'Outputable' fragment of AST. This can be used to output numeric -- literals and similar. Everything that doesn't have inner structure but -- does have an 'Outputable' instance. atom :: (Outputable a) => a -> R () atom = spit Atom . T.pack . showOutputable -- | Low-level non-public helper to define 'txt' and 'atom'. spit :: -- | Type of the thing to spit SpitType -> -- | 'Text' to output Text -> R () spit _ "" = return () spit stype text = do requestedDel <- R (gets scRequestedDelimiter) pendingComments <- R (gets scPendingComments) when (stype == InterferingText && not (null pendingComments)) newline case requestedDel of RequestedNewline -> do R . modify $ \sc -> sc { scRequestedDelimiter = RequestedNothing } case stype of CommentPart -> newlineRaw _ -> newline _ -> return () R $ do i <- asks rcIndent c <- gets scColumn closestEnclosing <- asks (listToMaybe . rcEnclosingSpans) let indentedTxt = spaces <> text spaces = T.replicate spacesN " " spacesN = if c == 0 then i else bool 0 1 (requestedDel == RequestedSpace) modify $ \sc -> sc { scBuilder = scBuilder sc <> fromText indentedTxt, scColumn = scColumn sc + T.length indentedTxt, scIndent = if c == 0 then i else scIndent sc, scThisLineSpans = let xs = scThisLineSpans sc in case stype of Atom -> case closestEnclosing of Nothing -> xs Just x -> x : xs _ -> xs, scRequestedDelimiter = RequestedNothing, scSpanMark = -- If there are pending comments, do not reset last comment -- location. if (stype == CommentPart) || (not . null . scPendingComments) sc then scSpanMark sc else Nothing } -- | This primitive /does not/ necessarily output a space. It just ensures -- that the next thing that will be printed on the same line will be -- separated by a single space from the previous output. Using this -- combinator twice results in at most one space. -- -- In practice this design prevents trailing white space and makes it hard -- to output more than one delimiting space in a row, which is what we -- usually want. space :: R () space = R . modify $ \sc -> sc { scRequestedDelimiter = case scRequestedDelimiter sc of RequestedNothing -> RequestedSpace other -> other } -- | Output a newline. First time 'newline' is used after some non-'newline' -- output it gets inserted immediately. Second use of 'newline' does not -- output anything but makes sure that the next non-white space output will -- be prefixed by a newline. Using 'newline' more than twice in a row has no -- effect. Also, using 'newline' at the very beginning has no effect, this -- is to avoid leading whitespace. -- -- Similarly to 'space', this design prevents trailing newlines and makes it -- hard to output more than one blank newline in a row. newline :: R () newline = do indent <- R (gets scIndent) cs <- reverse <$> R (gets scPendingComments) case cs of [] -> newlineRaw ((position, _) : _) -> do case position of OnTheSameLine -> space OnNextLine -> newlineRaw R . forM_ cs $ \(_, text) -> let modRC rc = rc { rcIndent = indent } R m = do unless (T.null text) $ spit CommentPart text newlineRaw in local modRC m R . modify $ \sc -> sc { scPendingComments = [] } -- | Low-level newline primitive. This one always just inserts a newline, no -- hooks can be attached. newlineRaw :: R () newlineRaw = R . modify $ \sc -> let requestedDel = scRequestedDelimiter sc builderSoFar = scBuilder sc in sc { scBuilder = case requestedDel of AfterNewline -> builderSoFar RequestedNewline -> builderSoFar VeryBeginning -> builderSoFar _ -> builderSoFar <> "\n", scColumn = 0, scIndent = 0, scThisLineSpans = [], scRequestedDelimiter = case scRequestedDelimiter sc of AfterNewline -> RequestedNewline RequestedNewline -> RequestedNewline VeryBeginning -> VeryBeginning _ -> AfterNewline } -- | Return the source type. askSourceType :: R SourceType askSourceType = R (asks rcSourceType) -- | Retrieve the module fixity map. askModuleFixityMap :: R ModuleFixityMap askModuleFixityMap = R (asks rcModuleFixityMap) inciBy :: Int -> R () -> R () inciBy step (R m) = R (local modRC m) where modRC rc = rc { rcIndent = rcIndent rc + step } -- | Increase indentation level by one indentation step for the inner -- computation. 'inci' should be used when a part of code must be more -- indented relative to the parts outside of 'inci' in order for the output -- to be valid Haskell. When layout is single-line there is no obvious -- effect, but with multi-line layout correct indentation levels matter. inci :: R () -> R () inci = inciBy indentStep -- | Set indentation level for the inner computation equal to current -- column. This makes sure that the entire inner block is uniformly -- \"shifted\" to the right. sitcc :: R () -> R () sitcc (R m) = do requestedDel <- R (gets scRequestedDelimiter) i <- R (asks rcIndent) c <- R (gets scColumn) let modRC rc = rc { rcIndent = max i (c + bool 0 1 (requestedDel == RequestedSpace)) } R (local modRC m) -- | Set 'Layout' for internal computation. enterLayout :: Layout -> R () -> R () enterLayout l (R m) = R (local modRC m) where modRC rc = rc { rcLayout = l } -- | Do one or another thing depending on current 'Layout'. vlayout :: -- | Single line R a -> -- | Multi line R a -> R a vlayout sline mline = do l <- getLayout case l of SingleLine -> sline MultiLine -> mline -- | Get current 'Layout'. getLayout :: R Layout getLayout = R (asks rcLayout) ---------------------------------------------------------------------------- -- Special helpers for comment placement -- | Register a comment line for outputting. It will be inserted right -- before next newline. When the comment goes after something else on the -- same line, a space will be inserted between preceding text and the -- comment when necessary. registerPendingCommentLine :: -- | Comment position CommentPosition -> -- | 'Text' to output Text -> R () registerPendingCommentLine position text = R $ do modify $ \sc -> sc { scPendingComments = (position, text) : scPendingComments sc } -- | Drop elements that begin before or at the same place as given -- 'SrcSpan'. trimSpanStream :: -- | Reference span RealSrcSpan -> R () trimSpanStream ref = do let leRef :: RealSrcSpan -> Bool leRef x = realSrcSpanStart x <= realSrcSpanStart ref R . modify $ \sc -> sc { scSpanStream = coerce (dropWhile leRef) (scSpanStream sc) } -- | Get location of next element in AST. nextEltSpan :: R (Maybe RealSrcSpan) nextEltSpan = listToMaybe . coerce <$> R (gets scSpanStream) -- | Pop a 'Comment' from the 'CommentStream' if given predicate is -- satisfied and there are comments in the stream. popComment :: (LComment -> Bool) -> R (Maybe LComment) popComment f = R $ do CommentStream cstream <- gets scCommentStream case cstream of (x : xs) | f x -> do modify $ \sc -> sc {scCommentStream = CommentStream xs} return $ Just x _ -> return Nothing -- | Get the immediately enclosing 'RealSrcSpan'. getEnclosingSpan :: R (Maybe RealSrcSpan) getEnclosingSpan = getEnclosingSpanWhere (const True) -- | Get the first enclosing 'RealSrcSpan' that satisfies given predicate. getEnclosingSpanWhere :: -- | Predicate to use (RealSrcSpan -> Bool) -> R (Maybe RealSrcSpan) getEnclosingSpanWhere f = find f <$> R (asks rcEnclosingSpans) -- | Set 'RealSrcSpan' of enclosing span for the given computation. withEnclosingSpan :: RealSrcSpan -> R () -> R () withEnclosingSpan spn (R m) = R (local modRC m) where modRC rc = rc { rcEnclosingSpans = spn : rcEnclosingSpans rc } -- | Get spans on this line so far. thisLineSpans :: R [RealSrcSpan] thisLineSpans = R (gets scThisLineSpans) ---------------------------------------------------------------------------- -- Stateful markers -- | An auxiliary marker for keeping track of last output element. data SpanMark = -- | Haddock comment HaddockSpan HaddockStyle RealSrcSpan | -- | Non-haddock comment CommentSpan RealSrcSpan | -- | A statement in a do-block and such span StatementSpan RealSrcSpan -- | Project 'RealSrcSpan' from 'SpanMark'. spanMarkSpan :: SpanMark -> RealSrcSpan spanMarkSpan = \case HaddockSpan _ s -> s CommentSpan s -> s StatementSpan s -> s -- | Haddock string style. data HaddockStyle = -- | @-- |@ Pipe | -- | @-- ^@ Caret | -- | @-- *@ Asterisk Int | -- | @-- $@ Named String -- | Set span of last output comment. setSpanMark :: -- | Span mark to set SpanMark -> R () setSpanMark spnMark = R . modify $ \sc -> sc { scSpanMark = Just spnMark } -- | Get span of last output comment. getSpanMark :: R (Maybe SpanMark) getSpanMark = R (gets scSpanMark) ---------------------------------------------------------------------------- -- Helpers for braces -- | Make the inner computation use braces around single-line layouts. useBraces :: R () -> R () useBraces (R r) = R (local (\i -> i {rcCanUseBraces = True}) r) -- | Make the inner computation omit braces around single-line layouts. dontUseBraces :: R () -> R () dontUseBraces (R r) = R (local (\i -> i {rcCanUseBraces = False}) r) -- | Return 'True' if we can use braces in this context. canUseBraces :: R Bool canUseBraces = R (asks rcCanUseBraces) ---------------------------------------------------------------------------- -- Constants -- | Indentation step. indentStep :: Int indentStep = 2 ---------------------------------------------------------------------------- -- Extensions isExtensionEnabled :: Extension -> R Bool isExtensionEnabled ext = R . asks $ EnumSet.member ext . rcExtensions ormolu-0.7.2.0/src/Ormolu/Printer/Meat/0000755000000000000000000000000007346545000015741 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Common.hs0000644000000000000000000001305107346545000017525 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Rendering of commonly useful bits. module Ormolu.Printer.Meat.Common ( FamilyStyle (..), p_hsmodName, p_ieWrappedName, p_rdrName, p_qualName, p_infixDefHelper, p_hsDoc, p_hsDocName, p_sourceText, ) where import Control.Monad import Data.Text qualified as T import GHC.Hs.Doc import GHC.Hs.Extension (GhcPs) import GHC.Hs.ImpExp import GHC.LanguageExtensions.Type (Extension (..)) import GHC.Parser.Annotation import GHC.Types.Name.Occurrence (OccName (..), occNameString) import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import Language.Haskell.Syntax.Module.Name import Ormolu.Config (SourceType (..)) import Ormolu.Printer.Combinators import Ormolu.Utils -- | Data and type family style. data FamilyStyle = -- | Declarations in type classes Associated | -- | Top-level declarations Free -- | Outputs the name of the module-like entity, preceeded by the correct prefix ("module" or "signature"). p_hsmodName :: ModuleName -> R () p_hsmodName mname = do sourceType <- askSourceType txt $ case sourceType of ModuleSource -> "module" SignatureSource -> "signature" space atom mname p_ieWrappedName :: IEWrappedName GhcPs -> R () p_ieWrappedName = \case IEName _ x -> p_rdrName x IEPattern _ x -> do txt "pattern" space p_rdrName x IEType _ x -> do txt "type" space p_rdrName x -- | Render a @'LocatedN' 'RdrName'@. p_rdrName :: LocatedN RdrName -> R () p_rdrName l = located l $ \x -> do unboxedSums <- isExtensionEnabled UnboxedSums let wrapper = \case EpAnn {anns} -> case anns of NameAnnQuote {nann_quoted} -> tickPrefix . wrapper (ann nann_quoted) NameAnn {nann_adornment = NameParens} -> parens N . handleUnboxedSumsAndHashInteraction NameAnn {nann_adornment = NameBackquotes} -> backticks -- special case for unboxed unit tuples NameAnnOnly {nann_adornment = NameParensHash} -> const $ txt "(# #)" _ -> id EpAnnNotUsed -> id -- When UnboxedSums is enabled, `(#` is a single lexeme, so we have to -- insert spaces when we have a parenthesized operator starting with `#`. handleUnboxedSumsAndHashInteraction | unboxedSums, -- Qualified names do not start wth a `#`. Unqual (occNameString -> '#' : _) <- x = \y -> space *> y <* space | otherwise = id wrapper (ann . getLoc $ l) $ case x of Unqual occName -> atom occName Qual mname occName -> p_qualName mname occName Orig _ occName -> -- This is used when GHC generates code that will be fed into -- the renamer (e.g. from deriving clauses), but where we want -- to say that something comes from given module which is not -- specified in the source code, e.g. @Prelude.map@. -- -- My current understanding is that the provided module name -- serves no purpose for us and can be safely ignored. atom occName Exact name -> atom name where tickPrefix y = txt "'" *> y p_qualName :: ModuleName -> OccName -> R () p_qualName mname occName = do atom mname txt "." atom occName -- | A helper for formatting infix constructions in lhs of definitions. p_infixDefHelper :: -- | Whether to format in infix style Bool -> -- | Whether to bump indentation for arguments Bool -> -- | How to print the operator\/name R () -> -- | How to print the arguments [R ()] -> R () p_infixDefHelper isInfix indentArgs name args = case (isInfix, args) of (True, p0 : p1 : ps) -> do let parens' = if null ps then id else parens N parens' $ do p0 breakpoint inci . sitcc $ do name space p1 unless (null ps) . inciIf indentArgs $ do breakpoint sitcc (sep breakpoint sitcc ps) (_, ps) -> do name unless (null ps) $ do breakpoint inciIf indentArgs $ sitcc (sep breakpoint sitcc args) -- | Print a Haddock. p_hsDoc :: -- | Haddock style HaddockStyle -> -- | Finish the doc string with a newline Bool -> -- | The 'LHsDoc' to render LHsDoc GhcPs -> R () p_hsDoc hstyle needsNewline (L l str) = do let isCommentSpan = \case HaddockSpan _ _ -> True CommentSpan _ -> True _ -> False goesAfterComment <- maybe False isCommentSpan <$> getSpanMark -- Make sure the Haddock is separated by a newline from other comments. when goesAfterComment newline let docStringLines = splitDocString $ hsDocString str forM_ (zip docStringLines (True : repeat False)) $ \(x, isFirst) -> do if isFirst then case hstyle of Pipe -> txt "-- |" Caret -> txt "-- ^" Asterisk n -> txt ("-- " <> T.replicate n "*") Named name -> p_hsDocName name else newline >> txt "--" space unless (T.null x) (txt x) when needsNewline newline case l of UnhelpfulSpan _ -> -- It's often the case that the comment itself doesn't have a span -- attached to it and instead its location can be obtained from -- nearest enclosing span. getEnclosingSpan >>= mapM_ (setSpanMark . HaddockSpan hstyle) RealSrcSpan spn _ -> setSpanMark (HaddockSpan hstyle spn) -- | Print anchor of named doc section. p_hsDocName :: String -> R () p_hsDocName name = txt ("-- $" <> T.pack name) p_sourceText :: SourceText -> R () p_sourceText = \case NoSourceText -> pure () SourceText s -> txt (T.pack s) ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration.hs0000644000000000000000000002615607346545000020534 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | Rendering of declarations. module Ormolu.Printer.Meat.Declaration ( p_hsDecls, p_hsDeclsRespectGrouping, ) where import Data.List (sort) import Data.List.NonEmpty (NonEmpty (..), (<|)) import Data.List.NonEmpty qualified as NE import GHC.Hs import GHC.Types.Name.Occurrence (occNameFS) import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Config (SourceType (SignatureSource)) import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Annotation import Ormolu.Printer.Meat.Declaration.Class import Ormolu.Printer.Meat.Declaration.Data import Ormolu.Printer.Meat.Declaration.Default import Ormolu.Printer.Meat.Declaration.Foreign import Ormolu.Printer.Meat.Declaration.Instance import Ormolu.Printer.Meat.Declaration.RoleAnnotation import Ormolu.Printer.Meat.Declaration.Rule import Ormolu.Printer.Meat.Declaration.Signature import Ormolu.Printer.Meat.Declaration.Splice import Ormolu.Printer.Meat.Declaration.Type import Ormolu.Printer.Meat.Declaration.TypeFamily import Ormolu.Printer.Meat.Declaration.Value import Ormolu.Printer.Meat.Declaration.Warning import Ormolu.Printer.Meat.Type import Ormolu.Utils data UserGrouping = -- | Always put newlines where we think they should be Disregard | -- | Respect user preferences regarding grouping Respect deriving (Eq, Show) p_hsDecls :: FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDecls = p_hsDecls' Disregard -- | Like 'p_hsDecls' but respects user choices regarding grouping. If the -- user omits newlines between declarations, we also omit them in most -- cases, except when said declarations have associated Haddocks. -- -- Does some normalization (compress subsequent newlines into a single one) p_hsDeclsRespectGrouping :: FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDeclsRespectGrouping = p_hsDecls' Respect p_hsDecls' :: UserGrouping -> FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDecls' grouping style decls = do isSig <- (== SignatureSource) <$> askSourceType sepSemi id $ -- Return a list of rendered declarations, adding a newline to separate -- groups. case groupDecls isSig decls of [] -> [] (x : xs) -> renderGroup x ++ concat (zipWith renderGroupWithPrev (x : xs) xs) where renderGroup = NE.toList . fmap (located' $ dontUseBraces . p_hsDecl style) renderGroupWithPrev prev curr = -- We can omit a blank line when the user didn't add one, but we must -- ensure we always add blank lines around documented declarations case grouping of Disregard -> breakpoint : renderGroup curr Respect -> if separatedByBlankNE getLocA prev curr || isDocumented prev || isDocumented curr then breakpoint : renderGroup curr else renderGroup curr -- | Is a declaration group documented? isDocumented :: NonEmpty (LHsDecl GhcPs) -> Bool isDocumented = any (isHaddock . unLoc) where isHaddock DocNext = True isHaddock DocPrev = True isHaddock _ = False -- | Group relevant declarations together. groupDecls :: -- | Is the source a signature file? Bool -> -- | List of declarations [LHsDecl GhcPs] -> [NonEmpty (LHsDecl GhcPs)] groupDecls _ [] = [] groupDecls isSig (l@(L _ DocNext) : xs) = -- If the first element is a doc string for next element, just include it -- in the next block: case groupDecls isSig xs of [] -> [l :| []] (x : xs') -> (l <| x) : xs' groupDecls isSig (header : xs) = let (grp, rest) = flip span (zip (header : xs) xs) $ \(previous, current) -> let relevantToHdr = groupedDecls header current relevantToPrev = groupedDecls previous current isDeclSeries = not isSig && declSeries previous current in isDeclSeries || relevantToHdr || relevantToPrev in (header :| map snd grp) : groupDecls isSig (map snd rest) p_hsDecl :: FamilyStyle -> HsDecl GhcPs -> R () p_hsDecl style = \case TyClD _ x -> p_tyClDecl style x ValD _ x -> p_valDecl x SigD _ x -> p_sigDecl x InstD _ x -> p_instDecl style x DerivD _ x -> p_standaloneDerivDecl x DefD _ x -> p_defaultDecl x ForD _ x -> p_foreignDecl x WarningD _ x -> p_warnDecls x AnnD _ x -> p_annDecl x RuleD _ x -> p_ruleDecls x SpliceD _ x -> p_spliceDecl x DocD _ docDecl -> case docDecl of DocCommentNext str -> p_hsDoc Pipe False str DocCommentPrev str -> p_hsDoc Caret False str DocCommentNamed name str -> p_hsDoc (Named name) False str DocGroup n str -> p_hsDoc (Asterisk n) False str RoleAnnotD _ x -> p_roleAnnot x KindSigD _ s -> p_standaloneKindSig s p_tyClDecl :: FamilyStyle -> TyClDecl GhcPs -> R () p_tyClDecl style = \case FamDecl _ x -> p_famDecl style x SynDecl {..} -> p_synDecl tcdLName tcdFixity tcdTyVars tcdRhs DataDecl {..} -> p_dataDecl Associated tcdLName (tyVarsToTyPats tcdTyVars) tcdFixity tcdDataDefn ClassDecl {..} -> p_classDecl tcdCtxt tcdLName tcdTyVars tcdFixity tcdFDs tcdSigs tcdMeths tcdATs tcdATDefs tcdDocs p_instDecl :: FamilyStyle -> InstDecl GhcPs -> R () p_instDecl style = \case ClsInstD _ x -> p_clsInstDecl x TyFamInstD _ x -> p_tyFamInstDecl style x DataFamInstD _ x -> p_dataFamInstDecl style x -- | Determine if these declarations should be grouped together. groupedDecls :: LHsDecl GhcPs -> LHsDecl GhcPs -> Bool groupedDecls (L (locA -> l_x) x') (L (locA -> l_y) y') = case (x', y') of (TypeSignature ns, FunctionBody ns') -> ns `intersects` ns' (TypeSignature ns, DefaultSignature ns') -> ns `intersects` ns' (DefaultSignature ns, TypeSignature ns') -> ns `intersects` ns' (DefaultSignature ns, FunctionBody ns') -> ns `intersects` ns' (x, FunctionBody ns) | Just ns' <- isPragma x -> ns `intersects` ns' (FunctionBody ns, x) | Just ns' <- isPragma x -> ns `intersects` ns' (x, DataDeclaration n) | Just ns <- isPragma x -> n `elem` ns (DataDeclaration n, x) | Just ns <- isPragma x -> let f = occNameFS . rdrNameOcc in f n `elem` map f ns (x, y) | Just ns <- isPragma x, Just ns' <- isPragma y -> ns `intersects` ns' (x, TypeSignature ns) | Just ns' <- isPragma x -> ns `intersects` ns' (TypeSignature ns, x) | Just ns' <- isPragma x -> ns `intersects` ns' (PatternSignature ns, Pattern n) -> n `elem` ns (KindSignature n, DataDeclaration n') -> n == n' (KindSignature n, ClassDeclaration n') -> n == n' (KindSignature n, FamilyDeclaration n') -> n == n' (KindSignature n, TypeSynonym n') -> n == n' -- Special case for TH splices, we look at locations (Splice, Splice) -> not (separatedByBlank id l_x l_y) -- This looks only at Haddocks, normal comments are handled elsewhere (DocNext, _) -> True (_, DocPrev) -> True _ -> False -- | Detect declaration series that should not have blanks between them. declSeries :: LHsDecl GhcPs -> LHsDecl GhcPs -> Bool declSeries (L _ x) (L _ y) = case (x, y) of ( SigD _ (TypeSig _ _ _), SigD _ (TypeSig _ _ _) ) -> True _ -> False intersects :: (Ord a) => [a] -> [a] -> Bool intersects a b = go (sort a) (sort b) where go :: (Ord a) => [a] -> [a] -> Bool go _ [] = False go [] _ = False go (x : xs) (y : ys) | x < y = go xs (y : ys) | x > y = go (x : xs) ys | otherwise = True isPragma :: HsDecl GhcPs -> Maybe [RdrName] isPragma = \case InlinePragma n -> Just [n] SpecializePragma n -> Just [n] SCCPragma n -> Just [n] AnnTypePragma n -> Just [n] AnnValuePragma n -> Just [n] WarningPragma n -> Just n _ -> Nothing -- Declarations that do not refer to names pattern Splice :: HsDecl GhcPs pattern Splice <- SpliceD _ (SpliceDecl _ _ _) -- Declarations referring to a single name pattern InlinePragma, SpecializePragma, SCCPragma, AnnTypePragma, AnnValuePragma, Pattern, DataDeclaration, ClassDeclaration, KindSignature, FamilyDeclaration, TypeSynonym :: RdrName -> HsDecl GhcPs pattern InlinePragma n <- SigD _ (InlineSig _ (L _ n) _) pattern SpecializePragma n <- SigD _ (SpecSig _ (L _ n) _ _) pattern SCCPragma n <- SigD _ (SCCFunSig _ (L _ n) _) pattern AnnTypePragma n <- AnnD _ (HsAnnotation _ (TypeAnnProvenance (L _ n)) _) pattern AnnValuePragma n <- AnnD _ (HsAnnotation _ (ValueAnnProvenance (L _ n)) _) pattern Pattern n <- ValD _ (PatSynBind _ (PSB _ (L _ n) _ _ _)) pattern DataDeclaration n <- TyClD _ (DataDecl _ (L _ n) _ _ _) pattern ClassDeclaration n <- TyClD _ (ClassDecl _ _ _ (L _ n) _ _ _ _ _ _ _ _) pattern KindSignature n <- KindSigD _ (StandaloneKindSig _ (L _ n) _) pattern FamilyDeclaration n <- TyClD _ (FamDecl _ (FamilyDecl _ _ _ (L _ n) _ _ _ _)) pattern TypeSynonym n <- TyClD _ (SynDecl _ (L _ n) _ _ _) -- Declarations which can refer to multiple names pattern TypeSignature, DefaultSignature, FunctionBody, PatternSignature, WarningPragma :: [RdrName] -> HsDecl GhcPs pattern TypeSignature n <- (sigRdrNames -> Just n) pattern DefaultSignature n <- (defSigRdrNames -> Just n) pattern FunctionBody n <- (funRdrNames -> Just n) pattern PatternSignature n <- (patSigRdrNames -> Just n) pattern WarningPragma n <- (warnSigRdrNames -> Just n) pattern DocNext, DocPrev :: HsDecl GhcPs pattern DocNext <- (DocD _ (DocCommentNext _)) pattern DocPrev <- (DocD _ (DocCommentPrev _)) sigRdrNames :: HsDecl GhcPs -> Maybe [RdrName] sigRdrNames (SigD _ (TypeSig _ ns _)) = Just $ map unLoc ns sigRdrNames (SigD _ (ClassOpSig _ _ ns _)) = Just $ map unLoc ns sigRdrNames (SigD _ (PatSynSig _ ns _)) = Just $ map unLoc ns sigRdrNames _ = Nothing defSigRdrNames :: HsDecl GhcPs -> Maybe [RdrName] defSigRdrNames (SigD _ (ClassOpSig _ True ns _)) = Just $ map unLoc ns defSigRdrNames _ = Nothing funRdrNames :: HsDecl GhcPs -> Maybe [RdrName] funRdrNames (ValD _ (FunBind _ (L _ n) _)) = Just [n] funRdrNames (ValD _ (PatBind _ (L _ n) _)) = Just $ patBindNames n funRdrNames _ = Nothing patSigRdrNames :: HsDecl GhcPs -> Maybe [RdrName] patSigRdrNames (SigD _ (PatSynSig _ ns _)) = Just $ map unLoc ns patSigRdrNames _ = Nothing warnSigRdrNames :: HsDecl GhcPs -> Maybe [RdrName] warnSigRdrNames (WarningD _ (Warnings _ ws)) = Just $ flip concatMap ws $ \(L _ (Warning _ ns _)) -> map unLoc ns warnSigRdrNames _ = Nothing patBindNames :: Pat GhcPs -> [RdrName] patBindNames (TuplePat _ ps _) = concatMap (patBindNames . unLoc) ps patBindNames (VarPat _ (L _ n)) = [n] patBindNames (WildPat _) = [] patBindNames (LazyPat _ (L _ p)) = patBindNames p patBindNames (BangPat _ (L _ p)) = patBindNames p patBindNames (ParPat _ _ (L _ p) _) = patBindNames p patBindNames (ListPat _ ps) = concatMap (patBindNames . unLoc) ps patBindNames (AsPat _ (L _ n) _ (L _ p)) = n : patBindNames p patBindNames (SumPat _ (L _ p) _ _) = patBindNames p patBindNames (ViewPat _ _ (L _ p)) = patBindNames p patBindNames (SplicePat _ _) = [] patBindNames (LitPat _ _) = [] patBindNames (SigPat _ (L _ p) _) = patBindNames p patBindNames (NPat _ _ _ _) = [] patBindNames (NPlusKPat _ (L _ n) _ _ _ _) = [n] patBindNames (ConPat _ _ d) = concatMap (patBindNames . unLoc) (hsConPatArgs d) ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration.hs-boot0000644000000000000000000000050707346545000021465 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration ( p_hsDecls, p_hsDeclsRespectGrouping, ) where import GHC.Hs.Decls import GHC.Hs.Extension import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common p_hsDecls :: FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDeclsRespectGrouping :: FamilyStyle -> [LHsDecl GhcPs] -> R () ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/0000755000000000000000000000000007346545000020166 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Annotation.hs0000644000000000000000000000120307346545000022630 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Printer.Meat.Declaration.Annotation ( p_annDecl, ) where import GHC.Hs import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Value p_annDecl :: AnnDecl GhcPs -> R () p_annDecl (HsAnnotation _ annProv expr) = pragma "ANN" . inci $ do p_annProv annProv breakpoint located expr p_hsExpr p_annProv :: AnnProvenance GhcPs -> R () p_annProv = \case ValueAnnProvenance name -> p_rdrName name TypeAnnProvenance name -> txt "type" >> space >> p_rdrName name ModuleAnnProvenance -> txt "module" ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Class.hs0000644000000000000000000000612607346545000021574 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of type class declarations. module Ormolu.Printer.Meat.Declaration.Class ( p_classDecl, ) where import Control.Arrow import Control.Monad import Data.Foldable import Data.Function (on) import Data.List (sortBy) import Data.Maybe import GHC.Hs import GHC.Types.Fixity import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration import Ormolu.Printer.Meat.Type p_classDecl :: Maybe (LHsContext GhcPs) -> LocatedN RdrName -> LHsQTyVars GhcPs -> LexicalFixity -> [LHsFunDep GhcPs] -> [LSig GhcPs] -> LHsBinds GhcPs -> [LFamilyDecl GhcPs] -> [LTyFamDefltDecl GhcPs] -> [LDocDecl GhcPs] -> R () p_classDecl ctx name HsQTvs {..} fixity fdeps csigs cdefs cats catdefs cdocs = do let variableSpans = getLocA <$> hsq_explicit signatureSpans = getLocA name : variableSpans dependencySpans = getLocA <$> fdeps combinedSpans = maybeToList (getLocA <$> ctx) ++ signatureSpans ++ dependencySpans -- GHC's AST does not necessarily store each kind of element in source -- location order. This happens because different declarations are stored -- in different lists. Consequently, to get all the declarations in proper -- order, they need to be manually sorted. sigs = (getLocA &&& fmap (SigD NoExtField)) <$> csigs vals = (getLocA &&& fmap (ValD NoExtField)) <$> toList cdefs tyFams = (getLocA &&& fmap (TyClD NoExtField . FamDecl NoExtField)) <$> cats docs = (getLocA &&& fmap (DocD NoExtField)) <$> cdocs tyFamDefs = ( getLocA &&& fmap (InstD NoExtField . TyFamInstD NoExtField) ) <$> catdefs allDecls = snd <$> sortBy (leftmost_smallest `on` fst) (sigs <> vals <> tyFams <> tyFamDefs <> docs) txt "class" switchLayout combinedSpans $ do breakpoint inci $ do for_ ctx p_classContext switchLayout signatureSpans $ p_infixDefHelper (isInfix fixity) True (p_rdrName name) (located' p_hsTyVarBndr <$> hsq_explicit) inci (p_classFundeps fdeps) unless (null allDecls) $ do breakpoint txt "where" unless (null allDecls) $ do breakpoint -- Ensure whitespace is added after where clause. inci (p_hsDeclsRespectGrouping Associated allDecls) p_classContext :: LHsContext GhcPs -> R () p_classContext ctx = unless (null (unLoc ctx)) $ do located ctx p_hsContext space txt "=>" breakpoint p_classFundeps :: [LHsFunDep GhcPs] -> R () p_classFundeps fdeps = unless (null fdeps) $ do breakpoint txt "|" space inci $ sep commaDel (sitcc . located' p_funDep) fdeps p_funDep :: FunDep GhcPs -> R () p_funDep (FunDep _ before after) = do sep space p_rdrName before space txt "->" space sep space p_rdrName after ---------------------------------------------------------------------------- -- Helpers isInfix :: LexicalFixity -> Bool isInfix = \case Infix -> True Prefix -> False ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Data.hs0000644000000000000000000002114207346545000021373 0ustar0000000000000000{-# LANGUAGE BlockArguments #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Renedring of data type declarations. module Ormolu.Printer.Meat.Declaration.Data ( p_dataDecl, ) where import Control.Monad import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Maybe (isJust, maybeToList) import Data.Void import GHC.Data.Strict qualified as Strict import GHC.Hs import GHC.Types.Fixity import GHC.Types.ForeignCall import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type import Ormolu.Utils (matchAddEpAnn) p_dataDecl :: -- | Whether to format as data family FamilyStyle -> -- | Type constructor LocatedN RdrName -> -- | Type patterns HsTyPats GhcPs -> -- | Lexical fixity LexicalFixity -> -- | Data definition HsDataDefn GhcPs -> R () p_dataDecl style name tpats fixity HsDataDefn {..} = do txt $ case dd_cons of NewTypeCon _ -> "newtype" DataTypeCons False _ -> "data" DataTypeCons True _ -> "type data" txt $ case style of Associated -> mempty Free -> " instance" case unLoc <$> dd_cType of Nothing -> pure () Just (CType prag header (type_, _)) -> do space p_sourceText prag case header of Nothing -> pure () Just (Header h _) -> space *> p_sourceText h space p_sourceText type_ txt " #-}" let constructorSpans = getLocA name : fmap lhsTypeArgSrcSpan tpats sigSpans = maybeToList . fmap getLocA $ dd_kindSig declHeaderSpans = maybeToList (getLocA <$> dd_ctxt) ++ constructorSpans ++ sigSpans switchLayout declHeaderSpans $ do breakpoint inci $ do case dd_ctxt of Nothing -> pure () Just ctxt -> do located ctxt p_hsContext space txt "=>" breakpoint switchLayout constructorSpans $ p_infixDefHelper (isInfix fixity) True (p_rdrName name) (p_lhsTypeArg <$> tpats) forM_ dd_kindSig $ \k -> do space txt "::" breakpoint inci $ located k p_hsType let dd_cons' = case dd_cons of NewTypeCon a -> [a] DataTypeCons _ as -> as gadt = isJust dd_kindSig || any (isGadt . unLoc) dd_cons' unless (null dd_cons') $ if gadt then inci $ do switchLayout declHeaderSpans $ do breakpoint txt "where" breakpoint sepSemi (located' (p_conDecl False)) dd_cons' else switchLayout (getLocA name : (getLocA <$> dd_cons')) . inci $ do let singleConstRec = isSingleConstRec dd_cons' if hasHaddocks dd_cons' then newline else if singleConstRec then space else breakpoint equals space layout <- getLayout let s = if layout == MultiLine || hasHaddocks dd_cons' then newline >> txt "|" >> space else space >> txt "|" >> space sitcc' = if hasHaddocks dd_cons' || not singleConstRec then sitcc else id sep s (sitcc' . located' (p_conDecl singleConstRec)) dd_cons' unless (null dd_derivs) breakpoint inci $ sep newline (located' p_hsDerivingClause) dd_derivs p_conDecl :: Bool -> ConDecl GhcPs -> R () p_conDecl singleConstRec = \case ConDeclGADT {..} -> do mapM_ (p_hsDoc Pipe True) con_doc let conDeclSpn = fmap getLocA (NE.toList con_names) <> [getLocA con_bndrs] <> maybeToList (fmap getLocA con_mb_cxt) <> conArgsSpans where conArgsSpans = case con_g_args of PrefixConGADT xs -> getLocA . hsScaledThing <$> xs RecConGADT x _ -> [getLocA x] switchLayout conDeclSpn $ do let c :| cs = con_names p_rdrName c unless (null cs) . inci $ do commaDel sep commaDel p_rdrName cs inci $ do let conTy = case con_g_args of PrefixConGADT xs -> let go (HsScaled a b) t = addCLocAA t b (HsFunTy EpAnnNotUsed a b t) in foldr go con_res_ty xs RecConGADT r _ -> addCLocAA r con_res_ty $ HsFunTy EpAnnNotUsed (HsUnrestrictedArrow noHsUniTok) (la2la $ HsRecTy EpAnnNotUsed <$> r) con_res_ty qualTy = case con_mb_cxt of Nothing -> conTy Just qs -> addCLocAA qs conTy $ HsQualTy NoExtField qs conTy quantifiedTy = addCLocAA con_bndrs qualTy $ hsOuterTyVarBndrsToHsType (unLoc con_bndrs) qualTy space txt "::" if hasDocStrings (unLoc con_res_ty) then newline else breakpoint located quantifiedTy p_hsType ConDeclH98 {..} -> do mapM_ (p_hsDoc Pipe True) con_doc let conDeclWithContextSpn = [ RealSrcSpan real Strict.Nothing | Just (EpaSpan real _) <- matchAddEpAnn AnnForall <$> epAnnAnns con_ext ] <> fmap getLocA con_ex_tvs <> maybeToList (fmap getLocA con_mb_cxt) <> conDeclSpn conDeclSpn = getLocA con_name : conArgsSpans where conArgsSpans = case con_args of PrefixCon [] xs -> getLocA . hsScaledThing <$> xs PrefixCon (v : _) _ -> absurd v RecCon l -> [getLocA l] InfixCon x y -> getLocA . hsScaledThing <$> [x, y] switchLayout conDeclWithContextSpn $ do when con_forall $ do p_forallBndrs ForAllInvis p_hsTyVarBndr con_ex_tvs breakpoint forM_ con_mb_cxt p_lhsContext switchLayout conDeclSpn $ case con_args of PrefixCon [] xs -> do p_rdrName con_name let args = hsScaledThing <$> xs argsHaveDocs = conArgsHaveHaddocks args delimiter = if argsHaveDocs then newline else breakpoint unless (null xs) delimiter inci . sitcc $ sep delimiter (sitcc . located' p_hsType) args PrefixCon (v : _) _ -> absurd v RecCon l -> do p_rdrName con_name breakpoint inciIf (not singleConstRec) (located l p_conDeclFields) InfixCon (HsScaled _ x) (HsScaled _ y) -> do located x p_hsType breakpoint inci $ do p_rdrName con_name space located y p_hsType p_lhsContext :: LHsContext GhcPs -> R () p_lhsContext = \case L _ [] -> pure () ctx -> do located ctx p_hsContext space txt "=>" breakpoint isGadt :: ConDecl GhcPs -> Bool isGadt = \case ConDeclGADT {} -> True ConDeclH98 {} -> False p_hsDerivingClause :: HsDerivingClause GhcPs -> R () p_hsDerivingClause HsDerivingClause {..} = do txt "deriving" let derivingWhat = located deriv_clause_tys $ \case DctSingle NoExtField sigTy -> parens N $ located sigTy p_hsSigType DctMulti NoExtField sigTys -> parens N $ sep commaDel (sitcc . located' p_hsSigType) sigTys space case deriv_clause_strategy of Nothing -> do breakpoint inci derivingWhat Just (L _ a) -> case a of StockStrategy _ -> do txt "stock" breakpoint inci derivingWhat AnyclassStrategy _ -> do txt "anyclass" breakpoint inci derivingWhat NewtypeStrategy _ -> do txt "newtype" breakpoint inci derivingWhat ViaStrategy (XViaStrategyPs _ sigTy) -> do breakpoint inci $ do derivingWhat breakpoint txt "via" space located sigTy p_hsSigType ---------------------------------------------------------------------------- -- Helpers isInfix :: LexicalFixity -> Bool isInfix = \case Infix -> True Prefix -> False isSingleConstRec :: [LConDecl GhcPs] -> Bool isSingleConstRec [(L _ ConDeclH98 {..})] = case con_args of RecCon _ -> True _ -> False isSingleConstRec _ = False hasHaddocks :: [LConDecl GhcPs] -> Bool hasHaddocks = any (f . unLoc) where f ConDeclH98 {..} = isJust con_doc || case con_args of PrefixCon [] xs -> conArgsHaveHaddocks (hsScaledThing <$> xs) _ -> False f _ = False conArgsHaveHaddocks :: [LBangType GhcPs] -> Bool conArgsHaveHaddocks xs = let hasDocs = \case HsDocTy {} -> True _ -> False in any (hasDocs . unLoc) xs ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Default.hs0000644000000000000000000000056407346545000022113 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Printer.Meat.Declaration.Default ( p_defaultDecl, ) where import GHC.Hs import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Type p_defaultDecl :: DefaultDecl GhcPs -> R () p_defaultDecl (DefaultDecl _ ts) = do txt "default" breakpoint inci . parens N $ sep commaDel (sitcc . located' p_hsType) ts ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Foreign.hs0000644000000000000000000000365707346545000022126 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Printer.Meat.Declaration.Foreign ( p_foreignDecl, ) where import Control.Monad import GHC.Hs import GHC.Types.ForeignCall import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Signature p_foreignDecl :: ForeignDecl GhcPs -> R () p_foreignDecl = \case fd@ForeignImport {fd_fi} -> do p_foreignImport fd_fi p_foreignTypeSig fd fd@ForeignExport {fd_fe} -> do p_foreignExport fd_fe p_foreignTypeSig fd -- | Printer for the last part of an import\/export, which is function name -- and type signature. p_foreignTypeSig :: ForeignDecl GhcPs -> R () p_foreignTypeSig fd = do breakpoint inci . switchLayout [ getLocA (fd_name fd), (getLocA . fd_sig_ty) fd ] $ do p_rdrName (fd_name fd) p_typeAscription (fd_sig_ty fd) -- | Printer for 'ForeignImport'. -- -- These have the form: -- -- > foreign import callingConvention [safety] [identifier] -- -- We need to check whether the safety has a good source, span, as it -- defaults to 'PlaySafe' if you don't have anything in the source. -- -- We also layout the identifier using the 'SourceText', because printing -- with the other two fields of 'CImport' is very complicated. See the -- 'Outputable' instance of 'ForeignImport' for details. p_foreignImport :: ForeignImport GhcPs -> R () p_foreignImport (CImport sourceText cCallConv safety _ _) = do txt "foreign import" space located cCallConv atom -- Need to check for 'noLoc' for the 'safe' annotation when (isGoodSrcSpan $ getLoc safety) (space >> atom safety) space located sourceText p_sourceText p_foreignExport :: ForeignExport GhcPs -> R () p_foreignExport (CExport sourceText (L loc (CExportStatic _ _ cCallConv))) = do txt "foreign export" space located (L loc cCallConv) atom space located sourceText p_sourceText ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Instance.hs0000644000000000000000000000725207346545000022274 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Type class, type family, and data family instance declarations. module Ormolu.Printer.Meat.Declaration.Instance ( p_clsInstDecl, p_tyFamInstDecl, p_dataFamInstDecl, p_standaloneDerivDecl, ) where import Control.Arrow import Control.Monad import Data.Foldable import Data.Function (on) import Data.List (sortBy) import GHC.Hs import GHC.Types.Basic import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration import Ormolu.Printer.Meat.Declaration.Data import Ormolu.Printer.Meat.Declaration.TypeFamily import Ormolu.Printer.Meat.Type p_standaloneDerivDecl :: DerivDecl GhcPs -> R () p_standaloneDerivDecl DerivDecl {..} = do let typesAfterInstance = located (hswc_body deriv_type) p_hsSigType instTypes toIndent = inci $ do txt "instance" breakpoint match_overlap_mode deriv_overlap_mode breakpoint inciIf toIndent typesAfterInstance txt "deriving" space case deriv_strategy of Nothing -> instTypes False Just (L _ a) -> case a of StockStrategy _ -> do txt "stock " instTypes False AnyclassStrategy _ -> do txt "anyclass " instTypes False NewtypeStrategy _ -> do txt "newtype " instTypes False ViaStrategy (XViaStrategyPs _ sigTy) -> do txt "via" breakpoint inci (located sigTy p_hsSigType) breakpoint instTypes True p_clsInstDecl :: ClsInstDecl GhcPs -> R () p_clsInstDecl ClsInstDecl {..} = do txt "instance" -- GHC's AST does not necessarily store each kind of element in source -- location order. This happens because different declarations are stored in -- different lists. Consequently, to get all the declarations in proper -- order, they need to be manually sorted. let sigs = (getLocA &&& fmap (SigD NoExtField)) <$> cid_sigs vals = (getLocA &&& fmap (ValD NoExtField)) <$> toList cid_binds tyFamInsts = ( getLocA &&& fmap (InstD NoExtField . TyFamInstD NoExtField) ) <$> cid_tyfam_insts dataFamInsts = ( getLocA &&& fmap (InstD NoExtField . DataFamInstD NoExtField) ) <$> cid_datafam_insts allDecls = snd <$> sortBy (leftmost_smallest `on` fst) (sigs <> vals <> tyFamInsts <> dataFamInsts) located cid_poly_ty $ \sigTy -> do breakpoint inci $ do match_overlap_mode cid_overlap_mode breakpoint p_hsSigType sigTy unless (null allDecls) $ do breakpoint txt "where" unless (null allDecls) . inci $ do -- Ensure whitespace is added after where clause. breakpoint dontUseBraces $ p_hsDeclsRespectGrouping Associated allDecls p_tyFamInstDecl :: FamilyStyle -> TyFamInstDecl GhcPs -> R () p_tyFamInstDecl style TyFamInstDecl {..} = do txt $ case style of Associated -> "type" Free -> "type instance" breakpoint inci (p_tyFamInstEqn tfid_eqn) p_dataFamInstDecl :: FamilyStyle -> DataFamInstDecl GhcPs -> R () p_dataFamInstDecl style (DataFamInstDecl {dfid_eqn = FamEqn {..}}) = p_dataDecl style feqn_tycon feqn_pats feqn_fixity feqn_rhs match_overlap_mode :: Maybe (LocatedP OverlapMode) -> R () -> R () match_overlap_mode overlap_mode layoutStrategy = case unLoc <$> overlap_mode of Just Overlappable {} -> do txt "{-# OVERLAPPABLE #-}" layoutStrategy Just Overlapping {} -> do txt "{-# OVERLAPPING #-}" layoutStrategy Just Overlaps {} -> do txt "{-# OVERLAPS #-}" layoutStrategy Just Incoherent {} -> do txt "{-# INCOHERENT #-}" layoutStrategy _ -> pure () ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/OpTree.hs0000644000000000000000000002063407346545000021725 0ustar0000000000000000{-# LANGUAGE BlockArguments #-} {-# LANGUAGE LambdaCase #-} -- | Printing of operator trees. module Ormolu.Printer.Meat.Declaration.OpTree ( p_exprOpTree, exprOpTree, p_cmdOpTree, cmdOpTree, p_tyOpTree, tyOpTree, getOpName, getOpNameStr, ) where import Data.Functor ((<&>)) import GHC.Hs import GHC.Types.Fixity import GHC.Types.Name (occNameString) import GHC.Types.Name.Reader (RdrName, rdrNameOcc) import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common (p_rdrName) import Ormolu.Printer.Meat.Declaration.Value ( IsApplicand (..), cmdTopPlacement, exprPlacement, p_hsCmdTop, p_hsExpr, p_hsExpr', ) import Ormolu.Printer.Meat.Type (p_hsType) import Ormolu.Printer.Operators import Ormolu.Utils (HasSrcSpan) -- | Extract the operator name of the specified 'HsExpr' if this expression -- corresponds to an operator. getOpName :: HsExpr GhcPs -> Maybe RdrName getOpName = \case HsVar _ (L _ a) -> Just a _ -> Nothing -- | Convert an operator name to a 'String'. getOpNameStr :: RdrName -> String getOpNameStr = occNameString . rdrNameOcc -- | Decide if the operands of an operator chain should be hanging. opBranchPlacement :: (HasSrcSpan l) => -- | Placer function for nodes (ty -> Placement) -> -- | first expression of the chain OpTree (GenLocated l ty) op -> -- | last expression of the chain OpTree (GenLocated l ty) op -> Placement opBranchPlacement placer firstExpr lastExpr -- If the beginning of the first argument and the last argument starts on -- the same line, and the second argument has a hanging form, use hanging -- placement. | isOneLineSpan ( mkSrcSpan (srcSpanStart (opTreeLoc firstExpr)) (srcSpanStart (opTreeLoc lastExpr)) ), OpNode (L _ n) <- lastExpr = placer n | otherwise = Normal -- | Decide whether to use braces or not based on the layout and placement -- of an expression in an infix operator application. opBranchBraceStyle :: Placement -> R (R () -> R ()) opBranchBraceStyle placement = getLayout <&> \case SingleLine -> useBraces MultiLine -> case placement of Hanging -> useBraces Normal -> dontUseBraces -- | Convert a 'LHsExpr' containing an operator tree to the 'OpTree' -- intermediate representation. exprOpTree :: LHsExpr GhcPs -> OpTree (LHsExpr GhcPs) (LHsExpr GhcPs) exprOpTree (L _ (OpApp _ x op y)) = OpBranches [exprOpTree x, exprOpTree y] [op] exprOpTree n = OpNode n -- | Print an operator tree where leaves are values. p_exprOpTree :: -- | Bracket style to use BracketStyle -> -- | N-ary 'OpTree' to render, enhanced with information regarding -- operator fixity OpTree (LHsExpr GhcPs) (OpInfo (LHsExpr GhcPs)) -> R () p_exprOpTree s (OpNode x) = located x (p_hsExpr' NotApplicand s) p_exprOpTree s t@(OpBranches exprs ops) = do let firstExpr = head exprs otherExprs = tail exprs placement = opBranchPlacement exprPlacement firstExpr (last otherExprs) rightMostNode = \case n@(OpNode _) -> n OpBranches exprs'' _ -> rightMostNode (last exprs'') isDoBlock = \case OpNode (L _ (HsDo _ ctx _)) -> case ctx of DoExpr _ -> True MDoExpr _ -> True _ -> False _ -> False -- Whether we could place the operator in a trailing position, -- followed by a breakpoint before the RHS couldBeTrailing (prevExpr, opi) = -- An operator with fixity InfixR 0, like seq, $, and $ variants, -- is required isHardSplitterOp (opiFixityApproximation opi) -- the LHS must be single-line && isOneLineSpan (opTreeLoc prevExpr) -- can only happen when a breakpoint would have been added anyway && placement == Normal -- if the node just on the left of the operator (so the rightmost -- node of the subtree prevExpr) is a do-block, then we cannot -- place the operator in a trailing position (because it would be -- read as being part of the do-block) && not (isDoBlock $ rightMostNode prevExpr) -- If all operators at the current level match the conditions to be -- trailing, then put them in a trailing position isTrailing = all couldBeTrailing $ zip exprs ops ub <- if isTrailing then return useBraces else opBranchBraceStyle placement let p_x = ub $ p_exprOpTree s firstExpr putOpsExprs prevExpr (opi : ops') (expr : exprs') = do let isLast = null exprs' ub' = if not isLast then ub else id -- Distinguish holes used in infix notation. -- eg. '1 _foo 2' and '1 `_foo` 2' opWrapper = case unLoc (opiOp opi) of HsUnboundVar _ _ -> backticks _ -> id p_op = located (opiOp opi) (opWrapper . p_hsExpr) p_y = ub' $ p_exprOpTree N expr if isTrailing then do space p_op placeHanging -- When we have a chain of trailing operators (staircase style), -- the last operand, when multiline, is allowed to hang -- (ex: do block, lambda...) ( if isLast && (not . isOneLineSpan . opTreeLoc $ expr) then opBranchPlacement exprPlacement prevExpr expr else Normal ) $ do p_y putOpsExprs expr ops' exprs' else do placeHanging placement $ do p_op space p_y putOpsExprs expr ops' exprs' putOpsExprs _ _ _ = pure () switchLayout [opTreeLoc t] $ do p_x putOpsExprs firstExpr ops otherExprs -- | Convert a 'LHsCmdTop' containing an operator tree to the 'OpTree' -- intermediate representation. cmdOpTree :: LHsCmdTop GhcPs -> OpTree (LHsCmdTop GhcPs) (LHsExpr GhcPs) cmdOpTree = \case (L _ (HsCmdTop _ (L _ (HsCmdArrForm _ op Infix _ [x, y])))) -> OpBranches [cmdOpTree x, cmdOpTree y] [op] n -> OpNode n -- | Print an operator tree where leaves are commands. p_cmdOpTree :: -- | Bracket style to use BracketStyle -> -- | N-ary OpTree to render, enhanced with information regarding operator -- fixity OpTree (LHsCmdTop GhcPs) (OpInfo (LHsExpr GhcPs)) -> R () p_cmdOpTree s (OpNode x) = located x (p_hsCmdTop s) p_cmdOpTree s t@(OpBranches exprs ops) = do let firstExpr = head exprs otherExprs = tail exprs placement = opBranchPlacement cmdTopPlacement firstExpr (last otherExprs) ub <- opBranchBraceStyle placement let p_x = ub $ p_cmdOpTree s firstExpr putOpsExprs (opi : ops') (expr : exprs') = do let ub' = if not (null exprs') then ub else id p_op = located (opiOp opi) p_hsExpr p_y = ub' $ p_cmdOpTree N expr placeHanging placement $ do p_op space p_y putOpsExprs ops' exprs' putOpsExprs _ _ = pure () switchLayout [opTreeLoc t] $ do p_x putOpsExprs ops otherExprs -- | Check if given expression has a hanging form. Added for symmetry with -- exprPlacement and cmdTopPlacement, which are all used in p_xxxOpTree -- functions with opBranchPlacement. tyOpPlacement :: HsType GhcPs -> Placement tyOpPlacement = \case _ -> Normal -- | Convert a LHsType containing an operator tree to the 'OpTree' -- intermediate representation. tyOpTree :: LHsType GhcPs -> OpTree (LHsType GhcPs) (LocatedN RdrName) tyOpTree (L _ (HsOpTy _ _ l op r)) = OpBranches [tyOpTree l, tyOpTree r] [op] tyOpTree n = OpNode n -- | Print an operator tree where leaves are types. p_tyOpTree :: -- | N-ary 'OpTree' to render, enhanced with information regarding -- operator fixity OpTree (LHsType GhcPs) (OpInfo (LocatedN RdrName)) -> R () p_tyOpTree (OpNode n) = located n p_hsType p_tyOpTree t@(OpBranches exprs ops) = do let firstExpr = head exprs otherExprs = tail exprs placement = opBranchPlacement tyOpPlacement firstExpr (last otherExprs) p_x = p_tyOpTree firstExpr putOpsExprs (opi : ops') (expr : exprs') = do let p_op = p_rdrName (opiOp opi) p_y = p_tyOpTree expr placeHanging placement $ do p_op space p_y putOpsExprs ops' exprs' putOpsExprs _ _ = pure () switchLayout [opTreeLoc t] $ do ub <- opBranchBraceStyle placement ub p_x putOpsExprs ops otherExprs ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/OpTree.hs-boot0000644000000000000000000000160207346545000022660 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration.OpTree ( p_exprOpTree, exprOpTree, p_cmdOpTree, cmdOpTree, p_tyOpTree, tyOpTree, getOpName, getOpNameStr, ) where import GHC.Hs import GHC.Types.Name.Reader (RdrName) import Ormolu.Printer.Combinators (BracketStyle, R) import Ormolu.Printer.Operators (OpInfo, OpTree) exprOpTree :: LHsExpr GhcPs -> OpTree (LHsExpr GhcPs) (LHsExpr GhcPs) p_exprOpTree :: BracketStyle -> OpTree (LHsExpr GhcPs) (OpInfo (LHsExpr GhcPs)) -> R () cmdOpTree :: LHsCmdTop GhcPs -> OpTree (LHsCmdTop GhcPs) (LHsExpr GhcPs) p_cmdOpTree :: BracketStyle -> OpTree (LHsCmdTop GhcPs) (OpInfo (LHsExpr GhcPs)) -> R () tyOpTree :: LHsType GhcPs -> OpTree (LHsType GhcPs) (LocatedN RdrName) p_tyOpTree :: OpTree (LHsType GhcPs) (OpInfo (LocatedN RdrName)) -> R () getOpName :: HsExpr GhcPs -> Maybe RdrName getOpNameStr :: RdrName -> String ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/RoleAnnotation.hs0000644000000000000000000000162607346545000023463 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} -- | Rendering of Role annotation declarations. module Ormolu.Printer.Meat.Declaration.RoleAnnotation ( p_roleAnnot, ) where import GHC.Core.Coercion.Axiom import GHC.Hs hiding (anns) import GHC.Types.Name.Reader import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common p_roleAnnot :: RoleAnnotDecl GhcPs -> R () p_roleAnnot (RoleAnnotDecl _ l_name anns) = p_roleAnnot' l_name anns p_roleAnnot' :: LocatedN RdrName -> [XRec GhcPs (Maybe Role)] -> R () p_roleAnnot' l_name anns = do txt "type role" breakpoint inci $ do p_rdrName l_name breakpoint let p_role' = maybe (txt "_") p_role inci . sitcc $ sep breakpoint (sitcc . located' p_role') anns p_role :: Role -> R () p_role = \case Nominal -> txt "nominal" Representational -> txt "representational" Phantom -> txt "phantom" ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Rule.hs0000644000000000000000000000307407346545000021435 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Printer.Meat.Declaration.Rule ( p_ruleDecls, ) where import Control.Monad (unless) import GHC.Hs import GHC.Types.Basic import GHC.Types.SourceText import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Signature import Ormolu.Printer.Meat.Declaration.Value import Ormolu.Printer.Meat.Type p_ruleDecls :: RuleDecls GhcPs -> R () p_ruleDecls (HsRules _ xs) = pragma "RULES" $ sep breakpoint (sitcc . located' p_ruleDecl) xs p_ruleDecl :: RuleDecl GhcPs -> R () p_ruleDecl (HsRule _ ruleName activation tyvars ruleBndrs lhs rhs) = do located ruleName p_ruleName space p_activation activation space case tyvars of Nothing -> return () Just xs -> do p_forallBndrs ForAllInvis p_hsTyVarBndr xs space -- It appears that there is no way to tell if there was an empty forall -- in the input or no forall at all. We do not want to add redundant -- foralls, so let's just skip the empty ones. unless (null ruleBndrs) $ p_forallBndrs ForAllInvis p_ruleBndr ruleBndrs breakpoint inci $ do located lhs p_hsExpr space equals inci $ do breakpoint located rhs p_hsExpr p_ruleName :: RuleName -> R () p_ruleName name = atom (HsString NoSourceText name :: HsLit GhcPs) p_ruleBndr :: RuleBndr GhcPs -> R () p_ruleBndr = \case RuleBndr _ x -> p_rdrName x RuleBndrSig _ x HsPS {..} -> parens N $ do p_rdrName x p_typeAscription (lhsTypeToSigType hsps_body) ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Signature.hs0000644000000000000000000001255607346545000022474 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Type signature declarations. module Ormolu.Printer.Meat.Declaration.Signature ( p_sigDecl, p_typeAscription, p_activation, p_standaloneKindSig, ) where import Control.Monad import GHC.Data.BooleanFormula import GHC.Hs import GHC.Types.Basic import GHC.Types.Fixity import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type import Ormolu.Utils p_sigDecl :: Sig GhcPs -> R () p_sigDecl = \case TypeSig _ names hswc -> p_typeSig True names (hswc_body hswc) PatSynSig _ names sigType -> p_patSynSig names sigType ClassOpSig _ def names sigType -> p_classOpSig def names sigType FixSig _ sig -> p_fixSig sig InlineSig _ name inlinePragma -> p_inlineSig name inlinePragma SpecSig _ name ts inlinePragma -> p_specSig name ts inlinePragma SpecInstSig _ sigType -> p_specInstSig sigType MinimalSig _ booleanFormula -> p_minimalSig booleanFormula CompleteMatchSig _ cs ty -> p_completeSig cs ty SCCFunSig _ name literal -> p_sccSig name literal p_typeSig :: -- | Should the tail of the names be indented Bool -> -- | Names (before @::@) [LocatedN RdrName] -> -- | Type LHsSigType GhcPs -> R () p_typeSig _ [] _ = return () -- should not happen though p_typeSig indentTail (n : ns) sigType = do p_rdrName n if null ns then p_typeAscription sigType else inciIf indentTail $ do commaDel sep commaDel p_rdrName ns p_typeAscription sigType p_typeAscription :: LHsSigType GhcPs -> R () p_typeAscription sigType = inci $ do space txt "::" if hasDocStrings (unLoc . sig_body . unLoc $ sigType) then newline else breakpoint located sigType p_hsSigType p_patSynSig :: [LocatedN RdrName] -> LHsSigType GhcPs -> R () p_patSynSig names sigType = do txt "pattern" let body = p_typeSig False names sigType if length names > 1 then breakpoint >> inci body else space >> body p_classOpSig :: -- | Whether this is a \"default\" signature Bool -> -- | Names (before @::@) [LocatedN RdrName] -> -- | Type LHsSigType GhcPs -> R () p_classOpSig def names sigType = do when def (txt "default" >> space) p_typeSig True names sigType p_fixSig :: FixitySig GhcPs -> R () p_fixSig = \case FixitySig NoExtField names (Fixity _ n dir) -> do txt $ case dir of InfixL -> "infixl" InfixR -> "infixr" InfixN -> "infix" space atom n space sitcc $ sep commaDel p_rdrName names p_inlineSig :: -- | Name LocatedN RdrName -> -- | Inline pragma specification InlinePragma -> R () p_inlineSig name InlinePragma {..} = pragmaBraces $ do p_inlineSpec inl_inline space case inl_rule of ConLike -> txt "CONLIKE" FunLike -> return () space when (inl_act /= NeverActive) $ p_activation inl_act space p_rdrName name p_specSig :: -- | Name LocatedN RdrName -> -- | The types to specialize to [LHsSigType GhcPs] -> -- | For specialize inline InlinePragma -> R () p_specSig name ts InlinePragma {..} = pragmaBraces $ do txt "SPECIALIZE" space p_inlineSpec inl_inline space p_activation inl_act space p_rdrName name space txt "::" breakpoint inci $ sep commaDel (located' p_hsSigType) ts p_inlineSpec :: InlineSpec -> R () p_inlineSpec = \case Inline _ -> txt "INLINE" Inlinable _ -> txt "INLINEABLE" NoInline _ -> txt "NOINLINE" Opaque _ -> txt "OPAQUE" NoUserInlinePrag -> return () p_activation :: Activation -> R () p_activation = \case NeverActive -> txt "[~]" AlwaysActive -> return () ActiveBefore _ n -> do txt "[~" atom n txt "]" ActiveAfter _ n -> do txt "[" atom n txt "]" FinalActive -> notImplemented "FinalActive" -- NOTE(amesgen) is this unreachable or just not implemented? p_specInstSig :: LHsSigType GhcPs -> R () p_specInstSig sigType = pragma "SPECIALIZE instance" . inci $ located sigType p_hsSigType p_minimalSig :: -- | Boolean formula LBooleanFormula (LocatedN RdrName) -> R () p_minimalSig = located' $ \booleanFormula -> pragma "MINIMAL" (inci $ p_booleanFormula booleanFormula) p_booleanFormula :: -- | Boolean formula BooleanFormula (LocatedN RdrName) -> R () p_booleanFormula = \case Var name -> p_rdrName name And xs -> sitcc $ sep commaDel (located' p_booleanFormula) xs Or xs -> sitcc $ sep (breakpoint >> txt "|" >> space) (located' p_booleanFormula) xs Parens l -> located l (parens N . p_booleanFormula) p_completeSig :: -- | Constructors\/patterns Located [LocatedN RdrName] -> -- | Type Maybe (LocatedN RdrName) -> R () p_completeSig cs' mty = located cs' $ \cs -> pragma "COMPLETE" . inci $ do sep commaDel p_rdrName cs forM_ mty $ \ty -> do space txt "::" breakpoint inci (p_rdrName ty) p_sccSig :: LocatedN RdrName -> Maybe (XRec GhcPs StringLiteral) -> R () p_sccSig loc literal = pragma "SCC" . inci $ do p_rdrName loc forM_ literal $ \x -> do breakpoint atom x p_standaloneKindSig :: StandaloneKindSig GhcPs -> R () p_standaloneKindSig (StandaloneKindSig _ name sigTy) = do txt "type" inci $ do space p_rdrName name space txt "::" breakpoint located sigTy p_hsSigType ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Splice.hs0000644000000000000000000000050307346545000021737 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration.Splice ( p_spliceDecl, ) where import GHC.Hs import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Declaration.Value (p_hsUntypedSplice) p_spliceDecl :: SpliceDecl GhcPs -> R () p_spliceDecl (SpliceDecl NoExtField splice deco) = located splice $ p_hsUntypedSplice deco ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Type.hs0000644000000000000000000000200607346545000021441 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of type synonym declarations. module Ormolu.Printer.Meat.Declaration.Type ( p_synDecl, ) where import GHC.Hs.Extension import GHC.Hs.Type import GHC.Parser.Annotation import GHC.Types.Fixity import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type p_synDecl :: -- | Type constructor LocatedN RdrName -> -- | Fixity LexicalFixity -> -- | Type variables LHsQTyVars GhcPs -> -- | RHS of type declaration LHsType GhcPs -> R () p_synDecl name fixity HsQTvs {..} t = do txt "type" space switchLayout (getLocA name : map getLocA hsq_explicit) $ p_infixDefHelper (case fixity of Infix -> True; _ -> False) True (p_rdrName name) (map (located' p_hsTyVarBndr) hsq_explicit) inci $ do space equals if hasDocStrings (unLoc t) then newline else breakpoint located t p_hsType ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs0000644000000000000000000000604407346545000022611 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of data\/type families. module Ormolu.Printer.Meat.Declaration.TypeFamily ( p_famDecl, p_tyFamInstEqn, ) where import Control.Monad import Data.Maybe (isNothing) import GHC.Hs import GHC.Types.Fixity import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type p_famDecl :: FamilyStyle -> FamilyDecl GhcPs -> R () p_famDecl style FamilyDecl {fdTyVars = HsQTvs {..}, ..} = do mmeqs <- case fdInfo of DataFamily -> Nothing <$ txt "data" OpenTypeFamily -> Nothing <$ txt "type" ClosedTypeFamily eqs -> Just eqs <$ txt "type" txt $ case style of Associated -> mempty Free -> " family" let headerSpns = getLocA fdLName : (getLocA <$> hsq_explicit) headerAndSigSpns = getLocA fdResultSig : headerSpns inci . switchLayout headerAndSigSpns $ do breakpoint switchLayout headerSpns $ do p_infixDefHelper (isInfix fdFixity) True (p_rdrName fdLName) (located' p_hsTyVarBndr <$> hsq_explicit) let resultSig = p_familyResultSigL fdResultSig unless (isNothing resultSig && isNothing fdInjectivityAnn) space inci $ do sequence_ resultSig space forM_ fdInjectivityAnn (located' p_injectivityAnn) case mmeqs of Nothing -> return () Just meqs -> do inci . switchLayout headerAndSigSpns $ do breakpoint txt "where" case meqs of Nothing -> do space txt ".." Just eqs -> do newline inci (sep newline (located' p_tyFamInstEqn) eqs) p_familyResultSigL :: LFamilyResultSig GhcPs -> Maybe (R ()) p_familyResultSigL (L _ a) = case a of NoSig NoExtField -> Nothing KindSig NoExtField k -> Just $ do txt "::" breakpoint located k p_hsType TyVarSig NoExtField bndr -> Just $ do equals breakpoint located bndr p_hsTyVarBndr p_injectivityAnn :: InjectivityAnn GhcPs -> R () p_injectivityAnn (InjectivityAnn _ a bs) = do txt "|" space p_rdrName a space txt "->" space sep space p_rdrName bs p_tyFamInstEqn :: TyFamInstEqn GhcPs -> R () p_tyFamInstEqn FamEqn {..} = do case feqn_bndrs of HsOuterImplicit NoExtField -> return () HsOuterExplicit _ bndrs -> do p_forallBndrs ForAllInvis p_hsTyVarBndr bndrs breakpoint let atLeastOneBndr = case feqn_bndrs of HsOuterImplicit NoExtField -> False HsOuterExplicit _ bndrs -> not $ null bndrs inciIf atLeastOneBndr $ do let famLhsSpn = getLocA feqn_tycon : fmap lhsTypeArgSrcSpan feqn_pats switchLayout famLhsSpn $ p_infixDefHelper (isInfix feqn_fixity) True (p_rdrName feqn_tycon) (p_lhsTypeArg <$> feqn_pats) inci $ do space equals breakpoint located feqn_rhs p_hsType ---------------------------------------------------------------------------- -- Helpers isInfix :: LexicalFixity -> Bool isInfix = \case Infix -> True Prefix -> False ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Value.hs0000644000000000000000000012065407346545000021606 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Printer.Meat.Declaration.Value ( p_valDecl, p_pat, p_hsExpr, p_hsUntypedSplice, p_stringLit, IsApplicand (..), p_hsExpr', p_hsCmdTop, exprPlacement, cmdTopPlacement, ) where import Control.Monad import Data.Bool (bool) import Data.Coerce (coerce) import Data.Data hiding (Infix, Prefix) import Data.Function (on) import Data.Functor ((<&>)) import Data.Generics.Schemes (everything) import Data.List (intersperse, sortBy) import Data.List.NonEmpty (NonEmpty (..), (<|)) import Data.List.NonEmpty qualified as NE import Data.Maybe import Data.Text (Text) import Data.Text qualified as Text import Data.Void import GHC.Data.Bag (bagToList) import GHC.Data.Strict qualified as Strict import GHC.Hs import GHC.LanguageExtensions.Type (Extension (NegativeLiterals)) import GHC.Parser.CharClass (is_space) import GHC.Types.Basic import GHC.Types.Fixity import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import Language.Haskell.Syntax.Basic import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration.OpTree import Ormolu.Printer.Meat.Declaration.Signature import Ormolu.Printer.Meat.Type import Ormolu.Printer.Operators import Ormolu.Utils -- | Style of a group of equations. data MatchGroupStyle = Function (LocatedN RdrName) | PatternBind | Case | Lambda | LambdaCase -- | Style of equations in a group. data GroupStyle = EqualSign | RightArrow p_valDecl :: HsBind GhcPs -> R () p_valDecl = \case FunBind _ funId funMatches -> p_funBind funId funMatches PatBind _ pat grhss -> p_match PatternBind False NoSrcStrict [pat] grhss VarBind {} -> notImplemented "VarBinds" -- introduced by the type checker PatSynBind _ psb -> p_patSynBind psb p_funBind :: LocatedN RdrName -> MatchGroup GhcPs (LHsExpr GhcPs) -> R () p_funBind name = p_matchGroup (Function name) p_matchGroup :: MatchGroupStyle -> MatchGroup GhcPs (LHsExpr GhcPs) -> R () p_matchGroup = p_matchGroup' exprPlacement p_hsExpr p_matchGroup' :: ( Anno (GRHS GhcPs (LocatedA body)) ~ SrcAnn NoEpAnns, Anno (Match GhcPs (LocatedA body)) ~ SrcSpanAnnA ) => -- | How to get body placement (body -> Placement) -> -- | How to print body (body -> R ()) -> -- | Style of this group of equations MatchGroupStyle -> -- | Match group MatchGroup GhcPs (LocatedA body) -> R () p_matchGroup' placer render style mg@MG {..} = do let ob = case style of Case -> bracesIfEmpty LambdaCase -> bracesIfEmpty _ -> dontUseBraces where bracesIfEmpty = if isEmptyMatchGroup mg then useBraces else id -- Since we are forcing braces on 'sepSemi' based on 'ob', we have to -- restore the brace state inside the sepsemi. ub <- bool dontUseBraces useBraces <$> canUseBraces ob $ sepSemi (located' (ub . p_Match)) (unLoc mg_alts) where p_Match m@Match {..} = p_match' placer render (adjustMatchGroupStyle m style) (isInfixMatch m) (matchStrictness m) m_pats m_grhss -- | Function id obtained through pattern matching on 'FunBind' should not -- be used to print the actual equations because the different ‘RdrNames’ -- used in the equations may have different “decorations” (such as backticks -- and paretheses) associated with them. It is necessary to use per-equation -- names obtained from 'm_ctxt' of 'Match'. This function replaces function -- name inside of 'Function' accordingly. adjustMatchGroupStyle :: Match GhcPs body -> MatchGroupStyle -> MatchGroupStyle adjustMatchGroupStyle m = \case Function _ -> (Function . mc_fun . m_ctxt) m style -> style matchStrictness :: Match id body -> SrcStrictness matchStrictness match = case m_ctxt match of FunRhs {mc_strictness = s} -> s _ -> NoSrcStrict p_match :: -- | Style of the group MatchGroupStyle -> -- | Is this an infix match? Bool -> -- | Strictness prefix (FunBind) SrcStrictness -> -- | Argument patterns [LPat GhcPs] -> -- | Equations GRHSs GhcPs (LHsExpr GhcPs) -> R () p_match = p_match' exprPlacement p_hsExpr p_match' :: (Anno (GRHS GhcPs (LocatedA body)) ~ SrcAnn NoEpAnns) => -- | How to get body placement (body -> Placement) -> -- | How to print body (body -> R ()) -> -- | Style of this group of equations MatchGroupStyle -> -- | Is this an infix match? Bool -> -- | Strictness prefix (FunBind) SrcStrictness -> -- | Argument patterns [LPat GhcPs] -> -- | Equations GRHSs GhcPs (LocatedA body) -> R () p_match' placer render style isInfix strictness m_pats GRHSs {..} = do -- Normally, since patterns may be placed in a multi-line layout, it is -- necessary to bump indentation for the pattern group so it's more -- indented than function name. This in turn means that indentation for -- the body should also be bumped. Normally this would mean that bodies -- would start with two indentation steps applied, which is ugly, so we -- need to be a bit more clever here and bump indentation level only when -- pattern group is multiline. case strictness of NoSrcStrict -> return () SrcStrict -> txt "!" SrcLazy -> txt "~" indentBody <- case NE.nonEmpty m_pats of Nothing -> False <$ case style of Function name -> p_rdrName name _ -> return () Just ne_pats@(head_pat :| tail_pats) -> do let combinedSpans = case style of Function name -> combineSrcSpans (getLocA name) patSpans _ -> patSpans patSpans = combineSrcSpans' (getLocA <$> ne_pats) indentBody = not (isOneLineSpan combinedSpans) switchLayout [combinedSpans] $ do let stdCase = sep breakpoint (located' p_pat) m_pats case style of Function name -> p_infixDefHelper isInfix indentBody (p_rdrName name) (located' p_pat <$> m_pats) PatternBind -> stdCase Case -> stdCase Lambda -> do let needsSpace = case unLoc head_pat of LazyPat _ _ -> True BangPat _ _ -> True SplicePat _ _ -> True _ -> False txt "\\" when needsSpace space sitcc stdCase LambdaCase -> do located' p_pat head_pat unless (null tail_pats) $ do breakpoint -- When we have multiple patterns (with `\cases`) across multiple -- lines, we have to indent all but the first pattern. inci $ sep breakpoint (located' p_pat) tail_pats return indentBody let -- Calculate position of end of patterns. This is useful when we decide -- about putting certain constructions in hanging positions. endOfPats = case NE.nonEmpty m_pats of Nothing -> case style of Function name -> Just (getLocA name) _ -> Nothing Just pats -> (Just . getLocA . NE.last) pats isCase = \case Case -> True LambdaCase -> True _ -> False hasGuards = withGuards grhssGRHSs grhssSpan = combineSrcSpans' $ getGRHSSpan . unLoc <$> NE.fromList grhssGRHSs patGrhssSpan = maybe grhssSpan (combineSrcSpans grhssSpan . srcLocSpan . srcSpanEnd) endOfPats placement = case endOfPats of Just spn | any guardNeedsLineBreak grhssGRHSs || not (onTheSameLine spn grhssSpan) -> Normal _ -> blockPlacement placer grhssGRHSs guardNeedsLineBreak :: XRec GhcPs (GRHS GhcPs body) -> Bool guardNeedsLineBreak (L _ (GRHS _ guardLStmts _)) = case guardLStmts of [] -> False [g] -> not . isOneLineSpan . getLocA $ g _ -> True p_body = do let groupStyle = if isCase style && hasGuards then RightArrow else EqualSign sep breakpoint (located' (p_grhs' placement placer render groupStyle)) grhssGRHSs p_where = do unless (eqEmptyLocalBinds grhssLocalBinds) $ do breakpoint txt "where" breakpoint inci $ p_hsLocalBinds grhssLocalBinds inciIf indentBody $ do unless (length grhssGRHSs > 1) $ case style of Function _ | hasGuards -> return () Function _ -> space >> inci equals PatternBind -> space >> inci equals s | isCase s && hasGuards -> return () _ -> space >> txt "->" switchLayout [patGrhssSpan] $ placeHanging placement p_body inci p_where p_grhs :: GroupStyle -> GRHS GhcPs (LHsExpr GhcPs) -> R () p_grhs = p_grhs' Normal exprPlacement p_hsExpr p_grhs' :: -- | Placement of the parent RHS construct Placement -> -- | How to get body placement (body -> Placement) -> -- | How to print body (body -> R ()) -> GroupStyle -> GRHS GhcPs (LocatedA body) -> R () p_grhs' parentPlacement placer render style (GRHS _ guards body) = case guards of [] -> p_body xs -> do txt "|" space sitcc (sep commaDel (sitcc . located' p_stmt) xs) space inci $ case style of EqualSign -> equals RightArrow -> txt "->" -- If we have a sequence of guards and it is placed in the normal way, -- then we indent one level more for readability. Otherwise (all -- guards are on the same line) we do not need to indent, as it would -- look like double indentation without a good reason. inciIf (parentPlacement == Normal) (placeHanging placement p_body) where placement = case endOfGuards of Nothing -> placer (unLoc body) Just spn -> if onTheSameLine spn (getLocA body) then placer (unLoc body) else Normal endOfGuards = case NE.nonEmpty guards of Nothing -> Nothing Just gs -> (Just . getLocA . NE.last) gs p_body = located body render p_hsCmd :: HsCmd GhcPs -> R () p_hsCmd = p_hsCmd' NotApplicand N p_hsCmd' :: IsApplicand -> BracketStyle -> HsCmd GhcPs -> R () p_hsCmd' isApp s = \case HsCmdArrApp _ body input arrType rightToLeft -> do let (l, r) = if rightToLeft then (body, input) else (input, body) located l p_hsExpr breakpoint inci $ do case (arrType, rightToLeft) of (HsFirstOrderApp, True) -> txt "-<" (HsHigherOrderApp, True) -> txt "-<<" (HsFirstOrderApp, False) -> txt ">-" (HsHigherOrderApp, False) -> txt ">>-" placeHanging (exprPlacement (unLoc input)) $ located r p_hsExpr HsCmdArrForm _ form Prefix _ cmds -> banana s $ do located form p_hsExpr unless (null cmds) $ do breakpoint inci (sequence_ (intersperse breakpoint (located' (p_hsCmdTop N) <$> cmds))) HsCmdArrForm _ form Infix _ [left, right] -> do modFixityMap <- askModuleFixityMap let opTree = OpBranches [cmdOpTree left, cmdOpTree right] [form] p_cmdOpTree s (reassociateOpTree (getOpName . unLoc) modFixityMap opTree) HsCmdArrForm _ _ Infix _ _ -> notImplemented "HsCmdArrForm" HsCmdApp _ cmd expr -> do located cmd (p_hsCmd' Applicand s) breakpoint inci $ located expr p_hsExpr HsCmdLam _ mgroup -> p_matchGroup' cmdPlacement p_hsCmd Lambda mgroup HsCmdPar _ _ c _ -> parens N (located c p_hsCmd) HsCmdCase _ e mgroup -> p_case isApp cmdPlacement p_hsCmd e mgroup HsCmdLamCase _ variant mgroup -> p_lamcase isApp variant cmdPlacement p_hsCmd mgroup HsCmdIf _ _ if' then' else' -> p_if cmdPlacement p_hsCmd if' then' else' HsCmdLet _ _ localBinds _ c -> p_let p_hsCmd localBinds c HsCmdDo _ es -> do txt "do" p_stmts isApp cmdPlacement (p_hsCmd' NotApplicand S) es -- | Print a top-level command. p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () p_hsCmdTop s (HsCmdTop _ cmd) = located cmd (p_hsCmd' NotApplicand s) -- | Render an expression preserving blank lines between such consecutive -- expressions found in the original source code. withSpacing :: -- | Rendering function (a -> R ()) -> -- | Entity to render LocatedAn ann a -> R () withSpacing f l = located l $ \x -> do case getLocA l of UnhelpfulSpan _ -> f x RealSrcSpan currentSpn _ -> do getSpanMark >>= \case -- Spacing before comments will be handled by the code -- that prints comments, so we just have to deal with -- blank lines between statements here. Just (StatementSpan lastSpn) -> if srcSpanStartLine currentSpn > srcSpanEndLine lastSpn + 1 then newline else return () _ -> return () f x -- In some cases the (f x) expression may insert a new mark. We want -- to be careful not to override comment marks. getSpanMark >>= \case Just (HaddockSpan _ _) -> return () Just (CommentSpan _) -> return () _ -> setSpanMark (StatementSpan currentSpn) p_stmt :: Stmt GhcPs (LHsExpr GhcPs) -> R () p_stmt = p_stmt' exprPlacement p_hsExpr p_stmt' :: ( Anno (Stmt GhcPs (LocatedA body)) ~ SrcSpanAnnA, Anno [LocatedA (Stmt GhcPs (LocatedA body))] ~ SrcSpanAnnL ) => -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Statement to render Stmt GhcPs (LocatedA body) -> R () p_stmt' placer render = \case LastStmt _ body _ _ -> located body render BindStmt _ p f@(getLocA -> l) -> do located p p_pat space txt "<-" let loc = getLocA p placement | isOneLineSpan (mkSrcSpan (srcSpanEnd loc) (srcSpanStart l)) = placer (unLoc f) | otherwise = Normal switchLayout [loc, l] $ placeHanging placement (located f render) ApplicativeStmt {} -> notImplemented "ApplicativeStmt" -- generated by renamer BodyStmt _ body _ _ -> located body render LetStmt _ binds -> do txt "let" space sitcc $ p_hsLocalBinds binds ParStmt {} -> -- 'ParStmt' should always be eliminated in 'gatherStmt' already, such -- that it never occurs in 'p_stmt''. Consequently, handling it here -- would be redundant. notImplemented "ParStmt" TransStmt {..} -> -- 'TransStmt' only needs to account for render printing itself, since -- pretty printing of relevant statements (e.g., in 'trS_stmts') is -- handled through 'gatherStmt'. case (trS_form, trS_by) of (ThenForm, Nothing) -> do txt "then" breakpoint inci $ located trS_using p_hsExpr (ThenForm, Just e) -> do txt "then" breakpoint inci $ located trS_using p_hsExpr breakpoint txt "by" breakpoint inci $ located e p_hsExpr (GroupForm, Nothing) -> do txt "then group using" breakpoint inci $ located trS_using p_hsExpr (GroupForm, Just e) -> do txt "then group by" breakpoint inci $ located e p_hsExpr breakpoint txt "using" breakpoint inci $ located trS_using p_hsExpr RecStmt {..} -> do txt "rec" space sitcc . located recS_stmts $ sepSemi (withSpacing (p_stmt' placer render)) p_stmts :: ( Anno (Stmt GhcPs (LocatedA body)) ~ SrcSpanAnnA, Anno [LocatedA (Stmt GhcPs (LocatedA body))] ~ SrcSpanAnnL ) => IsApplicand -> -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Statements to render LocatedL [LocatedA (Stmt GhcPs (LocatedA body))] -> R () p_stmts isApp placer render es = do breakpoint ub <- layoutToBraces <$> getLayout let p_stmtExt (relPos, stmt) = ub' $ withSpacing (p_stmt' placer render) stmt where -- We need to set brace usage information for all but the last -- statement (e.g.in the case of nested do blocks). ub' = case relPos of FirstPos -> ub MiddlePos -> ub LastPos -> id SinglePos -> id inciApplicand isApp . located es $ sepSemi p_stmtExt . attachRelativePos gatherStmt :: ExprLStmt GhcPs -> [[ExprLStmt GhcPs]] gatherStmt (L _ (ParStmt _ block _ _)) = foldr ((<>) . gatherStmtBlock) [] block gatherStmt (L s stmt@TransStmt {..}) = foldr liftAppend [] ((gatherStmt <$> trS_stmts) <> pure [[L s stmt]]) gatherStmt stmt = [[stmt]] gatherStmtBlock :: ParStmtBlock GhcPs GhcPs -> [[ExprLStmt GhcPs]] gatherStmtBlock (ParStmtBlock _ stmts _ _) = foldr (liftAppend . gatherStmt) [] stmts p_hsLocalBinds :: HsLocalBinds GhcPs -> R () p_hsLocalBinds = \case HsValBinds epAnn (ValBinds _ bag lsigs) -> pseudoLocated epAnn $ do -- When in a single-line layout, there is a chance that the inner -- elements will also contain semicolons and they will confuse the -- parser. so we request braces around every element except the last. br <- layoutToBraces <$> getLayout let items = let injectLeft (L l x) = L l (Left x) injectRight (L l x) = L l (Right x) in (injectLeft <$> bagToList bag) ++ (injectRight <$> lsigs) positionToBracing = \case SinglePos -> id FirstPos -> br MiddlePos -> br LastPos -> id p_item' (p, item) = positionToBracing p $ withSpacing (either p_valDecl p_sigDecl) item binds = sortBy (leftmost_smallest `on` getLocA) items sitcc $ sepSemi p_item' (attachRelativePos binds) HsValBinds _ _ -> notImplemented "HsValBinds" HsIPBinds epAnn (IPBinds _ xs) -> pseudoLocated epAnn $ do let p_ipBind (IPBind _ (L _ name) expr) = do atom @HsIPName name space equals breakpoint useBraces $ inci $ located expr p_hsExpr sepSemi (located' p_ipBind) xs EmptyLocalBinds _ -> return () where -- HsLocalBinds is no longer wrapped in a Located (see call sites -- of p_hsLocalBinds). Hence, we introduce a manual Located as we -- depend on the layout being correctly set. pseudoLocated = \case EpAnn {anns = AnnList {al_anchor = Just Anchor {anchor}}} | let sp = RealSrcSpan anchor Strict.Nothing, -- excluding cases where there are no bindings not $ isZeroWidthSpan sp -> located (L sp ()) . const _ -> id p_ldotFieldOcc :: XRec GhcPs (DotFieldOcc GhcPs) -> R () p_ldotFieldOcc = located' $ p_rdrName . fmap (mkVarUnqual . field_label) . dfoLabel p_ldotFieldOccs :: [XRec GhcPs (DotFieldOcc GhcPs)] -> R () p_ldotFieldOccs = sep (txt ".") p_ldotFieldOcc p_fieldOcc :: FieldOcc GhcPs -> R () p_fieldOcc FieldOcc {..} = p_rdrName foLabel p_hsFieldBind :: (lhs ~ GenLocated l a, HasSrcSpan l) => (lhs -> R ()) -> HsFieldBind lhs (LHsExpr GhcPs) -> R () p_hsFieldBind p_lhs HsFieldBind {..} = do p_lhs hfbLHS unless hfbPun $ do space equals let placement = if onTheSameLine (getLoc' hfbLHS) (getLocA hfbRHS) then exprPlacement (unLoc hfbRHS) else Normal placeHanging placement (located hfbRHS p_hsExpr) p_hsExpr :: HsExpr GhcPs -> R () p_hsExpr = p_hsExpr' NotApplicand N -- | An applicand is the left-hand side in a function application, i.e. @f@ in -- @f a@. We need to track this in order to add extra identation in cases like -- -- > foo = -- > do -- > succ -- > 1 data IsApplicand = Applicand | NotApplicand inciApplicand :: IsApplicand -> R () -> R () inciApplicand = \case Applicand -> inci . inci NotApplicand -> inci p_hsExpr' :: IsApplicand -> BracketStyle -> HsExpr GhcPs -> R () p_hsExpr' isApp s = \case HsVar _ name -> p_rdrName name HsUnboundVar _ occ -> atom occ HsRecSel _ fldOcc -> p_fieldOcc fldOcc HsOverLabel _ sourceText _ -> do txt "#" p_sourceText sourceText HsIPVar _ (HsIPName name) -> do txt "?" atom name HsOverLit _ v -> atom (ol_val v) HsLit _ lit -> case lit of HsString (SourceText stxt) _ -> p_stringLit stxt HsStringPrim (SourceText stxt) _ -> p_stringLit stxt r -> atom r HsLam _ mgroup -> p_matchGroup Lambda mgroup HsLamCase _ variant mgroup -> p_lamcase isApp variant exprPlacement p_hsExpr mgroup HsApp _ f x -> do let -- In order to format function applications with multiple parameters -- nicer, traverse the AST to gather the function and all the -- parameters together. gatherArgs f' knownArgs = case f' of L _ (HsApp _ l r) -> gatherArgs l (r <| knownArgs) _ -> (f', knownArgs) (func, args) = gatherArgs f (x :| []) -- We need to handle the last argument specially if it is a -- hanging construct, so separate it from the rest. (initp, lastp) = (NE.init args, NE.last args) initSpan = combineSrcSpans' $ getLocA f :| [(srcLocSpan . srcSpanStart . getLocA) lastp] -- Hang the last argument only if the initial arguments span one -- line. placement = if isOneLineSpan initSpan then exprPlacement (unLoc lastp) else Normal -- If the last argument is not hanging, just separate every argument as -- usual. If it is hanging, print the initial arguments and hang the -- last one. Also, use braces around the every argument except the last -- one. case placement of Normal -> do ub <- getLayout <&> \case SingleLine -> useBraces MultiLine -> id ub $ do located func (p_hsExpr' Applicand s) breakpoint inci $ sep breakpoint (located' p_hsExpr) initp inci $ do unless (null initp) breakpoint located lastp p_hsExpr Hanging -> do useBraces . switchLayout [initSpan] $ do located func (p_hsExpr' Applicand s) breakpoint sep breakpoint (located' p_hsExpr) initp placeHanging placement $ located lastp p_hsExpr HsAppType _ e _ a -> do located e p_hsExpr breakpoint inci $ do txt "@" -- Insert a space when the type is represented as a TH splice to avoid -- gluing @ and $ together. case unLoc (hswc_body a) of HsSpliceTy {} -> space _ -> return () located (hswc_body a) p_hsType OpApp _ x op y -> do modFixityMap <- askModuleFixityMap let opTree = OpBranches [exprOpTree x, exprOpTree y] [op] p_exprOpTree s (reassociateOpTree (getOpName . unLoc) modFixityMap opTree) NegApp _ e _ -> do negativeLiterals <- isExtensionEnabled NegativeLiterals let isLiteral = case unLoc e of HsLit {} -> True HsOverLit {} -> True _ -> False txt "-" -- If NegativeLiterals is enabled, we have to insert a space before -- negated literals, as `- 1` and `-1` have differing AST. when (negativeLiterals && isLiteral) space located e p_hsExpr HsPar _ _ e _ -> parens s (located e (dontUseBraces . p_hsExpr)) SectionL _ x op -> do located x p_hsExpr breakpoint inci (located op p_hsExpr) SectionR _ op x -> do located op p_hsExpr breakpoint inci (located x p_hsExpr) ExplicitTuple _ args boxity -> do let isSection = any isMissing args isMissing = \case Missing _ -> True _ -> False p_arg = sitcc . \case Present _ x -> located x p_hsExpr Missing _ -> pure () parens' = case boxity of Boxed -> parens Unboxed -> parensHash enclSpan <- fmap (flip RealSrcSpan Strict.Nothing) . maybeToList <$> getEnclosingSpan if isSection then switchLayout [] . parens' s $ sep comma p_arg args else switchLayout enclSpan . parens' s $ sep commaDel p_arg args ExplicitSum _ tag arity e -> p_unboxedSum N tag arity (located e p_hsExpr) HsCase _ e mgroup -> p_case isApp exprPlacement p_hsExpr e mgroup HsIf _ if' then' else' -> p_if exprPlacement p_hsExpr if' then' else' HsMultiIf _ guards -> do txt "if" breakpoint inciApplicand isApp $ sep newline (located' (p_grhs RightArrow)) guards HsLet _ _ localBinds _ e -> p_let p_hsExpr localBinds e HsDo _ doFlavor es -> do let doBody moduleName header = do forM_ moduleName $ \m -> atom m *> txt "." txt header p_stmts isApp exprPlacement (p_hsExpr' NotApplicand S) es compBody = brackets s . located es $ \xs -> do let p_parBody = sep (breakpoint >> txt "|" >> space) p_seqBody p_seqBody = sitcc . sep commaDel (located' (sitcc . p_stmt)) stmts = init xs yield = last xs lists = foldr (liftAppend . gatherStmt) [] stmts located yield p_stmt breakpoint txt "|" space p_parBody lists case doFlavor of DoExpr moduleName -> doBody moduleName "do" MDoExpr moduleName -> doBody moduleName "mdo" ListComp -> compBody MonadComp -> compBody GhciStmtCtxt -> notImplemented "GhciStmtCtxt" ExplicitList _ xs -> brackets s $ sep commaDel (sitcc . located' p_hsExpr) xs RecordCon {..} -> do p_rdrName rcon_con breakpoint let HsRecFields {..} = rcon_flds p_lhs = located' $ p_rdrName . foLabel fields = located' (p_hsFieldBind p_lhs) <$> rec_flds dotdot = case rec_dotdot of Just {} -> [txt ".."] Nothing -> [] inci . braces N $ sep commaDel sitcc (fields <> dotdot) RecordUpd {..} -> do located rupd_expr p_hsExpr breakpoint let p_updLbl = located' $ p_rdrName . \case (Unambiguous NoExtField n :: AmbiguousFieldOcc GhcPs) -> n Ambiguous NoExtField n -> n p_recFields p_lbl = sep commaDel (sitcc . located' (p_hsFieldBind p_lbl)) inci . braces N $ either (p_recFields p_updLbl) (p_recFields $ located' $ coerce p_ldotFieldOccs) rupd_flds HsGetField {..} -> do located gf_expr p_hsExpr txt "." p_ldotFieldOcc gf_field HsProjection {..} -> parens N $ do txt "." p_ldotFieldOccs (NE.toList proj_flds) ExprWithTySig _ x HsWC {hswc_body} -> sitcc $ do located x p_hsExpr space txt "::" breakpoint inci $ located hswc_body p_hsSigType ArithSeq _ _ x -> case x of From from -> brackets s $ do located from p_hsExpr breakpoint txt ".." FromThen from next -> brackets s $ do sep commaDel (located' p_hsExpr) [from, next] breakpoint txt ".." FromTo from to -> brackets s $ do located from p_hsExpr breakpoint txt ".." space located to p_hsExpr FromThenTo from next to -> brackets s $ do sep commaDel (located' p_hsExpr) [from, next] breakpoint txt ".." space located to p_hsExpr HsTypedBracket _ expr -> do txt "[||" breakpoint' located expr p_hsExpr breakpoint' txt "||]" HsUntypedBracket epAnn x -> p_hsQuote epAnn x HsTypedSplice _ expr -> p_hsSpliceTH True expr DollarSplice HsUntypedSplice _ untySplice -> p_hsUntypedSplice DollarSplice untySplice HsProc _ p e -> do txt "proc" located p $ \x -> do breakpoint inci (p_pat x) breakpoint txt "->" placeHanging (cmdTopPlacement (unLoc e)) $ located e (p_hsCmdTop N) HsStatic _ e -> do txt "static" breakpoint inci (located e p_hsExpr) HsPragE _ prag x -> case prag of HsPragSCC _ name -> do txt "{-# SCC " atom name txt " #-}" breakpoint let inciIfS = case s of N -> id; S -> inci inciIfS $ located x p_hsExpr p_patSynBind :: PatSynBind GhcPs GhcPs -> R () p_patSynBind PSB {..} = do let rhs conSpans = do space let pattern_def_spans = [getLocA psb_id, getLocA psb_def] ++ conSpans case psb_dir of Unidirectional -> switchLayout pattern_def_spans $ do txt "<-" breakpoint located psb_def p_pat ImplicitBidirectional -> switchLayout pattern_def_spans $ do equals breakpoint located psb_def p_pat ExplicitBidirectional mgroup -> do switchLayout pattern_def_spans $ do txt "<-" breakpoint located psb_def p_pat breakpoint txt "where" breakpoint inci (p_matchGroup (Function psb_id) mgroup) txt "pattern" case psb_args of PrefixCon [] xs -> do space p_rdrName psb_id inci $ do let conSpans = getLocA <$> xs switchLayout conSpans $ do unless (null xs) breakpoint sitcc (sep breakpoint p_rdrName xs) rhs conSpans PrefixCon (v : _) _ -> absurd v RecCon xs -> do space p_rdrName psb_id inci $ do let conSpans = getLocA . recordPatSynPatVar <$> xs switchLayout conSpans $ do unless (null xs) breakpoint braces N $ sep commaDel (p_rdrName . recordPatSynPatVar) xs rhs conSpans InfixCon l r -> do let conSpans = [getLocA l, getLocA r] switchLayout conSpans $ do space p_rdrName l breakpoint inci $ do p_rdrName psb_id space p_rdrName r inci (rhs conSpans) p_case :: ( Anno (GRHS GhcPs (LocatedA body)) ~ SrcAnn NoEpAnns, Anno (Match GhcPs (LocatedA body)) ~ SrcSpanAnnA ) => IsApplicand -> -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Expression LHsExpr GhcPs -> -- | Match group MatchGroup GhcPs (LocatedA body) -> R () p_case isApp placer render e mgroup = do txt "case" space located e p_hsExpr space txt "of" breakpoint inciApplicand isApp (p_matchGroup' placer render Case mgroup) p_lamcase :: ( Anno (GRHS GhcPs (LocatedA body)) ~ SrcAnn NoEpAnns, Anno (Match GhcPs (LocatedA body)) ~ SrcSpanAnnA ) => IsApplicand -> -- | Variant (@\\case@ or @\\cases@) LamCaseVariant -> -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Expression MatchGroup GhcPs (LocatedA body) -> R () p_lamcase isApp variant placer render mgroup = do txt $ case variant of LamCase -> "\\case" LamCases -> "\\cases" breakpoint inciApplicand isApp (p_matchGroup' placer render LambdaCase mgroup) p_if :: -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | If LHsExpr GhcPs -> -- | Then LocatedA body -> -- | Else LocatedA body -> R () p_if placer render if' then' else' = do txt "if" space located if' p_hsExpr breakpoint inci $ do txt "then" space located then' $ \x -> placeHanging (placer x) (render x) breakpoint txt "else" space located else' $ \x -> placeHanging (placer x) (render x) p_let :: -- | Render (body -> R ()) -> HsLocalBinds GhcPs -> LocatedA body -> R () p_let render localBinds e = sitcc $ do txt "let" space dontUseBraces $ sitcc (p_hsLocalBinds localBinds) vlayout space (newline >> txt " ") txt "in" space sitcc (located e render) p_pat :: Pat GhcPs -> R () p_pat = \case WildPat _ -> txt "_" VarPat _ name -> p_rdrName name LazyPat _ pat -> do txt "~" located pat p_pat AsPat _ name _ pat -> do p_rdrName name txt "@" located pat p_pat ParPat _ _ pat _ -> located pat (parens S . p_pat) BangPat _ pat -> do txt "!" located pat p_pat ListPat _ pats -> brackets S $ sep commaDel (located' p_pat) pats TuplePat _ pats boxing -> do let parens' = case boxing of Boxed -> parens S Unboxed -> parensHash S parens' $ sep commaDel (sitcc . located' p_pat) pats SumPat _ pat tag arity -> p_unboxedSum S tag arity (located pat p_pat) ConPat _ pat details -> case details of PrefixCon tys xs -> sitcc $ do p_rdrName pat unless (null tys && null xs) breakpoint inci . sitcc $ sep breakpoint (sitcc . either p_hsConPatTyArg (located' p_pat)) $ (Left <$> tys) <> (Right <$> xs) RecCon (HsRecFields fields dotdot) -> do p_rdrName pat breakpoint let f = \case Nothing -> txt ".." Just x -> located x p_pat_hsFieldBind inci . braces N . sep commaDel f $ case dotdot of Nothing -> Just <$> fields Just (L _ (RecFieldsDotDot n)) -> (Just <$> take n fields) ++ [Nothing] InfixCon l r -> do switchLayout [getLocA l, getLocA r] $ do located l p_pat breakpoint inci $ do p_rdrName pat space located r p_pat ViewPat _ expr pat -> sitcc $ do located expr p_hsExpr space txt "->" breakpoint inci (located pat p_pat) SplicePat _ splice -> p_hsUntypedSplice DollarSplice splice LitPat _ p -> atom p NPat _ v (isJust -> isNegated) _ -> do when isNegated $ do txt "-" negativeLiterals <- isExtensionEnabled NegativeLiterals when negativeLiterals space located v (atom . ol_val) NPlusKPat _ n k _ _ _ -> sitcc $ do p_rdrName n breakpoint inci $ do txt "+" space located k (atom . ol_val) SigPat _ pat HsPS {..} -> do located pat p_pat p_typeAscription (lhsTypeToSigType hsps_body) p_hsPatSigType :: HsPatSigType GhcPs -> R () p_hsPatSigType (HsPS _ ty) = txt "@" *> located ty p_hsType p_hsConPatTyArg :: HsConPatTyArg GhcPs -> R () p_hsConPatTyArg (HsConPatTyArg _ patSigTy) = p_hsPatSigType patSigTy p_pat_hsFieldBind :: HsRecField GhcPs (LPat GhcPs) -> R () p_pat_hsFieldBind HsFieldBind {..} = do located hfbLHS p_fieldOcc unless hfbPun $ do space equals breakpoint inci (located hfbRHS p_pat) p_unboxedSum :: BracketStyle -> ConTag -> Arity -> R () -> R () p_unboxedSum s tag arity m = do let before = tag - 1 after = arity - before - 1 args = replicate before Nothing <> [Just m] <> replicate after Nothing f x = case x :: Maybe (R ()) of Nothing -> space Just m' -> do space m' space parensHash s $ sep (txt "|") f args p_hsUntypedSplice :: SpliceDecoration -> HsUntypedSplice GhcPs -> R () p_hsUntypedSplice deco = \case HsUntypedSpliceExpr _ expr -> p_hsSpliceTH False expr deco HsQuasiQuote _ quoterName str -> do txt "[" p_rdrName (noLocA quoterName) txt "|" -- QuasiQuoters often rely on precise custom strings. We cannot do any -- formatting here without potentially breaking someone's code. atom str txt "|]" p_hsSpliceTH :: -- | Typed splice? Bool -> -- | Splice expression LHsExpr GhcPs -> -- | Splice decoration SpliceDecoration -> R () p_hsSpliceTH isTyped expr = \case DollarSplice -> do txt decoSymbol located expr (sitcc . p_hsExpr) BareSplice -> located expr (sitcc . p_hsExpr) where decoSymbol = if isTyped then "$$" else "$" p_hsQuote :: EpAnn [AddEpAnn] -> HsQuote GhcPs -> R () p_hsQuote epAnn = \case ExpBr _ expr -> do let name | any isJust (matchAddEpAnn AnnOpenEQ <$> epAnnAnns epAnn) = "" | otherwise = "e" quote name (located expr p_hsExpr) PatBr _ pat -> located pat (quote "p" . p_pat) DecBrL _ decls -> quote "d" (handleStarIsType decls (p_hsDecls Free decls)) DecBrG _ _ -> notImplemented "DecBrG" -- result of renamer TypBr _ ty -> quote "t" (located ty (handleStarIsType ty . p_hsType)) VarBr _ isSingleQuote name -> do txt (bool "''" "'" isSingleQuote) p_rdrName name where quote :: Text -> R () -> R () quote name body = do txt "[" txt name txt "|" breakpoint' inci $ do dontUseBraces body breakpoint' txt "|]" -- With StarIsType, type and declaration brackets might end with a *, -- so we have to insert a space in the end to prevent the (mis)parsing -- of an (*|) operator. -- The detection is a bit overcautious, as it adds the spaces as soon as -- HsStarTy is anywhere in the type/declaration. handleStarIsType :: (Data a) => a -> R () -> R () handleStarIsType a p | containsHsStarTy a = space *> p <* space | otherwise = p where containsHsStarTy = everything (||) $ \b -> case cast @_ @(HsType GhcPs) b of Just HsStarTy {} -> True _ -> False -- | Print the source text of a string literal while indenting gaps correctly. p_stringLit :: String -> R () p_stringLit src = let s = splitGaps src singleLine = txt $ Text.pack (mconcat s) multiLine = sitcc $ sep breakpoint (txt . Text.pack) (backslashes s) in vlayout singleLine multiLine where -- Split a string on gaps (backslash delimited whitespaces) -- -- > splitGaps "bar\\ \\fo\\&o" == ["bar", "fo\\&o"] splitGaps :: String -> [String] splitGaps "" = [] splitGaps s = let -- A backslash and a whitespace starts a "gap" p (Just '\\', _, _) = True p (_, '\\', Just c) | ghcSpace c = False p _ = True in case span p (zipPrevNext s) of (l, r) -> let -- drop the initial '\', any amount of 'ghcSpace', and another '\' r' = drop 1 . dropWhile ghcSpace . drop 1 $ map orig r in map orig l : splitGaps r' -- GHC's definition of whitespaces in strings -- See: https://gitlab.haskell.org/ghc/ghc/blob/86753475/compiler/parser/Lexer.x#L1653 ghcSpace :: Char -> Bool ghcSpace c = c <= '\x7f' && is_space c -- Add backslashes to the inner side of the strings -- -- > backslashes ["a", "b", "c"] == ["a\\", "\\b\\", "\\c"] backslashes :: [String] -> [String] backslashes (x : y : xs) = (x ++ "\\") : backslashes (('\\' : y) : xs) backslashes xs = xs -- Attaches previous and next items to each list element zipPrevNext :: [a] -> [(Maybe a, a, Maybe a)] zipPrevNext xs = let z = zip (zip (Nothing : map Just xs) xs) (map Just (tail xs) ++ repeat Nothing) in map (\((p, x), n) -> (p, x, n)) z orig (_, x, _) = x ---------------------------------------------------------------------------- -- Helpers -- | Return the wrapping function controlling the use of braces according to -- the current layout. layoutToBraces :: Layout -> R () -> R () layoutToBraces = \case SingleLine -> useBraces MultiLine -> id -- | Append each element in both lists with semigroups. If one list is shorter -- than the other, return the rest of the longer list unchanged. liftAppend :: (Semigroup a) => [a] -> [a] -> [a] liftAppend [] [] = [] liftAppend [] (y : ys) = y : ys liftAppend (x : xs) [] = x : xs liftAppend (x : xs) (y : ys) = x <> y : liftAppend xs ys getGRHSSpan :: GRHS GhcPs (LocatedA body) -> SrcSpan getGRHSSpan (GRHS _ guards body) = combineSrcSpans' $ getLocA body :| map getLocA guards -- | Determine placement of a given block. blockPlacement :: (body -> Placement) -> [LGRHS GhcPs (LocatedA body)] -> Placement blockPlacement placer [L _ (GRHS _ _ (L _ x))] = placer x blockPlacement _ _ = Normal -- | Determine placement of a given command. cmdPlacement :: HsCmd GhcPs -> Placement cmdPlacement = \case HsCmdLam _ _ -> Hanging HsCmdCase _ _ _ -> Hanging HsCmdLamCase _ _ _ -> Hanging HsCmdDo _ _ -> Hanging _ -> Normal -- | Determine placement of a top level command. cmdTopPlacement :: HsCmdTop GhcPs -> Placement cmdTopPlacement (HsCmdTop _ (L _ x)) = cmdPlacement x -- | Check if given expression has a hanging form. exprPlacement :: HsExpr GhcPs -> Placement exprPlacement = \case -- Only hang lambdas with single line parameter lists HsLam _ mg -> case mg of MG _ (L _ [L _ (Match _ _ (x : xs) _)]) | isOneLineSpan (combineSrcSpans' $ fmap getLocA (x :| xs)) -> Hanging _ -> Normal HsLamCase _ _ _ -> Hanging HsCase _ _ _ -> Hanging HsDo _ (DoExpr _) _ -> Hanging HsDo _ (MDoExpr _) _ -> Hanging OpApp _ _ op y -> case (fmap getOpNameStr . getOpName . unLoc) op of Just "$" -> exprPlacement (unLoc y) _ -> Normal HsApp _ _ y -> exprPlacement (unLoc y) HsProc _ p _ -> -- Indentation breaks if pattern is longer than one line and left -- hanging. Consequently, only apply hanging when it is safe. if isOneLineSpan (getLocA p) then Hanging else Normal _ -> Normal -- | Return 'True' if any of the RHS expressions has guards. withGuards :: [LGRHS GhcPs body] -> Bool withGuards = any (checkOne . unLoc) where checkOne (GRHS _ [] _) = False checkOne _ = True ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Value.hs-boot0000644000000000000000000000125607346545000022543 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration.Value ( p_valDecl, p_pat, p_hsExpr, p_hsUntypedSplice, p_stringLit, p_hsExpr', p_hsCmdTop, exprPlacement, cmdTopPlacement, ) where import GHC.Hs import Ormolu.Printer.Combinators p_valDecl :: HsBindLR GhcPs GhcPs -> R () p_pat :: Pat GhcPs -> R () p_hsExpr :: HsExpr GhcPs -> R () p_hsUntypedSplice :: SpliceDecoration -> HsUntypedSplice GhcPs -> R () p_stringLit :: String -> R () data IsApplicand p_hsExpr' :: IsApplicand -> BracketStyle -> HsExpr GhcPs -> R () p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () exprPlacement :: HsExpr GhcPs -> Placement cmdTopPlacement :: HsCmdTop GhcPs -> Placement ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Declaration/Warning.hs0000644000000000000000000000265507346545000022137 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Printer.Meat.Declaration.Warning ( p_warnDecls, p_moduleWarning, ) where import Data.Foldable import Data.Text (Text) import GHC.Hs import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import GHC.Unit.Module.Warnings import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common p_warnDecls :: WarnDecls GhcPs -> R () p_warnDecls (Warnings _ warnings) = traverse_ (located' p_warnDecl) warnings p_warnDecl :: WarnDecl GhcPs -> R () p_warnDecl (Warning _ functions warningTxt) = p_topLevelWarning functions warningTxt p_moduleWarning :: WarningTxt GhcPs -> R () p_moduleWarning wtxt = do let (pragmaText, lits) = warningText wtxt inci $ pragma pragmaText $ inci $ p_lits lits p_topLevelWarning :: [LocatedN RdrName] -> WarningTxt GhcPs -> R () p_topLevelWarning fnames wtxt = do let (pragmaText, lits) = warningText wtxt switchLayout (fmap getLocA fnames ++ fmap getLoc lits) $ pragma pragmaText . inci $ do sep commaDel p_rdrName fnames breakpoint p_lits lits warningText :: WarningTxt GhcPs -> (Text, [Located StringLiteral]) warningText = \case WarningTxt _ lits -> ("WARNING", fmap hsDocString <$> lits) DeprecatedTxt _ lits -> ("DEPRECATED", fmap hsDocString <$> lits) p_lits :: [Located StringLiteral] -> R () p_lits = \case [l] -> atom l ls -> brackets N $ sep commaDel atom ls ormolu-0.7.2.0/src/Ormolu/Printer/Meat/ImportExport.hs0000644000000000000000000000613607346545000020757 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of import and export lists. module Ormolu.Printer.Meat.ImportExport ( p_hsmodExports, p_hsmodImport, ) where import Control.Monad import GHC.Hs import GHC.LanguageExtensions.Type import GHC.Types.PkgQual import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Utils (RelativePos (..), attachRelativePos) p_hsmodExports :: [LIE GhcPs] -> R () p_hsmodExports xs = parens N $ do layout <- getLayout sep breakpoint (\(p, l) -> sitcc (located l (p_lie layout p))) (attachRelativePos xs) p_hsmodImport :: ImportDecl GhcPs -> R () p_hsmodImport ImportDecl {..} = do useQualifiedPost <- isExtensionEnabled ImportQualifiedPost txt "import" space when (ideclSource == IsBoot) (txt "{-# SOURCE #-}") space when ideclSafe (txt "safe") space when (isImportDeclQualified ideclQualified && not useQualifiedPost) (txt "qualified") space case ideclPkgQual of NoRawPkgQual -> return () RawPkgQual slit -> atom slit space inci $ do located ideclName atom when (isImportDeclQualified ideclQualified && useQualifiedPost) (space >> txt "qualified") case ideclAs of Nothing -> return () Just l -> do space txt "as" space located l atom space case ideclImportList of Nothing -> return () Just (hiding, L _ xs) -> do case hiding of Exactly -> pure () EverythingBut -> txt "hiding" breakpoint parens N $ do layout <- getLayout sep breakpoint (\(p, l) -> sitcc (located l (p_lie layout p))) (attachRelativePos xs) newline p_lie :: Layout -> RelativePos -> IE GhcPs -> R () p_lie encLayout relativePos = \case IEVar NoExtField l1 -> do located l1 p_ieWrappedName p_comma IEThingAbs _ l1 -> do located l1 p_ieWrappedName p_comma IEThingAll _ l1 -> do located l1 p_ieWrappedName space txt "(..)" p_comma IEThingWith _ l1 w xs -> sitcc $ do located l1 p_ieWrappedName breakpoint inci $ do let names :: [R ()] names = located' p_ieWrappedName <$> xs parens N . sep commaDel sitcc $ case w of NoIEWildcard -> names IEWildcard n -> let (before, after) = splitAt n names in before ++ [txt ".."] ++ after p_comma IEModuleContents _ l1 -> do located l1 p_hsmodName p_comma IEGroup NoExtField n str -> do case relativePos of SinglePos -> return () FirstPos -> return () MiddlePos -> newline LastPos -> newline p_hsDoc (Asterisk n) False str IEDoc NoExtField str -> p_hsDoc Pipe False str IEDocNamed NoExtField str -> p_hsDocName str where p_comma = case encLayout of SingleLine -> case relativePos of SinglePos -> return () FirstPos -> comma MiddlePos -> comma LastPos -> return () MultiLine -> comma ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Module.hs0000644000000000000000000000364707346545000017534 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of modules. module Ormolu.Printer.Meat.Module ( p_hsModule, ) where import Control.Monad import GHC.Hs hiding (comment) import GHC.Types.SrcLoc import Ormolu.Parser.CommentStream import Ormolu.Parser.Pragma import Ormolu.Printer.Combinators import Ormolu.Printer.Comments import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration import Ormolu.Printer.Meat.Declaration.Warning import Ormolu.Printer.Meat.ImportExport import Ormolu.Printer.Meat.Pragma -- | Render a module-like entity (either a regular module or a backpack -- signature). p_hsModule :: -- | Stack header Maybe LComment -> -- | Pragmas and the associated comments [([LComment], Pragma)] -> -- | AST to print HsModule GhcPs -> R () p_hsModule mstackHeader pragmas HsModule {..} = do let XModulePs {..} = hsmodExt deprecSpan = maybe [] (pure . getLocA) hsmodDeprecMessage exportSpans = maybe [] (pure . getLocA) hsmodExports switchLayout (deprecSpan <> exportSpans) $ do forM_ mstackHeader $ \(L spn comment) -> do spitCommentNow spn comment newline newline p_pragmas pragmas newline case hsmodName of Nothing -> return () Just hsmodName' -> do located hsmodName' $ \name -> do forM_ hsmodHaddockModHeader (p_hsDoc Pipe True) p_hsmodName name breakpoint forM_ hsmodDeprecMessage $ \w -> do located' p_moduleWarning w breakpoint case hsmodExports of Nothing -> return () Just l -> do encloseLocated l $ \exports -> do inci (p_hsmodExports exports) breakpoint txt "where" newline newline forM_ hsmodImports (located' p_hsmodImport) newline switchLayout (getLocA <$> hsmodDecls) $ do p_hsDecls Free hsmodDecls newline spitRemainingComments ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Pragma.hs0000644000000000000000000000573107346545000017512 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | Pretty-printing of language pragmas. module Ormolu.Printer.Meat.Pragma ( p_pragmas, ) where import Control.Monad import Data.Char (isUpper) import Data.List qualified as L import Data.Set (Set) import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import GHC.Driver.Flags (Language) import GHC.Types.SrcLoc import Ormolu.Parser.CommentStream import Ormolu.Parser.Pragma (Pragma (..)) import Ormolu.Printer.Combinators hiding (Placement (..)) import Ormolu.Printer.Comments -- | Pragma classification. data PragmaTy = Language LanguagePragmaClass | OptionsGHC | OptionsHaddock deriving (Eq, Ord) -- | Language pragma classification. -- -- The order in which language pragmas are put in the input sometimes -- matters. This is because some language extensions can enable other -- extensions, yet the extensions coming later in the list have the ability -- to change it. So here we classify all extensions by assigning one of the -- four groups to them. Then we only sort inside of the groups. -- -- 'Ord' instance of this data type is what affects the sorting. -- -- See also: data LanguagePragmaClass = -- | A pack of extensions like @GHC2021@ or @Haskell2010@ ExtensionPack | -- | All other extensions Normal | -- | Extensions starting with "No" Disabling | -- | Extensions that should go after everything else Final deriving (Eq, Ord) -- | Print a collection of 'Pragma's with their associated comments. p_pragmas :: [([LComment], Pragma)] -> R () p_pragmas ps = do let prepare = L.sortOn snd . L.nub . concatMap analyze analyze = \case (cs, PragmaLanguage xs) -> let f x = (cs, (Language (classifyLanguagePragma x), x)) in f <$> xs (cs, PragmaOptionsGHC x) -> [(cs, (OptionsGHC, x))] (cs, PragmaOptionsHaddock x) -> [(cs, (OptionsHaddock, x))] forM_ (prepare ps) $ \(cs, (pragmaTy, x)) -> p_pragma cs pragmaTy x p_pragma :: [LComment] -> PragmaTy -> Text -> R () p_pragma comments ty x = do forM_ comments $ \(L l comment) -> do spitCommentNow l comment newline txt "{-# " txt $ case ty of Language _ -> "LANGUAGE" OptionsGHC -> "OPTIONS_GHC" OptionsHaddock -> "OPTIONS_HADDOCK" space txt x txt " #-}" newline -- | Classify a 'LanguagePragma'. classifyLanguagePragma :: Text -> LanguagePragmaClass classifyLanguagePragma = \case str | str `Set.member` extensionPacks -> ExtensionPack "ImplicitPrelude" -> Final "CUSKs" -> Final str -> case T.splitAt 2 str of ("No", rest) -> case T.uncons rest of Nothing -> Normal Just (x, _) -> if isUpper x then Disabling else Normal _ -> Normal -- | Extension packs, like @GHC2021@ and @Haskell2010@. extensionPacks :: Set Text extensionPacks = Set.fromList $ T.pack . show <$> [minBound :: Language .. maxBound] ormolu-0.7.2.0/src/Ormolu/Printer/Meat/Type.hs0000644000000000000000000002230307346545000017216 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} -- | Rendering of types. module Ormolu.Printer.Meat.Type ( p_hsType, hasDocStrings, p_hsContext, p_hsTyVarBndr, ForAllVisibility (..), p_forallBndrs, p_conDeclFields, p_lhsTypeArg, p_hsSigType, tyVarsToTyPats, hsOuterTyVarBndrsToHsType, lhsTypeToSigType, ) where import GHC.Hs hiding (isPromoted) import GHC.Types.SourceText import GHC.Types.SrcLoc import GHC.Types.Var import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration.OpTree (p_tyOpTree, tyOpTree) import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration.Value (p_hsUntypedSplice, p_stringLit) import Ormolu.Printer.Operators import Ormolu.Utils p_hsType :: HsType GhcPs -> R () p_hsType t = p_hsType' (hasDocStrings t) t p_hsType' :: Bool -> HsType GhcPs -> R () p_hsType' multilineArgs = \case HsForAllTy _ tele t -> do case tele of HsForAllInvis _ bndrs -> p_forallBndrs ForAllInvis p_hsTyVarBndr bndrs HsForAllVis _ bndrs -> p_forallBndrs ForAllVis p_hsTyVarBndr bndrs interArgBreak p_hsTypeR (unLoc t) HsQualTy _ qs t -> do located qs p_hsContext space txt "=>" interArgBreak case unLoc t of HsQualTy {} -> p_hsTypeR (unLoc t) HsFunTy {} -> p_hsTypeR (unLoc t) _ -> located t p_hsTypeR HsTyVar _ p n -> do case p of IsPromoted -> do txt "'" case showOutputable (unLoc n) of _ : '\'' : _ -> space _ -> return () NotPromoted -> return () p_rdrName n HsAppTy _ f x -> do let -- In order to format type applications with multiple parameters -- nicer, traverse the AST to gather the function and all the -- parameters together. gatherArgs f' knownArgs = case f' of L _ (HsAppTy _ l r) -> gatherArgs l (r : knownArgs) _ -> (f', knownArgs) (func, args) = gatherArgs f [x] switchLayout (getLocA f : fmap getLocA args) . sitcc $ do located func p_hsType breakpoint inci $ sep breakpoint (located' p_hsType) args HsAppKindTy _ ty kd -> sitcc $ do -- The first argument is the location of the "@..." part. Not 100% sure, -- but I think we can ignore it as long as we use 'located' on both the -- type and the kind. located ty p_hsType breakpoint inci $ do txt "@" located kd p_hsType HsFunTy _ arrow x y@(L _ y') -> do located x p_hsType space case arrow of HsUnrestrictedArrow _ -> txt "->" HsLinearArrow _ -> txt "%1 ->" HsExplicitMult _ mult _ -> do txt "%" p_hsTypeR (unLoc mult) space txt "->" interArgBreak case y' of HsFunTy {} -> p_hsTypeR y' _ -> located y p_hsTypeR HsListTy _ t -> located t (brackets N . p_hsType) HsTupleTy _ tsort xs -> let parens' = case tsort of HsUnboxedTuple -> parensHash N HsBoxedOrConstraintTuple -> parens N in parens' $ sep commaDel (sitcc . located' p_hsType) xs HsSumTy _ xs -> parensHash N $ sep (space >> txt "|" >> breakpoint) (sitcc . located' p_hsType) xs HsOpTy _ _ x op y -> do modFixityMap <- askModuleFixityMap let opTree = OpBranches [tyOpTree x, tyOpTree y] [op] p_tyOpTree (reassociateOpTree (Just . unLoc) modFixityMap opTree) HsParTy _ t -> parens N (located t p_hsType) HsIParamTy _ n t -> sitcc $ do located n atom space txt "::" breakpoint inci (located t p_hsType) HsStarTy _ _ -> txt "*" HsKindSig _ t k -> sitcc $ do located t p_hsType space txt "::" breakpoint inci (located k p_hsType) HsSpliceTy _ splice -> p_hsUntypedSplice DollarSplice splice HsDocTy _ t str -> do p_hsDoc Pipe True str located t p_hsType HsBangTy _ (HsSrcBang _ u s) t -> do case u of SrcUnpack -> txt "{-# UNPACK #-}" >> space SrcNoUnpack -> txt "{-# NOUNPACK #-}" >> space NoSrcUnpack -> return () case s of SrcLazy -> txt "~" SrcStrict -> txt "!" NoSrcStrict -> return () located t p_hsType HsRecTy _ fields -> p_conDeclFields fields HsExplicitListTy _ p xs -> do case p of IsPromoted -> txt "'" NotPromoted -> return () brackets N $ do -- If this list is promoted and the first element starts with a single -- quote, we need to put a space in between or it fails to parse. case (p, xs) of (IsPromoted, L _ t : _) | startsWithSingleQuote t -> space _ -> return () sep commaDel (sitcc . located' p_hsType) xs HsExplicitTupleTy _ xs -> do txt "'" parens N $ do case xs of L _ t : _ | startsWithSingleQuote t -> space _ -> return () sep commaDel (located' p_hsType) xs HsTyLit _ t -> case t of HsStrTy (SourceText s) _ -> p_stringLit s a -> atom a HsWildCardTy _ -> txt "_" XHsType t -> atom t where startsWithSingleQuote = \case HsAppTy _ (L _ f) _ -> startsWithSingleQuote f HsTyVar _ IsPromoted _ -> True HsExplicitTupleTy {} -> True HsExplicitListTy {} -> True HsTyLit _ HsCharTy {} -> True _ -> False interArgBreak = if multilineArgs then newline else breakpoint p_hsTypeR = p_hsType' multilineArgs -- | Return 'True' if at least one argument in 'HsType' has a doc string -- attached to it. hasDocStrings :: HsType GhcPs -> Bool hasDocStrings = \case HsDocTy {} -> True HsFunTy _ _ (L _ x) (L _ y) -> hasDocStrings x || hasDocStrings y HsForAllTy _ _ (L _ x) -> hasDocStrings x HsQualTy _ _ (L _ x) -> hasDocStrings x _ -> False p_hsContext :: HsContext GhcPs -> R () p_hsContext = \case [] -> txt "()" [x] -> located x p_hsType xs -> parens N $ sep commaDel (sitcc . located' p_hsType) xs class IsInferredTyVarBndr flag where isInferred :: flag -> Bool instance IsInferredTyVarBndr () where isInferred () = False instance IsInferredTyVarBndr Specificity where isInferred = \case InferredSpec -> True SpecifiedSpec -> False p_hsTyVarBndr :: (IsInferredTyVarBndr flag) => HsTyVarBndr flag GhcPs -> R () p_hsTyVarBndr = \case UserTyVar _ flag x -> (if isInferred flag then braces N else id) $ p_rdrName x KindedTyVar _ flag l k -> (if isInferred flag then braces else parens) N $ do located l atom space txt "::" breakpoint inci (located k p_hsType) data ForAllVisibility = ForAllInvis | ForAllVis -- | Render several @forall@-ed variables. p_forallBndrs :: (HasSrcSpan l) => ForAllVisibility -> (a -> R ()) -> [GenLocated l a] -> R () p_forallBndrs ForAllInvis _ [] = txt "forall." p_forallBndrs ForAllVis _ [] = txt "forall ->" p_forallBndrs vis p tyvars = switchLayout (getLoc' <$> tyvars) $ do txt "forall" breakpoint inci $ do sitcc $ sep breakpoint (sitcc . located' p) tyvars case vis of ForAllInvis -> txt "." ForAllVis -> space >> txt "->" p_conDeclFields :: [LConDeclField GhcPs] -> R () p_conDeclFields xs = braces N $ sep commaDel (sitcc . located' p_conDeclField) xs p_conDeclField :: ConDeclField GhcPs -> R () p_conDeclField ConDeclField {..} = do mapM_ (p_hsDoc Pipe True) cd_fld_doc sitcc $ sep commaDel (located' (p_rdrName . foLabel)) cd_fld_names space txt "::" breakpoint sitcc . inci $ p_hsType (unLoc cd_fld_type) p_lhsTypeArg :: LHsTypeArg GhcPs -> R () p_lhsTypeArg = \case HsValArg ty -> located ty p_hsType -- first argument is the SrcSpan of the @, -- but the @ always has to be directly before the type argument HsTypeArg _ ty -> txt "@" *> located ty p_hsType -- NOTE(amesgen) is this unreachable or just not implemented? HsArgPar _ -> notImplemented "HsArgPar" p_hsSigType :: HsSigType GhcPs -> R () p_hsSigType HsSig {..} = p_hsType $ hsOuterTyVarBndrsToHsType sig_bndrs sig_body ---------------------------------------------------------------------------- -- Conversion functions tyVarToType :: HsTyVarBndr () GhcPs -> HsType GhcPs tyVarToType = \case UserTyVar _ () tvar -> HsTyVar EpAnnNotUsed NotPromoted tvar KindedTyVar _ () tvar kind -> -- Note: we always add parentheses because for whatever reason GHC does -- not use HsParTy for left-hand sides of declarations. Please see -- . This is fine as -- long as 'tyVarToType' does not get applied to right-hand sides of -- declarations. HsParTy EpAnnNotUsed . noLocA $ HsKindSig EpAnnNotUsed (noLocA (HsTyVar EpAnnNotUsed NotPromoted tvar)) kind tyVarsToTyPats :: LHsQTyVars GhcPs -> HsTyPats GhcPs tyVarsToTyPats HsQTvs {..} = HsValArg . fmap tyVarToType <$> hsq_explicit -- could be generalized to also handle () instead of Specificity hsOuterTyVarBndrsToHsType :: HsOuterTyVarBndrs Specificity GhcPs -> LHsType GhcPs -> HsType GhcPs hsOuterTyVarBndrsToHsType obndrs ty = case obndrs of HsOuterImplicit NoExtField -> unLoc ty HsOuterExplicit _ bndrs -> HsForAllTy NoExtField (mkHsForAllInvisTele EpAnnNotUsed bndrs) ty lhsTypeToSigType :: LHsType GhcPs -> LHsSigType GhcPs lhsTypeToSigType ty = reLocA . L (getLocA ty) . HsSig NoExtField (HsOuterImplicit NoExtField) $ ty ormolu-0.7.2.0/src/Ormolu/Printer/Operators.hs0000644000000000000000000003705507346545000017377 0ustar0000000000000000{-# LANGUAGE MultiWayIf #-} -- | This module helps handle operator chains composed of different -- operators that may have different precedence and fixities. module Ormolu.Printer.Operators ( OpTree (..), OpInfo (..), opTreeLoc, reassociateOpTree, isHardSplitterOp, ) where import Data.List.NonEmpty qualified as NE import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Fixity import Ormolu.Utils -- | Intermediate representation of operator trees, where a branching is not -- just a binary branching (with a left node, right node, and operator like -- in the GHC's AST), but rather a n-ary branching, with n + 1 nodes and n -- operators (n >= 1). -- -- This representation allows us to put all the operators with the same -- precedence level as direct siblings in this tree, to better represent the -- idea of a chain of operators. data OpTree ty op = -- | A node which is not an operator application OpNode ty | -- | A subtree of operator application(s); the invariant is: @length -- exprs == length ops + 1@. @OpBranches [x, y, z] [op1, op2]@ -- represents the expression @x op1 y op2 z@. OpBranches [OpTree ty op] [op] deriving (Eq, Show) -- | Wrapper for an operator, carrying information about its name and -- fixity. data OpInfo op = OpInfo { -- | The actual operator opiOp :: op, -- | Its name, if available. We use 'Maybe RdrName' here instead of -- 'RdrName' because the name-fetching function received by -- 'reassociateOpTree' returns a 'Maybe' opiName :: Maybe RdrName, -- | Information about the fixity direction and precedence level of the -- operator opiFixityApproximation :: FixityApproximation } deriving (Eq) -- | Compare the precedence level of two operators. 'OpInfo' is required -- (and not just 'FixityInfo') because operator names are used in the case -- of equality. compareOp :: OpInfo op -> OpInfo op -> Maybe Ordering compareOp (OpInfo _ mName1 FixityApproximation {faMinPrecedence = min1, faMaxPrecedence = max1}) (OpInfo _ mName2 FixityApproximation {faMinPrecedence = min2, faMaxPrecedence = max2}) = if -- Only declare two precedence levels as equal when -- * either both precedence levels are precise -- (fiMinPrecedence == fiMaxPrecedence) and match -- * or when the precedence levels are imprecise but when the -- operator names match | min1 == min2 && max1 == max2 && (min1 == max1 || sameSymbol) -> Just EQ | max1 < min2 -> Just LT | max2 < min1 -> Just GT | otherwise -> Nothing where sameSymbol = case (mName1, mName2) of (Just n1, Just n2) -> n1 == n2 _ -> False -- | Return combined 'SrcSpan's of all elements in this 'OpTree'. opTreeLoc :: (HasSrcSpan l) => OpTree (GenLocated l a) b -> SrcSpan opTreeLoc (OpNode n) = getLoc' n opTreeLoc (OpBranches exprs _) = combineSrcSpans' . NE.fromList . fmap opTreeLoc $ exprs -- | Re-associate an 'OpTree' taking into account precedence of operators. -- Users are expected to first construct an initial 'OpTree', then -- re-associate it using this function before printing. reassociateOpTree :: -- | How to get name of an operator (op -> Maybe RdrName) -> -- | Fixity Map ModuleFixityMap -> -- | Original 'OpTree' OpTree ty op -> -- | Re-associated 'OpTree', with added context and info around operators OpTree ty (OpInfo op) reassociateOpTree getOpName modFixityMap = reassociateFlatOpTree . makeFlatOpTree . addFixityInfo modFixityMap getOpName -- | Wrap every operator of the tree with 'OpInfo' to carry the information -- about its fixity (extracted from the specified fixity map). addFixityInfo :: -- | Fixity map for operators ModuleFixityMap -> -- | How to get the name of an operator (op -> Maybe RdrName) -> -- | 'OpTree' OpTree ty op -> -- | 'OpTree', with fixity info wrapped around each operator OpTree ty (OpInfo op) addFixityInfo _ _ (OpNode n) = OpNode n addFixityInfo modFixityMap getOpName (OpBranches exprs ops) = OpBranches (addFixityInfo modFixityMap getOpName <$> exprs) (toOpInfo <$> ops) where toOpInfo o = OpInfo o mrdrName fixityApproximation where mrdrName = getOpName o fixityApproximation = case mrdrName of Nothing -> defaultFixityApproximation Just rdrName -> inferFixity rdrName modFixityMap -- | Given a 'OpTree' of any shape, produce a flat 'OpTree', where every -- node and operator is directly connected to the root. makeFlatOpTree :: OpTree ty op -> OpTree ty op makeFlatOpTree (OpNode n) = OpNode n makeFlatOpTree (OpBranches exprs ops) = OpBranches rExprs rOps where makeFlatOpTree' expr = case makeFlatOpTree expr of OpNode n -> ([OpNode n], []) OpBranches noptExprs noptOps -> (noptExprs, noptOps) flattenedSubTrees = makeFlatOpTree' <$> exprs rExprs = concatMap fst flattenedSubTrees rOps = concat $ interleave (snd <$> flattenedSubTrees) (pure <$> ops) interleave (x : xs) (y : ys) = x : y : interleave xs ys interleave [] ys = ys interleave xs [] = xs -- | Starting from a flat 'OpTree' (i.e. a n-ary tree of depth 1, -- without regard for operator fixities), build an 'OpTree' with proper -- sub-trees (according to the fixity info carried by the nodes). -- -- We have two complementary ways to build the proper sub-trees: -- -- * if we can find a set of operators "minOps" at the current level where -- forall (op1, op2) \in minOps x minOps, op1 `equal` op2 -- forall (op1, op2) \in minOps x (opsOfCurrentLevel \ minOps), -- op1 `lessThan` op2 -- then we can build a subtree with the exprs and ops located "between" -- each element of minOps. -- For example, if minOps = {op0, op2, op5}, -- and if [...] means "extract a subtree", then -- currentLevel = -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- will become -- [ex0 op0 [ex1 op1 ex2] op2 [ex3 op3 ex4 op4 ex5] op5 [ex6 op6 ex7]] -- * if we can find a set of operators "maxOps" at the current level where -- forall (op1, op2) \in maxOps x maxOps, op1 `equal` op2 -- forall (op1, op2) \in maxOps x (opsOfCurrentLevel \ maxOps), -- op1 `greaterThan` op2 -- then we can build a subtree with every contiguous range of elements -- from maxOps (and the exprs on their sides) -- For example, if maxOps = {op0, op1, op4}, -- and if [...] means "extract a subtree", then -- currentLevel = -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- will become -- [[ex0 op0 ex1 op1 ex2] op2 ex3 op3 [ex4 op4 ex5] op5 ex6 op6 ex7] -- -- We will also recursively apply the same logic on every sub-tree built -- during the process. The two principles are not overlapping and thus are -- required, because we are comparing precedence level ranges. In the case -- where we can't find a non-empty set {min,max}Ops with one logic or the -- other, we finally try to split the tree on “hard splitters” if there is -- any. reassociateFlatOpTree :: -- | Flat 'OpTree', with fixity info wrapped around each operator OpTree ty (OpInfo op) -> -- | Re-associated 'OpTree', with fixity info wrapped around each operator OpTree ty (OpInfo op) reassociateFlatOpTree tree@(OpNode _) = tree reassociateFlatOpTree tree@(OpBranches noptExprs noptOps) = case indexOfMinMaxPrecOps noptOps of (Just minIndices, _) -> splitTree noptExprs noptOps minIndices (_, Just maxIndices) -> groupTree noptExprs noptOps maxIndices _ -> case indicesOfHardSplitter of [] -> tree indices -> splitTree noptExprs noptOps indices where indicesOfHardSplitter = fmap fst $ filter (isHardSplitterOp . opiFixityApproximation . snd) $ zip [0 ..] noptOps indexOfMinMaxPrecOps [] = (Nothing, Nothing) indexOfMinMaxPrecOps (oo : oos) = go oos 1 oo (Just [0]) oo (Just [0]) where go :: -- Remaining operators to look up [OpInfo op] -> -- Index of the next operator Int -> -- representative of the current minOps set, if there is one, -- or representative of the lowest precedence level encountered -- so far otherwise OpInfo op -> -- indices of the elements of the candidate minOps set, -- if there is any Maybe [Int] -> -- representative of the current maxOps set, if there is one, or -- representative of the highest precedence level encountered -- so far otherwise OpInfo op -> -- indices of the elements of the candidate maxOps set, -- if there is any Maybe [Int] -> -- (indices of minOps elements, indices of maxOps elements) (Maybe [Int], Maybe [Int]) go [] _ _ minRes _ maxRes = (reverse <$> minRes, reverse <$> maxRes) go (o : os) i minOpi minRes maxOpi maxRes = let (minOpi', minRes') = case compareOp o minOpi of Just EQ -> (minOpi, (:) i <$> minRes) Just LT -> (o, Just [i]) Just GT -> (minOpi, minRes) Nothing -> (combine minOpi o, Nothing) (maxOpi', maxRes') = case compareOp o maxOpi of Just EQ -> (maxOpi, (:) i <$> maxRes) Just LT -> (maxOpi, maxRes) Just GT -> (o, Just [i]) Nothing -> (combine maxOpi o, Nothing) -- Merge two potential {min/max}Ops representatives for -- which the comparison gave 'OpUnknown' into a representative -- of the {lowest/highest} precedence level encountered so far combine (OpInfo x _ fix1) (OpInfo _ _ fix2) = OpInfo x Nothing (fix1 <> fix2) in go os (i + 1) minOpi' minRes' maxOpi' maxRes' -- If indices = [0, 2, 5], transform -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- into -- [ex0 op0 [ex1 op1 ex2] op2 [ex3 op3 ex4 op4 ex5] op5 [ex6 op6 ex7]] splitTree nExprs nOps indices = go nExprs nOps indices 0 [] [] [] [] where go :: -- Remaining exprs to look up [OpTree ty (OpInfo op)] -> -- Remaining ops to look up [OpInfo op] -> -- Remaining list of indices of operators on which to split -- (sorted) [Int] -> -- Index of the next expr/op Int -> -- Bag for exprs for the subtree we are building [OpTree ty (OpInfo op)] -> -- Bag for ops for the subtree we are building [OpInfo op] -> -- Bag for exprs of the result tree [OpTree ty (OpInfo op)] -> -- Bag for ops of the result tree [OpInfo op] -> -- Result tree OpTree ty (OpInfo op) go [] _ _ _ subExprs subOps resExprs resOps = -- No expr left to process. -- because we are in a "splitting" logic, there is at least one -- expr in the subExprs bag, so we build a subtree (if necessary) -- with sub-bags, add the node/subtree to the result bag, and then -- emit the result tree let resExpr = buildFromSub subExprs subOps in OpBranches (reverse (resExpr : resExprs)) (reverse resOps) go (x : xs) (o : os) (idx : idxs) i subExprs subOps resExprs resOps | i == idx = -- The op we are looking at is one on which we need to split. -- So we build a subtree from the sub-bags and the current -- expr, append it to the result exprs, and continue with -- cleared sub-bags let resExpr = buildFromSub (x : subExprs) subOps in go xs os idxs (i + 1) [] [] (resExpr : resExprs) (o : resOps) go (x : xs) ops idxs i subExprs subOps resExprs resOps = -- Either there is no op left, or the op we are looking at is not -- one on which we need to split. So we just add both the current -- expr and current op (if there is any) to the sub-bags let (ops', subOps') = moveOneIfPossible ops subOps in go xs ops' idxs (i + 1) (x : subExprs) subOps' resExprs resOps -- If indices = [0, 1, 4], transform -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- into -- [[ex0 op0 ex1 op1 ex2] op2 ex3 op3 [ex4 op4 ex5] op5 ex6 op6 ex7] groupTree nExprs nOps indices = go nExprs nOps indices 0 [] [] [] [] where go :: -- remaining exprs to look up [OpTree ty (OpInfo op)] -> -- remaining ops to look up [OpInfo op] -> -- remaining list of indices of operators on which to group -- (sorted) [Int] -> -- index of the next expr/op Int -> -- bag for exprs for the subtree we are building [OpTree ty (OpInfo op)] -> -- bag for ops for the subtree we are building [OpInfo op] -> -- bag for exprs of the result tree [OpTree ty (OpInfo op)] -> -- bag for ops of the result tree [OpInfo op] -> -- result tree OpTree ty (OpInfo op) go [] _ _ _ subExprs subOps resExprs resOps = -- no expr left to process -- because we are in a "grouping" logic, the subExprs bag might be -- empty. If it is not, we build a subtree (if necessary) with -- sub-bags and add the resulting node/subtree to the result bag. -- In any case, we then emit the result tree let resExprs' = if null subExprs then resExprs else buildFromSub subExprs subOps : resExprs in OpBranches (reverse resExprs') (reverse resOps) go (x : xs) (o : os) (idx : idxs) i subExprs subOps resExprs resOps | i == idx = -- The op we are looking at is one on which we need to group. -- So we just add the current expr and op to the sub-bags. go xs os idxs (i + 1) (x : subExprs) (o : subOps) resExprs resOps go (x : xs) ops idxs i subExprs@(_ : _) subOps resExprs resOps = -- Either there is no op left, or the op we are looking at is not -- one on which we need to split, but in any case the sub-bags are -- not empty. So we finalize the started group using sub-bags and -- the current expr, to form a subtree which is then added to the -- result bag. let (ops', resOps') = moveOneIfPossible ops resOps resExpr = buildFromSub (x : subExprs) subOps in go xs ops' idxs (i + 1) [] [] (resExpr : resExprs) resOps' go (x : xs) ops idxs i [] subOps resExprs resOps = -- Either there is no op left, or the op we are looking at is not -- one on which we need to split, but the sub-bags are empty. So -- we just add both the current expr and current op (if there is -- any) to the result bags let (ops', resOps') = moveOneIfPossible ops resOps in go xs ops' idxs (i + 1) [] subOps (x : resExprs) resOps' moveOneIfPossible [] bs = ([], bs) moveOneIfPossible (a : as) bs = (as, a : bs) buildFromSub subExprs subOps = reassociateFlatOpTree $ case subExprs of -- Do not build a subtree when the potential subtree would have -- 1 expr(s) and 0 op(s) [x] -> x _ -> OpBranches (reverse subExprs) (reverse subOps) -- | Indicate if an operator has @'InfixR' 0@ fixity. We special-case this -- class of operators because they often have, like ('$'), a specific -- “separator” use-case, and we sometimes format them differently than other -- operators. isHardSplitterOp :: FixityApproximation -> Bool isHardSplitterOp = (== FixityApproximation (Just InfixR) 0 0) ormolu-0.7.2.0/src/Ormolu/Printer/SpanStream.hs0000644000000000000000000000264707346545000017475 0ustar0000000000000000-- | Build span stream from AST. module Ormolu.Printer.SpanStream ( SpanStream (..), mkSpanStream, ) where import Data.Data (Data) import Data.Foldable (toList) import Data.Generics (everything, ext1Q, ext2Q) import Data.List (sortOn) import Data.Maybe (maybeToList) import Data.Sequence (Seq) import Data.Sequence qualified as Seq import Data.Typeable (cast) import GHC.Parser.Annotation import GHC.Types.SrcLoc -- | A stream of 'RealSrcSpan's in ascending order. This allows us to tell -- e.g. whether there is another \"located\" element of AST between current -- element and comment we're considering for printing. newtype SpanStream = SpanStream [RealSrcSpan] deriving (Eq, Show, Data, Semigroup, Monoid) -- | Create 'SpanStream' from a data structure containing \"located\" -- elements. mkSpanStream :: (Data a) => -- | Data structure to inspect (AST) a -> SpanStream mkSpanStream a = SpanStream . sortOn realSrcSpanStart . toList $ everything mappend (const mempty `ext2Q` queryLocated `ext1Q` querySrcSpanAnn) a where queryLocated :: (Data e0) => GenLocated e0 e1 -> Seq RealSrcSpan queryLocated (L mspn _) = maybe mempty srcSpanToRealSrcSpanSeq (cast mspn :: Maybe SrcSpan) querySrcSpanAnn :: SrcSpanAnn' a -> Seq RealSrcSpan querySrcSpanAnn = srcSpanToRealSrcSpanSeq . locA srcSpanToRealSrcSpanSeq = Seq.fromList . maybeToList . srcSpanToRealSrcSpan ormolu-0.7.2.0/src/Ormolu/Processing/0000755000000000000000000000000007346545000015544 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Processing/Common.hs0000644000000000000000000000340607346545000017333 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | Common definitions for pre- and post- processing. module Ormolu.Processing.Common ( removeIndentation, reindent, linesInRegion, intSetToRegions, ) where import Data.Char (isSpace) import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.Text (Text) import Data.Text qualified as T import Ormolu.Config -- | Remove indentation from a given 'Text'. Return the input with indentation -- removed and the detected indentation level. removeIndentation :: Text -> (Text, Int) removeIndentation (T.lines -> xs) = (T.unlines (T.drop n <$> xs), n) where n = minimum (getIndent <$> xs) getIndent y = if T.all isSpace y then 0 else T.length (T.takeWhile isSpace y) -- | Add indentation to a 'Text'. reindent :: Int -> Text -> Text reindent i = T.unlines . fmap (T.replicate i " " <>) . T.lines -- | All lines in the region specified by 'RegionDeltas'. linesInRegion :: RegionDeltas -> Text -> Text linesInRegion RegionDeltas {..} (T.lines -> ls) = T.unlines middle where (_, nonPrefix) = splitAt regionPrefixLength ls middle = take (length nonPrefix - regionSuffixLength) nonPrefix -- | Convert a set of line indices into disjoint 'RegionDelta's intSetToRegions :: -- | Total number of lines Int -> IntSet -> [RegionDeltas] intSetToRegions total (IntSet.toAscList -> indices) = regionIndicesToDeltas total <$> go Nothing indices where go Nothing [] = [] go (Just (a, b)) [] = [RegionIndices (Just a) (Just b)] go Nothing (i : is) = go (Just (i, i)) is go (Just (a, b)) (i : is) | b + 1 == i = go (Just (a, i)) is | otherwise = RegionIndices (Just a) (Just b) : go (Just (i, i)) is ormolu-0.7.2.0/src/Ormolu/Processing/Cpp.hs0000644000000000000000000000430407346545000016623 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- | Support for CPP. module Ormolu.Processing.Cpp ( cppLines, eraseCppLines, ) where import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.Maybe (isJust) import Data.Text (Text) import Data.Text qualified as T -- | State of the CPP processor. data State = -- | Outside of CPP directives Outside | -- | In a conditional expression, with a positive nesting count InConditional Int | -- | In a continuation (after @\\@), but not in a conditional expression InContinuation deriving (Eq, Show) -- | Return an 'IntSet' containing all lines which are affected by CPP. cppLines :: Text -> IntSet cppLines input = IntSet.fromAscList $ go Outside (T.lines input `zip` [1 ..]) where go _ [] = [] go state ((line, i) : ls) | any for ["define ", "include ", "undef "] = i : go contState ls | any for ["ifdef ", "ifndef ", "if "] = let state' = case state of InConditional nc -> InConditional (nc + 1) _ -> InConditional 1 in i : go state' ls | for "endif" = let state' = case state of InConditional nc | nc > 1 -> InConditional (nc - 1) _ -> Outside in i : go state' ls | otherwise = let is = case state of Outside -> [] _ -> [i] state' = case state of InContinuation -> contState _ -> state in is <> go state' ls where for directive = isJust $ do s <- T.stripStart <$> T.stripPrefix "#" line T.stripPrefix directive s contState = if "\\" `T.isSuffixOf` line && not inConditional then InContinuation else Outside where inConditional = case state of InConditional {} -> True _ -> False -- | Replace all lines affected by CPP with blank lines. eraseCppLines :: Text -> Text eraseCppLines input = T.unlines . fmap eraseCpp $ T.lines input `zip` [1 ..] where linesToErase = cppLines input eraseCpp (x, i) = if i `IntSet.member` linesToErase then "\n" else x ormolu-0.7.2.0/src/Ormolu/Processing/Preprocess.hs0000644000000000000000000001416407346545000020233 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Preprocessing for input source code. module Ormolu.Processing.Preprocess ( preprocess, ) where import Control.Monad import Data.Array as A import Data.Bifunctor (bimap) import Data.Char (isSpace) import Data.Function ((&)) import Data.IntMap (IntMap) import Data.IntMap.Strict qualified as IntMap import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.List qualified as L import Data.Maybe (isJust) import Data.Text (Text) import Data.Text qualified as T import Ormolu.Config (RegionDeltas (..)) import Ormolu.Processing.Common import Ormolu.Processing.Cpp -- | Preprocess the specified region of the input into raw snippets -- and subregions to be formatted. preprocess :: -- | Whether CPP is enabled Bool -> RegionDeltas -> Text -> [Either Text RegionDeltas] preprocess cppEnabled region rawInput = rawSnippetsAndRegionsToFormat where (linesNotToFormat', replacementLines) = linesNotToFormat cppEnabled region rawInput regionsToFormat = intSetToRegions rawLineLength $ IntSet.fromAscList [1 .. rawLineLength] IntSet.\\ linesNotToFormat' regionsNotToFormat = intSetToRegions rawLineLength linesNotToFormat' -- We want to interleave the regionsToFormat and regionsNotToFormat. -- If the first non-formattable region starts at the first line, it is -- the first interleaved region, otherwise, we start with the first -- region to format. interleave' = case regionsNotToFormat of r : _ | regionPrefixLength r == 0 -> interleave _ -> flip interleave rawSnippets = flip linesInRegion updatedInput <$> regionsNotToFormat where updatedInput = T.unlines . fmap updateLine . zip [1 ..] . T.lines $ rawInput updateLine (i, line) = IntMap.findWithDefault line i replacementLines rawSnippetsAndRegionsToFormat = interleave' (Left <$> rawSnippets) (Right <$> regionsToFormat) >>= patchSeparatingBlankLines & dropWhile isBlankRawSnippet & L.dropWhileEnd isBlankRawSnippet -- For every formattable region, we want to ensure that it is separated by -- a blank line from preceding/succeeding raw snippets if it starts/ends -- with a blank line. -- Empty formattable regions are replaced by a blank line instead. -- Extraneous raw snippets at the start/end are dropped afterwards. patchSeparatingBlankLines = \case Right r@RegionDeltas {..} -> if T.all isSpace (linesInRegion r rawInput) then [blankRawSnippet] else [blankRawSnippet | isBlankLine regionPrefixLength] <> [Right r] <> [blankRawSnippet | isBlankLine (rawLineLength - regionSuffixLength - 1)] Left r -> [Left r] where blankRawSnippet = Left "\n" isBlankLine i = isJust . mfilter (T.all isSpace) $ rawLines !!? i isBlankRawSnippet = \case Left r | T.all isSpace r -> True _ -> False rawLines = A.listArray (0, length rawLines' - 1) rawLines' where rawLines' = T.lines rawInput rawLineLength = length rawLines interleave [] bs = bs interleave (a : as) bs = a : interleave bs as xs !!? i = if A.bounds rawLines `A.inRange` i then Just $ xs A.! i else Nothing -- | All lines we are not supposed to format, and a set of replacements -- for specific lines. linesNotToFormat :: -- | Whether CPP is enabled Bool -> RegionDeltas -> Text -> (IntSet, IntMap Text) linesNotToFormat cppEnabled region@RegionDeltas {..} input = (unconsidered <> magicDisabled <> otherDisabled, lineUpdates) where unconsidered = IntSet.fromAscList $ [1 .. regionPrefixLength] <> [totalLines - regionSuffixLength + 1 .. totalLines] totalLines = length (T.lines input) regionLines = linesInRegion region input (magicDisabled, lineUpdates) = magicDisabledLines regionLines otherDisabled = mconcat allLines regionLines where allLines = [shebangLines, linePragmaLines] <> [cppLines | cppEnabled] -- | Ormolu state. data OrmoluState = -- | Enabled OrmoluEnabled | -- | Disabled OrmoluDisabled deriving (Eq, Show) -- | All lines which are disabled by Ormolu's magic comments, -- as well as normalizing replacements. magicDisabledLines :: Text -> (IntSet, IntMap Text) magicDisabledLines input = bimap IntSet.fromAscList IntMap.fromAscList . mconcat $ go OrmoluEnabled (T.lines input `zip` [1 ..]) where go _ [] = [] go state ((line, i) : ls) | Just rest <- isMagicComment ormoluDisable line, state == OrmoluEnabled = ([i], [(i, magicComment ormoluDisable <> rest)]) : go OrmoluDisabled ls | Just rest <- isMagicComment ormoluEnable line, state == OrmoluDisabled = ([i], [(i, magicComment ormoluEnable <> rest)]) : go OrmoluEnabled ls | otherwise = iIfDisabled : go state ls where iIfDisabled = case state of OrmoluDisabled -> ([i], []) OrmoluEnabled -> ([], []) -- | All lines which satisfy a predicate. linesFiltered :: (Text -> Bool) -> Text -> IntSet linesFiltered p = IntSet.fromAscList . fmap snd . filter (p . fst) . (`zip` [1 ..]) . T.lines -- | Lines which contain a shebang. shebangLines :: Text -> IntSet shebangLines = linesFiltered ("#!" `T.isPrefixOf`) -- | Lines which contain a LINE pragma. linePragmaLines :: Text -> IntSet linePragmaLines = linesFiltered ("{-# LINE" `T.isPrefixOf`) -- | Inner text of a magic enabling marker. ormoluEnable :: Text ormoluEnable = "ORMOLU_ENABLE" -- | Inner text of a magic disabling marker. ormoluDisable :: Text ormoluDisable = "ORMOLU_DISABLE" -- | Creates a magic comment with the given inner text. magicComment :: Text -> Text magicComment t = "{- " <> t <> " -}" -- | Construct a function for whitespace-insensitive matching of string. isMagicComment :: -- | What to expect Text -> -- | String to test Text -> -- | If the two strings match, we return the rest of the line. Maybe Text isMagicComment expected s0 = do s1 <- T.stripStart <$> T.stripPrefix "{-" (T.stripStart s0) s2 <- T.stripStart <$> T.stripPrefix expected s1 T.stripPrefix "-}" s2 ormolu-0.7.2.0/src/Ormolu/Terminal.hs0000644000000000000000000000615307346545000015544 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | An abstraction for colorful output in terminal. module Ormolu.Terminal ( -- * The 'Term' abstraction Term, ColorMode (..), runTerm, runTermPure, -- * Styling bold, cyan, green, red, -- * Printing put, putShow, putOutputable, newline, ) where import Control.Applicative (Const (..)) import Control.Monad (forM_) import Data.Foldable (toList) import Data.Sequence (Seq) import Data.Sequence qualified as Seq import Data.Text (Text) import Data.Text qualified as T import Data.Text.IO qualified as T import GHC.Utils.Outputable (Outputable) import Ormolu.Utils (showOutputable) import System.Console.ANSI import System.IO (Handle, hFlush) ---------------------------------------------------------------------------- -- The 'Term' abstraction type Term = TermOutput () newtype TermOutput a = TermOutput (Const (Seq TermOutputNode) a) deriving (Semigroup, Monoid, Functor, Applicative) data TermOutputNode = OutputText Text | WithColor Color Term | WithBold Term singleTerm :: TermOutputNode -> Term singleTerm = TermOutput . Const . Seq.singleton -- | Whether to use colors and other features of ANSI terminals. data ColorMode = Never | Always | Auto deriving (Eq, Show) -- | Run 'Term' monad. runTerm :: Term -> -- | Color mode ColorMode -> -- | Handle to print to Handle -> IO () runTerm term0 colorMode handle = do useSGR <- case colorMode of Never -> return False Always -> return True Auto -> hSupportsANSI handle runTerm' useSGR term0 hFlush handle where runTerm' useSGR = go where go (TermOutput (Const nodes)) = forM_ nodes $ \case OutputText s -> T.hPutStr handle s WithColor color term -> withSGR [SetColor Foreground Dull color] (go term) WithBold term -> withSGR [SetConsoleIntensity BoldIntensity] (go term) withSGR sgrs m | useSGR = hSetSGR handle sgrs >> m >> hSetSGR handle [Reset] | otherwise = m runTermPure :: Term -> Text runTermPure (TermOutput (Const nodes)) = T.concat . toList . flip fmap nodes $ \case OutputText s -> s WithColor _ term -> runTermPure term WithBold term -> runTermPure term ---------------------------------------------------------------------------- -- Styling -- | Make the output bold text. bold :: Term -> Term bold = singleTerm . WithBold -- | Make the output cyan text. cyan :: Term -> Term cyan = singleTerm . WithColor Cyan -- | Make the output green text. green :: Term -> Term green = singleTerm . WithColor Green -- | Make the output red text. red :: Term -> Term red = singleTerm . WithColor Red ---------------------------------------------------------------------------- -- Printing -- | Output 'Text'. put :: Text -> Term put = singleTerm . OutputText -- | Output a 'Show' value. putShow :: (Show a) => a -> Term putShow = put . T.pack . show -- | Output an 'Outputable' value. putOutputable :: (Outputable a) => a -> Term putOutputable = put . T.pack . showOutputable -- | Output a newline. newline :: Term newline = put "\n" ormolu-0.7.2.0/src/Ormolu/Terminal/0000755000000000000000000000000007346545000015203 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Terminal/QualifiedDo.hs0000644000000000000000000000021707346545000017725 0ustar0000000000000000module Ormolu.Terminal.QualifiedDo ((>>)) where import Ormolu.Terminal import Prelude hiding ((>>)) (>>) :: Term -> Term -> Term (>>) = (<>) ormolu-0.7.2.0/src/Ormolu/Utils.hs0000644000000000000000000001306407346545000015070 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | Random utilities used by the code. module Ormolu.Utils ( RelativePos (..), attachRelativePos, combineSrcSpans', notImplemented, showOutputable, splitDocString, incSpanLine, separatedByBlank, separatedByBlankNE, onTheSameLine, HasSrcSpan (..), getLoc', matchAddEpAnn, textToStringBuffer, ghcModuleNameToCabal, ) where import Data.List (dropWhileEnd) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Maybe (fromMaybe) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Foreign qualified as TFFI import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Foreign (pokeElemOff, withForeignPtr) import GHC.Data.Strict qualified as Strict import GHC.Data.StringBuffer (StringBuffer (..)) import GHC.Driver.Ppr import GHC.DynFlags (baseDynFlags) import GHC.ForeignPtr (mallocPlainForeignPtrBytes) import GHC.Hs hiding (ModuleName) import GHC.IO.Unsafe (unsafePerformIO) import GHC.Types.SrcLoc import GHC.Utils.Outputable (Outputable (..)) import Language.Haskell.Syntax.Module.Name qualified as GHC -- | Relative positions in a list. data RelativePos = SinglePos | FirstPos | MiddlePos | LastPos deriving (Eq, Show) -- | Attach 'RelativePos'es to elements of a given list. attachRelativePos :: [a] -> [(RelativePos, a)] attachRelativePos = \case [] -> [] [x] -> [(SinglePos, x)] (x : xs) -> (FirstPos, x) : markLast xs where markLast [] = [] markLast [x] = [(LastPos, x)] markLast (x : xs) = (MiddlePos, x) : markLast xs -- | Combine all source spans from the given list. combineSrcSpans' :: NonEmpty SrcSpan -> SrcSpan combineSrcSpans' (x :| xs) = foldr combineSrcSpans x xs -- | Placeholder for things that are not yet implemented. notImplemented :: String -> a notImplemented msg = error $ "not implemented yet: " ++ msg -- | Pretty-print an 'GHC.Outputable' thing. showOutputable :: (Outputable o) => o -> String showOutputable = showSDoc baseDynFlags . ppr -- | Split and normalize a doc string. The result is a list of lines that -- make up the comment. splitDocString :: HsDocString -> [Text] splitDocString docStr = case r of [] -> [""] _ -> r where r = fmap escapeLeadingDollar . dropPaddingSpace . dropWhileEnd T.null . fmap (T.stripEnd . T.pack) . lines $ renderHsDocString docStr -- We cannot have the first character to be a dollar because in that -- case it'll be a parse error (apparently collides with named docs -- syntax @-- $name@ somehow). escapeLeadingDollar txt = case T.uncons txt of Just ('$', _) -> T.cons '\\' txt _ -> txt dropPaddingSpace xs = case dropWhile T.null xs of [] -> [] (x : _) -> let leadingSpace txt = case T.uncons txt of Just (' ', _) -> True _ -> False dropSpace txt = if leadingSpace txt then T.drop 1 txt else txt in if leadingSpace x then dropSpace <$> xs else xs -- | Increment line number in a 'SrcSpan'. incSpanLine :: Int -> SrcSpan -> SrcSpan incSpanLine i = \case RealSrcSpan s _ -> let start = realSrcSpanStart s end = realSrcSpanEnd s incLine x = let file = srcLocFile x line = srcLocLine x col = srcLocCol x in mkRealSrcLoc file (line + i) col in RealSrcSpan (mkRealSrcSpan (incLine start) (incLine end)) Strict.Nothing UnhelpfulSpan x -> UnhelpfulSpan x -- | Do two declarations have a blank between them? separatedByBlank :: (a -> SrcSpan) -> a -> a -> Bool separatedByBlank loc a b = fromMaybe False $ do endA <- srcSpanEndLine <$> srcSpanToRealSrcSpan (loc a) startB <- srcSpanStartLine <$> srcSpanToRealSrcSpan (loc b) pure (startB - endA >= 2) -- | Do two declaration groups have a blank between them? separatedByBlankNE :: (a -> SrcSpan) -> NonEmpty a -> NonEmpty a -> Bool separatedByBlankNE loc a b = separatedByBlank loc (NE.last a) (NE.head b) -- | Return 'True' if one span ends on the same line the second one starts. onTheSameLine :: SrcSpan -> SrcSpan -> Bool onTheSameLine a b = isOneLineSpan (mkSrcSpan (srcSpanEnd a) (srcSpanStart b)) class HasSrcSpan l where loc' :: l -> SrcSpan instance HasSrcSpan SrcSpan where loc' = id instance HasSrcSpan (SrcSpanAnn' ann) where loc' = locA getLoc' :: (HasSrcSpan l) => GenLocated l a -> SrcSpan getLoc' = loc' . getLoc -- | Check whether the given 'AnnKeywordId' or its Unicode variant is in an -- 'AddEpAnn', and return the 'EpaLocation' if so. matchAddEpAnn :: AnnKeywordId -> AddEpAnn -> Maybe EpaLocation matchAddEpAnn annId (AddEpAnn annId' loc) | annId == annId' || unicodeAnn annId == annId' = Just loc | otherwise = Nothing -- | Convert 'Text' to a 'StringBuffer' by making a copy. textToStringBuffer :: Text -> StringBuffer textToStringBuffer txt = unsafePerformIO $ do buf <- mallocPlainForeignPtrBytes (len + 3) withForeignPtr buf $ \ptr -> do TFFI.unsafeCopyToPtr txt ptr -- last three bytes have to be zero for easier decoding pokeElemOff ptr len 0 pokeElemOff ptr (len + 1) 0 pokeElemOff ptr (len + 2) 0 pure StringBuffer {buf, len, cur = 0} where len = TFFI.lengthWord8 txt -- | Convert GHC's 'ModuleName' into the one used by Cabal. ghcModuleNameToCabal :: GHC.ModuleName -> ModuleName ghcModuleNameToCabal = ModuleName.fromString . GHC.moduleNameString ormolu-0.7.2.0/src/Ormolu/Utils/0000755000000000000000000000000007346545000014530 5ustar0000000000000000ormolu-0.7.2.0/src/Ormolu/Utils/Cabal.hs0000644000000000000000000001640207346545000016071 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Utils.Cabal ( CabalSearchResult (..), CabalInfo (..), Extension (..), getCabalInfoForSourceFile, findCabalFile, parseCabalInfo, ) where import Control.Exception import Control.Monad.IO.Class import Data.ByteString qualified as B import Data.IORef import Data.Map.Lazy (Map) import Data.Map.Lazy qualified as M import Data.Maybe (maybeToList) import Data.Set (Set) import Data.Set qualified as Set import Distribution.ModuleName qualified as ModuleName import Distribution.PackageDescription import Distribution.PackageDescription.Parsec import Distribution.Types.CondTree qualified as CT import Distribution.Utils.Path (getSymbolicPath) import Language.Haskell.Extension import Ormolu.Config import Ormolu.Exception import Ormolu.Fixity import Ormolu.Utils.IO (findClosestFileSatisfying, withIORefCache) import System.Directory import System.FilePath import System.IO.Unsafe (unsafePerformIO) -- | The result of searching for a @.cabal@ file. -- -- @since 0.5.3.0 data CabalSearchResult = -- | Cabal file could not be found CabalNotFound | -- | Cabal file was found, but it did not mention the source file in -- question CabalDidNotMention CabalInfo | -- | Cabal file was found and it mentions the source file in question CabalFound CabalInfo deriving (Eq, Show) -- | Cabal information of interest to Ormolu. data CabalInfo = CabalInfo { -- | Package name ciPackageName :: !PackageName, -- | Extension and language settings in the form of 'DynOption's ciDynOpts :: ![DynOption], -- | Direct dependencies ciDependencies :: !(Set PackageName), -- | Absolute path to the cabal file ciCabalFilePath :: !FilePath } deriving (Eq, Show) -- | Locate a @.cabal@ file corresponding to the given Haskell source file -- and obtain 'CabalInfo' from it. getCabalInfoForSourceFile :: (MonadIO m) => -- | Haskell source file FilePath -> -- | Extracted cabal info, if any m CabalSearchResult getCabalInfoForSourceFile sourceFile = liftIO (findCabalFile sourceFile) >>= \case Just cabalFile -> do (mentioned, cabalInfo) <- parseCabalInfo cabalFile sourceFile return ( if mentioned then CabalFound cabalInfo else CabalDidNotMention cabalInfo ) Nothing -> return CabalNotFound -- | Find the path to an appropriate @.cabal@ file for a Haskell source -- file, if available. findCabalFile :: (MonadIO m) => -- | Path to a Haskell source file in a project with a @.cabal@ file FilePath -> -- | Absolute path to the @.cabal@ file, if available m (Maybe FilePath) findCabalFile = findClosestFileSatisfying $ \x -> takeExtension x == ".cabal" -- | Parsed cabal file information to be shared across multiple source files. data CachedCabalFile = CachedCabalFile { -- | Parsed generic package description. genericPackageDescription :: GenericPackageDescription, -- | Map from Haskell source file paths (without any extensions) to the -- corresponding 'DynOption's and dependencies. extensionsAndDeps :: Map FilePath ([DynOption], [PackageName]) } deriving (Show) -- | Cache ref that stores 'CachedCabalFile' per Cabal file. cacheRef :: IORef (Map FilePath CachedCabalFile) cacheRef = unsafePerformIO $ newIORef M.empty {-# NOINLINE cacheRef #-} -- | Parse 'CabalInfo' from a @.cabal@ file at the given 'FilePath'. parseCabalInfo :: (MonadIO m) => -- | Location of the .cabal file FilePath -> -- | Location of the source file we are formatting FilePath -> -- | Indication if the source file was mentioned in the Cabal file and the -- extracted 'CabalInfo' m (Bool, CabalInfo) parseCabalInfo cabalFileAsGiven sourceFileAsGiven = liftIO $ do cabalFile <- makeAbsolute cabalFileAsGiven sourceFileAbs <- makeAbsolute sourceFileAsGiven CachedCabalFile {..} <- withIORefCache cacheRef cabalFile $ do cabalFileBs <- B.readFile cabalFile genericPackageDescription <- whenLeft (snd . runParseResult $ parseGenericPackageDescription cabalFileBs) $ throwIO . OrmoluCabalFileParsingFailed cabalFile . snd let extensionsAndDeps = getExtensionAndDepsMap cabalFile genericPackageDescription pure CachedCabalFile {..} let (dynOpts, dependencies, mentioned) = case M.lookup (dropExtensions sourceFileAbs) extensionsAndDeps of Nothing -> ([], Set.toList defaultDependencies, False) Just (dynOpts', dependencies') -> (dynOpts', dependencies', True) pdesc = packageDescription genericPackageDescription return ( mentioned, CabalInfo { ciPackageName = pkgName (package pdesc), ciDynOpts = dynOpts, ciDependencies = Set.fromList dependencies, ciCabalFilePath = cabalFile } ) where whenLeft :: (Applicative f) => Either e a -> (e -> f a) -> f a whenLeft eitha ma = either ma pure eitha -- | Get a map from Haskell source file paths (without any extensions) to -- the corresponding 'DynOption's and dependencies. getExtensionAndDepsMap :: -- | Path to the cabal file FilePath -> -- | Parsed generic package description GenericPackageDescription -> Map FilePath ([DynOption], [PackageName]) getExtensionAndDepsMap cabalFile GenericPackageDescription {..} = M.unions . concat $ [ buildMap extractFromLibrary <$> lib ++ sublibs, buildMap extractFromExecutable . snd <$> condExecutables, buildMap extractFromTestSuite . snd <$> condTestSuites, buildMap extractFromBenchmark . snd <$> condBenchmarks ] where lib = maybeToList condLibrary sublibs = snd <$> condSubLibraries buildMap f a = M.fromList ((,extsAndDeps) <$> files) where (mergedA, _) = CT.ignoreConditions a (files, extsAndDeps) = f mergedA extractFromBuildInfo extraModules BuildInfo {..} = (,(exts, deps)) $ do m <- extraModules ++ (ModuleName.toFilePath <$> otherModules) normalise . (takeDirectory cabalFile ) <$> prependSrcDirs (dropExtensions m) where prependSrcDirs f | null hsSourceDirs = [f] | otherwise = ( f) . getSymbolicPath <$> hsSourceDirs deps = depPkgName <$> targetBuildDepends exts = maybe [] langExt defaultLanguage ++ fmap extToDynOption defaultExtensions langExt = pure . DynOption . ("-X" <>) . \case UnknownLanguage lan -> lan lan -> show lan extToDynOption = DynOption . \case EnableExtension e -> "-X" ++ show e DisableExtension e -> "-XNo" ++ show e UnknownExtension e -> "-X" ++ e extractFromLibrary Library {..} = extractFromBuildInfo (ModuleName.toFilePath <$> exposedModules) libBuildInfo extractFromExecutable Executable {..} = extractFromBuildInfo [modulePath] buildInfo extractFromTestSuite TestSuite {..} = extractFromBuildInfo mainPath testBuildInfo where mainPath = case testInterface of TestSuiteExeV10 _ p -> [p] TestSuiteLibV09 _ p -> [ModuleName.toFilePath p] TestSuiteUnsupported {} -> [] extractFromBenchmark Benchmark {..} = extractFromBuildInfo mainPath benchmarkBuildInfo where mainPath = case benchmarkInterface of BenchmarkExeV10 _ p -> [p] BenchmarkUnsupported {} -> [] ormolu-0.7.2.0/src/Ormolu/Utils/Fixity.hs0000644000000000000000000000557307346545000016352 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Ormolu.Utils.Fixity ( getDotOrmoluForSourceFile, parseFixityDeclarationStr, parseModuleReexportDeclarationStr, ) where import Control.Exception (throwIO) import Control.Monad.IO.Class import Data.Bifunctor (first) import Data.IORef import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map import Data.Text qualified as T import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import Ormolu.Exception import Ormolu.Fixity import Ormolu.Fixity.Parser import Ormolu.Utils.IO (findClosestFileSatisfying, readFileUtf8, withIORefCache) import System.Directory import System.IO.Unsafe (unsafePerformIO) import Text.Megaparsec (errorBundlePretty) -- | Attempt to locate and parse an @.ormolu@ file. If it does not exist, -- default fixity map and module reexports are returned. This function -- maintains a cache of fixity overrides and module re-exports where cabal -- file paths act as keys. getDotOrmoluForSourceFile :: (MonadIO m) => -- | 'CabalInfo' already obtained for this source file FilePath -> m (FixityOverrides, ModuleReexports) getDotOrmoluForSourceFile sourceFile = liftIO (findDotOrmoluFile sourceFile) >>= \case Just dotOrmoluFile -> liftIO $ withIORefCache cacheRef dotOrmoluFile $ do dotOrmoluRelative <- makeRelativeToCurrentDirectory dotOrmoluFile contents <- readFileUtf8 dotOrmoluFile case parseDotOrmolu dotOrmoluRelative contents of Left errorBundle -> throwIO (OrmoluFixityOverridesParseError errorBundle) Right x -> return x Nothing -> return (defaultFixityOverrides, defaultModuleReexports) -- | Find the path to an appropriate @.ormolu@ file for a Haskell source -- file, if available. findDotOrmoluFile :: (MonadIO m) => -- | Path to a Haskell source file FilePath -> -- | Absolute path to the closest @.ormolu@ file, if available m (Maybe FilePath) findDotOrmoluFile = findClosestFileSatisfying $ \x -> x == ".ormolu" -- | Cache ref that maps names of @.ormolu@ files to their contents. cacheRef :: IORef (Map FilePath (FixityOverrides, ModuleReexports)) cacheRef = unsafePerformIO (newIORef Map.empty) {-# NOINLINE cacheRef #-} -- | A wrapper around 'parseFixityDeclaration' for parsing individual fixity -- definitions. parseFixityDeclarationStr :: -- | Input to parse String -> -- | Parse result Either String [(OpName, FixityInfo)] parseFixityDeclarationStr = first errorBundlePretty . parseFixityDeclaration . T.pack -- | A wrapper around 'parseModuleReexportDeclaration' for parsing -- a individual module reexport. parseModuleReexportDeclarationStr :: -- | Input to parse String -> -- | Parse result Either String (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) parseModuleReexportDeclarationStr = first errorBundlePretty . parseModuleReexportDeclaration . T.pack ormolu-0.7.2.0/src/Ormolu/Utils/IO.hs0000644000000000000000000000571707346545000015405 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} -- | Write 'Text' to files using UTF8 and ignoring native -- line ending conventions. module Ormolu.Utils.IO ( writeFileUtf8, readFileUtf8, getContentsUtf8, findClosestFileSatisfying, withIORefCache, ) where import Control.Exception (catch, throwIO) import Control.Monad.IO.Class import Data.ByteString (ByteString) import Data.ByteString qualified as B import Data.IORef import Data.Map.Lazy (Map) import Data.Map.Lazy qualified as M import Data.Text (Text) import Data.Text.Encoding qualified as TE import System.Directory import System.FilePath import System.IO.Error (isDoesNotExistError) -- | Write a 'Text' to a file using UTF8 and ignoring native -- line ending conventions. writeFileUtf8 :: (MonadIO m) => FilePath -> Text -> m () writeFileUtf8 p = liftIO . B.writeFile p . TE.encodeUtf8 -- | Read an entire file strictly into a 'Text' using UTF8 and -- ignoring native line ending conventions. readFileUtf8 :: (MonadIO m) => FilePath -> m Text readFileUtf8 p = liftIO (B.readFile p) >>= decodeUtf8 -- | Read stdin as UTF8-encoded 'Text' value. getContentsUtf8 :: (MonadIO m) => m Text getContentsUtf8 = liftIO B.getContents >>= decodeUtf8 -- | A helper function for decoding a strict 'ByteString' into 'Text'. It is -- strict and fails immediately if decoding encounters a problem. decodeUtf8 :: (MonadIO m) => ByteString -> m Text decodeUtf8 = liftIO . either throwIO pure . TE.decodeUtf8' -- | Find the path to the closest file higher in the file hierarchy that -- satisfies a given predicate. findClosestFileSatisfying :: (MonadIO m) => -- | The predicate that determines what we are looking for (FilePath -> Bool) -> -- | Path to the starting point for the search FilePath -> -- | Absolute path to the found file if available m (Maybe FilePath) findClosestFileSatisfying isRightFile rootOfSearch = liftIO $ do parentDir <- takeDirectory <$> makeAbsolute rootOfSearch dirEntries <- listDirectory parentDir `catch` \case (isDoesNotExistError -> True) -> pure [] e -> throwIO e let searchAtParentDirLevel = \case [] -> pure Nothing x : xs -> if isRightFile x then doesFileExist (parentDir x) >>= \case True -> pure (Just x) False -> searchAtParentDirLevel xs else searchAtParentDirLevel xs searchAtParentDirLevel dirEntries >>= \case Just foundFile -> pure . Just $ parentDir foundFile Nothing -> if isDrive parentDir then pure Nothing else findClosestFileSatisfying isRightFile parentDir -- | Execute an 'IO' action but only if the given key is not found in the -- 'IORef' cache. withIORefCache :: (Ord k) => IORef (Map k v) -> k -> IO v -> IO v withIORefCache cacheRef k action = do cache <- readIORef cacheRef case M.lookup k cache of Just v -> pure v Nothing -> do v <- action modifyIORef' cacheRef (M.insert k v) pure v ormolu-0.7.2.0/tests/Ormolu/0000755000000000000000000000000007346545000014003 5ustar0000000000000000ormolu-0.7.2.0/tests/Ormolu/CabalInfoSpec.hs0000644000000000000000000000703607346545000016776 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.CabalInfoSpec (spec) where import Data.Set qualified as Set import Distribution.Types.PackageName (unPackageName) import Ormolu.Config (DynOption (..)) import Ormolu.Utils.Cabal import System.Directory import System.FilePath import System.IO.Temp (withSystemTempDirectory) import Test.Hspec spec :: Spec spec = do describe "findCabalFile" $ do let findsOrmoluCabal start expectedCabalFile = do Just absolute <- findCabalFile start absolute `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory absolute `shouldReturn` expectedCabalFile it "returns correct absolute path" $ findsOrmoluCabal "src/Ormolu/Config.hs" "ormolu.cabal" it "finds correct path even when it starts from nonsense" $ findsOrmoluCabal "a/b/c/d/e" "ormolu.cabal" it "returns Nothing when it cannot find a cabal file" $ findCabalFile "/foo.hs" `shouldReturn` Nothing it "does not consider directories as .cabal files" $ withSystemTempDirectory "" $ \dir -> do createDirectory $ dir ".cabal" cabalFile <- findCabalFile (dir "foo/bar.hs") cabalFile `shouldBe` Nothing describe "parseCabalInfo" $ do it "extracts correct cabal info from ormolu.cabal for src/Ormolu/Config.hs" $ do (mentioned, CabalInfo {..}) <- parseCabalInfo "ormolu.cabal" "src/Ormolu/Config.hs" mentioned `shouldBe` True unPackageName ciPackageName `shouldBe` "ormolu" ciDynOpts `shouldBe` [DynOption "-XGHC2021"] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["Cabal-syntax", "Diff", "MemoTrie", "ansi-terminal", "array", "base", "binary", "bytestring", "containers", "deepseq", "directory", "file-embed", "filepath", "ghc-lib-parser", "megaparsec", "mtl", "syb", "text"] ciCabalFilePath `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory ciCabalFilePath `shouldReturn` "ormolu.cabal" it "extracts correct cabal info from ormolu.cabal for tests/Ormolu/PrinterSpec.hs" $ do (mentioned, CabalInfo {..}) <- parseCabalInfo "ormolu.cabal" "tests/Ormolu/PrinterSpec.hs" mentioned `shouldBe` True unPackageName ciPackageName `shouldBe` "ormolu" ciDynOpts `shouldBe` [DynOption "-XGHC2021"] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["Cabal-syntax", "QuickCheck", "base", "containers", "directory", "filepath", "ghc-lib-parser", "hspec", "hspec-megaparsec", "megaparsec", "ormolu", "path", "path-io", "temporary", "text"] ciCabalFilePath `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory ciCabalFilePath `shouldReturn` "ormolu.cabal" it "handles correctly files that are not mentioned in ormolu.cabal" $ do (mentioned, CabalInfo {..}) <- parseCabalInfo "ormolu.cabal" "src/FooBob.hs" mentioned `shouldBe` False unPackageName ciPackageName `shouldBe` "ormolu" ciDynOpts `shouldBe` [] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["base"] ciCabalFilePath `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory ciCabalFilePath `shouldReturn` "ormolu.cabal" it "handles `hs-source-dirs: .`" $ do (_, CabalInfo {..}) <- parseTestCabalInfo "Foo.hs" ciDynOpts `shouldContain` [DynOption "-XImportQualifiedPost"] it "handles empty hs-source-dirs" $ do (_, CabalInfo {..}) <- parseTestCabalInfo "Bar.hs" ciDynOpts `shouldContain` [DynOption "-XImportQualifiedPost"] where parseTestCabalInfo f = parseCabalInfo "data/cabal-tests/test.cabal" ("data/cabal-tests" f) ormolu-0.7.2.0/tests/Ormolu/Diff/0000755000000000000000000000000007346545000014653 5ustar0000000000000000ormolu-0.7.2.0/tests/Ormolu/Diff/TextSpec.hs0000644000000000000000000000354707346545000016757 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} module Ormolu.Diff.TextSpec (spec) where import Ormolu.Diff.Text import Ormolu.Terminal import Ormolu.Utils.IO import Path import System.FilePath qualified as FP import Test.Hspec spec :: Spec spec = describe "printTextDiff" $ do stdTest "one-line-added" "empty" "one-line" stdTest "one-line-removed" "one-line" "empty" stdTest "no-preceding" "main-foo" "main" stdTest "no-following" "main" "main-v2" stdTest "simple-hunk" "main-and-foo" "main-and-foo-v2" stdTest "joined-hunk" "main-and-bar" "main-and-bar-v2" stdTest "two-hunks" "main-and-baz" "main-and-baz-v2" stdTest "trimming" "spaced" "spaced-v2" stdTest "trailing-blank-line" "no-trailing-blank-line" "with-trailing-blank-line" stdTest "trimming-trailing-both-eof" "applicative-before" "applicative-after" stdTest "trimming-trailing-both-out-of-margin" "longer" "longer-v2" -- | Test diff printing. stdTest :: -- | Name of the test case String -> -- | Location of input A FilePath -> -- | Location of input B FilePath -> Spec stdTest name pathA pathB = it name $ do inputA <- parseRelFile (FP.addExtension pathA "hs") >>= readFileUtf8 . toFilePath . (diffInputsDir ) inputB <- parseRelFile (FP.addExtension pathB "hs") >>= readFileUtf8 . toFilePath . (diffInputsDir ) let expectedDiffPath = FP.addExtension name "txt" expectedDiffText <- parseRelFile expectedDiffPath >>= readFileUtf8 . toFilePath . (diffOutputsDir ) Just actualDiff <- pure $ diffText inputA inputB "TEST" runTermPure (printTextDiff actualDiff) `shouldBe` expectedDiffText diffTestsDir :: Path Rel Dir diffTestsDir = $(mkRelDir "data/diff-tests") diffInputsDir :: Path Rel Dir diffInputsDir = diffTestsDir $(mkRelDir "inputs") diffOutputsDir :: Path Rel Dir diffOutputsDir = diffTestsDir $(mkRelDir "outputs") ormolu-0.7.2.0/tests/Ormolu/Fixity/0000755000000000000000000000000007346545000015257 5ustar0000000000000000ormolu-0.7.2.0/tests/Ormolu/Fixity/ParserSpec.hs0000644000000000000000000002016707346545000017670 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Fixity.ParserSpec (spec) where import Data.List.NonEmpty (NonEmpty (..)) import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as T import Ormolu.Fixity import Ormolu.Fixity.Parser import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec.Error (ErrorFancy (..)) spec :: Spec spec = do describe "parseDotOrmolu" $ do it "parses the empty input without choking" $ parseDotOrmolu "" "" `shouldParse` (FixityOverrides Map.empty, ModuleReexports Map.empty) it "parses a collection of fixity declarations" $ -- The example is taken from base. parseDotOrmolu "" ( T.unlines [ "infixr 9 .", "infixr 5 ++", "infixl 4 <$", "infixl 1 >>, >>=", "infixr 1 =<<", "infixr 0 $, $!", "infixl 4 <*>, <*, *>, <**>" ] ) `shouldParse` ( exampleFixityOverrides, ModuleReexports Map.empty ) it "combines conflicting fixity declarations correctly" $ parseDotOrmolu "" ( T.unlines [ "infixr 9 ., ^", "infixr 7 ., $", "infixr 9 ^ ", "infixl 7 $" ] ) `shouldParse` ( FixityOverrides ( Map.fromList [ ("$", FixityInfo InfixL 7), (".", FixityInfo InfixR 7), ("^", FixityInfo InfixR 9) ] ), ModuleReexports Map.empty ) it "handles CRLF line endings correctly" $ parseDotOrmolu "" `shouldSucceedOn` unlinesCrlf [ "infixr 9 .", "infixr 5 ++" ] it "fails with correct parse error (keyword wrong second line)" $ parseDotOrmolu "" "infixr 5 .\nfoobar 5 $" `shouldFailWith` err 11 ( mconcat [ utok 'f', etoks "infix", etoks "infixl", etoks "infixr", etoks "module", eeof ] ) it "parses module re-exports and combines them correctly" $ parseDotOrmolu "" ( T.unlines [ "module Control.Lens exports Control.Lens.Lens", "module Control.Lens exports \"lens\" Control.Lens.At", "module Text.Megaparsec exports Control.Monad.Combinators" ] ) `shouldParse` (FixityOverrides Map.empty, exampleModuleReexports) it "parses fixity declarations + module re-export declarations with blanks" $ parseDotOrmolu "" ( T.unlines [ "module Control.Lens exports Control.Lens.Lens", "", "infixr 5 ++", "infixl 4 <$", "", "", "module Control.Lens exports \"lens\" Control.Lens.At", "infixr 9 .", "module Text.Megaparsec exports Control.Monad.Combinators", "infixl 1 >>, >>=", "infixr 1 =<<", "", "infixr 0 $, $!", "infixl 4 <*>, <*, *>, <**>" ] ) `shouldParse` (exampleFixityOverrides, exampleModuleReexports) describe "parseFixtiyDeclaration" $ do it "parses a simple infixr declaration" $ parseFixityDeclaration "infixr 5 $" `shouldParse` [("$", FixityInfo InfixR 5)] it "parses a simple infixl declaration" $ parseFixityDeclaration "infixl 5 $" `shouldParse` [("$", FixityInfo InfixL 5)] it "parses a simple infix declaration" $ parseFixityDeclaration "infix 5 $" `shouldParse` [("$", FixityInfo InfixN 5)] it "parses a declaration for a ticked identifier" $ parseFixityDeclaration "infixl 5 `foo`" `shouldParse` [("foo", FixityInfo InfixL 5)] it "parses a declaration for a ticked identifier (constructor case)" $ parseFixityDeclaration "infixl 5 `Foo`" `shouldParse` [("Foo", FixityInfo InfixL 5)] it "parses a multi-operator declaration" $ parseFixityDeclaration "infixl 5 $, ., `Foo`, `bar`" `shouldParse` [ ("$", FixityInfo InfixL 5), (".", FixityInfo InfixL 5), ("Foo", FixityInfo InfixL 5), ("bar", FixityInfo InfixL 5) ] it "parses a declaration with a unicode operator" $ parseFixityDeclaration "infixr 5 ×" `shouldParse` [("×", FixityInfo InfixR 5)] it "fails with correct parse error (keyword wrong)" $ parseFixityDeclaration "foobar 5 $" `shouldFailWith` err 0 ( mconcat [ utoks "foobar", etoks "infix", etoks "infixl", etoks "infixr" ] ) it "fails with correct parse error (missing operator)" $ parseFixityDeclaration "infixr 5 " `shouldFailWith` err 9 ( mconcat [ ueof, etok '`', elabel "operator character" ] ) it "fails with correct parse error (trailing comma)" $ parseFixityDeclaration "infixr 5 ., " `shouldFailWith` err 12 ( mconcat [ ueof, etok '`', elabel "operator character" ] ) it "fails with correct parse error (precedence greater than 9)" $ parseFixityDeclaration "infixl 10 $" `shouldFailWith` errFancy 7 (fancy (ErrorFail "precedence should not be greater than 9")) describe "parseModuleReexportDeclaration" $ do it "parses a re-export declaration" $ parseModuleReexportDeclaration "module Control.Lens exports Control.Lens.Lens" `shouldParse` ( "Control.Lens", (Nothing, "Control.Lens.Lens") :| [] ) it "parses a re-export declaration (explicit package)" $ parseModuleReexportDeclaration "module Control.Lens exports \"lens\" Control.Lens.Lens" `shouldParse` ( "Control.Lens", (Just "lens", "Control.Lens.Lens") :| [] ) it "fails with correct parse error (keyword wrong)" $ parseModuleReexportDeclaration "foo Control.Lens exports Control.Lens.Lens" `shouldFailWith` err 0 ( mconcat [ utoks "foo Co", etoks "module" ] ) it "fails with correct parse error (module syntax)" $ parseModuleReexportDeclaration "module control.Lens exports Control.Lens.Lens" `shouldFailWith` err 7 ( mconcat [ utok 'c', elabel "module name" ] ) it "fails with correct parse error (typo: export intead exports)" $ parseModuleReexportDeclaration "module Control.Lens export Control.Lens.Lens" `shouldFailWith` err 20 ( mconcat [ utoks "export ", etoks "exports" ] ) exampleFixityOverrides :: FixityOverrides exampleFixityOverrides = FixityOverrides ( Map.fromList [ ("$", FixityInfo InfixR 0), ("$!", FixityInfo InfixR 0), ("*>", FixityInfo InfixL 4), ("++", FixityInfo InfixR 5), (".", FixityInfo InfixR 9), ("<$", FixityInfo InfixL 4), ("<*", FixityInfo InfixL 4), ("<**>", FixityInfo InfixL 4), ("<*>", FixityInfo InfixL 4), ("=<<", FixityInfo InfixR 1), (">>", FixityInfo InfixL 1), (">>=", FixityInfo InfixL 1) ] ) exampleModuleReexports :: ModuleReexports exampleModuleReexports = ModuleReexports . Map.fromList $ [ ( "Control.Lens", (Nothing, "Control.Lens.Lens") :| [(Just "lens", "Control.Lens.At")] ), ( "Text.Megaparsec", (Nothing, "Control.Monad.Combinators") :| [] ) ] unlinesCrlf :: [Text] -> Text unlinesCrlf = T.concat . fmap (<> "\r\n") ormolu-0.7.2.0/tests/Ormolu/Fixity/PrinterSpec.hs0000644000000000000000000000474607346545000020064 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ormolu.Fixity.PrinterSpec (spec) where import Data.List (intercalate) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.Text qualified as T import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName (PackageName, mkPackageName) import Ormolu.Fixity import Ormolu.Fixity.Parser import Ormolu.Fixity.Printer import Test.Hspec import Test.Hspec.Megaparsec import Test.QuickCheck instance Arbitrary FixityOverrides where arbitrary = FixityOverrides . Map.fromList <$> listOf ((,) <$> genOperator <*> genFixityInfo) where genOperator = OpName . T.pack <$> oneof [genNormalOperator, genIdentifier] genNormalOperator = listOf1 (scaleDown arbitrary `suchThat` isOperatorConstituent) genIdentifier = do x <- arbitrary `suchThat` isIdentifierFirstChar xs <- listOf1 (scaleDown arbitrary `suchThat` isIdentifierConstituent) return (x : xs) genFixityInfo = do fiDirection <- elements [ InfixL, InfixR, InfixN ] fiPrecedence <- chooseInt (0, 9) return FixityInfo {..} instance Arbitrary ModuleReexports where arbitrary = ModuleReexports . Map.fromListWith combine <$> listOf genReexport where combine x y = NE.sort (x <> y) genReexport = do exportingModule <- arbitrary exports <- NE.sort . NE.fromList . getNonEmpty <$> scaleDown arbitrary return (exportingModule, exports) instance Arbitrary PackageName where arbitrary = mkPackageName <$> listOf1 (scaleDown arbitrary `suchThat` isPackageNameConstituent) instance Arbitrary ModuleName where arbitrary = ModuleName.fromString . intercalate "." <$> scaleDown (listOf1 genSegment) where genSegment = do x <- arbitrary `suchThat` isModuleSegmentFirstChar xs <- listOf (arbitrary `suchThat` isModuleSegmentConstituent) return (x : xs) scaleDown :: Gen a -> Gen a scaleDown = scale (`div` 4) spec :: Spec spec = do describe "parseFixityOverrides & printFixityOverrides" $ it "arbitrary fixity maps are printed and parsed back correctly" $ property $ \fixityOverrides moduleReexports -> parseDotOrmolu "" (printDotOrmolu fixityOverrides moduleReexports) `shouldParse` (fixityOverrides, moduleReexports) ormolu-0.7.2.0/tests/Ormolu/FixitySpec.hs0000644000000000000000000002636107346545000016436 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ormolu.FixitySpec (spec) where import Data.Function ((&)) import Data.List.NonEmpty (NonEmpty (..)) import Data.Map.Strict qualified as Map import Data.Set qualified as Set import Data.Text qualified as T import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import GHC.Types.Name (OccName) import GHC.Types.Name.Occurrence (mkVarOcc) import GHC.Types.Name.Reader import Language.Haskell.Syntax.ImpExp (ImportListInterpretation (..)) import Language.Haskell.Syntax.Module.Name (mkModuleName) import Ormolu.Fixity import Ormolu.Fixity.Imports import Ormolu.Fixity.Internal import Ormolu.Utils (showOutputable) import Test.Hspec instance Show RdrName where show = showOutputable spec :: Spec spec = do it "gives the correct fixity info for (:) (built-in)" $ checkFixities [] [] [(unqual ":", FixityApproximation (Just InfixR) 5 5)] it "does not know operators from base if base is not a dependency" $ checkFixities [] [] [ (unqual "$", defaultFixityApproximation), (unqual "+", defaultFixityApproximation), (unqual "++", defaultFixityApproximation) ] it "does not know operators from base if Prelude is not imported" $ checkFixities [] [] [ (unqual "$", defaultFixityApproximation), (unqual "+", defaultFixityApproximation), (unqual "++", defaultFixityApproximation) ] it "infers fixities of operators from base correctly" $ checkFixities ["base"] [import_ "Prelude"] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", FixityApproximation (Just InfixL) 6 6), (unqual "++", FixityApproximation (Just InfixR) 5 5) ] it "does not know (>>>) when Control.Category is not imported" $ checkFixities ["base"] [import_ "Prelude"] [ (unqual ">>>", defaultFixityApproximation) ] it "infer correct fixity for (>>>) when Control.Category is imported" $ checkFixities ["base"] [ import_ "Prelude", import_ "Control.Category" ] [ (unqual ">>>", FixityApproximation (Just InfixR) 1 1) ] it "handles 'as' imports correctly" $ checkFixities ["base"] [ import_ "Control.Category" & as_ "Foo" ] [ (unqual ">>>", FixityApproximation (Just InfixR) 1 1), (qual "Foo" ">>>", FixityApproximation (Just InfixR) 1 1), (qual "Bar" ">>>", defaultFixityApproximation) ] it "handles 'qualified' imports correctly" $ checkFixities ["base"] [import_ "Control.Category" & qualified_] [ (unqual ">>>", defaultFixityApproximation), (qual "Control.Category" ">>>", FixityApproximation (Just InfixR) 1 1) ] it "handles 'qualified as' imports correctly" $ checkFixities ["base"] [import_ "Control.Category" & qualified_ & as_ "Foo"] [ (unqual ">>>", defaultFixityApproximation), (qual "Control.Category" ">>>", defaultFixityApproximation), (qual "Foo" ">>>", FixityApproximation (Just InfixR) 1 1) ] it "handles explicit import lists correctly" $ checkFixities ["base"] [import_ "Prelude" & exactly_ ["$"]] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation) ] it "handles hiding import lists correctly" $ checkFixities ["base"] [import_ "Prelude" & hiding_ ["$"]] [ (unqual "$", defaultFixityApproximation), (unqual "+", FixityApproximation (Just InfixL) 6 6), (unqual "++", FixityApproximation (Just InfixR) 5 5) ] it "handles qualified imports with explicit import lists correctly" $ checkFixities ["base"] [import_ "Prelude" & qualified_ & exactly_ ["$"]] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", defaultFixityApproximation) ] it "handles qualified import with hiding correctly" $ checkFixities ["base"] [import_ "Prelude" & qualified_ & hiding_ ["$"]] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", defaultFixityApproximation), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and explicit import lists correctly (1)" $ checkFixities ["base"] [ import_ "Prelude" & qualified_, import_ "Prelude" & exactly_ ["$"] ] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and explicit import lists correctly (2)" $ checkFixities ["base"] [ import_ "Prelude" & exactly_ ["$"], import_ "Prelude" & qualified_ ] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and hiding import correctly (1)" $ checkFixities ["base"] [ import_ "Prelude" & qualified_, import_ "Prelude" & hiding_ ["$"] ] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", FixityApproximation (Just InfixL) 6 6), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and hiding import correctly (2)" $ checkFixities ["base"] [ import_ "Prelude" & hiding_ ["$"], import_ "Prelude" & qualified_ ] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", FixityApproximation (Just InfixL) 6 6), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "works for several imports from different packages" $ checkFixities ["base", "esqueleto"] [ import_ "Prelude", import_ "Database.Esqueleto.Experimental" & qualified_ & as_ "E" ] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (qual "E" "++.", FixityApproximation (Just InfixR) 5 5), (qual "E" "on", FixityApproximation (Just InfixN) 9 9) ] it "merges approximations in case of a conflict" $ checkFixities ["fclabels", "persistent"] [ import_ "Data.Label.Monadic", import_ "Database.Persist" ] [ (unqual "=.", FixityApproximation (Just InfixR) 2 3) ] it "correctly handles package-qualified imports (1)" $ checkFixities ["esqueleto"] [package_ "esqueleto" $ import_ "Database.Esqueleto.Experimental"] [(unqual "++.", FixityApproximation (Just InfixR) 5 5)] it "correctly handles package-qualified imports (2)" $ checkFixities ["esqueleto"] [package_ "bob" $ import_ "Database.Esqueleto.Experimental"] [(unqual "++.", defaultFixityApproximation)] it "default module re-exports: Control.Lens brings into scope Control.Lens.Lens" $ checkFixities ["lens"] ( applyModuleReexports defaultModuleReexports [import_ "Control.Lens"] ) [(unqual "<+~", FixityApproximation (Just InfixR) 4 4)] it "default module re-exports: Control.Lens qualified brings into scope Control.Lens.Lens" $ checkFixities ["lens"] ( applyModuleReexports defaultModuleReexports [import_ "Control.Lens" & qualified_] ) [ (unqual "<+~", defaultFixityApproximation), (qual "Control.Lens.Lens" "<+~", defaultFixityApproximation), (qual "Control.Lens" "<+~", FixityApproximation (Just InfixR) 4 4) ] it "default module re-exports: Control.Lens qualified as brings into scope Control.Lens.Lens" $ checkFixities ["lens"] ( applyModuleReexports defaultModuleReexports [import_ "Control.Lens" & qualified_ & as_ "L"] ) [ (unqual "<+~", defaultFixityApproximation), (qual "Control.Lens.Lens" "<+~", defaultFixityApproximation), (qual "Control.Lens" "<+~", defaultFixityApproximation), (qual "L" "<+~", FixityApproximation (Just InfixR) 4 4) ] it "re-export chains: exported module can itself re-export another module" $ do let reexports = ModuleReexports $ Map.insert "Foo" ((Nothing, "Control.Lens") :| []) (unModuleReexports defaultModuleReexports) checkFixities ["lens"] ( applyModuleReexports reexports [import_ "Foo"] ) [ (unqual "<+~", FixityApproximation (Just InfixR) 4 4) ] -- | Build a fixity map using the Hoogle database and then check the fixity -- of the specified subset of operators. checkFixities :: -- | List of dependencies [PackageName] -> -- | Imports [FixityImport] -> -- | Associative list representing a subset of the resulting fixity map -- that should be checked. [(RdrName, FixityApproximation)] -> Expectation checkFixities dependencies fixityImports expectedResult = actualResult `shouldBe` expectedResult where actualResult = fmap (\(k, _) -> (k, inferFixity k resultMap)) expectedResult resultMap = moduleFixityMap (packageFixityMap (Set.fromList dependencies)) fixityImports qual :: String -> OpName -> RdrName qual moduleName opName = mkRdrQual (mkModuleName moduleName) (opNameToOccName opName) unqual :: OpName -> RdrName unqual = mkRdrUnqual . opNameToOccName opNameToOccName :: OpName -> OccName opNameToOccName = mkVarOcc . T.unpack . unOpName -- | Explicitly specify the package. package_ :: PackageName -> FixityImport -> FixityImport package_ packageName fixityImport = fixityImport { fimportPackage = Just packageName } -- | Construct a simple 'FixityImport'. import_ :: ModuleName -> FixityImport import_ moduleName = FixityImport { fimportPackage = Nothing, fimportModule = moduleName, fimportQualified = UnqualifiedAndQualified moduleName, fimportList = Nothing } -- | Adds an alias for an import. as_ :: ModuleName -> FixityImport -> FixityImport as_ moduleName fixityImport = fixityImport { fimportQualified = case fimportQualified fixityImport of UnqualifiedAndQualified _ -> UnqualifiedAndQualified moduleName OnlyQualified _ -> OnlyQualified moduleName } -- | Qualified imports. qualified_ :: FixityImport -> FixityImport qualified_ fixityImport = fixityImport { fimportQualified = case fimportQualified fixityImport of UnqualifiedAndQualified m -> OnlyQualified m OnlyQualified m -> OnlyQualified m } -- | Exact import lists. exactly_ :: [OpName] -> FixityImport -> FixityImport exactly_ opNames fixityImports = fixityImports { fimportList = Just (Exactly, opNames) } -- | Hiding. hiding_ :: [OpName] -> FixityImport -> FixityImport hiding_ opNames fixityImports = fixityImports { fimportList = Just (EverythingBut, opNames) } ormolu-0.7.2.0/tests/Ormolu/OpTreeSpec.hs0000644000000000000000000001015607346545000016353 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.OpTreeSpec (spec) where import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as T import GHC.Types.Name (mkOccName, varName) import GHC.Types.Name.Reader (mkRdrUnqual) import Ormolu.Fixity import Ormolu.Fixity.Internal import Ormolu.Printer.Operators import Test.Hspec n :: Text -> OpTree Text OpName n = OpNode -- | Check that the input tree is actually reassociated as expected. checkReassociate :: -- | Fixity map used for the reassociation [(OpName, FixityInfo)] -> -- | Input tree OpTree Text OpName -> -- | Expected output tree OpTree Text OpName -> Expectation checkReassociate fixities inputTree expectedOutputTree = removeOpInfo actualOutputTree `shouldBe` expectedOutputTree where removeOpInfo (OpNode x) = OpNode x removeOpInfo (OpBranches exprs ops) = OpBranches (removeOpInfo <$> exprs) (opiOp <$> ops) actualOutputTree = reassociateOpTree convertName modFixityMap inputTree modFixityMap = ModuleFixityMap (Map.map Given (Map.fromList fixities)) convertName = Just . mkRdrUnqual . mkOccName varName . T.unpack . unOpName spec :: Spec spec = do it "flattens a tree correctly" $ do let inputTree = OpBranches [ OpBranches [OpBranches [n "a", n "b"] ["+"], n "c"] ["+"], n "d" ] ["+"] outputTree = OpBranches [n "a", n "b", n "c", n "d"] ["+", "+", "+"] fixities = [("+", FixityInfo InfixL 5)] checkReassociate fixities inputTree outputTree it "uses 'minOps' strategy by default" $ do let inputTree = OpBranches [n "a", n "b", n "c", n "d", n "e", n "f"] ["*", "*", "+", "*", "-"] outputTree = OpBranches [ OpBranches [n "a", n "b", n "c"] ["*", "*"], OpBranches [n "d", n "e"] ["*"], n "f" ] ["+", "-"] fixities = [ ("+", FixityInfo InfixL 5), ("*", FixityInfo InfixL 7), ("-", FixityInfo InfixL 5) ] checkReassociate fixities inputTree outputTree it "uses 'maxOps' strategy if 'minOps' strategy fails" $ do let inputTree = OpBranches [n "a", n "b", n "c", n "d", n "e", n "f"] ["*", "*", "+", "*", "-"] outputTree = OpBranches [ OpBranches [n "a", n "b", n "c"] ["*", "*"], OpBranches [n "d", n "e"] ["*"], n "f" ] ["+", "-"] fixities = [ ("+", FixityInfo InfixL 5), ("*", FixityInfo InfixL 8), ("-", FixityInfo InfixL 5) ] checkReassociate fixities inputTree outputTree it "defaults to 'hardSplitter' strategy if both 'minOps' and 'maxOps' \ \strategies fail" $ do let inputTree = OpBranches [n "a", n "b", n "c", n "d", n "e", n "f"] ["@", "@", "|", "@", "$"] outputTree = OpBranches [ OpBranches [n "a", n "b", n "c", n "d", n "e"] ["@", "@", "|", "@"], n "f" ] ["$"] fixities = [ ("@", FixityInfo InfixL 4), ("|", FixityInfo InfixL 4), ("$", FixityInfo InfixR 0) ] checkReassociate fixities inputTree outputTree it "reassociates correctly: complex example 1" $ do let inputTree = OpBranches [n "f", n "1", n "2", n "3", n "4", n "5", n "6"] ["$", "+", "*", "$", "*", "+"] outputTree = OpBranches [ n "f", OpBranches [n "1", OpBranches [n "2", n "3"] ["*"]] ["+"], OpBranches [OpBranches [n "4", n "5"] ["*"], n "6"] ["+"] ] ["$", "$"] fixities = [ ("$", FixityInfo InfixR 0), ("+", FixityInfo InfixL 6), ("*", FixityInfo InfixL 7) ] checkReassociate fixities inputTree outputTree ormolu-0.7.2.0/tests/Ormolu/Parser/0000755000000000000000000000000007346545000015237 5ustar0000000000000000ormolu-0.7.2.0/tests/Ormolu/Parser/OptionsSpec.hs0000644000000000000000000000171507346545000020045 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Parser.OptionsSpec (spec) where import Data.Text qualified as T import Ormolu import Test.Hspec spec :: Spec spec = describe "GHC options in source files take priority" $ do it "default extensions can be disabled locally" $ do let src = T.unlines [ "{-# LANGUAGE NoBlockArguments #-}", "", "test = test do test" ] fixedPoint [] src `shouldThrow` \case OrmoluParsingFailed {} -> True _ -> False it "extensions disabled via CLI can be enabled locally" $ do let src = T.unlines [ "{-# LANGUAGE BlockArguments #-}", "", "test = test do test" ] fixedPoint ["-XNoBlockArguments"] src where fixedPoint opts input = do output <- ormolu defaultConfig {cfgDynOptions = DynOption <$> opts} "" input output `shouldBe` input ormolu-0.7.2.0/tests/Ormolu/Parser/ParseFailureSpec.hs0000644000000000000000000000131007346545000020763 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Ormolu.Parser.ParseFailureSpec (spec) where import Ormolu import Ormolu.Utils (showOutputable) import System.FilePath import Test.Hspec spec :: Spec spec = do "disabling-preserves-error-location.hs" `failsAt` "12:1" "line-pragma.hs" `failsAt` "4:47" failsAt :: String -> String -> Spec failsAt filename location = let filePath = baseDir filename in it (filename ++ " fails at " ++ location) $ ormoluFile defaultConfig filePath `shouldThrow` \case OrmoluParsingFailed srcSpan _ -> showOutputable srcSpan == filePath ++ ":" ++ location _ -> False baseDir :: FilePath baseDir = "data" "parse-failures" ormolu-0.7.2.0/tests/Ormolu/Parser/PragmaSpec.hs0000644000000000000000000000224507346545000017620 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Parser.PragmaSpec (spec) where import Data.Text (Text) import Data.Text qualified as T import Ormolu.Parser.Pragma import Test.Hspec spec :: Spec spec = describe "parsePragma" $ do stdTest "{-# LANGUAGE Foo #-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# language Foo #-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-#LANGUAGE Foo#-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# LANGUAGE Foo#-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-#language Foo#-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# lAngUAGe Foo #-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# LANGUAGE Foo, Bar #-}" (Just (PragmaLanguage ["Foo", "Bar"])) stdTest "{-# LANGUAGE Foo Bar #-}" Nothing stdTest "{-# BOO Foo #-}" Nothing stdTest "something" Nothing stdTest "{-# LANGUAGE foo, Bar #-}" Nothing stdTest "{-# OPTIONS_GHC foo bar baz #-}" (Just $ PragmaOptionsGHC "foo bar baz") stdTest "{-#OPTIONS_HADDOCK foo, bar, baz #-}" (Just $ PragmaOptionsHaddock "foo, bar, baz") stdTest :: Text -> Maybe Pragma -> Spec stdTest input result = it (T.unpack input) $ parsePragma input `shouldBe` result ormolu-0.7.2.0/tests/Ormolu/PrinterSpec.hs0000644000000000000000000001016407346545000016577 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Ormolu.PrinterSpec (spec) where import Control.Exception import Control.Monad import Data.List (isSuffixOf) import Data.Map qualified as Map import Data.Maybe (isJust) import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import Data.Text.IO qualified as T import Ormolu import Ormolu.Fixity import Ormolu.Utils.IO import Path import Path.IO import System.Environment (lookupEnv) import System.FilePath qualified as F import Test.Hspec spec :: Spec spec = do es <- runIO locateExamples forM_ es checkExample -- | Fixity overrides that are to be used with the test examples. testsuiteOverrides :: FixityOverrides testsuiteOverrides = FixityOverrides ( Map.fromList [ (".=", FixityInfo InfixR 8), ("#", FixityInfo InfixR 5) ] ) -- | Check a single given example. checkExample :: Path Rel File -> Spec checkExample srcPath' = it (fromRelFile srcPath' ++ " works") . withNiceExceptions $ do let srcPath = examplesDir srcPath' inputPath = fromRelFile srcPath config = defaultConfig { cfgSourceType = detectSourceType inputPath, cfgFixityOverrides = testsuiteOverrides, cfgDependencies = Set.fromList [ "base", "esqueleto", "hspec", "lens", "servant" ] } expectedOutputPath <- deriveOutput srcPath -- 1. Given input snippet of source code parse it and pretty print it. -- 2. Parse the result of pretty-printing again and make sure that AST -- is the same as AST of the original snippet. (This happens in -- 'ormoluFile' automatically.) formatted0 <- ormoluFile config inputPath -- 3. Check the output against expected output. Thus all tests should -- include two files: input and expected output. whenShouldRegenerateOutput $ T.writeFile (fromRelFile expectedOutputPath) formatted0 expected <- readFileUtf8 $ fromRelFile expectedOutputPath shouldMatch False formatted0 expected -- 4. Check that running the formatter on the output produces the same -- output again (the transformation is idempotent). formatted1 <- ormolu config "" formatted0 shouldMatch True formatted1 formatted0 -- | Build list of examples for testing. locateExamples :: IO [Path Rel File] locateExamples = filter isInput . snd <$> listDirRecurRel examplesDir -- | Does given path look like input path (as opposed to expected output -- path)? isInput :: Path Rel File -> Bool isInput path = let s = fromRelFile path (s', exts) = F.splitExtensions s in exts `elem` [".hs", ".hsig"] && not ("-out" `isSuffixOf` s') -- | For given path of input file return expected name of output. deriveOutput :: Path Rel File -> IO (Path Rel File) deriveOutput path = parseRelFile $ F.addExtension (radical ++ "-out") exts where (radical, exts) = F.splitExtensions (fromRelFile path) -- | A version of 'shouldBe' that is specialized to comparing 'Text' values. -- It also prints multi-line snippets in a more readable form. shouldMatch :: Bool -> Text -> Text -> Expectation shouldMatch idempotenceTest actual expected = when (actual /= expected) . expectationFailure $ unlines [ ">>>>>>>>>>>>>>>>>>>>>> expected (" ++ pass ++ "):", T.unpack expected, ">>>>>>>>>>>>>>>>>>>>>> but got:", T.unpack actual ] where pass = if idempotenceTest then "idempotence pass" else "first pass" examplesDir :: Path Rel Dir examplesDir = $(mkRelDir "data/examples") -- | Inside this wrapper 'OrmoluException' will be caught and displayed -- nicely using 'displayException'. withNiceExceptions :: -- | Action that may throw the exception Expectation -> Expectation withNiceExceptions m = m `catch` h where h :: OrmoluException -> IO () h = expectationFailure . displayException whenShouldRegenerateOutput :: IO () -> IO () whenShouldRegenerateOutput action = do shouldRegenerateOutput <- isJust <$> lookupEnv "ORMOLU_REGENERATE_EXAMPLES" when shouldRegenerateOutput action ormolu-0.7.2.0/tests/0000755000000000000000000000000007346545000012526 5ustar0000000000000000ormolu-0.7.2.0/tests/Spec.hs0000644000000000000000000000005407346545000013753 0ustar0000000000000000{-# OPTIONS_GHC -F -pgmF hspec-discover #-}