ormolu-0.5.3.0/0000755000000000000000000000000007346545000011363 5ustar0000000000000000ormolu-0.5.3.0/CHANGELOG.md0000644000000000000000000005712307346545000013204 0ustar0000000000000000## 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.5.3.0/CONTRIBUTING.md0000644000000000000000000000347707346545000013627 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.5.3.0/DESIGN.md0000644000000000000000000003602707346545000012666 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.5.3.0/LICENSE.md0000644000000000000000000000265207346545000012774 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.5.3.0/README.md0000644000000000000000000002421407346545000012645 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 [`ormolu-action`][ormolu-action] 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. When input comes from stdin, one can pass `--stdin-input-file` which will give Ormolu the location of the Haskell source file that should be used as the starting point for searching for a suitable Cabal 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 if `.ormolu` file is found next to the corresponding Cabal file, i.e. they should be siblings in the same directory. 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. Besides, 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. Searching for both `.cabal` and `.ormolu` files can be disabled by passing `--no-cabal`. ### 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. * Input modules should be parsable by Haddock, which is a bit stricter criterion than just being valid Haskell modules. ## 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 [ormolu-action]: https://github.com/marketplace/actions/ormolu-action [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.5.3.0/Setup.hs0000644000000000000000000000012707346545000013017 0ustar0000000000000000module Main (main) where import Distribution.Simple main :: IO () main = defaultMain ormolu-0.5.3.0/app/0000755000000000000000000000000007346545000012143 5ustar0000000000000000ormolu-0.5.3.0/app/Main.hs0000644000000000000000000003066007346545000013370 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} module Main (main) where import Control.Exception (throwIO) import Control.Monad import Data.Bool (bool) import Data.List (intercalate, sort) import qualified Data.Map.Strict as Map import Data.Maybe (fromMaybe, mapMaybe, maybeToList) import qualified Data.Set as Set import qualified Data.Text.IO as TIO import Data.Version (showVersion) import Language.Haskell.TH.Env (envQ) import Options.Applicative import Ormolu import Ormolu.Diff.Text (diffText, printTextDiff) import Ormolu.Fixity (FixityInfo, OpName) import Ormolu.Parser (manualExts) import Ormolu.Terminal import Ormolu.Utils (showOutputable) import Ormolu.Utils.Fixity (parseFixityDeclarationStr) import Ormolu.Utils.IO import Paths_ormolu (version) import System.Directory import System.Exit (ExitCode (..), exitWith) import qualified System.FilePath as FP import System.IO (hPutStrLn, stderr) -- | Entry point of the program. main :: IO () main = do Opts {..} <- execParser optsParserInfo let formatOne' = formatOne optCabal 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 CabalOpts -> -- | 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 CabalOpts {..} 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) case FP.normalise <$> mpath of -- input source = STDIN Nothing -> do resultConfig <- ( if optDoNotUseCabal then pure Nothing else case optStdinInputFile of Just stdinInputFile -> getCabalInfoForSourceFile' stdinInputFile Nothing -> throwIO OrmoluMissingStdinInputFile ) >>= patchConfig Nothing case mode of Stdout -> do ormoluStdin resultConfig >>= 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 resultConfig stdinRepr originalInput handleDiff originalInput formattedInput stdinRepr -- input source = a file Just inputFile -> do resultConfig <- ( if optDoNotUseCabal then pure Nothing else getCabalInfoForSourceFile' inputFile ) >>= patchConfig (Just (detectSourceType inputFile)) case mode of Stdout -> do ormoluFile resultConfig inputFile >>= TIO.putStr return ExitSuccess InPlace -> do -- ormoluFile is not used because we need originalInput originalInput <- readFileUtf8 inputFile formattedInput <- ormolu resultConfig 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 resultConfig inputFile originalInput handleDiff originalInput formattedInput inputFile where patchConfig mdetectedSourceType mcabalInfo = do let sourceType = fromMaybe ModuleSource (reqSourceType <|> mdetectedSourceType) mfixityOverrides <- traverse getFixityOverridesForSourceFile mcabalInfo return (refineConfig sourceType mcabalInfo mfixityOverrides 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 .cabal files optCabal :: CabalOpts, -- | 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) -- | Configuration related to .cabal files. data CabalOpts = CabalOpts { -- | DO NOT extract default-extensions and dependencies from .cabal files optDoNotUseCabal :: 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 <*> cabalOptsParser <*> sourceTypeParser <*> (many . strArgument . mconcat) [ metavar "FILE", help "Haskell source files to format or stdin (the default)" ] cabalOptsParser :: Parser CabalOpts cabalOptsParser = CabalOpts <$> (switch . mconcat) [ long "no-cabal", help $ "Do not extract default-extensions and dependencies from .cabal files" ++ ", 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 (Map.fromListWith (<>) . mconcat) . many . option parseFixityDeclaration . mconcat ) [ long "fixity", short 'f', metavar "FIXITY", help "Fixity declaration to use (an override)" ] <*> (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 '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.5.3.0/data/cabal-tests/0000755000000000000000000000000007346545000014476 5ustar0000000000000000ormolu-0.5.3.0/data/cabal-tests/Bar.hs0000644000000000000000000000006507346545000015537 0ustar0000000000000000module Foo where import Data.List qualified as List ormolu-0.5.3.0/data/cabal-tests/Foo.hs0000644000000000000000000000006507346545000015556 0ustar0000000000000000module Foo where import Data.List qualified as List ormolu-0.5.3.0/data/cabal-tests/test.cabal0000644000000000000000000000034607346545000016444 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.5.3.0/data/diff-tests/inputs/0000755000000000000000000000000007346545000015666 5ustar0000000000000000ormolu-0.5.3.0/data/diff-tests/inputs/applicative-after.hs0000644000000000000000000000036107346545000021622 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.5.3.0/data/diff-tests/inputs/applicative-before.hs0000644000000000000000000000035507346545000021766 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.5.3.0/data/diff-tests/inputs/empty.hs0000644000000000000000000000000007346545000017346 0ustar0000000000000000ormolu-0.5.3.0/data/diff-tests/inputs/longer-v2.hs0000644000000000000000000000013407346545000020033 0ustar0000000000000000module Main (foo) where a b c main :: IO () main = return () d e f g foo :: Int foo = 6 ormolu-0.5.3.0/data/diff-tests/inputs/longer.hs0000644000000000000000000000013507346545000017507 0ustar0000000000000000module Main (main) where a b c main :: IO () main = return () d e f g foo :: Int foo = 5 ormolu-0.5.3.0/data/diff-tests/inputs/main-and-bar-v2.hs0000644000000000000000000000014107346545000020771 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 bar :: Int bar = 7 ormolu-0.5.3.0/data/diff-tests/inputs/main-and-bar.hs0000644000000000000000000000014307346545000020446 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 bar :: Int bar = 6 ormolu-0.5.3.0/data/diff-tests/inputs/main-and-baz-v2.hs0000644000000000000000000000015007346545000021001 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 + 5 bar :: Int bar = 7 ormolu-0.5.3.0/data/diff-tests/inputs/main-and-baz.hs0000644000000000000000000000015207346545000020456 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 + 5 bar :: Int bar = 6 ormolu-0.5.3.0/data/diff-tests/inputs/main-and-foo-v2.hs0000644000000000000000000000011307346545000021007 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 ormolu-0.5.3.0/data/diff-tests/inputs/main-and-foo.hs0000644000000000000000000000011507346545000020464 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 ormolu-0.5.3.0/data/diff-tests/inputs/main-foo.hs0000644000000000000000000000007007346545000017724 0ustar0000000000000000module Main (foo) where main :: IO () main = return () ormolu-0.5.3.0/data/diff-tests/inputs/main-v2.hs0000644000000000000000000000006707346545000017476 0ustar0000000000000000module Main (main) where main :: IO () main = pure () ormolu-0.5.3.0/data/diff-tests/inputs/main.hs0000644000000000000000000000007107346545000017144 0ustar0000000000000000module Main (main) where main :: IO () main = return () ormolu-0.5.3.0/data/diff-tests/inputs/no-trailing-blank-line.hs0000644000000000000000000000002007346545000022447 0ustar0000000000000000data Test = Testormolu-0.5.3.0/data/diff-tests/inputs/one-line.hs0000644000000000000000000000003107346545000017722 0ustar0000000000000000module Main (main) where ormolu-0.5.3.0/data/diff-tests/inputs/spaced-v2.hs0000644000000000000000000000012407346545000020003 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 ormolu-0.5.3.0/data/diff-tests/inputs/spaced.hs0000644000000000000000000000012607346545000017460 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 ormolu-0.5.3.0/data/diff-tests/inputs/with-trailing-blank-line.hs0000644000000000000000000000002107346545000023007 0ustar0000000000000000data Test = Test ormolu-0.5.3.0/data/diff-tests/outputs/0000755000000000000000000000000007346545000016067 5ustar0000000000000000ormolu-0.5.3.0/data/diff-tests/outputs/joined-hunk.txt0000644000000000000000000000024507346545000021044 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.5.3.0/data/diff-tests/outputs/no-following.txt0000644000000000000000000000014507346545000021242 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ module Main (main) where main :: IO () - main = return () + main = pure () ormolu-0.5.3.0/data/diff-tests/outputs/no-preceding.txt0000644000000000000000000000015607346545000021204 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ - module Main (foo) where + module Main (main) where main :: IO () main = return () ormolu-0.5.3.0/data/diff-tests/outputs/one-line-added.txt0000644000000000000000000000006007346545000021371 0ustar0000000000000000TEST @@ -1,0 +1,1 @@ + module Main (main) where ormolu-0.5.3.0/data/diff-tests/outputs/one-line-removed.txt0000644000000000000000000000006007346545000021771 0ustar0000000000000000TEST @@ -1,1 +1,0 @@ - module Main (main) where ormolu-0.5.3.0/data/diff-tests/outputs/simple-hunk.txt0000644000000000000000000000017507346545000021067 0ustar0000000000000000TEST @@ -1,7 +1,7 @@ module Main (main) where main :: IO () - main = return () + main = pure () foo :: Int foo = 5 ormolu-0.5.3.0/data/diff-tests/outputs/trailing-blank-line.txt0000644000000000000000000000005207346545000022450 0ustar0000000000000000TEST @@ -1,1 +1,2 @@ data Test = Test + ormolu-0.5.3.0/data/diff-tests/outputs/trimming-trailing-both-eof.txt0000644000000000000000000000045607346545000023773 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.5.3.0/data/diff-tests/outputs/trimming-trailing-both-out-of-margin.txt0000644000000000000000000000021307346545000025675 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.5.3.0/data/diff-tests/outputs/trimming.txt0000644000000000000000000000011107346545000020447 0ustar0000000000000000TEST @@ -7,2 +7,2 @@ main :: IO () - main = return () + main = pure () ormolu-0.5.3.0/data/diff-tests/outputs/two-hunks.txt0000644000000000000000000000026607346545000020573 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.5.3.0/data/examples/declaration/annotation/0000755000000000000000000000000007346545000020551 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/annotation/annotation-out.hs0000644000000000000000000000034307346545000024064 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.5.3.0/data/examples/declaration/annotation/annotation.hs0000644000000000000000000000041407346545000023256 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.5.3.0/data/examples/declaration/class/0000755000000000000000000000000007346545000017504 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/class/associated-data1-out.hs0000644000000000000000000000025307346545000023754 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.5.3.0/data/examples/declaration/class/associated-data1.hs0000644000000000000000000000027107346545000023147 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.5.3.0/data/examples/declaration/class/associated-data2-out.hs0000644000000000000000000000031407346545000023753 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.5.3.0/data/examples/declaration/class/associated-data2.hs0000644000000000000000000000033707346545000023153 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.5.3.0/data/examples/declaration/class/associated-type-defaults-out.hs0000644000000000000000000000050307346545000025546 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.5.3.0/data/examples/declaration/class/associated-type-defaults.hs0000644000000000000000000000046507346545000024750 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.5.3.0/data/examples/declaration/class/associated-types1-out.hs0000644000000000000000000000025307346545000024207 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.5.3.0/data/examples/declaration/class/associated-types1.hs0000644000000000000000000000026207346545000023402 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.5.3.0/data/examples/declaration/class/associated-types2-out.hs0000644000000000000000000000035407346545000024212 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.5.3.0/data/examples/declaration/class/associated-types2.hs0000644000000000000000000000040707346545000023404 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.5.3.0/data/examples/declaration/class/default-implementations-comments-out.hs0000644000000000000000000000045707346545000027330 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.5.3.0/data/examples/declaration/class/default-implementations-comments.hs0000644000000000000000000000054307346545000026517 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.5.3.0/data/examples/declaration/class/default-implementations-out.hs0000644000000000000000000000022007346545000025471 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.5.3.0/data/examples/declaration/class/default-implementations.hs0000644000000000000000000000024307346545000024671 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.5.3.0/data/examples/declaration/class/default-signatures-out.hs0000644000000000000000000000051107346545000024450 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.5.3.0/data/examples/declaration/class/default-signatures-simple-out.hs0000644000000000000000000000021307346545000025736 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: (Show a) => a -> String foo = show ormolu-0.5.3.0/data/examples/declaration/class/default-signatures-simple.hs0000644000000000000000000000022107346545000025130 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: Show a => a -> String foo = show ormolu-0.5.3.0/data/examples/declaration/class/default-signatures.hs0000644000000000000000000000056407346545000023653 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.5.3.0/data/examples/declaration/class/dependency-super-classes-out.hs0000644000000000000000000000067607346545000025563 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.5.3.0/data/examples/declaration/class/dependency-super-classes.hs0000644000000000000000000000075507346545000024754 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.5.3.0/data/examples/declaration/class/empty-classes-out.hs0000644000000000000000000000010007346545000023425 0ustar0000000000000000module Main where -- | Foo! class Foo a -- | Bar! class Bar a ormolu-0.5.3.0/data/examples/declaration/class/empty-classes.hs0000644000000000000000000000010507346545000022625 0ustar0000000000000000module Main where -- | Foo! class Foo a where -- | Bar! class Bar a ormolu-0.5.3.0/data/examples/declaration/class/functional-dependencies-out.hs0000644000000000000000000000051007346545000025427 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.5.3.0/data/examples/declaration/class/functional-dependencies.hs0000644000000000000000000000050407346545000024625 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.5.3.0/data/examples/declaration/class/multi-parameters1-out.hs0000644000000000000000000000031407346545000024217 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.5.3.0/data/examples/declaration/class/multi-parameters1.hs0000644000000000000000000000035207346545000023414 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.5.3.0/data/examples/declaration/class/multi-parameters2-out.hs0000644000000000000000000000035107346545000024221 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.5.3.0/data/examples/declaration/class/multi-parameters2.hs0000644000000000000000000000052407346545000023416 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.5.3.0/data/examples/declaration/class/newlines-after-where-out.hs0000644000000000000000000000011707346545000024677 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a ormolu-0.5.3.0/data/examples/declaration/class/newlines-after-where.hs0000644000000000000000000000012107346545000024065 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a ormolu-0.5.3.0/data/examples/declaration/class/newlines-and-default-decls-out.hs0000644000000000000000000000022107346545000025736 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () ormolu-0.5.3.0/data/examples/declaration/class/newlines-and-default-decls.hs0000644000000000000000000000022307346545000025133 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () ormolu-0.5.3.0/data/examples/declaration/class/newlines-and-haddocks-out.hs0000644000000000000000000000046607346545000025015 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.5.3.0/data/examples/declaration/class/newlines-and-haddocks.hs0000644000000000000000000000046207346545000024204 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.5.3.0/data/examples/declaration/class/newlines-between-methods-out.hs0000644000000000000000000000044107346545000025560 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.5.3.0/data/examples/declaration/class/newlines-between-methods.hs0000644000000000000000000000043707346545000024760 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.5.3.0/data/examples/declaration/class/poly-kinded-classes-out.hs0000644000000000000000000000015307346545000024516 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a :: k) class Bar ( a :: -- Variable * -- Star ) ormolu-0.5.3.0/data/examples/declaration/class/poly-kinded-classes.hs0000644000000000000000000000014507346545000023712 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a::k) class Bar (a -- Variable :: * -- Star ) ormolu-0.5.3.0/data/examples/declaration/class/single-parameters-out.hs0000644000000000000000000000053507346545000024272 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.5.3.0/data/examples/declaration/class/single-parameters.hs0000644000000000000000000000055207346545000023464 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.5.3.0/data/examples/declaration/class/super-classes-out.hs0000644000000000000000000000022707346545000023437 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.5.3.0/data/examples/declaration/class/super-classes.hs0000644000000000000000000000023307346545000022627 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.5.3.0/data/examples/declaration/class/type-operators1-out.hs0000644000000000000000000000033107346545000023720 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.5.3.0/data/examples/declaration/class/type-operators1.hs0000644000000000000000000000033207346545000023114 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.5.3.0/data/examples/declaration/class/type-operators2-out.hs0000644000000000000000000000025507346545000023726 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.5.3.0/data/examples/declaration/class/type-operators2.hs0000644000000000000000000000025507346545000023121 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.5.3.0/data/examples/declaration/class/type-operators3-out.hs0000644000000000000000000000032007346545000023720 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.5.3.0/data/examples/declaration/class/type-operators3.hs0000644000000000000000000000024007346545000023114 0ustar0000000000000000{-# LANGUAGE TypeFamilies, TypeOperators, NoStarIsType, PolyKinds #-} class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = () ormolu-0.5.3.0/data/examples/declaration/data/0000755000000000000000000000000007346545000017310 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/data/ctype-out.hs0000644000000000000000000000005507346545000021575 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T ormolu-0.5.3.0/data/examples/declaration/data/ctype.hs0000644000000000000000000000006007346545000020764 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T ormolu-0.5.3.0/data/examples/declaration/data/deriving-out.hs0000644000000000000000000000007607346545000022263 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) ormolu-0.5.3.0/data/examples/declaration/data/deriving-strategies-out.hs0000644000000000000000000000037507346545000024435 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.5.3.0/data/examples/declaration/data/deriving-strategies.hs0000644000000000000000000000036507346545000023627 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.5.3.0/data/examples/declaration/data/deriving.hs0000644000000000000000000000007607346545000021456 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) ormolu-0.5.3.0/data/examples/declaration/data/empty-out.hs0000644000000000000000000000005207346545000021604 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo ormolu-0.5.3.0/data/examples/declaration/data/empty.hs0000644000000000000000000000005207346545000020777 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo ormolu-0.5.3.0/data/examples/declaration/data/existential-multiline-out.hs0000644000000000000000000000034307346545000025002 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.5.3.0/data/examples/declaration/data/existential-multiline.hs0000644000000000000000000000033407346545000024175 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.5.3.0/data/examples/declaration/data/existential-out.hs0000644000000000000000000000020007346545000022772 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. (a + b) => Bar a b ormolu-0.5.3.0/data/examples/declaration/data/existential-unicode-out.hs0000644000000000000000000000013707346545000024427 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = forall a. Bar ormolu-0.5.3.0/data/examples/declaration/data/existential-unicode.hs0000644000000000000000000000012407346545000023616 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = ∀ a. Bar ormolu-0.5.3.0/data/examples/declaration/data/existential.hs0000644000000000000000000000017607346545000022201 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. a + b => Bar a b ormolu-0.5.3.0/data/examples/declaration/data/fat-multiline-out.hs0000644000000000000000000000020007346545000023213 0ustar0000000000000000module Main where -- | Something. data Foo = -- | Foo Foo Int Int | -- | Bar Bar Bool Bool ormolu-0.5.3.0/data/examples/declaration/data/fat-multiline.hs0000644000000000000000000000017107346545000022415 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Int Int -- ^ Foo | Bar Bool Bool -- ^ Bar ormolu-0.5.3.0/data/examples/declaration/data/field-layout/0000755000000000000000000000000007346545000021706 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/data/field-layout/gadt-out.hs0000644000000000000000000000022307346545000023763 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char ormolu-0.5.3.0/data/examples/declaration/data/field-layout/gadt.hs0000644000000000000000000000021007346545000023152 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char ormolu-0.5.3.0/data/examples/declaration/data/field-layout/record-out.hs0000644000000000000000000000024207346545000024323 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo { -- | Something foo :: Foo Int Int, -- | Something else bar :: Bar Char Char } ormolu-0.5.3.0/data/examples/declaration/data/field-layout/record.hs0000644000000000000000000000022707346545000023521 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo { foo :: Foo Int Int -- ^ Something , bar :: Bar Char Char -- ^ Something else } ormolu-0.5.3.0/data/examples/declaration/data/field-layout/variants-out.hs0000644000000000000000000000017707346545000024703 0ustar0000000000000000module Main where -- | Foo. data Foo = -- | Something Foo Int Int | -- | Something else Bar Char Char ormolu-0.5.3.0/data/examples/declaration/data/field-layout/variants.hs0000644000000000000000000000017007346545000024067 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo Int Int -- ^ Something | Bar Char Char -- ^ Something else ormolu-0.5.3.0/data/examples/declaration/data/gadt-syntax-out.hs0000644000000000000000000000011507346545000022711 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where MKFoo :: a -> (a -> Bool) -> Foo ormolu-0.5.3.0/data/examples/declaration/data/gadt-syntax.hs0000644000000000000000000000011707346545000022106 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where { MKFoo :: a -> (a->Bool) -> Foo } ormolu-0.5.3.0/data/examples/declaration/data/gadt/0000755000000000000000000000000007346545000020227 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/data/gadt/multiline-out.hs0000644000000000000000000000061307346545000023372 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.5.3.0/data/examples/declaration/data/gadt/multiline-where-out.hs0000644000000000000000000000052207346545000024501 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.5.3.0/data/examples/declaration/data/gadt/multiline-where.hs0000644000000000000000000000051107346545000023672 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.5.3.0/data/examples/declaration/data/gadt/multiline.hs0000644000000000000000000000057407346545000022573 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.5.3.0/data/examples/declaration/data/gadt/multiple-declaration-out.hs0000644000000000000000000000030007346545000025477 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.5.3.0/data/examples/declaration/data/gadt/multiple-declaration.hs0000644000000000000000000000027307346545000024703 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.5.3.0/data/examples/declaration/data/gadt/record-out.hs0000644000000000000000000000032307346545000022644 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: {fooX :: Int} -> Foo Bar :: { fooY :: Int, fooBar, fooBaz :: Bool, fooFoo, barBar, bazBaz :: Int } -> Foo ormolu-0.5.3.0/data/examples/declaration/data/gadt/record.hs0000644000000000000000000000034307346545000022041 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: { fooX :: Int } -> Foo Bar :: { fooY :: Int , fooBar, fooBaz :: Bool , fooFoo , barBar , bazBaz :: Int } -> Foo ormolu-0.5.3.0/data/examples/declaration/data/gadt/simple-out.hs0000644000000000000000000000052007346545000022656 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.5.3.0/data/examples/declaration/data/gadt/simple.hs0000644000000000000000000000046107346545000022055 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.5.3.0/data/examples/declaration/data/gadt/strictness-out.hs0000644000000000000000000000017107346545000023570 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int ormolu-0.5.3.0/data/examples/declaration/data/gadt/strictness.hs0000644000000000000000000000017107346545000022763 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int ormolu-0.5.3.0/data/examples/declaration/data/infix-out.hs0000644000000000000000000000003107346545000021560 0ustar0000000000000000data Foo a b = a `Foo` b ormolu-0.5.3.0/data/examples/declaration/data/infix.hs0000644000000000000000000000003107346545000020753 0ustar0000000000000000data Foo a b = a `Foo` b ormolu-0.5.3.0/data/examples/declaration/data/kind-annotations-out.hs0000644000000000000000000000041707346545000023733 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.5.3.0/data/examples/declaration/data/kind-annotations.hs0000644000000000000000000000041607346545000023125 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.5.3.0/data/examples/declaration/data/multiline-arg-parens-out.hs0000644000000000000000000000022207346545000024504 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) ormolu-0.5.3.0/data/examples/declaration/data/multiline-arg-parens.hs0000644000000000000000000000023507346545000023703 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) ormolu-0.5.3.0/data/examples/declaration/data/multiline-names-out.hs0000644000000000000000000000044707346545000023561 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.5.3.0/data/examples/declaration/data/multiline-names.hs0000644000000000000000000000044207346545000022747 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.5.3.0/data/examples/declaration/data/multiline-out.hs0000644000000000000000000000022407346545000022451 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = -- | One Foo | -- | Two Bar Int | -- | Three Baz deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/multiline.hs0000644000000000000000000000021107346545000021640 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = Foo -- ^ One | Bar Int -- ^ Two | Baz -- ^ Three deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/newtype-out.hs0000644000000000000000000000011707346545000022143 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/newtype.hs0000644000000000000000000000012007346545000021330 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/operators-out.hs0000644000000000000000000000057407346545000022475 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.5.3.0/data/examples/declaration/data/operators.hs0000644000000000000000000000057407346545000021670 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.5.3.0/data/examples/declaration/data/partly-documented-out.hs0000644000000000000000000000021007346545000024102 0ustar0000000000000000data Optimisation = PETransform | -- | partial eval and associated transforms GeneralisedNatHack deriving (Show, Eq, Generic) ormolu-0.5.3.0/data/examples/declaration/data/partly-documented.hs0000644000000000000000000000020007346545000023274 0ustar0000000000000000data Optimisation = PETransform | GeneralisedNatHack -- ^ partial eval and associated transforms deriving (Show, Eq, Generic) ormolu-0.5.3.0/data/examples/declaration/data/record-multi-const-out.hs0000644000000000000000000000036007346545000024202 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.5.3.0/data/examples/declaration/data/record-multi-const.hs0000644000000000000000000000026507346545000023401 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.5.3.0/data/examples/declaration/data/record-out.hs0000644000000000000000000000053707346545000021734 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.5.3.0/data/examples/declaration/data/record-singleline-out.hs0000644000000000000000000000014307346545000024054 0ustar0000000000000000module Main where -- | Something. data Foo = Foo {fooX :: Int, fooY :: Int} deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/record-singleline.hs0000644000000000000000000000014707346545000023253 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int , fooY :: Int } deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/record.hs0000644000000000000000000000050107346545000021116 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.5.3.0/data/examples/declaration/data/simple-broken-out.hs0000644000000000000000000000022607346545000023220 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.5.3.0/data/examples/declaration/data/simple-broken.hs0000644000000000000000000000023607346545000022414 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.5.3.0/data/examples/declaration/data/simple-out.hs0000644000000000000000000000014507346545000021742 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/simple.hs0000644000000000000000000000014607346545000021136 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) ormolu-0.5.3.0/data/examples/declaration/data/single-constructor-with-haddock-out.hs0000644000000000000000000000035507346545000026664 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.5.3.0/data/examples/declaration/data/single-constructor-with-haddock.hs0000644000000000000000000000034107346545000026052 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.5.3.0/data/examples/declaration/data/strictness-out.hs0000644000000000000000000000023107346545000022646 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 {a :: {-# UNPACK #-} Maybe Int && Bool} ormolu-0.5.3.0/data/examples/declaration/data/strictness.hs0000644000000000000000000000023407346545000022044 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 { a :: {-# UNPACK #-} Maybe Int && Bool } ormolu-0.5.3.0/data/examples/declaration/data/unnamed-field-comment-0-out.hs0000644000000000000000000000013607346545000024756 0ustar0000000000000000data Foo = -- | Bar Bar Field1 -- ^ Field 1 Field2 -- ^ Field 2 ormolu-0.5.3.0/data/examples/declaration/data/unnamed-field-comment-0.hs0000644000000000000000000000012207346545000024144 0ustar0000000000000000data Foo = -- | Bar Bar Field1 -- ^ Field 1 Field2 -- ^ Field 2 ormolu-0.5.3.0/data/examples/declaration/data/unnamed-field-comment-1-out.hs0000644000000000000000000000005507346545000024757 0ustar0000000000000000data X = B !Int -- ^ y C ormolu-0.5.3.0/data/examples/declaration/data/unnamed-field-comment-1.hs0000644000000000000000000000004507346545000024151 0ustar0000000000000000data X = B !Int -- ^ y C ormolu-0.5.3.0/data/examples/declaration/data/with-comment-out.hs0000644000000000000000000000004107346545000023057 0ustar0000000000000000data A = B -- C | -- D E ormolu-0.5.3.0/data/examples/declaration/data/with-comment.hs0000644000000000000000000000004607346545000022257 0ustar0000000000000000data A = B -- C -- D | E ormolu-0.5.3.0/data/examples/declaration/data/with-weird-haddock-out.hs0000644000000000000000000000013607346545000024127 0ustar0000000000000000data PlusLevel' t = -- | @n + ℓ@. Plus Integer (LevelAtom' t) deriving (Show, Data) ormolu-0.5.3.0/data/examples/declaration/data/with-weird-haddock.hs0000644000000000000000000000013107346545000023315 0ustar0000000000000000data PlusLevel' t = Plus Integer (LevelAtom' t) -- ^ @n + ℓ@. deriving (Show, Data) ormolu-0.5.3.0/data/examples/declaration/default/0000755000000000000000000000000007346545000020023 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/default/default-out.hs0000644000000000000000000000007707346545000022614 0ustar0000000000000000default (Int, Foo, Bar) default ( Int, Foo, Bar ) ormolu-0.5.3.0/data/examples/declaration/default/default.hs0000644000000000000000000000014507346545000022003 0ustar0000000000000000default ( Int , Foo , Bar ) default ( Int , Foo, Bar ) ormolu-0.5.3.0/data/examples/declaration/deriving/0000755000000000000000000000000007346545000020206 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/deriving/multiline-out.hs0000644000000000000000000000035007346545000023347 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.5.3.0/data/examples/declaration/deriving/multiline.hs0000644000000000000000000000041607346545000022545 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.5.3.0/data/examples/declaration/deriving/overlapping-out.hs0000644000000000000000000000033207346545000023673 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo ormolu-0.5.3.0/data/examples/declaration/deriving/overlapping.hs0000644000000000000000000000035007346545000023066 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo ormolu-0.5.3.0/data/examples/declaration/deriving/singleline-out.hs0000644000000000000000000000055107346545000023501 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.5.3.0/data/examples/declaration/deriving/singleline.hs0000644000000000000000000000054407346545000022676 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.5.3.0/data/examples/declaration/foreign/0000755000000000000000000000000007346545000020030 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/foreign/foreign-export-out.hs0000644000000000000000000000047107346545000024143 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.5.3.0/data/examples/declaration/foreign/foreign-export.hs0000644000000000000000000000046607346545000023342 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.5.3.0/data/examples/declaration/foreign/foreign-import-out.hs0000644000000000000000000000122607346545000024133 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.5.3.0/data/examples/declaration/foreign/foreign-import.hs0000644000000000000000000000121207346545000023321 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.5.3.0/data/examples/declaration/instance/0000755000000000000000000000000007346545000020203 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/instance/associated-data-out.hs0000644000000000000000000000042607346545000024374 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.5.3.0/data/examples/declaration/instance/associated-data.hs0000644000000000000000000000051307346545000023564 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.5.3.0/data/examples/declaration/instance/associated-types-out.hs0000644000000000000000000000027407346545000024630 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.5.3.0/data/examples/declaration/instance/associated-types.hs0000644000000000000000000000033107346545000024015 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.5.3.0/data/examples/declaration/instance/contexts-comments-out.hs0000644000000000000000000000030707346545000025036 0ustar0000000000000000instance ( Read a, -- Foo Read b, Read ( c, -- Bar d ) ) => Read ( a, -- Baz b, ( c, -- Quux d ) ) where readsPrec = undefined ormolu-0.5.3.0/data/examples/declaration/instance/contexts-comments.hs0000644000000000000000000000027007346545000024230 0ustar0000000000000000instance ( Read a, -- Foo Read b , Read ( c, -- Bar d ) ) => Read ( a, -- Baz b ,( c, -- Quux d ) ) where readsPrec = undefined ormolu-0.5.3.0/data/examples/declaration/instance/contexts-out.hs0000644000000000000000000000034507346545000023215 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.5.3.0/data/examples/declaration/instance/contexts.hs0000644000000000000000000000032607346545000022407 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.5.3.0/data/examples/declaration/instance/data-family-instances-gadt-out.hs0000644000000000000000000000030707346545000026436 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.5.3.0/data/examples/declaration/instance/data-family-instances-gadt.hs0000644000000000000000000000031607346545000025631 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.5.3.0/data/examples/declaration/instance/data-family-instances-newtype-out.hs0000644000000000000000000000021307346545000027206 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } ormolu-0.5.3.0/data/examples/declaration/instance/data-family-instances-newtype.hs0000644000000000000000000000021307346545000026401 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } ormolu-0.5.3.0/data/examples/declaration/instance/data-family-instances-out.hs0000644000000000000000000000043107346545000025517 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.5.3.0/data/examples/declaration/instance/data-family-instances.hs0000644000000000000000000000045407346545000024717 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.5.3.0/data/examples/declaration/instance/empty-instance-out.hs0000644000000000000000000000005407346545000024303 0ustar0000000000000000instance Typeable Int instance Generic Int ormolu-0.5.3.0/data/examples/declaration/instance/empty-instance.hs0000644000000000000000000000006107346545000023474 0ustar0000000000000000instance Typeable Int instance Generic Int where ormolu-0.5.3.0/data/examples/declaration/instance/instance-sigs-multiple-out.hs0000644000000000000000000000023107346545000025740 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [a] -> [a] -> [a] (<*>) _ _ = [] ormolu-0.5.3.0/data/examples/declaration/instance/instance-sigs-multiple.hs0000644000000000000000000000024207346545000025135 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [ a ] -> [ a ] -> [ a ] (<*>) _ _ = [] ormolu-0.5.3.0/data/examples/declaration/instance/instance-sigs-out.hs0000644000000000000000000000031607346545000024113 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT ormolu-0.5.3.0/data/examples/declaration/instance/instance-sigs.hs0000644000000000000000000000036107346545000023306 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT ormolu-0.5.3.0/data/examples/declaration/instance/multi-parameter-out.hs0000644000000000000000000000017207346545000024454 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put ormolu-0.5.3.0/data/examples/declaration/instance/multi-parameter.hs0000644000000000000000000000020207346545000023641 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put ormolu-0.5.3.0/data/examples/declaration/instance/newlines-after-where-out.hs0000644000000000000000000000011707346545000025376 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined ormolu-0.5.3.0/data/examples/declaration/instance/newlines-after-where.hs0000644000000000000000000000012107346545000024564 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined ormolu-0.5.3.0/data/examples/declaration/instance/newlines-between-methods-out.hs0000644000000000000000000000075507346545000026267 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.5.3.0/data/examples/declaration/instance/newlines-between-methods.hs0000644000000000000000000000075107346545000025456 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.5.3.0/data/examples/declaration/instance/overlappable-instances-out.hs0000644000000000000000000000040407346545000026003 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.5.3.0/data/examples/declaration/instance/overlappable-instances.hs0000644000000000000000000000042307346545000025177 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.5.3.0/data/examples/declaration/instance/single-parameter-out.hs0000644000000000000000000000023707346545000024605 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.5.3.0/data/examples/declaration/instance/single-parameter.hs0000644000000000000000000000025307346545000023776 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.5.3.0/data/examples/declaration/instance/type-family-instances-out.hs0000644000000000000000000000037707346545000025600 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.5.3.0/data/examples/declaration/instance/type-family-instances.hs0000644000000000000000000000041207346545000024761 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.5.3.0/data/examples/declaration/rewrite-rule/0000755000000000000000000000000007346545000021025 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/rewrite-rule/basic1-out.hs0000644000000000000000000000032207346545000023325 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.5.3.0/data/examples/declaration/rewrite-rule/basic1.hs0000644000000000000000000000030607346545000022522 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.5.3.0/data/examples/declaration/rewrite-rule/basic2-out.hs0000644000000000000000000000064207346545000023333 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.5.3.0/data/examples/declaration/rewrite-rule/basic2.hs0000644000000000000000000000065607346545000022533 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.5.3.0/data/examples/declaration/rewrite-rule/empty-out.hs0000644000000000000000000000002107346545000023315 0ustar0000000000000000{-# RULES #-} ormolu-0.5.3.0/data/examples/declaration/rewrite-rule/empty.hs0000644000000000000000000000002307346545000022512 0ustar0000000000000000{-# RULES #-} ormolu-0.5.3.0/data/examples/declaration/rewrite-rule/forall-0-out.hs0000644000000000000000000000022307346545000023577 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.5.3.0/data/examples/declaration/rewrite-rule/forall-0.hs0000644000000000000000000000022007346545000022767 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.5.3.0/data/examples/declaration/rewrite-rule/forall-1-out.hs0000644000000000000000000000061207346545000023602 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.5.3.0/data/examples/declaration/rewrite-rule/forall-1.hs0000644000000000000000000000060607346545000023000 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.5.3.0/data/examples/declaration/rewrite-rule/never-active-out.hs0000644000000000000000000000007607346545000024561 0ustar0000000000000000{-# RULES "map-loop" [~] forall f. map' f = map' (id . f) #-} ormolu-0.5.3.0/data/examples/declaration/rewrite-rule/never-active.hs0000644000000000000000000000010307346545000023743 0ustar0000000000000000{-# RULES "map-loop" [ ~ ] forall f . map' f = map' (id . f) #-} ormolu-0.5.3.0/data/examples/declaration/rewrite-rule/phase-out.hs0000644000000000000000000000043107346545000023264 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.5.3.0/data/examples/declaration/rewrite-rule/phase.hs0000644000000000000000000000040007346545000022453 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.5.3.0/data/examples/declaration/rewrite-rule/prelude1-out.hs0000644000000000000000000000074107346545000023711 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.5.3.0/data/examples/declaration/rewrite-rule/prelude1.hs0000644000000000000000000000102307346545000023076 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.5.3.0/data/examples/declaration/rewrite-rule/prelude2-out.hs0000644000000000000000000000221707346545000023712 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.5.3.0/data/examples/declaration/rewrite-rule/prelude2.hs0000644000000000000000000000237207346545000023107 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.5.3.0/data/examples/declaration/rewrite-rule/prelude3-out.hs0000644000000000000000000000054707346545000023717 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.5.3.0/data/examples/declaration/rewrite-rule/prelude3.hs0000644000000000000000000000054707346545000023112 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.5.3.0/data/examples/declaration/rewrite-rule/prelude4-out.hs0000644000000000000000000000060107346545000023707 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.5.3.0/data/examples/declaration/rewrite-rule/prelude4.hs0000644000000000000000000000063507346545000023111 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.5.3.0/data/examples/declaration/rewrite-rule/type-signature-out.hs0000644000000000000000000000040507346545000025145 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.5.3.0/data/examples/declaration/rewrite-rule/type-signature.hs0000644000000000000000000000041707346545000024343 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.5.3.0/data/examples/declaration/role-annotation/0000755000000000000000000000000007346545000021510 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/role-annotation/multi-line-out.hs0000644000000000000000000000016407346545000024731 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom ormolu-0.5.3.0/data/examples/declaration/role-annotation/multi-line.hs0000644000000000000000000000020007346545000024113 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom ormolu-0.5.3.0/data/examples/declaration/role-annotation/single-line-out.hs0000644000000000000000000000024107346545000025054 0ustar0000000000000000{-# LANGUAGE MagicHash #-} {-# LANGUAGE RoleAnnotations #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ ormolu-0.5.3.0/data/examples/declaration/role-annotation/single-line.hs0000644000000000000000000000024007346545000024246 0ustar0000000000000000{-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE MagicHash #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ ormolu-0.5.3.0/data/examples/declaration/signature/complete/0000755000000000000000000000000007346545000022210 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/complete/complete-out.hs0000644000000000000000000000014407346545000025160 0ustar0000000000000000{-# COMPLETE A, B, C :: Foo #-} {-# COMPLETE A, B #-} {-# COMPLETE A, B, C :: Foo #-} ormolu-0.5.3.0/data/examples/declaration/signature/complete/complete.hs0000644000000000000000000000023007346545000024347 0ustar0000000000000000{-# ComPlETe A , B, C:: Foo #-} {-# COMPLETE A , B #-} {-# ComPlETE A , B, C :: Foo#-} ormolu-0.5.3.0/data/examples/declaration/signature/fixity/0000755000000000000000000000000007346545000021714 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/fixity/infix-out.hs0000644000000000000000000000003307346545000024166 0ustar0000000000000000infix 0 infix 9 <^-^> ormolu-0.5.3.0/data/examples/declaration/signature/fixity/infix.hs0000644000000000000000000000003207346545000023360 0ustar0000000000000000infix 0 infix 9 <^-^> ormolu-0.5.3.0/data/examples/declaration/signature/fixity/infixl-out.hs0000644000000000000000000000004707346545000024347 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** ormolu-0.5.3.0/data/examples/declaration/signature/fixity/infixl.hs0000644000000000000000000000004607346545000023541 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** ormolu-0.5.3.0/data/examples/declaration/signature/fixity/infixr-out.hs0000644000000000000000000000004207346545000024350 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& ormolu-0.5.3.0/data/examples/declaration/signature/fixity/infixr.hs0000644000000000000000000000004107346545000023542 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& ormolu-0.5.3.0/data/examples/declaration/signature/inline/0000755000000000000000000000000007346545000021656 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/inline/conlike-out.hs0000644000000000000000000000013507346545000024442 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} ormolu-0.5.3.0/data/examples/declaration/signature/inline/conlike.hs0000644000000000000000000000013507346545000023635 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} ormolu-0.5.3.0/data/examples/declaration/signature/inline/inline-out.hs0000644000000000000000000000035107346545000024274 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.5.3.0/data/examples/declaration/signature/inline/inline.hs0000644000000000000000000000036507346545000023474 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.5.3.0/data/examples/declaration/signature/inline/inlineable-out.hs0000644000000000000000000000024107346545000025116 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.5.3.0/data/examples/declaration/signature/inline/inlineable.hs0000644000000000000000000000025407346545000024315 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.5.3.0/data/examples/declaration/signature/inline/noinline-out.hs0000644000000000000000000000031607346545000024632 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.5.3.0/data/examples/declaration/signature/inline/noinline.hs0000644000000000000000000000033007346545000024021 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.5.3.0/data/examples/declaration/signature/minimal/0000755000000000000000000000000007346545000022026 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/minimal/minimal-out.hs0000644000000000000000000000030207346545000024610 0ustar0000000000000000class Foo a where {-# MINIMAL (==) | ((/=), foo) #-} {-# MINIMAL a | ( b, c, d | e, f ) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool ormolu-0.5.3.0/data/examples/declaration/signature/minimal/minimal.hs0000644000000000000000000000027407346545000024013 0ustar0000000000000000class Foo a where {-# MINIMAL (==) |( (/=) , foo) #-} {-# MINIMAL a | (b , c , d | e , f) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool ormolu-0.5.3.0/data/examples/declaration/signature/pattern/0000755000000000000000000000000007346545000022055 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/pattern/multiline-out.hs0000644000000000000000000000036307346545000025222 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type pattern TypeSignature, FunctionBody, PatternSignature, WarningPragma :: [RdrName] -> HsDecl GhcPs ormolu-0.5.3.0/data/examples/declaration/signature/pattern/multiline.hs0000644000000000000000000000036607346545000024420 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type pattern TypeSignature , FunctionBody , PatternSignature , WarningPragma :: [RdrName] -> HsDecl GhcPs ormolu-0.5.3.0/data/examples/declaration/signature/pattern/single-line-out.hs0000644000000000000000000000016207346545000025423 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type ormolu-0.5.3.0/data/examples/declaration/signature/pattern/single-line.hs0000644000000000000000000000016207346545000024616 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type ormolu-0.5.3.0/data/examples/declaration/signature/set-cost-centre/0000755000000000000000000000000007346545000023417 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre-out.hs0000644000000000000000000000032207346545000027574 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.5.3.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre.hs0000644000000000000000000000032307346545000026770 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.5.3.0/data/examples/declaration/signature/specialize/0000755000000000000000000000000007346545000022530 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/specialize/specialize-instance-out.hs0000644000000000000000000000055707346545000027632 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.5.3.0/data/examples/declaration/signature/specialize/specialize-instance.hs0000644000000000000000000000056007346545000027017 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.5.3.0/data/examples/declaration/signature/specialize/specialize-out.hs0000644000000000000000000000076207346545000026026 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.5.3.0/data/examples/declaration/signature/specialize/specialize.hs0000644000000000000000000000100307346545000025206 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.5.3.0/data/examples/declaration/signature/0000755000000000000000000000000007346545000020400 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/standalone-kind-out.hs0000644000000000000000000000034607346545000024617 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.5.3.0/data/examples/declaration/signature/standalone-kind.hs0000644000000000000000000000036007346545000024006 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.5.3.0/data/examples/declaration/signature/type/0000755000000000000000000000000007346545000021361 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/signature/type/arguments-out.hs0000644000000000000000000000034607346545000024532 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.5.3.0/data/examples/declaration/signature/type/arguments.hs0000644000000000000000000000036107346545000023722 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.5.3.0/data/examples/declaration/signature/type/context-multi-line-out.hs0000644000000000000000000000013107346545000026256 0ustar0000000000000000functionName :: ( C1, C2, C3 ) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.5.3.0/data/examples/declaration/signature/type/context-multi-line.hs0000644000000000000000000000014007346545000025451 0ustar0000000000000000functionName :: ( C1 , C2 , C3 ) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.5.3.0/data/examples/declaration/signature/type/context-single-line-out.hs0000644000000000000000000000011507346545000026407 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.5.3.0/data/examples/declaration/signature/type/context-single-line.hs0000644000000000000000000000011507346545000025602 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) ormolu-0.5.3.0/data/examples/declaration/signature/type/infix-promoted-type-constructor-out.hs0000644000000000000000000000016407346545000031031 0ustar0000000000000000fun1 :: Def ('[Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[Ref s (Stored Uint32), IBool] ':-> IBool) ormolu-0.5.3.0/data/examples/declaration/signature/type/infix-promoted-type-constructor.hs0000644000000000000000000000016607346545000030226 0ustar0000000000000000fun1 :: Def ('[ Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[ Ref s (Stored Uint32), IBool] ':-> IBool) ormolu-0.5.3.0/data/examples/declaration/signature/type/long-function-name-out.hs0000644000000000000000000000007707346545000026226 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) ormolu-0.5.3.0/data/examples/declaration/signature/type/long-function-name.hs0000644000000000000000000000007707346545000025421 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) ormolu-0.5.3.0/data/examples/declaration/signature/type/long-multiline-applications-out.hs0000644000000000000000000000043007346545000030142 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.5.3.0/data/examples/declaration/signature/type/long-multiline-applications.hs0000644000000000000000000000045607346545000027345 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.5.3.0/data/examples/declaration/signature/type/multi-value-out.hs0000644000000000000000000000016007346545000024763 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.5.3.0/data/examples/declaration/signature/type/multi-value.hs0000644000000000000000000000015607346545000024163 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.5.3.0/data/examples/declaration/signature/type/unicode-out.hs0000644000000000000000000000013007346545000024142 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo :: forall a. (Show a) => a -> String foo = const () ormolu-0.5.3.0/data/examples/declaration/signature/type/unicode.hs0000644000000000000000000000012507346545000023341 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo ∷ ∀a. Show a ⇒ a → String foo = const () ormolu-0.5.3.0/data/examples/declaration/signature/type/unrelated-out.hs0000644000000000000000000000022307346545000024502 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz ormolu-0.5.3.0/data/examples/declaration/signature/type/unrelated.hs0000644000000000000000000000022307346545000023675 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz ormolu-0.5.3.0/data/examples/declaration/splice/0000755000000000000000000000000007346545000017656 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/splice/bracket-declaration-out.hs0000644000000000000000000000071307346545000024716 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.5.3.0/data/examples/declaration/splice/bracket-declaration.hs0000644000000000000000000000071207346545000024110 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.5.3.0/data/examples/declaration/splice/bracket-out.hs0000644000000000000000000000027007346545000022431 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t|Char|] foo = [|| foo bar ||] foo = [t| * |] foo = [t| a -> * -> a |] ormolu-0.5.3.0/data/examples/declaration/splice/bracket-unicode-out.hs0000644000000000000000000000014007346545000024051 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = [|x|] ormolu-0.5.3.0/data/examples/declaration/splice/bracket-unicode.hs0000644000000000000000000000014407346545000023250 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = ⟦x⟧ ormolu-0.5.3.0/data/examples/declaration/splice/bracket.hs0000644000000000000000000000026107346545000021624 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t| Char |] foo = [|| foo bar ||] foo = [t| * |] foo = [t|a -> * -> a|] ormolu-0.5.3.0/data/examples/declaration/splice/grouped-splices-out.hs0000644000000000000000000000020207346545000024116 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) ormolu-0.5.3.0/data/examples/declaration/splice/grouped-splices.hs0000644000000000000000000000020207346545000023311 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) ormolu-0.5.3.0/data/examples/declaration/splice/quasiquote-out.hs0000644000000000000000000000022107346545000023212 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] ormolu-0.5.3.0/data/examples/declaration/splice/quasiquote.hs0000644000000000000000000000021507346545000022410 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] ormolu-0.5.3.0/data/examples/declaration/splice/quotes-out.hs0000644000000000000000000000022707346545000022340 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option ormolu-0.5.3.0/data/examples/declaration/splice/quotes.hs0000644000000000000000000000022707346545000021533 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option ormolu-0.5.3.0/data/examples/declaration/splice/splice-decl-out.hs0000644000000000000000000000023107346545000023177 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(foo bar) $foo $$(foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] ormolu-0.5.3.0/data/examples/declaration/splice/splice-decl.hs0000644000000000000000000000025107346545000022374 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $( foo bar) $foo $$( foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] ormolu-0.5.3.0/data/examples/declaration/splice/typed-splice-out.hs0000644000000000000000000000010507346545000023415 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$( foo bar ) x = $$foo ormolu-0.5.3.0/data/examples/declaration/splice/typed-splice.hs0000644000000000000000000000012507346545000022612 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$( foo bar ) x = $$foo ormolu-0.5.3.0/data/examples/declaration/splice/untyped-splice-out.hs0000644000000000000000000000013107346545000023757 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $(foo bar) x = $( foo bar ) x = $foo ormolu-0.5.3.0/data/examples/declaration/splice/untyped-splice.hs0000644000000000000000000000016107346545000023155 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $( foo bar ) x = $( foo bar ) x = $foo ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/0000755000000000000000000000000007346545000024656 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/infix-out.hs0000644000000000000000000000051307346545000027133 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.5.3.0/data/examples/declaration/type-families/closed-type-family/infix.hs0000644000000000000000000000051307346545000026326 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.5.3.0/data/examples/declaration/type-families/closed-type-family/injective-out.hs0000644000000000000000000000020107346545000027770 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.5.3.0/data/examples/declaration/type-families/closed-type-family/injective.hs0000644000000000000000000000020007346545000027162 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.5.3.0/data/examples/declaration/type-families/closed-type-family/multi-line-out.hs0000644000000000000000000000046207346545000030100 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.5.3.0/data/examples/declaration/type-families/closed-type-family/multi-line.hs0000644000000000000000000000044707346545000027276 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.5.3.0/data/examples/declaration/type-families/closed-type-family/no-annotation-out.hs0000644000000000000000000000010607346545000030600 0ustar0000000000000000type family F a where F Int = Double F Bool = Char F a = String ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/no-annotation.hs0000644000000000000000000000011207346545000027770 0ustar0000000000000000type family F a where F Int = Double F Bool = Char F a = String ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/simple-out.hs0000644000000000000000000000016707346545000027314 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/simple.hs0000644000000000000000000000017407346545000026505 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/type-arguments-out.hs0000644000000000000000000000020007346545000030773 0ustar0000000000000000type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/type-arguments.hs0000644000000000000000000000020007346545000030166 0ustar0000000000000000type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/with-comments-out.hs0000644000000000000000000000022107346545000030610 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.5.3.0/data/examples/declaration/type-families/closed-type-family/with-comments.hs0000644000000000000000000000022307346545000030005 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.5.3.0/data/examples/declaration/type-families/closed-type-family/with-equal-sign-out.hs0000644000000000000000000000006107346545000031032 0ustar0000000000000000type family TF a b = result where TF a b = Int ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/with-equal-sign.hs0000644000000000000000000000006107346545000030225 0ustar0000000000000000type family TF a b = result where TF a b = Int ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/with-forall-out.hs0000644000000000000000000000013207346545000030243 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool ormolu-0.5.3.0/data/examples/declaration/type-families/closed-type-family/with-forall.hs0000644000000000000000000000013207346545000027436 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/0000755000000000000000000000000007346545000023337 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/no-annotation-out.hs0000644000000000000000000000007307346545000027264 0ustar0000000000000000module Main where -- | Documentation. data family Array e ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/no-annotation.hs0000644000000000000000000000007407346545000026460 0ustar0000000000000000module Main where -- | Documentation. data family Array e ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/simple-out.hs0000644000000000000000000000011207346545000025763 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/simple.hs0000644000000000000000000000011307346545000025157 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/type-arguments-out.hs0000644000000000000000000000017707346545000027471 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M ormolu-0.5.3.0/data/examples/declaration/type-families/data-family/type-arguments.hs0000644000000000000000000000017707346545000026664 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/0000755000000000000000000000000007346545000023407 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/injective-out.hs0000644000000000000000000000010407346545000026523 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/injective.hs0000644000000000000000000000010307346545000025715 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/no-annotation-out.hs0000644000000000000000000000011107346545000027325 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/no-annotation.hs0000644000000000000000000000011207346545000026521 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/operator-out.hs0000644000000000000000000000004507346545000026402 0ustar0000000000000000type family a ! b type family a . b ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/operator.hs0000644000000000000000000000004407346545000025574 0ustar0000000000000000type family a ! b type family a . b ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/simple-out.hs0000644000000000000000000000010207346545000026032 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type ormolu-0.5.3.0/data/examples/declaration/type-families/type-family/simple.hs0000644000000000000000000000010307346545000025226 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type ormolu-0.5.3.0/data/examples/declaration/type-synonyms/0000755000000000000000000000000007346545000021255 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/type-synonyms/multi-line-out.hs0000644000000000000000000000037107346545000024476 0ustar0000000000000000type 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.5.3.0/data/examples/declaration/type-synonyms/multi-line.hs0000644000000000000000000000037307346545000023673 0ustar0000000000000000type 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.5.3.0/data/examples/declaration/type-synonyms/simple-out.hs0000644000000000000000000000017607346545000023713 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.5.3.0/data/examples/declaration/type-synonyms/simple.hs0000644000000000000000000000017707346545000023107 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.5.3.0/data/examples/declaration/type-synonyms/with-weird-haddock-out.hs0000644000000000000000000000010107346545000026064 0ustar0000000000000000type Elims = -- | eliminations ordered left-to-right. [Elim] ormolu-0.5.3.0/data/examples/declaration/type-synonyms/with-weird-haddock.hs0000644000000000000000000000007607346545000025272 0ustar0000000000000000type Elims = [Elim] -- ^ eliminations ordered left-to-right. ormolu-0.5.3.0/data/examples/declaration/type/0000755000000000000000000000000007346545000017360 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/type/forall-out.hs0000644000000000000000000000011707346545000021777 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a ormolu-0.5.3.0/data/examples/declaration/type/forall.hs0000644000000000000000000000012007346545000021164 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a ormolu-0.5.3.0/data/examples/declaration/type/lits-out.hs0000644000000000000000000000006107346545000021471 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () ormolu-0.5.3.0/data/examples/declaration/type/lits.hs0000644000000000000000000000006407346545000020667 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () ormolu-0.5.3.0/data/examples/declaration/type/misc-kind-signatures-out.hs0000644000000000000000000000037107346545000024562 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.5.3.0/data/examples/declaration/type/misc-kind-signatures.hs0000644000000000000000000000037207346545000023756 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.5.3.0/data/examples/declaration/type/promotion-0-out.hs0000644000000000000000000000027007346545000022703 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.5.3.0/data/examples/declaration/type/promotion-0.hs0000644000000000000000000000027107346545000022077 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.5.3.0/data/examples/declaration/type/promotion-1-out.hs0000644000000000000000000000045507346545000022711 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` () ormolu-0.5.3.0/data/examples/declaration/type/promotion-1.hs0000644000000000000000000000046407346545000022104 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` () ormolu-0.5.3.0/data/examples/declaration/type/splice-out.hs0000644000000000000000000000007507346545000022002 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $(bar [t|Int|]) ormolu-0.5.3.0/data/examples/declaration/type/splice.hs0000644000000000000000000000011207346545000021165 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $( bar [t|Int|] ) ormolu-0.5.3.0/data/examples/declaration/type/type-applications-out.hs0000644000000000000000000000011607346545000024164 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False ormolu-0.5.3.0/data/examples/declaration/type/type-applications.hs0000644000000000000000000000011607346545000023357 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False ormolu-0.5.3.0/data/examples/declaration/type/visible-forall-out.hs0000644000000000000000000000020607346545000023431 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type ormolu-0.5.3.0/data/examples/declaration/type/visible-forall.hs0000644000000000000000000000020607346545000022624 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type ormolu-0.5.3.0/data/examples/declaration/value/function/0000755000000000000000000000000007346545000021340 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/application-0-out.hs0000644000000000000000000000014507346545000025141 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 ormolu-0.5.3.0/data/examples/declaration/value/function/application-0.hs0000644000000000000000000000011707346545000024333 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 ormolu-0.5.3.0/data/examples/declaration/value/function/application-1-out.hs0000644000000000000000000000020407346545000025136 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.5.3.0/data/examples/declaration/value/function/application-1.hs0000644000000000000000000000016207346545000024334 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.5.3.0/data/examples/declaration/value/function/application-2-out.hs0000644000000000000000000000046207346545000025145 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.5.3.0/data/examples/declaration/value/function/application-2.hs0000644000000000000000000000044307346545000024337 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.5.3.0/data/examples/declaration/value/function/arg-breakpoints-out.hs0000644000000000000000000000002507346545000025566 0ustar0000000000000000foo bar = body ormolu-0.5.3.0/data/examples/declaration/value/function/arg-breakpoints.hs0000644000000000000000000000002507346545000024761 0ustar0000000000000000foo bar = body ormolu-0.5.3.0/data/examples/declaration/value/function/arithmetic-sequences-out.hs0000644000000000000000000000032707346545000026625 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.5.3.0/data/examples/declaration/value/function/arithmetic-sequences.hs0000644000000000000000000000031307346545000026013 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.5.3.0/data/examples/declaration/value/function/arrow/0000755000000000000000000000000007346545000022472 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/multiline-case-out.hs0000644000000000000000000000014207346545000026543 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/multiline-case.hs0000644000000000000000000000013007346545000025733 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-applications-out.hs0000644000000000000000000000044007346545000027260 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.5.3.0/data/examples/declaration/value/function/arrow/proc-applications.hs0000644000000000000000000000043107346545000026453 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.5.3.0/data/examples/declaration/value/function/arrow/proc-applications2-out.hs0000644000000000000000000000035307346545000027345 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.5.3.0/data/examples/declaration/value/function/arrow/proc-applications2.hs0000644000000000000000000000035307346545000026540 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.5.3.0/data/examples/declaration/value/function/arrow/proc-cases-out.hs0000644000000000000000000000054207346545000025673 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.5.3.0/data/examples/declaration/value/function/arrow/proc-cases.hs0000644000000000000000000000065607346545000025074 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.5.3.0/data/examples/declaration/value/function/arrow/proc-do-complex-out.hs0000644000000000000000000000311507346545000026643 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.5.3.0/data/examples/declaration/value/function/arrow/proc-do-complex.hs0000644000000000000000000000271007346545000026036 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.5.3.0/data/examples/declaration/value/function/arrow/proc-do-simple1-out.hs0000644000000000000000000000034707346545000026552 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 ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-do-simple1.hs0000644000000000000000000000037207346545000025743 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 ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-do-simple2-out.hs0000644000000000000000000000045007346545000026546 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.5.3.0/data/examples/declaration/value/function/arrow/proc-do-simple2.hs0000644000000000000000000000050107346545000025736 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.5.3.0/data/examples/declaration/value/function/arrow/proc-form-do-indent-out.hs0000644000000000000000000000023707346545000027420 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-form-do-indent.hs0000644000000000000000000000023707346545000026613 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-forms1-out.hs0000644000000000000000000000050407346545000026002 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.5.3.0/data/examples/declaration/value/function/arrow/proc-forms1.hs0000644000000000000000000000044607346545000025202 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.5.3.0/data/examples/declaration/value/function/arrow/proc-forms2-out.hs0000644000000000000000000000150307346545000026003 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.5.3.0/data/examples/declaration/value/function/arrow/proc-forms2.hs0000644000000000000000000000154007346545000025177 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.5.3.0/data/examples/declaration/value/function/arrow/proc-ifs-out.hs0000644000000000000000000000030207346545000025350 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.5.3.0/data/examples/declaration/value/function/arrow/proc-ifs.hs0000644000000000000000000000027607346545000024555 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.5.3.0/data/examples/declaration/value/function/arrow/proc-lambdas-out.hs0000644000000000000000000000026107346545000026176 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.5.3.0/data/examples/declaration/value/function/arrow/proc-lambdas.hs0000644000000000000000000000026307346545000025373 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo = proc a-> \f b->a- \f g h -> \() -> \( Left (x,y )) -> -- Tuple value f (g (h x)) -< y ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-lets-out.hs0000644000000000000000000000025507346545000025545 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.5.3.0/data/examples/declaration/value/function/arrow/proc-lets.hs0000644000000000000000000000027407346545000024741 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.5.3.0/data/examples/declaration/value/function/arrow/proc-parentheses-out.hs0000644000000000000000000000040407346545000027113 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> (f -< a) bar f g = proc a -> ( ( (f) ( g ) ) -< ( ( ( ( ( ( g a ) ) ) ) ) ) ) ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/proc-parentheses.hs0000644000000000000000000000024207346545000026306 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> ( f -< a ) bar f g = proc a -> ( ((f) ( g )) -< ((((( (g a) ))))) ) ormolu-0.5.3.0/data/examples/declaration/value/function/arrow/recursive-procs-out.hs0000644000000000000000000000043507346545000026770 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.5.3.0/data/examples/declaration/value/function/arrow/recursive-procs.hs0000644000000000000000000000033107346545000026156 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.5.3.0/data/examples/declaration/value/function/awkward-comment-0-out.hs0000644000000000000000000000035307346545000025737 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.5.3.0/data/examples/declaration/value/function/awkward-comment-0.hs0000644000000000000000000000037007346545000025131 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.5.3.0/data/examples/declaration/value/function/awkward-comment-1-out.hs0000644000000000000000000000041707346545000025741 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.5.3.0/data/examples/declaration/value/function/awkward-comment-1.hs0000644000000000000000000000041207346545000025127 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.5.3.0/data/examples/declaration/value/function/backticks-lhs-out.hs0000644000000000000000000000015507346545000025224 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True ormolu-0.5.3.0/data/examples/declaration/value/function/backticks-lhs.hs0000644000000000000000000000021607346545000024415 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True ormolu-0.5.3.0/data/examples/declaration/value/function/backticks-out.hs0000644000000000000000000000002407346545000024433 0ustar0000000000000000foo x y = x `bar` y ormolu-0.5.3.0/data/examples/declaration/value/function/backticks.hs0000644000000000000000000000002407346545000023626 0ustar0000000000000000foo x y = x `bar` y ormolu-0.5.3.0/data/examples/declaration/value/function/blank-lines-let-out.hs0000644000000000000000000000007607346545000025465 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z ormolu-0.5.3.0/data/examples/declaration/value/function/blank-lines-let.hs0000644000000000000000000000007707346545000024661 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z ormolu-0.5.3.0/data/examples/declaration/value/function/blank-lines-where-out.hs0000644000000000000000000000007207346545000026007 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 ormolu-0.5.3.0/data/examples/declaration/value/function/blank-lines-where.hs0000644000000000000000000000007307346545000025203 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 ormolu-0.5.3.0/data/examples/declaration/value/function/block-arguments-out.hs0000644000000000000000000000052507346545000025600 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.5.3.0/data/examples/declaration/value/function/block-arguments.hs0000644000000000000000000000054107346545000024771 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.5.3.0/data/examples/declaration/value/function/builtin-syntax-out.hs0000644000000000000000000000001607346545000025470 0ustar0000000000000000x = return () ormolu-0.5.3.0/data/examples/declaration/value/function/builtin-syntax.hs0000644000000000000000000000001607346545000024663 0ustar0000000000000000x = return () ormolu-0.5.3.0/data/examples/declaration/value/function/case-empty-out.hs0000644000000000000000000000015307346545000024547 0ustar0000000000000000absurd x = case x of {} absurd = \case {} absurd x = case x of {} absurd = \case {} foo = case () of {} 1 ormolu-0.5.3.0/data/examples/declaration/value/function/case-empty.hs0000644000000000000000000000014507346545000023743 0ustar0000000000000000absurd x = case x of absurd = \case absurd x = case x of {} absurd = \case {} foo = case () of {} 1 ormolu-0.5.3.0/data/examples/declaration/value/function/case-multi-line-guards-out.hs0000644000000000000000000000040307346545000026751 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.5.3.0/data/examples/declaration/value/function/case-multi-line-guards.hs0000644000000000000000000000040107346545000026142 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.5.3.0/data/examples/declaration/value/function/case-multi-line-out.hs0000644000000000000000000000050307346545000025467 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.5.3.0/data/examples/declaration/value/function/case-multi-line.hs0000644000000000000000000000050407346545000024663 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.5.3.0/data/examples/declaration/value/function/case-single-line-out.hs0000644000000000000000000000025407346545000025621 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.5.3.0/data/examples/declaration/value/function/case-single-line.hs0000644000000000000000000000025407346545000025014 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.5.3.0/data/examples/declaration/value/function/complex-list-out.hs0000644000000000000000000000027307346545000025123 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something, \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar, baz qux ] ormolu-0.5.3.0/data/examples/declaration/value/function/complex-list.hs0000644000000000000000000000027107346545000024314 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something , \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar , baz qux ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/0000755000000000000000000000000007346545000024211 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-monad-out.hs0000644000000000000000000000045407346545000030464 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.5.3.0/data/examples/declaration/value/function/comprehension/transform-monad.hs0000644000000000000000000000036207346545000027655 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.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line1-out.hs0000644000000000000000000000026007346545000031521 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo' xs ys = [ ( x, y ) | x <- xs, y <- ys, then -- First comment reverse -- Second comment ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line1.hs0000644000000000000000000000022107346545000030711 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo' xs ys = [ (x, y) | x <- xs, y <- ys, then -- First comment reverse -- Second comment ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line2-out.hs0000644000000000000000000000034007346545000031521 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} bar' xs ys = [ ( x, y ) | x <- xs, y <- ys, then -- First comment sortWith by ( x + y -- Second comment ) ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line2.hs0000644000000000000000000000025407346545000030720 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} bar' xs ys = [ (x, y) | x <- xs, y <- ys, then -- First comment sortWith by (x + y) -- Second comment ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line3-out.hs0000644000000000000000000000030107346545000031517 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} baz' xs ys = [ ( x, y ) | x <- xs, y <- ys, then group using -- First comment permutations -- Second comment ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line3.hs0000644000000000000000000000024707346545000030723 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} baz' xs ys = [ (x, y) | x <- xs, y <- ys, then group using -- First comment permutations -- Second comment ] ormolu-0.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line4-out.hs0000644000000000000000000000040707346545000031527 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.5.3.0/data/examples/declaration/value/function/comprehension/transform-multi-line4.hs0000644000000000000000000000031507346545000030720 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.5.3.0/data/examples/declaration/value/function/comprehension/transform-single-line-out.hs0000644000000000000000000000046607346545000031577 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.5.3.0/data/examples/declaration/value/function/comprehension/transform-single-line.hs0000644000000000000000000000046607346545000030772 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.5.3.0/data/examples/declaration/value/function/do-single-multi-out.hs0000644000000000000000000000004107346545000025505 0ustar0000000000000000foo = do ( bar baz ) ormolu-0.5.3.0/data/examples/declaration/value/function/do-single-multi.hs0000644000000000000000000000003507346545000024703 0ustar0000000000000000foo = do (bar baz) ormolu-0.5.3.0/data/examples/declaration/value/function/do-where-out.hs0000644000000000000000000000006307346545000024212 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 ormolu-0.5.3.0/data/examples/declaration/value/function/do-where.hs0000644000000000000000000000006307346545000023405 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 ormolu-0.5.3.0/data/examples/declaration/value/function/do/0000755000000000000000000000000007346545000021742 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/do/applications-and-parens-out.hs0000644000000000000000000000034407346545000027620 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.5.3.0/data/examples/declaration/value/function/do/applications-and-parens.hs0000644000000000000000000000033207346545000027010 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.5.3.0/data/examples/declaration/value/function/do/blocks-out.hs0000644000000000000000000000042707346545000024363 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.5.3.0/data/examples/declaration/value/function/do/blocks.hs0000644000000000000000000000051607346545000023555 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.5.3.0/data/examples/declaration/value/function/do/comment-alignment-out.hs0000644000000000000000000000022107346545000026514 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux ormolu-0.5.3.0/data/examples/declaration/value/function/do/comment-alignment.hs0000644000000000000000000000022107346545000025707 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux ormolu-0.5.3.0/data/examples/declaration/value/function/do/comment-spacing-out.hs0000644000000000000000000000005707346545000026171 0ustar0000000000000000foo = do bar -- foo baz -- foo quux ormolu-0.5.3.0/data/examples/declaration/value/function/do/comment-spacing.hs0000644000000000000000000000005707346545000025364 0ustar0000000000000000foo = do bar -- foo baz -- foo quux ormolu-0.5.3.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain-out.hs0000644000000000000000000000032007346545000027137 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.5.3.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain.hs0000644000000000000000000000032007346545000026332 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.5.3.0/data/examples/declaration/value/function/do/expr-out.hs0000644000000000000000000000016107346545000024057 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz ormolu-0.5.3.0/data/examples/declaration/value/function/do/expr.hs0000644000000000000000000000015507346545000023255 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz ormolu-0.5.3.0/data/examples/declaration/value/function/do/hang-rhs-arrow-out.hs0000644000000000000000000000027307346545000025744 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.5.3.0/data/examples/declaration/value/function/do/hang-rhs-arrow.hs0000644000000000000000000000027307346545000025137 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.5.3.0/data/examples/declaration/value/function/do/let-out.hs0000644000000000000000000000041207346545000023664 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.5.3.0/data/examples/declaration/value/function/do/let.hs0000644000000000000000000000042007346545000023056 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.5.3.0/data/examples/declaration/value/function/do/operator-and-parens-out.hs0000644000000000000000000000037507346545000026771 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.5.3.0/data/examples/declaration/value/function/do/operator-and-parens.hs0000644000000000000000000000037507346545000026164 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.5.3.0/data/examples/declaration/value/function/do/recursive-do-mdo-out.hs0000644000000000000000000000020507346545000026264 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) ormolu-0.5.3.0/data/examples/declaration/value/function/do/recursive-do-mdo.hs0000644000000000000000000000016107346545000025460 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) ormolu-0.5.3.0/data/examples/declaration/value/function/do/recursive-do-rec-out.hs0000644000000000000000000000033407346545000026261 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.5.3.0/data/examples/declaration/value/function/do/recursive-do-rec.hs0000644000000000000000000000034007346545000025451 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.5.3.0/data/examples/declaration/value/function/equality-constraints-out.hs0000644000000000000000000000006007346545000026677 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined ormolu-0.5.3.0/data/examples/declaration/value/function/equality-constraints.hs0000644000000000000000000000006007346545000026072 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined ormolu-0.5.3.0/data/examples/declaration/value/function/explicit-type-out.hs0000644000000000000000000000004507346545000025300 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int ormolu-0.5.3.0/data/examples/declaration/value/function/explicit-type.hs0000644000000000000000000000004107346545000024467 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int ormolu-0.5.3.0/data/examples/declaration/value/function/fancy-forall-0-out.hs0000644000000000000000000000043307346545000025213 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.5.3.0/data/examples/declaration/value/function/fancy-forall-0.hs0000644000000000000000000000041307346545000024404 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.5.3.0/data/examples/declaration/value/function/fancy-forall-1-out.hs0000644000000000000000000000043507346545000025216 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.5.3.0/data/examples/declaration/value/function/fancy-forall-1.hs0000644000000000000000000000041507346545000024407 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.5.3.0/data/examples/declaration/value/function/guards-out.hs0000644000000000000000000000032207346545000023763 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.5.3.0/data/examples/declaration/value/function/guards.hs0000644000000000000000000000032207346545000023156 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.5.3.0/data/examples/declaration/value/function/if-multi-line-out.hs0000644000000000000000000000042707346545000025157 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.5.3.0/data/examples/declaration/value/function/if-multi-line.hs0000644000000000000000000000042007346545000024343 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.5.3.0/data/examples/declaration/value/function/if-single-line-out.hs0000644000000000000000000000015107346545000025300 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.5.3.0/data/examples/declaration/value/function/if-single-line.hs0000644000000000000000000000015107346545000024473 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.5.3.0/data/examples/declaration/value/function/if-with-comment-out.hs0000644000000000000000000000015707346545000025513 0ustar0000000000000000foo = if undefined then -- then comment undefined else -- else comment do undefined ormolu-0.5.3.0/data/examples/declaration/value/function/if-with-comment.hs0000644000000000000000000000016407346545000024704 0ustar0000000000000000foo = if undefined -- then comment then undefined -- else comment else do undefined ormolu-0.5.3.0/data/examples/declaration/value/function/implicit-params-out.hs0000644000000000000000000000037707346545000025603 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.5.3.0/data/examples/declaration/value/function/implicit-params.hs0000644000000000000000000000041007346545000024762 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.5.3.0/data/examples/declaration/value/function/infix/0000755000000000000000000000000007346545000022455 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/infix/applicative-out.hs0000644000000000000000000000005707346545000026121 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' ormolu-0.5.3.0/data/examples/declaration/value/function/infix/applicative.hs0000644000000000000000000000005707346545000025314 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' ormolu-0.5.3.0/data/examples/declaration/value/function/infix/comments-out.hs0000644000000000000000000000010107346545000025433 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar ormolu-0.5.3.0/data/examples/declaration/value/function/infix/comments.hs0000644000000000000000000000010107346545000024626 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar ormolu-0.5.3.0/data/examples/declaration/value/function/infix/do-out.hs0000644000000000000000000000022507346545000024217 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/do.hs0000644000000000000000000000022607346545000023413 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-1-out.hs0000644000000000000000000000054207346545000026475 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.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-1.hs0000644000000000000000000000053607346545000025673 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.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-2-out.hs0000644000000000000000000000022607346545000026475 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-2.hs0000644000000000000000000000023007346545000025663 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-3-out.hs0000644000000000000000000000014607346545000026477 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-3.hs0000644000000000000000000000012607346545000025670 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-4-out.hs0000644000000000000000000000006507346545000026500 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-4.hs0000644000000000000000000000005507346545000025672 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-5-out.hs0000644000000000000000000000015307346545000026477 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-5.hs0000644000000000000000000000014307346545000025671 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-6-out.hs0000644000000000000000000000016307346545000026501 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c ormolu-0.5.3.0/data/examples/declaration/value/function/infix/dollar-chains-6.hs0000644000000000000000000000015307346545000025673 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c ormolu-0.5.3.0/data/examples/declaration/value/function/infix/hanging-out.hs0000644000000000000000000000032107346545000025225 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.5.3.0/data/examples/declaration/value/function/infix/hanging.hs0000644000000000000000000000031507346545000024423 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.5.3.0/data/examples/declaration/value/function/infix/lenses-out.hs0000644000000000000000000000077507346545000025120 0ustar0000000000000000lenses = 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.5.3.0/data/examples/declaration/value/function/infix/lenses.hs0000644000000000000000000000075407346545000024310 0ustar0000000000000000lenses = 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-colon-do-out.hs0000644000000000000000000000014207346545000027021 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-colon-do.hs0000644000000000000000000000012607346545000026216 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-eq-out.hs0000644000000000000000000000016607346545000026153 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-eq.hs0000644000000000000000000000015007346545000025337 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-gt-out.hs0000644000000000000000000000017407346545000026157 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-gt.hs0000644000000000000000000000015007346545000025344 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-lt-out.hs0000644000000000000000000000016707346545000026166 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-lt.hs0000644000000000000000000000014707346545000025357 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-s-out.hs0000644000000000000000000000011007346545000025775 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-l-s.hs0000644000000000000000000000010207346545000025171 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1-out.hs0000644000000000000000000000020007346545000027414 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1.hs0000644000000000000000000000016207346545000026616 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2-out.hs0000644000000000000000000000020507346545000027422 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2.hs0000644000000000000000000000016707346545000026624 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1-out.hs0000644000000000000000000000025507346545000027571 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1.hs0000644000000000000000000000016507346545000026764 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2-out.hs0000644000000000000000000000030107346545000027562 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2.hs0000644000000000000000000000021107346545000026755 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal-out.hs0000644000000000000000000000021207346545000027437 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal.hs0000644000000000000000000000017407346545000026641 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1-out.hs0000644000000000000000000000021007346545000027422 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1.hs0000644000000000000000000000016407346545000026625 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2-out.hs0000644000000000000000000000021207346545000027425 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2.hs0000644000000000000000000000016607346545000026630 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar-out.hs0000644000000000000000000000021207346545000027431 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar.hs0000644000000000000000000000016607346545000026634 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal-out.hs0000644000000000000000000000022007346545000027443 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal.hs0000644000000000000000000000017407346545000026646 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1-out.hs0000644000000000000000000000020107346545000027427 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1.hs0000644000000000000000000000016107346545000026627 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2-out.hs0000644000000000000000000000020607346545000027435 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2.hs0000644000000000000000000000016607346545000026635 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar-out.hs0000644000000000000000000000020107346545000027434 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar.hs0000644000000000000000000000016107346545000026634 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal-out.hs0000644000000000000000000000021407346545000027453 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal.hs0000644000000000000000000000017407346545000026653 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.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon-out.hs0000644000000000000000000000012107346545000027115 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon.hs0000644000000000000000000000011307346545000026311 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar-out.hs0000644000000000000000000000012707346545000027266 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar.hs0000644000000000000000000000011307346545000026454 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal-out.hs0000644000000000000000000000013107346545000027274 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal.hs0000644000000000000000000000012307346545000026470 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 ormolu-0.5.3.0/data/examples/declaration/value/function/infix/qualified-ops-out.hs0000644000000000000000000000037707346545000026367 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.5.3.0/data/examples/declaration/value/function/infix/qualified-ops.hs0000644000000000000000000000035007346545000025551 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.5.3.0/data/examples/declaration/value/function/infix/simple-out.hs0000644000000000000000000000026407346545000025111 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.5.3.0/data/examples/declaration/value/function/infix/simple.hs0000644000000000000000000000026407346545000024304 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.5.3.0/data/examples/declaration/value/function/infix/tricky-colon-chain-out.hs0000644000000000000000000000011007346545000027303 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] ormolu-0.5.3.0/data/examples/declaration/value/function/infix/tricky-colon-chain.hs0000644000000000000000000000012207346545000026501 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] ormolu-0.5.3.0/data/examples/declaration/value/function/infix/unicode-out.hs0000644000000000000000000000006307346545000025243 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) ormolu-0.5.3.0/data/examples/declaration/value/function/infix/unicode.hs0000644000000000000000000000006307346545000024436 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) ormolu-0.5.3.0/data/examples/declaration/value/function/lambda-case-out.hs0000644000000000000000000000051607346545000024634 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 ormolu-0.5.3.0/data/examples/declaration/value/function/lambda-case.hs0000644000000000000000000000053407346545000024027 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 ormolu-0.5.3.0/data/examples/declaration/value/function/lambda-multi-line1-out.hs0000644000000000000000000000040607346545000026057 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.5.3.0/data/examples/declaration/value/function/lambda-multi-line1.hs0000644000000000000000000000037507346545000025257 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.5.3.0/data/examples/declaration/value/function/lambda-multi-line2-out.hs0000644000000000000000000000046107346545000026061 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.5.3.0/data/examples/declaration/value/function/lambda-multi-line2.hs0000644000000000000000000000045307346545000025255 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.5.3.0/data/examples/declaration/value/function/lambda-single-line-out.hs0000644000000000000000000000037507346545000026132 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.5.3.0/data/examples/declaration/value/function/lambda-single-line.hs0000644000000000000000000000037707346545000025327 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.5.3.0/data/examples/declaration/value/function/let-multi-line-out.hs0000644000000000000000000000061507346545000025344 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.5.3.0/data/examples/declaration/value/function/let-multi-line.hs0000644000000000000000000000060607346545000024537 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.5.3.0/data/examples/declaration/value/function/let-nested-out.hs0000644000000000000000000000004607346545000024545 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] ormolu-0.5.3.0/data/examples/declaration/value/function/let-nested.hs0000644000000000000000000000004607346545000023740 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] ormolu-0.5.3.0/data/examples/declaration/value/function/let-single-line-out.hs0000644000000000000000000000046307346545000025474 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.5.3.0/data/examples/declaration/value/function/let-single-line.hs0000644000000000000000000000046607346545000024672 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.5.3.0/data/examples/declaration/value/function/lexical-negation-out.hs0000644000000000000000000000015307346545000025723 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y ormolu-0.5.3.0/data/examples/declaration/value/function/lexical-negation.hs0000644000000000000000000000015307346545000025116 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y ormolu-0.5.3.0/data/examples/declaration/value/function/list-comprehensions-out.hs0000644000000000000000000000063007346545000026505 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.5.3.0/data/examples/declaration/value/function/list-comprehensions.hs0000644000000000000000000000055107346545000025702 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.5.3.0/data/examples/declaration/value/function/list-notation-0-out.hs0000644000000000000000000000014207346545000025437 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] ormolu-0.5.3.0/data/examples/declaration/value/function/list-notation-0.hs0000644000000000000000000000013407346545000024633 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] ormolu-0.5.3.0/data/examples/declaration/value/function/list-notation-1-out.hs0000644000000000000000000000044707346545000025450 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l] ormolu-0.5.3.0/data/examples/declaration/value/function/list-notation-1.hs0000644000000000000000000000045507346545000024642 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> [ "GlobalSecondaryIndexUpdates" .= l ] ormolu-0.5.3.0/data/examples/declaration/value/function/list-notation-2-out.hs0000644000000000000000000000027407346545000025447 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.5.3.0/data/examples/declaration/value/function/list-notation-2.hs0000644000000000000000000000030207346545000024632 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.5.3.0/data/examples/declaration/value/function/list-notation-3-out.hs0000644000000000000000000000043307346545000025445 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.5.3.0/data/examples/declaration/value/function/list-notation-3.hs0000644000000000000000000000043307346545000024640 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.5.3.0/data/examples/declaration/value/function/multi-way-if-out.hs0000644000000000000000000000030507346545000025023 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.5.3.0/data/examples/declaration/value/function/multi-way-if.hs0000644000000000000000000000026607346545000024224 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.5.3.0/data/examples/declaration/value/function/multiline-arguments-out.hs0000644000000000000000000000012607346545000026505 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) ( Bar x y ) z = x ormolu-0.5.3.0/data/examples/declaration/value/function/multiline-arguments.hs0000644000000000000000000000011107346545000025672 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) (Bar x y) z = x ormolu-0.5.3.0/data/examples/declaration/value/function/multiple-guards-out.hs0000644000000000000000000000030007346545000025610 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.5.3.0/data/examples/declaration/value/function/multiple-guards.hs0000644000000000000000000000026507346545000025015 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.5.3.0/data/examples/declaration/value/function/multiple-matches-out.hs0000644000000000000000000000005007346545000025751 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 ormolu-0.5.3.0/data/examples/declaration/value/function/multiple-matches.hs0000644000000000000000000000005007346545000025144 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 ormolu-0.5.3.0/data/examples/declaration/value/function/negation-out.hs0000644000000000000000000000031607346545000024305 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.5.3.0/data/examples/declaration/value/function/negation.hs0000644000000000000000000000032107346545000023474 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.5.3.0/data/examples/declaration/value/function/negative-literals-out.hs0000644000000000000000000000016607346545000026123 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = -x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 ormolu-0.5.3.0/data/examples/declaration/value/function/negative-literals.hs0000644000000000000000000000016707346545000025317 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = - x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 ormolu-0.5.3.0/data/examples/declaration/value/function/newline-single-line-body-out.hs0000644000000000000000000000036207346545000027302 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.5.3.0/data/examples/declaration/value/function/newline-single-line-body.hs0000644000000000000000000000037007346545000026474 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.5.3.0/data/examples/declaration/value/function/operator-comments-0-out.hs0000644000000000000000000000030707346545000026314 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.5.3.0/data/examples/declaration/value/function/operator-comments-0.hs0000644000000000000000000000031107346545000025502 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.5.3.0/data/examples/declaration/value/function/operator-comments-1-out.hs0000644000000000000000000000027607346545000026322 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.5.3.0/data/examples/declaration/value/function/operator-comments-1.hs0000644000000000000000000000030007346545000025501 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.5.3.0/data/examples/declaration/value/function/operator-comments-2-out.hs0000644000000000000000000000007707346545000026322 0ustar0000000000000000x = y ++ f g -- commentA -- commentB -- commentC ormolu-0.5.3.0/data/examples/declaration/value/function/operator-comments-2.hs0000644000000000000000000000007607346545000025514 0ustar0000000000000000x = y ++ -- commentA -- commentB f g -- commentC ormolu-0.5.3.0/data/examples/declaration/value/function/operator-fixity-defaulting-out.hs0000644000000000000000000000030507346545000027764 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 ormolu-0.5.3.0/data/examples/declaration/value/function/operator-fixity-defaulting.hs0000644000000000000000000000031307346545000027156 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 ormolu-0.5.3.0/data/examples/declaration/value/function/operator-sections-out.hs0000644000000000000000000000016507346545000026163 0ustar0000000000000000foo = (0 +) bar = (<> "hello") baz = ( 1 * 2 + ) ( * 3 ^ 5 ) quux = (,) <$> foo <$> bar ormolu-0.5.3.0/data/examples/declaration/value/function/operator-sections.hs0000644000000000000000000000015707346545000025357 0ustar0000000000000000foo = (0 +) bar = ( <> "hello" ) baz = ( 1 * 2 + ) ( * 3 ^ 5) quux = (,) <$> foo <$> bar ormolu-0.5.3.0/data/examples/declaration/value/function/operators-0-out.hs0000644000000000000000000000006207346545000024652 0ustar0000000000000000a = b & c .~ d & e %~ f g ormolu-0.5.3.0/data/examples/declaration/value/function/operators-0.hs0000644000000000000000000000005407346545000024046 0ustar0000000000000000a = b & c .~ d & e %~ f g ormolu-0.5.3.0/data/examples/declaration/value/function/operators-1-out.hs0000644000000000000000000000004007346545000024647 0ustar0000000000000000foo = f . g =<< h . i ormolu-0.5.3.0/data/examples/declaration/value/function/operators-1.hs0000644000000000000000000000003407346545000024045 0ustar0000000000000000foo = f . g =<< h . i ormolu-0.5.3.0/data/examples/declaration/value/function/operators-2-out.hs0000644000000000000000000000010707346545000024654 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 ormolu-0.5.3.0/data/examples/declaration/value/function/operators-2.hs0000644000000000000000000000007507346545000024053 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 ormolu-0.5.3.0/data/examples/declaration/value/function/operators-3-out.hs0000644000000000000000000000013407346545000024655 0ustar0000000000000000foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc ormolu-0.5.3.0/data/examples/declaration/value/function/operators-3.hs0000644000000000000000000000012007346545000024043 0ustar0000000000000000foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc ormolu-0.5.3.0/data/examples/declaration/value/function/operators-4-out.hs0000644000000000000000000000014307346545000024656 0ustar0000000000000000foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs ormolu-0.5.3.0/data/examples/declaration/value/function/operators-4.hs0000644000000000000000000000012707346545000024053 0ustar0000000000000000foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs ormolu-0.5.3.0/data/examples/declaration/value/function/operators-5-out.hs0000644000000000000000000000006007346545000024655 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux ormolu-0.5.3.0/data/examples/declaration/value/function/operators-5.hs0000644000000000000000000000005207346545000024051 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux ormolu-0.5.3.0/data/examples/declaration/value/function/operators-6-out.hs0000644000000000000000000000026707346545000024667 0ustar0000000000000000type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) ormolu-0.5.3.0/data/examples/declaration/value/function/operators-6.hs0000644000000000000000000000030607346545000024054 0ustar0000000000000000type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) ormolu-0.5.3.0/data/examples/declaration/value/function/operators-7-out.hs0000644000000000000000000000004207346545000024657 0ustar0000000000000000foo c = case c of { _ -> c } : [] ormolu-0.5.3.0/data/examples/declaration/value/function/operators-7.hs0000644000000000000000000000003607346545000024055 0ustar0000000000000000foo c = case c of {_->c} : [] ormolu-0.5.3.0/data/examples/declaration/value/function/overindentation-out.hs0000644000000000000000000000026707346545000025716 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } ormolu-0.5.3.0/data/examples/declaration/value/function/overindentation.hs0000644000000000000000000000022307346545000025101 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } ormolu-0.5.3.0/data/examples/declaration/value/function/overloaded-labels-out.hs0000644000000000000000000000010707346545000026063 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this) (#that) ormolu-0.5.3.0/data/examples/declaration/value/function/overloaded-labels.hs0000644000000000000000000000011007346545000025250 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this ) ( #that) ormolu-0.5.3.0/data/examples/declaration/value/function/parallel-comprehensions-complex-out.hs0000644000000000000000000000111007346545000030765 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.5.3.0/data/examples/declaration/value/function/parallel-comprehensions-complex.hs0000644000000000000000000000151207346545000030166 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.5.3.0/data/examples/declaration/value/function/parallel-comprehensions-single-line-out.hs0000644000000000000000000000016607346545000031536 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.5.3.0/data/examples/declaration/value/function/parallel-comprehensions-single-line.hs0000644000000000000000000000014507346545000030726 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.5.3.0/data/examples/declaration/value/function/parens-out.hs0000644000000000000000000000003007346545000023762 0ustar0000000000000000f = p (do foo; bar) baz ormolu-0.5.3.0/data/examples/declaration/value/function/parens.hs0000644000000000000000000000003007346545000023155 0ustar0000000000000000f = p (do foo; bar) baz ormolu-0.5.3.0/data/examples/declaration/value/function/parenthesis-lhs-out.hs0000644000000000000000000000017307346545000025613 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.5.3.0/data/examples/declaration/value/function/parenthesis-lhs.hs0000644000000000000000000000020307346545000025000 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.5.3.0/data/examples/declaration/value/function/pattern/0000755000000000000000000000000007346545000023015 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/as-pattern-out.hs0000644000000000000000000000010507346545000026230 0ustar0000000000000000main = case [1] of xs@(x : _) -> print (x, xs) xs@[] -> print xs ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/as-pattern.hs0000644000000000000000000000010307346545000025421 0ustar0000000000000000main = case [1] of xs@(x:_) -> print (x, xs) xs@[] -> print xs ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/famous-cardano-pattern-out.hs0000644000000000000000000000026207346545000030530 0ustar0000000000000000( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ) :<|> ( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/famous-cardano-pattern.hs0000644000000000000000000000024007346545000027717 0ustar0000000000000000( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ):<|>( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/many-guards-in-singleline-out.hs0000644000000000000000000000014507346545000031140 0ustar0000000000000000foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/many-guards-in-singleline.hs0000644000000000000000000000014507346545000030333 0ustar0000000000000000foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/multiline-case-pattern-out.hs0000644000000000000000000000041007346545000030537 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.5.3.0/data/examples/declaration/value/function/pattern/multiline-case-pattern.hs0000644000000000000000000000037207346545000027741 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.5.3.0/data/examples/declaration/value/function/pattern/multiline-guard-statement-out.hs0000644000000000000000000000014107346545000031256 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/multiline-guard-statement.hs0000644000000000000000000000012507346545000030453 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/multiple-guard-statements-out.hs0000644000000000000000000000014707346545000031300 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5, y <- 6 = case x of 5 -> True _ -> False ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/multiple-guard-statements.hs0000644000000000000000000000013107346545000030464 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5, y <- 6 = case x of 5 -> True _ -> False ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern-out.hs0000644000000000000000000000022607346545000027277 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline ( n + 1 ) = n n :: Int (n + 1) = 3 ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern.hs0000644000000000000000000000021007346545000026463 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline(n + 1) = n n :: Int (n + 1) = 3 ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/pattern-bind-out.hs0000644000000000000000000000015407346545000026545 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/pattern-bind.hs0000644000000000000000000000015107346545000025735 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern-out.hs0000644000000000000000000000024507346545000030272 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern.hs0000644000000000000000000000024607346545000027466 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/record-patterns-out.hs0000644000000000000000000000041107346545000027266 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.5.3.0/data/examples/declaration/value/function/pattern/record-patterns.hs0000644000000000000000000000040107346545000026460 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.5.3.0/data/examples/declaration/value/function/pattern/sig-pattern-out.hs0000644000000000000000000000007507346545000026415 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/sig-pattern.hs0000644000000000000000000000010107346545000025576 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/splice-pattern-out.hs0000644000000000000000000000027007346545000027107 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $( x + y ) -> () $( y "something" ) -> () ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/splice-pattern.hs0000644000000000000000000000025207346545000026302 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $(x + y) -> () $(y "something") -> () ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/strictness-out.hs0000644000000000000000000000006007346545000026353 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/strictness.hs0000644000000000000000000000005707346545000025554 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () ormolu-0.5.3.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern-out.hs0000644000000000000000000000050507346545000030077 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.5.3.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern.hs0000644000000000000000000000047207346545000027275 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.5.3.0/data/examples/declaration/value/function/pattern/view-pattern-out.hs0000644000000000000000000000031607346545000026603 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.5.3.0/data/examples/declaration/value/function/pattern/view-pattern.hs0000644000000000000000000000033407346545000025776 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.5.3.0/data/examples/declaration/value/function/pragmas-out.hs0000644000000000000000000000052607346545000024136 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.5.3.0/data/examples/declaration/value/function/pragmas.hs0000644000000000000000000000051207346545000023324 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.5.3.0/data/examples/declaration/value/function/prefix-out.hs0000644000000000000000000000002207346545000023770 0ustar0000000000000000foo x y = (+) x y ormolu-0.5.3.0/data/examples/declaration/value/function/prefix.hs0000644000000000000000000000002207346545000023163 0ustar0000000000000000foo x y = (+) x y ormolu-0.5.3.0/data/examples/declaration/value/function/quasi-quotes-out.hs0000644000000000000000000000025007346545000025136 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] ormolu-0.5.3.0/data/examples/declaration/value/function/quasi-quotes.hs0000644000000000000000000000024507346545000024335 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] ormolu-0.5.3.0/data/examples/declaration/value/function/record/0000755000000000000000000000000007346545000022616 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/function/record/constructors-out.hs0000644000000000000000000000116307346545000026530 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.5.3.0/data/examples/declaration/value/function/record/constructors.hs0000644000000000000000000000134307346545000025723 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.5.3.0/data/examples/declaration/value/function/record/hanging-after-equal-con-out.hs0000644000000000000000000000015507346545000030354 0ustar0000000000000000foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.5.3.0/data/examples/declaration/value/function/record/hanging-after-equal-con.hs0000644000000000000000000000012707346545000027546 0ustar0000000000000000foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.5.3.0/data/examples/declaration/value/function/record/hanging-after-equal-update-out.hs0000644000000000000000000000015507346545000031057 0ustar0000000000000000foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.5.3.0/data/examples/declaration/value/function/record/hanging-after-equal-update.hs0000644000000000000000000000012707346545000030251 0ustar0000000000000000foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } ormolu-0.5.3.0/data/examples/declaration/value/function/record/inter-comments-out.hs0000644000000000000000000000014507346545000026723 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } ormolu-0.5.3.0/data/examples/declaration/value/function/record/inter-comments.hs0000644000000000000000000000011507346545000026113 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } ormolu-0.5.3.0/data/examples/declaration/value/function/record/record-dot-out.hs0000644000000000000000000000050307346545000026017 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.5.3.0/data/examples/declaration/value/function/record/record-dot.hs0000644000000000000000000000051307346545000025213 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.5.3.0/data/examples/declaration/value/function/record/updaters-out.hs0000644000000000000000000000016207346545000025605 0ustar0000000000000000foo x = x {a = 3} bar x = x { abc = foo, def = Foo {a = 10} } baz x = x {} sym x = x {(+) = 4} ormolu-0.5.3.0/data/examples/declaration/value/function/record/updaters.hs0000644000000000000000000000015307346545000025000 0ustar0000000000000000foo x = x { a = 3 } bar x = x { abc = foo, def = Foo {a = 10} } baz x = x{ } sym x = x { (+) = 4 } ormolu-0.5.3.0/data/examples/declaration/value/function/record/wildcards-out.hs0000644000000000000000000000024407346545000025733 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo {x, y} bar x y z = Bar { x, y, z, .. } baz = Baz {..} ormolu-0.5.3.0/data/examples/declaration/value/function/record/wildcards.hs0000644000000000000000000000023407346545000025125 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo { x, y } bar x y z = Bar { x, y, z, .. } baz = Baz { .. } ormolu-0.5.3.0/data/examples/declaration/value/function/simple-out.hs0000644000000000000000000000002307346545000023765 0ustar0000000000000000bar x = x baz = x ormolu-0.5.3.0/data/examples/declaration/value/function/simple.hs0000644000000000000000000000002207346545000023157 0ustar0000000000000000bar x = x baz = x ormolu-0.5.3.0/data/examples/declaration/value/function/splice-out.hs0000644000000000000000000000016107346545000023756 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") ormolu-0.5.3.0/data/examples/declaration/value/function/splice.hs0000644000000000000000000000016107346545000023151 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") ormolu-0.5.3.0/data/examples/declaration/value/function/static-pointers-out.hs0000644000000000000000000000032607346545000025632 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.5.3.0/data/examples/declaration/value/function/static-pointers.hs0000644000000000000000000000031707346545000025025 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.5.3.0/data/examples/declaration/value/function/strings-out.hs0000644000000000000000000000013707346545000024173 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&barbaz" baz = "foo\ \bar\ \baz" ormolu-0.5.3.0/data/examples/declaration/value/function/strings.hs0000644000000000000000000000014607346545000023366 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&bar\ \baz" baz = "foo\ \bar\ \baz" ormolu-0.5.3.0/data/examples/declaration/value/function/tricky-parens-out.hs0000644000000000000000000000006007346545000025270 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) ormolu-0.5.3.0/data/examples/declaration/value/function/tricky-parens.hs0000644000000000000000000000006007346545000024463 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) ormolu-0.5.3.0/data/examples/declaration/value/function/tuple-sections-out.hs0000644000000000000000000000011607346545000025455 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = (,,5,6,7,,,) ormolu-0.5.3.0/data/examples/declaration/value/function/tuple-sections.hs0000644000000000000000000000012707346545000024652 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = ( ,,5,6, 7,,, ) ormolu-0.5.3.0/data/examples/declaration/value/function/tuples-out.hs0000644000000000000000000000017707346545000024022 0ustar0000000000000000foo = (1, 2, 3) bar = ( 1, 2, 3 ) handleStuff = ( let foo = foo in foo, let bar = bar in bar ) ormolu-0.5.3.0/data/examples/declaration/value/function/tuples.hs0000644000000000000000000000017707346545000023215 0ustar0000000000000000foo = ( 1,2,3 ) bar = ( 1, 2, 3 ) handleStuff = ( let foo = foo in foo , let bar = bar in bar ) ormolu-0.5.3.0/data/examples/declaration/value/function/type-applications-and-splice-out.hs0000644000000000000000000000015707346545000030166 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [|sing @ $(symFQN name)|] ormolu-0.5.3.0/data/examples/declaration/value/function/type-applications-and-splice.hs0000644000000000000000000000016107346545000027354 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [| sing @ $(symFQN name) |] ormolu-0.5.3.0/data/examples/declaration/value/function/type-applications-out.hs0000644000000000000000000000045707346545000026154 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.5.3.0/data/examples/declaration/value/function/type-applications.hs0000644000000000000000000000042507346545000025342 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.5.3.0/data/examples/declaration/value/function/typed-expressions-out.hs0000644000000000000000000000006707346545000026211 0ustar0000000000000000foo x = x :: Int bar x = Just x :: Maybe String ormolu-0.5.3.0/data/examples/declaration/value/function/typed-expressions.hs0000644000000000000000000000006007346545000025375 0ustar0000000000000000foo x = x::Int bar x = Just x :: Maybe String ormolu-0.5.3.0/data/examples/declaration/value/function/typed-hole-out.hs0000644000000000000000000000006507346545000024554 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ ormolu-0.5.3.0/data/examples/declaration/value/function/typed-hole.hs0000644000000000000000000000006507346545000023747 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ ormolu-0.5.3.0/data/examples/declaration/value/function/unboxed-string-lit-out.hs0000644000000000000000000000005407346545000026236 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# ormolu-0.5.3.0/data/examples/declaration/value/function/unboxed-string-lit.hs0000644000000000000000000000005407346545000025431 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# ormolu-0.5.3.0/data/examples/declaration/value/function/unboxed-sums-out.hs0000644000000000000000000000044707346545000025137 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.5.3.0/data/examples/declaration/value/function/unboxed-sums.hs0000644000000000000000000000036507346545000024331 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.5.3.0/data/examples/declaration/value/function/unboxed-tuples-out.hs0000644000000000000000000000016507346545000025461 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1, 2, 3 #) bar = (# 1, 2, 3 #) unit :: (# #) unit = (# #) ormolu-0.5.3.0/data/examples/declaration/value/function/unboxed-tuples.hs0000644000000000000000000000015407346545000024652 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1,2,3 #) bar = (# 1, 2, 3 #) unit :: (##) unit = (##) ormolu-0.5.3.0/data/examples/declaration/value/function/where-nested-out.hs0000644000000000000000000000027107346545000025073 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.5.3.0/data/examples/declaration/value/function/where-nested.hs0000644000000000000000000000030007346545000024257 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.5.3.0/data/examples/declaration/value/function/where-out.hs0000644000000000000000000000034007346545000023610 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.5.3.0/data/examples/declaration/value/function/where.hs0000644000000000000000000000034007346545000023003 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.5.3.0/data/examples/declaration/value/other/0000755000000000000000000000000007346545000020634 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/other/comments-get-before-op-out.hs0000644000000000000000000000034007346545000026250 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.5.3.0/data/examples/declaration/value/other/comments-get-before-op.hs0000644000000000000000000000037607346545000025454 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.5.3.0/data/examples/declaration/value/other/line-multi-line-out.hs0000644000000000000000000000007207346545000025000 0ustar0000000000000000x :: [Int] x = [ 1, 2, somethingSomething 3 ] ormolu-0.5.3.0/data/examples/declaration/value/other/line-multi-line.hs0000644000000000000000000000007007346545000024171 0ustar0000000000000000x :: [Int] x = [ 1 , 2 , somethingSomething 3 ] ormolu-0.5.3.0/data/examples/declaration/value/other/line-single-line-out.hs0000644000000000000000000000003107346545000025122 0ustar0000000000000000x :: [Int] x = [1, 2, 3] ormolu-0.5.3.0/data/examples/declaration/value/other/line-single-line.hs0000644000000000000000000000002707346545000024322 0ustar0000000000000000x :: [Int] x = [1,2,3] ormolu-0.5.3.0/data/examples/declaration/value/pattern-synonyms/0000755000000000000000000000000007346545000023065 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/value/pattern-synonyms/bidirectional-out.hs0000644000000000000000000000054407346545000027041 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.5.3.0/data/examples/declaration/value/pattern-synonyms/bidirectional.hs0000644000000000000000000000056407346545000026236 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.5.3.0/data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional-out.hs0000644000000000000000000000045207346545000031370 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.5.3.0/data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional.hs0000644000000000000000000000044307346545000030563 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.5.3.0/data/examples/declaration/value/pattern-synonyms/unidirectional-out.hs0000644000000000000000000000047107346545000027241 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.5.3.0/data/examples/declaration/value/pattern-synonyms/unidirectional.hs0000644000000000000000000000046307346545000026435 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.5.3.0/data/examples/declaration/warning/0000755000000000000000000000000007346545000020044 5ustar0000000000000000ormolu-0.5.3.0/data/examples/declaration/warning/warning-multiline-out.hs0000644000000000000000000000016207346545000024651 0ustar0000000000000000{-# WARNING test, foo [ "These are bad functions", "Really bad!" ] #-} test :: IO () test = pure () ormolu-0.5.3.0/data/examples/declaration/warning/warning-multiline.hs0000644000000000000000000000014407346545000024044 0ustar0000000000000000{-# WArNING test, foo ["These are bad functions", "Really bad!"] #-} test :: IO () test = pure () ormolu-0.5.3.0/data/examples/declaration/warning/warning-single-line-out.hs0000644000000000000000000000047107346545000025060 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.5.3.0/data/examples/declaration/warning/warning-single-line.hs0000644000000000000000000000050207346545000024246 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.5.3.0/data/examples/import/0000755000000000000000000000000007346545000015424 5ustar0000000000000000ormolu-0.5.3.0/data/examples/import/comments-inside-imports-out.hs0000644000000000000000000000011107346545000023347 0ustar0000000000000000-- x import qualified -- x Bar import qualified -- x Baz import Foo ormolu-0.5.3.0/data/examples/import/comments-inside-imports.hs0000644000000000000000000000011707346545000022550 0ustar0000000000000000import -- x Foo import -- x qualified Bar import qualified -- x Baz ormolu-0.5.3.0/data/examples/import/comments-per-import-out.hs0000644000000000000000000000006607346545000022510 0ustar0000000000000000-- (1) import Bar -- (2) import Baz -- (3) import Foo ormolu-0.5.3.0/data/examples/import/comments-per-import.hs0000644000000000000000000000006607346545000021703 0ustar0000000000000000import Foo -- (1) import Bar -- (2) import Baz -- (3) ormolu-0.5.3.0/data/examples/import/deduplication-bug-out.hs0000644000000000000000000000025007346545000022161 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.5.3.0/data/examples/import/deduplication-bug.hs0000644000000000000000000000031507346545000021356 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.5.3.0/data/examples/import/explicit-imports-out.hs0000644000000000000000000000031207346545000022075 0ustar0000000000000000import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad (return, (>>), (>>=)), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) ormolu-0.5.3.0/data/examples/import/explicit-imports-with-comments-out.hs0000644000000000000000000000014407346545000024674 0ustar0000000000000000import qualified MegaModule as M ( -- (1) -- (2) Either, -- (3) (<<<), (>>>), ) ormolu-0.5.3.0/data/examples/import/explicit-imports-with-comments.hs0000644000000000000000000000013107346545000024063 0ustar0000000000000000import qualified MegaModule as M ( (>>>) -- (1) , (<<<) -- (2) , Either -- (3) ) ormolu-0.5.3.0/data/examples/import/explicit-imports.hs0000644000000000000000000000023607346545000021275 0ustar0000000000000000import qualified MegaModule as M ((>>>), MonadBaseControl, void, MaybeT(..), join, Maybe(Nothing, Just), liftIO, Either, (<<<), Monad(return, (>>=), (>>))) ormolu-0.5.3.0/data/examples/import/explicit-prelude-out.hs0000644000000000000000000000004507346545000022043 0ustar0000000000000000import Aaa import Zzz import Prelude ormolu-0.5.3.0/data/examples/import/explicit-prelude.hs0000644000000000000000000000004507346545000021236 0ustar0000000000000000import Aaa import Prelude import Zzz ormolu-0.5.3.0/data/examples/import/merging-0-out.hs0000644000000000000000000000006107346545000020347 0ustar0000000000000000import Foo import Foo (bar, foo) import Foo as F ormolu-0.5.3.0/data/examples/import/merging-0.hs0000644000000000000000000000007507346545000017547 0ustar0000000000000000import Foo import Foo (foo) import Foo (bar) import Foo as F ormolu-0.5.3.0/data/examples/import/merging-1-out.hs0000644000000000000000000000006307346545000020352 0ustar0000000000000000import "bar" Foo (bar) import "foo" Foo (baz, foo) ormolu-0.5.3.0/data/examples/import/merging-1.hs0000644000000000000000000000010507346545000017542 0ustar0000000000000000import "foo" Foo (foo) import "bar" Foo (bar) import "foo" Foo (baz) ormolu-0.5.3.0/data/examples/import/merging-2-out.hs0000644000000000000000000000010107346545000020344 0ustar0000000000000000import Foo hiding (bar4, foo2) import qualified Foo (bar3, foo1) ormolu-0.5.3.0/data/examples/import/merging-2.hs0000644000000000000000000000015207346545000017545 0ustar0000000000000000import qualified Foo (foo1) import Foo hiding (foo2) import qualified Foo (bar3) import Foo hiding (bar4) ormolu-0.5.3.0/data/examples/import/misc-out.hs0000644000000000000000000000020707346545000017517 0ustar0000000000000000import A hiding ( foobarbazqux, ) import {-# SOURCE #-} safe qualified Module as M hiding (a, b, c, d, e, f) import Name hiding () ormolu-0.5.3.0/data/examples/import/misc.hs0000644000000000000000000000035607346545000016717 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.5.3.0/data/examples/import/nested-explicit-imports-out.hs0000644000000000000000000000020607346545000023357 0ustar0000000000000000import qualified MegaModule as M ( Either, Monad ( return, (>>), (>>=) ), (<<<), (>>>), ) ormolu-0.5.3.0/data/examples/import/nested-explicit-imports.hs0000644000000000000000000000012707346545000022554 0ustar0000000000000000import qualified MegaModule as M ((>>>), Either, (<<<), Monad( return, (>>=), (>>))) ormolu-0.5.3.0/data/examples/import/qualified-post-out.hs0000644000000000000000000000022707346545000021514 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.5.3.0/data/examples/import/qualified-post.hs0000644000000000000000000000022707346545000020707 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.5.3.0/data/examples/import/qualified-prelude-out.hs0000644000000000000000000000011107346545000022157 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude ormolu-0.5.3.0/data/examples/import/qualified-prelude.hs0000644000000000000000000000011107346545000021352 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude ormolu-0.5.3.0/data/examples/import/simple-out.hs0000644000000000000000000000022307346545000020053 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.5.3.0/data/examples/import/simple.hs0000644000000000000000000000035507346545000017254 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.5.3.0/data/examples/import/sorted-export-list-out.hs0000644000000000000000000000006107346545000022352 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) ormolu-0.5.3.0/data/examples/import/sorted-export-list.hs0000644000000000000000000000006107346545000021545 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) ormolu-0.5.3.0/data/examples/import/sorted-out.hs0000644000000000000000000000003307346545000020061 0ustar0000000000000000import A import B import C ormolu-0.5.3.0/data/examples/import/sorted-package-imports-out.hs0000644000000000000000000000014207346545000023146 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import D import "a" Ab import "b" Aa import "b" Bb import "c" Ba ormolu-0.5.3.0/data/examples/import/sorted-package-imports.hs0000644000000000000000000000014207346545000022341 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import "b" Aa import "a" Ab import "c" Ba import D import "b" Bb ormolu-0.5.3.0/data/examples/import/sorted.hs0000644000000000000000000000003307346545000017254 0ustar0000000000000000import B import A import C ormolu-0.5.3.0/data/examples/module-header/0000755000000000000000000000000007346545000016625 5ustar0000000000000000ormolu-0.5.3.0/data/examples/module-header/double-dot-with-names-out.hs0000644000000000000000000000032507346545000024076 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.5.3.0/data/examples/module-header/double-dot-with-names.hs0000644000000000000000000000032007346545000023264 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.5.3.0/data/examples/module-header/double-shebangs-out.hs0000644000000000000000000000005207346545000023025 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack ormolu-0.5.3.0/data/examples/module-header/double-shebangs.hs0000644000000000000000000000005207346545000022220 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack ormolu-0.5.3.0/data/examples/module-header/empty-haddock-out.hs0000644000000000000000000000002207346545000022511 0ustar0000000000000000module Test where ormolu-0.5.3.0/data/examples/module-header/empty-haddock.hs0000644000000000000000000000003207346545000021705 0ustar0000000000000000-- | -- module Test where ormolu-0.5.3.0/data/examples/module-header/empty-out.hs0000644000000000000000000000000007346545000021112 0ustar0000000000000000ormolu-0.5.3.0/data/examples/module-header/empty.hs0000644000000000000000000000000007346545000020305 0ustar0000000000000000ormolu-0.5.3.0/data/examples/module-header/leading-empty-line-out.hs0000644000000000000000000000052507346545000023454 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.5.3.0/data/examples/module-header/leading-empty-line.hs0000644000000000000000000000052507346545000022647 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.5.3.0/data/examples/module-header/multiline-empty-out.hs0000644000000000000000000000003107346545000023116 0ustar0000000000000000module Foo ( ) where ormolu-0.5.3.0/data/examples/module-header/multiline-empty.hs0000644000000000000000000000004007346545000022311 0ustar0000000000000000module Foo ( ) where ormolu-0.5.3.0/data/examples/module-header/multiline-out.hs0000644000000000000000000000006007346545000021764 0ustar0000000000000000module Foo ( foo, bar, baz, ) where ormolu-0.5.3.0/data/examples/module-header/multiline-with-comments-out.hs0000644000000000000000000000054307346545000024566 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.5.3.0/data/examples/module-header/multiline-with-comments.hs0000644000000000000000000000055007346545000023757 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.5.3.0/data/examples/module-header/multiline.hs0000644000000000000000000000004407346545000021161 0ustar0000000000000000module Foo ( foo, bar, baz) where ormolu-0.5.3.0/data/examples/module-header/multiline2-out.hs0000644000000000000000000000006007346545000022046 0ustar0000000000000000module Foo ( foo, bar, baz, ) where ormolu-0.5.3.0/data/examples/module-header/multiline2.hs0000644000000000000000000000004407346545000021243 0ustar0000000000000000module Foo ( foo, bar, baz) where ormolu-0.5.3.0/data/examples/module-header/named-section-out.hs0000644000000000000000000000021607346545000022513 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo, bar, ) where -- $explanation -- -- Here it goes. ormolu-0.5.3.0/data/examples/module-header/named-section.hs0000644000000000000000000000021407346545000021704 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo , bar ) where -- $explanation -- -- Here it goes. ormolu-0.5.3.0/data/examples/module-header/preceding-comment-with-haddock-out.hs0000644000000000000000000000014407346545000025731 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () ormolu-0.5.3.0/data/examples/module-header/preceding-comment-with-haddock.hs0000644000000000000000000000014407346545000025124 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () ormolu-0.5.3.0/data/examples/module-header/shebang-out.hs0000644000000000000000000000013007346545000021367 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" ormolu-0.5.3.0/data/examples/module-header/shebang-with-pragmas-out.hs0000644000000000000000000000011107346545000023767 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () ormolu-0.5.3.0/data/examples/module-header/shebang-with-pragmas.hs0000644000000000000000000000011107346545000023162 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () ormolu-0.5.3.0/data/examples/module-header/shebang.hs0000644000000000000000000000013007346545000020562 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" ormolu-0.5.3.0/data/examples/module-header/simple-out.hs0000644000000000000000000000002207346545000021251 0ustar0000000000000000module Main where ormolu-0.5.3.0/data/examples/module-header/simple-with-comments-out.hs0000644000000000000000000000005407346545000024052 0ustar0000000000000000-- | Here we go. module Main where -- Wow. ormolu-0.5.3.0/data/examples/module-header/simple-with-comments.hs0000644000000000000000000000005507346545000023246 0ustar0000000000000000-- | Here we go. module Main where -- Wow. ormolu-0.5.3.0/data/examples/module-header/simple.hs0000644000000000000000000000002207346545000020444 0ustar0000000000000000module Main where ormolu-0.5.3.0/data/examples/module-header/singleline-empty-out.hs0000644000000000000000000000006207346545000023251 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where ormolu-0.5.3.0/data/examples/module-header/singleline-empty.hs0000644000000000000000000000006207346545000022444 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where ormolu-0.5.3.0/data/examples/module-header/singleline-out.hs0000644000000000000000000000004107346545000022112 0ustar0000000000000000module Foo (foo, bar, baz) where ormolu-0.5.3.0/data/examples/module-header/singleline.hs0000644000000000000000000000004307346545000021307 0ustar0000000000000000module Foo ( foo, bar, baz ) where ormolu-0.5.3.0/data/examples/module-header/stack-header-0-out.hs0000644000000000000000000000013707346545000022457 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.5.3.0/data/examples/module-header/stack-header-0.hs0000644000000000000000000000013407346545000021647 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.5.3.0/data/examples/module-header/stack-header-1-out.hs0000644000000000000000000000016407346545000022460 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.5.3.0/data/examples/module-header/stack-header-1.hs0000644000000000000000000000016107346545000021650 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell ormolu-0.5.3.0/data/examples/module-header/stack-header-2-out.hs0000644000000000000000000000030607346545000022457 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.5.3.0/data/examples/module-header/stack-header-2.hs0000644000000000000000000000030607346545000021652 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.5.3.0/data/examples/module-header/warning-pragma-list-multiline-out.hs0000644000000000000000000000023407346545000025650 0ustar0000000000000000module Test {-# DEPRECATED [ "This module is deprecated.", "Please use OtherModule instead." ] #-} ( foo, bar, baz, ) where ormolu-0.5.3.0/data/examples/module-header/warning-pragma-list-multiline.hs0000644000000000000000000000020607346545000025042 0ustar0000000000000000module Test {-# DEPRECATED ["This module is deprecated.", "Please use OtherModule instead." ]#-} ( foo , bar , baz ) where ormolu-0.5.3.0/data/examples/module-header/warning-pragma-multiline-out.hs0000644000000000000000000000014007346545000024673 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah ormolu-0.5.3.0/data/examples/module-header/warning-pragma-multiline.hs0000644000000000000000000000013607346545000024073 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah ormolu-0.5.3.0/data/examples/module-header/warning-pragma-out.hs0000644000000000000000000000011307346545000022673 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where ormolu-0.5.3.0/data/examples/module-header/warning-pragma-singleton-list-out.hs0000644000000000000000000000010007346545000025640 0ustar0000000000000000module Test {-# WARNING "There's only one line here." #-} where ormolu-0.5.3.0/data/examples/module-header/warning-pragma-singleton-list.hs0000644000000000000000000000010607346545000025041 0ustar0000000000000000module Test {-# WArnING ["There's only one line here."] #-} where ormolu-0.5.3.0/data/examples/module-header/warning-pragma.hs0000644000000000000000000000010307346545000022065 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where ormolu-0.5.3.0/data/examples/other/0000755000000000000000000000000007346545000015233 5ustar0000000000000000ormolu-0.5.3.0/data/examples/other/argument-comment-out.hs0000644000000000000000000000022607346545000021656 0ustar0000000000000000foo :: -- | Documentation Int -> Bool foo _ = True foo :: (Foo a) => -- | Foo Int -> Int foo :: (Foo a) => -- | Foo Int -> Int ormolu-0.5.3.0/data/examples/other/argument-comment.hs0000644000000000000000000000021307346545000021045 0ustar0000000000000000foo :: Int -- ^ Documentation -> Bool foo _ = True foo :: Foo a => Int -- ^ Foo -> Int foo :: Foo a => Int -- ^ Foo -> Int ormolu-0.5.3.0/data/examples/other/ascii-out.hs0000644000000000000000000000037607346545000017472 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} ormolu-0.5.3.0/data/examples/other/ascii.hs0000644000000000000000000000037607346545000016665 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} ormolu-0.5.3.0/data/examples/other/comment-after-preceding-haddock-out.hs0000644000000000000000000000013407346545000024464 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b ormolu-0.5.3.0/data/examples/other/comment-after-preceding-haddock.hs0000644000000000000000000000013407346545000023657 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b ormolu-0.5.3.0/data/examples/other/comment-alignment-out.hs0000644000000000000000000000014307346545000022010 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> -- | Something a -- | Bar. bar :: a ormolu-0.5.3.0/data/examples/other/comment-alignment.hs0000644000000000000000000000014207346545000021202 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> a -- ^ Something -- | Bar. bar :: a ormolu-0.5.3.0/data/examples/other/comment-before-hanging-out.hs0000644000000000000000000000005307346545000022705 0ustar0000000000000000x = Just -- comment do foo bar ormolu-0.5.3.0/data/examples/other/comment-before-hanging.hs0000644000000000000000000000005307346545000022100 0ustar0000000000000000x = Just -- comment do foo bar ormolu-0.5.3.0/data/examples/other/comment-empty-let-out.hs0000644000000000000000000000005407346545000021753 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 ormolu-0.5.3.0/data/examples/other/comment-empty-let.hs0000644000000000000000000000005407346545000021146 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 ormolu-0.5.3.0/data/examples/other/comment-following-preceding-gap-out.hs0000644000000000000000000000011507346545000024534 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege ormolu-0.5.3.0/data/examples/other/comment-following-preceding-gap.hs0000644000000000000000000000011507346545000023727 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege ormolu-0.5.3.0/data/examples/other/comment-glued-together-out.hs0000644000000000000000000000011307346545000022746 0ustar0000000000000000module Main (main) where -- | Foo. -- Bar main :: IO () main = return () ormolu-0.5.3.0/data/examples/other/comment-glued-together.hs0000644000000000000000000000011507346545000022143 0ustar0000000000000000module Main (main) where {- | Foo. -} -- Bar main :: IO () main = return () ormolu-0.5.3.0/data/examples/other/comment-inside-construct-out.hs0000644000000000000000000000023307346545000023327 0ustar0000000000000000xs = [ outer list item, [ inner list first item, inner list second item -- inner list last item commented ], outer list item ] ormolu-0.5.3.0/data/examples/other/comment-inside-construct.hs0000644000000000000000000000023407346545000022523 0ustar0000000000000000xs = [ outer list item, [ inner list first item, inner list second item -- inner list last item commented ], outer list item ] ormolu-0.5.3.0/data/examples/other/comment-multiline-after-out.hs0000644000000000000000000000011107346545000023126 0ustar0000000000000000foo :: -- | start index Int -> -- | length Int -> t a -> t a ormolu-0.5.3.0/data/examples/other/comment-multiline-after.hs0000644000000000000000000000010307346545000022322 0ustar0000000000000000foo :: Int {- ^ start index -} -> Int {- ^ length -} -> t a -> t a ormolu-0.5.3.0/data/examples/other/comment-spacing-out.hs0000644000000000000000000000013307346545000021455 0ustar0000000000000000-- | Something. foo :: -- | Foo. Int -> -- | Bar. IO () foo _ = pure () -- comment ormolu-0.5.3.0/data/examples/other/comment-spacing.hs0000644000000000000000000000012707346545000020653 0ustar0000000000000000-- |Something. foo :: -- |Foo. Int -> -- |Bar. IO () foo _ = pure () --comment ormolu-0.5.3.0/data/examples/other/comment-style-transform-out.hs0000644000000000000000000000043207346545000023204 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.5.3.0/data/examples/other/comment-style-transform.hs0000644000000000000000000000040007346545000022372 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.5.3.0/data/examples/other/comment-trailing-space-out.hs0000644000000000000000000000012307346545000022732 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A ormolu-0.5.3.0/data/examples/other/comment-trailing-space.hs0000644000000000000000000000012307346545000022125 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A ormolu-0.5.3.0/data/examples/other/comment-two-blocks-out.hs0000644000000000000000000000016607346545000022123 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in [ "Control" * "Monad" -- Foo -- Bar ] ormolu-0.5.3.0/data/examples/other/comment-two-blocks.hs0000644000000000000000000000017007346545000021311 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in ["Control" * "Monad" -- Foo -- Bar ] ormolu-0.5.3.0/data/examples/other/consequetive-pipe-comments-out.hs0000644000000000000000000000007307346545000023664 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 ormolu-0.5.3.0/data/examples/other/consequetive-pipe-comments.hs0000644000000000000000000000007407346545000023060 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 ormolu-0.5.3.0/data/examples/other/cpp/0000755000000000000000000000000007346545000016015 5ustar0000000000000000ormolu-0.5.3.0/data/examples/other/cpp/continuation-out.hs0000644000000000000000000000021007346545000021661 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.5.3.0/data/examples/other/cpp/continuation.hs0000644000000000000000000000021007346545000021054 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.5.3.0/data/examples/other/cpp/lonely-hash-out.hs0000644000000000000000000000041007346545000021374 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.5.3.0/data/examples/other/cpp/lonely-hash.hs0000644000000000000000000000041007346545000020567 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.5.3.0/data/examples/other/cpp/separation-0a-out.hs0000644000000000000000000000024507346545000021622 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.5.3.0/data/examples/other/cpp/separation-0a.hs0000644000000000000000000000024407346545000021014 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.5.3.0/data/examples/other/cpp/separation-0b-out.hs0000644000000000000000000000030107346545000021614 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.5.3.0/data/examples/other/cpp/separation-0b.hs0000644000000000000000000000030007346545000021006 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.5.3.0/data/examples/other/cpp/separation-1a-out.hs0000644000000000000000000000060507346545000021623 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.5.3.0/data/examples/other/cpp/separation-1a.hs0000644000000000000000000000060707346545000021020 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.5.3.0/data/examples/other/cpp/separation-1b-out.hs0000644000000000000000000000064107346545000021624 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.5.3.0/data/examples/other/cpp/separation-1b.hs0000644000000000000000000000064307346545000021021 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.5.3.0/data/examples/other/cpp/separation-2a-out.hs0000644000000000000000000000024007346545000021617 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif ormolu-0.5.3.0/data/examples/other/cpp/separation-2a.hs0000644000000000000000000000024007346545000021012 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif ormolu-0.5.3.0/data/examples/other/cpp/separation-2b-out.hs0000644000000000000000000000027407346545000021627 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.5.3.0/data/examples/other/cpp/separation-2b.hs0000644000000000000000000000027407346545000021022 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.5.3.0/data/examples/other/cpp/shifted-out.hs0000644000000000000000000000110307346545000020577 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.5.3.0/data/examples/other/cpp/shifted.hs0000644000000000000000000000105407346545000017777 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.5.3.0/data/examples/other/cpp/simple-import-out.hs0000644000000000000000000000040607346545000021757 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.5.3.0/data/examples/other/cpp/simple-import.hs0000644000000000000000000000040607346545000021152 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.5.3.0/data/examples/other/disabling/0000755000000000000000000000000007346545000017167 5ustar0000000000000000ormolu-0.5.3.0/data/examples/other/disabling/closing-comment-in-disabled-region-out.hs0000644000000000000000000000004607346545000027060 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" ormolu-0.5.3.0/data/examples/other/disabling/closing-comment-in-disabled-region.hs0000644000000000000000000000004607346545000026253 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" ormolu-0.5.3.0/data/examples/other/disabling/empty-disabled-region-out.hs0000644000000000000000000000016707346545000024520 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} ormolu-0.5.3.0/data/examples/other/disabling/empty-disabled-region.hs0000644000000000000000000000016707346545000023713 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} ormolu-0.5.3.0/data/examples/other/disabling/line-pragma-in-disabled-region-out.hs0000644000000000000000000000023407346545000026155 0ustar0000000000000000module Foo (foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} ormolu-0.5.3.0/data/examples/other/disabling/line-pragma-in-disabled-region.hs0000644000000000000000000000023407346545000025350 0ustar0000000000000000module Foo(foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} ormolu-0.5.3.0/data/examples/other/disabling/normalize-magic-comments-out.hs0000644000000000000000000000021107346545000025223 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE -} {-ORMOLU_ENABLE -} bar = baz {- ORMOLU_DISABLE -} baz=foo ormolu-0.5.3.0/data/examples/other/disabling/normalize-magic-comments.hs0000644000000000000000000000022007346545000024416 0ustar0000000000000000 {-ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE-} {-ORMOLU_ENABLE -} bar=baz {- ORMOLU_DISABLE-} baz=foo ormolu-0.5.3.0/data/examples/other/disabling/preserve-empty-lines-out.hs0000644000000000000000000000014507346545000024427 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 ormolu-0.5.3.0/data/examples/other/disabling/preserve-empty-lines.hs0000644000000000000000000000014607346545000023623 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 ormolu-0.5.3.0/data/examples/other/disabling/preserve-trailing-whitespace-out.hs0000644000000000000000000000007407346545000026125 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} ormolu-0.5.3.0/data/examples/other/disabling/preserve-trailing-whitespace.hs0000644000000000000000000000007607346545000025322 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} ormolu-0.5.3.0/data/examples/other/disabling/single-definition-out.hs0000644000000000000000000000023107346545000023733 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.5.3.0/data/examples/other/disabling/single-definition.hs0000644000000000000000000000023107346545000023126 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.5.3.0/data/examples/other/disabling/suffix-comment-out.hs0000644000000000000000000000003407346545000023271 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo ormolu-0.5.3.0/data/examples/other/disabling/suffix-comment.hs0000644000000000000000000000003407346545000022464 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo ormolu-0.5.3.0/data/examples/other/disabling/whole-file-out.hs0000644000000000000000000000020607346545000022361 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True ormolu-0.5.3.0/data/examples/other/disabling/whole-file.hs0000644000000000000000000000021507346545000021554 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True ormolu-0.5.3.0/data/examples/other/empty-forall-out.hs0000644000000000000000000000035007346545000021005 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.5.3.0/data/examples/other/empty-forall.hs0000644000000000000000000000035407346545000020204 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.5.3.0/data/examples/other/empty-haddock-out.hs0000644000000000000000000000006007346545000021121 0ustar0000000000000000module Test ( test, ) where test :: test ormolu-0.5.3.0/data/examples/other/empty-haddock.hs0000644000000000000000000000011207346545000020312 0ustar0000000000000000-- | module Test ( -- | test, ) where -- | test :: -- | test ormolu-0.5.3.0/data/examples/other/following-comment-last-0-out.hs0000644000000000000000000000012107346545000023124 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. ormolu-0.5.3.0/data/examples/other/following-comment-last-0.hs0000644000000000000000000000012107346545000022317 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. ormolu-0.5.3.0/data/examples/other/following-comment-last-1-out.hs0000644000000000000000000000015407346545000023133 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more ormolu-0.5.3.0/data/examples/other/following-comment-last-1.hs0000644000000000000000000000015407346545000022326 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more ormolu-0.5.3.0/data/examples/other/following-comment-last-2-out.hs0000644000000000000000000000016407346545000023135 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B ormolu-0.5.3.0/data/examples/other/following-comment-last-2.hs0000644000000000000000000000016407346545000022330 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B ormolu-0.5.3.0/data/examples/other/following-comment-last-3-out.hs0000644000000000000000000000015007346545000023131 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. -- even on second line ormolu-0.5.3.0/data/examples/other/following-comment-last-3.hs0000644000000000000000000000015007346545000022324 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. -- even on second line ormolu-0.5.3.0/data/examples/other/haddock-sections-out.hs0000644000000000000000000000007707346545000021622 0ustar0000000000000000-- $weird #anchor# -- -- Section 1 -- $normal -- -- Section 2 ormolu-0.5.3.0/data/examples/other/haddock-sections.hs0000644000000000000000000000007707346545000021015 0ustar0000000000000000-- $weird #anchor# -- -- Section 1 -- $normal -- -- Section 2 ormolu-0.5.3.0/data/examples/other/haddock-without-module-header-out.hs0000644000000000000000000000005007346545000024176 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar ormolu-0.5.3.0/data/examples/other/haddock-without-module-header.hs0000644000000000000000000000005107346545000023372 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar ormolu-0.5.3.0/data/examples/other/inline-comment-0-out.hs0000644000000000000000000000004007346545000021441 0ustar0000000000000000x = ({-a-} b, c) y = ({-a-} b) ormolu-0.5.3.0/data/examples/other/inline-comment-0.hs0000644000000000000000000000003607346545000020641 0ustar0000000000000000x = ({-a-}b, c) y = ({-a-}b) ormolu-0.5.3.0/data/examples/other/inline-comment-1-out.hs0000644000000000000000000000056607346545000021457 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.5.3.0/data/examples/other/inline-comment-1.hs0000644000000000000000000000054407346545000020646 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.5.3.0/data/examples/other/invalid-haddock-1-out.hs0000644000000000000000000000025307346545000021553 0ustar0000000000000000test = undefined where a :: -- \** foo Int -> -- \| misplaced -- blablabla Int -- \|misplaced -- blablabla a = undefined ormolu-0.5.3.0/data/examples/other/invalid-haddock-1.hs0000644000000000000000000000025407346545000020747 0ustar0000000000000000test = undefined where a :: -- ** foo Int -> -- | misplaced -- blablabla Int -- |misplaced -- blablabla a = undefined ormolu-0.5.3.0/data/examples/other/invalid-haddock-2-out.hs0000644000000000000000000000021007346545000021545 0ustar0000000000000000test = undefined where -- \| Comment -- 2nd invalid line a = undefined -- \| A multiline -- \| comment b = b ormolu-0.5.3.0/data/examples/other/invalid-haddock-2.hs0000644000000000000000000000020507346545000020744 0ustar0000000000000000test = undefined where -- | Comment -- 2nd invalid line a = undefined -- | A multiline -- | comment b = b ormolu-0.5.3.0/data/examples/other/invalid-haddock-double-trigger-out.hs0000644000000000000000000000025707346545000024332 0ustar0000000000000000test = foo -- \|| Invalid haddock, with double trigger -- \|| second line + bar -- \||Invalid haddock 2, with double trigger -- \||second line + baz ormolu-0.5.3.0/data/examples/other/invalid-haddock-double-trigger.hs0000644000000000000000000000023507346545000023521 0ustar0000000000000000test = foo -- || Invalid haddock, with double trigger -- || second line + bar -- ||Invalid haddock 2, with double trigger -- ||second line + baz ormolu-0.5.3.0/data/examples/other/invalid-haddock-weird-out.hs0000644000000000000000000000006707346545000022530 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- \|# ${ ormolu-0.5.3.0/data/examples/other/invalid-haddock-weird.hs0000644000000000000000000000006507346545000021721 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- |# ${ ormolu-0.5.3.0/data/examples/other/linear-arrows-out.hs0000644000000000000000000000040307346545000021156 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.5.3.0/data/examples/other/linear-arrows.hs0000644000000000000000000000037507346545000020361 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.5.3.0/data/examples/other/merging-comments-out.hs0000644000000000000000000000037207346545000021651 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.5.3.0/data/examples/other/merging-comments.hs0000644000000000000000000000043507346545000021044 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.5.3.0/data/examples/other/multiline-comments-reindent-out.hs0000644000000000000000000000010307346545000024021 0ustar0000000000000000{- And so here we have a multiline comment. Indeed. -} ormolu-0.5.3.0/data/examples/other/multiline-comments-reindent.hs0000644000000000000000000000021107346545000023214 0ustar0000000000000000 {- And so here we have a multiline comment. Indeed. -} ormolu-0.5.3.0/data/examples/other/multiline-forall-out.hs0000644000000000000000000000134707346545000021660 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.5.3.0/data/examples/other/multiline-forall.hs0000644000000000000000000000122707346545000021050 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.5.3.0/data/examples/other/multiple-blank-line-comment-out.hs0000644000000000000000000000013107346545000023674 0ustar0000000000000000module A where a = b [ f {-, -} ] ormolu-0.5.3.0/data/examples/other/multiple-blank-line-comment.hs0000644000000000000000000000012407346545000023071 0ustar0000000000000000module A where a = b [ f {-, -} ] ormolu-0.5.3.0/data/examples/other/overly-indented-out.hs0000644000000000000000000000031607346545000021504 0ustar0000000000000000tagCloudField :: -- | Destination key String -> -- | Smallest font size, in percent Double -> -- | Biggest font size, in percent Double -> -- | Input tags Tags -> -- | Context Context a ormolu-0.5.3.0/data/examples/other/overly-indented.hs0000644000000000000000000000050107346545000020673 0ustar0000000000000000tagCloudField :: String -- ^ Destination key -> Double -- ^ Smallest font size, in percent -> Double -- ^ Biggest font size, in percent -> Tags -- ^ Input tags -> Context a -- ^ Context ormolu-0.5.3.0/data/examples/other/pragma-comments-after-out.hs0000644000000000000000000000023307346545000022563 0ustar0000000000000000{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} -- TODO: Fix and delete this pragma {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ormolu-0.5.3.0/data/examples/other/pragma-comments-after.hs0000644000000000000000000000023307346545000021756 0ustar0000000000000000{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- TODO: Fix and delete this pragma {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} ormolu-0.5.3.0/data/examples/other/pragma-comments-out.hs0000644000000000000000000000037707346545000021475 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.5.3.0/data/examples/other/pragma-comments.hs0000644000000000000000000000040207346545000020655 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.5.3.0/data/examples/other/pragma-no-header-out.hs0000644000000000000000000000012507346545000021501 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} ormolu-0.5.3.0/data/examples/other/pragma-no-header.hs0000644000000000000000000000014107346545000020672 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGuagE ViewPatterns #-} {-# language DataKinds, LambdaCase #-} ormolu-0.5.3.0/data/examples/other/pragma-out.hs0000644000000000000000000000053407346545000017645 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.5.3.0/data/examples/other/pragma-sorting-out.hs0000644000000000000000000000051507346545000021327 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.5.3.0/data/examples/other/pragma-sorting.hs0000644000000000000000000000055107346545000020522 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.5.3.0/data/examples/other/pragma.hs0000644000000000000000000000055007346545000017036 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.5.3.0/data/examples/other/trailing-whitespace-out.hs0000644000000000000000000000016707346545000022343 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 ormolu-0.5.3.0/data/examples/other/trailing-whitespace.hs0000644000000000000000000000020107346545000021523 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 ormolu-0.5.3.0/data/parse-failures/0000755000000000000000000000000007346545000015216 5ustar0000000000000000ormolu-0.5.3.0/data/parse-failures/disabling-preserves-error-location.hs0000644000000000000000000000020107346545000024450 0ustar0000000000000000module Main (main) where {- ORMOLU_DISABLE -} foo Int foo Int foo 5 EU>>>> {- ORMOLU_ENABLE -} main :: IO () main = return <<<ormolu-0.5.3.0/data/parse-failures/line-pragma.hs0000644000000000000000000000023007346545000017741 0ustar0000000000000000module Foo (foo,bar,baz) where bar = foo {-# LINE 113 "Abc.hs" #-} foo = (some <$> ( automatically $ generated ))))))))) invalid Haskell code baz = bar ormolu-0.5.3.0/extract-hackage-info/0000755000000000000000000000000007346545000015347 5ustar0000000000000000ormolu-0.5.3.0/extract-hackage-info/hackage-info.bin0000644000000000000000000473355107346545000020377 0ustar0000000000000000 ABList:/ :// AC-Boolean&& || AC-MiniTest?/= ?< ?<= ?= ?> ?>= AC-Vector*| /| |* |/ ADPfusion% **> ...:|<<<<|| |||~~ AERN-Real** **: *: +: -: /: /\ \/ AERN-RnToRm*^ +^ -^ AFSM &&&&****++++<<<<<<<^>>>= >>>>>>>^^<<<^>>>|||| Advise-me! .&&..->..<->..== .=~ .||.// <&>< <=>> <||> <~> =/======>>*<>+<>-<>/<>>*<<>>+<<>>/<<>^<|>Agata$> *> .> <++> >=> Agda3! !! !!! #= $$$+$$++$$>%%=%=%==++#-*--->.!= .&&. .*. .-->..-->.: .:! .:? .=.||. /\:#:|<#> <$<$><&><*><+><..> <.> <=<<><@> <@@> <|==<< >*< >=>?$> ?*> @= \\ ^.andThen setTCLensAnimas # *^ --> -=> .+^ .-. .-^ >-- >=- ^+^ ^-^ ^/ ~+~ Annotations$? &ArrayRef! += -= .<- .= // =: AspectAG#.*.+++ .#.#.. .*.+..+:.:.:+..:+:.:..==.⋈▹◃ AttoBencode.: .= BASIC:= < <= <> == > >= ^ BNFC$++$ ++++++++-++.+<=> >.> BNFC-meta! HappyStk BiGUL==>Biobase.*. .+. .^. .^^. BiobaseTypes+. -. Blammo.=:#Boolean&&/=<<===>>=||CCA&&& *** <<< >>> CMCompare<*> CTRex .! .+ .++ .- .| :!= ::<-| ::= :<- :<-! :<-| := CV#* #+ #- #< #> &#& -| <# <## <$$> <+> >/ |* |+ |- |< |> Cabal.= Cabal-ide-backend+++ <++ Cabal-syntax6!! #%~#~$$!%=%~&&&****>+++-. .=.~//=:|<<$<$><*<*><+><<>> <=<><|>=<<==>>=>>>>=?=?~^^#^.^^^^^divelemmodnotElemonquotremseq|| Cartesian:+ Cascade# #~ *: :* :>>> =>=: >=>: ~# Cassava.! .: .= Chart./. .|. ChasingBottoms/=!/\!!>=!\/! CheatSheet## ChristmasTree.#. .*. ClassLaws+++ =.= ClassyPrelude $ $! * ** + - . / <> ^ ^^ Clean%~ & * *> + . .~ <#> <$ <$> <&> <* <*> <<< <|> =<< >> >>= >>> >>^ ^. ^>> ||| Color//Command->-> ->> ->>> <-<- <<- <<<- ConstraintKinds<$> <*> >> >>= Contract& =: >-> >>-> |> Coroutine>> >>= Crypto/| DBFunctor. :->:.:=>  <=<DOH/? DOM/\ DPutils<|><|>DSH!! && ++ /= < <= <| == > >= >> >>= ? |> || Deadpan-DDP?>>> Decimal*. DeepArrow$$ ->| DrHylo :&: :**: :*: :++: :+: :-> :.: :/\: :@: :\/: EEConfig! Earley EdisonAPI! ++ /\ <| \/ \\ |= |> EdisonCorelconsEncode/> :&: <++> <+> <-> <.>  <:> <\\> <|> ? |+| |-> |-| |.| |:| EnumMap! \\ EuroIT$^ Euterpea/=: :+: :=: FPretty<$$> <$> <+>   <> FerryCore.-> :=> FieldTrip*% FileManip &&? .&.? /=? /~ /~? <=? =? >? ||? ~~ ~~? FileManipCompat &&? .&.? /=? <=? =? >? ||? FilePather.!. .&&. .||. FileSystem$$ -: <-: <: <<: <|> =: ?: Fin!! :.FiniteCategories !- !-! !-. !-? &&& @ |*| |^| ||| Folly/\ \/ ForSyDe!- +-+ -: :- :> <+> <: Frames&::. <+>GHood<< GLM?> GPipe-Core$*GTALib<.> >## >#> >=< >== >=> Gamgine<&&><<<<<<<<<<||>?GenI!+! !: ++ <+> <>>--> Geodetic!.! |*| |..| |.| GrammarProducts.+ >< Grempa<# <#> <@ <@> HABQT<+>HARM+++ HAppS-Data.&. HAppS-IxSet &&& @* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= ||| HAppS-State:+: HCard@@ HDRUtils!! !/ !/= != HERA<. >. HGamer3D# -: -| <: <| HGamer3D-Common# #+ #: #? ?# HJScript# #! #. .!=. .&&. .*. .+. .+=. .-. ./. .<. .<=. .=. .==. .>. .>=. .||. := <&> <|> =: ? HLearn-algebra! # *. .* /. ::: <| |> HList # .!. .*..-..<++..<..=..==..@.:$$::<>:HConsHMap! \\ HMock|->|=>HNumeric# %*% %-*-% %-+-% %---% %/% .! .* .*. .+ .- ./ .: .^ HQu$*$ $+$ $/$ HSFFIG--> <-- ==> HSH-|- HSoM->> .|. =>> HStringTemplate|=HTF$$$+$<+><=> HUnit@=?@?@?=~:~=?~?~?= HUnit-Diff@==? @?== HUnit-Plus@=?@?@?=~:~=?~?~?= HUnit-approx@?~@~?~?~~~?HaLeX<$> <*><-> <|>HaTeX!: !^ %: & *:+--+->- ->> /=:<: <=: <>=:>: >=: ^: HaXml! />:>andThenguardsooounionwhenwithwithout|>|||| HackMail+/+ :/: HandsomeSoup! HarmTrace-Base&/= &== HaskRel## &= +- >< ><= >=< >=<= >≤ ± × ∅ ∈ ∉ ∋ ∌ ∖ ∣ ∩ ∪ ≔ ≠ ≤ ≥ ≥< ≥≤ ⊂ ⊃ ⊆ ⊇ ⊠ ⋈ ⋉ ⋊ ▻ ◅ HaskellForMaths+! %%%^ *- *->*. *>*>>+-+ +^ +^^ +|+ -* -*- -^ -^^ .^ .^^ // /// /> <*<*><*>><+><-><.><<*><<*>><<+>><<->>>>> \\ \\\ ^-^^^ dsumedsumftetf~^~^^ ~~^ Hipmunk.==. Hoed<< === Holumbus-Searchengine! .++. HsParrot--> .& .- <-& <-- <:= <== HsPerl5.! .$ .$! .: HsYAML.!= .: .:! .:? .= Hsmtlib<#> <++> <:> I1M+++ >*>IFS<*> <+>  IOSpec:+:ImperativeHaskell%. %=: & /. =: ==. ~. IndexedList:-: ::: InfixApplicative<^ ^> ↾ ↿ IntervalMap! \\ Irc|! IsNull<\> JSON-Combinator-->>: ->: -? -?? -| -|| JYU-Utils=: Jdh=: JsonGrammar:- JuicyPixels:=> JustParse<|> <||> Kawaii-Parser<+>KiCS $! $!! $# $## & :< =:<= == === >>= Kleislify->^ <-^ <=^ =>^ ^-> ^<- ^<= ^=> Kulitta&&& *** +++ // /=: :+: :-> :=: <+> <<<<<^>>>>>^^<<^>>||| LATS! # #> <# <.> LParse<< LambdaDesigner!% !* !+ !== !^ <$$> LambdaHack6! !! $$!&&&&&*******>+++-. .=>.|/// /=<<$<$!><$$><$><*<*><+:><+><=<=<<><\:>=<<==>>=>=>>>>>=\\^^^blamedivdivUpelemmodnotElemquotremseq showFailureswith||Lastik!!! ++>> +>> ->- -~> =>> >-- >-> >== >===> >=>=> ? ^^^ ~: ~? ~~ ~~> ~~~> Logic&& <=> ==> ^ || Lucu<|> MFlow!> **> ++>  <* <** <*> <++ <+> << <<<  <|> >:> |*> |+| MHask~<~ ~>~ MIP.<=..==..>=.MagicHaskeller% --#!! --#/= --#< --#<= / /< / <> \/ dynApp ~=Map!? MapWith$# <-^^->Measure.*. ..> ./. <.. MemoTrie:->:@.@ MetaObject?<=>? ?==? Modulo=== Monatron<@> Monocle\* \. \== MuCheck*==>* ./. ==> ==>* ~~> NMap! .<.> NanoProlog:<-: NoHoed<< NonEmptyList.: |: NumberTheory.% .* .+ .- ./ :+ Nussinov78<** OGL$$= $= $=! $~ $~! Omega *| |&&| |*| |+| |-| |/=| |<=| |<| |==| |>=| |>| OpenAFP$$$=%%=%:%=%?+=..............><..<==<~~=====>@=~~~~>OpenSCAD# ∖ ∩ ∪ ⊕ ⊖ Operads.*. Ordinals++. .++. .: ^: PArrows>>! PSQueue:->PageIO<$$> Paraiso&& ++  || Parallel-Arrows-Definition... |&&&| |***| |>>>| PermuteEffects*. Piso:- Prelude$$$!$>&&&* ** *> + - . / /= :| < <$ <$><* <*> <= <=<<> <|> =<<== > >= >=>>> >>= ^^^elemnotElemon||PrimitiveArray! !? :.:>QIO<**> <++> <+> <.> <@> <@@> ? QuickCheck.&&..&..||.=/======>>< QuickCheck-safe.&&. .&. .||. =/==== ==> >< RBTree<:=>::||:||: Ranged-sets-!--/\--<--<=--?--\/-/>/ Rasterific^*^+^^-^^/Rattus&&& *** +++ --> -:> -=> :!:*::: <## <#> <<^ >-- >=- >>>>>^ ^<< ^>> |## |#| ReadArgs:& RefSerialize<|>RepLib:*: ::: ReplicateEffects*! *? RxHaskell>>: SBench<$> SSTG<*> >>= SciBaseTypesplustimes⊕⊗SciFlow~> Semigroup.++. <++> SessionLogger>>>= >>>>= Set⊆ ShellCheck!!! Shpadoinkle-lens%><%Shpadoinkle-router:>>SimpleH/%%- %%~ %- %~ & * *> + +++ -. . .+ .- // :**: <#> <$ <$> <&> <* <**> <*= <*> <*|> <+> <.> <<< <=< <|*> <|> =- =<< =~ >*> >=> >> >>= >>> >>>= >>>>= >>^ ^. ^.. ^>> ^? ^?? ||| SizeCompare|<=| |<| |==| |>=| |>| SmtLib<++> <:> Spock Spock-api Spock-core StateVar$=$=!$~$~!Strafunski-StrategyLib-+>>>>>>->>>=Stream!! <:>Cons StrictCheck! % %$ %* :* SyntaxMacros+>> <=> ^= ^| TCache.&&..<..<=..==..>..>=..||.TLT@/=@/=-@<@<-@<=@<=-@==@==-@>@>-@>=@>=-~:~::~::-TTTAS&&& *** >>> TeX-my-mathd$<>%$>&&~!&~:&~?&~~!&~~:*..*+..+-\--→.../⊂<.<<.≤<==<=>==>=→=⸪>$|->|◝|◞|◞◝°±×،،..،⁀ ₌₌←-←=↦↪∀:∃:∄:∈∉∋∌∏∑∓∖∗ ∘∝∥∧∨∩∪∫∼≃≅≈≠≡≤≤.<≤.≤≥≪≫⊂⊃⊆⊇⊎⊕⊗⋂⋃⋆ ␣◝ ◝⁀ ◞ ◞∏◞∑◞∫◞∮◞⋂◞⋃◞◝◞⨄⟂⧵⨄⩵⩵!⪡⪢⸪⸪= TernaryTrees! TestExplode&-& TicTacToe--> -?-> Top .->. .::. .==. .=>. :+: :|: <++> @@ @@@ |-> |>>| TreeStructures!! TrieMap! \\ TypeCompose$*&&&% ***#***% *:* *::* *<~--->:$:*::->::. :<->:<~~>~>*UISF// ~++ Unixutils<++> UrlDisp|. |/ |// |? |\ |\\ Useful! !/ != #! #!! #*- #*? #+ #++ #- #? #?! #?? #\\ % ? ?! ?? UtilityTM.=<<. .>>=. ValveValueKeyvalue.:Vec:. VecN:> WashNGo## :=: :^: @@ WeakSets! !? &&&& \\ |!| |&| |*| |+| |-| |.| |?| |^| ||| |||| Webrexp Wheb Wired *= -<- ->- -|- .+ .<. .>. === >< XSaiga*> <|> Yampa-->-:>-=>>-->=- abortWhenandThenattachfbygatejoinElMergemergerMergetagtimeOut Yampa-core# --> -=> >-- >=- >>> ~+~ Z-Data.!.: .:! .:? .= Z-MessagePack.!.: .:! .:? .= ZipperAG.#. .$ .| Zora$$ <$*> Zwaluw:- <> abcBridge=== abt$$ // :$ :\ === \\ accelerate/! !! $$>%&&&***+++-. .&..|.//=:+:.::+::.<<$<$><=<>==>>->>=??|Ix^^^divmodquotremrotaterotateLrotateRshiftshiftLshiftRxor||accelerate-blas#><#<.><>><acl2<. <=. >. >=. acme-cadre<&> acme-flipping-tables ╯°□°╯ acme-functors *>/=<$<*<*><>==>>>>=~~ acme-hq9plus+ acme-kitchen-sink>$< acme-lolcat? acme-omitted... acme-operators2!! $ $> % & && &&& * ** *** *> + ++ +++ - . .&. .|. / /= :+ < <$ <$!> <$> <* <**> <*> <<< <<^ <= <=< <> <|> =<< == > >= >=> >> >>= >>> >>^ \\ ^ ^<< ^>> ^^ || ||| acme-php&& <> || acme-pointful-numbers. active->>|>> acts•ad*^:!:-^*^/adaptive-containers++ adhoc-fixtures&:&> adp-multi... <<< >>> ||| ~~~ aern2-mfun! +++ aern2-mp *.*^+-+.+^-.-^/./^ aern2-real?aeson !? .!= .: .:! .:? .= >*<><aeson-better-errors.! <|> aeson-commit.:> aeson-compat.!= .: .:! .:? .=aeson-deriving&:===> aeson-filthy.:$ .:~ .=$ aeson-native.: .:? .= aeson-picker|--|-? aeson-quick.! .% .? aeson-utils.=? affine.+.-.-.agda-language-server<+>aig! ++ === air !! + - . / < <-> =: > ^ air-spec=== airbrake:| airship#> #>=  aivika./=. .<. .<=. .==. .>. .>=. ?> aivika-transformers./=. .<. .<=. .==. .>. .>=. ?> ajhc! & *# +# :-> :=> :>>= <$$> <$> <+>   <> =* @<= @<=@ @= @=@ @>= @>=@ \\ alerta!= !~ =. ~. alex-tools<-> alg*+-.&?¬ /<<>>×∸ ≡≢≤≥algebra$@%* *. + - .* / /~ < <~ > >~ \\ ^ ^? ~~ algebraic-graphs-<:= <+><.>===>*< >-~*~ algebraic-prelude** ^^^allocated-processor--< alloy:- :-* :-@ @-> altcomposition%***.* %***.** %**.* %**.** %**.*** %*.* %*.** %*.*** %.** %.*** %.**** &&\*%*.* *%*.** *%*.*** *%.* *%.** *%.*** **%.* **%.** **%.*** .$?. ||\§ alternative-extra$< alternative-io<||> altfloat** <  <= <==> > >= amazonka-core#%~&.!= .!@.#.#?.: .:> .:? .=.?> .@.@?.~:|<$><&><*><><>~<|>=#=:?~@=@@=^.^? amazonka-test #%~&.~<&><>~?~^.^?amby.= ampersand .!. .*. .-. ./. ./\. .:. .<>. .==. .\. .\/. .|-. <==> >- analyze<&> annihilator<|< >|> annotated-wl-pprint<$$> <$> <+>   <> ansi-pretty<$$><+>ansi-terminal-game #%%.<%.>%^>&***===|||ansi-wl-pprint<$$><$><+><>anticiv#-> #->> #< #> #|| %& %&& %| %|& & &< &> .|| :-> <># <>& antimirov<: antiope-messages/// antiope-s3 antiquoter<<> <<>> <>> antisplice!&& !+ !+> !|| #&& #- #-> #->> #|| &-> &?-> +& +? -&?-> >!+ >!+> antlr-haskell# &&&\\ hashWithSalt aop-prelude&&*+++-. //=<<===>>=divmod|| ap-normalize&<$>^<*>^ ap-reflect-$--*-:$ apecs$=$~ apecs-stm$=$~ api-builder=. api-rpc-pegnet.:?? api-tools.:. .:: <$!>?! ?!? apiary +> +| := =!: =*: =+: =: =?!: =?: ?? insert appar*><$<$><*<**><*><|> applicable$* apply-unordered-mono??!approx/~=~inRangeinTol safeInRange approximate&?^?|?arch-hs<|>\\arduino-copilot,!! # $$!&&****>+++-. .!! .&..<<. .>>. .^. .|.//= < <$<$><*<*><= <>=:=<<== ==> > >= >>>>=@: ^ ^^elemnotElemquotremseq||arithmoi:+\\ ^%moduloarray! // array-builder:<:> array-forth! arrow-extras$<<$>><<$>*>>>$arx<@>arxiv/*/ /+/ /-/ asana)!! $$!&&&&&*******>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||assert-failureblamefailure forceEither showFailureswithtwith assoc-list! !? assoc-listlike! !? aterm<>atom! !. &&. .&. .<<. .>>. .|. /=. <. <=. <== ==. >. >=. ||. atp /\<=><~>=/======>?= \/|-~= atp-haskell .&. .<=>. .=..=>. .|. .~.:!: :&: :<=>: :=>: :?: :|: <==><=><>==>|-> |=> ¬· →↔⇒⇔∀∃∅ ∧∨⊃⊤ ⊥ attoparsec.*> <*. <>attoparsec-parsec attoparsec-text.*> <*.  authoring./ <> auto &>-->-?><&<|!><|?>compImergeLmergeR autodocodec.=   autoproc% .&&. .||. aviation-weight-balance.->.avro.= awesome-prelude$> & aws<>aws-arn.~^.^?aws-ec2+++ aws-sdk-xml-unordered.- .< .= axiom++>.=++.~<$<$!><$><*<**><*><.><=<<><|>=<<>=>>>>>=\\^.elemnotElembackprop$>%~~**. *. +. -. .~~/. :&<$<$>^^.^^.. ^^?^^?!~. ballast-&- bamboo^^ barbies/*/*/base|! !! !<<.!>>.$$!$<$>%&&&&&&**#*##****## ****>++#+##+++++--#-##. .&..<<..>>..^..|.//##// /=/=#/=##:$$::% :*::+:+::.::<>::|:~::~~:<<#<##<$<$!><$><&><*<**><*><++<+><<<<<^<=<=#<=##<=<<=?<>=<<====#==##>>#>##>$>$$<>$<>=>=#>=##>=>>=?>>>>=>>>>>^>?Compose DivMod\\^^%^ ^<<^>>^^^^%^^ divelemmodnotElemonparpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor|||||~~~ base-compat!! !<<.!>>.$>&.<<..>>..^.:|<$<$!><&><=<<><|=<<>=>>>>>=base-compat-batteries!! $>:|:~::~~:<$<$!><&><=<<><|=<<==>=>>>>>= base-preludeN!! $$!$<$>%&&&&&&*******>++++++-. .&..|.//=:+:|:~::~~:<<$<$!><$><&><*<**><*><+><<<<<^<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>>>^Compose \\^^<<^>>^^divelemmodnotElemonparpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor|||||base-unicode-symbols,=≪¬ ×÷‼ ⁂↢↣∅ ∆ ∈∉∋∌−∖ ∘ ∣∤∧∨∩∪≠≡≢≤≥≫≫=≮≯⊕⊛⊥ ⊻⊼⊽⋅⋘⋙⧺⧻⫴basement$!! $$!&&**>++. -. .&..<<..==# .>>..^..|.//=<<$<$><*<*><=<=?<>==>>=>>>>=^rotateLrotateRseq|| basement-cd$!! $$!&&**>++. -. .&..<<..==# .>>..^..|.//=<<$<$><*<*><=<=?<>==>>=>>>>=^rotateLrotateRseq||basen!!  basex-client<$$> basic-prelude#$$!&&&&& * ** *** *> + ++- . / /= < <$ <$><* <*> <.><= <><|> =<<== > >= >=>>> >>= ^^^on||bdcs==?>>?bdd^?= beam &&. ++. /=. <. <=. ==. >. >=. ||. beam-core&&.&&?.**./=*./=./=?.:*:<*.<-.<.<=*.<=.<|>.==*.==.==?.>*.>.>=*.>=.between_div_in_like_mod_ similarTo_||.||?. beam-postgres!. !~*. !~. #> #>> ++. -&&- -&<- -&>- -*- -+- --|-- -.- -<<- -<@- -># ->$ ->># ->>$ ->>- -@> -@>- <@ <@- ? ?& ?| @> @@ ~*. ~. beam-th<+><~>~> bearriver&&&****^ +++-->-:><+><<<<<^>-->=->>>>>>^ >>^^+^^-^^/ ^<<^>>^>>> dot|||bed-and-breakfast<-> <|> bench-show<+>bencode<|> bencoding.:.=!.=?<$>!<$>?<*>!<*>? benri-hspecendsJustendsLeft endsRightendsThen berkeleydb! berp % * + - . / < <= =: == > >= @@ besout+: between. <^@@^ <^@@^> <^@^ <^@^> <^@~ <~@@~ <~@@~> <~@~ <~@~> ^@@^ ^@@^> ^@^ ^@^> ^@~ ~$$~ ~$~ ~@@^ ~@@^> ~@@~ ~@@~> ~@~ ~@~> bidirectional.= bifunctor<***><⁂> bifunctors*>>:-><<$>><<*<<**>><<*>>bimap! !> !? !?> bin.&. .|. binary-communicator+| binary-indexed-tree! binary-parsers binary-tree:*: binarydefer<< <> >>= bio! ? biohazardR!! $$!$>%&&&&&&*******>++++++-. .&..|.//=:!::* :+:-> :>:|:~::~~:<<#><$<$!><$><&><*<**><*><+><<<<<^<=<=<<><|>=<<==>>=>=>>>>>=>>>>>^Compose \\^^<<^>>^^bangdivelem hashWithSaltmodnotElemonparpowpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor|||||bioinformatics-toolkit! & |! |@ bishbosh/~<=>====~ bit-vector==~ bitcoin-hs=~=bitcoin-payment-channel/:| <>bitcoin-scripting.: bitset\\ bitstream !! appendelemnotElem∅ ∈∉∋∌⧺bitwise! !!! !? // bitwise-enum\\ bizzlelude*$$!$>&&&&&&> &>= *******>+-. //=<<$<$><&> <*<*><=<><|>==>>=>=>>>>>=>>>^^^divelemmodonquotrem|>|| bizzlelude-js<&> |> blank-canvas#blas! *> // <**> <*> <.> <\> <\\> blaze-html-contrib!# !. blaze-markup! !? blazeMarker $< $<< &~ +~ -~ <=~ <~ =~ >: >=~ >~ blazeT! !? ble blubber-server^*^ ^+^ ^-^ ^/^ blucontrol!>:.:|==>bludigon!>:.:|==> board-games#*&*& boardgameunlessbolt#: #:? #= .!= .: .:? .= boltzmann-samplers#! <.> ? ?! bookhound<#><|>>>>|* |+ |++ |? bookkeeper%:&=:?: boolean-like<&< <^> <|< >&>>|>boolexpr/\ \/ boombox>-$ >-> @-$ @-> @.$ boomerang.~ :- <>boop-->-->>==>>-->boots<<<<>>>> boots-app& boots-web:.bound=<<<>>>= bound-extras>>==>>>>= bound-simple>>>= bounded-array! // box<$|><*|>boxes/+/ // <+> <> bpath breakpoint!$$ $+$ *><$><*<*><+> <.> <> SynFunasJoinIdasJoinId_maybeconsBag idCafInfo mkCoreApp mkCoreAppsmkFunTy mkInvisFunTymkInvisFunTyMany mkVisFunTymkVisFunTyMany setIdAritysetIdCallArity setIdCprInfosetIdDemandInfo setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdStrictnesssetIdUnfoldingsetInlineActivationsetInlinePragmasnocBagbrick<+> <=> @@=zoombricks/@@\ /@\ |-> bricks-internal<&><||> bricks-syntax&<>brittany2$$!$>%&&&&&&*******>+++-. .:?= .> //=:|<<$<$!><$><&!> <&><*<*><<<<=<=<<><|>=<<==>>=>=>>>>>=>>>^divelemmodnotElemquotremseq||broadcast-chan-tests@=?@?@?=bson!? :==:=?btc-lspf!=.$$!$!!$$$$+$$++$$+-$=$=+$>%%~&&&&&&&&.*******=.*>++++=.--=.. ....: .=.|.~//<-./=/=.:#: :% :|<<$<$!><$><&&><&><*<**><*><-.<.<.><<$>><=<=.<=<<><|<|><||>=$=$$+=$$++=$$+-=$==.=<<====.>>.>=>=.>=>>>>>=?. ?:Compose FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin\\ ^^%^ ^. ^..^?^^^^%^^ div hashWithSaltmodonquotremseqxor||||. buchhaltung<&>?? buffer-builder.=.=#rowbuffon-machines/\ \/ bugzilla .&&. ./=. ./=~. .<. .<=. .==. .=~. .>. .>=. .||. bugzilla-redhat .&&../=../=~. .<..<=..==..=~. .>..>=..||. buildable<| |> buildbox% %% <| >< |> bullet .&..|.rotaterotateLrotateRshiftshiftLshiftRxor bulletproofs^+^ ^-^ buster<~< >~> |~| bv!. #/=.<.<<.<<<.<=.==.>.>=.>>.>>>.@. @: @@ ashrrolrorsgesgtshlshrsleslt bytebuildappend bytesmith>> >>= orElse bytestring!? >$<>*<conscons'snocbytestringparser bytestringparser-temporary bytestringreadp+++ <++ c-dsl ! # & &* .= /=: <-- <: <=: ==: >: >=: cabal-cache<.> cabal-debian! .?= cabal-fmt&&&&on cabal-install+++.=<++cabal-install-solver+!! $$!&&****>+++-. .&&. .||. //=:|<<$<$><*<*><+><<>> <=<><|>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq|| cabal-query:& :| cafeteria-prelude!! $ $! && * ** + ++ - . / /= < <= =<< == > >= >> >>= ^ ^^ || caffegraph>- >-> cairo-canvas!@ cake++? ==> cake3.=  calamity! .= .?= //<.><<$>><<*>>=:? calamity-commands<.><<$>><<*>>caldims#&&# #*# #+# #-# #/# #==# #^# #~# camfort !! *.. ..* /= < <$$> <= <>== > >= can-i-haz<$!><=<=<<>=>>>>>=canon8% <<<<<^>>>>> <<<<<^^>>>>> <<<<^>>>> <<<<^^>>>> <<<^>>> <<<^^>>> <<^>> <<^^>> <^ <^> <^^> >^ |<^>| |<^^>| ~<<<<^>>>>~ ~<<<^>>>~ ~<<^>>~ ~<^>~ ~^~ ~|<<<<^>>>>|~ ~|<<<^>>>|~ ~|<<^>>|~ ~|<^>|~ ~|^|~ ~~<<<<^>>>>~~ ~~<<<^>>>~~ ~~<<^>>~~ ~~<^>~~ ~~^~~ ~~|<<<<^>>>>|~~ ~~|<<<^>>>|~~ ~~|<<^>>|~~ ~~|<^>|~~ ~~|^|~~ ~~~<<<<^>>>>~~~ ~~~<<<^>>>~~~ ~~~<<^>>~~~ ~~~<^>~~~ ~~~^~~~ ~~~|<<<<^>>>>|~~~ ~~~|<<<^>>>|~~~ ~~~|<<^>>|~~~ ~~~|<^>|~~~ ~~~|^|~~~ ~~~~<<<<^>>>>~~~~ ~~~~<<<^>>>~~~~ ~~~~<<^>>~~~~ ~~~~<^>~~~~ ~~~~^~~~~ ~~~~|<<<<^>>>>|~~~~ ~~~~|<<<^>>>|~~~~ ~~~~|<<^>>|~~~~ ~~~~|<^>|~~~~ ~~~~|^|~~~~ ~~~~~^~~~~~ capability:.: capataz&^.cartel&&& <+> ||| cas-store:^casa-abbreviations-and-acronyms<-> cascading$= case-insensitive-match^/= ^< ^<= ^== ^> ^>= cassava.! .: .= cassette--> <> <|> caster$:<:>catalyst&&& *** +++ <+> ||| categories&&& ||| category<$><=<=<==>=>=>category-extras&&& .<=. .>> =**<< =*<< =<<< =>> >$< >>$<< >>* >>**= >>*= >>>= ||| cayley-dickson**. *. +. -. .* .+ .- /. cdar-mBound:^cef<> cflp! .&&. .||. :! === ? ^: cfn-flip%!! $$!&&****>+++-. //=<<$<$><*<*><=<=<<>=<<==>>=>>>>=^^^divelemmodnotElemquotremseq|| chalkboard*> <* <*> chalmers-lava2000 %% ->--|-<#><&><==<==><=><|>==>>>== |->charset\\ chassis$$>&&&&***. /=:&:. :|<<$<$><*><<<<<=<=<>=<<===>=>>$<>=>=>>>>>=>>>chatty.<$. .<. .<<. .>. .>>. .|. chatty-text?? ??? chatty-utils:-: >-< checkers.&.=-=>****< >***< >**< >*< chez-grater<|>chiphunk$=chorale.*.**.***<< chp<&> <->  <|*|> <||> chp-plus *&&&* ***** *<<<* *>>>* <=> <=>| =*= |<=> |<=>| chp-spec<->  <|*|> <||> >< \/ chr-core/\<==><=><=>> <\><\>> =!=!!==>==>> =@=|@=\!\/|>chr-data :++: :+:: ::+: =$:=$^:=.=:^$=^* ^.^= varmpPlus|\> chr-pretty>#<>-#-<>-<>-|-<>|<chronos... church-list!! \\ churros&&&***<<<>>>>>>> circle-&- citeproc-hs<++> <+> <> clafer+++>- clash! ++ +> <+ clash-lib!-><+>>-!>-!->>->clash-lib-hedgehog<|> clash-preludeQ! !! #|#$$!&&**# ***>++# ++++# +>>--# . .&&../=..<..<=..==..>..>=..||.//=:$$$::++::-:<:<<>>::><<$<$><*<*><<+<=<><^> =<<==>>=>>>>=Cons^ ^^addSNatdeepseqX defaultSeqXdivdivSNatelemhwSeqXmodmodSNatmulSNatnotElempowSNatquotregMayberegister registerBremseq seqErrorXseqVseqVXseqXsubSNat|&||->|=>|||||~> clash-shake|> classy-prelude/$$!$!!&&&&&*******>+++-. //=<<$<$><&&><*<**><*><.><=<=<<><|><||>=<<==>>=>=>>>>>=\\ ^^^div hashWithSaltmodonquotremseq||classy-prelude-conduit $$$$+$$++$$+-$=$=+.|=$=$$+=$$++=$$+-=$=clay! # $= &** *.*= *@+.-.-: |~ ~= clean-unions:> ||> cleff++:>:>>clerk<||$||*||+||-||/||:||^| cleveland?-@/=@==@@/=@@==clif*: .:.|./>/\<.><\clist:.closedequals clustering! cmdargs&=&=# +=:=:=+ cmdlib%% %+ %: %> +% <% <+< cmt co-log-core &>*<<&<<==>>>$>$<>*>*<>|<cobot! // cobot-io! !? !?! code-builder .=. <++> <+> <+| <-> >< ><| |>+<| |>< |><| code-conjure$$ $$** $$|< -$--%- -&&--*--++--+--.- -.. -..- -... -...- -/=--:--<--<=--==>--?- -|- -||-// //- :$ >$$< codec=. codeforces-cli<~> codeworld-api&<> coerce-util#. .# coercible-subtypesarrRprodRsumRcoercible-utils#. .# cognimeta-utils$* ./ .// ./// .//// <$$> >$< ◊ coinbase-exchange.:?? coincident-root-loci./=. .<. .<=. .==. .>. .>=. collada-types *. <>crossdotparvturnturnLturnNLturnNRturnRcollect-errors~! collections ! -!- -/\- -<- -<=- -?- -\/- // />/ <| >< \\ |> collections-api! // <| >< \\ |> colorful-monoids<> colorless-< <.> <: <:> columbia##. #. comark-parsercombinat!!! === multiplyPermutation||| combinat-compat=== multiply||| combinator-interactive:$ combobuffer! comfort-array! // ::+append comfort-glpk.*<=.==.>=.>=<. commander-cli&+<+> commutative<~> comonad $><$<$><<=<@<@><@@>=<==>==>>@> compaREST<<<>>>Snoc compact-map! compact-sequences:<<|conssnoc|>compact-string:*: compact-string-fix:*: comparse<|>compdata #>#>>&:&::*::+::->:.::<:<::=::=>|->compdata-automata&:^: >*< |*| |-> compdata-dags& :*: >*< |*| |-> compdata-fixplate.:.:..::.::..::::+::<:compdata-param:&: :*: compensated*^ +^ complex-generic*. .* .+/.:+ composable-associations:<> compose-ltr$> .> <$ <. composite-base:!::&:*::^: composition.*.**.***.****.*****.******.******* .********.:.:..::.::..:::.:::..::::.::::.∘ composition-extraw ********. *******. ******. *****. ****. ***. **. *. -$ --$ ---$ ----$ -. -.* -.** -.*** -.**** -.***** -.****** -.******* -.******** -.: -.:. -.:: -.::. -.::: -.:::. -.:::: -.::::. <$$$$$> <$$$$$~> <$$$$$~~> <$$$$$~~~> <$$$$> <$$$$~> <$$$$~~> <$$$$~~~> <$$$> <$$$~> <$$$~~> <$$$~~~> <$$> <$$~> <$$~~> <$$~~~> <$~> <$~~> <$~~~> <*.$> <----> <---> <--> <-> <.$$$$> <.$$$> <.$$> <.$> <.*$$$$> <.*$$$> <.*$$> <.*$> <.**$$$$> <.**$$$> <.**$$> <.**$> <<<~~>> <<<~~>>> <<<~~~>> <<<~~~>>> <<~> <<~~> <<~~>> <<~~>>> <<~~~> <<~~~>> <<~~~>>> <~$$$$$> <~$$$$> <~$$$> <~$$> <~$> <~>> <~~$$$$$> <~~$$$$> <~~$$$> <~~$$> <~~$> <~~>> <~~~$$$$$> <~~~$$$$> <~~~$$$> <~~~$$> <~~~$> <~~~>> =.<< =.=<< =.==<< =.===<< =.====<< ==.<< ==.=<< ==.==<< ==.===<< ==<< ===.<< ===.=<< ===.==<< ===<< ====.<< ====.=<< ====<< =====.<< =====<< ======<< >>== >>=== >>==== >>===== >>====== composition-prelude &&:+>-$-..$.*.**.***.****.*****.******.@.@@.@@@.@@@@.@@@@@<&><**><-=**<<-=*<<=**<<=*<<=<<~@~<>-=**>>-=*>>=**>>=*>>=>on~@~compound-types*+-/ compstrat+> >+> computational-algebra! !* %*< *|< .*.<--> <||> >* >|* addToIdeal divModPolynomial divPolynomial modPolynomial computations### +:+ -:- >^ >^^ ^> ^^> concatenative&&. &. **. *. .&. .*. >>. >>@ concurrent-machines<~ <~< >~>~> cond&& --> <&&> <--> <<| <| <||> ? ?. ?<> ?? |> |>> || ⊲ ⊳ conductive-base+@ -@ ?@ conduino&|.||.conduit$$$$+$$++$$+-$=$=+.|<+< =$=$$+=$$++=$$+-=$=>+> conduit-find=~ conduit-resumablesink+$$ ++$$ -++$$ conduit-vfs& conferer&/. config-ini&.=.=? config-schema configifier:*> >>. configuration! <@> configuration-tools!..: %%.:%::&*>..:.::<$<$<<$><&><*<**><*<<*><|>>$>>*>×conkin<$><*> connection-string! connections!...///=/\/~:% <<<<<=<=><~====>>>=>>>>~?~\/\\compare comparingdividemaxminpcomparepgtpltpmaxpminselectxor~~constrained-categories3!! $$!$~&&&&&*******>++++++ -. //=:&&&:***:<<<:>>><<$<$><*<**><*><<<<<<=<=<<>=<<==>>=>=>>>>>=>>>^^^divelemmodnotElemquotremseq|||||constrained-category<$>∘ constrained-monads *> <$ <$><* <**><*> <=<<|> =<<>=>>>>>= \\ constraint\\ constraint-classes! !? <$>:<*>:<|>:=<<:>>=: constraints &&& *** ++:- :=> :~::~~:DivMod\\⊢ constraints-deriving&&& *** :- :=> \\⊢ constrictor<$!>fmap'liftM' construct*><$<*<+> <|>constructive-algebra !!! %| *> <* <*> <+> <->  <^> ~= container-classes!! ++ containers! !? :*::<:<|:>:|><|><IQConsITQConsQConsTQCons\\ |>containers-unicode-symbols∅ ∆ ∈∉∋∌∖ ∩∪⊂⊃⊄⊅⊆⊇⊈⊉⊲⊳⋈containers-verified\\ contiguous<$ continue contra-tracer>$contracheck-applicative+?+:*?>?>>?~>?~>>testtest'test'_ testPatch testPatch' testPatch'_ testPatch_test_contravariant-extras>*< control-bool<&&> <&=> <|=> <||> control-dotdotdot... … control-dsl<=< =<< >=> >> >>= control-invariants! !.##===control-monad-free<$!><=<=<<>=>>> >>= cookbook? coordinate<◦> copilot-core=~= copilot-frp-sketch=:@: copilot-language)# $$!&&****>+++-. .!! .&..<<. .>>. .^. .|.//= < <$<$><*<*><= <>=<<== ==> > >= >>>>=^ ^^elemnotElemquotremseq||copilot-libraries!! core-program<+>core-webserver-warp cornea<!!? $$!$!!$<$>&&&&&&&&^ ****>+++-. //=:|<<$<$!><$><&><*<**><*><<$>><<<<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>?:??Compose ^^^div hashWithSaltmodonquotremseqxor||||^ coroutine-object<==| couch-hs.: .:? .= craftwerk<== <=> === ==> crdtmergecrf-chain2-tiers!? critbit! \\ crjdt-haskell&-< .>=: crypto-api.::. crypto-classical|.| cryptol!$$$&&& .$:-><+><.><~ =#==/= >< >==@@ tFun|%| |->| |-| |/=| |/| |=| |>=| |^| ||| ~> ~~> csound-expression *><$<$><**><*><|>equalsTo greaterThangreaterThanEqualslessThanlessThanEquals notEqualsTocsound-expression-typedequalsTo greaterThangreaterThanEqualslessThanlessThanEquals notEqualsTo css-selectors .# .$= .*= .+ ... .: .= .> .^= .| .|= .~ .~= css-simple? |> csv-conduit.! .: .= cubicbezier$**~^.^ ~*~+~- curl-aeson... currency-convert<|-|> curry-base$++$ $-$ <$-><$><**><*-><*><-*><.><\><\\><|><|?>@> optthenPthenP_curry-frontend++!curves +++ ++> +.+ := :~ <++ <-> <> >< custom-prelude.: <&> <@> cybus.:.::.|.||cypher.&. .-. .<. .=. .>. .|. d10* + - dag:@-> :@->$### :@->$$### darcs<!! $$!$$$+$&&****>*>> ++++<++<<++>++>>++| --| . //=:/\::<::>:>::\/::||:<<$<$><*<*><+><=<> =/\==/^\= =<<===\/==\^/= >>* >=>>>>* >>=?^ ^^divelemmodnotElemquotremseq|| darcs-beta$$ *> *>> +<+ +>+ /// :/\: :< :<: :> :>: :\/: :||: <+> <>  =/\= =\/= >* >>* data-accessor $%%:%=.> <. =:^.^:^=data-accessor-monadLib%: %= data-accessor-monads-fd%: %= data-accessor-monads-tf%: %= data-accessor-mtl%: %= data-accessor-transformers%: %= data-aviary&&& *** *> +++ . .>> <$ <$> <* <**> <*> <<< <<^ <=< =<< =>> >=> >> >>= >>> >>^ ^<< ^>> ||| data-basic&&./=.<.<=.==.>.>=.||. data-category ! % %% &&&***+++->> .:% :+++: :<*>: ^^^ ||| data-diverse.//./\.appendconsManysnocMany snocMany'data-diverse-lens chooseBetweenchooseBetweenK chooseWith makeBesides makeBesidesK thenChoose thenChooseKthenMake thenMakeK data-easy??$?&&?&&\?+?|@@ data-emoticons1*〃。・・。 //∇// //・// ^-^* ^∀^** ^∇^** ^◇^ °-°* °-°〃 °∇° °□° ´∀` ´・~・ ‐°‐ ≧∀≦ ⋟﹏⋞ ⋟~⋞ ┬──┬ ╥﹏╥ ╥~╥ ╯°□° ◉・・ ●・・ ★ ̄∀ ̄★ 〃´∀` 〃∇〃 〃▽〃 〃.. 〃。・・。 〃・〃 ・-・ ・.・ ・∀´ ・∀・ ・∇´ ・・ ・・? ・・?? ・・??? ・・; ・﹏・ ・~・ --~ .. ^∀^ ^∇^ ^~^ 。・・。  ̄^ ̄ data-filepath data-filter<&&><||>==> =?= data-flags .*..+..-../~..<=..>=..~. containsAll containsNone containsSomedata-function-meld$$ $* *$ data-has:*: data-index!! data-interval! /=!/=?/=??!>=!>=?>=??>?>??\\ data-lens$!%%=!%=!&&=!*=!+=!-=!/=!=!||=%%=%=&&=*** *=+=-=//=^! ^!%=^!*=^!+=^!-=^!/=^!=^$^$!^%%=^%=^*=^+=^-=^. ^/=^=||=~= data-lens-fd!%%=!%=!&&=!*=!+=!-=!/=!=!||=%%=%=&&=*=+=-=//=||=~=data-lens-light!%=!=%=^. ~= data-named<> data-pprint=== data-sketches:< :<= data-sketches-core! :< :<= :> :>= data-store .&& ./= .: .:. .< .<= .== .> .>= .|| :. data-tensor>< >?< ?<> ?>< data-timeout# #<#> data-type:*: data-validation =::asdclabel./\. .\/. <> >< dclabel-eci11./\. .\/. <> >< ddc-core$: kFun makeTFun tFun tImpl ~> ddc-source-tetramakeTFun ~> dead-simple-json? decidable&&&-->-->#-?>-?>#<==>==>|||decision-diagrams.&&..<=>..=>..||.\\ deep-map @! @!| @>@? @?? @??| @?| @|\\ deep-transformations$<$> deepcontrol*****: ****-: ****-> ****-| ****: ****| ***-* ***-*: ***-*> ***-*| ***--: ***--> ***--| ***-: ***-> ***-| ***: ***| **-* **-** **-**: **-**> **-**| **-*-: **-*-> **-*-| **-*: **-*> **-*| **--* **--*: **--*> **--*| **---: **---> **---| **--: **--> **--| **-: **-> **-| **: **| *-* *-** *-*** *-***: *-***> *-***| *-**-: *-**-> *-**-| *-**: *-**> *-**| *-*-* *-*-*: *-*-*> *-*-*| *-*--: *-*--> *-*--| *-*-: *-*-> *-*-| *-*: *-*> *-*| *--* *--** *--**: *--**> *--**| *--*-: *--*-> *--*-| *--*: *--*> *--*| *---* *---*: *---*> *---*| *----: *----> *----| *---: *---> *---| *--: *--> *--| *-: *-> *-| *: *>> *>>> *>>>> *>>>>> *| -* -** -*** -**** -****: -****> -****| -***-: -***-> -***-| -***: -***> -***| -**-* -**-*: -**-*> -**-*| -**--: -**--> -**--| -**-: -**-> -**-| -**: -**> -**| -*-* -*-** -*-**: -*-**> -*-**| -*-*-: -*-*-> -*-*-| -*-*: -*-*> -*-*| -*--* -*--*: -*--*> -*--*| -*---: -*---> -*---| -*--: -*--> -*--| -*-: -*-> -*-| -*: -*> -*| --* --** --*** --***: --***> --***| --**-: --**-> --**-| --**: --**> --**| --*-* --*-*: --*-*> --*-*| --*--: --*--> --*--| --*-: --*-> --*-| --*: --*> --*| ---* ---** ---**: ---**> ---**| ---*-: ---*-> ---*-| ---*: ---*> ---*| ----* ----*: ----*> ----*| ---->= ---->~ --->-= --->-~ --->= --->>= --->>~ --->~ -->--= -->--~ -->-= -->->= -->->~ -->-~ -->= -->>-= -->>-~ -->>= -->>>= -->>>~ -->>~ -->~ -< ->---= ->---~ ->--= ->-->= ->-->~ ->--~ ->-= ->->-= ->->-~ ->->= ->->>= ->->>~ ->->~ ->-~ ->= ->>--= ->>--~ ->>-= ->>->= ->>->~ ->>-~ ->>= ->>>-= ->>>-~ ->>>= ->>>>= ->>>>~ ->>>~ ->>~ ->~ .* .** .*** .**** .***** <$| <****- <***- <***-* <***-- <**- <**-* <**-** <**-*- <**-- <**--* <**--- <*- <*-* <*-** <*-*** <*-**- <*-*- <*-*-* <*-*-- <*-- <*--* <*--** <*--*- <*--- <*---* <*---- <*| <-* <-** <-*** <-**** <-***- <-**- <-**-* <-**-- <-*- <-*-* <-*-** <-*-*- <-*-- <-*--* <-*--- <--* <--** <--*** <--**- <--*- <--*-* <--*-- <---* <---** <---*- <----* <-< <<$| <<* <<*| <<<$| <<<* <<<*| <<<<$| <<<<* <<<<*| <<<<<$| <<<<<* <<<<<*| <| >- >----= >----~ >---= >--->= >--->~ >---~ >--= >-->-= >-->-~ >-->= >-->>= >-->>~ >-->~ >--~ >-= >-> >->--= >->--~ >->-= >->->= >->->~ >->-~ >->= >->>-= >->>-~ >->>= >->>>= >->>>~ >->>~ >->~ >-~ >>---= >>---~ >>--= >>-->= >>-->~ >>--~ >>-= >>->-= >>->-~ >>->= >>->>= >>->>~ >>->~ >>-~ >>== >>=> >>>--= >>>--~ >>>-= >>>->= >>>->~ >>>-~ >>>= >>>=> >>>>-= >>>>-~ >>>>= >>>>=> >>>>>= >>>>>=> >>>>>~ >>>>~ >>>~ >>~ |$> |$>> |$>>> |$>>>> |$>>>>> |* |** |*** |**** |*****| |****- |****| |***- |***-* |***-*| |***-- |***| |**- |**-* |**-** |**-**| |**-*- |**-*| |**-- |**--* |**--*| |**--- |**| |*- |*-* |*-** |*-*** |*-***| |*-**- |*-**| |*-*- |*-*-* |*-*-*| |*-*-- |*-*| |*-- |*--* |*--** |*--**| |*--*- |*--*| |*--- |*---* |*---*| |*---- |*> |*>> |*>>> |*>>>> |*>>>>> |*| |-* |-** |-*** |-**** |-****| |-***- |-***| |-**- |-**-* |-**-*| |-**-- |-**| |-*- |-*-* |-*-** |-*-**| |-*-*- |-*-*| |-*-- |-*--* |-*--*| |-*--- |-*| |--* |--** |--*** |--***| |--**- |--**| |--*- |--*-* |--*-*| |--*-- |--*| |---* |---** |---**| |---*- |---*| |----* |----*| |<<<<<| |<<<<| |<<<| |<<| |<| |> |>=> |>>= |>>=> |>>>= |>>>=> |>>>>= |>>>>>= |>>>>>| |>>>>>~ |>>>>| |>>>>~ |>>>| |>>>~ |>>| |>>~ |>| |>~ deeplearning-hs>-> deepseq$!!<$!!>deepseqdefinitive-base5!+ # #? $^ %%- %%~ %- %~ & * *> *>>> + ++ +++ - -. . .+ .- / :**: <#> <$ <$> <&> <* <**> <*= <*> <.> <<< <=< <|> =- =<< =>> =~ >=> >> >>= >>> >>>= >>>>= >>^ >>~ ^. ^.. ^>= ^>> ^? ^?? ||| definitive-parser<*< <+> >*> definitive-reactive// <*|> <|*> dejafu->- === =>= ~= dense! !? *^// ^*^+^^-^^/dep-tCompose dep-t-advice:*Anddependent-hashmap! :=> dependent-map! :*:\\ dependent-sum:=>==>derivation-trees! +: :- <> === derive&&: &&:: ++: ++:: ->: .: .:: <**<++><+?><^^>==: =~= >: >>: >>:: >>=: ?~= derive-gadt.->. |.| deriving-compatViaderiving-trans..>./>.|>:..>:.|>derp<|> <~> ==> derp-lib<~ ~> dhall<<<>$<>*<>|<dia-base*. .*. .+. .-. <|> >-< ~~ diagrams## *. .*. .+. .-. // <> diagrams-contrib-..-.--.=.======^= diagrams-core*. .>.>>:-:<-> atop diagrams-lib####%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*. *=*>*~+=+~-=-~.=.>.>>.@=.@~.~//=//~:&:<:>:~:<#%=<#%~<#=<#~<$<$><%=<%@=<%@~<%~<&&=<&&~<&><*<**=<**~<*=<*><*~<+=<+~<-=<-~<. <.=<.~=<<<>~<<>=<<>~<=<>~$?=???~@@^#^&^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~atatopbeneathconsfailingmagnifysnoczoom|>||=|||||~~~ dialog<> diff-loc.+.-..-.? :..difference-monoid:-: digestive-functors.: dimensional)!! $$!&&****>*~*~~+++-. //=/~/~~<<$<$><*<*><=<>=<<==>>=>>>>=^^/^^divelemmodnotElemquotremseq||dimensional-tf ****~*~~+-//~/~~^^+^/ dimensions!*$***!*$++++:-:!:$:$$::*:+:- :<>:DivMod\\^ dingo-core.+. .>*. .>. .~. dino+!! $$!&&****>+++--->. ./ //=:->:×: <<$<$><*<*><++> <. <=<>=<<====!>>=>>>>=^^^divelemmodnotElemquotremseq||directory-tree:/ dirtree.* .*. .*> ./ disco ! $+$ %=.- .=:*::+::->:<+> <> ==>@@ |-> discokitty? @@@ discord-haskell.== .=? /?discrete-intervals++? +/-.../=! /=? ! >=! >=? >? ||? distributed-closure/->distributed-process-fsm*> .| <| ^. |> ~> ~? ~@ distributed-process-lifted.: distributionandThendistribution-opensuse)!! $$!&&&&^ ****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||||^ ditto@$dixi|: djinn-lib&:-><->|:dlist:|cons snoc dlist-nonemptycons snoc dmcc1$$!$!!$>&&&&&*******>+++-. //=<<$<$><&&><&><*<**><*><.><=<=<<><|<|><||>=<<==>>=>=>>>>>=\\ ^^^div hashWithSaltmodonquotrem||dmenu.= do-notation>> >>= do-notation-dsl>> >>= doclayout$$$+$<+> docrecords %%~&:-. -/..~:|: <<$$>> <<|>> =:=:= ^^.^^?^^?! dollaridoos $*$**$+$$-$$/$/$$^$^^*$domplate<> dormouse-uri&  =: ?dotgen.->. dotparse<|>dove&&. <. <=. ==. >. >=. ||. dovetail~>dph-lifted-copy!: $: $:^ && * ** + +:+ - / /= < <= == > >= || dph-lifted-vseg!: $: $:^ && * ** + +:+ - / /= < <= == > >= || dph-par!: $: $:^ && +:+ / || dph-prim-interface+:+ dph-prim-par+:+ dph-prim-seq++ +:+ dph-seq!: $: $:^ && +:+ / || dpor&+& :| drClickOn:| <^> drinkery$&+&++$++&dsmc.* .^ <+> <-> >< dsp^!dsv<<<<<<- >-> >>>>>>- dualizer<^< =>> >^> duckling! dumb-cas%$>&~!&~:&~?&~~!&~~::= :=: dunai&|& *|* >>>^ ^>>> dunai-core &|& *^ *|* >>>^ ^* ^+^ ^-^ ^/ ^>>> dvda:* dwarf!? dwarf-el!? dyna<@<@>|> dyna-brick&&**^+:+ .+^.-..-^/=*<*<+> <.><=*<=> <@<@>=:= ==*>*>=*^*^+^^-^^/||* dyna-gloss<@<@>dynamic! dynamic-cabal=<<< >>>= dynamic-pipeline .*. :<+>:=>|=>|=>||>=>|>=>||>>|>>> dynamic-pp <$$> <$> <+>   <> dynamodb-simple&&.+=.-=./=.<.<.><=.=.==.>.>=.||. dzen-dhall=>> dzen-utils## +++ +-+ +/+ +<+ +=+ each~! easy-bitcoin=== easy-file<.> easytensor! %*.!.*.:*:*:·×easytest/=====ede.= @: edenmodules# $# edis>>>edit<=<>=> effect-monad:! :-> >> >>= effectful-core<|>effective-aspects-mzv# effects=:effin:+ :- eigen! eio>> >>= electrs-client:$$!$!!$>%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodquotremseqxor||elevator*++* elision &&& *** +++ // />> <>^ ^<< ^>> ||| elm-compiler<| |> elm-syntax++ << <| >> |> elynx-tools=~= email-headeremdsiftAndsiftOremgm:*: endo&$ <&$> entwine!$$!$>&&&**>+-. /=<<$<$><*<**><*><=<><|>=<<==>>=>>>>=andAdivelemnotElemonorA|| enum-text-rio+|+|||+|++||++||||+||++|||++|| enumerator$$ $= <==< =$ =$= ==<< >==> >>== enumfun! enummapmap:& enummaps! !? \\ enummapset! \\ enummapset-th! EnumMap\\ enumset.&..-..|.envparse<=<<>>=>envy.!= .= epass.>  epic!. +> @@ epoll=~ eq:=:==equational-reasoning /\:- :/\::=::\/::~:=<=====>==~=Because\/because equivalence=== error-continuations?> error-or-utils/=!!>=! error-utilerrors!? ?:?? ersaconcat>.> ersatz ! &&/==<=?<=?# >=?>?|| escape-artist/<>/^$ esqueleto2!=.#-.#>.#>>.% &&.*.*=.++.+.+=.--.-.-=.->.->>././=.:&<# <&> <.<=.<@.=.==.>.>=.?&.?.?|.@>. CrossJoin FullOuterJoin InnerJoin LeftOuterJoinRightOuterJoin^. crossJoincrossJoinLateral fullOuterJoinilike innerJoininnerJoinLateralleftJoinleftJoinLaterallikeon rightJoin||.essence-of-live-coding&&&***+++:~::~~:<+><<<<<^>>>>>>= >>>== >>^^<<^>>|||eternal<<| <| |> |>> euphoria<$?><-*?><@ <@> <~~> eved..<|> :<|>eveff:* event-list.//. event-monad& &- ?: ?:: @: eventloop|* |+| |-| |/ eventsourcing:~ eventstore:|<>eventuo11y-dsl≔every-bit-counts+> exact-real *..*.*././^ mulBounded mulBoundedL plusIntegershiftLshiftRexh!! ^..:^?: exhaustive&:exotic-list-monads+++ <> exp-pairs:/:<.<=.>.>=.expand* + ? explainable-predicates==~ @?~ explicit-constraint-lens%%~%~&. .~^.∘ explicit-exception alternative alternativeTappendappendMbindTcontinue continueM maybeAbortmergemergeTsimultaneousBindsimultaneousBindMexplicit-sharing? exposed-containers! :*: :< :> <| >< \\ |> express)$$ +++-$--%- -&&--*--++--+--.- -.. -..- -... -...- -/=--:-:--<--<=--==--==>-->:->:: ->>:->>>:->>>>:->>>>>:->>>>>>: ->>>>>>>: ->>>>>>>>: ->>>>>>>>>: ->>>>>>>>>>: ->>>>>>>>>>>:->>>>>>>>>>>>:-?- -|- -||-// //- :$ |++| |=>| expressions.&..*. .+..->../=..<-..<->..<..<=..=..>..>=..\..|.:+: expresso.: .= extended-categories&&& *** . :.: :><: <> extended-containers! !? <|><|> extensible++-$> :>=<:@:>@=@==Compose caseOfhappendextensible-data:*= :+? extensible-effects! >>- ^$ ^|> extensible-skeleton@!? extensible-sp<& extra!? &&&&&^ ***|:|>||^ extrapolate */=* *<* *<=* *==* ++++|-&&-:$ ==: ==>><\/\\//factory!/!*=<*><=><^=*==+==-==^=~>*<>/<>^fadno%/: @:|:fair-predicates/\ \/ fake&>>=faktory'!! $$!&&****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||fallible!?=!????=??? fast-downward?= fast-logger<>fastsum:<:<:fay+!! $$!&&&&&*******>++++++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemnotElemonquotremseq|||||fay-base#!! $$!% &&***+++-. //=<<*> <=<=<<> =<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq||fay-hsx:= fay-simplejson.< .> fb#= fclabels=.=:>-Isoforfeldspar-language(! !: $< && &&* ** *** ++ +. .&. .* .+ .- ... .< .<<. .>>. .|. /= /\ :+ :. :> < <=  > >= ? ?! ?> \/ ^ |> || ||* ⊕ ffeed-=> fficxxtyapptyfunffthasfgl& ><fields# #! #!! #$ *# .# <##> <#> <.#> <=: <=~ =* =: =~ filemanip &&? .&.? /=? /~ /~? <=? =? >? ||? ~~ ~~? filepath!? -<.><.>conssnocfilepath-bytestring-<.><.> filepather-<.>-<<-->>- filepattern?== filtrable<$?><*?>fin-int *! *% *? +! +% +? -! -% -? find-conduit=~ fingertree:<:><|><|>fingertree-psqueue:-> fingertree-tf:< :> <| >< |> finite # #<< <<# \# |/=| |<=| |<| |==| |>=| |>| finite-table! finite-typelitsequalsfinito#/=#<#<=#=#>#>=/\\/first-class-families $&&&***--><$><*><=<=<<||first-class-instances==>first-class-patterns-->->>-?>/\ :++: <+> <|>\/ fitspec*** ... fixed-length!: fixed-list:. fixed-point*! *. /! /. fixed-vector! fixer:| fixplate:*::+:<$elemflac=->flat<> flatbuffers~> flatparse<|> flexible-time.+ .- flow!>.> flow-er!<!>$!>$>$>>$>>=*$!>*$>**$!>**$>*>.> !>||<|>flp# :# :+ ::: :@ :|| <##> <#> <+>  <| HappyStk |: |> fluid-idl-< <.> <: <:> fmt+|+|||+|++||++||||+||++|||++||fn!=> // /? ==> fn-extra&= for-free:< foreign-var$= $=! $~ $~! formatting% %+ %.<%+> <>forsyde-shallow!-+-+-::-:><+><: fortran-src:|aCons foscam-sort/<>/ foundation-! $$!&&**>+-. .&..<<. .>>. .|.|.//=<<$<$><*<*> <=<><|>=<<=====>>=>=>>>>>=^^^onrotaterotateLrotateRseqshiftshiftLshiftRxor||fp-ieee*+-/ genericAdd genericDiv genericMul genericSubfpipe$> .> <$ <. frame+> -.- <+ ? ?? fraxl|:| freckle-app4$$!&&&&&*******>+++-. //=<<$<$$><$><*<*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseqshouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith||free:<Apfree-categories. :<<:>>free-operational:<**> :>>= free-vector-spaces *^.+^.-.<.>^*^ ^+^^-^^/!^/^free-vl.:. freelude$$!*> . <$ <$><* <**><*> <<< =<<>> >>= >>> freer<$ >< |> freer-effects>< |> freer-indexed *>:<$!>:<**>:<*:<*>:<=<:=<<:>=>:>>>>:>>=>>=: freer-simple:++:>< |> ~> freesound& fresco-binding#: fresnel #%~**~*~+~-~.~/~^.^?^^~^~fresnel-fused-effects%=*=+=-=.=//=<~?=friday! !? :. frisby####>*>->>////><$<$><*<**><*><++><<-<><|>front! !? frp-arduino=:~> frpnow*^ .: <@> <@@> ^+^ ^-^ ^/ fst :&: :.: :|: <&> <*> <-> <.> <|> |> fudgets-*--+--==-:&: =.> >#+< >#==< >&< >*<>+#< >+<>..=<>.=<>=..<>=.<>==#< >==<>=^<>=^^<>^=<>^^=<ifCthenC full-sessions>>> >>>= funcmp#& **.&..*.--..-........./= .< .<= .=.== <*<+|-||=||||||||funcons-values=/= === functional-arrow<<<& =<<< >>>= functor-apply$> -<- -<< ->- .> .>>  <$ <$> <. <..> <.> <<$>> <<. <<..>> <<.>> >>- functor-combinators !$!!*!!+!:*::+::<$>::>$<::>>= <:> <~> functor-combo! :# :*! :*: :*:! <~ ~> functor-infix(<$$$$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$$><$$$$$$$$$$$$$$><$$$$$$$$$$$$$><$$$$$$$$$$$$> <$$$$$$$$$$$> <$$$$$$$$$$> <$$$$$$$$$> <$$$$$$$$> <$$$$$$$><$$$$$$><$$$$$><$$$$><$$$><$$><$><&&&&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&&><&&&&&&&&&&&&&&><&&&&&&&&&&&&&><&&&&&&&&&&&&> <&&&&&&&&&&&> <&&&&&&&&&&> <&&&&&&&&&> <&&&&&&&&> <&&&&&&&><&&&&&&><&&&&&><&&&&><&&&><&&><&>functor-monadic$> .> <$< <$=< >$> >=$> |> functor-products:&:&|::& functor-utils$|. .:.:..::.::.<$|><<$>><<*>><<<$>>><<<*>>> <<<<$>>>> <<<<*>>>> <<<<<$>>>>> <<<<<*>>>>><|$>Compose |$∘ ∘∘ ∘∘∘ ∘∘∘∘∘∘∘∘∘functors& . .: .:: funflow:^fungll-combinators**>**>>><$$<$$><**<**><**>><**>>><::=<::=><:=<:=><<**><<<**<<<**><||>funpat.=. :=: ~> fused-effects:+:<|>~<~fused-effects-lens%=*=+=-=.=//=<~?=fused-effects-optics%=.=<~ ?=fused-effects-squeal$! !+!-!-!#-.&*: +!.! .#>.#>>.& .&&.-..->.->>./=.<.<=.==.>.>=.? .?& .?| .| .||:*::::=>:>><-> <@ >>>@> @@ fusion>-> futhark.&&..&. .<..<<. .<=..==..>..>=..>>. .^. .|. .||.:< :> :>>: <-- <| <~~|> ~*~~+~~-~~/~~==~ fuzzcheck?> fuzzyset|>fwgl! # $ && * *~> + - -= . / /= :- := :~> < <= == > >= ^ || ~~ ~~> g4ip-prover/\<==<=>==>\/ galois-field*^gasp**<*^+-. /<+> =.=^^+divmod· × ⊗ ⊙ gcodehs& <#> gdp$: &&-->... ...> ...? /\:::====. ?AndImpliesOr\/||∧∨gedcom<&>gelatin-shaders:& general-prelude$! * + - / generic-data%~Divgeneric-data-surgery:>>generic-deepseq$!! generic-derivinggsappend gsappend'gsappenddefaultgeneric-functor:+generic-labels:= generic-lens.~^.generic-lens-core:> generics-sop-.->:*:.:AndCompose genericserialize=>> >>$ genvalidity-property<==> ===> genvalidity-sydtest<==> ===> geo-uk! geomancy !* !. *^ .+^.-..-^.@ ^* ^+^^-^^/ dotgf ! !$ !* $$$+$+++++++++++++++- ++-<+><>ghcc!! $$!$$$+$&& ****>+++-. .&..|.//= < <$<$><&&><*<*><+><.> <= <><||>=<<== > >.>>= >>>>=AppSynFun^^^andWhenContinueappOLasJoinIdasJoinId_maybeconsBagconsOLdivelem idCafInfomkAppsmkCoApps mkCoreApp mkCoreAppsmkFunTy mkInvisFunTymkInvisFunTyManymkTyApps mkVarApps mkVisFunTymkVisFunTyManymodnotElemorElsequotremrotaterotateLrotateR setArityInfo setCafInfo setCprSigInfo setDemandInfo setDmdSigInfo setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragInfosetInlinePragmasetLevityInfoWithTypesetNeverRepPoly setOccInfosetOneShotInfo setRuleInfosetUnfoldingInfoshiftsnocBagsnocOLthenCmp xor|>|>>|| ghc-bignum&&#||#ghc-corroborate($$ $+$ <&&><+> <> <||>AppasJoinIdasJoinId_maybe idCafInfomkAppsmkCoApps mkCoreApp mkCoreApps mkInvisFunTymkTyApps mkVarApps mkVisFunTy setArityInfo setCafInfo setDemandInfo setIdAritysetIdCallAritysetIdDemandInfo setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdStrictnesssetIdUnfoldingsetInlineActivationsetInlinePragInfosetInlinePragmasetLevityInfoWithTypesetNeverLevPoly setOccInfosetOneShotInfo setRuleInfosetStrictnessInfosetUnfoldingInfothenCmp ghc-dump-util<$$> ghc-justdoit==> … ghc-lib*><$><*<*>>> >>= SynFunandWhenContinueasJoinIdasJoinId_maybe idCafInfomkFunTy mkInvisFunTymkInvisFunTyMany mkVisFunTymkVisFunTyMany setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragmaghc-lib-parserc!! $$!$$$+$&&****>+++-. .&..|.//=<<$<$><&&><*<*><+><.> <=<><||>=<<==>>.>>=>>>>=AppSynFun^^^appOLasJoinIdasJoinId_maybeconsBagconsOLdivelem idCafInfomkAppsmkCoApps mkCoreApp mkCoreAppsmkFunTy mkInvisFunTymkInvisFunTyManymkTyApps mkVarApps mkVisFunTymkVisFunTyManymodnotElemorElsequotremrotaterotateLrotateRseq setArityInfo setCafInfo setCprSigInfo setDemandInfo setDmdSigInfo setIdAritysetIdCallArity setIdCbvMarks setIdCprSigsetIdDemandInfo setIdDmdSig setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdUnfoldingsetInlineActivationsetInlinePragInfosetInlinePragmasetLevityInfoWithTypesetNeverRepPoly setOccInfosetOneShotInfo setRuleInfosetUnfoldingInfoshiftsnocBagsnocOLthenCmp xor|>|>>||ghc-mod$$$$$ <$$><+>:<=><||>\\ modifyError'ghc-prim&&*#*##**## +#+##-#-##/##/=/=#/=##<<#<##<=<=#<=##====#==##>>#>##>=>=#>=##seq||~~~ ghc-proofs=/====ghc-source-gen--><--==>@::@ @@ghc-tcplugin-api:-::|:mkInvisFunTyManymkVisFunTyManyghc-typelits-extraDivModghc-typelits-presburger :&&:*:+:-:/=:<:<=:==:>:>=:|| ghci-diagrams*. .*. .+. .-. <|> >-< ghci-hexcalc .%.&.++./.<<.>>.@.^.|ghcide $$ <+><>mkFunTy mkInvisFunTymkInvisFunTyMany mkVisFunTymkVisFunTyManyorElse ghcjs-base! .!= .: .:? .= :*: ^! consghcjs-base-stub! cons ghcjs-hplay++>.= gingersnap.! .!? git-remote-ipfs% github.!= .: .:? .=.=? <><|> hashWithSalt github-data.=? github-rest.: :=glambda$$ glazier orMaybeExecglib::=::~:=:=>:~:~>glirc:- gll**>**>>><$$<$$><**<**><**>><**>>><::=<::=><:=<:=><<**><<<**<<<**><||> glob-posix<>global=:: gloss*+- gltf-codec.!= .: .:? goal-core'$$!!&&&*******>++++-. .! .: .= <$<$!!><$!><$><*<**><*><<<<<^<=<=<<=?<|>=<<>=>>>>>=>>>>>^Div^^<<^>>on||| goal-geometry##*.>/><$< <*<.< <.>>$+> >$< >$> >+> >.+> >.< >.> goal-probability*<$<*<.<>$>*>.>* gofer-prelude!! $ && * + ++ - . / /= < <= == > >= \\ ^ || gogol! gogol-core,!! #$$!&&****>+++-. .!= .: .:? .=//=:<|>:><<$<$><*<*><=<>=<<==>>=>>>>=^^.^^divelem hashWithSaltmodnotElemquotrem|| google-drive?!= ?&& ?< ?<= ?= ?> ?>= ?|| google-search/\ \/ gore-and-ash&&&! &> ***! --> <& >-- gps/\ \/ grab/ grakn-: .: <: grammar-combinators $>> $>>* $|>> $|>>* *>>> <||| >>> >>>* >||| ||| grammatical-parsers<<|>grapefruit-frp#><#<#><| >< sfApp|> grapefruit-records:& := app grapefruit-ui<<| >>| with|<< |>> graph-rewriting:-: <|> >>> graph-trace$$ $+$ *><$><*<*><+> <.> <> consBag mkCoreApp mkCoreApps mkInvisFunTy mkVisFunTysnocBag graph-utils:=> graphics-drawingcombinators%% graphite--> <-> graphql-api:<>:>graphql-client.=graphted *><$<$> <*<**><*><+> <|> =<<>>>>=graphviz&*>--> <$<$$><$><*<**><*><++><+><-> <|>applybesidediscardgraql-: .: <: greskell $.&.-:.: <$.><*.><=:> <=?> =: greskell-core.: grid! grids// :$$::<>:?! groundhog &&./=.<.<=.<>=.==.>.>=.||.~>groundhog-postgresql! !: # ## && &< &<| &> *.+.-.->. /.<-> << <<| <@ <^ >> >^ ?# ?& ?- ?-| ?| ?|| @> |&> |>> ~= group-theory $-*+--$/><^~~×groups~~guarded-rewriting+-> // h-booru<:+> hBDD--> /\ <-- <-> \/ hPDB! *| ++ |* hScraper>=> |>> ~=~ hSimpleDB:= hTensor! !> -|.*/\\/|*|~>hablo.$ hackage-security! <$$> <.>  hactors! !>   hadoop-rpc hafar*/ *\ +/ +\ -/ -\ .* .+ haiji:->hails-: <== =: ==> hakaru5! &&****>+-.!=. .&&. .*. .*=. .+. .+=. .-. .->. ... ./. .<. .<=. .=. .==. .>. .>=. .||. //=:$:*:->:@<<$><*<*><=<|> ==>>=>>>>=CConsCons1EtPEtSEtSFunSPlus^^^app thRootOf ||hakka! hako<++> hakyll.&&..||.hamsql// <-> <.> <><\> hamtmap! hamusic! -|- >< hanabi-dealer||| haphviz--> .: =: happstack-foundation:= happstack-ixset &&& @* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= ||| happstack-state:+: happstack-util.^ happy-metaHappyStk haquery-.haquil*^*^^^*^*^^^*harg:*:+:->harp+++ harpy@@ has& .> ^- ^. ^: ^= hasbolt=: hasbolt-extras!-:!->:# -:.# .&.: :!-::!->::&&:&&::-!::<-!::==:||:||:<-:=: hascas# hascat-lib// hashable hashWithSalthashable-accelerate hashWithSalthashmap! \\ hashmap-io! !? hashring! hask! # $ . \\ haskell-adminwith haskell-admin-corewith haskell-bitmex-rest-&- haskell-ci/!! $$!&&&****>+++-. .~//=/\:|<<$<$><&><*<*><=<><|>=<<==>>=>>>>=\/^^.^^^^^divelemmodnotElemonquotremseq||~> haskell-conll:+:haskell-course-preludes&& * *. + +. - -. . /= /=. < <. <= <=. <> == ==. > >. >= >=. >> || haskell-generate<>$ <>. haskell-gi/. haskell-gi-base$++. /=:=:=>:~:~><$>=<<==>=>>>>>=haskell-neo4j-client<> |: haskell-src-exts<**<++><+?><^^>=~= haskell-src-meta.->. |$||->| |.| haskell-src-meta-mwotton.->. :$ |$| |->| |.| haskell-tools-ast-trf<> "haskell-tools-builtin-refactorings:&&: :||: haskell2010 ! !! $ $! % && * ** + ++ - . .&. .|. / // /= :+ < <= <=< =<< == > >= >=> >> >>= \\ ^ ^^ || haskell20202! !! $$!%&&****>+++-. .&..|./// /=:+<<*<**><*><=<=<<|>=<<==>>=>=>>>>>=\\^^^divelemmodnotElemquotremrotaterotateLrotateRshiftshiftLshiftRxor|| haskell98! !! $ $! % && * ** + ++ - . / // /= :+ < <= =<< == > >= >> >>= \\ ^ ^^ || haskell98libraries ! !! % ++ // :+ =<< >> >>= \\ haskelldb! !. # .%. .&&. .*. .++. .+. .-. ./. .<. .<=. .<>. .=. .==. .>. .>=. .||. << <<- haskellish<*!>   haskelzinc!. !=.#/.#|.$$ % *.++.+.-.->...././\.<-.<->.<.<=.=.=.=>.>=.@@\/.where_|:haskgame*** haskhol-core#<< <#< <#>  \\ hasklepias!>$&&*>++. .> <<*<*><. <=<|==>>=>>>>=|>|| haskoin-core++/ haskoin-store-data<++> <+> <:> haskoon:= haskore%+ &&* +:+ /=* /=: :+: :=: <* <=* =/= =:= ==* >* >=* ||* haskore-vintage/=: :+: :=: =:= hasktorch-codegen$!! $$!&&****>+++-. //=<<$<$><*<*><=<><|>=<<==>>=>>>>=^^^divelemmodnotElemquotrem||hasktorch-indef!! !* !*! *^ +^ -^ .:/^ <.> ^*^*^ ^+^+^ ^-^-^ ^/^/^ haskus-binary+#-#.&. .*. .++. .+. .-. ./. .<<. .>>. .|. <#<=#==#>#>=# haskus-utils! <.< <=<<|<||<|||>.> >:> >=>>~:> >~:~> |>||>|||>haskus-utils-compat% %.conshaskus-utils-data++:> HCons\\elemnotElemhaskus-utils-types *+-:$$::<>:<=<=?DivMod^haskus-utils-variant>%:>>-:>>:%:>>:-:>>::>>:>>> >>= hasql-simple->. ->? hasqlator-mysql&&.*.++.+.-././=.:=<.<=.=.>.>=.@@ ||. hasqly-mysql.+ .- .> haste-compiler! # .: .:?  =: ~> haste-perch! hat!! !!! !$ !$! !% !&& !++ !. !/ !// !<=< !=<< !>=> !>> !>>= !\\ !^ !^^ !|| *! *!! *$ *$! *% *&& *++ *. *// *=<< *>=> *^ *^^ *|| +! +!! +#!##=%=#!#$=^^== +#!&!=%=#!&$=#&== +#!^$=%=#!^&=$*== +##!^=%=##!>=%+== +##&&=%=##&+=&^== +##@%=%=##@*=*@== +#$$*=%=#$$^=+>== +#$^#=%=#$^*=#&== +#%$$=%=#%$+=$*== +#&#=*=#&#=%+- +#>#=*=#>#=%>** +#^*=*=#^*=%*/ +$ +$! +% +%#>*=%^=%#>*=%@== +%$$%=*=%$$%=&%<= +%$$&=*=%$$&=&%< +%$$@=*=%$$@=*#* +%$$^=*=%$$^=*&+ +%$%@=*=%$%@=&$/ +%$^=*=%$^=$@>> +%+!=%=%+!=#^== +&#^=%=&#>=$&== +&& +&@$=*=&@$=&><= +&^@=*=&^@=&>== +*!+=*#=*!+=*$== +*$!=*=*$#=%#>>= +*$@=*#=*$@=*$== +*&+=&=*&+=$$>>= +**&=$#=**&=$$== +*+*=%=*+*=$&== +*++=%=*++=$&/= +*+>=%=*+>=$&< +*^!=%=*^!=$&<= +*^#=%=*^#=$&>= +*^$=%=*^$=$&> +*^*=$=*^*=$^+ +*^+=$=*^+=$@- +*^^=$=*^^=$@* ++$%=%=+$%=$@== ++$&=%=+$&=$@/= ++$>=%=+$>=$@>= ++$@=%=+$@=$@<= ++$^=%=+$^=$@< ++%!=%=+%!=$@> ++%%=$=+%%=%!+ ++%&=$=+%&=%!- ++%*=$=+%*=%!* +++ ++>=*=+>=%+/= ++>@=%=+>@=$+/ ++@!=%=+@!=$+<= ++@#=%=+@#=$+>= ++@$=%=+@$=$+> ++@*=$=+@*=$@+ ++@+=$=+@+=$@- ++@^=$=+@^=$@* ++^*=%=+^*=$+== ++^+=%=+^+=$+/= ++^>=%=+^>=$+< +. +// +:% +:+ +=<< +>!%=*=>!%=%>>>= +>#+=%=>#+=%>== +>%#=%=>%#=**== +>&^=%=>&^=^#== +>+*=%=>++=**== +>=> +>@^=%=>@@=++== +@+=*=@+=&#<= +@>=*=@>=&#> +@@%=%=@@*=$+== +@@=*=@@=&#>= +@^=*=@^=&#< +^ +^!=*=^!=%+== +^*%=%=^*%=$^== +^*&=%=^*&=$^/= +^*>=%=^*>=$^>= +^*@=%=^*@=$^<= +^*^=%=^*^=$^< +^+!=%=^+!=$^> +^+%=$=^+%=$>+ +^+&=$=^+&=$>- +^+*=$=^+*=$>* +^^ +^^+=%=^^+=$^/ +|| :% :+ |/ |>> |>>= haxl1!! $$!&&****>+++-. .&&.++ ./=.<.<=.==.>.>=.||//=:<$> :>>= <<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElempAndpOrquotremseq||hbayes.!. .&. .==. .|. =: ~~ hbf<&> hcg-minus~= hcom.+.hcube<* |**| |*| ~> ~| hdf~. ~: ~:> ~<: ~~ hdiff// :>: hdirect # $$ $+$ -= -== -=== -==== -? <+> <> heart-core'!! $$!&&****>+++-. //=:<|:|><<$<$><*<*><=<><|>=<<==>>=>>>>=^^^divelem hashWithSaltmodnotElemquotrem||hedgehog'!! $$!&&****>+++-. //=/==:.<<$<$><*<*><=<>=<<=====>>=>>>>=^^^divelemmodnotElemquotremseq||hedgehog-classesheqheq1heq2hneqhneq2 hedgehog-fn:->hedgehog-servant:*:hegg! %~.~:=:|^.|: heidi!: helium!::! !:::! !<=! !<==! .::. .:::. .<=. .<==. .==. .===. :-> <:> <==> ===> >:> |^| helm<~ ~~ her-lexer<*^ hercules-ci-agent=: hercules-ci-cnix-expr#. #? #?! #?? $? ->.->?.$ ::.::?=: >>$. >>$? >>. >>? |! hermit $$ $$$ --> .& .+ .|| /\ <$> <*> === ==> \/ hesh !> !>> &> &>> .= /> />>  hetero-dict:= hevm .&&./=.<.<=.==.>.>=.||^ hexpat-lens./ hexpat-streamparser<|>hextra!!? $? .< .> <-> <. <.- <.> <::><:><<>>>. \* \+ \- heyting-algebras<+><.> =====>hformat~%~~ hgeometric/\ <+> \/ \\ hgeometry *^.+^.-..-^^*^+^^-^^/|.| hgeometry-combinatorial :+:<:<<:<|:>:|><|><|> hgeometry-ipe! hgrep$$!$>&&&*> . /= < <$ <$><* <**><*> <= <><|> == > >= >> >>= on|| hi3status%% hiedb:.<+> higherorder?? highjson.-> .= .=? :&:+::|:@-> highlighter:. highlighter2:. hindley-milner<@> hint:= hinter:= hinze-streams** / // <: << <> \/ ^ hip!&&!!+!!/=!!!!>=!!||!+:.&&../=..<..<=..==..>..>=..||.:+|*| hipe<| hist-pl-transliter#> .| .|. >#> >+> histogram-fill-<<<<-<<-$<<-|<< histogram-simple! hjson-query--> <+> <.> <> >>> hjugementnCkhjugement-protocol*+-/^o2 hkd-records:>:~>hlatex !$!$?$$ $$$ $?<&&> <><||> ^$⊕★ hledger-lib@@ hledger-web8!! !=.$$!&&****=.*>++++=.--=.. .: .=//<-./=/=.:#: <<$<$!><$><*<*><-.<.<=<=.<=<<>=.=<<====.>>.>=>=.>=>>>>>=^^^divelemmodnotElemquotremseq||||.hlist:.hls-cabal-plugin:| hls-graph/=== hashWithSalthls-plugin-api&hls-test-utils|? hly# ## ##@ #@ & &# hmatrix! !#>##>#|&././/<#<.><><\><·>===>< ? ?? applyapplyRaw|> |||¦¿ ——hmatrix-backprop##>&<.><><·>===||| hmatrix-glpk#:&: :<=: :==: :>=: hmatrix-nlopt:|hmatrix-static<-> <.> <> <\> <|> >< @> @@> hmemdb:&&: :&: :*: :+: hmm-lapackappendhmpfrshiftLhmt>>~ ^. ~> ∩∪⋄hmt-base.:.::.:::.::::.:::::hnetcdf#hnixU!!? $$!$!!$!=$&&$*$+$++$-$->$/$//$<$<=$=$==$>$>=$||&&&&&&&&^ ****>+++-. //=:|:~::~>:~~:<<$<$!><$><&><*<**><*> <<$>><<<<=<=<<><|>=<<====>>>$>$$<>$<>=>=>>>>>=>>>?:??@. @.<|> @@Compose ^^^callFuncdiv hashWithSaltlintAppmodonquotremseqxor||||^ hnn--> ho-rewriting$$ $- -$ -$- ===> hobbits! :++::> \\ hoist-error<%!?><%?>holmes.$ .%..&&.*.*..+.-././../=.<.<=.==.>.>=.>>= .||<<- homeomorphic<<| hommage-=- ->- .=> :$ :+: := :=: :><: :>> :? <*> <+> <>  ==> >< homotuple<$> <*> <>>>= hood<< hood-off<< hood2<< hoodle-builder<> hoodle-core# hoodle-render:- hoopl<*>|*><*|hoppy-generator~:hops!^! .* ./ ?^! ohora- hosc>>~ hpack.: .:? hpath hpath-filepath<.>  hplayground **> ++> .=  << <<< hpp%=.=:.hpqtypes:*: <+>hps+++ >+>hpython(&.!=.%.%=.&.&=.*.**.**=.*=.+.+=.-.-=././/.//=./=.:.<.<<.<<=.<=.=.==.>.>=.>>.>>=.@.@=.^.^=.|.|=/> in_isNot_is_notIn_ hreq-core// :.:=:>hs-fltk+|+ ::= ::=> := :=> hs-functors&&&***+++. <<=<<^=<==>==>>>$ >$< >>^^<<^>>|||hs-ix *><*<**><*><<=<=<=<<=<==>==>>>=>>>=hs-java! hs-opentelemetry-api.= .=? hs-pattrans $<.@ .@@ :@ <+> <=> >$>$<??~~ hs-pkg-config<.>  ~/= ~< ~<= ~= ~> ~>= hs-profunctors<<^>>^^<<^>> hs-twitter-=> hs-watchman.&&.: .|| hsSqlite3:. hsc3*.+.-..*.*..+.+..-.-.././..<<. .>>. /./=** <** <=** ==** >** >=** hsc3-lang *. +. -. .: .:: .::: .:::: .::::: /. <| hscassandra=: =| hscim hsdev!! & ++.+. .-. .:: .::? .::?! :.:=\\elemnotElem~~hsgnutls::= ::~ := :=> :~ :~> hsgnutls-yj::= ::~ := :=> :~ :~> hsgsom*. .* <+> <-> hslua-packaging####?<#>=#>=?>sincehsp:= <: <<: <<@ <@ hsparql*. +. .!=..&&..*..+..-...|.../..//..:. .<..<=..==..>..>=..|..||.?. hspec-attoparsec~> ~?> hspec-expectations shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrowhspec-expectations-json shouldBeJsonshouldBeUnorderedJsonshouldMatchJsonshouldMatchOrderedJsonhspec-expectations-lifted shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWithhspec-expectations-pretty-diff shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrow hspec-meta shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrowhspec-multicheck==> hspec-server@== @>= hspec-wai<:> ==>hspray*^.^^**^^*^^+^^-^ hsshellscript -&>--&>>--<-->-->>--|--|==>-=>>-=|-=|= hsverilog.: <== >< hsx:= <<: <<@ hsx-xhtml<> ^^ htlset:+ html! +++ << html-parse-util~/= ~== htoml-parse.!=.:.:? hts& &. htssets:+http-directory+/+ http-kinder/. /? http-media/. // /: /? http-pony-http-pony-serve-wai- http-query+/+huff/\\/hum?humble-prelude"$$!&&&****>+-. //=<<$<$><&><*<*><=<><|>=<<==>>=>>=^^^divelemmodquotrem|| hunit-dejafu->- === =>= hunt-searchengine.:: .::: .== .=? .\. <> huzzy=*> =|> ?&& ?|| hvect!! :&:<++>hw-aeson.!=.?=hw-bits.&..<..>..?. .^..|. hw-fingertree:<:><|><|>hw-fingertree-strict:<:><|><|> hw-hedgehog/== ?== hw-ip#<*># hw-mquery/^. /^.. >>^.>>^.. hw-parser hw-prim!!! :*: <|><|> hw-rankselect#<| <|><|>|># hw-uri-<.><.>hw-xml/> />>   <@> ?> @> ~> hx/!! $ $! && &&& * ** *** *> + ++ +++ - ->> . / /= < <$ <$> <* <**> <*> <+> <<< <<^ <= <=< <> <|> =<< == =>> > >= >=> >> >>= >>> >>^ ^ ^<< ^>> ^^ |> || ||| hxt$!!$$$<$<$$<<$<<<$<<<<+=.&&&.//>/>:-> .>>. hxt-filter $$ $$< +++ +++>> ++= += ..> .> .>> /> :-> <.> >:@->@@ hydrogen-cli-args! ? ~: ~= ~? hydrogen-parsing<+< >+> hydrogen-prelude! $$ $$$ $$$$ $$$$$ .& .^ .| <$$$$$> <$$$$> <$$$> <$$> =~ =~~ ? |> hydrogen-prelude-parsec<++> <:> hydrogen-util<+< >+> ~: hylolib! :&::-->::/=: :<-->::<: :<=: :=: :>: :>=: :|:?? |/= |= hypergeomatrix+: hypertypes##>>#*##**##>#>>#?> :*:hypher|: hz3+? ide-backend-common! ++ \\ ideas4!*> !-> !~>#$< &&& *** *>+++ .%..*..->./..=..@..|.// :<>: := :~> <#> <$<$><%><&&> <*<**><*><+> <-! <-> <..><<<<@><|><||> >=>>>>>|<>|>? @+@@> @@|* |- |->|>||* ||| ~> ideas-math-types'.&&..*..+..-..->../../=..<->..<..<=..==..>..>=..^..||..~=.:&&::*: :+: :-: :->::/: :<->::<::<=::==::>::>=::||:<&&> <><>-<||> >< ^|*||+||-||/| identicon:+ identifiers! idiomaticCompieee=== ~== ieee754=== ~== if? ?> ihaskellB$$!%&&**#*##**## *>++#+##++--#-##. //##/=/=#/=##:% :|<<#<##<$<$!><$><*<**><*><=<=#<=##<=<<>=<<====#==##>>#>##>=>=#>=##>=>>>>>=\\^^%^ ^^^^%^^ divelemmodnotElemonquotremseq||~~ imagemagick^&^ ^|^ imm<++> <+><>imperative-edsl #! #!=#% #&& #<#<=#==#>#>=#|| :+: ?impl$$ :->implicit:$ := ⋯* ⋯/ implicit-hieimplicit-params$$ $~ ~$ imprint<:>improve&&. *. --> -| /. /=. <. <=. <== ==. ==> >. >=. ||. in-other-words#. .#<|> incipit-base4$$!$>%&&&&&&**>+++-. / /=:$$::<>::|<<$<$!><$><&><*<**><*><<<<=<=<<=?<><|>=<<==>>$>$<>=>=>>>>>=>>>Compose DivMod^^^elemonseqxor|| incipit-core++incremental-computing$$ &&& incremental-parser+<*><<|><||>><incremental-sat-solver:&&: :||: indents<*/> <+/> <-/>  index-core !>!>= <.> !>>>>>=>?>?>=indexed*>><<$>><<*<<*>>=<<<>>>=indexed-containers<++><:>indexed-profunctors#. .#indices:. indigoc!!!:!@!~##!## #-> #:#=#@#~$$!$!!$>%%>%~&&&&&&&&= ****= *>+++++@+:+= +@--:-= -@. ....:.~//->//->/=:% :&:->::-> :=:>:|<<$<$!><$><&><*<**><*><<$>><<<<<<= <=<=<<><|>=:=<<==>>=>=>>>>>=>>>>>>= ?:?@Compose ^^%^ ^.^..^= ^?^^^^%^^ div hashWithSaltmodonquotremseqxor||||= ~> inferno-types&< .-> inferno-vc&< infinite-list!! ... .... :<\\ inflist!!! +++ ::: influxdb% inilist+> <+ inject-function-< -<| >- >-| |-> ||-> inline-r! !? ++// :∈=== elemnotElem input-parsers<<|>inspection-testing=/- =/= =/~ ==- === ==~ instant-generics:*: intcode! >>> intensional-datatys:=> interlude-l##%%=#%%~#%=#%~#=#~$$!$!!$>%%%=%%@=%%@~%%~%=%@=%@~%~&&&&&=&&^&&~&~*****=**~*=*>*~++++=+~--=-~. .&.... .=.> .@=.@~.|..~///=//~/=:% :*::+:+::.::|:~:<<#%=<#%~<#=<#~<$<$!><$><%=<%@=<%@~<%~<&&=<&&><&&~<&><*<**=<**><**~<*=<*><*~<+=<+~<-=<-~<. <.=<.> <.~><<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*>> <<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<<>=<>~<||=<||><||~<~=<<==>>=>=>>>>>=?=???~^^#^%^ ^.^..^=^?^?!^@.^@..^@?^@?!^^^^%^^ ^^=^^~^~divelem hashWithSaltmodnotElemonquotremrotaterotateLrotateRshiftshiftLshiftRxor|>||||=||^||~intern\\ interval..< ..<....<<....<= ..<=....>....>=....>>..<.. <..<<..<=<=.. <=..<<=..<=interval-algebra.+. <+> <|> >< interval-functor...interval-patterns+/- ... :<-->::<--|::<->::<-|::<>::<|::|-->::|--|::|->::|-|::|>::||:\\ intervals+/-.../=! /=? ! >=! >=? >? intrinsic-superclasses <$!><&> <=<<>=<<>=>>> >>= notElemintro=$$!$<$>&&&&&^ ****>+-. .&..:.|.//=:|<<$<$!><$><&><*<**><*><<<<=<=<<><>^<|>=<<==>>$>$$<>$<>=>=>>>=>>>?:^^^divelem hashWithSaltmodnotElemonquotremrotaterotateLrotateRshiftxor||||^ inventory/\ invertible$<*<. :<->:<$><-><<^^=<<->>=>$>$<>*>*<>*<<>*<<<>*<<<<>>*<>>*<<>>>*<>>>>*<>>^^>|>|<^^<<^^>>|<invertible-grammar:-invertible-syntax*> <* <*> <+> <|> io-choice||> io-machine>>> ipfs5$$!$!!$>%~&&&&&*******>+++-. .~//=:|<<$<$!><$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=>>>?~^^.^..^?^^divelemmodnotElemonquotremseq||iproute>:> irc-fun-color#> <# irc-fun-messagesmatchesireal+- -+- ! ? ?? isobmffo######### ######### ###################################################################################################################################################!#################################$####################################'#######################################*##########################################-#############################################0################################################3###################################################6######################################################9#########################################################<############################################################?###############################################################B##################################################################E#####################################################################H########################################################################$:&&*+--*-*---*-/-.&..+..+:.|.//:#:$$::+:+.:+::+?:+^:.:<>:<>::=:=.:>>=::>>>::>>>^::^+:^>>>::|:~:~::~?:~~:<$$--><$$><++><+><:$$--><:$$><:><=<=?<><||>==?::@:@::DivMod^^^rotaterotateLrotateRshiftshiftLshiftRxor||~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~9~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~isobmff-builder$::+ isotope|*| |+| |-| iterIO$> *> .| .|$ <$ <$> <* <**> <*> <++> <:>  <|> >$> \/ |$ |. iteratee$= <>< =$ ><> >>> iteratee-mtl>>> ival:–: ivor>+> >-> >=> >|> ivory! #! #. #> .% .& .&&./ .= .^ .| .||/=?:-> <=?=?>?? HappyStk ~> ivory-opts<+> ivory-stdlib%= %=! += ==> ~>* ix<=<=<==>=>=>ixmonad:! :-> >> >>= ixset &&&@* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= ||| ixset-typed &&&@* @+ @< @<= @= @> @>< @><= @>= @>=< @>=<= |||ixshader&&& *** ++=--=.*.:.=//=<<===>>=>> >>= jalla! ## ##! ##+ ##- #.* #.+ #.- #./ #| |# |.* |.+ |.- |./ ||* ||+ ||- java-bridge--> ::= jbi.&&..||. jet-stream& <&> jmacro != $ $$ &&. <<: <<:> <> =.= =:== join.=. joinlist++ :< :> joint $>>= :.:=:><$$$$> <$$$> <$$> <****> <***> <**> >>=$ ~>jordan>$ js-good-parts<:> jsaddle! !! ###:*:<#<##consjsc! !! # <# jsmw--> := =/= === json-alt:|:altjson-rpc-client::: json-rpc-server:+: json-schema<+><|> json-stream.!.:.:?.|json2+= .= <+> >>> jsonlogic! !! != !== % * + - / < <= == === > >= jspath:=> judge:= jukebox.=. .=>. /\ ::: :=::> :@: =:= =>>=>>=\/ |+| |=> justified-containers! jvm-binary<:> kangaroo<+> <> kansas-lava$$&.!. .&&../=. .<..<=..==..>..>=..^..||.:> stackFstackP|$|karabiner-config!>? ?!?? ??! |+||->karps.+ .- ./ /- // <&> <>@@ kawaii<#>keera-hails-reactivelenses<$$$> keera-hails-reactivevalues&.& <$$><:= <^> =:= =:> kerry)!! $$!&&****>+++-. .=? //=<<$<$!><$><*<**><*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotrem||keyed! !! !!? !? keyed-vals//keyed-vals-hspec-tests:| keylayouts:! :? keys! <#$>keystore.!= .: .:! .:? .= kibro<<$ kind-apply:&&::&::=>>::^: kind-generics:&&::&::*::+::=>>: kleene-list!! *<>+ +<>* :*:+:-kmonad##%%=#%%~#%=#%~#=#~$$!$!!$>%%=%%@=%%@~%%~%=%@=%@~%~&&&&&&&&=&&~&~********=**~*=*>*~++++=+~--=-~. ... .=.> .@=.@~.~///=//~/=:<:>:|:~:<<#%=<#%~<#=<#~<$<$!><$><%=<%@=<%@~<%~<&&=<&&~<&><*<**=<**~<*=<*><*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<<>=<>~<||=<||~<~=<<==>>$>=>=>>>>>=>>>?=???~^^#^.^..^=^?^?!^@.^@..^@?^@?!^^^^=^^~^~consdivelemfailingmagnifymodnotElemonquotremseqsnoczoom|>||||=||~kmp-dfa==! knead! #:. $:. &&* .&.* .|.* /=* :. <* <=* ==* >* >=* ||* knit-haskell####%%=#%%~#%=#%~#. #=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*. *=*>*^*~+=+~-=->>-~.# .+^.-..-^.=.>.>>.@=.@~.~//=//~:&:-::<:>:~:<#%=<#%~<#=<#~<$<$><%=<%@=<%@~<%~<&&=<&&~<&><*<**=<**~<*=<*><*~<+=<+~<-=<-> <-~<. <.=<.~=<<<>~<<>=<<>~<<>=<>~$?=???~@@^#^&^*^+^^-^^.^..^/^=^?^?!^@.^@..^@?^@?!^^=^^~^~atatopbeneathconsfailingmagnifysnoczoom|>|>> ||=|||||~~~ knots# $!!! .# .* :% krapsh.+ // <&> <>@@ krpc==> ==>@ kubernetes-client-core-&-kuifje==> =>> >>= kure<+>+> @@ labeled-tree::> labels:= lagrangian<=> lambda-cube ExtLCAppExtLCArr ExtLCKArr ExtLCTApp ExtLCTTAppLCAppLCArrLCKArr LCNeutApp LCNeutTAppLCTAppLCTTApplambda-placeholders.$. .@. lambdabot:=> lambdabot-core:=>==>lambdabot-utils<$> <+> <.>  <> lambdacube-compiler :~><$$> <&> <+>  AppDAppSAppHSAppVapp_lambdacube-edsl:+: :. @# @% @& @&& @* @*. @+ @- @. @.* @.*. @/ @/= @< @<< @<= @== @> @>= @>> @^ @| @|| lambdacube-engine<$= <*= lambdacube-gl@: @= lambdacube-ir@: lame-testerandAlsobutAlso excludingTo runningTo language-bash$+$ $++$ <++> language-boogie// <: |!=| |%| |&| |*| |+| |-| |/| |<=>| |<=| |<| |=>| |=| |>=| |>| ||| language-c-inline--> <: ==> language-c-quote+====HappyStk rconslanguage-c99-simple!.! .!= .% .%= .& .&& .&= .* .*= .+ .++ .+= .- .-- .-= ./ ./= .< .<< .<<= .<= .= .== .> .>= .>> .>>= .^ .^= .| .|= .|| .~ language-css !.= /#/-/./:/><:>|= ~= language-eiffel$?$  language-puppet<$$> <+>  <> language-rust# language-sh :&&: :< :<& :<< :<<- :<> := :> :>& :>> :>| :||: laop-|-. ./.|===><?? |||lapack&#! ####*###/##%%%#%%%##*##*###*\#*|#+##-##/\#\###\|#^%%%%%%#*%%%#+++-*#-*|-/#.*#.*|/+/ <+> ===\*#\\#addappendsub|*-|+||-||=|||| large-anon-.->:.:Compose large-generics-.->:.: large-records== lasercutter<&&> <*?<|><||> lattices /\:/\::=>::\/:<=>==>\/∧∨⟹⟺lawless-concurrent-machines<~< >~>lawz<==>==> layouting<+>lazify$~ lazy-hash# <#>lazy-hash-cache<#> lazy-search!&& !=> !|| &&&==>|||lazyboy&& /= < == > || lazysmallcheck==> >< \/ lazysplines# extendWhen extrapForward satisfying splitWhen trimSmart trimmingTolca~= ld-intervals<..<<..<=<=..<<=..<= ldap-client::= :<= := :=* :>= :~= lean-peano*+- leancheck-!==!$=&&&&&&&&&&&&+|-->> -:-:>->:->:>->>:->>:>->>>:->>>:>->>>>:->>>>:>->>>>>:->>>>>:>->>>>>>: ->>>>>>:> ->>>>>>>: ->>>>>>>:> ->>>>>>>>: ->>>>>>>>:> ->>>>>>>>>: ->>>>>>>>>:> ->>>>>>>>>>: ->>>>>>>>>>:> ->>>>>>>>>>>:->>>>>>>>>>>:>->>>>>>>>>>>>:=$=========>=|>- ><?==?\/\\//|=||||||| leanpub-wreq:= learn-physics #> *^.+^.-..-^<# <.><>><^*^+^^-^^/leksah?>>= lens##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-=-~.&.=.&.~... .=.> .@=.@~.|.=.|.~.~//=//~:<:>:~:<#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.&.=<.&.~<.=<.> <.>=<.>~<.|.=<.|.~<.~=~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.&.=<<.&.~<<.=<<.>=<<.>~<<.|.=<<.|.~<<.~<=<~<<<.>=<<<.>~<<=<<~<<<>=<<<>~<<>=<<>~<=<>~$?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingmagnifysnoczoom|>||=||~ lens-action^!^!!^!?^@!^@!!^@!? lens-errors%%&~%&~.&~^&.^&..^&? lens-family %!=%%=%=%~&&&!=&&=&&~*!=*=*~+!=+=+~-!=-=-~.=.~//!=//=//~<>!=<>=<>~<~^.^..^?||!=||=||~lens-family-core %!=%%=%=%~&&&!=&&=&&~*!=*=*~+!=+=+~-!=-=-~.=.~//!=//=//~<>!=<>=<>~<~^.^..^?||!=||=||~lens-filesystem lens-labels#%~&. .~^.lens-typelevel %%~ %.~ %^. %^.. %^? %^?! %~.@ .~^.^..^?^?! lens-utils##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-=-~... .=.> .@=.@~.~//=//~:<:><#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<=<>~$?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingmagnifysnoczoom|>||=||~lens-witherablefilterOf mapMaybeOfwitherOflenses$%$=less-arbitrary$$$? <$$$> lgtk*** . libcspm$$ libffi-dynamicconsDynconsWraplibgraph--> libjenkins-&--/--=--?- libjwt-typed->>.! .::< liblawless <++><.>↢↣⇜ ⇝ ∘ ⧻⫴libmpd%? /=? /~? =? ~? liboleg*$$ +$ +$$ +: --> / :*: :+ :+: :> :@ :^ ==<< >. >>= >>== \\ ^ lie<|> |*| |+| |-| |.| ||| lifted-protolude$!&ligd:*: limp *..*.+..-.:!:&&:<:<=:==:>:>=lin-alg *> .+. .-. <%> <*> <+> <-> <.>  linda@@> linear!!*!!/!*!*!!+!!-!#. $**!*!!*^.# .+^.-..-^><^*^+^^-^^/linear-accelerate!!*!!/!*!*!!+!!-!$$$$$$*!*!!*^+^-^/^><^*^+^+^^-^-^^/ linear-base'$$!&&&******+++-. .> //=:><<$<$><&><*<*><=<>==>>=>>>>=^^^comparedivelemlseqmodquotremseq||linear-generics:*::+::.:linear-grammar.*. .+. .<=. .==. .=>. linear-maps! :. :< :> <| >< |> linear-smc !: .//::: × ∘⊗▵ ▵! ▿ ▿! linear-vect &! &* &+ &- &. &^ *& *. .* .*. linearmap-category*∂-+$>-+|>.+^.+~^.-..-~!.-~..-~^.<.∂.⊗/∂<$|<.>^>+<\$|$||&>·⊕⊗ linkedhashmap! linnet//:+: :::|+|~>~>>lio%%/\\/ canFlowToglblub speaksForliquid-fixpoint $$$+$&.& <$$> <+><-><<= =>> |.| liquid-prelude0&&&***.<==.>==<*><.<=.<=>.<=>?<=?<\\><~<.<~==>.==>?==?=>==\<=\\<>.>//=>/=>=.>=?>>=>?>\=>\\=>~>.>~>???<==?>==eq liquidhaskell!? +++= += -= .&&. .||. <$$> <-> =*= ?= AppasJoinIdasJoinId_maybe idCafInfomkAppsmkCoAppsmkFunTy mkInvisFunTymkTyApps mkVarApps mkVisFunTy setIdAritysetIdCallAritysetIdDemandInfo setIdOccInfosetIdOneShotInfosetIdSpecialisationsetIdStrictnesssetIdUnfoldingsetInlineActivationsetInlinePragma list-extras$$!&&***+-. //=<<$<==<<==>>=>>>>=^^^divmodquotremseq||list-transformer<|> list-tuple!! !!! list-zipper ##>$$>%%>&&>*>>.>><##<$$<$~<%%<&&<<*<<.listsafe!! little-earley.:|: ::> :|:>< |:live-sequencer$&&+:+. =:=||llrbtree=== llvm%&& %|| & ? ?? llvm-dsl $# &&* .&.* .|.* /=* <* <=* ==* >* >=* ||* llvm-general-pure:= llvm-general-quote:= llvm-hs-pure&!! $$!&&****>+++-. //=:= <<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divmodquotremseq||llvm-ht $+ %&& %/= %< %<= %== %> %>= %|| & ? ?? llvm-pretty-: :>=: llvm-tf %&&%/=%<%<=%==%>%>=%||??? lmdb-simple! !? loc$$>&&&*>+ - . //=:|<<$<$><&> <*<*><<<<=<>==>>=>>>>=>>>divelemon|| local-search!!! <: =:= >: located-base!! log-base.=logfloat eqgegtleltmaxPOminPOnepowlogger<:> logic-TPTP.!=..&..<=..<=>..<~>..=..=>..|..~&..~. .~|.:!=: :&: :<=: :<=>: :<~>: :=: :=>: :|: :~&: :~: :~|: logic-classes%! .!=. .&. .<=. .<=>. .<~>. .=. .=>. .|. .~&. .~. .~|. :&&: :&: :<=>: :=: :=>: :|: :||: :~: <=> ==> ? |-> |=> ¬ ⇒ ⇔ ∀ ∃ ∅ ∧ ∨ ≡ ≢ ⊨ ⊭ logict>>-logict-sequence:<lol%!! $$!%&&*** *>+++-. //=<<$<==<<===~= >>=>>>>=\\^ ^-^/^?^^ divelemmodnotElemquotrem||lol-apps+longboi++longshot<%> lorentz5! ### #-> $$: %!%%!%>&&-&?--$-$?. /->/=.:&:->:-|::-> ::::=:><-$><.<=.<>==.>->>.>=.>> ?::|%!||&||*||+||-||.|.||/=||:||<<||<=||<||==||>=||>>||>||@||^||||~> lp-diagrams #*-.<. .=.:%> <======~= >== lsp-types|? ltk<<<- lucid-extras$:lui<^ ^. ^: ^> lumberjack|# luminance.= :. <> @! @? maam6# #! *$ *∘ *⋅ + - / <|> <×> <⊓> <⊔> <⋅> <⧺> =≫ >< >> >>= ^ ^$ ^*$ ^*∘ ^*⋅ ^∘ ^⋅ × ↦ ∈ ∘ ∘∘ ∧ ∨ ≟ ≤ ≥ ≫ ≫= ≫=* ⊑ ⊑⊒ ⊒ ⊓ ⊔ ⊟ ⋚ ⌾ ⌿ ◇$ ◇⇨ ◇⋅ ◇⋅| ♯$ ♯⋅ ⧺ mac<<*>> machines+>><~ >+>>>~>~>~> magicbane!? .!= .: .:! .:? .= :<|> ?:magma<> magmas// <<<>\\ mainland-pretty<+/><+><|>managed-functions! !? manatee==> manatee-anything<=> manatee-core << <<<= <<=< =>>> =~^ >=>> >?>= >?>=> ?! ?>= ?>=> mangopay?+ manifolds!-| .+^| .+~^.--! .--. .-| .-~!.-~..-~^.−.:@.:±?->?<?>?|:|+^ |±|✠manifolds-core.+~^.-~!.-~..-~^ map-classes! map-syntax#!###? mapalgebra:.markdown-unlit:&::|: marked-pretty$$ $+$ <+> <> markov:-> :->. markov-chain-usage-model.*.-./^*markov-processes markov-realization>*<marxup$$$ <$$$><$$><+>=:^^^ massiv.!!*!!+!!-!!.! !/!!>!>< !>*.+.-..*.** .*..+.+..-.-......:././..>< .><. .^.^^/.:.:>><. ????>divAmodAquotAremA massiv-test.&&..||.:~::~~:<$<$!><=<=/==<<=====>>< >=>>>>>=shouldBe shouldContain shouldEndWithshouldMatchList shouldNotBeshouldNotContainshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrow math-extras/~= ~= math-grads!. !> /~= ?. ?> ~= math-programming.#*.#*@#+.#+@#-.#-@#<=.#<=@#==.#==@#>=.#>=@.*#.+#.+..+@.-#.-..-@./#.<=#.<=..<=@.==#.==..==@.>=#.>=..>=@@*#@+#@+.@+@@-#@-.@-@@/#@<=#@<=.@<=@@==#@==.@==@@>=#@>=.@>=@mathflow%* <+><-- matplotlib###%@@matrices! matrix! <-> <|> matrix-market-pure:+ matrix-static! !. .* <-> <|> ^* matterhorn& <|>^.^?mattermost-api~= maxent.=. maxent-learner-hw⊕ ⊖ ⊗ ⊙ maybench<++> <@> <| |> mcmc>$<@~ median-stream+> <+ megaparsec membership:>HConsmemdb! memorable-bits.- .| menshen=~ ??:merge*>.! .?<*<*><|> metamorphic/\ >< \\ method:*metric<-> mezzo$+++++ >< mezzolens%%= %= &&= *= += -= .= .~ //= <>= <~ ^. ^.. ^? ||= mfsolve=&====mgeneric:**: :*: :++: :@: microaeson.!= .: .:! .:? .=microformats2-parser##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-=-~.!= ... ./ .: .:! .:? .= .> .@=.@~.~//=//~:<:><#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.> <.~=<<<>~<<>=<<>~<=<>~$ ?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingsnoc|>||=||~ microgroove! microlens#. %~&+~-~.#.~<%~<&><<%~<<.~<>~?~^.^..^?^?!failing microlens-mtl%=&~*=+=-=.=//=<%=<.=<<%=<<.=minioperational:>>= minitypeset-opengl<#> <-> <|> miniutter<+>minlenmlconsmios-!- -&&&- -&- -=- ->- -|- -|||- mismi-p$$!$>&&&**>+-. /=<<$<$><*<**><*><=<><|>=<<==>>=>>>>=elemon||mismi-s3+/ // mismi-s3-core// miso#> <# =: mit-3qvpPyAi6mH.!! $$!$>&&&****>+++-. //=<<$<$!><$><&> <*<*><<<<=<=<<><|>=<<==>>=>=>>>>>=>>>^^^divelemmodnotElemonquotremseq|| mix-arrows->> ~>>= mixed-types-num+!! !/=!!!!>=!$$!%&&**>+++-. //=<<$<$><*<*><=<>=<<==>>=>>>>=?<=??=??>?^^^elemnotElemseq||ml-w:>: mmorph<|<=<|>|>ComposeT |>=mockazo:~:mod^%modelicaparser~* ~+ moe ! # ## ### #### ##### ###### * *** / <> >> ~> monad-logger-aeson.=:#monad-logger-prefix prefixLogs monad-lrs*> <* <+- <+> <-> <:- monad-param=<< >> >>= monad-resumption<||> <~> monad-skeleton:>>=|> monad-state$: $:: <$: <-> <: <:: <:< <<: <<:: <=: =: =:: >$$> >$< >$> monad-statevar$= $=! $~ $~! monad-unify$? =:= =?= monad-var.! ./monadLib-compose<<< >>> monadfibre<&&> <||> monadiccp2! #/ #< #<= #= #> #>= $/= $< $<= $== $> $>= &&& /\<&> <<>><== <@><|> >>> @!! @$ @%@&&@*@+@++@++@ @-@-> @. @.. @/@/=@:@<@<=@=@== @=> @>@>=@>>>@ @?@??@@ @||\/ ||| monky sdivBound sdivUBoundmono-traversable<|monoid<> monoid-extras*:::::|:||: monoid-owns+ monoid-subclasses<\>monoidal-containers! !? \\ monoidal-functors&&&||&|| monoidplus|*| |+| |-| |/| monoids* + - .\. / ^ ^^ monomer nodeEnabled nodeFocusablenodeKey nodeVisible styleActivestyleActiveSet styleBasic styleBasicSet styleDisabledstyleDisabledSet styleFocusstyleFocusHoverstyleFocusHoverSet styleFocusSet styleHover styleHoverSetmonopati <-^> <.^>      <^> <^^> <~^> monus-monus-weighted-search#. .# :-:<<#$>|-|moo .< .<. .<= .<=. .==. .>. .>=. <. <=. more-containers! more-extensible-effects>< |> morley! ##:#:++-:&//->:#:$$::- :/::&::: ::<:<:<>::~:<:!><:?>==AnnsCons AnnsTyConsappend|- morley-clientsubmitThenParsemorley-prelude;$$!$!!$>%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodonquotremseqxor||morley-upgradeable$:/==><-->morpheus-graphql-client.: .:? .=morpheus-graphql-code-gen-utils.<> morpheus-graphql-core<:> morphisms!# $&. .^. ?morphisms-functors$< $> *> ->> :&: <$ <$< <$> <* <*> <+> <<= <=< =<< =<= =>= =>> >$ >$< >$> >=> >>- >>= morphisms-objects &&/= /\ < <= <> == > >< >= \/ || mosaico-lib:-: :|: moto*motor!+!-!-->:=>>> mpeff:* mpolynomials*^^**^^*^^+^^-^mpppc/+/ // <$$> <$> <+>   <> mprelude$$>&&&*+. /=<<$<$><&><*><=<=<<><|>=<<==>>=>>>>=||mps- . / < <-> > ^ ms<-> msh.! .$ <: >: mtl-unleashed%= .= <.= <>~ ++> >:> mu-rpc:<&>::<|>::<||>::|: mu-schema:*:-> multext-east-msd=~= multi-containers! !? multicurryable:* multilinear! !=!$$|$| *. +. -. .* .+ .- /\<<<|<<|\/|==||>>|>>>multimap! multipass:& :* :+ :- @# @@ @@@ multirec&:*::+::-> :=::>:multiset\\ multiset-comb+: multistate:+: multivariant:- <***> <+++> ~> murder+>> ^= ^| music-diatonic$# music-pitch/:= =:= music-score ! *| <-< <->  <| >-> |* |/ |> mustache~=~>↝⥱mutable:!>compMP mvc<> myxine-client##@@mzv:&: n-ary-functor-#- named! named-records:+ := named-sop%++ :->SConsnamelist:* := nano-erl! nanoparsec.*> <*.  nanospecshouldBe shouldReturnnatural!! !!! natural-arithmetic:=:<<=<=?  net-spider<..<<..<=<=..<<=..<=netcore<%> <&&> <+> <||> ==> netlib-carray^! netlib-comfort-array^! netrium %&&%*%+%-%/%<%<=%==%>%>=%||netspec! .: nettle-frp# *^ --> -=> <&> <+> <|> ==> >-- >=- ^+^ ^-^ ^/ |- nettle-netkit# <--> @@ nettle-openflow// netwire&&&! &>***! --><&>--network-api-support<> network-house# #! .!. <# network-transport-tests>> >>= neural! !!! !!? !? & .~ <%%> <%> <+> <-> <.>  <> ^. neural-network-base:++ neural-network-blashs<<+ <<= niagra! # .+. .= .>. .~. <::> <:> <||> ? |$=| |*=| |=| |^=| ||=| |~=| nice-html!:$ :- := nix-eval$$nixpkgs-update&<&><><|>>>>noether$!$>%< %<~ &&&&^*+-/<$ <$!><$><&&><.> <<$>><<*>> <=<<||>=<<== >% >=>>> >>= ||||^~>% nom$$+<< .::-> :@ :@>:@@!>>+ @. @: @>@@ @@! @@. non-empty!:?:append appendLeft appendRightconsnon-empty-zipper|: non-negative-| addnonempty-alternative:<: :>: nonempty-containers ! !? :<||:||><|><><|NESeq\\ |>|><nonempty-vector! !? ++ // nonempty-wrapper<||>nonempty-wrapper-textcons nonemptymap!? nonfree◇ nonlinear !!*!!/!*!*!*!*!!*^^*^/noodle<|> not-in-base &&* ..% ..%.. ...% ...@ ..@ >>* ^.. ^... ||* nri-prelude&&*+++-////=<<*><< <=<|==>>=>> >>=^|>||nsis %&&%/=%<%<=%==%>%>=%||&?@=nuha! !! *|+|-|/||! |!! |*|**|*||+|+||-|-||.||/|^||! ||!! |||! |||!! number// numbered-semigroups=== ||| ── ━━ │ ┃ ██ ■ numbers*> <+> numeric-domains<..< <..<= <=..< <=..<= numeric-prelude=! !! $$!%%*%%/%&&&&~&*&&/&**&***>++++:+::--: -|. //:/=:% <<$<*<*> <*>.*> <*>.+<*>.-<*>.-$<+><==<<==>>=>>>>=Cons^^-^/^?adddivdnelemeqmodnotElemquotremsequp|| numeric-quest# ## *>+>// :* :+> :-: :<+ :<| :|> <*<*><+<<*>><><|><|> numeric-tools! numerical:*<**> numhask2!! $$!&&*** *.*>++++.--.. .*.+.-.///. /=/\:% :+<<$<$><*<*><\=<<==>>=>>>>=\/^^^divelemmodnotElemseq||~=⊕numhask-prelude4$$!!$>%&&&&&^*>++. .&..|./=:*::+::.::|:~:<<$<$!><$><&&><&><*<**><*><=<=<<><|><||>=<<==>>=>=>>>>>=elem hashWithSaltnotElemonrotaterotateLrotateRshiftshiftLshiftRxor||||^ numhask-space+/-...<.>>.<|.|.||<||>|numtype*+-/ numtype-dk*+-/^ numtype-tf* + - / nurbs≃ ≄ ⊕ nvfetcher%~&.~?~^.nvim-hs+:<+>nyx-game.: o-clock%*:*+:+-%--:-/:/::% >=%obdd&&==>|| objective .-..-?- @!= @-@<<@@>>@@>>^@||@ @~^>>@ observable*:~* *:~. .:~* .:~. observable-sharing! ocaml-export:<|>:><$+$> oeis2+. +.+ .+ oi ## =: ?? |->| |/| |::| |:| |<>| |><| |>| okapi ombra! *. .* .*. ^| ^|^ ~< ~<* one-liner.: oneormore++ oo-prototypes.-> op-<$<.><$<<.<<<<<<<^<=<<|=$<=*<=<$<=<<>$=>$>>$>->$>=>*=>=>>>>>=>>>>>^^<<^>>|>opaleye@*+-.#>.#>>.&&.&<.&>.++ .->.->>.-|-./=./==.:.:..::.::..<.<<.<=.<@.==.===.>.>=.>>.?.?&.?|.@>.||/:#> :#>> :& :&& :&< :&> :* :+ :- :-> :->> :-|- :/ :< :<< :<= :<> :<@ := :== :> :>= :>> :? :?& :?| :@> :^ :| :|| :~ opaleye-sqlite .&&.++ ./=.:.:..::.::..<.<=.==.>.>=.|| open-pandoc>>~ open-union@!>@>openapi-petstore-&-openapi3<+> opencv::: opengles$= &= opentracing:&<+> optics-core$!~##. % %!~%% %& %> %? %~&.#.~:<:><% <%> <&><|?!~?~^.^..^?^?!adjoinafailingconsfailingiadjoin iafailingifailingisummingsnocsumming|> optics-extra%%=%=%> .=:<:><% <%=<%> <.=<<%=<<.=<optparse-applicative.$.  <$$><+><<+>> <> optparse-generic::: optstream#->#>-#><#<##-><##><#-<#-><#><$?><&?><-#<-##><-#><-|><|->orc<+>  order-statistics@! @# @@ ordered <==> ordered-containers /\| <>|<|>|\\ |/\ |<|<>|>orders.: ordrea<@ <@> orgstat??~ ory-hydra-client-&-oset<>|<|>|\\ |<|<>|> overloaded%% consoverture!> .>  packstream=: pact-time*^.+^.-. pads-haskell+++ <++> <||> =@= palindromes=:= pandoc<+?><|>pandoc-citeproc<++> <+> pandoc-types<>pandora!=#=@% &* *:~* *:~. + - -#=-#=$> -*-*-*--+--*--+ ---*---+ ----*----+ -----*-----+ ------*------+ -------*-------+ --------* --------+ --------> --------| -------<<------->-------|------<<------>------|-----<<----->-----|----<<---->----|---<<--->---|--<<-->--|-<<-=: -|. .:.:...:~* .:~. /\ /|\:#:*::+::.:::::|.:::|:.::|:::<:=:=>:=>:>< <$$$> <$$> <$=#- <$> <-*-<-*-*-<-*--<-*---<-*----<-*----- <-*------ <-*------- <-*-------- <-+-<--<---<----<-----<------<------- <--------<-/-<-/--<-/---<-/----<-/----- <-/------ <-/------- <-/-/-<-|-<-|--<-|---<-|----<-|----- <-|------ <-|------- <-|-------- <-|-<-|-<-|->-|-<-|-|-<-|-|--<-|-|--- <-|-|---- <-|-|----- <-|-|------ <-|-|------- <-|-|-|-<-||-<-||--<-||---<-||---- <-||----- <-||------ <-||------- <-||-------- <-|||- <-|||-- <-|||--- <-|||---- <-|||----- <-|||------ <-|||------- <-|||-------- <.:<<.:><:*:><:.:<<:.:><:.<<:.><::<<::><:<.>:<<:<.>:><:=<:>.<:<<:>.<:><<<<-/- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<=<<==<<===<<====<<=====<<====== <<======= <<======== <=<=><~<~~<~~~<~~~~<~~~~~<~~~~~~<~~~~~~~ <~~~~~~~~=#-=*= =<<=<> ====<<===<<====<<=====<<======<< =======<<> >$$< >$< >-|->-|-->-|--->-|---->-|----- >-|------ >-|------- >-|-------- >-|-<-|->-|->-|->-|-|->-||->-||-->-||--->-||---- >-||----- >-||------ >-||------- >-||-------- >.:<>.:>>:.:<>:.:>>:.<>:.>>::<>::>>:<.>:<>:<.>:>>:>.<:<>:>.<:>>=>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>?=@>>>\/ |-|--|---|----|-----|------|------- |--------~<> ~>pansite%%>>pantry .!= ..!= ...: ...:? ..: ..:? .: .:! .:? .= pantry-tmp .!= ..!= ...: ...:? ..: ..:? .: .:! .:? .= papa-base-export'$$>%&&&****> +-. //=:| <<$<$!><$><* <**><*><=<> <|> ==>>=>> >>= \\^^^elemmodnotElemonquotrem||papa-base-implement++ papa-bifunctors-export*>> <<$>><<* <<**>><<*>> papa-include*> ++ . :| <* =<< >> >>= papa-lens-implement!! papa-prelude-lens!! papa-prelude-semigroupoids*> . <* =<< >> >>= papa-prelude-semigroups++ :| papa-semigroupoids-export-<--<<->-.> .>>  <. <..><.> <<$>><<. <<..>><<.>> >>- papillon<$><*>parallel $| $|| -| -|| .| .|| >| >|| dot parpsequsingusingIO parameterized &*>&<*&<*>&<=<&<>&<|>&=<<&>=>&>>&>>=parameterized-data! +++><+parameterized-utils! !! !^ %&&%||*+-::> :<:> :~:<++> <= hashWithSalt parcom-lib <|> paripari<|> parquet-hsparsec<$$><$?><|><|?><||> parsec-class<|> parsec-free<$$><$?><|><|?><||> parsec-utils$: +: -: .: <: =: parsec1*><$<$><*<*><|>parsec2<$$> <$?>  <|> <|?> <||> parsec3<$$> <$?>  <|> <|?> <||> parsek *><$<$><*<**><*><<|><|>parser-combinators<|> parser241& ---> --> >>> |/ |> parsers<$$><$?><|?><||> parsestar->// ./ /<> parsimony*> <$ <$> <* <*>  <|> parsley$>*>+<:> <$<$><&><*<**><*><+><:><|><~<~>>*< >+>>>?>>??>||=~> parsley-core *> /\ :*: :< :> <* <*> <|> >*< \/ |> partial-isomorphisms<$> partial-lens%%= %= //= ^%= ^/= ^= ~= partial-order/= < <= == > >= partial-records? partial-semigroup<>?passage// pasta.!.& .= .| // :| pasta-curves*+-patat<$$><+>patch~~ patch-combinators-:: >-> path-<.><.> path-extra<#><&> path-like/> path-utils paths-<.><.><.>~~pathtype<++><.>pattern-matcher:= pattern-trie|> pcre-heavy=~ ≈ pcre-less<< =~ pcre-light-extra=~ peano-inf-| pedersen-commitment|*| |+| pencil<<| <| <|| penny==~ penny-lib==~ percent-format% %% %%% %%%% %%%%% %%%%%% +% -% -%% -%%% -%%%% -%%%%% -%%%%%% /% perdure&. >. |. perf$| |$| |+| permute<$$> <$?> <|?> <||> persist:!:persistable-record<&> persistent!=.*=.+=.-=./<-./=.<-.<.<=.=.==.>.>=.||.persistent-documentation# --^ persistent-iproute<.<. <:<. <:<= >.>. >:>. >:>= persistent-migration:= ~> persistent-mongoDB&->.&~>.->.=:=~.?&->.?&~>.addToSet anyBsonEqanyEqinList nestAnyEq nestBsonEqnestEqnestGenestInnestLenestNe nestNotInnestSetninListpullpullAllpush~>.persistent-mtl!=.*=.+=.-=./<-./=.<-.<.<=.=.==.>.>=.||.persistent-postgresql<@.?&.?.?|.@>.persistent-test==@>=>@/=@==@=?@?=persistent-vector// pg:. pg-store<*>$>>$>>=$ pgp-wordlist:<>phaser$#$<#>>#>>>##phonetic-languages-phonetics-basics~= physics*</<>*<>+<>-<>/>/< picoparsec pier/> pier-core/>pinboard pinch.: .:? .= ?= pinchotpinned-warnings $$ $+$ *><$><*<*><+> <.> <> consBag mkCoreApp mkCoreAppssnocBagpiped.| |. pipeline=*= pipes+>>//<//>//<+<<-<<<+<\\<~<~<>+>>->>>~>\\>~>~>\<\\>\~<~<<~> pipes-async>&> pipes-core$$ *** <+< >+> pipes-extras+++ pipes-files=~ pipes-io>->+ pipes-protolude<$!><=<=<<>=>>> >>= pipes-shell>?> pisigma-*- ->- :.. plailude!? .: .:. ~+~ planet-mitchells! !! $$!$!!$<$>%%~&&&&&~* ** **~*> *~+ +++~- -<.>-<<-~. .!= .&. .&.~.: .:! .:? .=.> .>> .|. .|.~.~/ // //~/= /\ :<:>:| <  <$ <$!!><$!><$><&><* <*> <. <.><<. <<.>> <<<<<=<= <=<<> <@ <@> <@@><|<|<<|> =<<=<==<|== =>==>>=~> >$ >$$<>$<>= >=>>>->>= >>>>|>@> \/ \\^^.^..^?^?!^^^^~^~ addSignal cons cons' deleteSignal dot magnifynotElemonparpseqsnoc usingzoom|>|>=||||~planet-mitchell-testshouldBe shouldReturn shouldSatisfyplankton* ** *. + +. - -. -~ .* .*. .+ .+. .- .-. ./ ./. / /. /~ <.> >< ^^ ~- ~/ ≈⊕ plat=: plot-light ## #> -. .* <.> <\> ^+^ ^-^ ~= plots&=&~~plugins<+> <.><>plumbers$& $&& $&&& $&&* $&&< $&&> $&&^ $&* $&*& $&** $&*< $&*> $&*^ $&< $&<& $&<* $&<< $&<> $&<^ $&> $&>& $&>* $&>< $&>> $&>^ $&^ $&^& $&^* $&^< $&^> $&^^ $* $*& $*&& $*&* $*&< $*&> $*&^ $** $**& $*** $**< $**> $**^ $*< $*<& $*<* $*<< $*<> $*<^ $*> $*>& $*>* $*>< $*>> $*>^ $*^ $*^& $*^* $*^< $*^> $*^^ $< $<& $<&& $<&* $<&< $<&> $<&^ $<* $<*& $<** $<*< $<*> $<*^ $<< $<<& $<<* $<<< $<<> $<<^ $<> $<>& $<>* $<>< $<>> $<>^ $<^ $<^& $<^* $<^< $<^> $<^^ $> $>& $>&& $>&* $>&< $>&> $>&^ $>* $>*& $>** $>*< $>*> $>*^ $>< $><& $><* $><< $><> $><^ $>> $>>& $>>* $>>< $>>> $>>^ $>^ $>^& $>^* $>^< $>^> $>^^ $^ $^& $^&& $^&* $^&< $^&> $^&^ $^* $^*& $^** $^*< $^*> $^*^ $^< $^<& $^<* $^<< $^<> $^<^ $^> $^>& $^>* $^>< $^>> $^>^ $^^ $^^& $^^* $^^< $^^> $^^^ *& *&& *&&& *&&* *&&< *&&> *&&^ *&* *&*& *&** *&*< *&*> *&*^ *&< *&<& *&<* *&<< *&<> *&<^ *&> *&>& *&>* *&>< *&>> *&>^ *&^ *&^& *&^* *&^< *&^> *&^^ ** **& **&& **&* **&< **&> **&^ *** ***& **** ***< ***> ***^ **< **<& **<* **<< **<> **<^ **> **>& **>* **>< **>> **>^ **^ **^& **^* **^< **^> **^^ *< *<& *<&& *<&* *<&< *<&> *<&^ *<* *<*& *<** *<*< *<*> *<*^ *<< *<<& *<<* *<<< *<<> *<<^ *<> *<>& *<>* *<>< *<>> *<>^ *<^ *<^& *<^* *<^< *<^> *<^^ *> *>& *>&& *>&* *>&< *>&> *>&^ *>* *>*& *>** *>*< *>*> *>*^ *>< *><& *><* *><< *><> *><^ *>> *>>& *>>* *>>< *>>> *>>^ *>^ *>^& *>^* *>^< *>^> *>^^ *^ *^& *^&& *^&* *^&< *^&> *^&^ *^* *^*& *^** *^*< *^*> *^*^ *^< *^<& *^<* *^<< *^<> *^<^ *^> *^>& *^>* *^>< *^>> *^>^ *^^ *^^& *^^* *^^< *^^> *^^^ << <<& <<&& <<&&& <<&&* <<&&< <<&&> <<&&^ <<&* <<&*& <<&** <<&*< <<&*> <<&*^ <<&< <<&<& <<&<* <<&<< <<&<> <<&<^ <<&> <<&>& <<&>* <<&>< <<&>> <<&>^ <<&^ <<&^& <<&^* <<&^< <<&^> <<&^^ <<* <<*& <<*&& <<*&* <<*&< <<*&> <<*&^ <<** <<**& <<*** <<**< <<**> <<**^ <<*< <<*<& <<*<* <<*<< <<*<> <<*<^ <<*> <<*>& <<*>* <<*>< <<*>> <<*>^ <<*^ <<*^& <<*^* <<*^< <<*^> <<*^^ <<< <<<& <<<&& <<<&* <<<&< <<<&> <<<&^ <<<* <<<*& <<<** <<<*< <<<*> <<<*^ <<<< <<<<& <<<<* <<<<< <<<<> <<<<^ <<<> <<<>& <<<>* <<<>< <<<>> <<<>^ <<<^ <<<^& <<<^* <<<^< <<<^> <<<^^ <<> <<>& <<>&& <<>&* <<>&< <<>&> <<>&^ <<>* <<>*& <<>** <<>*< <<>*> <<>*^ <<>< <<><& <<><* <<><< <<><> <<><^ <<>> <<>>& <<>>* <<>>< <<>>> <<>>^ <<>^ <<>^& <<>^* <<>^< <<>^> <<>^^ <<^ <<^& <<^&& <<^&* <<^&< <<^&> <<^&^ <<^* <<^*& <<^** <<^*< <<^*> <<^*^ <<^< <<^<& <<^<* <<^<< <<^<> <<^<^ <<^> <<^>& <<^>* <<^>< <<^>> <<^>^ <<^^ <<^^& <<^^* <<^^< <<^^> <<^^^ <=& <=&& <=&&& <=&&* <=&&< <=&&> <=&&^ <=&* <=&*& <=&** <=&*< <=&*> <=&*^ <=&< <=&<& <=&<* <=&<< <=&<> <=&<^ <=&> <=&>& <=&>* <=&>< <=&>> <=&>^ <=&^ <=&^& <=&^* <=&^< <=&^> <=&^^ <=* <=*& <=*&& <=*&* <=*&< <=*&> <=*&^ <=** <=**& <=*** <=**< <=**> <=**^ <=*< <=*<& <=*<* <=*<< <=*<> <=*<^ <=*> <=*>& <=*>* <=*>< <=*>> <=*>^ <=*^ <=*^& <=*^* <=*^< <=*^> <=*^^ <=< <=<& <=<&& <=<&* <=<&< <=<&> <=<&^ <=<* <=<*& <=<** <=<*< <=<*> <=<*^ <=<< <=<<& <=<<* <=<<< <=<<> <=<<^ <=<> <=<>& <=<>* <=<>< <=<>> <=<>^ <=<^ <=<^& <=<^* <=<^< <=<^> <=<^^ <=> <=>& <=>&& <=>&* <=>&< <=>&> <=>&^ <=>* <=>*& <=>** <=>*< <=>*> <=>*^ <=>< <=><& <=><* <=><< <=><> <=><^ <=>> <=>>& <=>>* <=>>< <=>>> <=>>^ <=>^ <=>^& <=>^* <=>^< <=>^> <=>^^ <=^ <=^& <=^&& <=^&* <=^&< <=^&> <=^&^ <=^* <=^*& <=^** <=^*< <=^*> <=^*^ <=^< <=^<& <=^<* <=^<< <=^<> <=^<^ <=^> <=^>& <=^>* <=^>< <=^>> <=^>^ <=^^ <=^^& <=^^* <=^^< <=^^> <=^^^ >=& >=&& >=&&& >=&&* >=&&< >=&&> >=&&^ >=&* >=&*& >=&** >=&*< >=&*> >=&*^ >=&< >=&<& >=&<* >=&<< >=&<> >=&<^ >=&> >=&>& >=&>* >=&>< >=&>> >=&>^ >=&^ >=&^& >=&^* >=&^< >=&^> >=&^^ >=* >=*& >=*&& >=*&* >=*&< >=*&> >=*&^ >=** >=**& >=*** >=**< >=**> >=**^ >=*< >=*<& >=*<* >=*<< >=*<> >=*<^ >=*> >=*>& >=*>* >=*>< >=*>> >=*>^ >=*^ >=*^& >=*^* >=*^< >=*^> >=*^^ >=< >=<& >=<&& >=<&* >=<&< >=<&> >=<&^ >=<* >=<*& >=<** >=<*< >=<*> >=<*^ >=<< >=<<& >=<<* >=<<< >=<<> >=<<^ >=<> >=<>& >=<>* >=<>< >=<>> >=<>^ >=<^ >=<^& >=<^* >=<^< >=<^> >=<^^ >=> >=>& >=>&& >=>&* >=>&< >=>&> >=>&^ >=>* >=>*& >=>** >=>*< >=>*> >=>*^ >=>< >=><& >=><* >=><< >=><> >=><^ >=>> >=>>& >=>>* >=>>< >=>>> >=>>^ >=>^ >=>^& >=>^* >=>^< >=>^> >=>^^ >=^ >=^& >=^&& >=^&* >=^&< >=^&> >=^&^ >=^* >=^*& >=^** >=^*< >=^*> >=^*^ >=^< >=^<& >=^<* >=^<< >=^<> >=^<^ >=^> >=^>& >=^>* >=^>< >=^>> >=^>^ >=^^ >=^^& >=^^* >=^^< >=^^> >=^^^ >>& >>&& >>&&& >>&&* >>&&< >>&&> >>&&^ >>&* >>&*& >>&** >>&*< >>&*> >>&*^ >>&< >>&<& >>&<* >>&<< >>&<> >>&<^ >>&> >>&>& >>&>* >>&>< >>&>> >>&>^ >>&^ >>&^& >>&^* >>&^< >>&^> >>&^^ >>* >>*& >>*&& >>*&* >>*&< >>*&> >>*&^ >>** >>**& >>*** >>**< >>**> >>**^ >>*< >>*<& >>*<* >>*<< >>*<> >>*<^ >>*> >>*>& >>*>* >>*>< >>*>> >>*>^ >>*^ >>*^& >>*^* >>*^< >>*^> >>*^^ >>< >><& >><&& >><&* >><&< >><&> >><&^ >><* >><*& >><** >><*< >><*> >><*^ >><< >><<& >><<* >><<< >><<> >><<^ >><> >><>& >><>* >><>< >><>> >><>^ >><^ >><^& >><^* >><^< >><^> >><^^ >>> >>>& >>>&& >>>&* >>>&< >>>&> >>>&^ >>>* >>>*& >>>** >>>*< >>>*> >>>*^ >>>< >>><& >>><* >>><< >>><> >>><^ >>>> >>>>& >>>>* >>>>< >>>>> >>>>^ >>>^ >>>^& >>>^* >>>^< >>>^> >>>^^ >>^ >>^& >>^&& >>^&* >>^&< >>^&> >>^&^ >>^* >>^*& >>^** >>^*< >>^*> >>^*^ >>^< >>^<& >>^<* >>^<< >>^<> >>^<^ >>^> >>^>& >>^>* >>^>< >>^>> >>^>^ >>^^ >>^^& >>^^* >>^^< >>^^> >>^^^ pnm++ podenv%~.~?~ ^.pointedalternative <|!> pointless-fun!~>$::.! .:.^ ~>pointless-haskell! -|- -||- /\ /|\ :*!: :*!| :+!: :+!| :@!: :@!| <<= <> >< >|< ? ?? \/ pointless-lenses!/\< !< !\/< #\/< -|-< .< .\/< /\!< ><< ?< \/!< \/$< \/.< \/< polar:< polar-configfile|$||%||=|poly^- poly-control$>>= <<*>> >>>= poly-rec# ##.**..*..=..==.polynomials-bernstein? polyparse+++applydiscardonFailpolysemy:->polysemy-optics,!~#% %!~%% %%=%& %=%> %? %~&.=.~:<:><% <%=<%> <&><.=<<%=<<.=< polysemy-path polysemy-req/:/~=:polysemy-resume!! !> !>> :- :::>@>@>@-@>@~~@~@>polysoup//>/><^<^>>/>>^>^>pontarius-xmpp+++ <~ popkey! porpoise. portray-diff-hunit@-? @?- portray-diff-quickcheck=-=ports & &> <&> <-$ <-- <-> << <== >| pos*!+!posable++ posix-paths<.>  postgresql-query:.postgresql-simple:.postgresql-simple-named=? postgresql-txConspostgresql-tx-query:.postgresql-tx-squeal5! !+!-!-!#-.&&< &> *.*:+!-|- .! .#>.#>>.& .&&.*.-..->.->>./=.<.<=.<@ .==.>.>=.? .?& .?| .| .||:*::::=>:>><-> <..<<..<=<<@ <=..<<=..<=<@ >>>@&& @* @+ @- @> @>. @>> @@ postgresql-typed<@ @> @>. postie>->powerpc &&. /=. <. <=. <== ==. >. >=. ||. pqueue!! pqueue-mtl:-> praglude##%%=#%%~#%=#%~#=#~$%%=%%@=%%@~%%~%=%@=%@~%~&&&& &&=&&~&~*** **=**~*=*~+++ +=+~-=-~. ... .=.> .@=.@~.~//=//~< <#%=<#%~<#=<#~<$ <$!><%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+> <+~<-=<-~<. <.=<.> <.~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<<^<<^=<<^^=<<^^~<<^~<<||=<<||~<<~<= <=<<> <>=<>~ <||=<||~<~=<<> >$ >= >=>>> >>= >>>>>^?=???~^#^.^..^<<^=^>>^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingnotElemonsnoc|>||=||| ||~~> preamble!! ##%%=#%%~#%=#%~#=#~$$!%%=%%@=%%@~%%~%=%@=%@~%~&&&&&&&&=&&~&~* ** *****=**~*=*> *~+ +++=+~- -.- -/- -:- -=-|- -~. ... .=.> .@=.@~.~/ //=//~/= :<:>< <#%=<#%~<#=<#~<$ <$!><$><%=<%@=<%@~<%~<&&=<&&~<&><* <**=<**~<*=<*> <*~<+=<+~<-=<-~<. <.=<.><.~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<<>=<>~<||=<||~<~=. =<<== > >$ >= >=>>> >>= ?=???~\\^^#^.^..^=^?^?!^@.^@..^@?^@?!^^^^=^^~^~consfailingnotElemonsnoc|>||||=||~precis<+> <> precursor2!! #. $$>% &&&&&& * *** *> + +++ - . .:// /= < <$ <$!><$><&><* <**><*> <+> <-<<<<<<^<= <=<<> <|> =<<== > >->>= >=>>> >>= >>>>>^^<<^>>notElemon||||| pred-trie./ predicate-class&& || predicate-transformers! ==> predicate-typedA$$$$&%%% %& &&&&&&&&~&********>+++++++:--%.&.....^..|.//=/=~:#:+<<$<$><%><&><*<*><..><:><<<=<=~<><|><~====!===~==~>>=>=~>>>>=>>>>|>|>>~^|+|>|||||||~~>prednote&&& ||| pregame$!prelate%~&+~-~.~<%~<&><<%~<<.~<>~?~^.^..^?^?!failingprelude-compat!! $$!&&***+++-. //=<<==<<==>>=>>>>=\\^^^divmodquotrem|| prelude-edsl$ * ** *> + - . / <$ <$> <* <*> >> >>= prelude-extras /=#/=##<#<##<=#<=##==# ==## >#>##>=#>=##prelude-generalize!! !!! $ ++ .: .:: .::: <>>= >>== >>=\/ >>=|\/ >>=|| >>=||| ? \\ prelude-safeenumprecedessucceeds preludeplus;!! $$!&&* ** *> + ++- . / /= :| < <$ <$!><$><* <*> <= <=<<> =<<== =≪> >= >=>>> >>= \\^^^notElem||÷٪— ↤↤∘↦∈∉∖∘ ∧∨∩∪≠≡≤≥≫≫=⌥ ⧺⩀preql$>*>:~::~~:<$<$!><$><&><*<**><*><=<<|>=<<>=>>>>>=elemnotElem presburger :&& :* :+ :- :/= :< :<= :== :> :>= :|| prettify<+> <->   pretty$$$+$<+><>pretty-compact$$ <$$> <+>   pretty-simple:.. pretty-types<$$--><$$><++><+><:$$--><:$$><:><||>prettyFunctionComposing° prettyprinter<+><>prettyprinter-combinators##-->:->(prettyprinter-compat-annotated-wl-pprint<$$> <$> <+>  <>#prettyprinter-compat-ansi-wl-pprint<$$> <$> <+>   <>prettyprinter-compat-wl-pprint<$$> <$> <+>   <> prim-uniq:~:primal#. *#*##**## +#+##-#-##.# /##/=#/=##<#<##<=#<=##==#==##>#>##>=#>=##seqprimitive-addr minusAddrplusAddrremAddrprimitive-containers\\ primus++.*.+.-.@ pringletons! \\ printcess+>.=\> afterEach beforeEach betweenEach~> printf-safe%<%> prizm<$$$> <***> <~> prob-fx:= <:> probability ////%//* >>=??=<<??~*.~.~.. processing #&& #/= #< #<= #== #> #>= #|| +.+ procex|>product-isomorphic|$| |*| ||| product-profunctors***! ***$ **** +++! profunctor-arrows$$$&&&***+++|||profunctor-misc$$$&&&***++++@@@|||profunctor-monad *>:- <$><*<*>=.=:>>>>=profunctor-optics&&&&&****++++.#. ..=..~.=.~<<*>><>=<>~^.^..^?failingzoom|||| profunctors#. .#:->progress-reporting>>> project-m36 !! #:#::#:=&&&>< ?= @@ @~|||prolens%~.~^.prolog+++ prologuec!! $$!$>$|%~&&&&&.****>+-. .:.:..::.::..~//=:$$::<>::|:~:<<$<$><$>=<$|><$|>=<&><*<**><*><<<<$>><<$>>=<<*>><<<$>>><<<$>>>=<<<*>>> <<<<$>>>> <<<<$>>>>= <<<<*>>>> <<<<<$>>>>> <<<<<$>>>>>= <<<<<*>>>>><<=<=<=<<=<<<=<<<<=<<<<<><@<@><@@><|$><|$>=<|>=<<=<<&=<====>==>>>>=>=>>>>>$>>=>>=>>>>=>>>>>=>>>~ @>Compose ^^.^?^^divelemmodnotElemonquotrem|$||||.∘ ∘∘ ∘∘∘ ∘∘∘∘∘∘∘∘∘prolude=!<-: !=.!=: $&&&&&.****>+++-. .!= .: .:? .=.~//=:&:<|>:><<$<$><*<*><-: <.<: <=<=.<=: <>=.=:=<<====.>>.>: >=>=.>=: >>>>=?. ^^. ^^divelemmodquotremseq||||.promises!= proof-combinators***==.==?? prop-unit/===== propellor!&&&&^-->-<- ->- :+ :- <&&><><|><||>==>property<==>==>prosidy:<::<<::>::>>:prosidyc&>&>><|> proto-lens# proto-lens-jsonpb.: .= proto3-suite.: .= protocol->:protocol-buffers<=< protoludeG!! $$!$!!$>%&&&&&^****>+++-. .&..|.//=:*::+:+::.::|:~:<<$<$!><$><&&><&><*<**><*><.> <<$>><<*>><=<=<<|><||>=<<==>>=>=>>>>>=^^%^ ^^^^%^^ divelem hashWithSaltmodnotElemonquotremrotaterotateLrotateRseqshiftshiftLshiftRxor||||^proton#%%~%~&&&& *** +++ .~<+> <<^ >->-->>^ ?.^.^.. ^<< ^>> ^? ||| provenience<%%><%><%?><:><^> ptera-core&!! $!&&&****>+++-. //=:|<<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq||ptera-th:*<::><:><^>ptrdiff.* pugs-hsregex!~~ =~ =~~ purebred-email<<>> purenix)!! $$!&&****>+++-. //=<<$<$!><$><*<**><*><=<=<<><|>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq|| purescript-:>purescript-ast-:>purescript-bridge<|>^== putlenses-|-< .< .\/< ><< ><<< \/.< \/< puzzle-draw.--. pvector ! !<<.!>>.!? #. .# // :|>>< |> q4c12-twofinger<*.><.*>qc-oi-testgenerator=!= ===> qchas! !#>#>* :+ <#<*> <.><><\>===>< ? ?? |> |><| |||¿ qlinear*~+~~*~~+~+~~-~quack.= quantfin *. +. -. .* .*. .+ .+. .- .-. ./ ./. /. queryparser?<> queuelike:-> quibble-core&.&&./= .== .||quick-generator.++ .| ?* ??* quickcheck-assertions/=? <=? =? >? ?/= ?< ?<= ?== ?> ?>= ?~== ~==? quickcheck-dynamic:=:==||| quickcheck-higherorder:->:=::==>=?quickcheck-properties.&&. .==. .||. quickcheck-state-machine,! !? -<.! .%.&&.//./=.<.<=.=.==.=>.>.>=.||/-:&& :->:/->:/= :< :<->:<= :== :=> :> :>= :|| <$> <**><+<-|<|<||>>- intersect isSubsetOfmember notMemberunion|->|>~=$quickcheck-state-machine-distributed! ? quickcheck-with-counterexamples:&:=/======>>< quickpull<+> === quickspec:$: :- =~=apply quipper.&&../=..==. controlled quipper-core.&&../=..==. controlledquiver +>->> +>>-> >&> >->> >->>+ >:> >>! >>-> >>->+ >>? raft $$ *? +? -? /? ?* ?*? ?+ ?+? ?- ?-? ?/ ?/? ral! !? ralist !! ++:.:|ConsRConsconselemnotElemrallod==> ramus<~~>~~range*=* *=+ +=* +=+ range-set-list\\ ranged-list +++++.++.+++...:++.:..:+:++:.:.. rank2classes$<$><*>~> ratio-int% raven-haskell.=: raw-feldspar! &&++ .&.....<<..>>..|./=:+:><<$<$!><=<=<=<<==>>=>=>>>>>=?shiftLshiftRxor||⊕ rawfilepathcons setStderrsetStdin setStdoutsnocraz!? :< <| >< ?! |> rdioh<+> react-flux$= &= @= react-haskell>> reactive-bacon===> ==> >>=! reactive-banana<@<@>@>reactive-banana-automation=: reactive-banana-bunch<@>reactive-banana-wx:== reader-soup:&=:reasonable-lens%= %~ & *= *~ += +~ -= -~ .= .~ //= /~ ^. rebasep!! #. $$!$!!$<$>%&&&&&&*******>++++++--<--<<->-. .#.&..>.>>.|.//=:+:->:|:~::~~:<<$<$!!><$!><$><&&> <&><*<**><*.><*><*?<+><.<.*><..><.><<$>><<.<<..>><<.>><<<<<=<<^<=<=<<><@<@><@@><|><||> =<<=<====>==>>>>$>$$<>$<>=>=>>>>>->>=>>>>>^@>Compose \\^^<<^>>^^divelem hashWithSaltmodnotElemonparpseqquotremrotaterotateLrotateRseqshiftshiftLshiftRxor|||||~~rec-def&& || rec-smallarray++/++/ /~/ :++::~:<#>~>records!!! /// :& := <<*>> \\\ recursion-schemes-ix::<~~>red-black-record:*:.:And redis-resp:| redis-schema:*::.:/ references !-!=!|!~&&+&&|&.-.=.~^.^?refined&&||refinery<%><@> reflex<@<@>HConsreflex-dom-core&.~=: reflex-gi-gtk:==:==>:~~:~~>reflex-transformers:>> >-> reform*>>++><++<<$>><<*<<**>> <<*>>reg-alloc-graph-color! ∈ regex !$ !$$ !$$? !$? *=~ *=~/ =~ =~~ ?=~ ?=~/ regex-applicative=~regex-applicative-text=~ regex-do-/ / /- < > ~* ~? regex-pcre=~ =~~ regex-pcre-builtin=~ =~~ regex-posix=~ =~~ regex-tdfa! =~ =~~ \\ regex-tdfa-rc! =~ =~~ \\ regex-with-pcre*=~ *=~/ =~ =~~ ?=~ ?=~/ regexchar+~/~=~regexdot#->#:#->#?:#->:#->?:#:*:*?:+:+?:+~-:.* .*? /~<><~>=~?:??:^#^#->^#->#^#->#?^#->?|+|registry+:<+<+><:registry-hedgehog/== === registry-options<:> regression-simpleaddmultregular& :*: rel8!~!~*$*$+$?&&.++./=./=:/=?<.<:<=.<=:<=?<>.:==.==:==?>.>:>=.>=:>=?>?through||.~*~.relacion<$| <| |$> |> relation<$| <-< <| >-> |$> |> relational-query:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'relational-record&!.*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><?!?!??+?and'exceptfullin'inner intersectleftleft'likelike'on'or'overrightunionunion'|$| |*| relational-record-examples:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'relational-schemas:!!??$$ $$! .*..+..-../..<..<=..<>..=..>..>=..||.<-#<.>><??!?!??*??+??-??/????||?and'exceptexcept' exceptAll exceptAll'fullfull'in'innerinner' intersect intersect' intersectAll intersectAll'leftleft'likelike' likeMaybe likeMaybe'on'or'overrightright'unionunion'unionAll unionAll'reludeB!! !!? !? #. $$!$!!$<$>%~&&&&&&&&^ ****>+++-. .~//=:|<<$<$!><$><&><*<**><*><<$>><<<<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>?:??Compose ^^.^^div hashWithSaltmodonquotremseqxor||||^ repa! *^++ +^-^/^:.deepSeq repa-array! :. repa-convert:*: repa-scalar:*: repr ^ ^^ reproject@@req/:/~=:rere>>>=\/reroute  resolv:.:respond rest-core------/ -----/----/---/--/-/>|<mapE rest-rewrite<. =. >. rethinkdb! !? #&&*+-.: .:? .= //=<<===>>=?:= ||rethinkdb-client-driver.: .:? .= rethinkdb-wereHamster! !! # && * + ++ - . / /= := < <= == =~ > >= \\ || retrie:~::~~:retroclash-lib!!. .!! .!!. ./=.:=.<.<=.<|.<|..<|>..==.>.>=.|>./=.<=.==.|>. reverse-apply& &! <&> rewriting:~> rhine)&&&&-&******* *-**^ +++++++ ++@-->-@-<+><-<<<<<<^>-->--^ >->>>-^>>>>>>^ >>^@++@>-^ @>>^ @@@||^+^^--> ^->>^->@ ^-^^/ ^<<^>>^>>> ^>>@ dot||@||||||| riak-/:| mapUpdateribbit:>AndAs Equals FromGt Gte LeftJoinLt Lte NotEquals OnOrWhereribosomerings !#!#!!*!*!#!#.**!***.+++-.#.#..*.*../.\//.<<\.\\^^^comultinner lscaleDef rscaleDefrunCovrunVecrioH! !! !? $$!$!!$>%~&&&&&&*******>+++--<.>. .~/// /=:<:<|:>:|:|><<$<$!><$><&><*<*><.><=<=<<><|<|>=<<==>><>=>=>>>>>=>>>\\ ^^.^..^?^^conscons'divelemfailingmodnotElemonquotremseqsnoc|>||rio-prettyprint<+> rivers<<| <> <|| |!| |~| rle++ :><rmonad<=< =<< >=> >> >>= ron(!! $$>%&&&**>+++-. //=:|<<$<$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=?:^^^elemmodon||≼ rope:*: rope-utf16-splay<||> rose-trees@-> rounded!*!!+!!-!!/!!/=!!!!>=!+/-.*..+..-.... /=! /=? ! >=! >=? >? rounded-hwdisjoint equalAsSetinteriorprecedes strictLessstrictPrecedessubset weaklyLess roundtrip *** *><$><*<*><+><|><||>||| route-planning--| -.- -| ..| .<.> .|  <%> <..> <..^ <.> <.?> <@> <^> <~> |--| |-| |..| |.| ~<.> row-types.!.$.+.-.//.==.\.\/.\\:+:- :-> :==\\≈rowdy///: rowdy-yesod!/!///:rp-tree.* ^+^ ^-^ rpm.&&. ./=. .<. .<=. .==. .>. .>=. .||. rrb-vector! !? <|><|> rsagl-frp<<*>> rstream!! !? ++elemnotElemrtcm<<>> rtorrent-rpc:*: <+> ruff% %! :% :+ ruin <@rmaprmapArmapARrmapRrsplatrsplatArsplatARrsplatRs-cargot::: safe-json.:$ .:$! .:$? .=$ <=?>=? safe-lazy-io!>>= =< >< safe-tensor&*&+&-.*.+.- .°safepath-<.> <.>  sai-shape-syb~~ salak.?:.?=:|:saltine!&&! !||! salvia& salvia-protocol/+ sandwich:> sandwich-slack??sarif.!= .: .:! .:? .=.=? satchmo! && || satyros::<=? ::<>? ::=? ::>? sayable &!&!*&!+*&%&*&+&+*&-&?sbp<<>> sbv!! #*!+!++-!.%.&&./=./==.:.<.<+>.<=.<=>.==.===.=>.>.>=.^ .||.~&.~|/!===\\ ^.|->scalpel//@: @=@=~atDepth scalpel-core//@: @=@=~atDepthscanf% :+ scc&& ... >& >-> >| || scenegraph<+><->  schedule! schemas<.>scholdoc$$ $+$ <+> <> scholdoc-citeproc<++> <+> scholdoc-types<> sci-ratio.^ ^! ^^! science-constants-dimensional~~ scyther-proof$$ $-$ $--$ <-> <> sdl2$=$=!$~$~!sdp>! !! !# !#>!>!># !? !?>!^ *$ *? +++? .! .$ ..../=./=..<.<..<=.<=..==.==..>.>..>=.>=..? // /=./?\ /\ :%:& :<:><.<.=><=.<=.><=<< <==><=>==.>!>.>=.>>=<< >>=> ??+?-?: ?^\+/ \/ \?/ \\ \^/ exceptfiltersdp-io:.:..:/://seakale&&./=#/=./=~<#<.<:><:|<=#<=.<=~<~=. ==#==.==~>#>.>=#>=.>=~>~||.seakale-postgresql<:><:|selda%! $=&&=*=+=-=.&&./=.<.<$>.<=.==.>.>=.||:*::+:-:=<>? ?! ?*?+?-?/?/=?<?<=?==?>?>=fromisInlikesuchThat||= selda-json~>selda-postgresqlauthon selective<&&> <*?<||> ~>selenium$$ <&> <:> <=>  semi-iso#<< #>> *** */ +++ /$/ /$~ /* /*/ /+/ /?/ <<# <<^ >># >>^ ^<< ^>> semibounded-lattices--> //\ /\\ \\\ semigroupoid-extras# semigroupoids$>*> -<--<<->-.>.>><$<$><* <*.><*> <.<.*><..><.><<$>><<.<<..>><<.>>>> >>->>= semigroupoids-do<*> >> >>= semigroupoids-syntax>> >>= semilattices/\\/ semiring-num<+><.>semiring-simple<+> <.> semirings *+-/^divideminusplusquotremtimes semver-rangeAndEqGeqGtLeqLtOrmatches separated+- +: -+ -: <++> seqloc!? // sequence:* :< :> <|><|> sequent-core=~= serokell-util%%=%?= serpentine:& serv:> serv-wai& ++ :& <+> =: servant:-:<|>:>servant-benchmark:>: :|:servant-checked-exceptions-core<>~ servant-cli##:>#:>$:>%:>?:>branchnoteservant-client-core///: servant-js:<|>:> servant-named:= servant-quickcheck<%>servant-server.++ :. servant-snap:. servant-util$&&.*.==?/?/<?/<=?/=?/>?/>=?/~ HCons textContains textIContains textILiketextLike||servant-validate:<sessions .=   =~= ~> ~>> ~>>= ~|||~ ~||~ ~|~ sessiontypes:!> :*: :?> <&<&><*> >> >>= set-monad\\ set-of+set-with\\ setoid=~=\\∪ setops∅ ∩ ∪ sets\\ sexp-grammar.:.:?:-:< <<<>>>Compose sexpresso::: shady-gen# $$ /=^ :* :*: :+ :->: :< :^ <+> =--= =-= =: =:: =:= === ==^ >+> shady-graphics*: shake%>&%>&?>-<.>/=<.>==?== ?> hashWithSalt|%>~>shake-language-c>>>= shake-path$%> $&%> shake-plus%> |%> shake-plus-extended%^> /%> /|%> |%^> shakers8!! $$!%>&%>&&&&&&*>&?>* ** *****>*>*>>+ ++- . / /= < <$ <$!><$><* <*> <-> <.><:> <= <=<<=> <><|>=<<== > >= >=>>> >>= ?== ?>?>>\\^^^notElemon|%>|*>||~>shana- . < <|> > ^ she:$#$#$#: shell-conduit$| shell-monad & -&&- -|- -||- <& >& |< |> |>> shellish# <$$> <$> <.>  shellmate<$!><=<=<<>=>>>>>=|>shellmet$?$^$|shelly-|- <$><.>  shh&!> &> <<< <|>>> |!>|>shikensu!~> ~> shine<> shivers-cfg↦ short-vec! ++shortbytestring!? conssnoc shortcircuit&& ?? || show-combinators&|.=.@| appendFieldsshowAppshpider=: shwifty&sibe:- sieve++? sifflet::= ::~ := :=> :~ :~> sifflet-lib::= ::~ := :=> :~ :~> signable:$$! $!!$>%%~ &&&&&&****>+++-. ... .~ //=:% :|<<$<$!><$><&><*<**><*><<$>> <=<=<<><|>=<<==>>=>=>>>>>=?: Compose ^^%^ ^. ^.. ^? ^^^^%^^ divmodonquotremxor|| silkscreen<+> simple-actors<-> <.|> simple-affine-space*^ .+^.-..-^^+^^-^^/ dot simple-cmd+-+simple-cmd-args<|>simple-conduit$$$==$=$= simple-css^- ^| simple-enumeration<+> >< simple-logger<> simple-money^* ^+^ ^-^ ^/ simple-nix=$= simple-pascal# simple-pipe++++ =$= =@= |||| simple-reflect@@ ⊕⊗ simple-rope.< <> >. simple-ui.=^. simple-units.*.+.-./ simple-vec3.*.^ <+><->>< simplelru-|> <| <|- |> simpleprelude !! $ $! && ++ . =<< >> >>= || simplexmq<$$><$?>simplistic-generics&&&***:***::**::*::+::.:<.>sindre<$$><$?><|?><||> singlethongs:~:singleton-dict!? %:!? singletons %~:%&::&::~:@@ @@@#@$ @@@#@$$ @@@#@$$$ ~>~>@#@$~>@#@$$~>@#@$$$singletons-base!! !!@#@$ !!@#@$$ !!@#@$$$ $$!$!@#@$$!@#@$$$!@#@$$$$>$>@#@$$>@#@$$$>@#@$$$$@#@$$@#@$$$@#@$$$%!! %$%$!%$>%&%&&%*%*>%+%++%-%. %/=%<%<$%<$!>%<$>%<&>%<*%<**>%<*>%<=%<=<%<=?%<>%<| %<|>%=<<%==%>%>=%>=>%>>%>>=%\\%^%||%~ &&&&&@#@$&&@#@$$&&@#@$$$&@#@$&@#@$$&@#@$$$**>*>@#@$*>@#@$$*>@#@$$$*@#@$*@#@$$*@#@$$$+++++@#@$++@#@$$++@#@$$$+@#@$+@#@$$+@#@$$$--@#@$-@#@$$-@#@$$$. .@#@$ .@#@$$ .@#@$$$ .@#@$$$$ /=/=@#@$/=@#@$$/=@#@$$$:$$::$$:@#@$ :$$:@#@$$ :$$:@#@$$$:%$$::%<>::%|:<>::<>:@#@$ :<>:@#@$$ :<>:@#@$$$:@#@$:@#@$$:@#@$$$:|@#@$:|@#@$$:|@#@$$$:~:<<$<$!><$!>@#@$ <$!>@#@$$ <$!>@#@$$$<$><$>@#@$<$>@#@$$ <$>@#@$$$<$@#@$<$@#@$$<$@#@$$$<&><&>@#@$<&>@#@$$ <&>@#@$$$<*<**><**>@#@$ <**>@#@$$ <**>@#@$$$<*><*>@#@$<*>@#@$$ <*>@#@$$$<*@#@$<*@#@$$<*@#@$$$<=<=<<=<@#@$<=<@#@$$ <=<@#@$$$<=?<=?@#@$<=?@#@$$ <=?@#@$$$<=@#@$<=@#@$$<=@#@$$$<><>@#@$<>@#@$$<>@#@$$$<@#@$<@#@$$<@#@$$$<|><|>@#@$<|>@#@$$ <|>@#@$$$=<<=<<@#@$=<<@#@$$ =<<@#@$$$====@#@$==@#@$$==@#@$$$>>=>=>>=>@#@$>=>@#@$$ >=>@#@$$$>=@#@$>=@#@$$>=@#@$$$>>>>=>>=@#@$>>=@#@$$ >>=@#@$$$>>@#@$>>@#@$$>>@#@$$$>@#@$>@#@$$>@#@$$$ ComposeSym0 ComposeSym1 DivDivSym0DivSym1DivSym2ModModSym0ModSym1ModSym2OnOnSym0OnSym1OnSym2OnSym3OnSym4QuotQuotSym0QuotSym1QuotSym2RemRemSym0RemSym1RemSym2SCompose SConsSeqSeqSym0SeqSym1SeqSym2\\\\@#@$\\@#@$$\\@#@$$$^^@#@$^@#@$$^@#@$$$sDivsModsOnsQuotsRemsSeq||||@#@$||@#@$$||@#@$$$ singletons-th%~ :~:singular-factory<||>>>>sitepipe##%%=#%%~#%=#%~#=#~%%=%%@=%%@~%%~%=%@=%@~%~&&&=&&~&~**=**~*=*~+=+~-<.>-=-~.!= ... .: .:! .:? .=.> .@=.@~.~//=//~:<:>:~:<#%=<#%~<#=<#~<%=<%@=<%@~<%~<&&=<&&~<&><**=<**~<*=<*~<+=<+~<-=<-~<. <.=<.><.~<<%=<<%@=<<%@~<<%~<<&&=<<&&~<<**=<<**~<<*=<<*~<<+=<<+~<<-=<<-~<<.=<<.~<=<<<>~<<>=<<>~<=<>~ $?=???~^#^.^..^=^?^?!^@.^@..^@?^@?!^^=^^~^~consfailingmagnifysnoczoom|>||=||~ size-based!!* sized !! %!! ++:-:-:::<:><||> sized-grid:|Compose sized-vector!! %!! sized-wrapper<<>>sized-wrapper-textcons skeletal-set=~=\\∪ sketch-frp-copilot=:@: skew-list! !? skulk<$$>>=>=>>==>>>= slack-web<+> small-bytearray-builderappend smallcaps&&& ||| smallcheck<~>==>><>>-\/smtLib.<. .>. =/= === ==> smtlib2.#. .&..*..+..-../../=..:..<..<=..==..=>..>..>=..|.div'mod'rem'snap-app!# !. ++ snap-core snap-extras-/- snap-predicates:&: :*: :|: :||: snaplet-postgresql-simple:.snaplet-sqlite-simple:. snowchecked.&..|.shiftLshiftRsolga:<|> sop-core-.->:*:.:AndCompose souffle-dsl .!=.% .<.<=.=.>.>=.^ \/ |-sousit$$ $= =$ =$= =+= =+|= =||= sparse-lin-alg ! # // <| |> · ·× × ×· sparse-linear-algebra## ##^ #> #^# #~# #~#^ #~^# *.-=- -||- .*./<# <.> <\> >< @@ @@! ^+^ ^-^ sparse-tensor&&&+&&&>&&.+&&.>&*&+&-&.&.&+&.&>&..+&..>+>.&&+.&&>.&.+.&.>..&+..&>...+...> sparsebit*. .& .&. .** .| .|. =:= sparsecheck& *** -+- :- :-> :|: =/= === ? \/ |<=| |<| |>=| |>| spatial-rotations°spawn|*| spe.*. .+. .^ <*. <^ >< species:*: >< @@ speculate ! *** ++++- ..: .: >|thn|==||>|>| speechmatics.:?? spice^* ^*> ^+ ^+> ^- ^-> ^. ^.> spine:&: :<>: :> spirosD!! $$!$> &&&&&&*******>++++++--:. .&..|.//=:|< <$<$><&><*<**><*><<<<=<=<<><|>=<<==> >$>=>=>>>>>=>>>\\^^^divelem greaterThan hashWithSaltlessThanmappendGenericmodnotElemonquotratioremrotaterotateLrotateRsappendGenericshiftshiftLshiftRxor|||||spirv-reflect-types.&&. spirv-reflect-yaml.? splay<| |> splaytree<| >< |> sprinkles'!! $$!&&* ** *> + ++ - -<.>. / /= < <$ <$!><$><* <**><*> <.><= <=<<> <|+> <|> =<<== > >= >=>>> >>= ^^^notElem|| sql-simple+:+ :. sql-words .<..<=..<>..=..>..>=..||.<++><.> andin'or|*| sqlite-simple:.:=squares*** +++ <=< ===>=> >>> |||squeal-postgresql8! !+!-!-!#-.#.&&< &> *.*:+!-|- .! .#.#>.#>>.& .&&.*.-..->.->>./=.<.<=.<@ .==.>.>=.? .?& .?| .| .||:*::::=>:>><+><-> <..<<..<=<<@ <=..<<=..<=<@>>>@&& @* @+ @- @>@>. @>> @@ squeal-postgresql-ltree%<@%?%@%@>%~&?&@&~<@%?%?&?<@?@?@>?~@%@&@>%~%~&srcloc<-->srcspansssp-/- stack7$$!$!!$>%~&&&&&&*******>+++-. .|.~//=:|<<$<$!><$><&><*<*><+> <=<=<<><|>=<<==>>=>=>>>>>=>>>^^.^..^?^^divelemmodnotElemonquotremseq|| stack-prism:- staged-gg:**::++::@@:stan &&&? baseNameFromghcPrimNameFrom textNameFromunorderedNameFrom|->|::||| state-record// stateful-mtl>>=? statistics± statistics-dirichlet! !!! statistics-skinny± status-notifier-item<..><<$>>>>=/ stdio.: .:! .:?  steeloverseer<|||> step-function! stepwise<<|> stgi:< <>> stitch-:.=? stm-conduit$$&$=&<=> =$&=$=&>=<stompl<| >|< |> storablevectorappend stream-fusion!! ++ <=< =<< >=> >> >>= \\ streaming:><><|>Compose streamly!! #. .:<=><><| ConsaheadasyncbindconsconsMparallelserialwAsyncwSerial|$|$.|&|&.|:streams!! :<:>:~<|strict:!: strict-base:! :!: :| strict-base-types:!:strict-containers! !? ++// :*::<:<|:>:|><|><IQConsITQConsQConsTQCons\\ elemnotElem|> strict-data! !? +!+:! \!\ strict-types!  string-combinators$$ <+> <> string-conversions<>string-variants<=<>| stringtable-atom! \\ stripe-core-&-  stripe-tests$-&- . /===>> >>= stripe-wreq:= strong-path structs# structural-induction:~ structured-cli>+ structured-mongoDB .! .&& .* ./= .< .<= .== .> .>= .|| subG%@%^ subcategories*+--<<.> /=<$:<$:><. <.>==>> >>->>= subhask2! !? $ $! $$ && * ** *. *.. *= + ++ +. += - -= . .* .*. .*.= .*= .+ .+= ..*.. ./ ./. ./.= ./= / /= < <*> <<< <= <=< <> =<< == ==> > >< >= >=> >> >>= >>> ^ ^^ || subnet.&&. .+. .-. .||. subzero<-$> <-|> summoner-tui|>sunroof-compiler! # $$ := super-user-spark&&& <$$> <**> supermonad"!! $$!&&* ** *> + ++- . / /= < <$<$!><$><* <**> <*> <= <=<<|> =<<== > >= >=>>> >>= ^^^notElem|| superrecord&&.&:&:-++: :&:= supply-chain>+ >- >-> supply-chain-core>+>->->suspend.+. sv.:=: ==<<>$>>==sv-core.:<>==?> ?>> svg-builder->><<-<>svg-builder-fork->><<-<> svg-icons.:swagger-petstore-&- swagger2<+> swarm%%=..!= ..: ..:? :$::*::+::->:<%=<+=<<.=<>==:=?syb-with-class:~::~~:sydtest shouldBe shouldContain shouldEndWith shouldNotBeshouldNotReturnshouldNotSatisfy shouldReturn shouldSatisfyshouldStartWith shouldThrow sydtest-wai<:> sym/+/\-\at unsafeAt symantic##>#~++:$:= :@ :~::~~:CtxTeSCtxTySDupKiFunTypesSVarSapptyApp tyQual~> symantic-base$-->. .>.@ :!:<%><&><*&><+&><+><-><.<.><><|>==ConcatConsconcatequal symantic-cli:!:<.>althelpsymantic-document<+>symantic-grammar&>.*><&<*.<+>ebnf_arg setSource symantic-http:!:<.> symantic-lib&&**>+-/=<<$<$><*<*><=<> <|>==>>=>=>>>=comp divelem list_consmodquotremxor||symantic-parser<+> <:> <~> >?> symantic-xml*:* :* :-:::: :|: syntactic:$:* :+: :-> synthesizer#| #|- #|= $# $& $- $/- $/: $: $:: $^ &&& &*>^ &*^ *** ++ +.* -|# .: .^ <<< <<^ =|# >>> >>^ ^<< ^>> |# synthesizer-core#|#|-#|=$#$*$:$::$<$>$^+.*-|#.: .^ =|#append|#synthesizer-dimensional#|#|-#|=$#$& $-$/-$/:$:$::$^&&&&*>^&*^&*~***-|#.: .^ <<<<<^=|#>>>>>^^<<^>>apply applyFst |#synthesizer-llvm$# $& $* $*# $/ $< $<# $> $># %&& %/= %< %<= %== %> %>= %|| &|& +: ? ?? system-extra:-- system-filepath<.>  t-regex ! # ->> ->>> :**: <.> <<- <||> ? ^* tabular+----+ +.+ +====+ ^..^ ^|^ ^||^ taffybar<||><|||>?? tag-stream||. tagged-list:. tagsoup~/= ~== tagstream-conduit||. talash! tamarin-prover-term# *: tamarin-prover-theory.&&. .<=>. .==>. .||. tamarin-prover-utils$$ $-$ $--$ <-> <> =: tamper! tapioca:| <-><:>tarNexttar-bytestringNexttarget::: taskell<#> tasty-bdd@?/= @?=^?/= ^?= tasty-dejafu->- === =>= tasty-hslua=:?: tasty-hunit@=?@?@?=tasty-hunit-compat@=?@?@?=tasty-inspection-testing==- === ==~ tasty-quickcheck.&&..&..||.=/======>>< tasty-smallcheck==>tax<> tdoc! +++<<teams.$. .|. telegram-bot-simple<# template-haskell$$$+$<+><>>> >>= temporal-media*| +:+ +| =:/ =:= temporal-music-notation! *| +:+ +| =:/ =:= ten *>!:**:*::+::.:<$!<$>!<*!<*>!ten-lens!=!=?ten-unordered-containers:**tensor ! !! *. .*. .+. .|. :|: <*> <++> <+> ⊗ tensor-safe:~>:~~tensors! terminfo<#>termonad3$$!$!!$>&&&&&&*******>+++-. //=<<$<$><&&><&><*<**><*><.><=<=<<><|<|><||>=<<==>>=>=>>>>>=\\ ^^^div hashWithSaltmodonquotremseq||terrahs$*$ test-fun%:+:->:.>*> >-> ~%test-invariant&> <=>    <~~ @~> testcontainers&testpack@=? @?= text:*:<>consmulmul32mul64text-and-plots/: text-builder-linear$<|%<|&<|.<|<|<|#><|>|>#|>$|>%|>&|>.|>……<|text-containers!? text-ldapelem'inBounds inSBoundsnotElem' text-position<++> text-printer<+><-><> text-region.+. .-. text-short!? text-utf8:*: <>consmulmul32mul64text1+:.:.<><>.textPlot.+ .- .| tfp:< :> th-alpha@=th-build--> .:: \-> th-cas:*: :+: :-: :/: :^: th-desugar\\ themoviedb.:: theoremquest:-> =. thespian▷ ◁ thih+-> :=> :>: <:> @@ threepenny-editors*-*|-*-*-:-*- :|*| |*|*|threepenny-gui ##+#.*><$<$><*<**><*><@<@><|>tickle!!- !+ !- .>> <<. tictactoe3d! // tidal+!!! # %| **| *>*| ++| +| -| /| <*<<*<| <~ >| |% |%| |* |** |**| |*| |+ |++ |++| |+| |- |-| |/ |/| |< |<| |> |>| ||% ||* ||** ||+ ||++ ||- ||/ ||< ||> ~> time-recurrence>==> tinylog+++.=~~tip-haskell-frontend$ && * + ++ - . .&&. .||. /= < <= =/= == === ==> > >= ^ || tip-lib $-$ $\ // /\ ::: :=>: :@: =/= === ===> ==> \/ titlecase<#> tlex-core(!! $!&&&****>+++-. //=:^: :|:|: <<$<$><*<*><=<>=<<==>>=>>>>=^^^divelemmodnotElemonquotremseq||tmp-proc&:HConstmp-proc-postgresHConstmp-proc-rabbitmqHConstmp-proc-redisHConstmp-proc-zipkinHConstnet.: .= todos<++> toml-reader-parse.!=.:.:? tomland.=<| =: tonalude/$$!$!!$>&&&&&&*******>+++-. //=<<$<$!><$><&><*<*><=<=<<><|>=<<==>>=>=>>>>>=>>>^^^divelemmodnotElemonquotremseq|| tonaparser.|| top>->topaz++<:tophat>>>total&&&& total-map! tower* ** *. + +. - -. .* .*. .+ .+. .- .-. ./ ./. / /.  >< ^ ⊕ toxcore+ - toysolver.&&../=..<..<=..<=>..==..=>..>..>=..|. .||.:*: :+:+: :-:/: :<=divmodtpdb$$ &|<+> <>traced%&& %/= %< %<= %== %> %>= %|| traction%$$>&&&**>+-. //=<<$<$!><$><*<**><*><=<=<<><|>=<<==>>=>=>>>>>=^divelemmodnotElemquotrem||traildb:. ^. transformations<.> transformers-compose<<< >>> transient!> **><**<***<| |- translatable-intset\\ translate- . trasa.&./treemap<| \\ axis_at axis_filtertreeseqaxis_at axis_filteraxis_filter_current trek-lens%>focusingtrial:-::-alt triangulation+< trifecta.# :@ :^ :~ tropical.*. .+. ./. .^. tropical-geometry!* >*< truthy&&* ||* tsweb&&.&&?.**./=*./=./=?. <*.<-.<.<=*.<=.<|>.==*.==.==?. >*.>.>=*.>=.between_div_in_like_mod_ similarTo_||.||?.tubes-< >- >< |> ~> tuple-append+++++><++ tuple-morph++@ turtle% &*>.&&..||.<$><&><*<*><.><=<<><|>>=>turtle-options<+> <:> twee! &&& :=: ||| twee-lib$$$+$&&& :=: <#><+><< ||| twentefp!! twentefp-number!! twentyseven ! !$ !. <&> <>^ >$< ?? |*| |.| |:| twilio<&> twine=: twitch|#|%|+|-|>twitter-conduit:= ty=:= type-aligned:< :> <| >< |> type-combinators8*:+:.&&.&..*.+.++.==.?.\\ .^.^^.||////?//?+:+::<:>:>><# <## <### <=# <=## <=### <==>=###==##==#===>=?==??=># >## >### >+<>--->>-->>->>:>::>=# >=## >=### >>->>-->>--->>:>>=->>=-->>=--->>=~>>~>|<\\ type-compare /=/=? <<=<=?>=>=?>?type-eq|$| |.| |> ||$|| ||.|| type-equality:~~: type-errors:$$::<>:type-errors-pretty%<>•⊕type-functions:-> type-indexed-queues*.+.-.:- <=.^. type-level && * + - :* < <= == > >= ^ || type-level-bst! !? .:. <$*> <$*?> |> type-level-kv-list&. &=:=type-level-sets:-> type-level-tf * + - :* < <= > >= ^ type-map<: <|conssnoc|> type-natural%*%+%-%-. %<=?%=?%>?%^%~*+--.<<=<=?>=>=?>?@+ DivMod^sDivsMod type-of-html#&:#: :&::= :>:@ :|:type-operators$$$&<+> <=> <^^>type-rig***><***<***><+++>type-settheory:***: :×: type-spec5######### ######### ###################################################################################################################################################!#################################$####################################'#######################################*##########################################-#############################################0################################################3###################################################6######################################################9#########################################################<############################################################?###############################################################B##################################################################E#####################################################################H########################################################################-*-*---*-/-~>~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~9~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~E~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ type-unary<+>typecheck-plugin-nat-simple.+.typed-duration# typed-time:<> typedflow # +.++. .--. .-. :& <-- · ∙⊕⊘⊙⊝ typelevel $$$&&&:$$::<>:<$><*><>typelevel-tensor! :~ typelits-witnesses%* %+ %- %<=? %^ typenums*+-//=/=?:$$::% :<>:<<=<=?====?>>=DivModQuotRem^ typerbole/$/-><><> ====\-/\<≣⊑typical:#: typograffiti.&. .|. typson-core:-><<$><<*>tyro%%>>%> uhc-util$?/\<==><=><=>> <\><\>> =!=!!==>==>> =@=|@=\!\/ varmpPlus|+> |>|\> unboxed-containers\\ unboxing-vector! !? ++ // uncertain+/-:+/- uni-events+>>>>>>>=|> uni-graphs$$$$$$$$?uni-htk&#&//\\ ^#|#|uni-util#$!!$$@: @@: deepSequnicode-prelude¬ × ÷ ⇔ ∅ ∈ ∉ ∧ ∨ ≠ ≡ ≢ ≤ ≥ ≮ ≯ ⊥ ⋅ ◦ unicode-symbols¬ ÷ ∅ ∈ ∉ ∘ ∧ ∨ ∩ ∪ ≡ ≢ ≤ ≥ ≮ ≯ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ ⊕ ⊛ ⊥ ⊲ ⊳ ⋅ ⋈ unicode-tricks*^*^!unification-fd<:==:=====~=equalsequivsubsumesunifyuniform-fileio<.>  uniform-pair:# uniform-strings<#> <+> <-> <.>  <:> <|> union-map! \\ unipatterns||> uniplate|* |+ |- ||* ||+ unique-logic=!==:=unique-logic-tf=!==:=uniquely-represented-sets! !? units9##*#+#-$=%%*%.%/%^*^|*|*~.#/|:*:/:@ :^@*@+@-@/@@+@@-@~^#^% qApproxqNapproxshowInshowInV|*|*^||*||+||-||.+^||.-.||.-^||.||/|/=||/||<=||<||==||>=||>||^|^*|^*||^+^||^-^||^/|^/||^^ unittyped* + - . .$. .*. .+. .-. ./. .<. .<=. .==. .>. .>=. / < <= == > >= ~. universe-base+*+ +++ <+*+> universe-reverse-instances/=<<===>>= universum<!! $$!$!!$>%~&&&&&&****>+++-. ....~//=:% :|<<$<$!><$><&><*<**><*><<$>><=<=<<><|>=<<==>>=>=>>>>>=?:Compose ^^%^ ^.^..^?^^^^%^^ div hashWithSaltmodonquotremseqxor||unix addSignal deleteSignal unlifted-list. unm-hip*. +. -. .* .+ .- ./ ./= ./=. .< .<. .== .==. .> .>. /. /=. <. ==. >. unordered-containers! !? unordered-intmap! unpack-funcs$~ unpacked-containers! !? \\ unparse-attoparsec unused<> uom-plugin*:+:-:/::/ ^:~~urldisp-happstack|. |/ |// |? |\ |\\ urlencoded%!%&%=%=?%?util!!? & &=&*=*.&¬ <&&><|<||><₪>onnonnn|>₪∈∉∘ ∘∘ util-logict<~>><\/ utility-ht.<<..> .>>.<=<<>?->?:impliesuu-cco >#< >-< >//< >^< >|< uu-interleaved<<||><><||> uu-parsinglib<$$> <++> <..> <.> <<|>optuu-tc*><$<$><*<*><<|><|>>>=uuagc-diagrams#uulib%*><$<$$><$><$?> <*<**><*><+><..><><|><|?> <||> >#<>-<>-<<>//<>>#<<>>$<>>$<<>>-<>>-<<>>//<<>>^<<>>|<>>|<<>^<>|<>|<<opt~$~ ~*~ uusi<&><||>uvector:*: vacuum! != .= valida valida-basevalidate-input<=<>=>validity<>var:* :| variable-precision-@? .@ .@$ .@~ =~= variadic...*> ...>>= <$>... <*... =<<... Consvarying<<<>>>vec! ++:::vect &! &* &+ &- &. &^ *& *. .* .*. vect-floating &! &* &+ &- &. &^ *& *. .* .*. vector! !! !? ++// elemnotElemvector-circular++ vector-endian! !? vector-functorlazy! !? ++ // vector-hashtables! !. !.~ !~ <~ <~~ vector-heterogenous::: vector-sized++ // elemnotElem vector-space*.* *^.+^.-..-^:-*<$>><.>>-<D ^*^+^^-^^/vector-space-points*. vector-static! ++ vector-stream!! !? ++elemnotElem vector-text! !! !? ++// elemnotElemverifiable-expressions*&&*->*<->*||.&&... .<.<=.=..== .>.>=.||\\^+ ^== ^>>=^>>>= ^^^verilog<> verismithverset6$$!$<$>&&&&&^ ****>+-. //=:|<<$<$!><$><&><*<**><*><<$>><<<<=<=<<><|>=<<==>>$>$$<>$<>=>=>>>>>=>>>?:^^^divelemmodnotElemonquotremseq||||^ vformat:=vgrep!%%=%~&&~*=+=+~-=-~.=.~//=<%=<%~<&><.=<<%=<<%~<<.=<<.~<>~: :>: :>=: <++> views<<< >>> vinyl :&:. ::&<+><<$$>> <<$>><<&>> <<*>>=:=:= arcons vinyl-plus:& vinyl-utils/$$/ /$/ \$$\ \$\ \&&\ \||\ vinyl-vectors! !? ++ // vitrea%~.?.~>-?.^.vivid &&&& <<< >>> ? AddParams ||| ~*~**~+~-~/ voicebase.:?? vp-tree.+. vt-utils! $$!&&*+-. .&..=.|.//=<<$><*><=<><|>==>>=>>>>=divmod||vty<-><|>vty-ui+++ .|. <++> <--> <~ <~~ vulkan:&::& vulkan-api&* vulkan-utils.&&. wahsp.|..||.wai-app-file-cgi<.>  <\> wai-middleware-preprocessor<|> >-> wai-middleware-static<|>>->wai-middleware-static-caching<|> >-> wai-predicates# &.&..|.:::|||wai-request-spec wai-route.&../:::=~= waitfree-*- wakame:* wallpaper.*^wasm.= web-inv-route!:?:? RouteAction web-routing+| := web3-ethereum:&:? web3-solidity:<webcrank<%%= webcrank-dispatch ==> webdriver!: .:?? <==>webdriver-snoy!: <&&>  <==> <||> weekdaze>*<>+<weighted-regexp=~ what4 .&&./ ./=.<.<=.==.>.>=.||:+==>whim+: -: wild-bindasrunwineryextractConstructorextractConstructorBywith:&: witherable<$?><&?>witness*+-:~~:<=DivMod^wizardWizardT wizards:+: wl-pprint<$$><$><+><>wl-pprint-annotated<##><#><+><>wl-pprint-extras<+>   <> wl-pprint-text<$$><$><++><+>besidewoot!? wordpass||| world-peace<>~ worldturtle>/>wreq:=wreq-patchable:=wreq-sb:= wumpus-basic:< :>  wumpus-core*# wumpus-drawing:<< :>> <+> wx#.+..-.::= ::~ := :~ wxcore#.+..-.xformat% :%: <> xhtml! +++<-><< xilinx-lava->- >-> >=> >|> xlsx.= .=? xlsx-tabular &.: .=.~<$><*>?~^.^? xml-conduit $.//$/$//$|&.//&/&//&|>=>xml-conduit-decode$/$//%/%//&/&//*** ||| xml-conduit-selectors<||>xml-conduit-writer!: xml-enumerator $.// $/ $// $| &.// &/ &// &| >=> xml-indexed-cursor $.//$/$//$|&.//&/&//&|>=> xml-isogen!!%&*+=:=??%xml-lens... xml-optics./ .// xml-picklers<#> <++>    xmlgen<#><>xmonad-->.|.<&&><+> <||>=? |||xmonad-bluetilebranch--> .|. <&&> <+> <||> =? ||| xmonad-contribv!! !>!? $$!$? &&&>*******/*****/*******//* ****//*******|*****|*******||* ****||******/****/*****/*******//****//** ***//*******|****|*****|*******||****||** ***||******/***/*****//***//*****|***|*****||***||****/**/***/****/*****//**//***//****//*****>*|**|***|****|*****||**||***||****||****+++---> -->>-?>-?>>. .: .| .|.//=/=? :&: :|:|: <<$<$><&&> <*<*><+>  =+=-=. =: =<<===? >>*> >-$>->>=>=>>> >>=?+??And Or^^++^ ^? ^^divelemnotElemquotremrememberActionsseq||||| ~? xmonad-contrib-bluetilebranch:!> ****/* ****/*** ****//* ****//*** ****|* ****|*** ****||* ****||*** ***/* ***/** ***/**** ***//* ***//** ***//**** ***|* ***|** ***|**** ***||* ***||** ***||**** **/* **/*** **//* **//*** **|* **|*** **||* **||*** */* */** */*** */**** *//* *//** *//*** *//**** *|* *|** *|*** *|**** *||* *||** *||*** *||**** -->> -?> -?>> /=? <$> *> >=> ?+ ?? ^++^ ||| xmonad-extras~? xournal-builder<> xournal-render:- xsact?? yak<:>yall$- -$ ^$ ^>>= ||| yam:.yam-app<>yaml.!= .: .:? .= yaml-streamly.!= .: .:? .=yamlparse-applicative  yaop=: yap% * / :+ ^ ^^ yarl:> yarn-lock! yarn2nix!!.$$=yeamerx#%$<>%$> &&~! &~: &~? &~~! &~~: *..* +..+ -\- -→ ... /⊂ <.< <.≤ <== <=> <><،> === ========> =→ =⸪ >$ |-> ||| |◝ |◞ |◞◝ ° ± × ، ،..، ⁀ ₌₌ ←- ←= →│ →│← →│→ ↘── ↘──↖ ↘──↘↦ ↪ ∀: ∃: ∄: ∈ ∉ ∋ ∌ ∏ ∑ ∓ ∖ ∗ ∘ ∝ ∥ ∧ ∨ ∩ ∪ ∫ ∼ ≃ ≅ ≈ ≠ ≡ ≤ ≤.< ≤.≤ ≥ ≪ ≫ ⊂ ⊃ ⊆ ⊇ ⊎ ⊕ ⊗ ⋂ ⋃ ⋆ ␣ ── ──↖━━ │ │←┃ ██ ■ ◝ ◝⁀ ◞ ◞∏ ◞∑ ◞∫ ◞∮ ◞⋂ ◞⋃ ◞◝ ◞⨄ ⟂ ⧵ ⨄ ⩵ ⩵! ⪡ ⪢ ⸪ ⸪= yesod-auth-oauth2.: .:? .=<> yesod-core.: .=:#: yesod-paginator'!! $$!&&****>+++-. //=<<$<$!><$><*<*><=<=<<>=<<==>>=>=>>>>>=^^^divelemmodnotElemquotremseq|| yggdrasil+++ yhccore$$ $+$ <+> <> yi &&> <||>>!>>=!?*>>?*>>!?>>?>>!||> yi-core<||>>!>>=!?*>>?*>>!?>>?>>!||> yi-language+~ -~ =~ ~- yices :*: :+: :-: :/: :/= :< :<= := :=> :> :>= yjtools&&& <.> ||| yoko.|. .|| :*: ||. ||| york-lava! +> --> :+: :-> <#> <&> <+ <++> <== <=> <|> =/= === >< ? |<=| |<| |> |>=| |>| yu-core=@yu-utils<#><%>yuiGrid! +++ /- ^# ^% ^. ^^. z3+? zeolite-lang!!>??>zephyr-copilot,!! # $$!&&****>+++-. .!! .&..<<. .>>. .^. .|.//= < <$<$><*<*><= <>=:=<<== ==> > >= >>>>=@: ^ ^^elemnotElemquotremseq|| zettelkast./ zio<$<$!><=<=<<>=>>>>>=zipedit?? zippers:>:>>:@ zre==> zsyntax::: A2captcha3d-graphics-examples3dmodels4Blocks AAIABListAC-Angle AC-BooleanAC-BuildPlatform AC-ColourAC-EasyRaster-GTKAC-HalfInteger AC-MiniTestAC-PPM AC-Random AC-TerminalAC-VanillaArray AC-VectorAC-Vector-FancyACME ADPfusionADPfusionForest ADPfusionSet AERN-Basics AERN-Net AERN-RealAERN-Real-DoubleAERN-Real-Interval AERN-RnToRmAERN-RnToRm-PlotAES AFSM AGIALUTAMIANum ASN1AVar AWin32ConsoleAbortT-monadstf AbortT-mtlAbortT-transformers ActionKidAdaptive Adaptive-Blaisorblade Advgame Advise-me AesonBsonAgataAgdaAgda-executable AhoCorasickAlanDeniseEricLauren AlgoRhythm AlgorithmWAlignmentAlgorithmsAllureGAndroidViewHierarchyImporterAnimas Annotations Ansi2Html Aoide ApplePush AppleScript ApproxFun-hsArrayRef ArrowVHDLAspectAG AttoBencodeAttoJsonAttracAurochs AutoFormsAvlTreeBASICBCMtoolsBNFCM BNFC-metaBPSBagginsBang Barracuda Befunge93BenchmarkHistory BerkeleyDB BerkeleyDBXML BerlekampAlgorithmBiGULBigPixel BinderAnnBinpack BioHMM Biobase BiobaseBlast BiobaseDotP BiobaseENA BiobaseEnsembl BiobaseFR3D BiobaseFasta BiobaseHTTPBiobaseHTTPToolsBiobaseInfernal BiobaseMAF BiobaseNewickBiobaseTrainingData BiobaseTurner BiobaseTypes BiobaseVienna BiobaseXNABirdPPBitStringRandomMonad BitSyntaxBitlyBlammo$ BlastHTTPBlobsBlogLiteratelyBlogLiterately-diagrams Blogdown BluePrintCSS Blueprint BookshelfBooleanO BoundedChanBravoBufferedSocketBuster C-structsCBOR CC-delcont CC-delcont-altCC-delcont-cxeCC-delcont-excCC-delcont-refCC-delcont-ref-tfCCACHXHtmlCLASECLI CMCompareCMQ COrdering CPBrainfuckCPLCSPM-CoreLanguageCSPM-FiringRules CSPM-FrontendCSPM-Interpreter CSPM-ToProlog CSPM-cspmCTRexCVCabal{Cabal-ide-backend Cabal-syntax CabalSearch Capabilities Cardinality CarneadesDSLCarneadesIntoDung CartesianCascadeCassavaCatanaChannelTCharts Chart-cairofChart-diagrams Chart-fltkhs Chart-gtk Chart-gtk3 Chart-simple Chart-testsChasingBottoms/ CheatSheet CheckedChitra ChristmasTree CirruParser ClassLaws ClassyPreludeClean Clipboard ClustalParser CoadjuteCodec-Compression-LZFCodec-Image-DevILColorCombinatorrent CommandCommando ComonadSheet Compactable ConClusionConcurrent-CacheConcurrentUtils ConcurrentialCondor ConfigFile, ConfigFileTH Configger Configurable ConsStream ConscriptConstraintKindsConsumer ContArrowContextAlgebraContractControl-EngineControl-Monad-MultiPassControl-Monad-ST2CoreDump CoreErlangCoreFoundation CoroutineCouchDBCraft3eCryptoCurryDBDAG-TournamentDAV4 DBFunctor DBlimitedDBusDCFLDMuCheckDOHDOMDPDPMDPutils DRBG<DSADSHDSTMDTC DangerousDao DarcsHelpers Data-AngleData-Hash-Consistent Data-Rope DataIndex DataTreeView DataVersion Deadpan-DDPDebugTraceHelpersDecimalO DecisionTree DeepArrowDeepDarkFantasy DefendTheKing Delta-LambdaDescriptiveKeysDflowDiffDifferenceLogicDifferentialEvolutionDigit DigitGroup DigitalOceanDimensionalHash DirectSoundDisTractDiscussionSupportSystemDishDistDistanceTransform DistanceUnitsDnaProteinAlignmentDocTestDocsDrHyloDrIFTDrIFT-cabalizedDungDust Dust-crypto Dust-toolsDust-tools-pcapDynamicTimeWarpDysFRP DysFRP-CairoDysFRP-CraftwerkEEConfigENIG EarleyEbnf2ps EdisonAPI, EdisonCore0EditTimeReportEitherTElmEmpingEmptyEncode EntrezHTTPEnumContainersEnumMapEqEqualitySolverEsounD EstProgressEtaMOOEtage Etage-GraphEternal10Seconds EtherbunnyEuroITEuterpea EventSocketExtraFAIFCompFM-SBLEX FModExRawFPrettyFSMFTGLFTGL-bytestringFTPLineFactsFailureTFastPush FastxPipe FenwickTreeFermatsLastMargin FerryCoreFeval FieldTrip FileManipFileManipCompat FilePather FileSystemFilesFinFinance-Quote-Yahoo Finance-TreasuryFindBinFiniteCategories FiniteMapFirstOrderTheoryFixedPoint-simpleFlippi FloatingHexFocusFolly FontyFruity&ForSyDeForestStructuresForestry ForkableTFormalGrammarsFosterFpMLv53 FractalArt FractalerFrames Frames-beam Frames-dsv Frames-map-reduceFrames-streamlyFrank FreeTypeGLFunGEnFungiGAGGgGHoodGLFWGLFW-OGLGLFW-b+ GLFW-b-demo GLFW-taskGLHUIGLMGLMatrixGLURawnGLUTpGLUtilGPXGPipe GPipe-Collada GPipe-CoreGPipe-Examples GPipe-GLFW GPipe-GLFW4GPipe-TextureLoadGTALibGamgineGanymedeGaussQuadIntegrationGeBoPGenIGenbank Gene-CluEDOGeneralTicTacToe GenericPretty GenussFoldGeoIpGeocoderOpenCageGeodeticGeomPredicatesGeomPredicates-SSEGetGiSTGifcurry GiveYouAHeadGleamGlob GlomeTrace GlomeVec GlomeView GoogleChart GoogleCodeJamGoogleDirectionsGoogleSB GoogleSuggestGoogleTranslateGotoT-transformersGrafosGrammarProductsGraph500 GraphHammerGraphHammer-examplesGraphSCC GraphalyzeGrempa GroteTrap Grow GrowlNotifyGtk2hsGenericsGtkGLTVGtkTV GuiHaskellGuiTVHHABQTHARM HAppS-Data HAppS-IxSet HAppS-Server HAppS-State HAppS-Util HAppSHelpers HCLHCardHCodecs7HDBC) HDBC-mysql HDBC-odbcHDBC-postgresql8HDBC-postgresql-hstore HDBC-session HDBC-sqlite3HDRUtilsHERAHExcelHFitUIHFrequencyQueueHFuseHGE2DHGL HGamer3D HGamer3D-APIHGamer3D-AudioHGamer3D-Bullet-BindingHGamer3D-CAudio-BindingHGamer3D-CEGUI-BindingHGamer3D-Common HGamer3D-DataHGamer3D-Enet-Binding HGamer3D-GUIHGamer3D-Graphics3DHGamer3D-InputSystemHGamer3D-NetworkHGamer3D-OIS-BindingHGamer3D-Ogre-Binding HGamer3D-SDL2-BindingHGamer3D-SFML-BindingHGamer3D-WinEvent HGamer3D-Wire HGraphStorageHHDLHJScriptHJVM HJavaScriptHLearn-algebraHLearn-approximationHLearn-classificationHLearn-datastructuresHLearn-distributionsHListHListPPHLoggerHMMHMap HMarkovHMockHNMHNumericHODEHOpenCVHPDFHPathHPhoneHPiHPlotHPongHQuHROOT HROOT-core HROOT-graf HROOT-hist#HROOT-io HROOT-math! HROOT-net HROOT-treeHRayHSFFIGHSGEPHSH$ HSHHelpers HSet HSlippyMap HSmartyHSoM HSoundFileHStringTemplate0HStringTemplateHelpersHSvmHTFHTTP HTTP-SimpleHTab HTicTacToeHUnit HUnit-Diff HUnit-Plus HUnit-approxHXMPPHXQHaLeX HaMinitelHaPyHaReHaTeX HaTeX-metaHaTeX-qqHaVSAHaXmlPHachHackMail HaggressiveHandlerSocketClient HandsomeSoupHangman HangmanAscii HappyTree HarmTraceHarmTrace-Base HasBigDecimal HasCacBDDHasGPHaschooHashellHaskRelHaskellAnalysisProgramHaskellForMaths HaskellLM HaskellNN HaskellNet6HaskellNet-SSLHaskellTorrentHaskellTutorials HaskelloidsHastodonHateHawkHayooHclipHedi HerbiePluginHermes Hieroglyph HiggsSetHipmunk Hipmunk-UtilsHipmunkPlayground Hish Histogram3HmpfHoed HoleyMonoidHolumbus-DistributionHolumbus-MapReduceHolumbus-Searchengine Holumbus-StorageHomologyHongoDB HostAndPortHricketHs2libHsASAHsHTSLib HsHaruPDFHsHyperEstraierHsJudy HsOpenSSLHsOpenSSL-x509-system&HsParrotHsPerl5HsSVNHsSyckHsToolsHsWebotsHsYAML HsYAML-aesonyHsedHsmtlibHueAPI HulkImportHungarian-Munkres HydrogenI1MIDynamicIFSINblobsIORIORefCASIOSpecIPv6AddrIPv6DB IcoGridIfElse*Imlib ImperativeHaskell IndentParser IndexedListInfixApplicative IntFormatsIntGraph InternedData Interpolation Interpolation-maxs IntervalMap,Irc IrrHaskellIsNullJSON-CombinatorJSON-Combinator-Examples JSONParserJSONb JYU-Utils JackMiniMixJavasfJavavJazzkellJdhJikka JsContracts JsonGrammarJuPyTer-notebook JuicyPixelsJuicyPixels-blpJuicyPixels-blurhashJuicyPixels-canvasJuicyPixels-extra/JuicyPixels-repaJuicyPixels-scale-dctJuicyPixels-stbirJuicyPixels-util JunkDBJunkDB-driver-gdbmJunkDB-driver-hashtables JustParseKMPKSPKalman Kawaii-ParserKdTreeKetchupKiCS KiCS-debugger KiCS-prophecy KleislifyKonfKriensKulitta KyotoCabinetL-seedLATSLC3LDAP LDAPv3LPPaverLParseLRULTSLTreeLambdaCalculatorLambdaDBLambdaDesigner LambdaHackF LambdaINet LambdaNetLambdaPrettyQuote LambdaShell LambdajudgeLambdayaLargeCardinalHierarchyLastikLattices Lazy-Pbkdf2 LazyVaultLearningLetsBeRational Level0LibClangLibZipLimit LinearSplitLinguisticsTypes LinkChecker LiquoriceList)ListLikeListT ListTree ListWriter ListZipperLiterateMarkdownLogicLogicGrowsOnTreesLogicGrowsOnTrees-MPILogicGrowsOnTrees-networkLogicGrowsOnTrees-processesLslPlusLucuLykahMASMGenMBot MC-Fold-DPMFlowMHaskMIP MIP-glpkMSQueue MTGBuilderMagicHaskellerMailchimpSimpleMapMapWithMappingMaybeTMaybeT-monads-tf MaybeT-transformers MazesOfMonad MeanShiftMeasureMechaMechsMemoTriejMetaHDBC MetaObjectMetricsMhailist Michelangelo MicrosoftTranslatorMiniAgda MissingHrMissingK MissingM MissingPyModuloMoeMoeDictMonadCatchIO-mtlMonadCatchIO-mtl-foreignMonadCatchIO-transformers!MonadCatchIO-transformers-foreign MonadComposeMonadLab MonadPrompt% MonadRandomMonadRandomLazy MonadStackMonadiusMonadoroMonaris Monatron Monatron-IOMonocle MorseCodeMuCheck MuCheck-HUnit MuCheck-HspecMuCheck-QuickCheckMuCheck-SmallCheckMunkresMunkres-simple MusicBrainz MusicBrainz-libdiscid MutationOrderMyPrimesNGLessNGramsNMapNTRUNXTNXTDSLNaCl NameGeneratorNanoID NanoPrologNaperianNaperianNetCDFNaturalLanguageAlphabets NaturalSortNearContextAlgebraNeks NestedFunctorNestedSamplingNetSNMP Network-NineP NewBinaryNineP NinjasNoHoed NoSlowNoTraceNoiseNomyx Nomyx-CoreNomyx-Language Nomyx-Rules Nomyx-WebNonEmpty NonEmptyList NumInstancesMNumLazyByteString NumberSieves NumberTheoryNumbers Nussinov78NutriOGDFOGLONC-RPCOSMOTPObjectObjectIO ObjectNameVObsidianOctreeOddWord6OmegaOnRmtOneTupleOnlyFOpenAFP OpenAFP-UtilsOpenALOpenCL OpenCLRawOpenCLWrappersOpenGL OpenGLCheck OpenGLRawg OpenGLRaw21OpenSCADOpenVG OpenVGRawOperadsOptDir OrPatterns OrchestrateDB OrderedBits OrdinalsOrdinary Oslo-VectizePArrowsPBKDF2PCLTPCLT-DBPDBtoolsPPrinterPSQueue%PTQ PUH-ProjectPageIOPaillier PandocAgdaParallel-Arrows-BaseSpecParallel-Arrows-DefinitionParallel-Arrows-EdenParallel-Arrows-MulticoreParallel-Arrows-ParMonadParry ParsecTools ParserFunctionPartialTypeSignaturesPasswordGenerator PastePipePathTree PathfinderPeanoPeanoWitnesses PerfectHashPermuteEffects PersistencePhsuPipePisoPlayHangmanGame PlayingCards Plot-ho-matic PlslToolsPlural Pollutocracy PortFusionPortMidi'PortMidi-simple PostgreSQLPrelude PrimitiveArrayPrimitiveArray-Pretty Printf-THPriorityChansConvergerProbabilityMonadsProbnet PropLogicPropaFPProperProxNPugs Pup-EventsPup-Events-ClientPup-Events-DemoPup-Events-PQueuePup-Events-ServerPyF,QLearnQuadEdgeQuadTree QuasiTextQuelea QuickAnnotate QuickCheckQuickCheck-GenT QuickCheck-safeQuickCheckVariant QuickPlotQuicksonR-pandocRANSACRBTreeRESTngRFC1751RJsonRLPRMPRNAFold RNAFoldProgs RNAdesignRNAdrawRNAlienRNAwolfRSAbRSolveRabbitMQRaincat Random123 RandomDotOrg RandometerRange Ranged-sets!Ranka Rasenschach Rasterific%RattusReadArgsRedmineRef RefSerializeRefereesRepLibReplicateEffects ReviewBoardRichConditionalRitt-WuRlang-QQRollingDirectory RoyalMonadRtMidi RxHaskellS3SBench SCRIPTWriter SCalendarSConfigSDL;SDL-gfx SDL-image SDL-mixerSDL-mpegSDL-ttfSDL2-ttfSFML SFML-controlSFontSGSGdemoSGplusSHA.SHA2SJW SMTPClientSNetSQLDepsSSTGSTL STLinkUSB STM32-ZombieSTM32F103xx-SVD STMonadTransSVD2HSSVG2QSVGFontsWSVGPath SWMMoutGetMB SableCC2HsSafe SafeSemaphore@SalsaSaturnin SciBaseTypesSciFlow SciFlow-drmaa ScratchFsScurrySecureHash-SHA3 SegmentTreeSelectSequencesFromMSA Semantique SemigroupSeqAlign SessionLoggerSet ShellCheckShellacShellac-compatlineShellac-editlineShellac-haskelineShellac-readlineShortestPathProblemsShowF ShpadoinkleShpadoinkle-backend-pardiffShpadoinkle-backend-snabbdomShpadoinkle-backend-staticShpadoinkle-consoleShpadoinkle-debugShpadoinkle-developer-toolsShpadoinkle-disembodiedShpadoinkle-examplesShpadoinkle-htmlShpadoinkle-isrealShpadoinkle-lensShpadoinkle-routerShpadoinkle-streamingShpadoinkle-templateShpadoinkle-widgetsShrub Shu-thing SimpleAESSimpleEASimpleGLSimpleH SimpleLog SimpleServerSimpleTableGeneratorSit SizeCompareSlidesSmithNormalFormSmoothSmtLib SnusmumrikSoOSiM SoccerFun SoccerFunGLSonnex SourceGraphSouthpaw SpaceInvaders SpacePrivateers SpinCounterSpintax Spock8 Spock-api Spock-api-ghcjs Spock-api-server Spock-auth Spock-core3Spock-digestive Spock-lucid Spock-worker SpreadsheetML SprigStackStasisStateVarStateVar-transformerStatisticalMethodsStockholmAlignment StompStrafunski-ATermLibStrafunski-Sdf2HaskellStrafunski-StrategyLibStrappedTemplates StrategyLibStreamE StrictBench StrictCheck StringUtilsSuffixStructuresSvgIcons SybWidget SyntaxMacrosSysmonTBCTBitTCacheTHEffTLTTORCSTTTASTVTYB TableAlgebraTablesTablifyTahinTaintedTakusenTape TaskMonadTastyTLTTaxonomy TaxonomyTools TeX-my-mathTeaHSTensor TernaryTrees TestExplodeTheoraThingie ThreadObjectsThrift Tic-Tac-Toe TicTacToe TigerHash TimePieceTinyLaunchburyTinyURLTitim TopTotalMap Tournament TraceUtils TransformeRTransformersStepByStep Transhare TreeCounterTreeStructures TreeTTreiber TrendGraphTrieMapTwofish TypeClass TypeCompose<TypeIlluminatorTypeNat TypingTesterUISF UMMURLTURLb UTFTConverterUnique| UnixutilsUnixutils-shadowUpdaterUrlDispUseful UtilityTMVKHSVRML ValidationValveValueKeyvalueVec Vec-Boolean Vec-OpenGLRaw Vec-TransformVecNVerbaViennaRNA-bindingsViennaRNA-extrasViennaRNAParser Villefort VulkanVulkanMemoryAllocatorWAVE WEditor WEditorBrick WEditorHyphenWL500gPControl WL500gPLibWMSignerWURFL WXDiffCtrlWashNGo WaveFrontWeakSetsWeatherWebBits WebBits-HtmlWebBits-multiplateWebCont WeberLogicWebrexpWhebWikimediaParserWin32 Win32-consoleWin32-dhcp-server Win32-errors Win32-extras Win32-junction-point Win32-notifyWin32-securityWin32-servicesWin32-services-wrapperWin32-shortcutWired WordAlignmentWordNet WordNet-ghc74WordlintWorkflow WxGenericXX11 X11-extrasX11-rm X11-xdamage X11-xfixesX11-xft` X11-xshapeXAttrXInputXML XMLParserXMMSXMPPXSaigaXauthXec XmlHtmlWriterXorshift128PlusYACPongYFrobYablog YamlReferenceYampaO Yampa-core YampaSynthYoctoYogurtYogurt-StandaloneZ-BotanZ-Data#Z-IO Z-MessagePackZ-YAMLZEBEDDEZFSZMachineZipFoldZipperAGZoraZwaluwa50aasamabacate abc-puzzle abcBridge abcnotationabesonabidesabnfabstract-deque=abstract-deque-tests abstract-parIabstract-par-accelerateabt ac-machineac-machine-conduitacc accelerate'accelerate-arithmeticaccelerate-bignumaccelerate-blasaccelerate-cublasaccelerate-cudaaccelerate-cufftaccelerate-examples accelerate-fft accelerate-fftwaccelerate-fourieraccelerate-fourier-benchmark accelerate-ioaccelerate-io-JuicyPixelsaccelerate-io-arrayaccelerate-io-bmp accelerate-io-bytestringaccelerate-io-cerealaccelerate-io-repaaccelerate-io-serialiseaccelerate-io-vectoraccelerate-kullback-liebleraccelerate-llvmaccelerate-llvm-nativeaccelerate-llvm-ptxaccelerate-randomaccelerate-typelitsaccelerate-utility accentuateus access-timeaccess-token-provideraccuerraceachille acid-state%acid-state-distacid-state-tlsacl2acme-all-monadacme-box acme-cadreacme-circular-containersacme-cofunctor acme-colosson acme-comonad acme-cuteboy acme-cutegirl acme-default acme-dontacme-everythingacme-flipping-tables acme-functors acme-grawlix acme-hq9plus acme-http acme-inatoracme-ioacme-iotacme-kitchen-sink acme-left-pad acme-lolcatacme-lookofdisapprovalacme-memorandomacme-microwaveacme-miscorder acme-missiles:acme-mutable-packageacme-nowacme-numbersystem acme-omittedacme-oneacme-operatorsacme-phpacme-pointful-numbersacme-realworld acme-safeacme-schoenfinkel acme-smuggler acme-strfryacme-stringly-typed acme-strtok acme-thisacme-timemachine acme-year acme-zalgo acme-zeroacousticbrainz-clientacquire action-permutationsactiveactivehs activehs-base activitypubactivitystreams-aesonactoractsad! ad-delcontadaptive-containersadaptive-tupleadbadblock2privoxyaddLicenseInfoaddyadhoc-fixturesadhoc-fixtures-hspec adhoc-networkadict adjunction adjunctionsadler32 adobe-swatch-exchange adp-multiadp-multi-monadiccpadtreesadvent-of-code-api<advent-of-code-ocr aern2-fun aern2-mfunaern2-mp aern2-real aesonaeson-applicativeaeson-attoparsecaeson-better-errors* aeson-bson aeson-casing@ aeson-coerceaeson-combinators aeson-commit aeson-compat% aeson-decode aeson-defaultaeson-dependent-sumaeson-deriving aeson-diff5aeson-diff-generic aeson-extra- aeson-filthy aeson-flat aeson-flattenaeson-flowtyped aeson-gadt-th aeson-generic-compat aeson-helperaeson-injector aeson-iprouteaeson-json-ast aeson-lensaeson-match-qq aeson-modern-tojson aeson-native aeson-optics aeson-optionsaeson-parsec-picky aeson-picker aeson-prefix aeson-prettyaeson-qqC aeson-quick aeson-result aeson-schema aeson-schemasaeson-serializeaeson-single-field aeson-smart aeson-streamsaeson-t aeson-tiled aeson-toolkitaeson-typescript! aeson-utilsaeson-value-parser aeson-via aeson-with aeson-yak aeson-yaml2 affectionaffineaffine-invariant-ensemble-mcmcaffinely-extendedafisafv ag-pictgenagda-language-server agda-server agda-snippetsagda-snippets-hakyll agda-unused agda2lagdaagentxagumaigaipair air-extraair-specair-thairbrakeairship airtable-apiaivikaaivika-branchesaivika-distributed aivika-experimentaivika-experiment-cairoaivika-experiment-chartaivika-experiment-diagrams aivika-gpssaivika-latticeaivika-realtimeaivika-transformersajhcal alarmclockaleaalertaalertsalex alex-meta alex-prelude alex-toolsalfredalfred-margaretalg algaalgebraalgebra-checkers algebra-dagalgebra-driven-design algebra-sql algebraicalgebraic-classesalgebraic-graphsalgebraic-graphs-ioalgebraic-preludealgo-salgolia"algorithmic-composition-additionalalgorithmic-composition-basicalgorithmic-composition-complex'algorithmic-composition-frequency-shift!algorithmic-composition-overtonesalign align-affine align-audio align-textaligned-foreignptr alignmentalistallocated-processoralloyalloy-proxy-fd ally-invest almost-fix almsalpaca-netcodealpha alphachar alpino-toolsalsa alsa-coreBalsa-gui alsa-midi alsa-mixer<alsa-pcmalsa-pcm-testsalsa-seqalsa-seq-testsaltcompositionalternative-extraalternative-ioalternative-vector alternatorsaltfloataltoaltsvcalurealwaysamazon-emaileramazon-emailer-client-snapamazon-productsamazonka1amazonka-alexa-businessamazonka-apigateway amazonka-application-autoscalingamazonka-appstreamamazonka-appsyncamazonka-athenaamazonka-autoscalingamazonka-autoscaling-plansamazonka-batchamazonka-budgetsamazonka-certificatemanageramazonka-certificatemanager-pcaamazonka-cloud9amazonka-clouddirectoryamazonka-cloudformation amazonka-cloudfrontamazonka-cloudhsm amazonka-cloudhsmv2amazonka-cloudsearchamazonka-cloudsearch-domains!amazonka-cloudtrail amazonka-cloudwatch amazonka-cloudwatch-eventsamazonka-cloudwatch-logsamazonka-codebuildamazonka-codecommitamazonka-codedeployamazonka-codepipeline amazonka-codestaramazonka-cognito-identityamazonka-cognito-idpamazonka-cognito-syncamazonka-comprehendamazonka-configamazonka-connectamazonka-contrib-rds-utils amazonka-core4amazonka-cost-explorer amazonka-curamazonka-datapipelineamazonka-devicefarmamazonka-directconnectamazonka-discovery amazonka-dms amazonka-dsamazonka-dynamodbamazonka-dynamodb-daxamazonka-dynamodb-streams amazonka-ec2 amazonka-ecr amazonka-ecs amazonka-efsamazonka-elasticache amazonka-elasticbeanstalkamazonka-elasticsearch amazonka-elastictranscoder amazonka-elb amazonka-elbv2 amazonka-emr amazonka-fmsamazonka-gameliftamazonka-glacier amazonka-glueamazonka-greengrassamazonka-guarddutyamazonka-health amazonka-iamamazonka-iam-policy amazonka-importexportamazonka-inspector amazonka-iotamazonka-iot-analyticsamazonka-iot-dataplaneamazonka-iot-jobs-dataplaneamazonka-kinesis amazonka-kinesis-analyticsamazonka-kinesis-firehoseamazonka-kinesis-video%amazonka-kinesis-video-archived-mediaamazonka-kinesis-video-media amazonka-kmsamazonka-lambdaamazonka-lex-modelsamazonka-lex-runtimeamazonka-lightsailamazonka-marketplace-analytics amazonka-marketplace-entitlementamazonka-marketplace-metering amazonka-mechanicalturkamazonka-mediaconvertamazonka-medialiveamazonka-mediapackageamazonka-mediastoreamazonka-mediastore-dataplaneamazonka-migrationhub amazonka-mlamazonka-mobile amazonka-mqamazonka-opsworks amazonka-opsworks-cm amazonka-organizationsamazonka-pinpointamazonka-pollyamazonka-pricing amazonka-rdsamazonka-redshift amazonka-rekognitionamazonka-resourcegroupsamazonka-resourcegroupstaggingamazonka-route53amazonka-route53-autonamingamazonka-route53-domains amazonka-s35amazonka-s3-streaming amazonka-sagemakeramazonka-sagemaker-runtime amazonka-sdb amazonka-secretsmanageramazonka-serverlessrepoamazonka-servicecatalog amazonka-sesamazonka-shield amazonka-smsamazonka-snowball amazonka-sns amazonka-sqs amazonka-ssmamazonka-stepfunctionsamazonka-storagegateway amazonka-stsamazonka-support amazonka-swf amazonka-testamazonka-transcribeamazonka-translate amazonka-wafamazonka-waf-regionalamazonka-workdocsamazonka-workmailamazonka-workspaces amazonka-xrayamby ampersandamqp amqp-conduit amqp-streamly amqp-utils amqp-workeramrunanagrepanalyzeanalyze-clientanansianansi-hscolour anansi-pandocanatomyandroidandroid-activityandroid-lint-summaryangelangle animalcase animasciianimate animate-exampleanimate-framesanimate-preview animate-sdl2 anki-toolsannannah annihilatorannotated-exception annotated-fixannotated-wl-pprintLanonymous-sumsanonymous-sums-testsansi-escape-codes ansi-pretty ansi-terminalaansi-terminal-game'ansi-wl-pprint ansigraph antagonistantfarmanticivantigate antimirovantiope-athenaantiope-contract antiope-coreantiope-dynamodb antiope-esantiope-messages antiope-optparse-applicative antiope-s3 antiope-shell antiope-sns antiope-sqs antiope-swf antiprimes antiquoter antisplice antlr-haskellantlrcanydbm aop-prelude aos-signatureaosd ap-normalize\ ap-reflect apache-md5apartapecs apecs-gloss apecs-physics apecs-physics-gloss apecs-stmapelsin api-builderapi-field-json-th api-maker api-monobankapi-opentheory-unicodeapi-rpc-accumulateapi-rpc-factomapi-rpc-pegnet api-toolsapi-yotiapiary apiary-authenticateapiary-clientsession apiary-cookieapiary-eventsource apiary-helicsapiary-http-client apiary-loggerapiary-memcachedapiary-mongoDBapiary-persistentapiary-purescript apiary-redisapiary-sessionapiary-websocketsapioiaf-clientapis apns-http2app-lens app-settingsapparbappc appendfulappendful-persistent appendmap applicableapplicative-extrasapplicative-failapplicative-numbersapplicative-parsecapplicative-quotersapplicative-splice apply-refactapply-unorderedapply-unordered-mono apportionment approveapiapproxapprox-rand-test approximateapproximate-equalityar-timestamp-wiperarb-fftarbb-vm arbor-datadogarbor-lru-cachearbor-monad-counterarbor-monad-loggerarbor-monad-metricarbor-monad-metric-datadogarbor-postgresarbtt3arcgridarcgrid-viewerarch-hsarch-webarchivearchive-libarchive archive-sig archive-tararchive-tar-bytestringarchiver archlinux archlinux-webarchnewsarduino-copilotarenaarff arghwxhaskellargoargon argon2 argparserargueditariadnearion arion-compose arith-encode arithmatic arithmeticarithmetic-circuitsarithmoiJarity-generic-liftAarmadaarmorarpaarpackarrayE array-builder array-chunks array-forth array-list array-memoize array-primops array-utils arrayfire arraylist arrow-extras arrow-improve arrow-list arrow-utilsarrowapply-utilsarrowp arrowp-qqarrows;arteryartifactarxarxivasanaasapasceticascii\ascii-art-to-unicode ascii-case;ascii-caseless ascii-char0 ascii-cows ascii-group,ascii-holidays ascii-numbers)ascii-predicates*ascii-progress ascii-stringascii-supersetT ascii-tableascii-thJascii-vector-avcascii85-conduit asciichart asciidiagramasicasifasilasn asn1-codec asn1-data asn1-encodingb asn1-parse} asn1-typesfasn1dump aspell-pipe assemblerassertassert-failure% assert4hsassert4hs-coreassert4hs-hspecassert4hs-tasty assertions asset-bundle asset-mapassimpassocT assoc-listassoc-listlikeassumpta assumpta-core ast-monadast-monad-jsonast-pathastar astar-monadastrdsastroastview astview-utilsasyncasync-combinators async-dejafu async-extra async-extras-async-io-either async-manager async-pool async-refresh async-refresh-tokens async-timertasynchronous-exceptionsaterm aterm-utilsatlatlasatlassian-connect-coreatlassian-connect-descriptoratmosatmos-dimensionalatmos-dimensional-tfatndapiatom atom-basic atom-conduit atom-msp430atomic-counteratomic-file-ops atomic-modifyatomic-primops\atomic-primops-foreignatomic-primops-vector atomic-write=atomoatp atp-haskellatransatrophy ats-format ats-pkg ats-setup ats-storable attempt attenuationattenuation-profunctorsattic-schedule atto-lisp attomail attoparsecTattoparsec-arffattoparsec-base64 attoparsec-binary(attoparsec-conduitattoparsec-csvattoparsec-data attoparsec-enumeratorattoparsec-expr attoparsec-ipattoparsec-iso8601attoparsec-iterateeattoparsec-parsecattoparsec-pathattoparsec-textattoparsec-text-enumeratorattoparsec-timeattoparsec-transattoparsec-uriattoparsec-varword attosplitatuinaudacity audiovisualaugeasaugurauraur-apiaura authenticate.authenticate-kerberosauthenticate-ldapauthenticate-oauthk authinfo-hs authoringauto auto-update autoapply autodocodec$autodocodec-openapi3autodocodec-schemaautodocodec-servant-multipartautodocodec-swagger2autodocodec-yaml" autoexporterautomautomataautomitive-cseautomotive-cse autonix-depsautonix-deps-kf5autopackautoprocavahiavatar-generatoraverageavers avers-apiavers-api-docs avers-server aviation-cessna172-diagrams!aviation-cessna172-weight-balanceaviation-navigationaviation-unitsaviation-weight-balance avl-static avr-shakeavro avro-piperavwx awesome-prelude awesomiumawesomium-glut awesomium-rawawsZaws-arnaws-cloudfront-signed-cookiesaws-cloudfront-signeraws-configuration-toolsaws-dynamodb-conduitaws-dynamodb-streamsaws-easyaws-ec2aws-ec2-knownhostsaws-elastic-transcoder aws-general aws-kinesisaws-kinesis-clientaws-kinesis-reshard aws-lambdaaws-lambda-haskell-runtimeaws-lambda-haskell-runtime-waiaws-lambda-runtime aws-larpiaws-mfa-credentialsaws-performance-tests aws-route53aws-sdkaws-sdk-text-converteraws-sdk-xml-unordered aws-ses-easy aws-sign4aws-snsaws-sns-verifyaws-transcribe-wsaws-xray-clientaws-xray-client-persistent aws-xray-client-wai axelaxiomaxiomatic-classes azimuth-hsazubi azure-acs azure-emailazure-functions-workerazure-service-apiazure-servicebusazurify b-treeb9bablbabylonbackblaze-b2-hs backdropperbackpropbackstop backtracking backtracking-exceptionsbackward-statebacteriabagbake ballastbamboobamboo-launcherbamboo-plugin-highlightbamboo-plugin-photobamboo-theme-blueprintbamboo-theme-mini-html5bamsebamstats ban-instancebank-holiday-usabank-holidays-englandbanwordsbarbiesbarbies-layered barbies-thbarblybarchartbarcodes-code128barleybarriebarrier barrier-monadbase% base-compat*base-compat-batteriesbase-compat-migrate base-encodingbase-feature-macros base-genericsbase-io-accessbase-noprelude$ base-orphans base-prelude7base-unicode-symbolsWbase16base16-bytestring base16-lensbase32base32-bytestring base32-lensbase32-z-bytestring base32string base58-bytestring^ base58address base58string base62base64 base64-bytesbase64-bytestringbase64-bytestring-typeVbase64-conduit base64-lens base64-stringbase91basedbasementf basement-cdbasenbasen-bytestringbaserock-schema basex-clientbashbasic basic-cpuid basic-lens basic-prelude6 basic-sopbaskellbatch batch-renamebatchd batchd-core batchd-dockerbatchd-libvirtbatching battlenetbattlenet-yesod battleplacebattleplace-apibattleship-combinatorics battleships bayes-stackbazel-coverage-report-rendererbazel-runfilesbbdb bbibcp47 bcp47-orphans bcryptbdcsbdcs-apibddbdeltabdobeambeam-automigrate beam-coreh beam-migrate_ beam-mysqlbeam-newtype-field beam-postgres9 beam-sqliteabeam-thbeamable bearriver beautifHOLbech32r bech32-th/bed-and-breakfast beeminder-apibeinbelkabench bench-graph bench-show benchmark-function benchpress bencode3bencodex bencodingbencoding-lens benri-hspecbento berkeleydbberpbertbesoutbetbetacodebetrisbetweenbf-catabffbff-monobglibbgmax bgzfbhooglebibdbbibtexbidi-icu bidirectionalbidirectional-instancesbidirectionalization-combinedbidispecbidispec-extras bifunctor bifunctorsbighugethesaurusbillboard-parserbilleksah-formsbilleksah-mainbilleksah-main-staticbilleksah-panebilleksah-servicesbimap bimap-server bimapsbinzbinance-exports binaryG binary-bits binary-communicatorbinary-conduit' binary-derive binary-enum binary-ext binary-filebinary-genericbinary-generic-combinators binary-ieee754binary-indexed-treebinary-instancese binary-io binary-list binary-literal-qqbinary-orphans binary-parserIbinary-parsersbinary-protocolbinary-protocol-zmq binary-search#binary-serialise-cbor binary-shared binary-state binary-storebinary-streams binary-strict binary-tagged binary-tree binary-typed binary-varint binarydeferbinaryen bind-marshal binding-core binding-gtk binding-wxbindings bindings-DSL=bindings-EsounD bindings-GLFW%bindings-K8055 bindings-aprbindings-apr-utilbindings-audiofile bindings-bfdbindings-cctoolsbindings-codec2bindings-common bindings-dc1394bindings-directfbbindings-eskit bindings-fannbindings-fluidsynthbindings-friso bindings-glibbindings-gobjectbindings-gpgme bindings-gsl bindings-gtsbindings-hamlib bindings-hdf5bindings-levmarbindings-libcddbbindings-libffibindings-libftdibindings-libg15bindings-libpcibindings-librrdbindings-libstemmerbindings-libusbbindings-libv4l2bindings-libzipbindings-linux-videodev2 bindings-lxc bindings-mmapbindings-monetdb-mapibindings-mpdecimalbindings-nettlebindings-parportbindings-portaudiobindings-posixbindings-potracebindings-ppdev bindings-saga-cmd bindings-sane bindings-sc3 bindings-sipcbindings-sophiabindings-sqlite3 bindings-svm bindings-uname bindings-wlcbindings-yices bindynamicbinembedbinembed-examplebinibinrepbinsbinsmbio bio-sequencebioace bioalign biocore biofastabiofastq biohazardbioinformatics-toolkitbiophdbiopslbiosff biostockholmbip32 birch-beerbirdbirds-of-paradisebiscbiscuit-haskell biscuit-servant bisect-binarybishbosh bit-array bit-protocol bit-stream bit-vectorbitarraybitcoin-address bitcoin-apibitcoin-api-extra bitcoin-blockbitcoin-compact-filters bitcoin-hash bitcoin-hs bitcoin-keysbitcoin-payment-channel bitcoin-rpcbitcoin-scriptbitcoin-scripting bitcoin-tx bitcoin-typesbitcoind-regtest bitcoind-rpc bitly-clibitmap bitmap-opengl bitmapsbits bits-atomicbits-bytestringbits-bytestring-lazy bits-conduit bits-extra bits-extrasbitset bitset-word8bitspeak bitstream bitstring bittorrentbittrexbitvecJbitwise$ bitwise-enum bitx-bitcoin bizzlelude bizzlelude-jsbk-treebkrbktrees bla black-jewelblacktipblagdablake2blake3blakesum blakesum-demo blank-canvas!blanksblas blas-carray blas-comfort-array blas-ffi blas-hs blastxml blatexblazeblaze-bootstrap blaze-builderblaze-builder-conduit blaze-builder-enumerator blaze-colonnade3blaze-from-html blaze-htmlblaze-html-contribblaze-html-hexpatblaze-html-truncate blaze-htmx blaze-json blaze-markup blaze-shields blaze-svgB blaze-textuals blazeMarkerblazeTble blindpassblink1blipbliplib blizzard-html blockchainblockfrost-api]blockfrost-clientMblockfrost-client-corePblockfrost-pretty blockhashblocking-transactions blogination bloodhound&bloodhound-amazonka-auth bloomfilter>bloomfilter-redis blosumbloxorzblubberblubber-server blucontrolbludigon bluemix-sdkbluetile bluetileutilsblunk-hask-testsbluntbmbmpdbnb-staking-csvsbno055-haskell board-games boardgamebodhi bogocopy bogre-banana boilerplateboltboltzmann-brainboltzmann-samplersbond bond-haskellbond-haskell-compiler bookhoundbookhound-format bookkeeperbookkeeper-permissions bookkeepingbookkeeping-jp bool-extrasbool8 boolean-like boolean-listboolean-normal-forms boolectorboolexprboolsboolsimplifierboomangeboombox boomerang' boomslangboop boopadoopboots boots-app boots-cloud boots-webbootstrap-types bordacount borelboring; boring-gameboring-window-switcherborshbotbothbotppbottombound2 bound-extras bound-gen bound-simple bounded-array bounded-queue bounded-tchan boundingboxes bower-json'bowntzboxbox-csv box-socket box-tuples boxesbbpannbraid brain-bleep brainfuckbrainfuck-monad brainfuck-tut brainheckbrassicabreakbreakout breakpoint)breve brians-brainbrickbrick-dropdownmenubrick-filetree brick-panesbrick-skylightingbricksbricks-internalbricks-internal-test bricks-parsecbricks-rendering bricks-syntaxbrilligbrittanyhbroadcast-chan broadcast-chan-conduitbroadcast-chan-pipesbroadcast-chan-testsbroccolibrokbroker-haskellbronyradiogermany-commonbronyradiogermany-streamingbrotlibrotli-conduitbrotli-streams browscapbsb-http-chunked\ bsd-sysctlbson/ bson-generic bson-generics bson-lens bson-mapping bspackbsparsebtc-lspbtreebtree-concurrentbtrfs buchhaltungbufferbuffer-builderbuffer-builder-aeson buffer-pipe buffetbuffonbuffon-machinesbugbugsnag bugsnag-haskell bugsnag-hs bugsnag-wai bugsnag-yesod bugzillabugzilla-redhatbuild buildablebuildboxbuildbox-toolsbuilder buildwrapperbullet bulletproofsbulmexbumper bunzburnt-explorerburrito burst-detection bus-piratebuster buster-gtkbuster-networkbustlebutcher@butter butterfliesbuttplug-hs-corebv bv-embed bv-littlebv-sized* bv-sized-lensby-other-namesbylinebytablebyte-count-reader byte-order(byteableObytearray-parsing bytebuildhbytedumpbytehashbytelog byteorderW bytepatchbytespbyteset byteslice bytesmithn bytestring@bytestring-aeson-orphansbytestring-arbitrary bytestring-builderhbytestring-builder-varwordbytestring-classbytestring-conversionbytestring-csvbytestring-deltabytestring-encoding,bytestring-encodingsbytestring-frombytestring-handlebytestring-lexingObytestring-mmapbytestring-nums bytestring-plainbytestring-progress,bytestring-readbytestring-rematchbytestring-shortbytestring-showbytestring-strict-builderQbytestring-substringbytestring-timebytestring-to-vector/bytestring-tree-builder2bytestring-trie;bytestring-typenatsbytestringparserbytestringparser-temporarybytestringreadp byteunitsbz2)bzip-signaturebzlib. bzlib-conduitPc-dslc-enum c-io c-mosquitto c-storablec-storable-derivingc-struct c0checkc0parserc10kc14n c2atsc2hso c2hs-extra c2hscca ca-patternsca-province-codescabcabal%cabal-appimage cabal-auditcabal-auto-expose cabal-boundscabal-build-programscabal-bundle-clib cabal-cache0 cabal-cargs cabal-clean cabal-constraintscabal-db cabal-debiancabal-dependency-licensescabal-detailed-quickcheck cabal-dev cabal-dir cabal-doctest cabal-edit cabal-file cabal-file-th cabal-flatpak cabal-fmtGcabal-ghc-dynflags cabal-ghcicabal-graphdeps cabal-helper6 cabal-hoogle cabal-info cabal-installcabal-install-bundlecabal-install-ghc72cabal-install-ghc74cabal-install-parsersVcabal-install-solverP cabal-lenses cabal-macosx cabal-meta cabal-mon cabal-nirvanacabal-pkg-config-version-hook cabal-plangcabal-plan-boundscabal-progdeps cabal-query cabal-rpm% cabal-scripts cabal-setup cabal-sign cabal-sort cabal-src cabal-testcabal-test-bincabal-test-compatcabal-test-quickcheck cabal-toolkitcabal-uninstall! cabal-upload cabal2arch cabal2doap cabal2ebuild cabal2ghci cabal2json cabal2nix cabal2spec cabalQuerycabalg cabalgraph cabalish cabalmdvrpm cabalrpmdeps cabalvchkcabincabochacache/cache-polysemycached cached-iocached-json-file cached-traversablecaching caching-vaultcachix cachix-api cacophony caerbannogcafcafeteria-prelude caffegraphcairo cairo-appbase cairo-canvas cairo-corecakecake3 cakyrespa cal-layoutcal3dcal3d-examples cal3d-openglcalamitycalamity-commandscalc calculatorcaldimscaledoncalendar-recycling calenderweekcall call-alloy call-haskell-from-anything call-plantuml call-stack calligraphycamfortcamhcampfire can-i-hazcandidcanoncanonical-filepathcanonical-jsoncanteven-config canteven-httpcanteven-listen-http canteven-logcanteven-parsedatecanteven-templatecantorcantor-pairingcao capabilitycapatazcapnp capped-listcapricapscaptcha-2captchacaptcha-capmonster captcha-corecar-poolcaramia carbonara carboncopycardano-coin-selectioncardano-transactionscarettah carraycartecartel cas-hashablecas-hashable-s3 cas-storecasa-abbreviations-and-acronyms casa-client8 casa-typesAcasadi-bindingscasadi-bindings-controlcasadi-bindings-core casadi-bindings-internalcasadi-bindings-ipopt-interfacecasadi-bindings-snopt-interface cascadingcase-conversioncase-insensitiveucase-insensitive-matchcased caseofcasescashcasing< casr-logbook casr-logbook-htmlcasr-logbook-metacasr-logbook-meta-htmlcasr-logbook-reports casr-logbook-reports-htmlcasr-logbook-reports-metacasr-logbook-reports-meta-htmlcasr-logbook-types cassandra-cqlcassandra-thriftcassavacassava-conduit cassava-embed cassava-genericcassava-megaparsec6cassava-recordscassava-streamscassettecassycast castagnolicastercastlecasuicatalyst catamorphism catch-fdcategorical-algebra categoriescategorycategory-extrascategory-printfcategory-tracedcatnpluscautious cautious-file cautious-gen cayene-lpp cayenne-lpp cayley-clientcayley-dickson cblrepo cbor-toolcborg cborg-jsonccastcciccnxcctools-workqueue cdar-mBound cdepscdpcedictcefcef3-raw cef3-simpleceilometer-commoncellrenderer-cairoceltcharcerberuscerealcereal-conduit"cereal-data-dword cereal-derivecereal-enumeratorcereal-ieee754cereal-io-streams cereal-pluscereal-streams cereal-text" cereal-time cereal-unordered-containers cereal-uuid cereal-vectorC certificate cfcfenv cfipucflpcfn-flipcfopucgcgencgi'cgi-undecidable cgi-utilscgrep'cgroup-rts-threads chain-codeschainweb-mining-client chakrachalk chalkboardchalkboard-viewerchalmers-lava2000 chan chan-split change-monger changelogged chapelure char-decodechar-qqcharacter-cases charadecharset charsetdetectcharsetdetect-ae chart-clichart-histogram chart-svgchart-svg-various chart-unit charterchaselev-dequechassischatterchatty chatty-text chatty-utilschatwork cheapskateEcheapskate-highlightcheapskate-lucidcheapskate-terminalcheck-cfg-ambiguity check-email check-pvpcheckedcheckers: checkmatechecksumchell chell-hunitchell-quickcheckcherry-core-alphachessIO chesshschevalier-common chez-graterchiasma chiasma-testchimeraJchiphunk chitaurichoicechoose choose-exechorale chorale-geochpchp-mtlchp-pluschp-specchp-transformerschr-corechr-datachr-lang chr-parse chr-pretty chronograph chronologique chronos> chronos-bench chs-cabal chs-depschu2chuchu chunked-data<chunkschunkychurch church-list church-maybe church-pairchurros cicero-apicielocilcimplecinvokecio cipher-aesM cipher-aes128cipher-blowfish cipher-camellia cipher-des cipher-rc4% cipher-rc5 ciphersaber2circcirclecircle-packing"circlehscircuit-breakercircular circus cirru-parsercisco-spark-apicitation-resolveciteproc citeproc-hsciteproc-hs-pandoc-filtercityhashcj-tokencjkcl3cl3-hmatrix-interfacecl3-linear-interface claferclaferIG claferwikiclang-compilation-database clang-pureclankiclarifaiclash clash-ghc; clash-lib3clash-lib-hedgehogclash-multisignal clash-prelude4clash-prelude-hedgehogclash-prelude-quickcheck clash-shakeclash-systemverilog clash-verilog clash-vhdl clashilatorclassify classify-frogclassy-influxdb-simple classy-misoclassy-parallelclassy-prelude1classy-prelude-conduitclassy-prelude-yesod% classyplateclayHclckwrks clckwrks-cliclckwrks-dot-comclckwrks-plugin-bugsclckwrks-plugin-ircbotclckwrks-plugin-mailinglistclckwrks-plugin-mediaclckwrks-plugin-pageclckwrks-plugin-redirectclckwrks-theme-bootstrap clckwrks-theme-clckwrksclckwrks-theme-geo-bootstrapcld2 clean-home clean-unionscleff cleff-pluginclerk"cless cleveland clevercssclexercli cli-argumentscli-arguments-strict cli-builder cli-extras cli-git cli-nix cli-setup click-clackclickhouse-haskell clientsession:clifcliffordclifmclimbclingoclippardclipper clippings clisparklineclistclitclobenclock clock-extrasclocked clogparse clone-allclosedclosed-classesclosed-intervalsclosure cloud-haskell cloud-seedercloudfront-signercloudicloudyfs clr-bindingsclr-host clr-inline clr-marshal clr-typedclr-win-linkercltwclua clumpiness cluss clustering clustertools clutterhscmaes cmake-syntaxcmark' cmark-gfmkcmark-highlight cmark-lucidcmark-patternscmark-sectionscmathcmathml3cmd-itemcmdargscmdargs-browsercmdlib cmdthelinecmfcmlcmonadcmphcmptypecmtcmucmvcnc-spec-compilercndict co-feldsparco-log-co-log-concurrent co-log-core co-log-jsonco-log-polysemy co-log-polysemy-formatting co-log-syscoalpitcobotcobot-io cobot-tools code-builder code-conjure code-pagercodec codec-beamcodec-libevent codec-mbox codec-rpmcodecov-haskellcodeforces-cli codemonitor codeworld-apicodex codo-notation coerce-role coerce-utilcoercible-subtypes coercible-utilscoercion-extrascoformat cofunctorcognimeta-utilscoincoinbase-exchange coinbase-pro4coincident-root-locicointracking-importscoladacolchis cold-widowcollada-output collada-typescollapse-duplication collapse-utilcollatecollect-errors collection-json collectionscollections-apicollections-base-instancescolock colonnade5 color-countercolorful-monoidscolorize-haskell colorlesscolorless-http-clientcolorless-scottycolorscolourcolour-accelerate colour-space colouristamcoltranecolumbiacolumnar comcomark comark-html comark-parsercombinat combinat-compatcombinat-diagramscombinator-interactive combinatorialcombinatorial-problems combinatorics combobuffer comfort-arraycomfort-array-shape comfort-fftw comfort-glpk comfort-graph comiccommacommand, command-qq commander commander-cli commandert commodities commonmarkcommonmark-clicommonmark-extensionscommonmark-pandocmcommonmark-simplecommonmark-wikilinkcommseccommsec-keyexchange commutative commutative-semigroupsdcomonadcomonad-extrascomonad-randomcomonad-transformers comonads-fd compaRESTcompact compact-list compact-mapcompact-mutablecompact-mutable-vectorcompact-sequencescompact-socketcompact-stringcompact-string-fixcompact-word-vectors compactable compactmap compare-typecompdataIcompdata-automata compdata-dags compdata-fixplatecompdata-paramcompdoccompdoc-dhall-decodercompendium-client compensated competition compilationcompiler-warningscomplex-genericcomplex-integrate complexity componentm componentm-devel composable-associations composable-associations-aeson compose-ltr compose-transcomposite-aesoncomposite-aeson-cofree-listcomposite-aeson-pathcomposite-aeson-refinedcomposite-aeson-throwcomposite-aeson-writeonlycomposite-basecomposite-binarycomposite-cassavacomposite-dhall composite-ekgcomposite-hashable composite-ixcomposite-lens-extracomposite-opaleyecomposite-swaggercomposite-tuple composite-xmlcomposite-xstep composition*composition-extracomposition-prelude[composition-treecompositional-datacompound-typescomprehensions-ghc compressed compression compstrat comptranscomputational-algebracomputational-geometry computationsconala-dataset concatenativeconceitconcise-concordeconcraft concraft-hr concraft-plconcrete-haskellconcrete-haskell-autogenconcrete-relaxng-parserconcrete-typerep concur-core concurrencyconcurrency-benchmarksconcurrent-barrierconcurrent-batchconcurrent-bufferconcurrent-dns-cacheconcurrent-extra5concurrent-hashtableconcurrent-machinesconcurrent-outputconcurrent-resource-mapconcurrent-rpc concurrent-saconcurrent-split concurrent-stconcurrent-stateconcurrent-supplyconcurrent-utilitiesconcurrentoutputcondconditional-restriction-parsercondor condorcet conductive-baseconductive-clockconductive-hsc3conductive-songconduino conduit conduit-aeson conduit-algorithms conduit-audio conduit-audio-lameconduit-audio-samplerate conduit-audio-sndfileconduit-combinatorsAconduit-concurrent-mapconduit-connection conduit-extra conduit-find conduit-iconv conduit-mergeconduit-network-stream conduit-parse7conduit-resumablesinkconduit-throttleconduit-tokenize-attoparsec conduit-vfsconduit-vfs-zip conduit-zstd+conf conf-json confcryptconfererconferer-aesonconferer-dhallconferer-hedisconferer-hspecconferer-provider-dhallconferer-provider-jsonconferer-provider-yaml conferer-snapconferer-source-dhallconferer-source-jsonconferer-source-yaml conferer-warp conferer-yamlconfetticonffmtconfide config-iniZconfig-manager config-parser config-schema config-select config-value config-value-getopt configifier configurationconfiguration-tools configurator0configurator-exportconfigurator-ngconfigurator-pg+ confsolve congruence-relation conic-graphsconjugateGradientconjureconkin conlogger connectionxconnection-pool connection-string connections consistentconsole-programconsole-prompt console-styleconstconst-math-ghc-plugin constaparser constr-eq constrainedconstrained-categories constrained-categoryconstrained-dynamicconstrained-monadsconstrained-normalconstrained-platform-instances constraintconstraint-classesconstraint-manipconstraint-reflectionconstraint-tuples constraintsconstraints-derivingconstraints-emergeconstraints-extras constrictor construct constructibleconstructive-algebra consul-haskell consumers containercontainer-buildercontainer-classes containersccontainers-acceleratecontainers-benchmarkcontainers-deepseqcontainers-unicode-symbolscontainers-verified content-storecontextcontext-free-artcontext-free-grammarcontext-http-client context-resource context-stackcontext-wai-middleware contiguouscontiguous-checkedcontiguous-fftcontinuecontinued-fractioncontinued-fractions continuumcontinuum-client contra-tracercontra-tracerscontracheck-applicative contravariantcontravariant-extras*control control-bool control-dotdotdot control-dsl control-eventcontrol-invariants control-isocontrol-monad-attemptcontrol-monad-exception control-monad-exception-monadsfd control-monad-exception-monadstfcontrol-monad-exception-mtlcontrol-monad-failure control-monad-failure-mtl control-monad-free+control-monad-loopcontrol-monad-omega control-monad-queuecontrol-timeout contstuff contstuff-monads-tfcontstuff-transformersconverge conversion conversion-bytestring conversion-case-insensitiveconversion-textconvertconvert-annotation convertible<convertible-asciiconvertible-text cookbookcookiecookies coordinatecopilot copilot-c99 copilot-cbmc copilot-corecopilot-frp-sketchcopilot-interpretercopilot-languagecopilot-librariescopilot-prettyprinter copilot-sbvcopilot-theorem coprcopr-api coquinacore core-compiler core-data core-haskell core-programcore-telemetry core-text core-warncore-webserver-servantcore-webserver-warp corebot-blikicorecursive-maincorenlp-parsercorneacoroutine-enumeratorcoroutine-iterateecoroutine-objectcouch-hs couch-simplecouchdb-conduitcouchdb-enumeratorcount countablecountable-inflectionscountercountry8 country-codescourier court covariance coveragecoyacparsing cpio-conduitcpkgcplex-hs cplusplus-thcppfiltcpphs cprng-aes6cprng-aes-effect cps-exceptcpsacpucpuidcpuinfo cpuperfcpython cqlcql-iocql-io-tinylogcqrs cqrs-core cqrs-example cqrs-memorycqrs-postgresql cqrs-sqlite3 cqrs-test cqrs-testkit cqrs-typescrcrackcrackNumcraft craftwerkcraftwerk-cairo craftwerk-gtk crawlchaincrazecrccrc16 crc16-tablecrc32ccrdtcrdt-event-foldcreaturcredential-store credentialscredentials-cli crf-chain1crf-chain1-constrainedcrf-chain2-genericcrf-chain2-tiers critbit criterion criterion-cmpcriterion-comparecriterion-measurementcriterion-pluscriterion-to-htmlcriu-rpccriu-rpc-types crjdt-haskell crockford crocodilecron( cron-compatcronuscroptycruncher-typescrunghc crypt-sha512 crypto-apiVcrypto-api-testsHcrypto-cipher-benchmarks crypto-cipher-testscrypto-cipher-typesJcrypto-classicalcrypto-conduit crypto-enigmacrypto-keys-sshcrypto-multihashcrypto-numbers crypto-pubkeycrypto-pubkey-opensshcrypto-pubkey-typesZ crypto-random=crypto-random-apicrypto-random-effect crypto-rng crypto-rng-effectful crypto-simple crypto-sodium crypto-token crypto-totp cryptocipher cryptocomparecryptoconditions cryptohashIcryptohash-conduitcryptohash-cryptoapi.cryptohash-md5xcryptohash-sha1fcryptohash-sha256zcryptohash-sha512 cryptoidscryptoids-classcryptoids-typescryptol cryptonite cryptonite-cdcryptonite-conduitAcryptonite-openssl cryptostorew cryptsy-api crystalfontzcsacse-ghc-plugincsgcsound-catalog csound-controllerscsound-expressioncsound-expression-dynamiccsound-expression-opcodes csound-expression-typedcsound-sampler csp cspmcheckercsprettycss css-easings css-selectors css-simple css-syntaxcss-text?csv2 csv-conduit*csv-enumerator csv-nptoolscsv-sip csv-table csv-to-qif ctemplatectklctplctriecubecubical cubicbezier3 cubicsplinecublascuboidcuckoo cuckoo-filtercudacudd cue-sheet cufftcurl$ curl-aesoncurl-cookiejar curl-runnings curlhscurly-expander currenciescurrencycurrency-codescurrency-convertcurrent-localecurry curry-basecurry-frontend currycarboncurryer curryer-rpccurryrs cursedcsvcursor cursor-brick cursor-fuzzy-time cursor-fuzzy-time-gen cursor-gen curve25519curvescusolvercusparsecustom-prelude cut-the-crapcuttercv-combinatorscvecybus cyclotomiccypherczipwith6d-bus d10 d3d11bindingd3jsdaemonize-doubleforkdaemonsdagdahdit damnpacketdanibotdaodapidarcsdarcs-benchmark darcs-beta darcs-buildpackagedarcs-cabalizeddarcs-fastconvert darcs-graph darcs-monitor darcs-scripts darcs2dotdarcsden darcswatchdarkplaces-demodarkplaces-rcondarkplaces-rcon-utildarkplaces-text dash-haskell data-accessorbdata-accessor-monadLibdata-accessor-monads-fddata-accessor-monads-tfdata-accessor-mtldata-accessor-templatedata-accessor-transformersRdata-array-byte=data-as data-ascii data-aviary data-base data-basicdata-binary-ieee754c data-bwordF data-carousel data-category data-cell data-check data-checked: data-clistKdata-combinator-gen data-compatdata-concurrent-queuedata-constructiondata-constructors data-cycle data-defaultddata-default-classPdata-default-extradata-default-genericsdata-default-instances-base0!data-default-instances-bytestring 'data-default-instances-case-insensitive !data-default-instances-containersAdata-default-instances-dlistJdata-default-instances-new-base !data-default-instances-old-localeSdata-default-instances-text+data-default-instances-unordered-containersdata-default-instances-vector data-dispersal data-diverse)data-diverse-lens data-dwordF data-easy data-elevatordata-elf data-embeddata-emoticons data-endian8data-extend-generic data-extra data-filepathdata-files-gen data-filterdata-findata-fin-simpledata-fix data-fix-cse data-flags data-flagset data-foldapp data-forest data-freshdata-function-melddata-function-tacitdata-functor-logisticdata-has data-hashS data-index data-interval0 data-inttrie! data-ivardata-json-token data-kiln data-layer data-layout data-lens data-lens-fddata-lens-ixsetdata-lens-lightdata-lens-templatedata-list-sequencesdata-list-zigzagdata-map-multikeydata-memocombinators% data-msgpack data-msgpack-types data-nameddata-nat data-objectdata-object-jsondata-object-yamldata-or data-ordlist8data-partitiondata-pdf-fieldreader data-pprintdata-quotientref data-r-tree data-ref data-reify-data-reify-cse data-repr data-resultdata-rev data-rope data-rtupledata-serializerE data-size data-sketchesdata-sketches-core#data-spacepartdata-standards data-stm32 data-storedata-stringmapdata-structure-inferrer data-sword data-tensor data-textual6 data-timeoutdata-transformdata-tree-print/ data-treify data-type data-utildata-validation data-variantdata-vector-growabledatabase-id-classdatabase-id-groundhogdatabase-migratedatabase-studydatadogdatadog-tracingdataenc.datafixdataflow dataflowerdatalog datapacker datarobotdatasetsdataurl date-cachedate-conversionsdatesdatetime datetime-sbdawdledawgdawg-ord dbcleaner dbfdbjavadbm dbmigrationsdbmigrations-mysqldbmigrations-postgresqldbmigrations-sqlite dbmonitordbus dbus-client dbus-core dbus-hsloggerdbus-qqdbus-thdbus-th-introspectiondclabeldcpu16ddateddc-base ddc-buildddc-codeddc-coreddc-core-babel ddc-core-eval ddc-core-flow ddc-core-llvm ddc-core-saltddc-core-simplddc-core-tetra ddc-driver ddc-interfaceddc-source-tetra ddc-toolsddc-war ddci-coreddedead-code-detectiondead-simple-json dear-imgui+debian debian-binary debian-builddebug debug-diff debug-dumpdebug-medebug-pp debug-timedebug-trace-var debug-tracy debugger-hsdeburrdec decepticons decidabledecimal-arithmeticdecimal-literalsdecision-diagrams declarative decode-utf8decoder-conduitdeduktideep-mapdeep-transformations deepcontroldeepldeeplearning-hsdeepseqdeepseq-boundeddeepseq-genericsAdeepseq-instances deepseq-magic deepseq-thdeepzoomdefargsdefaultable-mapdeferred-folds|definitive-base definitive-filesystemdefinitive-graphicsdefinitive-parserdefinitive-reactivedefinitive-sound deiko-configdejafudeka deka-testsdelaunaydelay deliciousdelimited-textdelimiter-separateddeltadelta-hdelude demarcate denominatedense dense-int-setdense-linear-algebraOdep-t dep-t-advice dep-t-dynamic dep-t-value dependency dependent-hashmap dependent-literalsdependent-literals-plugin dependent-mappdependent-monoidal-mapdependent-state dependent-sum^dependent-sum-aeson-orphansdependent-sum-template}dependsdephddepq deptrack-coredeptrack-devops deptrack-dotdequeNdequeue derangementderivation-treesderive derive-IGderive-enumerable derive-gadtderive-lifted-instances derive-monoidderive-storable-derive-storable-plugin)derive-topdown derive-triederiveJsonNoPrefix deriving-aesonzderiving-compatderiving-openapi3deriving-show-simplederiving-transderivingvia-extrasderpderp-libderulodescribedescrilo descript-lang descriptive desertdespairdeterministic-game-enginedetour-via-sci detour-via-uom detrospector deunicodedevildevtoolsdewdropdf1 df1-htmldfinity-radix-treedfracdfsbuilddgimdgsdhall dhall-bash* dhall-check dhall-csv dhall-docs dhall-fly dhall-jsonH dhall-lexdhall-lsp-server& dhall-nix dhall-nixpkgs dhall-openapidhall-recursive-adt dhall-secret dhall-textdhall-text-shelldhall-to-cabal dhall-toml dhall-yaml4dhcp-lease-parserdhrundidi-core di-df1 di-handle di-monad di-polysemydia-base dia-functionsdiagnosediagramsediagrams-booleandiagrams-braillediagrams-builderdiagrams-cairogdiagrams-canvasdiagrams-contrib diagrams-corediagrams-gi-cairodiagrams-graphviz diagrams-gtkdiagrams-haddockdiagrams-hsqmldiagrams-html5diagrams-input diagrams-libdiagrams-pandoc diagrams-pdf diagrams-pgfdiagrams-postscriptfdiagrams-qrcodediagrams-rasterific<diagrams-reflexdiagrams-rubiks-cubediagrams-solveL diagrams-svg diagrams-tikz diagrams-wxdialogdialogflow-fulfillmentdialoguedibdice dice-entropy-conduit dice2texdicom dictionaries dictionary-sharing. dictparserdietdiff diff-gestaltdiff-loc diff-parsediff3 diffarray diffcabaldiffdumpdifference-monoid differentialdiffmapdifftododigammadigest digest-pure digest-sigdigestive-bootstrapdigestive-foundation-luciddigestive-functors#digestive-functors-aesondigestive-functors-blazedigestive-functors-happstackdigestive-functors-heistdigestive-functors-hspdigestive-functors-luciddigestive-functors-scottydigestive-functors-snap digitdigitalocean-kzsdigitsdigraphdihaadijkstra-simple dimensionaldimensional-codatadimensional-tf dimensions dingo-core dingo-example dingo-widgetsdinodiohsc diophantine diplomacydiplomacy-server dir-traverseCdirect-binary-filesdirect-daemonize direct-fastcgi direct-httpdirect-murmur-hashdirect-pluginsdirect-rocksdb direct-sqlitedirected-cubical directoryydirectory-contentsdirectory-layout directory-listing-webpage-parserdirectory-tree<diremdirfiles dirichlet dirstreamdirtree disassemblerdiscodiscogs-haskell discokittydiscord-gatewaydiscord-haskell0discord-haskell-voice discord-hsdiscord-register discord-rest discord-typesdiscordian-calendardiscount discover-instancesdiscretediscrete-intervalsdiscrete-space-mapdiscriminationdisjoint-containers disjoint-setdisjoint-set-statefuldisjoint-sets-st disk-bytesdisk-free-space1diskhash displaydisplay-haskell-do disposable dist-uploaddistancedistance-of-timedistributed-closuredistributed-forkdistributed-fork-aws-lambdadistributed-process distributed-process-async distributed-process-azure!distributed-process-client-serverdistributed-process-ekgdistributed-process-executiondistributed-process-extrasdistributed-process-fsmdistributed-process-lifted!distributed-process-monad-controldistributed-process-p2pdistributed-process-platformdistributed-process-registry"distributed-process-simplelocalnetdistributed-process-supervisordistributed-process-systestdistributed-process-taskdistributed-process-testsdistributed-process-zookeeperdistributed-static distributiondistribution-nixpkgsdistribution-opensuse distribution-plot distributiveditto ditto-lucid diversity dixidjembedjinn djinn-ghc djinn-lib dl-fedora dlistdlist-instances,dlist-nonemptydmcdmccdmenu dmenu-pkill dmenu-pmount dmenu-searchdnf-repodns dns-patternsdnscachednsrbldnssddo-list do-notationdo-notation-dsl do-spacesdobutokdobutokOdobutokO-effectsdobutokO-frequencydobutokO-poetrydobutokO-poetry-general!dobutokO-poetry-general-languages dobutokO2 dobutokO3 dobutokO4 doc-reviewdoccheckdocidxdocker docker-build-cacher dockercook dockerfiledockerfile-creator doclayoutdocopt$ docrecords docstrings doctemplatesdoctestdoctest-discoverdoctest-discover-configuratordoctest-driver-gen;doctest-exitcode-stdiodoctest-extract doctest-libdoctest-parallelZ doctest-prop docusign-basedocusign-base-minimaldocusign-clientdocusign-exampledocvimdoidoldol dollaridoos dom-eventsdom-lth dom-parser dom-selectordomain domain-aeson domain-auth domain-cereal domain-core domain-opticsdominiondomplatedormouse-client dormouse-uridot dot-linker dot2graphmldotenvEdotfsdotgenKdotnet-timespan dotparsedouble-conversion double-extradouble-metaphone doublezipdoublify-toolkitdovedovetaildovetail-aesondovindowdownhilldownload download-curldownload-media-content downloaderdozenaldozensdph-base dph-examplesdph-lifted-basedph-lifted-copydph-lifted-vsegdph-pardph-prim-interface dph-prim-par dph-prim-seqdph-seqdpkgdpordproxdr-cabal drClickOndragendrama draw-pokerdrawilledresdner-verkehrsbetriebedrifterdrifter-postgresqldrifter-sqlite drinkery driving-classes-plugindrmaadronedropbox dropbox-sdk dropsolvedrunken-bishop ds-kanrendscdsh-sqldsmc dsmc-toolsdson dson-parsecdspdstringdsvdtabdtddtd-text dtd-typesdtracedtwdual dual-game dual-treedualizerdublincore-xml-conduit duckling duetdumb-casdump dump-coredunai# dunai-core dunai-testduploduradurationdustmedvaultdvdadvdreaddvi-processing dvorak dwarfdwarf-eldwarfadtdwergazdx9basedx9d3ddx9d3dxdyckworddyepackdyna dyna-brick dyna-glossdyna-processingdynamic dynamic-cabal dynamic-graph dynamic-graphsdynamic-linker-templatedynamic-loaderdynamic-mvectordynamic-objectdynamic-pipeline dynamic-plot dynamic-pp dynamic-statedynamodb-simple dynloaderdynobuddyre'dywapitchtrack dzen-dhall dzen-utilseach eager-socketseap earclipperearcut earlyeaseeasy-api easy-args easy-bitcoin easy-fileS easy-logger easyjsoneasyplot easyrender easytensor easytensor-vulkaneasytestebeatsebnf-bff ec2-signature ec2-unikerneleccrypto eccrypto-ed25519-bindingsecdsaechotecma262ecstasyecta ecta-plugin ecued25519[ ed25519-donnaeddieede+ edenmodulesedenskeledentvedfedgeedgesedisedit edit-distanceNedit-distance-linearedit-distance-vector edit-lensesedit-lenses-demoeditableeditline editor-openeditpipeeditseffect-handlers effect-monad effect-stack effectful2effectful-core4effectful-plugin effectful-st effectful-theffective-aspectseffective-aspects-mzveffectseffects-parsereffeteffineflintegisonegison-pattern-srcegison-pattern-src-haskell-modeegison-pattern-src-th-mode egison-quoteegison-tutorialegyptian-fractionsehaskellehloehseibd-client-simpleeigen eioeither either-botheither-list-functions either-result either-unwrapeithers ejdb2-bindingekge ekg-bosun ekg-carbonekg-cloudwatchekg-coreM ekg-elasticekg-elasticsearch ekg-influxdbekg-json+ekg-logekg-prometheus-adapterekg-pushekg-rrd ekg-statsdekg-waielasticsearch-interchangeelbowelectrs-clientelectrum-mnemonic elenco-alberoelereaelerea-examples elerea-sdlelevatorelf eliminators elisionelliptic-curve elm-bridge$ elm-build-lib elm-compilerelm-core-sources elm-exportelm-export-persistentelm-get elm-hybridelm-initelm-make elm-package elm-reactorelm-repl elm-server elm-street elm-syntax elm-websocket elm-yesodelm2nix elminatoreloelocryptelsa elynx elynx-markov elynx-nexus elynx-seq elynx-tools elynx-tree ema ema-extra ema-generics emacs-keys emacs-module email email-headeremail-postmarkemail-validatehemail-validate-jsonemail-validator emailaddress emailparseemanote embed-config embeddockembeddock-exampleembla embroideryemdemgmemoji#emojisXempty empty-monadenchantenclosed-exceptionsS encode-stringencoding encoding-io encryptableendo eng-stemmer engine-ioengine-io-growlerengine-io-snap engine-io-waiengine-io-yesodengineering-unitsentangleentropyentwineenum-subset-generate enum-text enum-text-rio enum-types enum-utf8 enumerable enumerateenumerate-function enumeration enumerator enumerator-fd enumerator-tfenumfun enummapmapenummaps enummapset enummapset-thenumset env-extra env-guard env-locale env-parser envelope envparse envstatusenvyenvy-extensibleepanet-haskellepass ephemeralepi-simepicepolleprocessepub epub-metadata epub-tools epubnameeq equal-filesequational-reasoningequational-reasoning-inductionequeue equivalenceqerderfD erf-nativeerlang erlang-ffieros eros-client eros-httperrataerrnoerror error-analyze error-codes error-contexterror-continuations error-list error-locerror-location error-messageerror-or error-or-utils error-utilerrorcall-eq-instanceerrorsT errors-ext ersaconcatersatz ersatz-toysatert escape-artistescapedescoger esotericbotespial esqueletoesqueleto-pgcryptoesqueleto-streamingessessence-of-live-codingessence-of-live-coding-PortMidi essence-of-live-coding-gloss$essence-of-live-coding-gloss-exampleessence-of-live-coding-pulse$essence-of-live-coding-pulse-example!essence-of-live-coding-quickcheckessence-of-live-coding-vivid essence-of-live-coding-warp estimator estimatorsestrepsetcetcdeternaleternityeternity-timestamped etherethereum-analyzer ethereum-analyzer-cliethereum-analyzer-depsethereum-analyzer-webuiethereum-client-haskellethereum-merkle-patricia-db ethereum-rlpeths-rlpetyeulereuler-tour-treeeuphoria eurofxrefevdevevdev-streamlyeveeve-clievedeveffevent event-drivenevent-handlers event-list event-monadevent-transformer eventful-core eventful-dynamodbeventful-memoryeventful-postgresqleventful-sql-common eventful-sqliteeventful-test-helpers eventlog2html- eventloop eventsource-apieventsource-geteventstore-storeeventsource-store-specseventsource-stub-store eventsourced eventsourcingeventsourcing-postgresql eventstore eventuo11y eventuo11y-batteries eventuo11y-dsl eventuo11y-json every every-bit-counts evm-opcodes evoke eweex-pool exact-combinatoricsB exact-coverexact-pi, exact-realexact-real-positionalexample-haskell-projectexcept-exceptionsexception-hierarchyexception-mailerexception-monads-fdexception-monads-tf exception-mtl,exception-transformers@ exception-via exceptionalexceptionfree-readfile exceptions exceptiot exchangeratesexecsexecutable-hashexecutable-path#executor exferenceexh exhaustive exherbo-cabalexifexiftool exigo-schemaexinst exinst-aeson exinst-base exinst-bytes exinst-cerealexinst-deepseqexinst-hashableexinst-serialiseexistexist-instances existentialexists exit-codesexitcodeexomizer exonexotic-list-monads exp-cache exp-extended exp-pairsexpandexpat-enumerator experimenter expiring-cache-map,expiring-containers expiring-mvar explainexplainable-predicatesexplicit-constraint-lensexplicit-determinantexplicit-exception explicit-iomodesexplicit-iomodes-bytestringexplicit-iomodes-textexplicit-sharingexploreexploring-interpretersexposed-containersexpressexpression-parser expressionsexpressions-z3expressoextcoreextempextend-record-data-thextended-categoriesextended-containersextended-containers-lensextended-reals; extensibleextensible-dataextensible-effectsextensible-effects-concurrentextensible-exceptions_extensible-skeleton extensible-sp extensioneer extensions1 external-sortextra5extract-dependenciesextractable-singleton extractelf extralife extrapolateez-couchez3 f-algebra-gen(f-ree-hack-cheats-free-v-bucks-generatorfacetedfactorfactoryfacts factual-apifadfadno fadno-braids fadno-xmlfailNfailable failable-listfailurefailure-detectorfairfair-predicatesfake fake-typefakedataXfakedata-parserfakedata-quickcheck fakefs fakepullfakerfaktoryfalliblefalling-turnip fallingblocksfamiliar-reflection family-treefarmhashfast-arithmetic fast-bech32 fast-builder:fast-combinatorics fast-digits fast-downward fast-logger fast-math* fast-mult fast-nats fast-tags fast-tagsoupfast-tagsoup-utf8-only fasta fastbayesfastcdcfastcgifasteditfaster-megaparsecfastircfastlyfastmemo fastparser fastpbkdf2fastsum fathead-util fault-treefay"fay-base fay-builderfay-domfay-geopositionfay-hsx fay-jqueryfay-reffay-simplejson fay-textfay-urifay-websocketsfb fb-persistent fbmessenger-apifbrnchfcafcache fcd fcf-compositefcf-containers fcf-graphs fcf-vinylfcg fckeditorfclabels.fclabels-monadlib fcm-client fdo-notify fdo-trashfeather feature-flagsfeature-flipperfeature-flipper-postgresfecfedora-composes fedora-distsfedora-haskell-tools fedora-img-dlfedora-packages fee-estimatefeed8feed-cli feed-collect feed-crawl feed-gipedafeed-translatorfeed2lj feed2twitterfeedback fei-base fei-cocoapi fei-dataiter fei-datasets fei-examples fei-modelzoofei-nnfeldspar-compilerfeldspar-languagefeldspar-signalfen2sfencesfenfirefernetfestungfez-confffeedfficxxfficxx-runtime ffmpeg-lightffmpeg-tutorialsfftfftw-ffi fftwRawffunctorfgl fgl-arbitraryfgl-extras-decompositions fgl-visualizefibfibon fibonaccificketedfields fields-json fieldwisefigfile-collectionfile-command-qq file-embedfile-embed-lzmaRfile-embed-polyfile-io file-location file-modules file-path-th file-templates filecachefiledifffilelockL filemanipp fileneglectfilepathfilepath-bytestringUfilepath-cryptofilepath-io-access filepather filepatternfileplow filestore/filesystem-abstractionsfilesystem-conduit filesystem-enumerator filesystem-treesfillit filter-logger filters-basic filtrable4finfin-intfinalfinal-pretty-printerfind-clumpiness find-conduitfind-source-filesfindhttp fingertreefingertree-psqueue fingertree-tffinitaryfinitary-derivefinitary-opticsfinite finite-field finite-fields finite-tablefinite-typelits_finitofirebase-databasefirefly firefly-example firestorefirst-and-lastfirst-class-families8first-class-instancesfirst-class-patternsfirstifyfishfoodfit fits-parsefitsiofitspec fix-importsfix-parser-simplefix-symbols-gititfix-whitespace#fixed_ fixed-length fixed-list fixed-pointfixed-point-vectorfixed-point-vector-spacefixed-precisionfixed-storable-arrayfixed-timestep fixed-vector?fixed-vector-binaryfixed-vector-cborgfixed-vector-cereal fixed-vector-hetero fixed-width fixedprec fixedwidth-hsfixerfixfilefixhsfixiefixplate fixpointfixtime fizz-buzzfizzbuzzfizzbuzz-as-a-serviceflac flac-picture flaccuraterip flags-applicative flamethrower flamingra flashblastflat. flat-maybe flat-mcmcflat-tex flatbuffers flatparseflayflexible-defaultsflexible-numeric-parsers flexible-timeflexible-unlit flexiwrapflexiwrap-smallcheckflick-durationflickr flight-igc flight-kmlflink-statefulfunflip-cmdflippersfliteflofloat-binstringfloat128 floating-bits floatshowflock floskellflow2flow-erflow2dotflowdock flowdock-api flowdock-restflower flowlocks-frameworkflowsimflpfltkhs fltkhs-demos fltkhs-fluid-demosfltkhs-fluid-examplesfltkhs-hello-world fltkhs-themes fluent-loggerfluent-logger-conduitfluffy fluffy-parser fluid-idlfluid-idl-http-clientfluid-idl-scotty fluidsynth flush-queue flux-monoidfmarkfmlistWfmrfmt fmt-for-riofmt-terminal-colorsfn fn-extrafocusp focuslist fold-debounce"fold-debounce-conduit foldable-ix foldable1foldlfoldl-exceptionsfoldl-incrementalfoldl-statisticsfoldl-transducefoldl-transduce-attoparsecfolds folds-commonfolgerhsfollow follow-file followerfomafont-awesome-typefont-opengl-basic4x6fontconfig-pure foofoobarfor-freeforbidden-fruit force-layout8fordo forecast-ioforeignforeign-storable-asymmetric foreign-store! foreign-varforest forest-fire forex2ledgerforgerforkable-monadformaformalformatformat-numbers format-statusformatn formattable formattingformlformlets formlets-hspformura forsyde-deepforsyde-shallow forth-hll fortran-srcfortran-src-extras fortran-varsfortytwo forward-chanfoscam-directoryfoscam-filename foscam-sort foundationfoundation-edge fountainfourmoluZfp-ieeefpco-apifpefpipefplllfpnlafpnla-examplesfptestfqueryfractalfractalsfractionfragframeframe-markdown franchisefranzfraxl frecently freckle-appfreddyfree^ free-algebrasfree-applicative-t free-categories free-categoryfree-concurrentfree-er free-functors' free-game free-httpfree-operational free-theoremsfree-theorems-counterexamplesfree-theorems-seqfree-theorems-seq-webuifree-theorems-webui$free-v-bucks-generator-ps4-no-surveyfree-vector-spacesfree-vl freekick2freeludefreenect freerfreer-converse freer-effects freer-indexed freer-simple>freer-simple-catchingfreer-simple-httpfreer-simple-profilingfreer-simple-randomfreer-simple-timefreesect freesoundfreetype-simple freetype2 french-cardsfreqfresco-bindingfreshfresnelfresnel-fused-effectsfriday friday-devilfriday-juicypixelsfriday-scale-dctfriendly friendly-timefrisby from-sum fromhtml front frontmatterfrotatefrown frp-arduino frpnow frpnow-gloss frpnow-gtk frpnow-gtk3 frpnow-vtyfrquotes fs-eventsfsh-csvfsharp fsmActionsfsnotifyfsnotify-conduitfst fsutilsfswaitfswatch fswatcher ft-generatorftdi ftp-clientftp-client-conduit ftp-conduit ftphsftreeftshellfudgetsfugue full-sessionsfull-text-search fullstop funbot funbot-clientfunbot-ext-eventsfunbot-git-hookfuncmp funcons-intgenfuncons-lambda-cbv-mpfuncons-simple funcons-toolsfuncons-valuesfunction-builderfunction-combinefunction-instances-algebrafunctional-arrowfunctional-kmpfunctor functor-applyfunctor-classes-compatfunctor-combinators functor-combo functor-friends functor-infixfunctor-monadicfunctor-products functor-utilsfunctorm functorsfunflow funflow-nixfungll-combinatorsfunion funnyprintfunpatfunsat funspection fused-effectsIfused-effects-exceptionsfused-effects-lensfused-effects-mwc-randomfused-effects-opticsfused-effects-randomfused-effects-readlinefused-effects-resumablefused-effects-squealfused-effects-thfusion fusion-pluginfusion-plugin-types"futharkM futhark-data"futhark-manifestfuthark-server&futhaskfutunfuturefuture-resourcefutures fuzzcheck fuzzyj fuzzy-dates fuzzy-parse fuzzy-time fuzzy-time-gen fuzzy-timings fuzzyfindfuzzyset fuzzytimefvarsfwgl fwgl-glfwfwgl-javascript fxfxpakg-npmg2g2qg4ip g4ip-provergact galois-fft galois-field game-of-lifegame-probability game-tree gameclockgamgeegamma gang-of-threads garepinohgarfieldgargoyle gargoyle-postgresql gargoyle-postgresql-connect gargoyle-postgresql-nix garlic-bread garsia-wachsgasgaspgathergauge&gbugcgc-monitoring-waigcodehsgconfgdgdaxgdeltgdiffgdiff-iggdiff-thgdogdpgearboxgearhashgedcomgeek geek-servergeglgelatingelatin-freetype2gelatin-fruity gelatin-gl gelatin-sdl2gelatin-shadersgemcap gemini-exports gemini-router gemini-servergemini-textboardgemstone gen-imports gen-passwdgencheckgendergendersgendocsgeneral-allocate# general-games general-prelude generator generatorsgeneric-accessors generic-aesongeneric-arbitrarygeneric-binary generic-church generic-constraints generic-datageneric-data-surgerygeneric-deepseqgeneric-deriving generic-enumgeneric-enumeration generic-envgeneric-functor generic-labels generic-lensgeneric-lens-coregeneric-lens-labelsgeneric-lens-litegeneric-lexicographic-ordergeneric-lucid-scaffold generic-match generic-maybegeneric-monoidQgeneric-opticsgeneric-optics-litegeneric-overridegeneric-override-aesongeneric-pretty generic-pretty-instancesgeneric-randomgeneric-recordsgeneric-servergeneric-storable generic-tree generic-trie generic-xmlgeneric-xmlpickler generically@ generics-eotgenerics-mrsopgenerics-mrsop-gdiff generics-sop}generics-sop-lens genericserializegenesis genesis-testgeneticsgeni-gui geni-util geniconvert genifunctors geniplategeniplate-mirror5 geniservergenprog gentlemark genvalidity-genvalidity-aesongenvalidity-appendfulgenvalidity-bytestring genvalidity-case-insensitive genvalidity-containersgenvalidity-criterion genvalidity-hspec'genvalidity-hspec-aesongenvalidity-hspec-binary genvalidity-hspec-cerealgenvalidity-hspec-hashablegenvalidity-hspec-optics genvalidity-hspec-persistentgenvalidity-mergefulgenvalidity-mergeless genvalidity-network-urigenvalidity-path genvalidity-persistentgenvalidity-propertygenvalidity-scientificgenvalidity-sydtest genvalidity-sydtest-aesongenvalidity-sydtest-hashablegenvalidity-sydtest-lens genvalidity-sydtest-persistent genvalidity-text genvalidity-timegenvalidity-typed-uuid genvalidity-unordered-containers genvalidity-uuid genvalidity-vector geo-resolvergeo-ukgeocalcgeocode-googlegeodetic geodetic-types geodeticsgeohashgeoip2 geojson% geojson-types geolite-csvgeom2dgeomancygeos gerritgetemxgetflaggetopt-generics( getopt-simple gettext-thgfggtsTC gh-labelergh-pocket-knifeghcghc-api-compat ghc-bignumeghc-bignum-orphans-ghc-boot ghc-boot-th/ ghc-byteorder>ghc-call-stack-extras ghc-checkghc-clippy-plugin ghc-compactghc-core ghc-core-htmlghc-core-smallstepghc-corroborate ghc-datasizeghc-debug-brickghc-debug-clientghc-debug-commonghc-debug-convention$ghc-debug-stub#ghc-definitions-th ghc-dump-core ghc-dump-tree ghc-dump-utilghc-dup ghc-eventsghc-events-analyze ghc-events-parallelghc-exactprint$ ghc-gc-hook ghc-gc-tuneghc-generic-instancesghc-heap ghc-heap-view ghc-hotswap ghc-hs-metaghc-imported-from ghc-instances ghc-justdoitghc-libZghc-lib-parserLghc-lib-parser-exghc-makeghc-man-completionghc-mod.ghc-mtl ghc-options ghc-parmake ghc-parser! ghc-pathstghc-pkg-autofix ghc-pkg-libghc-plugin-non-empty ghc-plugs-outghc-primghc-prof#ghc-prof-aesonghc-prof-aeson-flamegraphghc-prof-flamegraph ghc-proofs ghc-server ghc-session ghc-simple ghc-source-genIghc-srcspan-plugin ghc-stdinghc-syb ghc-syb-utils ghc-symbolghc-syntax-highlighterghc-tags ghc-tags-coreghc-tags-pluginghc-tcplugin-apighc-tcplugins-extraNghc-time-alloc-prof ghc-timersghc-trace-eventsughc-typelits-extraDghc-typelits-knownnatVghc-typelits-natnormalise[ghc-typelits-presburger4 ghc-usageghc-visghcflagsghcighci-dapr ghci-diagramsghci-haskeline ghci-hexcalcghci-history-parserghci-libghci-ng ghci-prettyghci-websocketsghcidfghcide ghcide-bench ghcide-test-utils ghcjs-ajax ghcjs-baseghcjs-base-stubghcjs-codemirror ghcjs-domghcjs-dom-helloghcjs-dom-jsaddleghcjs-dom-jsffighcjs-dom-webkit ghcjs-fetch ghcjs-hplay ghcjs-perch ghcjs-promise ghcjs-vdomghcjs-websockets ghcjs-xhrghclive ghcprofviewghcup ghczdecode ghost-busterght gi-adwaitagi-atk\gi-cairo[gi-cairo-againgi-cairo-connector%gi-cairo-render+ gi-cluttergi-cogl gi-coglpango gi-dbusmenu(gi-dbusmenugtk3* gi-freetype2Dgi-gdk gi-gdkpixbuf] gi-gdkx11+gi-gesgi-ggitgi-gio^gi-gio-hs-list-modelgi-girepository gi-glibg gi-gmoduleO gi-gobjecti gi-graphene'gi-gsk!gi-gst gi-gstaudio gi-gstbase gi-gstpbutils gi-gsttag gi-gstvideogi-gtkgi-gtk-declarativegi-gtk-declarative-app-simple gi-gtk-hs6gi-gtk-layer-shellgi-gtkosxapplication gi-gtksheet gi-gtksourcegi-handy gi-harfbuzzMgi-ibusgi-javascriptcoregi-json gi-notify gi-ostree gi-pangoe gi-pangocairo gi-poppler gi-rsvg gi-secretgi-soupgi-vipsgi-vte gi-webkit gi-webkit2gi-webkit2webextensiongi-wnckgi-xlib.giakgibbongimlhginger( gingersnapginsugioFgipeda giphy-apigistgit git-all git-annex git-brunch git-checklist git-configgit-cukgit-date git-embedgit-fmtgit-freq git-gpush git-jumpgit-lfs' git-mediate git-monitor git-objectgit-remote-ipfs git-repair git-sanity git-voguegitHUDgitcachegitdogithashgithub9 github-backup github-datagithub-post-receivegithub-release github-rest github-tools github-types github-utilsgithub-webhook-handlergithub-webhook-handler-snap github-webhooks)githud gitignoregitit gitlab-apigitlab-haskellgitlib!gitlib-cmdline gitlib-crossgitlib-libgit2 gitlib-s3 gitlib-sample gitlib-test gitlib-utilsgitrevDgitsongittergivegifgjkgjk2dgl gl-capturegl3wglabrousgladegladexml-accessorglambdaglappglassoglazeglazier glazier-pipes glazier-reactglazier-react-examplesglazier-react-widget gliglibglicko glider-nlp glintcolliderglirc"gll glob-posixglobal global-config global-lockglobal-variables glome-hsglosslgloss-accelerate gloss-algorithms gloss-banana gloss-devilgloss-examples# gloss-export gloss-game gloss-juicy gloss-rastergloss-raster-accelerategloss-renderingc gloss-sodium glpk-headers glpk-hsglsl gltf-codec gltf-loaderglue glue-common glue-coreglue-ekg glue-example gluturtle gmail-simple gmapgmndlgmpint gnome-desktop gnome-keyringgnomevfsgnss-convertersgnuidn gnuplotWgnutls goa goal-core goal-geometrygoal-graphicalgoal-probabilitygoal-simulationgoatgoatee goatee-gtkgochan godot-haskellgodot-megaparsec gofer-preludegoggles goggles-gcsgogolgogol-abusiveexperiencereportgogol-acceleratedmobilepageurlgogol-accessapprovalgogol-accesscontextmanagergogol-adexchange-buyergogol-adexchange-sellergogol-adexchangebuyer2gogol-adexperiencereportgogol-admin-datatransfergogol-admin-directory gogol-admin-emailmigration gogol-admin-reports gogol-adsensegogol-adsense-hostgogol-affiliatesgogol-alertcentergogol-analytics gogol-analyticsreportinggogol-android-enterprisegogol-android-publisher gogol-androiddeviceprovisioninggogol-androidmanagement gogol-appenginegogol-apps-activitygogol-apps-calendargogol-apps-licensing gogol-apps-resellergogol-apps-tasksgogol-appstategogol-autoscalergogol-bigquery gogol-bigquerydatatransfergogol-bigtableadmin gogol-billinggogol-binaryauthorization gogol-blogger gogol-books gogol-chatgogol-civicinfogogol-classroom gogol-cloudassetgogol-clouderrorreportinggogol-cloudfunctionsgogol-cloudidentitygogol-cloudiotgogol-cloudkmsgogol-cloudmonitoringgogol-cloudprivatecatalog!gogol-cloudprivatecatalogproducergogol-cloudprofilergogol-cloudschedulergogol-cloudsearchgogol-cloudshellgogol-cloudtasksgogol-cloudtracegogol-commentanalyzergogol-composer gogol-compute gogol-consumersurveysgogol-containergogol-containeranalysisgogol-containerbuilder gogol-core gogol-customsearchgogol-dataflowgogol-datafusiongogol-dataprocgogol-datastoregogol-debugger gogol-deploymentmanager gogol-dfareportinggogol-dialogflowgogol-digitalassetlinksgogol-discovery gogol-dlp gogol-dns gogol-docsgogol-doubleclick-bids gogol-doubleclick-search gogol-drivegogol-driveactivitygogol-factchecktools gogol-filegogol-firebase-dynamiclinksgogol-firebase-rulesgogol-firebasehostinggogol-firebaseremoteconfiggogol-firestore gogol-fitness gogol-fonts gogol-freebasesearchgogol-fusiontables gogol-gamesgogol-games-configuration gogol-games-managementgogol-genomics gogol-gmail gogol-groups-migrationgogol-groups-settingsgogol-healthcare gogol-iamgogol-iamcredentials gogol-iapgogol-identity-toolkitgogol-indexing gogol-jobsgogol-kgsearchgogol-languagegogol-latencytestgogol-libraryagent gogol-logginggogol-manufacturersgogol-maps-coordinategogol-maps-engine gogol-mirrorgogol-mlgogol-monitoring gogol-oauth2 gogol-oslogingogol-pagespeedgogol-partners gogol-people gogol-photoslibrarygogol-play-moviespartnergogol-playcustomapp gogol-plusgogol-plus-domains gogol-polygogol-predictiongogol-proximitybeacon gogol-pubsub gogol-qpxexpress gogol-redisgogol-remotebuildexecutiongogol-replicapool gogol-replicapool-updatergogol-resourcemanagergogol-resourceviews gogol-rungogol-runtimeconfiggogol-safebrowsing gogol-scriptgogol-searchconsolegogol-securitycentergogol-servicebrokergogol-serviceconsumermanagementgogol-servicecontrolgogol-servicemanagementgogol-servicenetworkinggogol-serviceusage gogol-serviceuser gogol-sheetsgogol-shopping-contentgogol-siteverification gogol-slides gogol-sourcerepo gogol-spannergogol-spectrum gogol-speechgogol-sqladmin gogol-storagegogol-storage-transfer gogol-streetviewpublish gogol-surveysgogol-tagmanagergogol-taskqueue gogol-testinggogol-texttospeechgogol-toolresults gogol-tpu gogol-tracinggogol-translate gogol-urlshortenergogol-useraccounts gogol-vaultgogol-videointelligence gogol-visiongogol-webmaster-toolsgogol-websecurityscanner gogol-youtube gogol-youtube-analyticsgogol-youtube-reporting goldplate gooey google-cloudgoogle-dictionary google-drivegoogle-html5-slide google-isbngoogle-mail-filtersgoogle-maps-geocoding google-oauth2google-oauth2-easygoogle-oauth2-for-cligoogle-oauth2-jwt google-searchgoogle-server-api google-static-maps google-translate googleplusgooglepolyline gopher-proxy gopherbot gopro-plus gore-and-ashgore-and-ash-actorgore-and-ash-asyncgore-and-ash-demogore-and-ash-glfw gore-and-ash-lambdacubegore-and-ash-logginggore-and-ash-networkgore-and-ash-sdlgore-and-ash-syncgothic gotta-go-fast gotyno-hsgpahgpcsetsgpiogpmf gpolyline gpsgps2htmlReport gpx-conduitgrab grab-formgracefulgrafana grafdhallgrafloggrakngrammar-combinatorsgrammatical-parsersgrapefruit-examplesgrapefruit-frpgrapefruit-records grapefruit-uigrapefruit-ui-gtkgraph graph-core graph-generatorsgraph-matchings graph-rewriting graph-rewriting-clgraph-rewriting-glgraph-rewriting-lambdascopegraph-rewriting-layout graph-rewriting-ski graph-rewriting-strategiesgraph-rewriting-trsgraph-rewriting-wwgraph-serialize graph-tracegraph-trace-dotgraph-trace-viz graph-utils graph-visit graph-wrapper graphbuildergraphenegraphics-drawingcombinators graphics-formats-colladagraphicsFormats graphicstoolsgraphitegraphmod3graphmod-plugingraphql! graphql-api graphql-client graphql-spice graphql-utilsgraphql-w-persistent graphsgraphted graphtypegraphula graphula-coregraphvizRgraqlgraspgravatar gray-codeL gray-extendedgraylog greencard greencard-lib greenclip greg-clientgremlin-haskellgrenade greplicategreskell greskell-core greskell-websocket grid grid-proto gridboundsgridboxgridfsgridlandgrids gridtablesogrmgroomgrootgross groundhog groundhog-convertersgroundhog-inspectorgroundhog-mysqlgroundhog-postgresqlgroundhog-sqlite groundhog-th group-by-date group-theory group-withgroupBy grouped-listgroupoid groupoidsgroupstgroups-generic grow-vectorgrowler grpc-api-etcd grpc-etcd-client grpc-haskell grpc-haskell-coregruffgruff-examplesgsasl gsc-weighting gscholar-rss' gsl-random gsl-random-fugsmenugssapi gssapi-wai gstorable gstreamergt-toolsgtfs gtfs-realtimegtkn gtk-helpers gtk-jsinputgtk-largeTreeStoregtk-mac-integrationgtk-serialized-eventgtk-simple-list-view gtk-sni-tray! gtk-strutgtk-toggle-button-listgtk-toygtk-traymanagergtk2hs-buildtoolsgtk2hs-cast-gladegtk2hs-cast-glibgtk2hs-cast-gnomevfsgtk2hs-cast-gtkgtk2hs-cast-gtkglextgtk2hs-cast-gtksourceview2gtk2hs-cast-th gtk2hs-hello gtk2hs-rpngtk3( gtk3-helpersgtk3-mac-integrationgtkglext gtkimageviewgtkrsyncgtksourceview2gtksourceview3guarded-allocation guarded-rewritingguess-combinatorguidgulciigutenberg-fibonaccisgvtigwgyah-bin gym-http-apih-booruh-gpgmeh-raylib4 h-reversih2048h2chArduinohBDD hBDD-CMUBDD hBDD-CUDDhCMhCsoundhDFAhF2hGelfhLLVMhMollom hOff-display hOff-parserhOpenPGPhPDB hPDB-examples hPushoverhRhRESPhS3hScraper hSimpleDBhTaloshTensorhVOIDPhXmixerhaarhabithablehablohablog hacanon-lighthack hack-contrib hack-contrib-presshack-frontend-happstackhack-frontend-monadcgihack-handler-cgihack-handler-epollhack-handler-evhttphack-handler-fastcgi hack-handler-happstackhack-handler-hyenahack-handler-kibrohack-handler-simpleserverhack-middleware-cleanpathhack-middleware-clientsessionhack-middleware-gziphack-middleware-jsonphack2 hack2-contribhack2-contrib-extrahack2-handler-happstack-serverhack2-handler-mongrel2-httphack2-handler-snap-serverhack2-handler-warphack2-interface-wai hackage-api hackage-cli hackage-db hackage-diffhackage-mirror hackage-plothackage-processing hackage-proxyhackage-repo-tool hackage-securityhackage-security-HTTPhackage-serverhackage-sparks hackage-whatsnew hackage2hwnhackage2twitterhackager hackernews hackertyper hackmanagerhackport4hactorhactorshaddock" haddock-apiGhaddock-cheatsheethaddock-leksahhaddock-library5 haddock-test haddocsethadolint hadoop-formats hadoop-rpchadoop-streaming hadoop-toolshaeredeshafarhaggishagglehahahahphaijihailhailgun hailgun-sendhailgun-simplehails hails-binhairyhakaruhakehakismethakkahakohakyllhakyll-R hakyll-agdahakyll-alectryonhakyll-blaze-templateshakyll-contribhakyll-contrib-csvhakyll-contrib-elmhakyll-contrib-hyphenationhakyll-contrib-i18nhakyll-contrib-linkshakyll-convert hakyll-dhallhakyll-dir-list hakyll-elmhakyll-faviconhakyll-filestore hakyll-images hakyll-ogmarkuphakyll-process hakyll-sass hakyll-serieshakyll-shakespearehakyll-shortcodehakyll-shortcut-linkshakyll-typescripthalhalberdhalf half-spacehalfshalipetohalive hall-symbols halma halma-guihalma-telegram-bot haltavistahalves halvm-webhamhamidhamiltonhamlethampphamsqlhamtmaphamtsolohamusic han2zen hanabi-dealer handa-data handa-gdata handa-geodata handa-opengl handle-like handsy handwritinghangmanhannahcihans hans-pcaphans-pfqhanspellhaphviz hapistrano happindicatorhappindicator3happletshapplets-lib-gtk happraise happs-hsphapps-hsp-templatehapps-tutorial happstackhappstack-authhappstack-authenticatehappstack-clientsessionhappstack-contribhappstack-data happstack-dlghappstack-facebookhappstack-fastcgi happstack-fayhappstack-fay-ajaxhappstack-foundationhappstack-hamlethappstack-heisthappstack-helpers happstack-hsphappstack-hstringtemplatehappstack-ixsethappstack-jmacro happstack-lite happstack-monad-peelhappstack-pluginshappstack-server_happstack-server-tlshappstack-server-tls-cryptonitehappstack-statehappstack-static-routinghappstack-util happstack-yuihappy happy-dot happy-hour happy-meta happybarahappybara-webkithappybara-webkit-server hapstonehaqueryhaquilharharchive hardware-edsl harfbuzz-pureharg harkharmonyharoongaharoonga-httpdharp harpy harvest-apihashas-thhas-transformers hasbolthasbolt-extras hascalhascarhascard hascashascat hascat-lib hascat-setup hascat-systemhash hash-store hash-treehashableNhashable-acceleratehashable-extrashashable-genericshashable-orphans hashable-time hashablerhashed-storagehashes hashflarehashids hashinghashmap, hashmap-io hashmap-throw hashrenamehashringhashtable-benchmark hashtableshashtables-plushasimhask hask-homehaskades haskakafka haskanoid haskarrow haskbot-corehaskdeephaskdogshaskeem haskelinehaskeline-classhaskeline-repl haskelisp haskell-abci haskell-adminhaskell-admin-corehaskell-admin-healthhaskell-admin-managed-functionshaskell-aliyun haskell-awkhaskell-bcrypthaskell-bitmex-clienthaskell-bitmex-resthaskell-brainfuck haskell-ci haskell-cnchaskell-coffeehaskell-compression haskell-conllhaskell-course-preludes haskell-daphhaskell-debug-adapterghaskell-disque haskell-docshaskell-docs-clihaskell-eigen-util haskell-exp-parserhaskell-fake-user-agenthaskell-formatter haskell-ftphaskell-generatehaskell-gettext haskell-gibhaskell-gi-basehaskell-gi-overloading9haskell-go-checkers haskell-google-trendshaskell-holes-thhaskell-igraphhaskell-import-graphhaskell-in-spacehaskell-kuberneteshaskell-language-server haskell-lexer haskell-lspChaskell-lsp-clienthaskell-lsp-types: haskell-menu haskell-mlhaskell-modbus haskell-mpfr haskell-mpi haskell-nameshaskell-neo4j-clienthaskell-openflowhaskell-overridezhaskell-packageshaskell-pdf-presenter haskell-platform-testhaskell-player haskell-plothaskell-postalhaskell-postgishaskell-proxy-listhaskell-qrencodehaskell-read-editorhaskell-reflect haskell-rules haskell-say8 haskell-snakehaskell-spacegoo haskell-src>haskell-src-extshaskell-src-exts-observehaskell-src-exts-prismshaskell-src-exts-qqhaskell-src-exts-schaskell-src-exts-simplehaskell-src-exts-util$haskell-src-matchhaskell-src-metahaskell-src-meta-mwottonhaskell-stack-trace-pluginhaskell-time-rangehaskell-to-elmhaskell-token-utilshaskell-tools-ast haskell-tools-ast-fromghchaskell-tools-ast-genhaskell-tools-ast-trfhaskell-tools-backend-ghc"haskell-tools-builtin-refactoringshaskell-tools-cli haskell-tools-daemonhaskell-tools-debug haskell-tools-demo 'haskell-tools-experimental-refactoringshaskell-tools-prettyprinthaskell-tools-refactor haskell-tools-rewrite haskell-torhaskell-type-extshaskell-typescripthaskell-tyranthaskell-updater9 haskell-xmpp haskell2010 haskell2020 haskell98haskell98libraries haskelldbhaskelldb-connect-hdbc"haskelldb-connect-hdbc-catchio-mtl!haskelldb-connect-hdbc-catchio-tf+haskelldb-connect-hdbc-catchio-transformershaskelldb-connect-hdbc-lifted haskelldb-dynamichaskelldb-flathaskelldb-hdbc haskelldb-hdbc-mysqlhaskelldb-hdbc-odbchaskelldb-hdbc-postgresqlhaskelldb-hdbc-sqlite3haskelldb-hsqlhaskelldb-hsql-mysqlhaskelldb-hsql-odbchaskelldb-hsql-oraclehaskelldb-hsql-postgresqlhaskelldb-hsql-sqlitehaskelldb-hsql-sqlite3 haskelldb-th haskelldb-wx haskellish haskellscrabble haskellscripthaskelm haskelzinchaskemehaskey haskey-btree haskey-mtl haskgamehaskheap haskhol-core haskintex hasklepiashaskmonhaskoinhaskoin-bitcoind haskoin-corehaskoin-crypto haskoin-node haskoin-protocolhaskoin-script haskoin-storehaskoin-store-data# haskoin-utilhaskoin-wallethaskoonhaskoon-httpspechaskoon-salviahaskorehaskore-realtimehaskore-supercolliderhaskore-synthesizerhaskore-vintagehaskseghasktags@ hasktorchhasktorch-codegenhasktorch-ffi-testshasktorch-ffi-thhasktorch-ffi-thchasktorch-indefhasktorch-signatureshasktorch-signatures-partialhasktorch-signatures-supporthasktorch-signatures-typeshasktorch-types-thhasktorch-types-thc hasktorch-zoo haskus-binary haskus-system-build haskus-utilshaskus-utils-compathaskus-utils-datahaskus-utils-typeshaskus-utils-variant haskus-webhaskyapihaslohasloGUIhasmin hasparahasparql-clienthaspellhasqlp hasql-backend hasql-classhasql-cursor-query hasql-cursor-transactionhasql-dynamic-statements%hasql-explain-tests hasql-generichasql-implicits!hasql-interpolatehasql-migrationhasql-notifications6hasql-optparse-applicative hasql-pipes hasql-pool@hasql-postgreshasql-postgres-options hasql-queue hasql-resource-pool hasql-simplehasql-streams-conduithasql-streams-corehasql-streams-examplehasql-streams-pipeshasql-streams-streaminghasql-streams-streamlyhasql-thHhasql-transaction:hasql-transaction-io hasql-urlhasqlator-mysql hasqly-mysqlhastachehastache-aesonhaste haste-apphaste-compiler haste-gapi haste-lib haste-markup haste-perch haste-primhastilyhasty-hamiltonian hat hatex-guide hatexmpp3hathhatshatt haveibeenpwnedhaven havererhawitterhaxhaxl- haxl-amazonka haxl-facebookhaxparsehaxrhaxr-thhaxyhayland hayoo-clihb3sumhbackhbayeshbbhbcd hbeanstalkhbeathbfhblashblockhbro hbro-contribhburghcadhcchcdt hcg-minushcg-minus-cairohcheat hcheckers hchesslibhcltesthcoaphcobshcom hcoordhcounthcronhcubehcwiid hdaemonizehdaemonize-buildfix hdbc-aesonhdbc-postgresql-hstore hdbc-tuplehdbi hdbi-conduithdbi-postgresql hdbi-sqlite hdbi-tests hdevtoolshdfhdf5 hdf5-litehdiffhdigesthdirecthdis86 hdiscounthdmhdohdocs%hdph hdph-closure hdr-histogramheaded-megaparsecR headergenheadroomheap. heap-consoleheapstheapsizeJheapsort heart-app heart-coreheartbeat-streamsheatitupheatitup-complete heatshrink heavy-log-shortcuts heavy-loggerheavy-logger-amazonheavy-logger-instances hebrew-timeheccheckinheckleheddithedgehoghedgehog-checkershedgehog-checkers-lenshedgehog-classes;hedgehog-corpus?hedgehog-fakedata hedgehog-fn hedgehog-genhedgehog-gen-jsonhedgehog-generichedgehog-golden hedgehog-lenshedgehog-opticshedgehog-quickcheckFhedgehog-servanthedisY hedis-config hedis-envy hedis-monadichedis-namespace hedis-pile hedis-simple hedis-tagshedn hedn-functorhedraheggheidiheinheist3 heist-aeson heist-async heist-emanote heist-extrahelfhelichelics helics-waihelisphelium helium-overturehelixhellhellagehellnethellohelmhelp-esbhemkay hemkay-corehemokithenhenethepevt her-lexerher-lexer-parsec herbalizerhercules-ci-agenthercules-ci-api hercules-ci-api-agenthercules-ci-api-corehercules-ci-clihercules-ci-cnix-expr hercules-ci-cnix-storehereheredoc'heredocs herf-time hermes-jsonhermit hermit-sybhermshero-club-five-tenetsheroku heroku-persistent herringboneherringbone-embedherringbone-waiheshhesql hetero-dict hetero-mapheterocephalusheterogeneous-list-literals heterolisthetrisheukaryahevm hevolisa hevolisa-dphhex$hex-text\hexchathexdumphexifhexminohexml hexml-lens hexpat0hexpat-conduithexpat-iteratee hexpat-lens hexpat-pickle hexpat-pickle-generichexpat-streamparser hexpat-tagsouphexprhexpresshexquote hexstringhexthextrahextreamheyefiheystoneheyting-algebrashfannhfdhfiarhflagshfmt hfoilhformathfovhfractal hfseventsShfusionhg-buildpackagehgal hgalibhgdal hgdbmihgearmanhgen hgeometric hgeometry hgeometry-combinatorial hgeometry-ipe hgeometry-svghgeoshgettexthgishgithub hgl-examplehgmphgomhgopherhgraphhgreethgrephgrevhgrib hharphhphhwlochihi-file-parserI hi3statushiccuphichihid hid-exampleshidapi hidden-char hie-bios hie-compathie-corehiedbq hieraclushierarchical-clustering hierarchical-clustering-diagramshierarchical-envhierarchical-exceptions hierarchical-spectral-clustering hierarchy hiernotifyhifihiggledy highWaterMarkhigher-leveldb higherorderhighjsonhighjson-swagger highjson-th highlighthighlight-versions highlighter highlighter2highlighting-kate.hillshimergehimghimpyhindentOhindley-milnerhindley-milner-type-checkhinduce-associations-apriorihinduce-classifierhinduce-classifier-decisiontreehinduce-exampleshinduce-missinghhinfo hinithinotify\hinotify-bytestringhinotify-conduithinquire hinstallerhint hint-serverhinter hinterface hinvaders hinze-streamship(hipbot hipchat-hshipehips hipsql-api hipsql-client hipsql-monad hipsql-server hipsql-tx-simplehirculeshirt hissmetricshist-pl hist-pl-dawghist-pl-fusionhist-pl-lexicon hist-pl-lmfhist-pl-transliter hist-pl-typeshistogram-fillhistogram-fill-binaryhistogram-fill-cerealhistogram-simple historianhit hit-graphhit-onhjcasehjpathhjshjsmin;hjson hjson-query hjsonpointer hjsonschema hjugement hjugement-clihjugement-protocolhkd hkd-default hkd-deltahkd-lens hkd-recordshkdfhkgr hkthlatexhlbfgsbhlcmhleaphledgerz hledger-api hledger-chart hledger-diff hledger-flow hledger-iadd"hledger-interest hledger-irr hledger-libphledger-makeitsohledger-stockquotes hledger-uiQ hledger-vty hledger-webR hlibBladeRF hlibcpuid hlibev hlibfamhlibgit2hlibsasshlint hlint-testhlisthlivyhloggerhlongurlhlrdb hlrdb-core hls$"hls-alternate-number-format-pluginhls-brittany-pluginFhls-cabal-fmt-pluginhls-cabal-pluginhls-call-hierarchy-pluginv hls-change-type-signature-pluginihls-class-pluginhls-code-range-plugin]hls-eval-pluginhls-exactprint-utilshls-explicit-fixity-pluginZhls-explicit-imports-plugin!hls-explicit-record-fields-pluginhls-floskell-pluginhls-fourmolu-pluginhls-gadt-pluginQ hls-graphhls-haddock-comments-pluginehls-hlint-pluginhls-module-name-pluginhls-ormolu-pluginhls-plugin-apihls-pragmas-plugin!hls-qualify-imported-names-pluginbhls-refactor-pluginahls-refine-imports-pluginuhls-rename-pluginlhls-retrie-pluginhls-selection-range-pluginhls-splice-pluginXhls-stan-pluginhls-stylish-haskell-pluginphls-tactics-pluginRhls-test-utils#hlwmhlyhmarkhmarkuphmatrixLhmatrix-backprophmatrix-banded hmatrix-csv hmatrix-glpk hmatrix-gslhmatrix-gsl-stats hmatrix-mmaphmatrix-morpheushmatrix-nipals hmatrix-nlopthmatrix-quadprogpp hmatrix-repahmatrix-sparsehmatrix-specialhmatrix-statichmatrix-sundialshmatrix-svdlibchmatrix-syntax hmatrix-tests hmatrix-vector-sized hmeap hmeap-utilshmemdbhmenuhmephmidihmkhmm hmm-hmatrix hmm-lapackhmp3hmp3-nghmpfrhmthmt-base hmt-diagramshmumpshnetcdfhnixhnix-store-core5hnix-store-remote&hnnhnockhnop hnormalise ho-rewritinghoauthhoauth2b hoauth2-demohoauth2-providershoauth2-providers-tutorialhoauth2-tutorialhobhobbeshobbitshocilibhockerhoconhodatimehoe hofix-mtlhoghogghogglhogrehogre-exampleshois hoist-errorholhold-emhole holey-formatholmes holy-project homeomorphichommage hommage-ds homoiconic homotuple homplexityhomura-stopwatch honeycomb honihonkhoobuddyhood hood-offhood2hoodiehoodlehoodle-builder hoodle-core hoodle-extra hoodle-parserhoodle-publish hoodle-render hoodle-typeshoogle hoogle-index hooks-dirhookuphoophooplhooviehopencchopenclhopenpgp-tools-hopensslhopfieldhopfield-networkshopfli hoppy-docshoppy-generator hoppy-runtime hoppy-stdhopshoqhorahorizonhorizon-gen-nix horizon-spec#horizontal-rulehornamehosc hosc-json hosc-utils hostaddresshostnameXhostname-validate hosts-server hothasktagshotswap hourglassThourglass-fuzzy-parsinghourglass-orphanshousemanhout hp2any-core hp2any-graphhp2any-managerhp2html hp2prettyhpack hpack-convert hpack-dhall hpaco hpaco-libhpage hpapihpastehpasteithpathhpath-directoryhpath-filepathhpath-io hpath-posixhpcA hpc-codecov hpc-coverallshpc-lcov hpc-strobe hpc-threshold hpc-tracerhpdfthpghpio hplayground hplaylisthpodderhpphpqtypeshpqtypes-effectfulhpqtypes-extrashprotoc hprotoc-forkhproxhps hps-cairo hps-kmeanshpuz hpygmentshpyloshpyrghpythonhq hquantlibhquantlib-timehqueryhrankerhreader hreader-lens hreq-client hreq-conduit hreq-corehrfsizehrickethriemannhruby hshs-GeoIP hs-aws-lambda hs-bibutils) hs-blake2 hs-brotli hs-captcha hs-carbonhs-carbon-exampleshs-cdb hs-conlluhs-di hs-dotnet hs-duktape hs-excelx hs-ffmpeghs-fltk hs-functors hs-gchart hs-gen-iface hs-gizapp hs-inspectorhs-ixhs-java hs-json-rpchs-logohs-mesos hs-multiaddrhs-nombre-generatorhs-openmoji-datahs-opentelemetry-api#hs-opentelemetry-exporter-in-memoryhs-opentelemetry-exporter-otlp+hs-opentelemetry-instrumentation-cloudflare(hs-opentelemetry-instrumentation-conduit&hs-opentelemetry-instrumentation-hspec,hs-opentelemetry-instrumentation-http-client+hs-opentelemetry-instrumentation-persistent2hs-opentelemetry-instrumentation-postgresql-simple$hs-opentelemetry-instrumentation-wai &hs-opentelemetry-instrumentation-yesodhs-opentelemetry-otlphs-opentelemetry-propagator-w3c hs-opentelemetry-sdk !hs-opentelemetry-utils-exceptions hs-pattranshs-pgmshs-php-session hs-pkg-config hs-pkpasshs-popenhs-profunctorshs-re hs-rqlite hs-rs-notify hs-scrapehs-sdl-term-emulatorhs-server-starter hs-snowtify hs-speedscopehs-swisstable-hashtables-classhs-tagshs-term-emulator hs-twitterhs-twitterarchiverhs-vcard hs-watchmanhs-zstdhs2048hs2atshs2bfhs2doths2ps hsConfigurehsI2ChsPID hsSqlite3 hsXenCtrlhsakamaihsaml2 hsass hsautoguihsayhsb2hs hsbackuphsbc hsbencherhsbencher-codespeedhsbencher-fusionhsc2hsxhsc3 hsc3-auditor hsc3-cairo hsc3-datahsc3-dbhsc3-dot hsc3-forth hsc3-graphs hsc3-lang hsc3-lisp hsc3-plot hsc3-processhsc3-rechsc3-rw hsc3-serverhsc3-sfhsc3-sf-hsndfile hsc3-unsafe hsc3-utils hscaffold hscamwire hscassandrahscdhscdiohscharmhschema hschema-aesonhschema-prettyprinterhschema-quickcheckhscimhsclockhscolourvhscopehscrtmplhscuidhscurseshscurses-fish-exhsdev?hsdifhsdiphsdns hsdns-cachehse-cpp hsebaysdkhsemail hsemail-ns hsendxmpphsenvhservhsethsexifhsfacterhsfcshhsfilthsforcehsgnutls hsgnutls-yjhsgsomhsgtdhsharchsignalhsilophsimport$hsini! hsinspect hsinspect-lsp hsinstall hskeleton hslackbuilderhslibsvmhslinkshsloggerqhslogger-readerhslogger-template hslogger4j hslogstashhslua hslua-aeson hslua-classest hslua-cli hslua-corehslua-examples hslua-list&hslua-marshallingyhslua-module-doclayoutNhslua-module-pathhslua-module-systemhslua-module-texthslua-module-versionhslua-module-ziphslua-objectorientationhslua-packaging hsluv-haskellhsmagickhsmisc hsmodetweaks hsmtpclienthsndfilehsndfile-storablevectorhsndfile-vectorhsnockhsnoisehsnshsnsqhsntp hsoptionshsozhsphsp-cgi hsparklineshsparql hspearhspechspec-attoparsec hspec-brackethspec-checkers hspec-contrib< hspec-coreWhspec-dirstreamhspec-discover`hspec-expectationswhspec-expectations-jsonhspec-expectations-lenshspec-expectations-lifted9hspec-expectations-matchhspec-expectations-prettyhspec-expectations-pretty-diffhspec-experimental hspec-goldenAhspec-golden-aeson9hspec-hashablehspec-hedgehog< hspec-jenkinshspec-junit-formatter" hspec-lawshspec-leancheck hspec-megaparsec; hspec-metaUhspec-monad-controlhspec-multicheckhspec-need-env hspec-parsec hspec-pg-transact hspec-server hspec-setuphspec-shouldbe hspec-slowhspec-smallcheck0 hspec-snaphspec-stack-rerunhspec-structured-formatter hspec-tableshspec-test-framework hspec-test-framework-thhspec-test-sandboxhspec-tmp-proc hspec-waiEhspec-wai-json&hspec-webdriver hspec2 hspecVarianthspkcs11hspr-shhsprayhspread hspresent hsprocesshsql hsql-mysql hsql-odbchsql-postgresql hsql-sqlite3hsqmlhsqml-datamodelhsqml-datamodel-vinylhsqml-demo-manichsqml-demo-morrishsqml-demo-noteshsqml-demo-samples hsqml-morris hsreadabilityhsrelp hsseccomphssh hsshellscript hssourceinfohssqlppp hssqlppp-thhstar hstatistics hstatshstatsdhstesthstidy hstorchathstox hstradekinghstylehstzaar hsubconverthsudoku hsveriloghswiphsx hsx-jmacro hsx-xhtmlhsx2hs hsyscallhsyslogB hsyslog-tcp hsyslog-udphszephyrhtaglibhtagshtalkathtarhtaut htdp-imagehtestuhtiledhtimehtiragehtlsethtml< html-charset html-conduit<html-email-validate html-entitiesT html-entityhtml-entity-map html-kurehtml-minimalist html-parsehtml-parse-utilhtml-presentation-text html-ruleshtml-tokenizer html-truncatehtml-validator-cli html2hamlet html5-entityhtnhtodohtoml htoml-megaparsec htoml-parse htracehtshtsn htsn-common htsn-importhtssets http-accept http-api-datahttp-api-data-qq http-attoparsec http-client(http-client-authhttp-client-brread-timeouthttp-client-conduithttp-client-extrahttp-client-lenshttp-client-multiparthttp-client-openssl!http-client-overrides http-client-restrictedAhttp-client-rustlshttp-client-sessionhttp-client-streamshttp-client-tlshttp-client-websockets http-common3 http-conduitwhttp-conduit-browserhttp-conduit-downloader http-datehttp-directory http-dispatch http-download7http-encodingshttp-enumerator http-grammarhttp-io-streams http-kinderhttp-kithttp-link-header' http-listen http-mediaU http-mock http-monad http-ponyhttp-pony-serve-wai&http-pony-transformer-case-insensitivehttp-pony-transformer-httphttp-pony-transformer-startline http-proxy http-queryhttp-querystringhttp-response-decoderhttp-reverse-proxy* http-rfc7807 http-server http-shed http-streams9 http-test http-trace http-types| http-wgethttp2 http2-clienthttp2-client-exehttp2-client-grpc http2-grpc-proto-lenshttp2-grpc-proto3-wire http2-grpc-typeshttp3! httpd-shed:https-everywhere-ruleshttps-everywhere-rules-rawhttpspechtunehtvmhtzaarhub hubigraphhubrishuck huckleberryhuffhuffmanhugs2ychulkhum human-parsehuman-readable-duration human-texthumble-preludehumshunch hunit-dejafu hunit-gui hunit-parsec hunit-rematchhunp hunspell-hshunt-searchengine hunt-serverhunt-server-clihuphurdlehurlhurl-xmlhurriyet husk-schemehusk-scheme-libshuskyhutton huttons-razorhuzzyhvect(hvegaJ hvega-themehw-aesonVhw-allhw-balancedparenshw-bits hw-ci-assist hw-conduithw-conduit-merges hw-diagnostics hw-dsvhw-dump hw-eliasfano hw-excess hw-fingertreehw-fingertree-strict hw-hedgehoghw-hspec-hedgehog hw-inthw-iphw-json hw-json-demo hw-json-lens hw-json-simdhw-json-simple-cursorhw-json-standard-cursor hw-kafka-avrohw-kafka-client>hw-kafka-conduit hw-lazy hw-mqueryhw-packed-vector hw-parser hw-playground-linearhw-prim hw-prim-bits hw-rankselecthw-rankselect-base hw-simd hw-simd-cli hw-streamshw-string-parse hw-succincthw-tarhw-uri hw-vectorhw-xmlhwall-auth-iitkhweblib hwhilehwkhworker hworker-ses hwormholehwshwsl2hwsl2-bytevectorhwsl2-reducershxhxmppchxournal hxt\ hxt-binary hxt-cachehxt-charpropertiesMhxt-css hxt-curl hxt-expat hxt-extras hxt-filterhxt-httphxt-pickle-utilshxt-regex-xmlschemaL hxt-relaxng hxt-tagsoup hxt-unicodeF hxt-xpath hxt-xslt hxthelperhxwebhyahtzeehyakkohybridhybrid-vectorshydrahydra-hs hydra-printhydrogen hydrogen-clihydrogen-cli-args hydrogen-datahydrogen-multimaphydrogen-parsinghydrogen-preludehydrogen-prelude-parsechydrogen-syntax hydrogen-utilhydrogen-versionhyenahylidehylogen hylolibhylotab hyloutilshyper hyper-extra hyper-haskell-server hyperdrivehyperfunctionshypergeomatrixhypergeometrichyperion hyperloglog hyperloglogplus hyperpublic hyperscript hypertypes hyphenate hyphenationhypher hyraxAbifhz3hzaifhzenhanhzenityhzkhzulipi18ni3blocks-hs-contribi3ipc iCalendar iException iap-verifierib-apiibanibus-hsical ice40-primicepeakicfpc2020-galaxy icon-fontsiconv iconv-typed ide-backendide-backend-commonide-backend-rtside-backend-serverideas ideas-mathideas-math-typesideas-statistics idempotent identicon identicon-style-squares identifiersidiii idiomaticidnaidna2008idringenidrisKieee ieee-utilsieee-utils-tempfixieee754Nieee754-parseriexcloudif if-instanceifcxtiffifscsigigeige-mac-integrationignoreigraphigrfihaskell)ihaskell-aesonihaskell-basicihaskell-blazeihaskell-chartsihaskell-diagramsihaskell-displayihaskell-gnuplotihaskell-graphvizihaskell-hatexihaskell-hvegaihaskell-inline-rihaskell-juicypixelsihaskell-magicihaskell-parsec ihaskell-plotihaskell-rlangqqihaskell-widgetsihp-hsxihs ihttpilist< illuminate image-type imagefilters imagemagick imagepasteimagesize-conduitimapimapgetimbibimgurimgurder imj-animationimj-baseimj-game-hamazedimj-measure-stdout imj-preludeimm immortal(immortal-queueimmortal-workerimparseimperative-edslimperative-edsl-vhdlimplimplicit implicit-hieimplicit-hie-cradle{implicit-loggingimplicit-params importifyimports impossibleimprevuimprevu-happstackimprintimproveimpure-containers in-other-wordsin-other-words-plugininbox inc-refinchinchwormincipit incipit-base) incipit-core) include-env include-file incrementalincremental-computingincremental-mapsincremental-parser'incremental-sat-solver incrementsindent indentation indentation-coreindentation-parsecindentation-trifecta indentparserindents index-core indexationindexedindexed-containers indexed-do-notationindexed-extras indexed-freeindexed-list-literalsKindexed-profunctors[indexed-traversableindexed-traversable-instances indextypeindian-language-font-converterindicesindieweb-algorithmsindigo inf-interval infer-licenseAinfer-upstreaminfernal inferno-core inferno-lsp inferno-types inferno-vcinfernu infinite-listinfinite-searchinfinityinfix inflections inflistinfluxdb informativeiniTini-qqinilist initializeinj inj-base injectinject-function injections inline-asminline-cL inline-c-cpp$inline-c-win32 inline-javainline-r inliterate input-parsersinquireinsert-ordered-containershinsertsinspection-proxyinspection-testingYinspector-wreckerinstana-haskell-trace-sdk instance-control instance-map instant-aeson instant-bytesinstant-deepseqinstant-generics instant-hashableinstant-zipperinstapaper-senderinstinct instrumentinstrument-chordint-cast5int-interval-mapint-like int-multimapintcode integer-gmp4integer-logarithms integer-pure integer-roots>integer-simple integer-types integration$ integreat intel-aesintensional-datatysinteractinteractive-plotinterchangeableinterleavableGeninterleavableIO interleave interlude interlude-lintern! internetmarkeintero_interpinterpol interpolate-interpolatedstring-perl6,interpolatedstring-qqinterpolatedstring-qq-mwottoninterpolatedstring-qq2 interpolation interpolator interprocess interruptible interspersedintervalinterval-algebrainterval-functorinterval-patternsinterval-tree-clock intervalsS intmap-graph intricacy intrinsic-superclassesintro intro-prelude introductionintroduction-testintsetintset-imperative invariant, inventoryinvert invertibleinvertible-grammar invertible-hlistinvertible-hxtinvertible-syntaxinvolutive-semigroups io-capture io-choice io-machine io-manager io-memoize io-reactive io-region io-storage io-streamsio-streams-haproxy]io-streams-httpio-string-like io-throttleioctl ion ioref-stableiostringiothread iotransactionip] ip-quoter ip2locationip2proxyip6addripaipatchipcipcvaripfsipfs-apiipld-cidipopt-hsipprintiprouteiptables-helpersiptadminipynbipython-kernel!ircirc-bytestring irc-client irc-colors irc-conduitirc-coreirc-ctcpirc-dcc irc-fun-botirc-fun-client irc-fun-colorirc-fun-messages irc-fun-typesircbot% ircbouncerirealiriiridiumirisiron-mq ironforgeirtisisbnisdicom isevaluatedisizislink ismtp iso-derivingiso3166-country-codesiso639iso8583-bitmapsiso8601-duration iso8601-time/isobmffisobmff-builderisoclineisohuntisomorphism-classHisotope ispositiveit-has itanium-abiitcli itemfield iter-statsiterIOiterable iterateeiteratee-compress iteratee-mtliteratee-parsec iteratee-stmiterative-forward-search iterio-server iterm-showiterm-show-JuicyPixelsiterm-show-diagramsival ivar-simpleivorivoryivory-artifactivory-avr-atmega328p-registersivory-backend-c ivory-bitdata ivory-evalivory-examplesivory-hw ivory-optsivory-quickcheckivory-serialize ivory-stdlibivy-webiwlib$ix ix-shapableixdoppixmonad ixset ixset-typedYixset-typed-binary-instanceixset-typed-cassavaixset-typed-conversionsixset-typed-hashable-instanceixshaderiyqljj2hs ja-base-extrajacindajack jack-bindings jackminimixjackpolynomials jacobi-rootsjaeger-flamegraphjailjailbreak-cabal#jalaalijalla jammittools japanese-calendarjapanese-holidaysjarfindjarifyjasonjava-adt java-bridgejava-bridge-extrasjava-character java-poker java-reflect javaclassjavascript-bridgejavascript-extrasjavasfjavavjbi jcdecaux-vlsjdijengajenkinsPlugins2nixjet jet-stream jinquantitiesjira-wiki-markupjl jmacro jmacro-rpcjmacro-rpc-happstackjmacro-rpc-snapjml-web-servicejmonkeyjnijobqueuejobs-uijoinjoin-apijoinlistjoint jonathanscardjordjordanjordan-openapijordan-servantjordan-servant-clientjordan-servant-openapijordan-servant-serverjortjosepjose-jwt<jot joy-rewritejpegjpl-horizons-apijpsjs-chart@ js-dgtableWjs-flotW js-good-parts js-jquerycjsaddle> jsaddle-clib jsaddle-dom jsaddle-hello jsaddle-warpjsaddle-webkit2gtk jsaddle-webkitgtkjsaddle-wkwebview jscjsmwjsonTjson-altjson-api json-api-libjson-assertionsjson-astjson-ast-json-encoderjson-ast-quickcheck json-autotypejson-b json-builderjson-bytes-builderjson-directory json-encoderjson-enumerator json-extra json-feedjson-fujson-incremental-decoder json-litobj json-pointer json-pointer-aesonjson-pointer-hasql json-pointy json-pythonjson-qq json-queryjson-rpcjson-rpc-client json-rpc-genericjson-rpc-server json-schemajson-sop json-state json-streamD json-syntaxjson-to-haskell json-togo json-tokens json-tools json-tracer json-typesjson2 json2-hdbc json2-typesjson2sg json2yamljson5hs jsonextfilter jsonifierjsonl jsonl-conduit jsonlogicjsonlogic-aesonjsonnetjsonpath jsonresumejsonrpc-conduitjsonrpc-tinyclientjsons-to-schemajsonschema-genjsonsqljsontsvjsonxlsxjsopjspath juandelacosajudgejudy juicy-draw juicy-gcodejukebox jump jumpthefive junit-xmljupyterjustified-containersjvm jvm-batching jvm-binary jvm-parser jvm-streaming jwtRkademliakafka kafka-clientkafka-client-sync kafka-devicekafka-device-glutkafka-device-joystick kafka-device-leapkafka-device-spacenavkafka-device-vrpn kaleidoscopekalmankan-extensionskangarookanji kansas-comet kansas-lavakansas-lava-coreskansas-lava-papiliokansas-lava-shakekarabiner-configkarakurikarpskarverkatip katip-datadogkatip-elasticsearch katip-kafkakatip-logstash katip-logzio katip-raven katip-rollbarkatip-scalyr-scribe katip-syslog katip-waikattkatydidkawakawaiikawhi kazura-queuekbq-gukcdkd-treekdesrc-build-extrakdesrc-build-profileskdt keccakkeenser keep-alivekeera-callbackskeera-hails-i18nkeera-hails-mvc-controllerkeera-hails-mvc-environment-gtk keera-hails-mvc-model-lightmodel$keera-hails-mvc-model-protectedmodel keera-hails-mvc-solutions-configkeera-hails-mvc-solutions-gtkkeera-hails-mvc-viewkeera-hails-mvc-view-gtkkeera-hails-reactive-cbmvarkeera-hails-reactive-fskeera-hails-reactive-gtkkeera-hails-reactive-htmldomkeera-hails-reactive-networkkeera-hails-reactive-pollingkeera-hails-reactive-wxkeera-hails-reactive-yampakeera-hails-reactivelenseskeera-hails-reactivevalues keera-posture keid-corekeid-frp-banana keid-geometrykeid-render-basickeid-resource-gltfkeid-sound-openalkeid-ui-dearimguikeiretsukempekerrykeshaketerkevinkewarkey key-state key-vault keycloak-hskeycodekeyed keyed-valskeyed-vals-hspec-testskeyed-vals-memkeyed-vals-redis keylayoutskeyringkeysIkeysafekeystore keyvaluehash keyword-argskhphki ki-unlifted kibro kicad-datakickass-torrents-dump-parserkickchan kif-parser kind-apply kind-genericskind-generics-th kindskitkleene kleene-listkmeans kmeans-par kmeans-vectorkmn-programmingkmonadkmp-dfakneadknead-arithmeticknit knit-haskellknob!knotskoellner-phonetickoji koji-install koji-toolkonekokonnakol kontra-configkontrakcja-templates koofr-clientkorea-holidayskorfukparamskqueuekrakenkrankkrapshkrpcks-test ksystoolsktx ktx-codec kubernetes-clientkubernetes-client-corekubernetes-webhook-haskellkudzukuifjekurekure-your-boilerplatekuritakvitable kyotocabinetl-bfgs-bl10n labeled-graph labeled-treelabels laborantin-hs labsat labyrinth labyrinth-serverlackeylacroix lagrangianlaikalambda lambda-ast lambda-bridgelambda-calculatorlambda-calculus-interpreter lambda-canvas lambda-cube lambda-devslambda-optionslambda-placeholderslambda-samplerlambda-toolbox lambda2js lambdaBase lambdaFeed lambdaLit lambdabotlambdabot-corelambdabot-haskell-pluginslambdabot-irc-plugins lambdabot-misc-pluginslambdabot-novelty-pluginslambdabot-reference-plugins lambdabot-social-pluginslambdabot-telegram-pluginslambdabot-trustedlambdabot-utilslambdabot-xmpplambdabot-zulip lambdacatlambdacms-corelambdacms-media lambdacubelambdacube-bulletlambdacube-compilerlambdacube-corelambdacube-edsllambdacube-enginelambdacube-examples lambdacube-gl lambdacube-irlambdacube-samples lambdatex lambdatwit lambdaya-buslambdifflame lame-testerlandlocklanglanguage-Modula2 language-asn language-asn1 language-ats language-avro language-bashlanguage-boogie language-clanguage-c-commentslanguage-c-inline language-c-quote5 language-c99language-c99-simplelanguage-c99-util language-cil language-conflanguage-csharp language-css language-dartlanguage-dickinsonlanguage-docker[language-dockerfile language-dot&language-ecmascriptlanguage-ecmascript-analysislanguage-eiffel language-elmlanguage-fortran language-gcllanguage-gemini language-glsl* language-golanguage-guesslanguage-haskell-extract language-hcl language-javalanguage-java-classfilelanguage-javascripte language-js language-kort language-lualanguage-lua-qq language-lua2language-mixallanguage-ninja language-nixlanguage-oberon language-objc language-ocamllanguage-openscad language-piglanguage-protobuflanguage-puppetlanguage-pythonlanguage-python-colourlanguage-python-test language-qux language-rustlanguage-sally language-shlanguage-slicelanguage-spellinglanguage-sqlitelanguage-sygus language-thrift language-tllanguage-toolkitlanguage-typescript language-vhdllanguage-webidllaoplapack lapack-carraylapack-comfort-array lapack-ffilapack-ffi-tools lapack-hmatrix large-anonlarge-genericslarge-hashable large-records largeword lasercutterlatlatest-npm-versionlatexlatex-formulae-hakylllatex-formulae-imagelatex-formulae-pandoc latex-function-tableslatex-live-snippetslatex-svg-hakylllatex-svg-imagelatex-svg-pandoclattices_launchdarkly-server-sdklaunchpad-controllawfullawless-concurrent-machineslawzlax layered-statelayers layers-game layoutlayout-bootstrap layout-rules layoutinglazifylazy lazy-async lazy-bracketlazy-csv lazy-hashlazy-hash-cachelazy-iolazy-io-streamslazy-priority-queue lazy-search3 lazyarraylazyboylazyiolazysetlazysmallcheck? lazysplineslbfgslca lcs ld-intervalslda ldap-clientldap-scim-bridgeldapplyldifleafleaky lean lean-peano leancheck)leancheck-enum-instancesleancheck-instances leankit-apileanpub-concepts leanpub-wreq leapsecondsleapseconds-announcedlearn learn-physics learn-physics-examples learning-hmmleb128 leb128-binary leb128-cereal leetify left4deadrllegionlegion-discoverylegion-discovery-client legion-extraleksah leksah-server lendingclublenslens-accelerate lens-action lens-aeson lens-corelens-csv lens-datetime lens-errors lens-familyclens-family-corelens-family-thlens-filesystem lens-labels lens-misc lens-named lens-prelude lens-processlens-properties lens-regex lens-regex-pcre lens-simplelens-sop lens-telllens-text-encodinglens-th-rewrite lens-timelens-toml-parser lens-tutoriallens-typelevel lens-utilslens-witherablelens-xmllenseslensreflentillenz lenz-mtl lenz-templateless-arbitrary level-monadleveldb-haskellleveldb-haskell-fork levenshteinlevmar levmar-chartlex-applicativelexer-applicativelfstlgtklhalhaelhclhe lhs2TeX-hllhs2htmllhs2tex%lhslatexlibBF<libGenI libarchive0libarchive-conduit libconfiglibcspm libexpectlibffi'libffi-dynamiclibfuse3 libgit libgraph libhbb libinfluxdblibiserv libjenkins libjwt-typed liblastfm liblawlessliblinear-enumeratorlibltdllibmdbx libmodbus libmoludelibmpdlibnix libnotifylibnvvm liboath-hsliboleglibpafelibpqlibraft librandomorg librarianlibrato libravatar librdkafkalibretlslibroman libsecp256k1 libsodium libssh2libssh2-conduitlibstackexchangelibsystemd-daemonlibsystemd-journalYlibtagc libtelnet libversion libvirt-hs libvorbislibxlslibxlsxwriter-hslibxmllibxml-enumerator libxml-saxlibxsltlibyaml`libyaml-streamlylibzfslicensor lielife life-sync lifetimes lift-generics lift-read-show lift-type lifted-async lifted-baseelifted-base-tflifted-protolude lifted-stmlifted-threads lifterlifx-lanligatureligdlightlightning-haskelllightstep-haskell lighttpd-conf lighttpd-conf-qqlilypondlimp limp-cbclin-alglindalinden lindenmayerline line-bot-sdk line-break line-drawing line-sizeline2pdf linearlinear-acceleratelinear-algebra-cblas linear-baselinear-circuit linear-codelinear-genericslinear-grammar linear-maps linear-opengl linear-smc linear-socket linear-tests linear-vectlinearEqSolverlinearmap-category linearscanlinearscan-hoopl linebreak linenoiselines-of-actionlingolinguistic-ordinals link-relations linkchecklinkchklinkcorelinked-list-with-iterator linkedhashmap linklaterlinnet linnet-aesonlinnet-conduitlinode linode-v4 linux-blkidlinux-capabilities linux-cgroup linux-evdevlinux-file-extents linux-framebuffer linux-inotify linux-kmod linux-mountlinux-namespaces linux-perf linux-ptrace linux-xattr linx-gatewaylio lio-eci11lio-fs lio-simplelion lipsum-genliquid liquid-baseliquid-bytestringliquid-containersliquid-fixpointliquid-ghc-primliquid-parallelliquid-platformliquid-prelude liquid-vector liquidhaskell=liquidhaskell-caballiquidhaskell-cabal-demo lispparserlist-duplicate list-extras list-filterlist-fusion-probe list-groupinglist-muxlist-predicate list-promptlist-remote-forwardslist-singletonlist-tlist-t-attoparseclist-t-html-parserlist-t-http-clientlist-t-libcurl list-t-textlist-transformer3 list-tries list-tuplelist-witnesses list-zip-def list-zipperlistenbrainz-clientlistlike-instanceslists lists-flineslistsafelisztlitliterals literatex little-earley little-logger little-riolive-sequencerliveplot ll-picosatllrbtreellsdllvm llvm-analysis llvm-basellvm-base-typesllvm-base-utilllvm-data-interopllvm-dslllvm-extension llvm-extra llvm-ffi llvm-ffi-tools llvm-general llvm-general-purellvm-general-quotellvm-hs1llvm-hs-pretty llvm-hs-pure%llvm-htllvm-pkg-config llvm-prettyllvm-pretty-bc-parserllvm-tf llvm-toolslmdb lmdb-high-level lmdb-simplelmonad lmonad-yesod lnd-clientlnurllnurl-authenticatorload-balancingload-env load-fontloadavgloc loc-test local-address local-search localizationlocalizelocated located-base located-monad-loggerlocators lochloch-th lock-file locked-polllockfree-queue2lockpoolloglog-base! log-domain log-effectlog-effect-syslog log-effectfullog-elasticsearch log-postgres log-utils log-warper log2jsonlog4hs logentrieslogfloatlogfmtlogger logger-threadlogginglogging-effect!logging-effect-extralogging-effect-extra-filelogging-effect-extra-handlerlogging-facade,logging-facade-journaldlogging-facade-syslog logic-TPTP logic-classeslogicstlogictlogict-sequence logict-state loglevel logplex-parselogsinklogstash lojban lojbanParser lojbanXiragan lojysambanlollol-apps lol-benches lol-calculuslol-cpplol-repa lol-tests lol-typingloli long-double longboilongshot lookup-tablesloop;loop-dsl loop-effin loop-while loopbreakerlooperloops loopylordloremlorentzlorisloshadka lostcitieslouislouplowgllowlin lp-diagramslp-diagrams-svglpegdlrucacheF lrucachinglrucaching-haxlls-usblscaballsfromlsplsp-test lsp-typeslsslsystemltextlti13ltiv1p1ltkltllua lua-arbitrary>lua-bc lua-bytecodeluachunkluautilslublucid lucid-alpine lucid-aria lucid-cdn lucid-colonnade lucid-extraslucid-foundation lucid-htmx lucid-hyperscript lucid-svg lucid-xstaticlucid2 lucid2-htmx lucienneluhnlui luis-clientlukalukkog lumberjack luminanceluminance-sampleslushtagsluthorlvarlvishlvmliblvmrunlxc lxd-clientlxd-client-configlyelz4 lz4-bytes lz4-conduitlz4-frame-conduit lz4-hslziplzliblzmai lzma-clib lzma-conduitlzma-enumerator lzma-static4 lzma-streamslzomDNSResponder-clientmaammac macaroon-shop macbeth-lib maccatcher machination machinecellmachinesmachines-amazonka machines-attoparsecmachines-binarymachines-bytestringmachines-directorymachines-encoding machines-iomachines-process machines-zlibmachomackerel-clientmaclightmacos-corelibsmacosx-make-standalonemacrm mad-propsmadlangmagemagic) magic-tyfamsmagic-wormhole magicbanemagicomagmamagmasmahoromaid mail-pool mail-reports mailbox-count mailchimpmailchimp-subscribemailgun main-testermainland-pretty6 majordomomajoritymake-hard-linksmake-monofoldable-foldable make-packagemakedomakefile mallardmameyamanagedFmanaged-functions managed-functions-http-connectormanaged-functions-jsonmanatee manatee-allmanatee-anythingmanatee-browser manatee-core manatee-curlmanatee-editormanatee-filemanagermanatee-imageviewermanatee-ircclientmanatee-mplayermanatee-pdfviewermanatee-processmanagermanatee-readermanatee-templatemanatee-terminalmanatee-welcomemancalamandrill manduliamangopaymangrovemanifold-random manifolds manifolds-core map-classesmap-extsmap-reduce-folds map-syntax mapalgebramappy mapquest-apimaquinitas-tidal marihana marionettamarkdown markdown-kate markdown-papmarkdown-unlit2 markdown2svg marked-prettymarkov markov-chainmarkov-chain-usage-model*markov-processesmarkov-realizationmarkupmarkup-previewmarmalade-uploadmarquisemars marshal-conttmarvinmarvin-interpolatemarxup masakazu-botmasonmassiv5 massiv-iomassiv-persistmassiv-schedulermassiv-serialise massiv-test master-plan mastermind matchable matchable-thmatchermatchers math-extrasmath-functionsv math-gradsmath-interpolate math-metricmath-programmingmath-programming-glpkmath-programming-testsmathblogmathexpr mathflow mathgenealogymathistamathlinkmatlab matplotlibmatrices/matrix5 matrix-as-xyz matrix-client matrix-lens matrix-marketmatrix-market-attoparsecmatrix-market-pure matrix-sized matrix-staticmatroidmatsuri matterhornmattermost-apimattermost-api-qcmaudemaxentmaxent-learner-hwmaxent-learner-hw-guimaximal-cliques maxsharing maybe-justifymaybenchmbox mbox-tools mbox-utilitymbtilesmbugmcaesonmclmcmmcmaster-gloss-examplesmcmc mcmc-samplersmcmc-synthesis mcmc-typesmcpimdapimdcatmdomdp mealstrommealymeansmecabmechmechamechs med-modulemedeamediabusmediabus-fdk-aac mediabus-rtp median-stream mediawikimediawiki2latexmedium-sdk-haskellmeep mega-sdistmegalisp megaparsecmegaparsec-tests meldable-heap melf mellon-core mellon-gpio mellon-webmelody membershipmembrainmemcache memcache-conduitmemcache-haskell memcachedmemcached-binarymemdbmemexmlmemfd meminfomemismemo-ptr memo-sqlitememoization-utilsmemoize'memorable-bitsmemory memory-cdmemory-hexstring memorypool memscriptmenoh menshen mercury-apimergemerge-bash-historymergefulmergeful-persistent mergeless mergeless-persistent merkle-logmerkle-patricia-db merkle-treemersenne-random mersenne-random-pure64Emessage-db-temp messagepackmessagepack-rpcmessente meta-miscmeta-parmeta-par-acceleratemetadatametaheuristics metamorphicmetaplugmetar metar-httpmethodmetricmetricsmetricsd-clientmetro metro-socketmetro-transport-cryptometro-transport-tlsmetro-transport-websocketsmetro-transport-xor metronomemezzo mezzolensmfsolve!mgenericmi miconix-test micro-gatewaymicro-recursion-schemes microaeson; microbase microbenchmicrocmicroformats2-parser microformats2-types microgroove microlensOmicrolens-aesonRmicrolens-contramicrolens-each microlens-ghc microlens-mtlmicrolens-platformmicrolens-process microlens-th microloggermicrosoft-translator microspec microstache microtimermidamidairmidi midi-alsamidi-music-box midi-simple midi-util midi-utilsmidimory midisurfacemighttpd mighttpd2mighty-metropolis migrant-core migrant-hdbcmigrant-postgresql-simplemigrant-sqlite-simplemikmod mikrokosmosmikumilena mimemime-directory mime-mail7 mime-mail-ses mime-string mime-typesmin-max-pqueue minecraftminecraft-datamines minesweeper mini-egisonminiball miniforthminilens minilight minilight-luaminimal-configuration minimorph+minimungminio-hsminionsminioperationalminiplex minirotateminisat minisat-solver ministgminitypeset-opengl miniutterminizinc-processminlen minst-idxminttymios mirror-tweet misfortune* mismi-core mismi-kernelmismi-pmismi-s3 mismi-s3-coremiso miso-action-logger miso-examplesmiso-from-htmlmissmiss-porcelainmissing-foreign missing-py2mit-3qvpPyAi6mHmiv mix-arrowsmixed-strategiesmixed-types-nummixpanel-clientmkbndlmkcabal ml-wmlistmltool mm2mmapkmmark mmark-cli mmark-ext mmorphmmsyn2 mmsyn2-arraymmsyn2-array-ukrainian-datammsyn2-hashablemmsyn3mmsyn4 mmsyn5 mmsyn6ukr mmsyn6ukr-arraymmsyn7hmmsyn7lmmsyn7s mmsyn7ukrmmsyn7ukr-arraymmsyn7ukr-commonmmtfmmtl mmtl-base mnist-idxmnist-idx-conduit moan mock-httpd mock-time mockazomockery!modT modbus-tcpmodel modelicaparser modern-uri modify-fastamodsplitmodularmodular-arithmeticmodular-preludemodular-prelude-classy modularitymodule-management modulespectionmodulomoemoesocks mohwsmolemollie-api-haskellmonad-abort-fd monad-atommonad-atom-simple monad-batcher monad-bayes monad-bool monad-branch monad-choicemonad-chronicle monad-classesmonad-classes-logging monad-codec monad-connect monad-controlmonad-control-alignedmonad-control-identitymonad-coroutinemonad-dijkstravmonad-exception monad-extras monad-finally monad-fork monad-gen monad-hash monad-httpmonad-interleavemonad-introspectmonad-io-adapter monad-journal monad-levels monad-lgbt monad-log monad-loggermonad-logger-aesonmonad-logger-extras monad-logger-json monad-logger-logstash monad-logger-prefix monad-logger-syslog monad-loopsGmonad-loops-stm monad-lrs monad-markov monad-memoImonad-mersenne-random monad-metricsmonad-metrics-extensible monad-mock monad-open monad-ox monad-parbmonad-par-extrasMmonad-parallelmonad-parallel-progressbar monad-param monad-peel monad-persistmonad-primitive monad-products monad-ranmonad-recorder monad-resumption monad-schedulemonad-skeleton monad-st monad-statemonad-statevar monad-ste monad-stlike-iomonad-stlike-stm monad-stm monad-supply monad-taskmonad-throw-exit monad-timeQ monad-timing monad-treemonad-tx monad-unify monad-unlift monad-unlift-ref monad-validate monad-var monad-wrapmonadIOmonadLibmonadLib-compose monadacmemonadbimonadcryptorandom monadfibremonadic-arrays monadic-recursion-schemes monadiccp monadiccp-gecode monadio-unwrappable monadlistmonadloc monadloc-ppmonadlogmonadoid monadology monadplus monads-fd monads-tf/monadtransformmonarchmondo monetdb-mapimoneymongoDB8 mongodb-queuemongrel2-handlermonitormonky mono-foldablemono-traversablemono-traversable-instances)mono-traversable-keysmono-traversable-wrappermonoidmonoid-absorbing monoid-extras monoid-map monoid-owns monoid-recordmonoid-statisticsmonoid-subclassesmonoid-transformermonoidal-containersmonoidal-functors monoidplusmonoids monomermonomer-hagrid monomorphicmonopatimontagemontage-client monte-carlomonthsmonusmonus-weighted-searchmonzomoo6moo-nad moonshinemore-containersmore-extensible-effectsmorfette morfeuszmorley morley-clientmorley-preludemorley-upgradeablemorlocmorphmorpheus-graphql1morpheus-graphql-app*morpheus-graphql-climorpheus-graphql-clientmorpheus-graphql-code-gen(morpheus-graphql-code-gen-utilsmorpheus-graphql-core.morpheus-graphql-servermorpheus-graphql-subscriptionsmorpheus-graphql-tests morphismsmorphisms-functors morphisms-functors-inventorymorphisms-objectsmortemortred mosaico-lib mosquitto-hsmoss motomoto-postgresqlmotormotor-diagramsmotor-reflectionmount mountpoints$ movie-monadmoving-averagesmp mp3decoder mpdmatempeffmpg123-bindingsmpi-hs mpi-hs-binary mpi-hs-cereal mpi-hs-store mplayer-spot mpolynomialsmpppcmpreludemprettymprismprovermpsmptcpmptcp-pm mptcpanalyzermpvguihsmqttmqtt-hs mr-env mrifkmrmmsms-tds msgpack msgpack-aesonmsgpack-arbitrarymsgpack-binary msgpack-idlmsgpack-persist msgpack-rpcmsgpack-rpc-conduitmsgpack-testsuite msgpack-typesmshmsi-kb-backlit mssql-simple mstatemsumtgoxapimtlmtl-c mtl-compatSmtl-evil-instances mtl-extras mtl-preludemtl-tf mtl-unleashed mtl-upliftmtlparse mtlxmtpmtreemtslmu-avro mu-graphqlmu-grpc-clientmu-grpc-common mu-grpc-servermu-kafkamu-lens mu-optics mu-persistent mu-prometheus mu-protobufmu-rpc mu-schemamu-servant-server mu-tracingmuciphermudmudbathmueslimueval#mulangmultext-east-msd multi-cabalmulti-containers multi-exceptmulti-instance multi-trie multiaddrmultiarg multibasemulticurryable multifile multifocal multihashmultihash-cryptonite multihash-serialise multihashmap multilinearmultilinear-iomultimap multipart%multipart-names multipass multipath multiplate multiplate-simplified multiplicity multipoolmultipool-persistent multipool-persistent-postgresqlmultipool-postgresql-simple multiprocessmultirecmultirec-alt-derivermultirec-binarymultisetA multiset-combmultisetrewrite multistateI multivariant multivectormuonmurdermurmur murmur-hashemurmur3 murmurhash3mushumusic-articulationmusic-diatonicmusic-dynamicsmusic-dynamics-literalmusic-graphics music-parts music-pitchmusic-pitch-literalmusic-preludes music-scoremusic-sibelius music-suite music-util musicScrollmusicbrainz-emailmusicwmusicxml musicxml2mustachegmustache-haskell mustache2hsmutablemutable-containers> mutable-iter mutable-lens mute-unmute mvar-lockmvc mvc-updates mvclientmwc-probabilitymwc-probability-transition mwc-randommwc-random-accelerate mwc-random-monadmx-state-codes mxnetmxnet-dataitermxnet-examplesmxnet-nn mxnet-nnvmmy-package-testing myTestlllmyanimelist-export mybitcoin-scimyo mysnapsessionmysnapsession-examplemysql5 mysql-effect mysql-haskellmysql-haskell-nem mysql-haskell-openssl mysql-simpleCmysql-simple-quasimysql-simple-typed mystemmywatchmywork myxine-clientmzv n-ary-functorn-mn-tuple n2o n2o-nitro n2o-protocolsn2o-web nagios-check nagios-confignagios-perfdatanagios-plugin-ekg nakadi-clientnamecoin-updatenamednamed-binary-tag named-formlet named-lock named-records named-servantnamed-servant-clientnamed-servant-server named-sop named-text.namelistnamesnames-th namespace nano-cryptrnano-erl nano-hmacnano-md5nanoAgda nanocursesnanomsgnanomsg-haskell nanoparsecnanopassnanospec9nanovg nanovg-simplenanqnaperiannaqshanarcnat nat-opticsnat-sized-numbers nationstatesnativenatsU nats-client nats-queue naturalnatural-arithmeticRnatural-induction natural-number natural-numbers natural-sortnatural-transformation; naturalcompnaturalsnaver-translatenbt nc-indicatorsncursesndjson-conduitneatneat-interpolationlneedleneet nehe-tuts neilneither neither-dataneko-lib neko-obfsnemesis nemesis-titanneptune-backendnerfneronero-wai nero-warpnest nested-routesnested-sequence nested-sets nestedmapnet-concurrent net-mqtt net-mqtt-lens net-mqtt-rpc net-spider net-spider-clinet-spider-pangraphnet-spider-rplnet-spider-rpl-clinetclock netcode-ionetcore netease-fm netlib-carraynetlib-comfort-array netlib-ffinetlinesnetlinkCnetlistnetlist-to-vhdlnetpbm)netrcnetrium netspecnetstring-enumeratornettle nettle-frp nettle-netkitnettle-openflownetwire netwire-inputnetwire-input-glfwnetwire-input-javascript netwire-vinylglfw-examplesnetworknetwork-addressnetwork-anonymous-i2p network-anonymous-tor network-api-supportnetwork-arbitrarynetwork-attoparsecnetwork-bitcoin network-bsdgnetwork-buildernetwork-byte-orderhnetwork-bytestringnetwork-carbonnetwork-conduitnetwork-conduit-tlsnetwork-connection network-data network-dbus network-dns network-enumerator network-fancy network-hans network-house network-infonetwork-interfacerequest network-ip2network-manager-tuinetwork-messagepack-rpc!network-messagepack-rpc-websocket network-metrics network-minihttp network-msgnetwork-msgpack-rpc network-multicast3network-netpacketnetwork-packet-linux network-pginetwork-protocol-xmpp network-rpca network-run&network-servernetwork-servicenetwork-simple5network-simple-sockaddrnetwork-simple-tlsnetwork-simple-wsnetwork-simple-wssnetwork-socket-optionsnetwork-streamnetwork-topic-modelsnetwork-transport+network-transport-amqpnetwork-transport-composednetwork-transport-inmemorynetwork-transport-tcpnetwork-transport-testsnetwork-transport-zeromqnetwork-types-icmp network-urinetwork-uri-flagnetwork-uri-jsonnetwork-uri-lensesnetwork-uri-staticnetwork-voicetextnetwork-wai-router network-wait network-websocketnetworked-gameneuralneural-network-base neural-network-blashsneural-network-hmatrixneuron newbase60newhopenewports newsletternewsletter-mailgunnewsynthnewtnewtypeXnewtype-deriving newtype-generics newtype-th newtype-zoonewtypernext-refnextstep-plistnfnfc ngram ngrams-loader ngx-exportngx-export-distributionngx-export-healthcheckngx-export-logngx-export-toolsngx-export-tools-extraniagra nibblestring nice-htmlnicify nicify-libnicovideo-translatornikepub nimbernirum nist-beaconnitroniv nix-delegate nix-deploynix-derivationnix-diffnix-evalnix-freeze-tree nix-graph nix-narinfo nix-paths nix-serve-ng nix-thunk nix-toolsnix-treenixdunixfmt nixfromnpm nixos-typesnixpkgs-updatenkjp nlopt-haskell nlp-scoresnlp-scores-scriptsnmnme nmis-parsernnnntpno-buffering-workaroundno-role-annotsno-value noether nofib-analyse nofib-analyzenoisenoli nomnominal nomyx-api nomyx-corenomyx-language nomyx-library nomyx-server nomyx-web non-emptynon-empty-containersnon-empty-sequencenon-empty-textnon-empty-zipper non-negative(nonce6nondeterminismnonempty-alternativenonempty-containers@ nonempty-liftnonempty-vector;nonempty-wrappernonempty-wrapper-aesonnonempty-wrapper-quickchecknonempty-wrapper-textnonempty-zipper nonemptymap nonfree nonlinearnonlinear-optimization nonlinear-optimization-ad nonlinear-optimization-backpropnoodlenormaldistribution'normalization-insensitive normalize normalize-imports not-gloss not-gloss-examples not-in-base not-preludenotcppnothunkstnotifications-tray-iconnotmuch notmuch-haskell notmuch-webnotzero now-haskellnowdoc np-extras np-linearnptools nqe nri-env-parser nri-http nri-kafkanri-observabilitynri-postgresql nri-prelude nri-redisnri-test-encodingnsis nth-primenthanthable ntp-control ntrip-clientntypenuha null-canvasnullary nullpipenum-non-negativenumber number-length number-show number-wallnumbered-semigroups numberingnumbers5numerals numerals-basenumeric-domains numeric-extras numeric-kindsnumeric-limits numeric-logarithms numeric-odenumeric-prelude numeric-qq numeric-quest numeric-ranges numeric-tools numerical numericpeanonumhask numhask-array numhask-freenumhask-hedgehognumhask-histogramnumhask-prelude numhask-range numhask-space numhask-testnumsnumtype numtype-dk. numtype-tfnurbsnuxeo nvfetchernvim-hs,nvim-hs-contrib nvim-hs-ghcidnvvmnyannyan-interpolationnyan-interpolation-core nyan-interpolation-simplenylasnymphaeanyx-gameo-clockoanda-rest-api oasis-xrdoath oauth10aoauth2-jwt-beareroauthenticatedobdobddoberon0objobjectid objectiveoblivious-transfer observableobservable-sharing ocaml-export ocap-ioochanochintin-daichooctaneoctohat octopusoculusodbc odd-jobs oden-go-packages odpic-raw oeisoeis2 off-simpleofxogma-cli ogma-core ogma-extraogma-language-cogma-language-cocospecogma-language-copilotogma-language-fret-csogma-language-fret-reqsogma-language-smvogmarkupohloh-hs oi oidc-client ois-input-managerokapi old-locale:old-timeF old-version olwrapperom-actorom-dohom-elmom-failom-forkom-httpom-http-logging om-kubernetes om-legion om-loggingom-plugin-importsom-show om-socketom-timeomaketexombraomega omnicodecomnifmt on-a-horseon-demand-ssh-tunnelonamaonce one-line-aeson-text one-linerone-liner-instancesone-time-passwordoneOfN oneormoreonline online-csvonly onpartitions onu-course oo-prototypesoops$opopaleyeJopaleye-classyopaleye-sqlite opaleye-trans opc-xml-da-clientopen-adtopen-adt-tutorial open-browser> open-haddock open-pandoc open-signalsopen-symbology open-typerep open-union open-witness openai-hs openai-servant openal-ffiopenapi-petstore openapi-typedopenapi3openapi3-code-generatoropencc opench-meteoopencog-atomspaceopencv opencv-extra opencv-raw opendatatableopenexchangerates openexr-writeopenflowopengl-dlp-stereoopengl-spacenavigatoropenglesopenidopenid-connectopenpgpopenpgp-Cryptoopenpgp-asciiarmor!openpgp-crypto-apiopensoundcontrol-ht opensource openssh-github-keysopenssh-protocolopenssl-createkeyopenssl-streamsR opentelemetryopentelemetry-extraopentelemetry-http-clientopentelemetry-lightstepopentelemetry-wai opentheoryopentheory-bitsopentheory-byteopentheory-charopentheory-dividesopentheory-fibonacciopentheory-parseropentheory-primeopentheory-primitive opentheory-probabilityopentheory-streamopentheory-unicodeopentok opentracing opentracing-http-clientopentracing-jaeger opentracing-wai opentracing-zipkin-common opentracing-zipkin-v1opentracing-zipkin-v2 opentypeopenweathermap operate-do operationalHoperational-alacarteoperational-class operational-extraoplangopml opml-conduitopnopticsC optics-core optics-extra optics-th optics-vloptimaoptima-for-hasqloptimal-blocks optimization optimusprimeoptionoptional optional-args*options options-timeoptparse-applicative)!optparse-applicative-cmdline-utiloptparse-applicative-simple optparse-declarative optparse-enum optparse-genericoptparse-helperoptparse-simplee optparse-text optparse-version optstreamopusfileorbitsorc orchestrateorchid orchid-demo ord-adhocorder-maintenanceorder-statistic-treeorder-statisticsorderedordered-containers ordering-utilorderly-workersordersordinal ordreaoreforg-modeorg-mode-lucidorg2ankiorganize-importsorgmode orgmode-parseorgstat origamiorion-hs orizenticormolu5 orthotope orthotope-hmatrixory-hydra-client ory-kratos os-releaseosc oscpackingosdkeysoset osm-conduit osm-downloadoso2pdfosx-arototp-authenticatorottparse-prettyoutsortovereasyoverhang overload overloaded overloaded-records overture owoify-hspackpackage-description-remotepackage-o-tronpackage-version package-vt packcheckpackdepspacked packed-dawg packed-multikey-map packedstring packerpacker-messagepackpackman packstream packunused pacman-memcache pact-time padKONTROLpaddlepadic pads-haskell pagarmepager pagerduty pagerduty-hs paginationpagure pagure-cli pagure-hook-receiverpaintpairingpalette palindromes pam pan-os-syslogpanda pandocpandoc-citeproc>pandoc-citeproc-preamblepandoc-crossrefpandoc-csv2table pandoc-dhall-decoderpandoc-emphasize-codepandoc-filter-graphvizpandoc-filter-indentpandoc-highlighting-extensionspandoc-includepandoc-include-code!pandoc-japanese-filters pandoc-lenspandoc-link-contextpandoc-lua-marshalopandoc-markdown-ghci-filterpandoc-placetablepandoc-plantuml-diagrams pandoc-plot pandoc-pyplotpandoc-sidenotepandoc-stylefrommeta pandoc-throw pandoc-types pandoc-unlit pandoc-utils pandoc-vimhlpandora pandora-io panfiguration pang-a-lambdapangopangraph panhandlepanicpanpipepansitepantry pantry-tmppapa papa-basepapa-base-exportpapa-base-implement papa-bifunctorspapa-bifunctors-exportpapa-bifunctors-implement papa-exportpapa-implement papa-include papa-lenspapa-lens-exportpapa-lens-implement papa-preludepapa-prelude-corepapa-prelude-lenspapa-prelude-semigroupoidspapa-prelude-semigroupspapa-semigroupoidspapa-semigroupoids-exportpapa-semigroupoids-implementpapa-x papa-x-exportpapa-x-implement paphragenpapillon pappypaprikapar-dual par-traverseparaparagonparallelV parallel-ioparallel-tasks parallel-tree-search parameterizedparameterized-dataparameterized-utils= paramtreeparanoiaparcoparco-attoparsec parco-parsec parcom-libparconc-examplespareto pareto-frontparipari park-bench parochialparport parquet-hsparse parse-dimacs parse-gcstats parse-help parseargsparsec parsec-class parsec-extra parsec-freeparsec-numbersIparsec-numeric parsec-parsersparsec-permutation parsec-prattparsec-tagsoup parsec-trace parsec-utilsparsec1parsec2parsec3parsec3-numbers parsedate parseerror-eqparsek parselyparser-combinatorsparser-combinators-tests" parser-helper&parser-unbiased-choice-monad-embedding parser241 parsergenparsers|parsers-megaparsec parsestar parsimonyparsix parsley parsley-coreparsley-garnishparsnippartagepartialpartial-handlerpartial-isomorphisms$ partial-lens partial-orderPpartial-recordspartial-semigroup partial-semigroup-hedgehogpartial-semigroup-test partial-uripartlypassagepassman passman-cli passman-corepasswordpassword-instancespassword-types passwordspasta pasta-curvespastispastypatatpatchSpatch-combinators patch-imagepatches-vectorpathqpath-binary-instancepath-dhall-instance path-extensions path-extra path-formattingpath-io path-like path-piecesRpath-text-utf8 path-tree path-utils pathfindingpathfindingcorepathological-bytestringspathspathtypepathwalk patience patrol patronscraperpattern-arrows%pattern-matcher pattern-triepatternspava paymill paynow-zw paypal-adaptive-hoops paypal-apipaypal-rest-clientpbpb-nextpbc4hspbkdf pcap pcap-conduitpcap-enumeratorpcapng pcd-loaderpcfpcf-fontpcf-font-embed pcg-random(pcgen pcre-heavy= pcre-less pcre-lightApcre-light-extra pcre-utilspcre2!pdc pdf-slavepdf-slave-serverpdf-slave-template pdf-toolbox-content1pdf-toolbox-core*pdf-toolbox-document%pdf-toolbox-viewerpdf2linepdfinfo.pdfnamepdfsplit pdftotextpdynload peakachupeano( peano-infpecpecoffpedersen-commitment pedestrian-dag pegpeggypellpemRpencil penn-treebankpenntreebank-megaparsecpenny penny-bin penny-lib penrosepeparserpercent-encoderpercent-format perceptronperceptual-hashperdure peregrin perf perf-analysis perfect-hash-generatorperfect-vector-shuffle perfecthashperhapsperiodperiodicperiodic-clientperiodic-client-exeperiodic-commonperiodic-polynomialsperiodic-serverperm permutation permutationspermutepersist persist-state persist2erpersistable-record persistable-types-HDBC-pg persistentHpersistent-auditpersistent-cerealpersistent-database-urlpersistent-discoverpersistent-documentationpersistent-equivalencepersistent-genericpersistent-hssqlppppersistent-instances-iproutepersistent-iproutepersistent-lenspersistent-map persistent-migration persistent-mongoDB!persistent-mtl persistent-mysql2persistent-mysql-haskellpersistent-odbcpersistent-pagination persistent-parserpersistent-postgresql{persistent-postgresql-streamingpersistent-protobuf persistent-qq)persistent-ratelimitpersistent-redis persistent-refs persistent-relational-recordpersistent-spatialpersistent-sqlitepersistent-stmpersistent-templatepersistent-template-classypersistent-test+persistent-typed-dbpersistent-vector persistent-zookeeperpersona persona-idppesca peyotls peyotls-codecpezpg pg-entity pg-extras pg-harnesspg-harness-clientpg-harness-server pg-recorderpg-store pg-transact pgdl pgf2pgm pgp-wordlist) pgsql-simplepgstream phantom-state phasechangephaser phashphatsort phizzlephoityne phoityne-vscode7phone-metadata phone-numbers phone-push phonetic-codephonetic-languages-basisphonetic-languages-commonphonetic-languages-constaintsphonetic-languages-constraints$phonetic-languages-constraints-arrayphonetic-languages-examples phonetic-languages-filters-arrayphonetic-languages-generalphonetic-languages-permutations%phonetic-languages-permutations-array#phonetic-languages-phonetics-basics phonetic-languages-plusphonetic-languages-propertiesphonetic-languages-rhythmicity"phonetic-languages-simplified-base$phonetic-languages-simplified-common,phonetic-languages-simplified-examples-array -phonetic-languages-simplified-examples-common8phonetic-languages-simplified-generalized-examples-array 9phonetic-languages-simplified-generalized-examples-common:phonetic-languages-simplified-generalized-properties-array ,phonetic-languages-simplified-lists-examples.phonetic-languages-simplified-properties-array5phonetic-languages-simplified-properties-array-common2phonetic-languages-simplified-properties-array-old.phonetic-languages-simplified-properties-lists5phonetic-languages-simplified-properties-lists-doublephonetic-languages-ukrainian"phonetic-languages-ukrainian-arrayphonetic-languages-vectorphooey photoname phraskellphybinphysics pi-calculus pi-forall pi-hoolepi-lcd pia-forwardpianolapiceditpickle picologic picoparsecpicosatpictikzpidpid1pidfile pier pier-corepietpigpikipinboard)pinboard-notes-backuppinch pinch-genpinchotpinepingping-parser-attoparsec ping-wrapperpinned-warningspinponpipe-enumeratorpipeclippipedpipelinepipes pipes-aeson pipes-asyncpipes-attoparsecpipes-attoparsec-streaming pipes-bgzf pipes-binary pipes-break pipes-brotlipipes-bytestring, pipes-bzippipes-cacophonypipes-category pipes-cborgpipes-cellularpipes-cellular-csv pipes-cerealpipes-cereal-plus pipes-cliffpipes-concurrency+ pipes-conduit pipes-core pipes-courier pipes-csv pipes-errors pipes-extra pipes-extras pipes-fastx pipes-files pipes-fluid pipes-group% pipes-httppipes-illuminapipes-interleavepipes-io pipes-kafkapipes-key-value-csv pipes-lines pipes-lzma pipes-misc pipes-mongodb pipes-networkpipes-network-tlspipes-network-wspipes-ordered-zip pipes-p2ppipes-p2p-examples pipes-parse-pipes-postgresql-simplepipes-protoludepipes-pulse-simple pipes-randompipes-rtpipes-s3 pipes-safe pipes-shellpipes-sqlite-simple pipes-textpipes-transduce pipes-vector pipes-wai pipes-websockets pipes-zeromq4 pipes-zlibpisigma pit pitchtrackpivotal-tracker pixel-printerpixelapixelated-avatar-generatorpixivpiyopkcs1pkcs10pkcs7pkggraph pkgtreediff pktreeplace-cursor-at placeholdersplaid plailudeplan-applicativeplan-b planar-graphplanb-token-introspectionplanet-mitchellplanet-mitchell-testplanktonplatplatinum-parsing playlistsplaylists-httpplexplist plist-buddyplivo plocketedplot:plot-gtk plot-gtk-ui plot-gtk3plot-lab plot-light plot-light-examples ploterificplotfontplotlyhsplotonplotsplotserver-apiplow-log plow-log-async plucky plugins plugins-auto plugins-multistageplumbers plurplural ply-loaderplzwrkpng-filepngload pngload-fixed pnmpocket pocket-dnspodenv point-octreepointed[pointedalternative pointedlist& pointfreeXpointfree-fancy pointful pointless-funpointless-haskellpointless-lensespointless-rewritepokepokemon-go-protobuf-typespoker poker-base poker-evalpokitdokpolarpolar-configfile polar-shader polh-lexicon policemanpolimorfpoll polling-cachepoly% poly-arity poly-cont poly-controlpoly-rec polyToMonoidpolydata polydata-corepolymappolynom polynomial polynomial-algebrapolynomials-bernstein polyparseopolysemypolysemy-RandomFupolysemy-checkpolysemy-chronos polysemy-conc*polysemy-extra polysemy-fs polysemy-fskvstore polysemy-httppolysemy-keyed-statepolysemy-kvstore polysemy-kvstore-jsonfile polysemy-logpolysemy-log-copolysemy-log-dipolysemy-managedpolysemy-methodologypolysemy-methodology-co-logpolysemy-methodology-compositepolysemy-mockspolysemy-optics polysemy-pathpolysemy-pluginCpolysemy-process#polysemy-readline polysemy-reqpolysemy-resume"polysemy-scoped-fspolysemy-several polysemy-socket polysemy-test polysemy-timepolysemy-uncontrolled polysemy-videopolysemy-vinylpolysemy-webserver polysemy-zoopolyseqpolysoup polytypeablepolytypeable-utils polyvariadic pomaps pomodoropomohoroponder pong-serverpontarius-mediaserverpontarius-xmpppontarius-xmpp-extraspontarius-xpmnponypool pool-conduit pooled-io pop3-clientpopenhspopkeypopplerpopulate-setup-exe-cacheporcupine-coreporcupine-http porcupine-s3porpoise port-utilsportable-linesportable-template-haskell-lensportager portaudioporteporterportray portray-diffportray-diff-hunitportray-diff-quickcheckportray-prettyportray-prettyprinter ports ports-toolsposposableposeidonposeidon-postgispositpositivepositron posix-acl posix-api)posix-error-codes posix-escapeposix-filelock posix-paths posix-ptyposix-realtime posix-socket posix-timer posix-waitpidposplyupossiblepossibly post-mess-age postcodespostgres-embeddedpostgres-options postgres-tmppostgres-websocketspostgresql-binaryypostgresql-commonpostgresql-common-persistentpostgresql-configpostgresql-connectorpostgresql-copy-escapepostgresql-cubepostgresql-error-codespostgresql-libpqkpostgresql-libpq-notify postgresql-lo-streampostgresql-ltreepostgresql-migrationpostgresql-namedpostgresql-orm postgresql-placeholder-converterpostgresql-purepostgresql-querypostgresql-replicantpostgresql-resilientpostgresql-schemapostgresql-simplepostgresql-simple-bind postgresql-simple-interpolatepostgresql-simple-ltreepostgresql-simple-migrationpostgresql-simple-namedpostgresql-simple-optspostgresql-simple-queue postgresql-simple-soppostgresql-simple-typedpostgresql-simple-url postgresql-syntaxHpostgresql-transactional postgresql-txpostgresql-tx-monad-logger postgresql-tx-querypostgresql-tx-simplepostgresql-tx-squeal"postgresql-tx-squeal-compat-simplepostgresql-typedpostgresql-typed-lifted postgrest postgrest-wspostiepostmarkpostmark-streams postmaster potato-toolpotoki potoki-cerealpotoki-conduit potoki-core potoki-hasql potoki-zlibpotracepotrace-diagramspowerdns powermatepowerpc powerqueue powerqueue-distributedpowerqueue-levelmempowerqueue-sqsppmpprecordpptablepqcpqueue pqueue-mtl practice-roompragludepragmatic-showprairiepreambleprecis precursorpred-set pred-triepredicate-classpredicate-transformerspredicate-typed predicates predictiveprednote prednote-testprefetchprefix-expression prefix-unitspreforkpregameprelate preliminariesprelude-compat prelude-edslprelude-extrasprelude-generalize prelude-plus prelude-primeprelude-safeenum prelude2010 preludepluspreprocess-haskell preprocessorpreprocessor-toolspreql presburgerpresentpress presto-hdbc prettifypretty: pretty-class pretty-compact pretty-diff pretty-display pretty-error pretty-ghci pretty-hex: pretty-html pretty-loc pretty-ncolspretty-relative-time pretty-showvpretty-show-ansi-wl pretty-simple= pretty-soppretty-terminal' pretty-tree pretty-types prettyFunctionComposing prettyclass" prettyprinterprettyprinter-ansi-terminal{prettyprinter-combinators (prettyprinter-compat-annotated-wl-pprint #prettyprinter-compat-ansi-wl-pprint prettyprinter-compat-wl-pprint$prettyprinter-convert-ansi-wl-pprintprettyprinter-graphvizprettyprinter-interpprettyprinter-lucidprettyprinter-vtypreviewprim prim-arrayprim-instancesprim-ref prim-spoon prim-uniq1primal primal-memoryprime primecountprimesE primes-type primesieve primitivecprimitive-addrFprimitive-atomicprimitive-checked primitive-containers primitive-convenienceprimitive-extrasprimitive-foreignprimitive-indexedprimitive-maybeprimitive-offset7primitive-primvarprimitive-simdprimitive-sortprimitive-stablenameprimitive-unaligned+primitive-unliftedt primula-board primula-botprimus pringletonsprint-console-colors print-debugger print-info printcess printf-mauke printf-safeprints printxosdpriority-queue priority-sync private-hackage-uploaderprivileged-concurrencyprizm pro-abstract pro-sourceprobprob-fx probabilityprobableprocproc-netprocess}process-conduit process-extraseprocess-iterioprocess-leksahprocess-listlikeprocess-progress process-qqprocess-sequentialprocess-streaming processingprocessing-for-haskell processmemoryprocessor-creative-kitprocexprocrastinating-structureprocrastinating-variableprocstatproctest producerproductproduct-isomorphic product-profunctors(prof-flamegraphprof2dot prof2pretty profiterole profiteurprofunctor-arrowsprofunctor-extras profunctor-miscprofunctor-monadprofunctor-optics profunctorsprogramprogressprogress-meterprogress-reporting progressbar progression progressiveproj4-hs-bindings project-forge project-m36project-templateG projectile projection projectroot prolensprolog prolog-graphprolog-graph-libprologueprolude prometheusjprometheus-client(prometheus-effectprometheus-metrics-ghc,prometheus-procprometheus-wai-middleware promisepromisesprompt pronounce proof-assistant-bot proof-combinators prop-unitpropane propeller propellor propertiesproperty property-listproplangpropsprosidyprosidycprospect prosper proteaaudio proteaaudio-sdlproteome proto-lensaproto-lens-arbitrary proto-lens-combinatorsproto-lens-descriptorsproto-lens-jsonpb proto-lens-optparseproto-lens-protobuf-types proto-lens-protoc7proto-lens-runtimeKproto-lens-setup) proto3-suite proto3-wire3protobufprotobuf-builderprotobuf-nativeprotobuf-simpleprotocolprotocol-buffersprotocol-buffers-descriptor protocol-buffers-descriptor-forkprotocol-buffers-forkprotocol-radiusprotocol-radius-test protoludeprotolude-liftedprotonproton-haskell prototypeprove-everywhere-server provenience proxiedproxyproxy-kindness proxy-mapping prune-juice psc-idepseudo-boolean pseudo-trie pseudomacrospsipsql psql-helpers psql-utilspsqueuesypstemmerpsxptera ptera-coreptera-thpthreadptr+ ptr-poker!ptrdiffpub publicsuffixpublicsuffixlist publicsuffixlistcreatepublishpubnubpubsub puffytoolspugixml pugs-DrIFT pugs-HsSyck pugs-compat pugs-hsregexpulse pulse-simple pulseaudiopunktpunycodepuppetresourcespure-cdbpure-fftpure-iopure-priority-queuepure-priority-queue-tests pure-shuffle pure-zlibpureMD5;purebred-emailpurenixpurescheme-wai-routing-core purescriptfpurescript-astpurescript-bridgepurescript-bundle-fastpurescript-cst purescript-isopurescript-tsd-genpursuit-clientpurviewpush-notifications push-notifypush-notify-apnpush-notify-ccspush-notify-general pushbulletpushbullet-typespusher-haskellpusher-http-haskell pusher-wspushmepushover putlenses puzzle-drawpuzzle-draw-cmdlinepvar"pvdpvectorpvss pwstore-cli pwstore-fast,pwstore-purehaskell pxsl-toolspyffipyfi python-pickleq4c12-twofingerqbeqc-oi-testgeneratorqchas qdqd-vecqedqhsqhull qhull-simpleqifqlinearqm-interpolated-string qnap-decrypt qq-literalsqr qr-imager qr-repaqrcode qrcode-coreqrcode-juicypixelsqsemqt qtah-cpp-qt5 qtah-examplesqtah-generatorqtah-qt5 quackquadratic-irrationalqualified-imports-plugin quandl-apiquantfinquantification quantities quantizer quantum-arrowquantum-random quarantimerqudb quenya-verb queryparserqueryparser-demoqueryparser-hivequeryparser-prestoqueryparser-verticaquerystring-pickle questionerqueue queue-sheet queuelike quibble-corequicquick-generator quick-schema quickbench quickbooksquickcheck-arbitrary-adt=quickcheck-arbitrary-templatequickcheck-assertionsquickcheck-classesKquickcheck-classes-baseMquickcheck-combinators quickcheck-dynamicquickcheck-enum-instancesquickcheck-higherorderquickcheck-instances quickcheck-io[quickcheck-lockstepquickcheck-monoid-subclasses)quickcheck-polyquickcheck-properties quickcheck-property-combquickcheck-property-monadquickcheck-quid#quickcheck-regexquickcheck-relaxngquickcheck-rematchquickcheck-reportquickcheck-scriptquickcheck-simplequickcheck-specialquickcheck-state-machine+$quickcheck-state-machine-distributedquickcheck-string-randomquickcheck-text,quickcheck-transformerquickcheck-unicode1quickcheck-webdriverquickcheck-with-counterexamples quickjs-hsquicklz quickpull quickselectquicksetquickson quickspec quickterm quicktest quickwebappquietPquipperquipper-algorithms quipper-all quipper-cabal quipper-core quipper-demosquipper-languagequipper-librariesquipper-rendering quipper-tools quipper-utilsquiver quiver-binaryquiver-bytestring quiver-cell quiver-csv quiver-enumerator quiver-groups quiver-httpquiver-instancesquiver-interleave quiver-sortquokka quoridor-hs quote-quotquotetqux-r-glpk-phonetic-languages-ukrainian-durationsr3x-haskell-sdkraaz rabocsv2qifradradian radiumradium-formula-parser radiusradix radix-tree radixtree rados-haskellraftrail-compiler-editor rails-sessionrainbow rainbow-testsrainboxrakeraketkarakhanarakuten ralyral-lens ral-opticsralistrallodramlrampartramus rand-varsrandfilerandorandomCrandom-access-filerandom-access-listrandom-bytestring random-class random-derive random-eff random-effin random-extras random-fu<random-fu-multivariaterandom-hypergeometric random-namesrandom-shuffleX random-source random-stream random-string random-strings random-treerandom-variates randomgenrandproc randsolidrange#range-set-list range-space ranged-listrangemin rangesrangeset rank-product rank1dynamic rank2classes#rapid rapid-term rasarasa-example-config rasa-ext-bufs rasa-ext-cmdrasa-ext-cursorsrasa-ext-files rasa-ext-loggerrasa-ext-slaterasa-ext-status-barrasa-ext-stylerasa-ext-views rasa-ext-vimrascalrasterific-svg rate-limit-ratel ratel-wai ratelimiterrating-chgk-info rating-systems ratio-int rational-listrattle rattletrap0 raven-haskellraven-haskell-scotty raw-feldsparraw-strings-qqH rawfilepathrawr rawstring-qm raylib-imguirazrazom-text-util rbpcp-apirbrrbstrcrclientrcu rdfrdf4h!rdiohrdtsc rdtsc-enolanre2 react-fluxreact-flux-servant react-haskell react-tutorial-haskell-serverreaction-logicreactive reactive-baconreactive-balsa reactive-bananareactive-banana-automationreactive-banana-bunchreactive-banana-gi-gtkreactive-banana-sdlreactive-banana-sdl2reactive-banana-threepennyreactive-banana-wxreactive-fieldtrip reactive-glutreactive-haskell reactive-io reactive-jackreactive-midyimreactive-thread reactivityreactor read-bounded read-ctags read-editor read-env-varread-io readabilityreadableKreadcsv reader-soupreadlinereadline-in-other-wordsreadline-statevar readme-lhsreadpycreadshp real-day-endreally-simple-xml-parserrealworldhaskell reanimate reanimate-svg reason-exportreasonable-lensreasonable-operationalrebase+ rebindablerec-defrec-smallarray recaptcha(recommender-alsrecord record-aeson record-dot-preprocessorS record-encode record-glrecord-hasfield- record-implrecord-operationsrecord-preprocessor record-syntaxrecord-wranglerrecords records-sop records-th recover-rtti recursionrecursion-schemesrecursion-schemes-extrecursion-schemes-ixrecursive-line-countrecursive-zipper recursorsrecvcred-black-recordred-black-tree redHandlersredact reddit reddit-scrape redesigned-carnivalredis redis-globredis-hsredis-io redis-job-queue redis-resp redis-schema redis-simplerediscaching-haxlredlandredoreduce-equationsreducersI reedsolomonreenactreexport-crypto-randomref ref-extrasref-fd ref-mtlref-tfQrefactsrefcount reference references refhrefined?refined-http-api-data refined-withrefineryB reflectionxreflection-extrasreflection-without-remorsereflexUreflex-animationreflex-backend-socketreflex-backend-waireflex-basic-host reflex-domreflex-dom-acereflex-dom-colonnadereflex-dom-contribreflex-dom-core!reflex-dom-fragment-shader-canvasreflex-dom-helpersreflex-dom-ionicreflex-dom-pandocreflex-dom-retractablereflex-dom-svg reflex-dom-threflex-dynamic-containersreflex-external-refreflex-fsnotifyreflex-gadt-api reflex-ghci reflex-gi-gtk reflex-glossreflex-gloss-scene reflex-jsxreflex-libtelnetreflex-localizereflex-localize-domreflex-monad-authreflex-orphansreflex-process reflex-sdl2reflex-test-hostreflex-transformers reflex-vty"reform reform-blaze reform-hamletreform-happstack reform-hsp reform-lucidreformat refractorrefreshtreftyrefurb reg-allocreg-alloc-graph-colorreg-alloc-typesregex7regex-applicative4regex-applicative-text regex-base regex-compat`regex-compat-tdfa regex-deriv regex-dfaregex-do regex-easyregex-examplesregex-generator regex-genex regex-parsec regex-pcre:regex-pcre-builtin]regex-pcre-text regex-pderiv regex-posixregex-posix-clib>regex-posix-unittest regex-rure regex-tdfaregex-tdfa-pipesregex-tdfa-quasiquoter regex-tdfa-rcregex-tdfa-textregex-tdfa-unittestregex-tdfa-utf8 regex-tre regex-typeregex-with-pcre regex-wrapperregex-xmlschema regexchar regexdot regexp-triesregexpr regexpr-symbolicregexqqregional-pointers regionsregions-monadsfdregions-monadstf regions-mtlregister-machine-typelevelregistry'registry-aesonregistry-hedgehogregistry-hedgehog-aesonregistry-messagepackregistry-optionsregressregression-simpleregularregular-extras regular-webregular-xmlpicklerreheatrehooreireified-records reifyreinterpret-castrel8relacionrelapse relationrelational-postgresql8relational-queryrelational-query-HDBC relational-query-postgresql-purerelational-recordrelational-record-examplesrelational-schemas relative-datereleaser relevant-time reliable-io relitreloadrelotoreluderemarkremarksrematch rematch-textremoteremote-debugger remote-jsonremote-json-clientremote-json-server remote-monadremotion render-utf8 renderable reord reorder-expression reorderablerepaArepa-algorithms repa-array repa-bytestring repa-convert repa-devil repa-eval repa-examples repa-fftw repa-flowrepa-iorepa-linear-algebra repa-plugin repa-scalar repa-series repa-sndfile repa-stream repa-v4l2repl repl-toolkit replace-attoparsecreplace-megaparsecreplica replicantreplinehrepo-based-blogrepr repr-tree-sybrepresentable-functors representable-profunctorsrepresentable-tries reprinter reprojectreq req-conduit req-oauth2 req-url-extra reqcatcherrequest request-monadrequire requirements rerererebase)reroute=rescuereserve reservoirresin resistor-cuberesolvgresolveresolve-trivial-conflictsresource-effectresource-embed resource-poolresource-pool-catchioresource-pool-fork-avanov resource-pool-monadresource-simple resourcetresourcet-effectfulresourcet-poolrespond rest-client rest-core rest-example rest-genrest-happstack rest-rewrite rest-snaprest-stringmap rest-types rest-wai restartable restful-snap restless-git restricted-workers restyleresultresumable-exceptionsret rethinkdbrethinkdb-client-driverrethinkdb-modelrethinkdb-wereHamster retrie retroclash-libretroclash-simretryretry-effectfulretryer rev-state revdectime reverse-applyreverse-argumentsreverse-geocoding reverse-listreversirewriterewrite-inspector rewritingrex rezoomrfc rfc-envrfc-http-client rfc-preluderfc-psql rfc-redis rfc-servantrfc1413-server rfc1413-typesrfc1751rfc3339rfc50510rg rgb-color-model rhbzqueryrhine rhine-glossrhine-terminal rhythm-game-tutorialriak$ riak-protobufriak-protobuf-lensribrib-coreribbitribosome ribosome-app ribosome-hostribosome-host-test ribosome-root ribosome-test richreportsridley ridley-extras riemannriff rigel-viz ring-buffer ring-buffersringsriokrio-app rio-orphans;rio-prettyprintrio-process-poolriotrippleripple-federationrisc-vrisc386 riscv-isarisonriversrivetrivet-adaptor-postgresql rivet-autoimporter rivet-core rivet-migrationrivet-simple-deploy rl-sattonrlerlgluerlistrlwe-challengesrmonad rncryptor rng-utilsrobrobin roboservantrobot robots-txt roc-clusterroc-cluster-demoroc-idrockrocksdb-haskell rocksdb-haskell-jprupp rocksdb-query roguestarroguestar-engine roguestar-gl roguestar-glutroku-apirolesrollbar rollbar-cli rollbar-client rollbar-hs rollbar-wai rollbar-yesod roller rolling-queueroman-numerals romkanronron-rdt ron-schema ron-storagerootsroperope-utf16-splay<rosarose rose-trees rose-trierosebud rosezipper"roshaskrosmsg rosmsg-binrospkgrossorot13 rotating-log roundRobinrounded rounded-hw rounding roundtriproundtrip-aesonroundtrip-string roundtrip-xmlroute-generatorroute-planningrow row-types0row-types-aesonrow-types-barbiesrowdy rowdy-yesod rowrecordrp-treerpc rpc-frameworkrpfrpmrpm-nvrrpmbuild-order rrb-vector rrulersagl rsagl-frp rsagl-mathrsetrspprssH rss-conduitkrss2ircrstreamrtcmrtldrtlsdr rtnetlink rtorrent-rpcrtorrent-state rts-loader rubberband ruby-marshal ruby-qqruffruinruler ruler-corerun-haskell-modulerun-st, rungekutta rungekutta2runghc runhsrunmanyrunmemoruntime-arbitraryruntime-instancesrustlsrvrvar/rwlockrwsrz-pipes-cargot6s-cargot-letbind s-expression s3-signer safea safe-access safe-buffer-monad safe-coercesafe-coloured-textsafe-coloured-text-gen safe-coloured-text-layout safe-coloured-text-layout-gen safe-coloured-text-terminfo safe-coupling safe-decimalsafe-exceptionssafe-exceptions-checked safe-failure safe-failure-cme safe-foldable safe-freeze safe-globals safe-json safe-lazy-io safe-length safe-money<safe-money-aesonsafe-money-cerealsafe-money-serialisesafe-money-storesafe-money-xmlbf safe-numeric safe-plugins safe-printf safe-tensorsafe-wild-cardssafecopyAsafecopy-migratesafecopy-storesafeint safeiosafepathsafer-file-handlessafer-file-handles-bytestringsafer-file-handles-text saferoute sai-shape-sybsajsonsaksakuraio-platformsalak salak-toml salak-yamlsaltineIsaltine-quickchecksalvesalvia salvia-demo salvia-extrassalvia-protocolsalvia-sessionssalvia-websocket sample-framesample-frame-np samplingsamtools samtools-conduitsamtools-enumerator samtools-iterateesandi?sandlibsandmansandwichsandwich-hedgehog sandwich-quickcheck sandwich-slack sandwich-webdriver sarasvatisarif sarsisaslsat sat-micro-hssatchmosatchmo-backendssatchmo-examplessatchmo-funsatsatchmo-minisatsatchmo-toysatsatyrossauronsavagesaxsayQ say-my-namesayablesbpsbp2udpsbv8 sbvPlugin sc2-lowlevel sc2-proto sc2-supportsc2hssc3-rduscalable-serverscale scaleimage scalendar scalp-webhooksscalpel$ scalpel-core-scalpel-searchscan scan-metadatascan-vector-machinescanfscanner2scanner-attoparsecscatscc scenegraphscgischedevrschedule schedule-planner scheduler- scheduling schedyieldschemaschemas schematicscholdocscholdoc-citeprocscholdoc-texmathscholdoc-typesschonfinkeling sci-ratio scidb-hqueryscience-constantsscience-constants-dimensional scientificscientific-notation scientist scion scion-browser scons2dotscope scope-cairoscottishscotty~scotty-binding-play scotty-blaze scotty-cookie scotty-fay scotty-form scotty-formatscotty-hastache scotty-haxlscotty-params-parserscotty-path-normalizerscotty-resource scotty-restscotty-session scotty-tls scotty-utils scotty-view scp-streams scrabble-bot scrapbookscrapbook-corescrape-changesscreenshot-to-clipboard script-monad scrobblescroll scroll-listscryptLscrz scubaturescuttlebutt-typesscythe scyther-proof sde-solver sdf2p1-parsersdl-try-driverssdl2] sdl2-cairo sdl2-cairo-image sdl2-compositorsdl2-fpssdl2-gfx sdl2-image sdl2-mixer sdl2-spritesdl2-ttf0sdnvsdp sdp-binary sdp-deepseq sdp-hashablesdp-iosdp-quickchecksdp4bytestringsdp4text sdp4unordered sdp4vectorsdrseacatseakaleseakale-postgresql seakale-tests seal-modulesearchsearch-algorithms8secsecdsecdhseclibsecond-transfer secp256k1secp256k1-haskell]secp256k1-legacy secret-santasecret-sharing secrm secure-memorysecure-sockets secureUDP securemem8 sednaDBXML seitz-symbolselda" selda-jsonselda-postgresql selda-sqliteselect selections selective selectorsseleniumselenium-server self-extract selfrestartselinux semanticsemantic-sourcesemaphore-plussemdocsemi-iso semialignsemialign-extrassemialign-indexedsemialign-optics semibounded-latticessemigroupoid-extras semigroupoidssemigroupoids-dosemigroupoids-syntax semigroupssemigroups-actions semilatticessemiring semiring-num semiring-simple semiringsVsemver) semver-rangesendfile9sendgrid-haskell sendgrid-v3sensei sensenet sensu-run sentence-jpsentiwordnet-parser sentrysenzaseocheckseonbi separated seqaid seqalignseqid seqid-streamsseqlocseqloc-datafiles sequencesequence-formats sequenceTools sequent-coresequential-indexsequorserfserialserial-test-generators serialiseserialise-uuidserialize-instances serialport serokell-util serpentineservserv-waiservant servant-JuicyPixels servant-aeson-specs servant-authservant-auth-clientservant-auth-cookieservant-auth-docsservant-auth-hmacservant-auth-server%servant-auth-swaggerservant-auth-tokenservant-auth-token-acidservant-auth-token-api servant-auth-token-leveldbservant-auth-token-persistent servant-auth-token-rocksdbservant-auth-wordpress servant-avroservant-benchmark servant-blazeCservant-cassavaservant-checked-exceptionsservant-checked-exceptions-core servant-cliservant-clientservant-client-coreservant-client-jsservant-client-namedargsservant-conduitservant-csharp servant-dbservant-db-postgresql servant-dhall servant-docseservant-docs-simple servant-ede servant-ekg servant-elmservant-errorsservant-event-streamservant-examplesservant-exceptionsservant-exceptions-serverservant-fiat-contentservant-flattenservant-foreign; servant-gdpservant-generateservant-genericservant-githubservant-github-webhookservant-haxl-clientservant-hmac-auth servant-htmxservant-http-streamsservant-http2-clientservant-iCalendarservant-jquery servant-jsservant-jsonrpcservant-jsonrpc-clientservant-jsonrpc-serverservant-kotlin servant-lucid7servant-machines servant-match servant-matrix-param servant-mockservant-multipartDservant-multipart-apiAservant-multipart-client@ servant-namedservant-namedargs servant-nixservant-oauth2servant-oauth2-examplesservant-openapi3servant-options-servant-paginationservant-pandoc servant-pipesservant-polysemy servant-poolservant-postgresqlservant-proto-lensservant-purescriptservant-pushbullet-client servant-pyservant-quickcheck servant-rate-limit servant-rawmservant-rawm-client servant-rawm-docs servant-rawm-server servant-reasonservant-reflexservant-responseservant-router servant-rubyservant-scotty servant-seo servant-serfservant-serverservant-server-namedargsservant-smsc-ru servant-snap servant-stacheservant-static-thservant-streamingservant-streaming-clientservant-streaming-docs servant-streaming-server servant-streamlyservant-subscriber servant-swaggerIservant-swagger-tagsservant-swagger-uiservant-swagger-ui-core;servant-swagger-ui-jensolegservant-swagger-ui-redocservant-to-elmservant-tracingservant-typed-errorservant-typescript servant-utilservant-util-beam-pgservant-validateservant-waargonaut servant-wasmservant-websockets1 servant-xml servant-xstatic servant-yaml servant-zeppelinservant-zeppelin-clientservant-zeppelin-serverservant-zeppelin-swaggerserver-generic serverless-haskell serversession serversession-backend-acid-state serversession-backend-persistentserversession-backend-redis serversession-frontend-snapserversession-frontend-wai serversession-frontend-yesodservices servietteserviusses-html ses-html-snapletsessions sessiontypessessiontypes-distributed set-cover set-extra set-monadset-of set-withsetdownsetenv]setgame setlocalepsetoidsetopsetopssetssetterssettingssexp sexp-grammar sexp-showsexpr sexpr-parser sexpressosext sfml-audiosfmt sfnt2woffsgdsgfsgrepsh2md sha-streamssha-validationsha1shadeshadower shadowsocks shady-genshady-graphicsshakeG shake-ats shake-bench shake-bindistshake-c shake-cabalshake-cabal-build shake-ccjs shake-dhall shake-elm shake-ext shake-extras shake-futharkshake-google-closure-compilershake-language-cshake-literate shake-minifyshake-minify-css shake-pack shake-path shake-persist shake-plusshake-plus-extended shakebook shakershakers shakespeareshakespeare-babelshakespeare-css shakespeare-i18n shakespeare-jsshakespeare-sass shakespeare-textshana shannon-fano shapefile shapely-datashapes shapes-demo shapes-math sharc-timbre shared-buffer shared-fields shared-memorysharedioshesheetsshelduck shell-conduit shell-escape$ shell-monad shell-pipe shell-utility shellish shellmateshellmate-extras shellmetshelloutshelltestrunner shellwords"shelly shelly-extrashentongshh shh-extrasshiftshikensushimmer shine shine-examples shine-varying shivers-cfgshoapshopify short-vecshort-vec-lensshortbytestring shortcircuitshortcutshortcut-linksshorten-stringsshould-not-typecheck/showshow-combinatorsO show-pleaseshow-prettyprint show-typeshowdown shower&shpidershplitshqqshuffle shunya-library shunyalibshwiftysi-clocksibesievesifflet sifflet-libsiggy-chardust sigma-ijsignsignablesignable-haskell-protocsignalsignal-messaging-dbussignals signaturesigned-multisetsignificant-figures signify-hssilently silkscreensilvisimdsimfinsimgisimple simple-actorssimple-affine-space6 simple-amount simple-atomsimple-bluetoothsimple-c-value simple-cabal simple-cmdsimple-cmd-argssimple-conduit simple-config simple-csssimple-downloadsimple-effectssimple-enumeration simple-evalsimple-firewire simple-form simple-genetic-algorithmsimple-genetic-algorithm-mrsimple-get-opt, simple-index simple-logsimple-log-syslog simple-logger/simple-logging simple-ltlsimple-media-timestamp !simple-media-timestamp-attoparsec !simple-media-timestamp-formatting simple-moneysimple-neural-networks simple-nixsimple-observer simple-parser simple-pascal simple-pipesimple-postgresql-ormsimple-reflect( simple-ropesimple-sendfilea simple-serversimple-sessionsimple-sessions simple-smt3simple-sql-parsersimple-src-utilssimple-stacked-vmsimple-tabular simple-tarsimple-templatessimple-text-format simple-ui simple-units simple-vec3 simple-zipper simpleargs simpleconfig simpleirc simpleirc-lens simplelru simplemesh simplenote simplepreludesimplesmtpclient simplessh simplest-sqlite simplex simplex-basicsimplex-method simplexmqsimplistic-genericssimpoolesimseq simtreelosince sindre single-tuple singlethongssingleton-boolsingleton-dictsingleton-nats singleton-typelits singletonssingletons-base4singletons-presburger singletons-thBsingnal singular-factorysink sintsiphashsiphon siren-jsonsirkelsitemap sitemap-gensitepipesixelsixfiguregroupsixty-five-oh-two size-basedCsized sized-grid sized-types sized-vector sized-wrappersized-wrapper-aesonsized-wrapper-quickchecksized-wrapper-textsizes sjspskein5 skeletal-setskeleton skeletons skellskemmtunsketch-frp-copilot skew-list skews skip-listskip-varskulkskylark-client skylightingskylighting-coreskylighting-extensionsskylighting-format-ansiHskylighting-format-blaze-htmlskylighting-format-context~skylighting-format-latexTskylighting-lucidskylighting-moddingskype4hsskypelogexportslack slack-api slack-notify-haskellslack-progressbar slack-verify slack-web?slate slave-threadsleep slice-cpp-gen sliceofpyslick slidemewsslimslip32slist:sloane slope-field slot-lambdaslothslotmapslugslugger slugifyslynx small-bytearray-builder smallarray smallcaps smallcheckesmallcheck-kind-genericssmallcheck-lawssmallcheck-lenssmallcheck-series smallpt-hs smallstringsmaoinsmap smartGroup smartchecksmartconstructorsmarties smartwordsmash smash-aeson smash-lenssmash-microlens smash-opticssmawksmcdel sme smerdyakovsmilessmith smith-cli smith-clientsmoothie smsaero smtsmt-lib smt2-parsersmtLib smtlib-backendssmtlib-backends-processsmtlib-backends-tests smtlib-backends-z3smtlib2 smtlib2-debug smtlib2-pipe smtlib2-quickchecksmtlib2-timing smtp-mail, smtp-mail-ng smtp2mta smtpbz smtps-gmailsmuggler smuggler2snacksnake snake-gamesnap snap-acceptsnap-app snap-auth-cli snap-blaze6snap-blaze-claysnap-configuration-utilities snap-core snap-corssnap-elmsnap-error-collector snap-extras snap-language snap-loader-dynamicsnap-loader-staticsnap-predicates snap-routes snap-serverp snap-streamsnap-templates snap-testing snap-utilssnap-web-routes snaplet-acid-statesnaplet-actionlog snaplet-amqpsnaplet-auth-acidsnaplet-coffeesnaplet-css-minsnaplet-customauthsnaplet-environments snaplet-fay snaplet-ghcjs snaplet-hasql snaplet-haxl snaplet-hdbcsnaplet-hslogger snaplet-i18nsnaplet-influxdb snaplet-lsssnaplet-mandrillsnaplet-mongoDBsnaplet-mongodb-minimalisticsnaplet-mysql-simple snaplet-oauthsnaplet-persistentsnaplet-postgresql-simplesnaplet-postmarksnaplet-purescriptsnaplet-recaptcha snaplet-redissnaplet-redson snaplet-rest snaplet-riak snaplet-sasssnaplet-scoped-session snaplet-sedna snaplet-ses-htmlsnaplet-sqlite-simplesnaplet-sqlite-simple-jwt-authsnaplet-stripe snaplet-taskssnaplet-typed-sessionssnaplet-wordpresssnappy snappy-conduit snappy-framingsnappy-iteratee snappy-lazysndfile-enumerators sneakytermsneathlane-haste snipchecksnippet-extractorsnmsnmpsnorkels snow-whitesnowball snowchecked- snowflake snowflake-core snowflake-server snowglobe snowtifysnumbersoap soap-openssl soap-tls sock2streamsockaddrsocketsocket-activation socket-icmp socket-io socket-sctp socket-unixsocketedsocketiosockets sockets-and-pipes socketsonsocks`sodiumsoegtk softfloat-hssolana-staking-csvssolarsolga solga-swaggersolrsolvesomsome some-dict-ofsonic-visualisersop-coresophiasort%sort-by-pinyinsorted sorted-listbsorteesortingsorty souffle-dslsouffle-haskell sound-collage sounddelaysoundgensource-code-serversource-constraints sourcemap!sousitsoxsoxlibsoyuzspace spacechar spacecookie spacefill spacepart spaceprobespadespake2 spanoutsparklesparql-protocolsparrow sparssparsesparse-lin-algsparse-linear-algebrasparse-merkle-trees sparse-tensor sparsebit sparsechecksparser spartaconspata spatial-mathspatial-rotationsspawnspdxV spdx-licensespespecial-functors special-keysspecial-values specialize-thspecies spectaclespectral-clustering speculate speculationspeculation-transformers speechmatics speedy-slicespelling-suggest sphericalspherosphinx sphinx-cli sphinxescspicespikespinespir-vspirosspirv-reflect-ffispirv-reflect-typesspirv-reflect-yamlsplay splaytreesplicespline3 splinessplintsplit split-channelsplit-morphism split-record split-tchansplitmixsplitmix-distributions splittersplotspookyspoolspoon spoonutilsporkspoty spreadsheet sprinklesspritzsproxy sproxy-websproxy2spsaspy sql-simplesql-simple-mysqlsql-simple-poolsql-simple-postgresqlsql-simple-sqlite sql-words sqlcipher sqlcli sqlcli-odbc sqlite sqlite-easy sqlite-simplesqlite-simple-errorssqlite-simple-interpolatesqlite-simple-typed sqlvalue-list sqsd-localsquaressqueal-postgresql squeal-postgresql-ltree squeal-postgresql-uuid-ossp squeathersqueezesr-extrasrcinstsrclocSsrecsrtsrt-attoparsec srt-dhallsrt-formattingsrvsscansscgisscriptsshssh-known-hosts ssh-tunnel sshd-lintsshtunssspsstablessvst2 stable-heap stable-mapsstable-marriage stable-memo stable-treestache stack stack-all stack-bump stack-clean-old stack-fixstack-hpc-coveralls stack-lib stack-network stack-prism stack-runstack-run-auto stack-tagstack-templatizer stack-type stack-wrapper stack-yaml stack2cabal stack2nixstackagestackage-build-planstackage-cabal stackage-cli stackage-curator stackage-installstackage-metadata stackage-querystackage-sandboxstackage-setupstackage-to-hackagestackage-typesstackage-updatestackage-upload stackage2nixstackcollapse-ghcstackctl= stacked-dagstaf staged-ggstagen stan+standalone-derive-topdown standalone-haddockstar star-to-starstar-to-star-contrastarling starrover2 starterstashstate state-bag state-codes state-plus state-record stateWriter statechart stateful-mtlstateref statestack statethreadstatgrabstatic static-canvas static-closure static-hashstatic-resources static-tensor static-text staticanalysis statisticststatistics-dirichletstatistics-fusion statistics-hypergeometric-genvarstatistics-linregYstatistics-skinnystatsstatsd statsd-clientstatsd-datadogstatsdistatus-notifier-itemstatvfs staversion stb-imagestb-image-redux stb-truetypestc-langstdstdatastdcxxstdfstdio steambrowser steeloverseer stego-uuidstemmerstemmer-german step-functionstepwise stern-brocotstgistickyKeysHotKeystitch stm3 stm-actorstm-channelize stm-chans{stm-chunked-queues stm-conduit(stm-containersX stm-delay, stm-extras stm-firehosestm-hamtzstm-incremental stm-io-hooks stm-liftedstm-linkedlist stm-orelse-io stm-promise stm-queuestm-queue-extras stm-sbchan stm-split stm-stats stm-supply stm-tlist stmcontrol stochasticstocks stomp-conduitstomp-patterns stomp-queuestompl stooq-api stopwatchstorable storable-complex8storable-endian' storable-enumstorable-offsetstorable-recordpstorable-static-arraystorable-tupleUstorablevector storablevector-carraystorablevector-streamfusionstore? store-core0store-streaming stpstr stratosphere stratum-toolstratux stratux-demo stratux-http stratux-typesstratux-websockets stream stream-fusion stream-monad streamdeckstreamed streamingzstreaming-attoparsecstreaming-base64streaming-benchmarksstreaming-binaryQstreaming-bracketedstreaming-brotlistreaming-bytestringstreaming-cassavastreaming-commonsMstreaming-concurrency streaming-conduitstreaming-eventsstreaming-eversion streaming-fftstreaming-histogramstreaming-lzmastreaming-nonempty streaming-osmstreaming-pcap streaming-pngstreaming-postgresql-simplestreaming-processstreaming-sortstreaming-utils: streaming-waistreaming-withstreamlystreamly-archivestreamly-binarystreamly-bytestringstreamly-cassavastreamly-examplesstreamly-fsnotify streamly-lmdb streamly-lz4streamly-posixstreamly-process streamprocstreamsstreamt strelka strelka-core strelka-waistrictg strict-basestrict-base-typesstrict-concurrencystrict-containersstrict-containers-lensstrict-containers-serialise strict-datastrict-ghc-pluginstrict-identitystrict-impl-params strict-io strict-lens strict-list strict-optics strict-tuplestrict-tuple-lens strict-types strict-wrapper strict-writer strictifystrictlystring string-classstring-combinators string-convjstring-conv-testsstring-conversionsWstring-convert string-fromtostring-interpolatestring-interpreter string-isos string-like string-qq[ string-quote string-random2string-similaritystring-transform string-typelits string-variants stringable stringbuilder, stringlike stringprepstrings stringsearchBstringtable-atom striostrip-ansi-escapestripestripe-concepts stripe-corestripe-haskell stripe-hsstripe-http-clientstripe-http-streams stripe-scottystripe-servantstripe-signature stripe-tests stripe-wreq stripeapistripsstrive strong-pathstrongswan-sql strongweak strptimestruct-inspectorstructsstructural-inductionstructural-traversal structuredstructured-cli structured-haskell-mode structured-mongoDB structuresstt stunclientstuntsstutter stylish-cabalstylish-haskellstyliststylist-traitsstylizedstyx suavemente sub-statesubGsubG-instances subcategories!subhask subleq-toolchainsublistssubmarksubnet subsamplesubstring-parsersubtitleParser subtitles subwordgraphsubzero success successors suffix-array suffixarray suffixtreesugar sugar-data sugar-json sugar-scheme sugarhaskellsuitablesum-type-boilerplatesummersummoner summoner-tuisumpsundownsunlightsunroof-compilersunroof-examplessunroof-serversuper-user-spark superbubbles superbuffer,supercollider-htsupercollider-midi superconstraintssuperdoc superevent supermonad supernovasupero superrecord supervisor supervisors supplemented supply-chainsupply-chain-core surjective suspendsv sv-cassavasv-core sv-svfactorsv2vsvfactor svg-builder^svg-builder-fork svg-icons svg-treesvg2qsvgcairosvgonesvgsymsvgutilssvmsvm-light-utils svm-simplesvndumpswagger swagger-petstore swagger-testswagger2swapperswarm swearjure sweet-egison swf swift-ldaswishswissswiss-ephemeris swisstableswitchswssxmlsyb syb-extrassyb-with-classsyb-with-class-instances-textsydtest sydtest-aeson sydtest-amqp sydtest-autodocodec sydtest-discoversydtest-hedgehog sydtest-hedis sydtest-hspec sydtest-mongo sydtest-persistentsydtest-persistent-postgresql sydtest-persistent-sqlite sydtest-process sydtest-rabbitmq sydtest-servant sydtest-typed-process sydtest-wai sydtest-webdriver sydtest-webdriver-screenshotsydtest-webdriver-yesod sydtest-yesod syfcosylviasymsym-plotsymantic symantic-atom symantic-base symantic-clisymantic-documentsymantic-grammar symantic-httpsymantic-http-clientsymantic-http-demosymantic-http-pipessymantic-http-serversymantic-http-test symantic-libsymantic-parser symantic-xmlsymbiotesymbol symbolic-linksymbols symengine symengine-hssymmetric-propertiessymmetry-operations-symbolssymonsyncsync-mhtsynchronous-channels syncthing-hssynt syntactic syntacticalsyntaxsyntax-attoparsecsyntax-examplesyntax-example-json syntax-prettysyntax-printer syntax-treessyntax-trees-fork-bairynsyntaxnet-haskell synthesizersynthesizer-alsasynthesizer-core synthesizer-dimensionalsynthesizer-filter synthesizer-inferencesynthesizer-llvmsynthesizer-midisys-auth-smbclient sys-processsysinfo system-argv0system-canonicalpathsystem-command system-error system-extra system-fileio>system-filepathO system-gpio system-infosystem-inotify system-liftedsystem-linux-proc system-localesystem-posix-redirectsystem-random-effect system-testsystem-time-monotonic system-util system-uuidsystemdTsystemd-socket-activation systemstatssyz t-regex t3-client t3-game t3-servertatabltable table-layout table-tennistableaux tables tablestoragetablizetabloidtabstabular2tacotaffybar,tag-bits tag-streamtagchup taggedt tagged-binarytagged-exception-core tagged-identity tagged-list tagged-th tagged-timerstagged-transformer taggingtaggy taggy-lens taglib taglib-api tagset-positionaltagshare tagsoup tagsoup-httagsoup-megaparsectagsoup-navigatetagsoup-parsectagsoup-selectiontagstewtagstream-conduittagtreetaitai64tailfile-hinotifytailwindtaktak-ai takahashi takedoubletakusen-oracletaltalashtamarin-provertamarin-prover-termtamarin-prover-theory tamarin-prover-utilstampertangletao tao-example tapiocatartar-bytestring tar-conduit?tardistargettarttasktask-distributiontaskelltaskpool taskwarriortasty tasty-ant-xml1 tasty-autotasty-autocollect tasty-bdd tasty-bench*tasty-checklist tasty-dejafutasty-discoverKtasty-expected-failureTtasty-fail-fast tasty-focus tasty-goldentasty-grading-systemtasty-groundhog-converterstasty-hedgehogtasty-hedgehog-coverage tasty-hslua; tasty-hspecW tasty-html tasty-hunitutasty-hunit-adaptertasty-hunit-compattasty-inspection-testing9tasty-integratetasty-jenkins-xml tasty-json tasty-kat" tasty-lawstasty-leancheck tasty-lens tasty-luaU tasty-mgolden tasty-prelude tasty-programtasty-quickchecktasty-quickcheck-laws tasty-rerun< tasty-silver6tasty-smallcheckL tasty-stats tasty-sugar tasty-taptasty-test-reportertasty-test-vectortasty-thL tasty-tmux tasty-travis tasty-wai tateti-tatetitautaxtbox tcache-AWStcclitce-conf tcod-haskelltconfigtcp tcp-streamstcp-streams-openssltdd-utiltdigest tdigest-Charttdlib tdlib-gen tdlib-typestdoctdsteamsteardown techlab techniqueteethteheperotelega telegram telegram-api telegram-bottelegram-bot-simple%telegram-raw-api telegram-types telegraphteleport teleshelltelltellbottemperedtempitemplate template-defaulttemplate-haskelltemplate-haskell-compat-v0208atemplate-haskell-opticstemplate-haskell-util template-hsmltemplate-toolkit template-yj templateify templatepg templatertempotempodbtemporal-csoundtemporal-media temporal-music-notationtemporal-music-notation-demotemporal-music-notation-western temporary temporary-rctemporary-resourcet tempus tempus-fugittenten-lensten-unordered-containerstensor tensor-safe tensorflowtensorflow-core-opstensorflow-loggingtensorflow-mnisttensorflow-opgentensorflow-opstensorflow-prototensorflow-recordstensorflow-records-conduittensorflow-testtensors term-rewritingtermboxtermbox-bananatermbox-bindingstermbox-bindings-c termbox-bindings-hs termbox-tea termcolorterminal terminal-progress-bar*terminal-punch terminal-size terminal-texttermination-combinatorsterminfo[ terminfo-hstermonad termplotterntupterraform-http-backend-passterrahs tersmu tesla test-fixture test-frameworkktest-framework-doctesttest-framework-goldentest-framework-hunit;test-framework-leancheck'test-framework-programtest-framework-quickcheck test-framework-quickcheck2Ctest-framework-sandboxtest-framework-skiptest-framework-smallchecktest-framework-testing-feattest-framework-thtest-framework-th-primetest-fun test-invariant test-karyatest-libtest-monad-lawstest-pkg test-sandbox test-sandbox-composetest-sandbox-hunittest-sandbox-quickcheck test-shouldbe test-simple testComtestPkg testbenchtestcontainers testing-feattesting-type-modifiers,testlooptestpack testpattern testrunnertetris tex-join-bibtex2txt texbuilder texmathC texrunnertexttext-all text-and-plots text-ansi7 text-ascii text-binary> text-builderCtext-builder-devvtext-builder-linear text-compression5text-containerstext-conversions text-cp437 text-display text-format@text-format-heavy text-format-simple text-generic-prettytext-icuwtext-icu-normalizedtext-icu-translit text-json-qq text-latin12 text-ldap text-lens text-lipstext-loctext-locale-encodingtext-manipulate{ text-markup text-metricsV text-normal text-offset text-plus text-positiontext-postgresql text-printer6text-regex-replace text-regiontext-register-machine text-render text-replace text-ropea text-short text-showytext-show-instances%text-stream-decode text-time text-trie text-utf7 text-utf8 text-utilstext-xml-generic text-xml-qq text-zipperjtext-zipper-monadtext1 textPlot textlocal textmatetags textocat-api textstextual tf-randomAtfptfp-thtftptgath-abstractionDth-alphath-bang-compat th-build th-cas th-compatth-constraint-compat th-contextth-data-compat th-desugarth-dict-discoveryth-env!th-expand-syns th-extrasth-fold th-formatth-inline-io-actionth-instance-reification th-instancesth-kinds th-kinds-forkth-lego th-letrec th-liftgth-lift-instancesth-nowq th-orphans th-pprint th-printfth-reify-compat th-reify-manysth-sccsth-strict-compat th-tc th-test-utils th-to-exp th-traced th-typegraph th-utilitiesthank-you-starsthe-sniptheatre themoviedb themplatethentos-cookie-session theoremquesttheoremquest-clientthesez these-lens these-optics these-skinny%thespiantheta-functionsthihthimkthockthornthread-hierarchythread-local-storagethread-supervisor thread-utils-contextthread-utils-finalizers threadPoolthreaded threadmanagerthreads?threads-extras threads-poolthreads-supervisor threadscope/ threefishthreepenny-editors threepenny-guiOthreepenny-gui-contextmenuthreepenny-gui-flexboxthrift thristthrottlethrottle-io-stream throttledthrottled-io-loop through-textthrowable-exceptions thumbnailthumbnail-plus thumbnail-polishthyme tianbar tibetan-utils tic-tac-toetickerticket-managementtickle tictactoe3dtidal tidal-linkk tidal-midi tidal-serial tidal-vistie-knottiempotiger tight-apply tightropetighttptikzsdtiletilingstimberctimem time-cache time-compat time-domain time-extras time-exts time-http time-interval0time-io-access time-lenstime-locale-compat[time-locale-vietnamese time-machine time-managerYtime-out* time-parsers time-patterns time-qq time-quotetime-recurrence time-seriestime-series-lib time-unitsOtime-units-types time-w3c time-warptimecalc timeconsole timeit9timelens timelesstimeless-tutorialstimeliketimelike-clock timelike-timetimemap timeout timeout-controltimeout-with-results timeparserstimeplot timeprint timer-wheel timereptimers timers-ticktimers-updatable timeseriestimespan timestamptimestamp-subprocess-lines timestamper timestats timeutilstimezone-detecttimezone-olsonDtimezone-olson-thtimezone-seriesR timezone-unixtiming-conveniencetinitinkoff-invest-sdktintintiny-scheduler tinyMeshtinyXmltinyfiledialogstinyidtinylog tinytemplatetip-haskell-frontendtip-libtiphystitantitan-debug-yampatitan-record-yampa titlecasetkhstkyproftld tldrtlex tlex-core tlex-debug tlex-encodingtlex-thtlsq tls-debug tls-extra tls-session-managerOtlynx tmapchantmapmvar tmp-postgrestmp-proc tmp-proc-exampletmp-proc-postgrestmp-proc-rabbitmqtmp-proc-redis tmp-proc-zipkintmpltntnetto to-haskellto-string-classto-string-instancestoboggantodotodos tofromxmltoilet token-bucket token-limitertoken-limiter-concurrent token-searchtokenifytokenize tokenizertokenizer-monadtokenizer-streamingtokstyle toktoktokyocabinet-haskelltokyotyrant-haskelltomato-rubato-openal toml toml-parser toml-readertoml-reader-parsetomlandZ tomlcheck tonalude tonaparsertonatonatonatona-google-server-apitonatona-loggertonatona-persistent-postgresql tonatona-persistent-sqlitetonatona-servanttoo-many-cellstoodles toolshedtoptopaztophat topkata topographAtorchtorrent4torsor'tostring$totaltotal-alternative total-map total-mapstouchedtowertoxcore toxcore-ctoxiproxy-haskell toysolvertpar tpbtpdb&tptptrace trace-calltrace-function-calltracedtracer tracetree tracingtracing-control tracked-filestrackertrackittractiontracy trade-journaltraildb trajectory trans-fx-core trans-fx-data trans-fx-io transactiontransactional-eventstransf transfer-db transformations transformerstransformers-abort transformers-basetransformers-bifunctorstransformers-compat-transformers-composetransformers-continuetransformers-converttransformers-efftransformers-eithertransformers-except]transformers-fixtransformers-freetransformers-lift transformers-runnabletransformers-supply transienttransient-universetransient-universe-tlstranslatable-intset translate translate-cli trasa trasa-client trasa-extra trasa-form trasa-reflex trasa-servertrasa-thtraversal-template traverse-codetraverse-with-class"travistravis-meta-yaml travis-pogoditrawl traypowerofftreap tree-difftree-fun tree-monadtree-render-text tree-sittertree-sitter-c-sharptree-sitter-gotree-sitter-haskelltree-sitter-javatree-sitter-jsontree-sitter-ocamltree-sitter-phptree-sitter-pythontree-sitter-qltree-sitter-rubytree-sitter-rust tree-sitter-tsxtree-sitter-typescripttree-traversals tree-viewtreefoldtreemap treemap-htmltreemap-html-toolstreersectreeseqtreeviz trektrek-apptrek-db trek-lenstremulous-querytrhsxtrial1trial-optparse-applicative3 trial-tomland, triangulation trie-simpletriestrifecta`triggertrimtrimdent trimpolyatripLL triplesec triviatrivial-constrainttropicaltropical-geometry true-name trueleveltrurl trust-chaintruthfultruthytsessiontsession-happstacktsetchan tskiplisttslibtsloggertsnetsp-viztsparsetsttsuntsuntsv2csvtsvsqltswebttaskttcttl-hashtablesttn ttn-clientttrietttool tubestuntap tuntap-simple tup-functor tuple4 tuple-appendtuple-append-instances tuple-gen tuple-generic tuple-hlist tuple-lenses tuple-morph tuple-ops tuple-soptuple-thtupleinstancestuples>tuples-homogenous-h98turingturing-machines turing-music turingMachineturkish-deasciifier turn-loopturniturtleoturtle-optionstwtwain tweaktweetwee-libtweet-hs twentefptwentefp-eventloop-graphicstwentefp-eventloop-treestwentefp-graphstwentefp-numbertwentefp-rosetreetwentefp-treestwentefp-websockets twentyseven twfy-api-clienttwhstwidge twilight-stmtwilio twilltwiml twinetwirptwistytwitch twitchapitwittertwitter-conduittwitter-enumerator twitter-feed twitter-typestwitter-types-lenstxtxt txt-sushitxt2rtftxtblktytyfam-witnessestypalyzetype type-aligned type-assertions type-booleans type-cache type-cerealtype-combinatorstype-combinators-quotetype-combinators-singletons type-compare type-digitstype-eq type-equality@type-equality-check type-errorsKtype-errors-prettytype-funtype-functions type-hintAtype-indexed-queuestype-inttype-interpretertype-iso type-leveltype-level-bsttype-level-integerstype-level-kv-listtype-level-kv-list-esqueletotype-level-kv-list-persistenttype-level-natural-number#type-level-natural-number-induction$type-level-natural-number-operationstype-level-numberstype-level-sets type-level-tf type-list type-map type-natural' type-of-htmltype-of-html-statictype-operatorstype-ordtype-ord-spine-cereal type-preludetype-reflectiontype-rig type-safe-avl type-setstype-settheory type-spec type-spinetype-structure type-sub-th type-tree type-unary typeable-mock typeable-thtypecheck-plugin-nat-simple& typed-admin typed-digitstyped-duration typed-encoding typed-encoding-encoding typed-processtyped-spreadsheet typed-streams typed-time typed-uuid typed-wire typed-wire-utils typedflow typedquerytypehashtypelet typeleveltypelevel-rewrite-rules typelevel-tensortypelits-printf typelits-witnessestypenumstypeof typeparams typerbole typerep-map types-compattypesafe-endiantypesafe-precure typescript-docstypical typograffititypography-geometry typson-beam typson-coretypson-esqueleto typson-seldatyrotz7tzdataUtztime u2fuAgda ua-parseruacpid uberuberlast ucam-webauthucam-webauth-typesucducluconvudbus udbus-modeludcodeudev udp-conduit udp-streaming ueberzuguglymemo+ uhc-lightuhc-utiluhexdumpuhttpc ui-commanduidukrainian-phonetics-basicukrainian-phonetics-basic-array*ukrainian-phonetics-basic-array-bytestringukrainian-phonetics-commonulidunaunagi-bloomfilter unagi-chan` unagi-streamsunamb unamb-custom unbelieverunboundunbound-genericsunbound-kind-genericsunbounded-delaysounbounded-delays-unitsunboxedunboxed-containers unboxed-refunboxed-referencesunboxing-vectorunbreakuncaught-exception uncertain unconstrained unescaping-printunexceptionalio unexceptionalio-trans unfix-binders unfoldable unfoldable-restrictedunforkunfree ungadtagger uni-events uni-graphsuni-htk uni-posixutil uni-reactor uni-uDrawGraph uni-util unicodeunicode-collation unicode-data0unicode-data-namesunicode-data-scriptsunicode-data-securityunicode-general-category unicode-names unicode-normalizationunicode-preludeunicode-properties unicode-show4unicode-symbolsunicode-transformsunicode-tricksunicoder unidecodeunification-fd(uniform-algebras uniform-erroruniform-fileio uniform-io uniform-pairuniform-strings uniform-time uniformBaseunion union-angle union-color union-findunion-find-array union-map unionmount unipatternsuniplatem uniprot-kb uniq-deep unique unique-lang unique-logicunique-logic-tfuniqueiduniquely-represented-setsuniqueness-periodsuniqueness-periods-generaluniqueness-periods-vector uniqueness-periods-vector-common"uniqueness-periods-vector-examples!uniqueness-periods-vector-filters!uniqueness-periods-vector-general$uniqueness-periods-vector-propertiesuniqueness-periods-vector-statsunitunit-constraint unitsunits-attoparsec units-defs units-parser unittypedunity-testresult-parser unitymunitym-servant unitym-yesod universaluniversal-binaryuniverse universe-baseyuniverse-dependent-sum universe-instances-base universe-instances-extendeduniverse-instances-transuniverse-reverse-instancesI universe-some universe-th universum2unixunix-bytestring unix-compat unix-fcntl unix-handle unix-io-extra unix-memoryunix-process-conduitunix-pty-lightunix-recursive unix-simple unix-timeunjsonunlambdaunlift unlift-stm unlifted-listunliftio6 unliftio-coreunliftio-messagebox unliftio-path unliftio-poolunliftio-streamsunlitunm-hipunmed2unordered-containersunordered-containers-rematchunordered-graphsunordered-intmap unpack-funcsunpacked-containersunpacked-eitherunpacked-maybe unpacked-maybe-numericunpacked-maybe-textunpacked-theseunpacked-validationunparse-attoparsecunroll-ghc-pluginunsafe;unsafe-promises unsafelyunsafeperformst unsatisfiable unscramble unsequential unusable-pkgunusedunwrapped-functors uom-pluginupup-grade update-monadupdate-nix-fetchgit update-repos uploadcare uploadtestupskirt urbit-airlock urbit-api urbit-hob ureaderurembeduriuri-bytestringBuri-bytestring-aeson' uri-conduit uri-encodeY uri-encoderuri-enumeratoruri-enumerator-file uri-parse uri-template uri-templaterurl# url-bytes url-decoders url-genericurl-slugurlcheck urldecodeurldisp-happstack urlencodedurlpathurn urn-randomurxml usa-holidaysusbusb-enumeratorusb-hidusb-id-database usb-iterateeusb-safe useragentsuseridusersusers-mysql-haskellusers-persistentusers-postgresql-simple users-test utcutfutf8-conversionsutf8-env utf8-light utf8-prelude utf8-stringutf8-validatorutilutil-exception util-logict util-plusutil-primitiveutil-primitive-control util-universe utility-htuu-ccouu-cco-examples uu-cco-hut-parsinguu-cco-uu-parsinglibuu-interleaved uu-options uu-parsinglibuu-tcuuagcuuagc-bootstrap uuagc-cabaluuagc-diagramsuuagduuid uuid-aeson uuid-bytes uuid-cryptouuid-le uuid-orphans uuid-quasi uuid-typesuulib uusiuvectoruvector-algorithmsuxadtuzbl-with-sourcev4l2 v4l2-examplesvabal vabal-lib vacuum vacuum-cairovacuum-graphviz vacuum-openglvacuum-ubigraphvado valid valid-namesvalida valida-basevalidatevalidate-input validated-literalsvalidated-types validation6validation-selective validations validationt validatorsvalidity@validity-aesonvalidity-bytestringvalidity-case-insensitive validity-containersvalidity-network-uri validity-pathvalidity-persistent validity-primitivevalidity-scientific validity-text validity-timevalidity-unordered-containers validity-uuid validity-vectorvalor value-supply vampirevar var-monadvaranvariable-media-fieldvariable-media-field-dhallvariable-media-field-opticsvariable-precision variablesvariadicvariadic-function variationvaryingvaultn vault-toolvault-tool-server vault-transvaultaire-commonvcache vcache-trievcardvcattvcdvcf vcs-ignore vcs-revisionvcs-web-hook-parsevcsgui vcswrapper vecvec-lens vec-opticsvect vect-floatingvect-floating-accelerate vect-opengl vectorvector-algorithms vector-binaryvector-binary-instances| vector-buffervector-builder?vector-bytes-instances vector-bytestringvector-circular vector-clockvector-conduit vector-doublezip vector-endian vector-extras vector-fft vector-fftwvector-functorlazyvector-hashtables$vector-heterogenousvector-instances@vector-instances-collections vector-mmap vector-randomvector-read-instances vector-rotcevvector-shuffling vector-sizedv vector-spaceQvector-space-map vector-space-openglvector-space-points vector-split vector-static vector-strategies vector-streamE vector-textvector-th-unbox vectortiles vega-viewvelmavenzoneverbalexpressions verbosityverdict verdict-jsonverifiable-expressionsverifyverilog verismithverset versioningversioning-servant versionsHvessel vflow-typesvformat vformat-aeson vformat-time vfr-waypointsvgrep vhdvhdlvicinityviewprofviews vigilancevimetavimus vintage-basicvinyl;vinyl-genericsvinyl-gl vinyl-json vinyl-loeb vinyl-named-sugar vinyl-operational vinyl-plus vinyl-utils vinyl-vectors virthualenv visibility visionvisual-graphrewrite visual-prof visualize-cbnvitreavivid vivid-osc vivid-supercollidervk-aws-route53 vk-posix-ptyvocabulary-kadma vocoder vocoder-audiovocoder-conduit vocoder-dunai voicebasevoidh vorbiscomment vowpal-utilsvoyeurvp-treevpq vrpnvt-utilsvte vtegtk3vty vty-examplesvty-menuvty-ui vty-ui-extrasvulkanl vulkan-api vulkan-utils waargonaut wacom-daemonwaddle wahspwai|wai-accept-languagewai-app-file-cgiwai-app-staticwai-cli wai-conduit" wai-controlwai-corsB wai-develwai-digestive-functors wai-dispatchwai-enforce-httpswai-envwai-eventsource wai-extra&wai-feature-flags wai-frontend-monadcgi wai-git-http wai-gracefulwai-handler-develwai-handler-fastcgiwai-handler-hal wai-handler-launch+wai-handler-scgiwai-handler-snapwai-handler-webkit wai-hastache wai-hmac-authwai-http2-extra wai-lambdawai-lenswai-lite wai-log wai-loggerwai-logger-bufferedwai-logger-preforkwai-make-assetswai-middleware-authwai-middleware-bearer wai-middleware-brotliwai-middleware-cachewai-middleware-cache-rediswai-middleware-caching wai-middleware-caching-lru wai-middleware-caching-rediswai-middleware-catchwai-middleware-clackswai-middleware-consulwai-middleware-content-type wai-middleware-crowdwai-middleware-delegate wai-middleware-etag wai-middleware-gunzipwai-middleware-headerswai-middleware-hmacwai-middleware-hmac-clientwai-middleware-json-errorswai-middleware-metricswai-middleware-preprocessorwai-middleware-prometheuswai-middleware-rollbarwai-middleware-routewai-middleware-slack-verifywai-middleware-static9wai-middleware-static-cachingwai-middleware-static-embeddedwai-middleware-throttlewai-middleware-travisciwai-middleware-validationwai-middleware-verbswai-predicateswai-rate-limit wai-rate-limit-postgreswai-rate-limit-redis wai-request-spec wai-responsible wai-route wai-router wai-routes wai-routing wai-saml2 wai-secure-cookies wai-sessionwai-session-altwai-session-clientsessionwai-session-mysqlwai-session-postgresqlwai-session-redis wai-session-tokyocabinetwai-slack-middleware wai-static-cachewai-static-pageswai-test wai-thrift wai-throttlerwai-transformers wai-util wai-websocketsO wait-handle waitfreewaitrawakame waldo wallpaperwarcwarp& warp-dynamic warp-grpc warp-quic warp-static warp-systemdwarp-tls warp-tls-uidwarpedwasm watchdogwatcherwatchit wavconvertwave wavefront wavefront-obj wavesurferwavywcwidthVwdweakweak-bag weather-api weatherhsweb-browser-in-haskell web-css web-encodingsweb-fpco web-inv-route web-mongrel2 web-outputweb-page web-plugins web-pushweb-rep web-routesweb-routes-boomerangweb-routes-genericsweb-routes-happstackweb-routes-hspweb-routes-mtlweb-routes-quasiweb-routes-regular web-routes-th web-routes-transformersweb-routes-wai web-routingweb3 web3-bignum web3-crypto web3-ethereum web3-ipfs web3-polkadot web3-provider web3-soliditywebapiwebappwebauthnwebbywebcloudwebcrankwebcrank-dispatch webcrank-wai webdriverwebdriver-angular webdriver-snoy webdriver-w3c webex-teams-api webex-teams-conduitwebex-teams-pipeswebfinger-client webgear-corewebgear-openapiwebgear-serverwebidlwebifywebkit(webkit-javascriptcorewebkit2gtk3-javascriptcore webkitgtk3)webkitgtk3-javascriptcore webmentionwebpwebpage webrtc-vad webserverwebshowwebsnap websocketswebsockets-jsonwebsockets-rpcwebsockets-simple websockets-simple-extrawebsockets-snap@webwirewedding-announcementwedgedweederWweekdazeweigh.weightedweighted-regexpweighted-searchwelford-online-mean-variancewelshywembleywerewolfwerewolf-slack wgpu-hs wgpu-raw-hswhat4 wheb-mongo wheb-redis wheb-strappedwhichwhile-lang-parser whimwhiskers whitespace whois wholepixelswhy3 wide-wordwide-word-instanceswigner-symbolswigner-ville-accelerate wikicfp-scraper wikipedia4epub wild-bindwild-bind-indicatorwild-bind-task-x11 wild-bind-x11willow wilton-ffi win-hp-pathwindns( windowslivewinerror winerywinio wire-streams wireguard-hswireswiring wiringPiwitchpwith with-index with-location with-utf8<withdependencies witherablewwitherable-classwithin witness wittywizardwizards&wktwkt-geom wl-pprint#wl-pprint-annotatedMwl-pprint-ansitermwl-pprint-consolewl-pprint-extraswl-pprint-terminfowl-pprint-textswlc-hswobsurvwoewoffexwolwolfwoot word word-array word-compat7 word-trie word-vector word-wrapSword12word16word24word2vec-modelword8Q wordchoice wordcloudwordexpwordifywordlistwordnwordpass wordpress-authwords wordsearch wordsetdiff work-timeworkdaysworkflow-extra workflow-osx workflow-pureworkflow-typesworkflow-windows world-peace worldturtle wp-archivebotwrap wraparoundwrappedwrapped-generic-defaultwraxmlwrecker wrecker-ui wreq< wreq-helperwreq-patchablewreq-sbwreq-stringlesswrightwrite-buffer-corewrite-buffer-stmwriter-cps-exceptionswriter-cps-fullwriter-cps-lenswriter-cps-monads-tfwriter-cps-morphwriter-cps-mtlwriter-cps-transformers%wrytewsws-chanswsdlwseditwshterm wsjtx-udp wss-clientwstunnelwtkwtk-gtkwu-weiwuerfelschlange wumpus-basic wumpus-corewumpus-drawingwumpus-microprint wumpus-treewuss5wx# wxAsteroids wxFruitwxSimpleCanvaswxc wxcore#wxdirect wxhnotepad wxturtlewyborwyvernx-dspx11-xim x11-xinputx509 x509-store x509-system x509-utilx509-validation x86-64bitxattrxbattbar xcb-typesxcffibM xchat-pluginxcpxdcc xdg-basedir4xdg-basedir-compliantxdg-desktop-entry xdg-userdirs xdotxeno2xenstorexfconfxformatxgboost-haskellxhaskell-libraryxhb xhb-atom-cachexhb-ewmh xhtmlxhtml-combinators xilinx-lavaxinexing-apixinput-conduitxinuxinu-ffi xkbcommonxkcdxlebxlsxlsiorxlsx& xlsx-tabular xlsx-templaterxmlf xml-basic xml-catalog xml-conduitxml-conduit-decodexml-conduit-parsexml-conduit-selectorsxml-conduit-stylistxml-conduit-writerxml-enumerator xml-enumerator-combinatorsxml-extractors xml-hamlet5 xml-helpersxml-html-conduit-lens xml-html-qq xml-indexed-cursor xml-isogenxml-lens xml-monad xml-optics xml-parsec xml-parser xml-picklersxml-pipe xml-prettifyxml-prettify-textxml-push xml-queryxml-query-xml-conduitxml-query-xml-types xml-syntax xml-to-jsonxml-to-json-fastxml-tydom-conduitxml-tydom-core xml-typese xml-verifyxml2html xml2jsonxml2x xmlbf3 xmlbf-xeno- xmlbf-xmlhtmlxmlgen)xmlhtml*xmltv xmms2-clientxmms2-client-glib xmobarxmonadxmonad-bluetilebranchxmonad-contribxmonad-contrib-bluetilebranch xmonad-contrib-gpl xmonad-dbus xmonad-entryhelper xmonad-eval xmonad-extras3xmonad-screenshotxmonad-spotify xmonad-utilsxmonad-vanessa xmonad-volumexmonad-wallpaper xmonad-windownamesxmpipexorxorshift xorshift-plusxosdxournal-builderxournal-convertxournal-parserxournal-render xournal-typesxpathdsv xrefcheckxsactxsdxsha1xslt xss-sanitizexstatic xstatic-thxtcxtestxturtlexxhash xxhash-ffi y0l0botyabi yabi-munoyackageyahoo-finance-apiyahoo-finance-conduit yahoo-prices yahoo-web-searchyajlyajl-enumeratoryakyallyamyam-app yam-configyam-datasourceyam-job yam-logger yam-redis yam-servantyam-transactionyam-transaction-odbcyam-transaction-postgresqlyam-webyamemoyamldyaml-combinators yaml-config yaml-lightyaml-light-lensyaml-pretty-extrasyaml-rpcyaml-rpc-scotty yaml-rpc-snap yaml-streamly yaml-union yaml-unscrambleryaml2owl yamlkeysdiffyamlparse-applicative yampa-canvas yampa-glfw yampa-gloss yampa-glut yampa-sdl2 yampa-test yampa2048yandex-translate yaopyapyapbyarl yarn-lock yarn2nixyarr yarr-image-ioyasiyateyavie yaya yaya-hedgehog yaya-test yaya-unsafeyaya-unsafe-testycextrayeameryeganeshyelleryes-precure5-command yeshql yeshql-core yeshql-hdbcyeshql-postgresql-simpleyesod yesod-alerts yesod-angularyesod-angular-uiyesod-articles yesod-auth@yesod-auth-accountyesod-auth-account-forkyesod-auth-basic yesod-auth-bcryptyesod-auth-bcryptdbyesod-auth-deskcom yesod-auth-fb yesod-auth-hashdbyesod-auth-hmac-keccakyesod-auth-kerberosyesod-auth-ldapyesod-auth-ldap-mediocreyesod-auth-ldap-nativeyesod-auth-lti13 yesod-auth-nopasswordyesod-auth-oauthyesod-auth-oauth2!yesod-auth-oidcyesod-auth-pamyesod-auth-simpleyesod-auth-smbclientyesod-auth-zendeskyesod-autoreload yesod-bin:yesod-bootstrapyesod-colonnadeyesod-commentsyesod-content-pdf$yesod-continuations yesod-core` yesod-crudyesod-crud-persist yesod-cspyesod-datatables yesod-default yesod-dslyesod-elementsyesod-eventsourceyesod-examplesyesod-fast-devel yesod-fayyesod-fb yesod-filter yesod-formSyesod-form-bootstrap4 yesod-form-bulmayesod-form-jsonyesod-form-multiyesod-form-richtext yesod-gitrepo yesod-gitrev yesod-goodiesyesod-ipyesod-job-queue yesod-json yesod-katip yesod-links yesod-lucidyesod-mangopayyesod-markdownyesod-media-simple yesod-middleware-cspyesod-newsfeed!yesod-page-cursor yesod-paginateyesod-paginationyesod-paginatoryesod-paypal-restyesod-persistentFyesod-platform yesod-pnotify yesod-pureyesod-purescript yesod-ramlyesod-raml-bin yesod-raml-docsyesod-raml-mockyesod-recaptchayesod-recaptcha2 yesod-routesyesod-routes-flow yesod-routes-typescript yesod-rst yesod-s3 yesod-sass yesod-session-redis yesod-sitemap yesod-static>yesod-static-angularyesod-static-remote yesod-tableyesod-tableview yesod-testRyesod-test-jsonyesod-text-markdown yesod-tlsyesod-transloadit yesod-vendyesod-websockets yesod-websockets-extra yesod-workeryet-another-logger yggdrasilyhccoreyhseqyi yi-contribyi-coreyi-dynamic-configuration yi-emacs-coloursyi-frontend-pangoyi-frontend-vty yi-fuzzy-open yi-gtk yi-ireader yi-keymap-cua yi-keymap-emacs yi-keymap-vim yi-language yi-misc-modesyi-mode-haskell yi-mode-javascript yi-monokai yi-rope yi-snippet yi-solarized yi-spolskyyi-vtyyices yices-easyyices-painlessyiydyjftp yjftp-libsyjsvgyjtoolsyocto yoctoparsec yoda yogayoko york-lavayoutube yqlyst ytlyu-authyu-core yu-launchyu-toolyu-utilsyuiGridyuukoyx yxdb-utilsz3 z3-encodingz85zabtzalgozampolit zasni-gernazbarzcache zenacy-htmlzenacy-unicode zenc* zendesk-apizenhack-preludezeno zeolite-langzephyr zephyr-copilotzerozerobin zeromq-haskell zeromq3-conduitzeromq3-haskell zeromq4-clone-patternzeromq4-conduitzeromq4-haskellzeromq4-patterns zeromq4-simple zeroth zettelkastzifter zifter-cabal zifter-gitzifter-google-java-formatzifter-hindent zifter-hlint zifter-stack zigbee-znet25zigzagE zim-parserzinza zio zip3 zip-archivezip-cmd zip-conduit zip-stream"zipeditzipkin zipper zipper-extrazipperszippoziptastic-client ziptastic-core zlib zlib-bindingsL zlib-bytes zlib-conduit zlib-enum zlib-lenszmzmcat zmidi-core zmidi-scorezmqatzoneinfozoom zoom-cachezoom-cache-pcmzoom-cache-sndfile zoom-refs zoovisitorzotzrezsdd zsh-battery zstd(zsyntaxztailztarzuramaruzuulzxcvbn-c zxcvbn-dvorak zxcvbn-hs zydiskellzyre2ormolu-0.5.3.0/ormolu.cabal0000644000000000000000000001325607346545000013673 0ustar0000000000000000cabal-version: 2.4 name: ormolu version: 0.5.3.0 license: BSD-3-Clause license-file: LICENSE.md maintainer: Mark Karpov tested-with: ghc ==9.0.2 ghc ==9.2.5 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.Internal Ormolu.Fixity.Parser Ormolu.Fixity.Printer Ormolu.Printer.SpanStream Ormolu.Processing.Common Ormolu.Processing.Cpp Ormolu.Processing.Preprocess Ormolu.Terminal Ormolu.Utils Ormolu.Utils.Cabal Ormolu.Utils.Fixity Ormolu.Utils.IO hs-source-dirs: src other-modules: GHC.DynFlags default-language: Haskell2010 build-depends: Cabal-syntax >=3.8 && <3.9, Diff >=0.4 && <1.0, MemoTrie >=0.6 && <0.7, ansi-terminal >=0.10 && <1.0, array >=0.5 && <0.6, base >=4.14 && <5.0, binary >=0.8 && <0.9, bytestring >=0.2 && <0.12, containers >=0.5 && <0.7, directory ^>=1.3, dlist >=0.8 && <2.0, file-embed >=0.0.15 && <0.1, filepath >=1.2 && <1.5, ghc-lib-parser >=9.4 && <9.5, 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 -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances -Wno-missing-home-modules -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: Haskell2010 build-depends: base >=4.12 && <5.0, containers >=0.5 && <0.7, directory ^>=1.3, filepath >=1.2 && <1.5, ghc-lib-parser >=9.4 && <9.5, th-env >=0.1.1 && <0.2, optparse-applicative >=0.14 && <0.18, ormolu, text >=2.0 && <3.0 if flag(dev) ghc-options: -Wall -Werror -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances -optP-Wno-nonportable-include-path -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.HackageInfoSpec Ormolu.OpTreeSpec Ormolu.Parser.OptionsSpec Ormolu.Parser.ParseFailureSpec Ormolu.Parser.PragmaSpec Ormolu.PrinterSpec default-language: Haskell2010 build-depends: Cabal-syntax >=3.8 && <3.9, 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.4 && <9.5, hspec >=2.0 && <3.0, hspec-megaparsec >=2.2, 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 -Wunused-packages else ghc-options: -O2 -Wall ormolu-0.5.3.0/src/GHC/0000755000000000000000000000000007346545000012553 5ustar0000000000000000ormolu-0.5.3.0/src/GHC/DynFlags.hs0000644000000000000000000000301507346545000014615 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 = "" } } fakeLlvmConfig :: LlvmConfig fakeLlvmConfig = LlvmConfig [] [] baseDynFlags :: DynFlags baseDynFlags = defaultDynFlags fakeSettings fakeLlvmConfig ormolu-0.5.3.0/src/0000755000000000000000000000000007346545000012152 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu.hs0000644000000000000000000002007107346545000013763 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# 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 FixityMap, getFixityOverridesForSourceFile, -- * Working with exceptions OrmoluException (..), withPrettyOrmoluExceptions, ) where import Control.Exception import Control.Monad import Control.Monad.IO.Class (MonadIO (..)) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Data.Text (Text) import qualified Data.Text as T import Debug.Trace import qualified GHC.Driver.CmdLine as GHC import qualified GHC.Types.SrcLoc as GHC import Ormolu.Config import Ormolu.Diff.ParseResult import Ormolu.Diff.Text import Ormolu.Exception import Ormolu.Fixity import Ormolu.Parser import Ormolu.Parser.CommentStream (showCommentStream) import Ormolu.Parser.Result import Ormolu.Printer import Ormolu.Utils (showOutputable) import qualified Ormolu.Utils.Cabal as CabalUtils import Ormolu.Utils.Fixity (getFixityOverridesForSourceFile) 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 = -- It is important to keep all arguments (but last) of -- 'buildFixityMap' constant (such as 'defaultStrategyThreshold'), -- otherwise it is going to break memoization. buildFixityMap defaultStrategyThreshold (cfgDependencies cfg) -- memoized on the set of dependencies (warnings, result0) <- parseModule' cfg fixityMap OrmoluParsingFailed path originalInput when (cfgDebug cfg) $ do traceM "warnings:\n" traceM (concatMap showWarn warnings) forM_ result0 $ \case ParsedSnippet r -> traceM . showCommentStream . prCommentStream $ r _ -> 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 FixityMap -> -- | 'Config' to refine Config region -> -- | Refined 'Config' Config region refineConfig sourceType mcabalInfo mfixityOverrides rawConfig = rawConfig { cfgDynOptions = cfgDynOptions rawConfig ++ dynOptsFromCabal, cfgFixityOverrides = Map.unionWith (<>) (cfgFixityOverrides rawConfig) fixityOverrides, cfgDependencies = Set.union (cfgDependencies rawConfig) depsFromCabal, cfgSourceType = sourceType } where fixityOverrides = case mfixityOverrides of Nothing -> Map.empty Just x -> x (dynOptsFromCabal, depsFromCabal) = case mcabalInfo of Nothing -> ([], Set.empty) 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 LazyFixityMap -> -- | How to obtain 'OrmoluException' to throw when parsing fails (GHC.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) -- | Pretty-print a 'GHC.Warn'. showWarn :: GHC.Warn -> String showWarn (GHC.Warn reason l) = unlines [ showOutputable reason, showOutputable l ] -- | Detect 'SourceType' based on the file extension. detectSourceType :: FilePath -> SourceType detectSourceType mpath = if takeExtension mpath == ".hsig" then SignatureSource else ModuleSource ormolu-0.5.3.0/src/Ormolu/0000755000000000000000000000000007346545000013427 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Config.hs0000644000000000000000000000667007346545000015201 0ustar0000000000000000{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE RecordWildCards #-} -- | Configuration options used by the tool. module Ormolu.Config ( Config (..), ColorMode (..), RegionIndices (..), RegionDeltas (..), SourceType (..), defaultConfig, regionIndicesToDeltas, DynOption (..), dynOptionToLocatedStr, ) where import qualified Data.Map.Strict as Map import Data.Set (Set) import qualified Data.Set as Set import Distribution.Types.PackageName (PackageName) import GHC.Generics (Generic) import qualified GHC.Types.SrcLoc as GHC import Ormolu.Fixity (FixityMap) 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 :: FixityMap, -- | 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 = Map.empty, cfgDependencies = Set.empty, cfgUnsafe = False, cfgDebug = False, cfgCheckIdempotence = False, cfgSourceType = ModuleSource, cfgColorMode = Auto, cfgRegion = RegionIndices { regionStartLine = Nothing, regionEndLine = Nothing } } -- | 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.5.3.0/src/Ormolu/Diff/0000755000000000000000000000000007346545000014277 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Diff/ParseResult.hs0000644000000000000000000001363407346545000017113 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} #if !MIN_VERSION_base(4,17,0) -- needed on GHC 9.0 and 9.2 due to simplified subsumption {-# LANGUAGE ImpredicativeTypes #-} #endif -- | 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.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 <> matchIgnoringSrcSpans 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 values for equality disregarding the following aspects: -- -- * 'SrcSpan's -- * ordering of import lists -- * style (ASCII vs Unicode) of arrows -- * LayoutInfo (brace style) in extension fields -- * Empty contexts in type classes -- * Parens around derived type classes matchIgnoringSrcSpans :: (Data a) => a -> a -> ParseResultDiff matchIgnoringSrcSpans a = genericQuery a 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` srcSpanEq `ext1Q` epAnnEq `extQ` sourceTextEq `extQ` hsDocStringEq `extQ` importDeclQualifiedStyleEq `extQ` unicodeArrowStyleEq `extQ` layoutInfoEq `extQ` classDeclCtxEq `extQ` derivedTyClsParensEq `extQ` epaCommentsEq `ext2Q` forLocated ) x y | otherwise = Different [] srcSpanEq :: SrcSpan -> GenericQ ParseResultDiff srcSpanEq _ _ = Same epAnnEq :: EpAnn a -> GenericQ ParseResultDiff epAnnEq _ _ = Same sourceTextEq :: SourceText -> GenericQ ParseResultDiff sourceTextEq _ _ = Same importDeclQualifiedStyleEq :: ImportDeclQualifiedStyle -> GenericQ ParseResultDiff importDeclQualifiedStyleEq d0 d1' = case (d0, cast d1' :: Maybe ImportDeclQualifiedStyle) of (x, Just x') | x == x' -> Same (QualifiedPre, Just QualifiedPost) -> Same (QualifiedPost, Just QualifiedPre) -> Same _ -> Different [] hsDocStringEq :: HsDocString -> GenericQ ParseResultDiff hsDocStringEq str0 str1' = case cast str1' :: Maybe HsDocString of Nothing -> Different [] Just str1 -> if splitDocString str0 == splitDocString str1 then Same else Different [] 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 -- as we normalize arrow styles (e.g. -> vs →), we consider them equal here unicodeArrowStyleEq :: HsArrow GhcPs -> GenericQ ParseResultDiff unicodeArrowStyleEq (HsUnrestrictedArrow _) (castArrow -> Just (HsUnrestrictedArrow _)) = Same unicodeArrowStyleEq (HsLinearArrow _) (castArrow -> Just (HsLinearArrow _)) = Same unicodeArrowStyleEq (HsExplicitMult _ _ t) (castArrow -> Just (HsExplicitMult _ _ t')) = genericQuery t t' unicodeArrowStyleEq _ _ = Different [] castArrow :: (Typeable a) => a -> Maybe (HsArrow GhcPs) castArrow = cast -- LayoutInfo ~ XClassDecl GhcPs tracks brace information layoutInfoEq :: LayoutInfo -> GenericQ ParseResultDiff layoutInfoEq _ (cast -> Just (_ :: LayoutInfo)) = Same layoutInfoEq _ _ = Different [] 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' -- EpAnnComments ~ XCGRHSs GhcPs epaCommentsEq :: EpAnnComments -> GenericQ ParseResultDiff epaCommentsEq _ (cast -> Just (_ :: EpAnnComments)) = Same epaCommentsEq _ _ = Different [] ormolu-0.5.3.0/src/Ormolu/Diff/Text.hs0000644000000000000000000002276507346545000015573 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} -- | This module allows us to diff two 'Text' values. module Ormolu.Diff.Text ( TextDiff, diffText, selectSpans, printTextDiff, ) where import Control.Monad import qualified Data.Algorithm.Diff as D import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.List (foldl') import Data.Maybe (listToMaybe) import Data.Text (Text) import qualified Data.Text as T import GHC.Types.SrcLoc import Ormolu.Terminal ---------------------------------------------------------------------------- -- 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 {..} = do (bold . putS) textDiffPath newline forM_ (toHunks (assignLines textDiffDiffList)) $ \hunk@Hunk {..} -> when (isSelectedLine textDiffSelectedLines hunk) $ do cyan $ do put "@@ -" putS (show hunkFirstStartLine) put "," putS (show hunkFirstLength) put " +" putS (show hunkSecondStartLine) put "," putS (show hunkSecondLength) put " @@" newline forM_ hunkDiff $ \case D.Both ys _ -> forM_ ys $ \y -> do unless (T.null y) $ put " " put y newline D.First ys -> forM_ ys $ \y -> red $ do put "-" unless (T.null y) $ put " " put y newline D.Second ys -> forM_ ys $ \y -> green $ 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.5.3.0/src/Ormolu/Exception.hs0000644000000000000000000000767007346545000015733 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | 'OrmoluException' type and surrounding definitions. module Ormolu.Exception ( OrmoluException (..), printOrmoluException, withPrettyOrmoluExceptions, ) where import Control.Exception import Control.Monad (forM_) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE import Data.Text (Text) import qualified Data.Text as T import Data.Void (Void) import GHC.Types.SrcLoc import Ormolu.Diff.Text (TextDiff, printTextDiff) import Ormolu.Terminal 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 | -- | 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 (Eq, Show) instance Exception OrmoluException -- | Print an 'OrmoluException'. printOrmoluException :: OrmoluException -> Term () printOrmoluException = \case OrmoluParsingFailed s e -> do bold (putSrcSpan s) newline put " The GHC parser (in Haddock mode) failed:" newline put " " put (T.pack e) newline OrmoluOutputParsingFailed s e -> do bold (putSrcSpan s) newline put " Parsing of formatted code failed:" put " " put (T.pack e) newline OrmoluASTDiffers diff ss -> do printTextDiff diff newline put " AST of input and AST of formatted code differ." newline forM_ ss $ \s -> do put " at " putRealSrcSpan s newline put " Please, consider reporting the bug." newline put " To format anyway, use --unsafe." newline OrmoluNonIdempotentOutput diff -> do printTextDiff diff newline put " Formatting is not idempotent." newline put " Please, consider reporting the bug." newline OrmoluUnrecognizedOpts opts -> do put "The following GHC options were not recognized:" newline put " " (putS . unwords . NE.toList) opts newline OrmoluCabalFileParsingFailed cabalFile -> do put "Parsing this .cabal file failed:" newline put $ " " <> T.pack cabalFile newline OrmoluMissingStdinInputFile -> do put "The --stdin-input-file option is necessary when using input" newline put "from stdin and accounting for .cabal files" newline OrmoluFixityOverridesParseError errorBundle -> do putS (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.5.3.0/src/Ormolu/Fixity.hs0000644000000000000000000002223607346545000015244 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TemplateHaskell #-} -- | Definitions for fixity analysis. module Ormolu.Fixity ( OpName, pattern OpName, unOpName, occOpName, FixityDirection (..), FixityInfo (..), FixityMap, LazyFixityMap, lookupFixity, HackageInfo (..), defaultStrategyThreshold, defaultFixityInfo, buildFixityMap, buildFixityMap', bootPackages, packageToOps, packageToPopularity, ) where import qualified Data.Binary as Binary import qualified Data.Binary.Get as Binary import qualified Data.ByteString.Lazy as BL import Data.Foldable (foldl') import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Maybe (fromMaybe) import Data.MemoTrie (memo) import Data.Semigroup (sconcat) import Data.Set (Set) import qualified Data.Set as Set import Distribution.Types.PackageName (PackageName, mkPackageName, unPackageName) import Ormolu.Fixity.Internal #if BUNDLE_FIXITIES import Data.FileEmbed (embedFile) #else import qualified Data.ByteString.Unsafe as BU import Foreign.Ptr import System.Environment (getEnv) import System.IO.Unsafe (unsafePerformIO) #endif packageToOps :: Map PackageName FixityMap packageToPopularity :: Map PackageName Int #if BUNDLE_FIXITIES HackageInfo packageToOps packageToPopularity = 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 at runtime by storing the pointer and length of -- the bytes in an environment variable. HackageInfo packageToOps packageToPopularity = unsafePerformIO $ do (ptr, len) <- read <$> getEnv "ORMOLU_HACKAGE_INFO" Binary.runGet Binary.get . BL.fromStrict <$> BU.unsafePackMallocCStringLen (intPtrToPtr $ IntPtr ptr, len) {-# NOINLINE packageToOps #-} {-# NOINLINE packageToPopularity #-} #endif -- | List of packages shipped with GHC, for which the download count from -- Hackage does not reflect their high popularity. -- See https://github.com/tweag/ormolu/pull/830#issuecomment-986609572. -- "base" is not is this list, because it is already whitelisted -- by buildFixityMap'. bootPackages :: Set PackageName bootPackages = Set.fromList [ "array", "binary", "bytestring", "containers", "deepseq", "directory", "exceptions", "filepath", "ghc-binary", "mtl", "parsec", "process", "stm", "template-haskell", "terminfo", "text", "time", "transformers", "unix", "Win32" ] -- | The default value for the popularity ratio threshold, after which a -- very popular definition from packageToOps will completely rule out -- conflicting definitions instead of being merged with them. defaultStrategyThreshold :: Float defaultStrategyThreshold = 0.9 -- | Build a fixity map using the given popularity threshold and a list of -- cabal dependencies. Dependencies from the list have higher priority than -- other packages. buildFixityMap :: -- | Popularity ratio threshold, after which a very popular package will -- completely rule out conflicting definitions coming from other packages -- instead of being merged with them Float -> -- | Explicitly known dependencies Set PackageName -> -- | Resulting map LazyFixityMap buildFixityMap = buildFixityMap' packageToOps packageToPopularity bootPackages -- | Build a fixity map using the given popularity threshold and a list of -- cabal dependencies. Dependencies from the list have higher priority than -- other packages. This specific version of the function allows the user to -- specify the package databases used to build the final fixity map. buildFixityMap' :: -- | Map from package to fixity map for operators defined in this package Map PackageName FixityMap -> -- | Map from package to popularity Map PackageName Int -> -- | Higher priority packages Set PackageName -> -- | Popularity ratio threshold, after which a very popular package will -- completely rule out conflicting definitions coming from other packages -- instead of being merged with them Float -> -- | Explicitly known dependencies Set PackageName -> -- | Resulting map LazyFixityMap buildFixityMap' operatorMap popularityMap higherPriorityPackages strategyThreshold = memoSet $ \dependencies -> let baseFixityMap = Map.insert ":" colonFixityInfo $ fromMaybe Map.empty $ Map.lookup "base" operatorMap cabalFixityMap = mergeAll (buildPackageFixityMap <$> Set.toList dependencies) higherPriorityFixityMap = mergeAll (buildPackageFixityMap <$> Set.toList higherPriorityPackages) remainingFixityMap = mergeFixityMaps popularityMap strategyThreshold (buildPackageFixityMap <$> Set.toList remainingPackages) remainingPackages = Map.keysSet operatorMap `Set.difference` Set.union dependencies higherPriorityPackages buildPackageFixityMap packageName = ( packageName, fromMaybe Map.empty $ Map.lookup packageName operatorMap ) -- we need a threshold > 1.0 so that no dependency can reach the -- threshold mergeAll = mergeFixityMaps Map.empty 10.0 in LazyFixityMap [ baseFixityMap, cabalFixityMap, higherPriorityFixityMap, remainingFixityMap ] memoSet :: (Set PackageName -> v) -> Set PackageName -> v memoSet f = memo (f . Set.fromAscList . fmap mkPackageName) . fmap unPackageName . Set.toAscList -- | Merge a list of individual fixity maps, coming from different packages. -- Package popularities and the given threshold are used to choose between -- the "keep best only" (>= threshold) and "merge all" (< threshold) -- strategies when conflicting definitions are encountered for an operator. mergeFixityMaps :: -- | Map from package name to 30-days download count Map PackageName Int -> -- | Popularity ratio threshold Float -> -- | List of (package name, package fixity map) to merge [(PackageName, FixityMap)] -> -- | Resulting fixity map FixityMap mergeFixityMaps popularityMap threshold packageMaps = Map.map (useThreshold threshold . NE.fromList . Map.toList) scoredMap where scoredMap = Map.map getScores opFixityMap -- when we encounter a duplicate key (op1) in the unionsWith operation, -- we have -- op1 -map-> {definitions1 -map-> originPackages} -- op1 -map-> {definitions2 -map-> originPackages} -- so we merge the keys (which have the type: -- Map FixityInfo (NonEmpty PackageName)) -- using 'Map.unionWith (<>)', to "concatenate" the list of -- definitions for this operator, and to also "concatenate" origin -- packages if a same definition is found in both maps opFixityMap = Map.unionsWith (Map.unionWith (<>)) (opFixityMapFrom <$> packageMaps) useThreshold :: -- Threshold Float -> -- List of conflicting (definition, score) for a given operator NonEmpty (FixityInfo, Int) -> -- Resulting fixity, using the specified threshold to choose between -- strategy "keep best only" and "merge all" FixityInfo useThreshold t fixScores = if toFloat maxScore / toFloat sumScores >= t then sconcat . fmap fst $ maxs -- merge potential ex-aequo winners else sconcat . fmap fst $ fixScores where toFloat x = fromIntegral x :: Float maxs = maxWith snd fixScores maxScore = snd $ NE.head maxs sumScores = foldl' (+) 0 (snd <$> fixScores) getScores :: -- Map for a given operator associating each of its conflicting -- definitions with the packages that define it Map FixityInfo (NonEmpty PackageName) -> -- Map for a given operator associating each of its conflicting -- definitions with their score (= sum of the popularity of the -- packages that define it) Map FixityInfo Int getScores = Map.map (sum . fmap (fromMaybe 0 . flip Map.lookup popularityMap)) opFixityMapFrom :: -- (packageName, package fixity map) (PackageName, FixityMap) -> -- Map associating each operator of the package with a -- {map for a given operator associating each of its definitions with -- the list of packages that define it} -- (this list can only be == [packageName] in the context of this -- function) Map OpName (Map FixityInfo (NonEmpty PackageName)) opFixityMapFrom (packageName, opsMap) = Map.map (flip Map.singleton (packageName :| [])) opsMap maxWith :: (Ord b) => (a -> b) -> NonEmpty a -> NonEmpty a maxWith f xs = snd $ foldl' comp (f h, h :| []) t where h :| t = xs comp (fMax, maxs) x = let fX = f x in if | fMax < fX -> (fX, x :| []) | fMax == fX -> (fMax, NE.cons x maxs) | otherwise -> (fMax, maxs) ormolu-0.5.3.0/src/Ormolu/Fixity/0000755000000000000000000000000007346545000014703 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Fixity/Internal.hs0000644000000000000000000001063207346545000017015 0ustar0000000000000000{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Fixity.Internal ( OpName, pattern OpName, unOpName, occOpName, FixityDirection (..), FixityInfo (..), defaultFixityInfo, colonFixityInfo, HackageInfo (..), FixityMap, LazyFixityMap (..), lookupFixity, ) where import Data.Binary (Binary) import Data.ByteString.Short (ShortByteString) import qualified Data.ByteString.Short as SBS import Data.Foldable (asum) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.String (IsString (..)) import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as T import Distribution.Types.PackageName (PackageName) import GHC.Data.FastString (fs_sbs) import GHC.Generics (Generic) import GHC.Types.Name (OccName (occNameFS)) -- | Fixity direction. data FixityDirection = InfixL | InfixR | InfixN deriving stock (Eq, Ord, Show, Generic) deriving anyclass (Binary) -- | Fixity information about an infix operator that takes the uncertainty -- that can arise from conflicting definitions into account. data FixityInfo = FixityInfo { -- | Fixity direction if it is known fiDirection :: Maybe FixityDirection, -- | Minimum precedence level found in the (maybe conflicting) -- definitions for the operator (inclusive) fiMinPrecedence :: Int, -- | Maximum precedence level found in the (maybe conflicting) -- definitions for the operator (inclusive) fiMaxPrecedence :: Int } deriving stock (Eq, Ord, Show, Generic) deriving anyclass (Binary) -- | The lowest level of information we can have about an operator. defaultFixityInfo :: FixityInfo defaultFixityInfo = FixityInfo { fiDirection = Just InfixL, fiMinPrecedence = 9, fiMaxPrecedence = 9 } -- | Fixity info of the built-in colon data constructor. colonFixityInfo :: FixityInfo colonFixityInfo = FixityInfo { fiDirection = Just InfixR, fiMinPrecedence = 5, fiMaxPrecedence = 5 } -- | Gives the ability to merge two (maybe conflicting) definitions for an -- operator, keeping the higher level of compatible information from both. instance Semigroup FixityInfo where FixityInfo {fiDirection = dir1, fiMinPrecedence = min1, fiMaxPrecedence = max1} <> FixityInfo {fiDirection = dir2, fiMinPrecedence = min2, fiMaxPrecedence = max2} = FixityInfo { fiDirection = dir', fiMinPrecedence = min min1 min2, fiMaxPrecedence = max max1 max2 } where dir' = case (dir1, dir2) of (Just a, Just b) | a == b -> Just a _ -> Nothing -- | An operator name. newtype OpName = MkOpName { -- | Invariant: UTF-8 encoded getOpName :: ShortByteString } deriving newtype (Eq, Ord, Binary) -- | 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 -- | Map from the operator name to its 'FixityInfo'. type FixityMap = Map OpName FixityInfo -- | A variant of 'FixityMap', represented as a lazy union of several -- 'FixityMap's. newtype LazyFixityMap = LazyFixityMap [FixityMap] deriving (Show) -- | Lookup a 'FixityInfo' of an operator. This might have drastically -- different performance depending on whether this is an "unusual" operator. lookupFixity :: OpName -> LazyFixityMap -> Maybe FixityInfo lookupFixity op (LazyFixityMap maps) = asum (Map.lookup op <$> maps) -- | The map of operators declared by each package and the popularity of -- each package, if available. data HackageInfo = HackageInfo (Map PackageName FixityMap) -- ^ Map from package name to a map from operator name to its fixity (Map PackageName Int) -- ^ Map from package name to its 30-days download count from Hackage deriving stock (Generic) deriving anyclass (Binary) ormolu-0.5.3.0/src/Ormolu/Fixity/Parser.hs0000644000000000000000000000457407346545000016505 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} -- | Parser for fixity maps. module Ormolu.Fixity.Parser ( parseFixityMap, parseFixityDeclaration, -- * Raw parsers pFixity, pOperator, ) where import qualified Data.Char as Char import qualified Data.Map.Strict as Map import Data.Text (Text) import qualified Data.Text as T import Data.Void (Void) import Ormolu.Fixity import Text.Megaparsec import Text.Megaparsec.Char import qualified Text.Megaparsec.Char.Lexer as L type Parser = Parsec Void Text -- | Parse textual representation of a 'FixityMap'. parseFixityMap :: -- | Location of the file we are parsing (only for parse errors) FilePath -> -- | File contents to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) FixityMap parseFixityMap = runParser pFixityMap -- | Parse a single self-contained fixity declaration. parseFixityDeclaration :: -- | Expression to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) [(OpName, FixityInfo)] parseFixityDeclaration = runParser (pFixity <* eof) "" pFixityMap :: Parser FixityMap pFixityMap = Map.fromListWith (<>) . mconcat <$> many (pFixity <* eol <* hidden space) <* eof -- | Parse a single fixity declaration, such as -- -- > infixr 4 +++, >>> pFixity :: Parser [(OpName, FixityInfo)] pFixity = do fiDirection <- Just <$> pFixityDirection hidden hspace1 fiMinPrecedence <- L.decimal let fiMaxPrecedence = fiMinPrecedence 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 (\x -> Char.isAlphaNum x || x == '_' || x == '\'') normalOperator = takeWhile1P (Just "operator character") $ \x -> (Char.isSymbol x || Char.isPunctuation x) && (x /= ',' && x /= '`' && x /= '(' && x /= ')') ormolu-0.5.3.0/src/Ormolu/Fixity/Printer.hs0000644000000000000000000000323307346545000016663 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Printer for fixity maps. module Ormolu.Fixity.Printer ( printFixityMap, ) where import qualified Data.Char as Char import qualified Data.Map.Strict as Map import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Lazy as TL import Data.Text.Lazy.Builder (Builder) import qualified Data.Text.Lazy.Builder as B import qualified Data.Text.Lazy.Builder.Int as B import Ormolu.Fixity -- | Print out a textual representation of a 'FixityMap'. printFixityMap :: FixityMap -> Text printFixityMap = TL.toStrict . B.toLazyText . mconcat . fmap renderOne . concatMap decompose . Map.toList where decompose :: (OpName, FixityInfo) -> [(FixityDirection, Int, OpName)] decompose (operator, FixityInfo {..}) = let forDirection dir = (dir, fiMinPrecedence, operator) : [ (dir, fiMaxPrecedence, operator) | fiMinPrecedence /= fiMaxPrecedence ] in case fiDirection of Nothing -> concatMap forDirection [InfixL, InfixR] Just dir -> forDirection dir renderOne :: (FixityDirection, Int, OpName) -> Builder renderOne (fixityDirection, n, OpName operator) = mconcat [ case fixityDirection of InfixL -> "infixl" InfixR -> "infixr" InfixN -> "infix", " ", B.decimal n, " ", if isTickedOperator operator then "`" <> B.fromText operator <> "`" else B.fromText operator, "\n" ] isTickedOperator = maybe True (Char.isLetter . fst) . T.uncons ormolu-0.5.3.0/src/Ormolu/Imports.hs0000644000000000000000000001654007346545000015426 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} -- | 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 qualified Data.Map.Strict 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 GHC.Unit.Module.Name import GHC.Unit.Types 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 { ideclHiding = second (fmap normalizeLies) <$> ideclHiding, .. } -- | 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 { ideclHiding = case (ideclHiding, GHC.ideclHiding 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 :: Maybe LexicalFastString, importIdName :: ModuleName, importSource :: IsBootInterface, importSafe :: Bool, importQualified :: Bool, importImplicit :: Bool, importAs :: Maybe ModuleName, importHiding :: Maybe Bool } deriving (Eq, Ord) -- | Obtain an 'ImportId' for a given import. importId :: LImportDecl GhcPs -> ImportId importId (L _ ImportDecl {..}) = ImportId { importIsPrelude = isPrelude, importIdName = moduleName, importPkgQual = rawPkgQualToLFS ideclPkgQual, importSource = ideclSource, importSafe = ideclSafe, importQualified = case ideclQualified of QualifiedPre -> True QualifiedPost -> True NotQualified -> False, importImplicit = ideclImplicit, importAs = unLoc <$> ideclAs, importHiding = fst <$> ideclHiding } where isPrelude = moduleNameString moduleName == "Prelude" moduleName = unLoc ideclName rawPkgQualToLFS = \case RawPkgQual fs -> Just . LexicalFastString . sl_fs $ fs NoRawPkgQual -> Nothing -- | 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' 'RdrName'@ that allows us to define an -- 'Ord' instance for it. newtype IEWrappedNameOrd = IEWrappedNameOrd (IEWrappedName RdrName) deriving (Eq) instance Ord IEWrappedNameOrd where compare (IEWrappedNameOrd x) (IEWrappedNameOrd y) = compareIewn x y -- | Project @'IEWrappedName' 'RdrName'@ 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 RdrName -> LIEWrappedName RdrName -> Ordering compareLIewn = compareIewn `on` unLoc -- | Compare two @'IEWrapppedName' 'RdrName'@ things. compareIewn :: IEWrappedName RdrName -> IEWrappedName RdrName -> 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.5.3.0/src/Ormolu/Parser.hs0000644000000000000000000002360407346545000015224 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# 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 import qualified Data.List as L import qualified Data.List.NonEmpty as NE import Data.Text (Text) import GHC.Data.Bag (bagToList) import qualified GHC.Data.EnumSet as EnumSet import qualified GHC.Data.FastString as GHC import qualified GHC.Driver.CmdLine as GHC import GHC.Driver.Config.Parser (initParserOpts) import GHC.Driver.Session as GHC import GHC.DynFlags (baseDynFlags) import GHC.Hs hiding (UnicodeSyntax) import GHC.LanguageExtensions.Type (Extension (..)) import qualified GHC.Parser as GHC import qualified GHC.Parser.Header as GHC import qualified GHC.Parser.Lexer as GHC import GHC.Types.Error (getMessages) import qualified GHC.Types.SourceError as GHC (handleSourceError) import GHC.Types.SrcLoc import GHC.Utils.Error import GHC.Utils.Outputable (defaultSDocContext) import qualified GHC.Utils.Panic as GHC import Ormolu.Config import Ormolu.Exception import Ormolu.Fixity (LazyFixityMap) import Ormolu.Imports (normalizeImports) import Ormolu.Parser.CommentStream import Ormolu.Parser.Result import Ormolu.Processing.Common import Ormolu.Processing.Preprocess import Ormolu.Utils (incSpanLine, showOutputable, textToStringBuffer) -- | Parse a complete module from string. parseModule :: (MonadIO m) => -- | Ormolu configuration Config RegionDeltas -> -- | Fixity map to include in the resulting 'ParseResult's LazyFixityMap -> -- | File name (only for source location annotations) FilePath -> -- | Input for parser Text -> m ( [GHC.Warn], Either (SrcSpan, String) [SourceSnippet] ) parseModule config@Config {..} fixityMap 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 (warnings, dynFlags) <- parsePragmasIntoDynFlags baseFlags extraOpts path rawInput >>= \case Right res -> pure res Left err -> let loc = mkSrcSpan (mkSrcLoc (GHC.mkFastString path) 1 1) (mkSrcLoc (GHC.mkFastString path) 1 1) in throwIO (OrmoluParsingFailed loc err) let cppEnabled = EnumSet.member Cpp (GHC.extensionFlags dynFlags) snippets <- runExceptT . forM (preprocess cppEnabled cfgRegion rawInput) $ \case Right region -> fmap ParsedSnippet . ExceptT $ parseModuleSnippet (config $> region) fixityMap dynFlags path rawInput Left raw -> pure $ RawSnippet raw pure (warnings, snippets) parseModuleSnippet :: (MonadIO m) => Config RegionDeltas -> LazyFixityMap -> DynFlags -> FilePath -> Text -> m (Either (SrcSpan, String) ParseResult) parseModuleSnippet Config {..} fixityMap dynFlags path rawInput = liftIO $ do let (input, indent) = removeIndentation . linesInRegion cfgRegion $ rawInput let pStateErrors pstate = let errs = bagToList . getMessages $ GHC.getPsErrorMessages pstate fixupErrSpan = incSpanLine (regionPrefixLength cfgRegion) rateSeverity = \case SevError -> 1 :: Int SevWarning -> 2 SevIgnore -> 3 showErr = showOutputable . formatBulleted defaultSDocContext . diagnosticMessage . errMsgDiagnostic in case L.sortOn (rateSeverity . errMsgSeverity) errs of [] -> Nothing err : _ -> -- Show instance returns a short error message 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, prFixityOverrides = cfgFixityOverrides, prFixityMap = fixityMap, prIndent = indent } return r -- | Normalize a 'HsModule' by sorting its import\/export lists, dropping -- blank comments, etc. normalizeModule :: HsModule -> HsModule normalizeModule hsmod = everywhere (extT (mkT dropBlankTypeHaddocks) patchContext) hsmod { hsmodImports = normalizeImports (hsmodImports hsmod), hsmodDecls = filter (not . isBlankDocD . unLoc) (hsmodDecls hsmod), hsmodHaddockModHeader = mfilter (not . isBlankDocString) (hsmodHaddockModHeader 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 patchContext :: LHsContext GhcPs -> LHsContext GhcPs patchContext = mapLoc $ \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 ] -- | 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 parsePragmasIntoDynFlags :: -- | Pre-set 'DynFlags' DynFlags -> -- | Extra options (provided by user) [Located String] -> -- | File name (only for source location annotations) FilePath -> -- | Input for parser Text -> IO (Either String ([GHC.Warn], DynFlags)) parsePragmasIntoDynFlags flags extraOpts filepath str = catchErrors $ do let (_warnings, fileOpts) = GHC.getOptions (initParserOpts flags) (textToStringBuffer str) 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'') where catchErrors act = GHC.handleGhcException reportErr (GHC.handleSourceError reportErr act) reportErr e = return $ Left (show e) ormolu-0.5.3.0/src/Ormolu/Parser/0000755000000000000000000000000007346545000014663 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Parser/CommentStream.hs0000644000000000000000000002353407346545000020004 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE ViewPatterns #-} -- | Functions for working with comment stream. module Ormolu.Parser.CommentStream ( -- * Comment stream CommentStream (..), mkCommentStream, showCommentStream, -- * Comment 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 qualified Data.List.NonEmpty as NE import qualified Data.Map.Lazy as M import Data.Maybe import qualified Data.Set as S import Data.Text (Text) import qualified Data.Text as T import qualified GHC.Data.Strict 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 qualified GHC.Parser.Annotation as GHC import GHC.Types.SrcLoc import Ormolu.Parser.Pragma import Ormolu.Utils (onTheSameLine, showOutputable) ---------------------------------------------------------------------------- -- Comment stream -- | A stream of 'RealLocated' 'Comment's in ascending order with respect to -- beginning of corresponding spans. newtype CommentStream = CommentStream [RealLocated Comment] 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 -> -- | Stack header, pragmas, and comment stream ( Maybe (RealLocated Comment), [([RealLocated Comment], 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 -- | Pretty-print a 'CommentStream'. showCommentStream :: CommentStream -> String showCommentStream (CommentStream xs) = unlines $ showComment <$> xs where showComment (L l str) = showOutputable l ++ " " ++ show str ---------------------------------------------------------------------------- -- 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)], RealLocated Comment) 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 (RealLocated Comment)) 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] -> ([RealLocated Comment], [([RealLocated Comment], 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.5.3.0/src/Ormolu/Parser/Pragma.hs0000644000000000000000000000441307346545000016430 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 qualified Data.Text as T import qualified Data.Text.Encoding as T import GHC.Data.FastString (bytesFS, mkFastString) import GHC.Driver.Config.Parser (initParserOpts) import GHC.DynFlags (baseDynFlags) import qualified GHC.Parser.Lexer 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.5.3.0/src/Ormolu/Parser/Result.hs0000644000000000000000000000245707346545000016505 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} -- | 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 GHC.Types.SrcLoc import Ormolu.Config (SourceType) import Ormolu.Fixity (FixityMap, LazyFixityMap) 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, -- | Either regular module or signature file prSourceType :: SourceType, -- | Stack header prStackHeader :: Maybe (RealLocated Comment), -- | Pragmas and the associated comments prPragmas :: [([RealLocated Comment], Pragma)], -- | Comment stream prCommentStream :: CommentStream, -- | Enabled extensions prExtensions :: EnumSet Extension, -- | Fixity overrides prFixityOverrides :: FixityMap, -- | Fixity map for operators prFixityMap :: LazyFixityMap, -- | Indentation level, can be non-zero in case of region formatting prIndent :: Int } ormolu-0.5.3.0/src/Ormolu/Printer.hs0000644000000000000000000000177707346545000015422 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Pretty-printer for Haskell AST. module Ormolu.Printer ( printSnippets, ) where import Data.Text (Text) import qualified Data.Text 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 prFixityOverrides prFixityMap RawSnippet r -> r ormolu-0.5.3.0/src/Ormolu/Printer/0000755000000000000000000000000007346545000015052 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Printer/Combinators.hs0000644000000000000000000002026007346545000017666 0ustar0000000000000000{-# LANGUAGE FlexibleContexts #-} {-# 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, isExtensionEnabled, -- * Combinators -- ** Basic txt, atom, space, newline, inci, inciIf, inciHalf, askSourceType, askFixityOverrides, askFixityMap, located, 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 qualified GHC.Data.Strict as Strict import GHC.Types.SrcLoc import Ormolu.Printer.Comments import Ormolu.Printer.Internal import Ormolu.Utils (HasSrcSpan (..)) ---------------------------------------------------------------------------- -- 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 -- | 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.5.3.0/src/Ormolu/Printer/Comments.hs0000644000000000000000000002267607346545000017210 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# 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 qualified Data.List.NonEmpty 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 gotSome <- handleCommentSeries (spitPrecedingComment ref) when gotSome $ 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 -> -- | Are we done? R Bool 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 -> -- | Are we done? R Bool 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 <- getEnclosingSpan (/= 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 :: -- | Are we done? R Bool 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 :: -- | Given location of previous comment, output the next comment -- returning 'True' if we're done R Bool -> -- | Whether we printed any comments R Bool handleCommentSeries f = go False where go gotSome = do done <- f if done then return gotSome else go True -- | Try to pop a comment using given predicate and if there is a comment -- matching the predicate, print it out. withPoppedComment :: -- | Comment predicate (RealLocated Comment -> Bool) -> -- | Printing function (RealSrcSpan -> Comment -> R ()) -> -- | Are we done? R Bool withPoppedComment p f = do r <- popComment p case r of Nothing -> return True Just (L l comment) -> False <$ f l comment -- | 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 RealLocated Comment -> 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.5.3.0/src/Ormolu/Printer/Internal.hs0000644000000000000000000004305607346545000017172 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} -- | 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, askFixityOverrides, askFixityMap, inci, inciHalf, sitcc, Layout (..), enterLayout, vlayout, getLayout, -- * Helpers for braces useBraces, dontUseBraces, canUseBraces, -- * Special helpers for comment placement CommentPosition (..), registerPendingCommentLine, trimSpanStream, nextEltSpan, popComment, getEnclosingSpan, 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.Maybe (listToMaybe) import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Lazy as TL import Data.Text.Lazy.Builder import GHC.Data.EnumSet (EnumSet) import qualified GHC.Data.EnumSet as EnumSet import GHC.LanguageExtensions.Type import GHC.Types.SrcLoc import GHC.Utils.Outputable (Outputable) import Ormolu.Config (SourceType (..)) import Ormolu.Fixity (FixityMap, LazyFixityMap) 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, -- | Fixity map overrides, kept separately because if we parametrized -- 'Ormolu.Fixity.buildFixityMap' by fixity overrides it would break -- memoization rcFixityOverrides :: FixityMap, -- | Fixity map for operators rcFixityMap :: LazyFixityMap } -- | 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 -> -- | Fixity overrides FixityMap -> -- | Fixity map LazyFixityMap -> -- | Resulting rendition Text runR (R m) sstream cstream sourceType extensions fixityOverrides fixityMap = TL.toStrict . toLazyText . scBuilder $ execState (runReaderT m rc) sc where rc = RC { rcIndent = 0, rcLayout = MultiLine, rcEnclosingSpans = [], rcCanUseBraces = False, rcExtensions = extensions, rcSourceType = sourceType, rcFixityOverrides = fixityOverrides, rcFixityMap = fixityMap } 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 fixity overrides map. askFixityOverrides :: R FixityMap askFixityOverrides = R (asks rcFixityOverrides) -- | Retrieve the lazy fixity map. askFixityMap :: R LazyFixityMap askFixityMap = R (asks rcFixityMap) 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 -- | In rare cases, we have to indent by a positive amount smaller -- than 'indentStep'. inciHalf :: R () -> R () inciHalf = inciBy $ (indentStep `div` 2) `max` 1 -- | 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 :: (RealLocated Comment -> Bool) -> R (Maybe (RealLocated Comment)) popComment f = R $ do CommentStream cstream <- gets scCommentStream case cstream of [] -> return Nothing (x : xs) -> if f x then Just x <$ modify ( \sc -> sc { scCommentStream = CommentStream xs } ) else return Nothing -- | Get the first enclosing 'RealSrcSpan' that satisfies given predicate. getEnclosingSpan :: -- | Predicate to use (RealSrcSpan -> Bool) -> R (Maybe RealSrcSpan) getEnclosingSpan f = listToMaybe . filter 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.5.3.0/src/Ormolu/Printer/Meat/0000755000000000000000000000000007346545000015740 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Common.hs0000644000000000000000000001200607346545000017523 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} -- | 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 qualified Data.Text as T import GHC.Hs.Doc import GHC.Hs.Extension (GhcPs) import GHC.Hs.ImpExp import GHC.Parser.Annotation import GHC.Types.Name.Occurrence (OccName (..)) import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import GHC.Unit.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 RdrName -> 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 let wrapper = \case EpAnn {anns} -> case anns of NameAnnQuote {nann_quoted} -> tickPrefix . wrapper (ann nann_quoted) NameAnn {nann_adornment = NameParens} -> parens N NameAnn {nann_adornment = NameBackquotes} -> backticks -- special case for unboxed unit tuples NameAnnOnly {nann_adornment = NameParensHash} -> const $ txt "(# #)" _ -> id EpAnnNotUsed -> 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 (const True) >>= 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 -> space >> txt (T.pack s) ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Declaration.hs0000644000000000000000000002623107346545000020525 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# 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 qualified Data.List.NonEmpty 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.5.3.0/src/Ormolu/Printer/Meat/Declaration.hs-boot0000644000000000000000000000050707346545000021464 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/0000755000000000000000000000000007346545000020165 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Declaration/Annotation.hs0000644000000000000000000000120507346545000022631 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Class.hs0000644000000000000000000000612607346545000021573 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Data.hs0000644000000000000000000001735507346545000021405 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.Maybe (isJust, maybeToList) import Data.Void import qualified GHC.Data.Strict 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_ND of NewType -> "newtype" DataType -> "data" txt $ case style of Associated -> mempty Free -> " instance" case unLoc <$> dd_cType of Nothing -> pure () Just (CType prag header (type_, _)) -> do p_sourceText prag case header of Nothing -> pure () Just (Header h _) -> space *> p_sourceText h p_sourceText type_ txt " #-}" let constructorSpans = getLocA name : fmap lhsTypeArgSrcSpan tpats sigSpans = maybeToList . fmap getLocA $ dd_kindSig declHeaderSpans = constructorSpans ++ sigSpans switchLayout declHeaderSpans $ do breakpoint inci $ do 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 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 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 case con_names of [] -> return () (c : cs) -> do 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 unless (null xs) breakpoint inci . sitcc $ sep breakpoint (sitcc . located' p_hsTypePostDoc) (hsScaledThing <$> xs) 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 f _ = False ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Declaration/Default.hs0000644000000000000000000000062007346545000022103 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Foreign.hs0000644000000000000000000000366307346545000022122 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# 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 -> R () p_foreignImport (CImport cCallConv safety _ _ sourceText) = do txt "foreign import" space located cCallConv atom -- Need to check for 'noLoc' for the 'safe' annotation when (isGoodSrcSpan $ getLoc safety) (space >> atom safety) located sourceText p_sourceText p_foreignExport :: ForeignExport -> R () p_foreignExport (CExport (L loc (CExportStatic _ _ cCallConv)) sourceText) = do txt "foreign export" space located (L loc cCallConv) atom located sourceText p_sourceText ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Declaration/Instance.hs0000644000000000000000000000730607346545000022273 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/OpTree.hs0000644000000000000000000002061207346545000021720 0ustar0000000000000000{-# LANGUAGE BlockArguments #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} -- | 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 ( 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' 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 (opiFix 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/OpTree.hs-boot0000644000000000000000000000160207346545000022657 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/RoleAnnotation.hs0000644000000000000000000000162607346545000023462 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Rule.hs0000644000000000000000000000312307346545000021427 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 :: (SourceText, 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Signature.hs0000644000000000000000000001270007346545000022462 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 _ _sourceText cs ty -> p_completeSig cs ty SCCFunSig _ _ name literal -> p_sccSig name literal _ -> notImplemented "certain types of signature declarations" 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Splice.hs0000644000000000000000000000052707346545000021744 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Ormolu.Printer.Meat.Declaration.Splice ( p_spliceDecl, ) where import GHC.Hs import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Declaration.Value (p_hsSplice) p_spliceDecl :: SpliceDecl GhcPs -> R () p_spliceDecl = \case SpliceDecl NoExtField splice _explicit -> located splice p_hsSplice ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Declaration/Type.hs0000644000000000000000000000200607346545000021440 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs0000644000000000000000000000604407346545000022610 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Value.hs0000644000000000000000000012072207346545000021601 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Printer.Meat.Declaration.Value ( p_valDecl, p_pat, p_hsExpr, p_hsSplice, p_stringLit, 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 qualified Data.List.NonEmpty as NE import Data.Maybe import Data.Text (Text) import qualified Data.Text as Text import Data.Void import GHC.Data.Bag (bagToList) import GHC.Data.FastString (FastString, lengthFS) import qualified GHC.Data.Strict 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 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 -> 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 (NE.head ne_pats) of LazyPat _ _ -> True BangPat _ _ -> True SplicePat _ _ -> True _ -> False txt "\\" when needsSpace space sitcc stdCase LambdaCase -> stdCase 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' N p_hsCmd' :: BracketStyle -> HsCmd GhcPs -> R () p_hsCmd' 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 fixityOverrides <- askFixityOverrides fixityMap <- askFixityMap let opTree = OpBranches [cmdOpTree left, cmdOpTree right] [form] p_cmdOpTree s (reassociateOpTree (getOpName . unLoc) fixityOverrides fixityMap opTree) HsCmdArrForm _ _ Infix _ _ -> notImplemented "HsCmdArrForm" HsCmdApp _ cmd expr -> do located cmd (p_hsCmd' s) space 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 cmdPlacement p_hsCmd e mgroup HsCmdLamCase _ variant mgroup -> p_lamcase 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 cmdPlacement (p_hsCmd' S) es -- | Print a top-level command. p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () p_hsCmdTop s (HsCmdTop _ cmd) = located cmd (p_hsCmd' 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 ) => -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Statements to render LocatedL [LocatedA (Stmt GhcPs (LocatedA body))] -> R () p_stmts placer render es = do breakpoint ub <- layoutToBraces <$> getLayout inci . located es $ sepSemi (ub . withSpacing (p_stmt' placer render)) 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_lFieldLabelString . dfoLabel where p_lFieldLabelString (L (locA -> s) fs) = parensIfOp . atom @FastString $ fs where -- HACK For OverloadedRecordUpdate: -- In operator field updates (i.e. `f {(+) = 1}`), we don't have -- information whether parens are necessary. As a workaround, -- we look if the RealSrcSpan is bigger than the string fs. parensIfOp | isOneLineSpan s, Just realS <- srcSpanToRealSrcSpan s, let spanLength = srcSpanEndCol realS - srcSpanStartCol realS, lengthFS fs < spanLength = parens N | otherwise = id 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' N p_hsExpr' :: BracketStyle -> HsExpr GhcPs -> R () p_hsExpr' s = \case HsVar _ name -> p_rdrName name HsUnboundVar _ occ -> atom occ HsRecSel _ fldOcc -> p_fieldOcc fldOcc HsOverLabel _ v -> do txt "#" atom v 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 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 let -- Usually we want to bump indentation for arguments for the -- sake of readability. However: -- When the function is itself a multi line do-block or a case -- expression, we can't indent by indentStep or more. -- When we are on the other hand *in* a do block, we have to -- indent by at least 1. -- Thus, we indent by half of indentStep when the function is -- a multi line do block or case expression. indentArg | isOneLineSpan (getLocA func) = inci | otherwise = case unLoc func of HsDo {} -> inciHalf HsCase {} -> inciHalf HsLamCase {} -> inciHalf _ -> inci ub <- getLayout <&> \case SingleLine -> useBraces MultiLine -> id ub $ do located func (p_hsExpr' s) breakpoint indentArg $ sep breakpoint (located' p_hsExpr) initp indentArg $ do unless (null initp) breakpoint located lastp p_hsExpr Hanging -> do useBraces . switchLayout [initSpan] $ do located func (p_hsExpr' s) breakpoint sep breakpoint (located' p_hsExpr) initp placeHanging placement . dontUseBraces $ 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 fixityOverrides <- askFixityOverrides fixityMap <- askFixityMap let opTree = OpBranches [exprOpTree x, exprOpTree y] [op] p_exprOpTree s (reassociateOpTree (getOpName . unLoc) fixityOverrides fixityMap 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 (const True) 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 exprPlacement p_hsExpr e mgroup HsIf _ if' then' else' -> p_if exprPlacement p_hsExpr if' then' else' HsMultiIf _ guards -> do txt "if" breakpoint inci . inci $ 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 exprPlacement (p_hsExpr' 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 HsSpliceE _ splice -> p_hsSplice splice 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 ) => -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Expression LHsExpr GhcPs -> -- | Match group MatchGroup GhcPs (LocatedA body) -> R () p_case placer render e mgroup = do txt "case" space located e p_hsExpr space txt "of" breakpoint inci (p_matchGroup' placer render Case mgroup) p_lamcase :: ( Anno (GRHS GhcPs (LocatedA body)) ~ SrcAnn NoEpAnns, Anno (Match GhcPs (LocatedA body)) ~ SrcSpanAnnA ) => -- | Variant (@\\case@ or @\\cases@) LamCaseVariant -> -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Expression MatchGroup GhcPs (LocatedA body) -> R () p_lamcase variant placer render mgroup = do txt $ case variant of LamCase -> "\\case" LamCases -> "\\cases" breakpoint inci (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_hsPatSigType (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 _ 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_hsSplice 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_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_hsSplice :: HsSplice GhcPs -> R () p_hsSplice = \case HsTypedSplice _ deco _ expr -> p_hsSpliceTH True expr deco HsUntypedSplice _ deco _ 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 "|]" HsSpliced {} -> notImplemented "HsSpliced" 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.5.3.0/src/Ormolu/Printer/Meat/Declaration/Value.hs-boot0000644000000000000000000000124607346545000022541 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration.Value ( p_valDecl, p_pat, p_hsExpr, p_hsSplice, p_stringLit, p_hsExpr', p_hsCmdTop, exprPlacement, cmdTopPlacement, ) where import GHC.Hs.Binds import GHC.Hs.Expr import GHC.Hs.Extension import GHC.Hs.Pat import Ormolu.Printer.Combinators p_valDecl :: HsBindLR GhcPs GhcPs -> R () p_pat :: Pat GhcPs -> R () p_hsExpr :: HsExpr GhcPs -> R () p_hsSplice :: HsSplice GhcPs -> R () p_stringLit :: String -> R () p_hsExpr' :: BracketStyle -> HsExpr GhcPs -> R () p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () exprPlacement :: HsExpr GhcPs -> Placement cmdTopPlacement :: HsCmdTop GhcPs -> Placement ormolu-0.5.3.0/src/Ormolu/Printer/Meat/Declaration/Warning.hs0000644000000000000000000000265707346545000022140 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.5.3.0/src/Ormolu/Printer/Meat/ImportExport.hs0000644000000000000000000000627007346545000020755 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 GHC.Unit.Types import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Utils (RelativePos (..), attachRelativePos) p_hsmodExports :: [LIE GhcPs] -> R () p_hsmodExports [] = do txt "(" breakpoint' txt ")" 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 ideclHiding of Nothing -> return () Just (hiding, _) -> when hiding (txt "hiding") case ideclHiding of Nothing -> return () Just (_, L _ xs) -> do 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.5.3.0/src/Ormolu/Printer/Meat/Module.hs0000644000000000000000000000365607346545000017533 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# 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 (RealLocated Comment) -> -- | Pragmas and the associated comments [([RealLocated Comment], Pragma)] -> -- | AST to print HsModule -> R () p_hsModule mstackHeader pragmas HsModule {..} = do let 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 located 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.5.3.0/src/Ormolu/Printer/Meat/Pragma.hs0000644000000000000000000000575707346545000017521 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 qualified Data.List as L import Data.Set (Set) import qualified Data.Set as Set import Data.Text (Text) import qualified Data.Text 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 :: [([RealLocated Comment], 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 :: [RealLocated Comment] -> 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.5.3.0/src/Ormolu/Printer/Meat/Type.hs0000644000000000000000000002310707346545000017220 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} -- | Rendering of types. module Ormolu.Printer.Meat.Type ( p_hsType, p_hsTypePostDoc, hasDocStrings, p_hsContext, p_hsTyVarBndr, ForAllVisibility (..), p_forallBndrs, p_conDeclFields, p_lhsTypeArg, p_hsSigType, tyVarsToTyPats, hsOuterTyVarBndrsToHsType, lhsTypeToSigType, ) where import GHC.Hs import GHC.Types.Basic 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_hsSplice, p_stringLit) import Ormolu.Printer.Operators import Ormolu.Utils p_hsType :: HsType GhcPs -> R () p_hsType t = p_hsType' (hasDocStrings t) PipeStyle t p_hsTypePostDoc :: HsType GhcPs -> R () p_hsTypePostDoc t = p_hsType' (hasDocStrings t) CaretStyle t -- | How to render Haddocks associated with a type. data TypeDocStyle = PipeStyle | CaretStyle p_hsType' :: Bool -> TypeDocStyle -> HsType GhcPs -> R () p_hsType' multilineArgs docStyle = \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 fixityOverrides <- askFixityOverrides fixityMap <- askFixityMap let opTree = OpBranches [tyOpTree x, tyOpTree y] [op] p_tyOpTree (reassociateOpTree (Just . unLoc) fixityOverrides fixityMap 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_hsSplice splice HsDocTy _ t str -> case docStyle of PipeStyle -> do p_hsDoc Pipe True str located t p_hsType CaretStyle -> do located t p_hsType newline p_hsDoc Caret False str 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 both this list itself and the first element is promoted, -- we need to put a space in between or it fails to parse. case (p, xs) of (IsPromoted, L _ t : _) | isPromoted t -> space _ -> return () sep commaDel (sitcc . located' p_hsType) xs HsExplicitTupleTy _ xs -> do txt "'" parens N $ do case xs of L _ t : _ | isPromoted 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 isPromoted = \case HsAppTy _ (L _ f) _ -> isPromoted f HsTyVar _ IsPromoted _ -> True HsExplicitTupleTy {} -> True HsExplicitListTy {} -> True _ -> False interArgBreak = if multilineArgs then newline else breakpoint p_hsTypeR = p_hsType' multilineArgs docStyle -- | 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.5.3.0/src/Ormolu/Printer/Operators.hs0000644000000000000000000003751107346545000017373 0ustar0000000000000000{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ScopedTypeVariables #-} -- | 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 Control.Applicative ((<|>)) import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map import Data.Maybe (fromMaybe) 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 OpName' here instead of 'OpName' -- because the name-fetching function received by 'reassociateOpTree' -- returns a 'Maybe' opiName :: Maybe OpName, -- | Information about the fixity direction and precedence level of the -- operator opiFix :: FixityInfo } 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 FixityInfo {fiMinPrecedence = min1, fiMaxPrecedence = max1}) (OpInfo _ mName2 FixityInfo {fiMinPrecedence = min2, fiMaxPrecedence = 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 overrides FixityMap -> -- | Fixity Map LazyFixityMap -> -- | Original 'OpTree' OpTree ty op -> -- | Re-associated 'OpTree', with added context and info around operators OpTree ty (OpInfo op) reassociateOpTree getOpName fixityOverrides fixityMap = reassociateFlatOpTree . makeFlatOpTree . addFixityInfo fixityOverrides fixityMap getOpName -- | Wrap every operator of the tree with 'OpInfo' to carry the information -- about its fixity (extracted from the specified fixity map). addFixityInfo :: -- | Fixity overrides FixityMap -> -- | Fixity map for operators LazyFixityMap -> -- | 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 fixityOverrides fixityMap getOpName (OpBranches exprs ops) = OpBranches (addFixityInfo fixityOverrides fixityMap getOpName <$> exprs) (toOpInfo <$> ops) where toOpInfo o = OpInfo o mName fixityInfo where mName = occOpName . rdrNameOcc <$> getOpName o fixityInfo = fromMaybe defaultFixityInfo ( do name <- mName Map.lookup name fixityOverrides <|> lookupFixity name fixityMap ) -- | 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 . opiFix . 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 :: FixityInfo -> Bool isHardSplitterOp = (== FixityInfo (Just InfixR) 0 0) ormolu-0.5.3.0/src/Ormolu/Printer/SpanStream.hs0000644000000000000000000000273607346545000017473 0ustar0000000000000000{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | Build span stream from AST. module Ormolu.Printer.SpanStream ( SpanStream (..), mkSpanStream, ) where import Data.DList (DList) import qualified Data.DList as D import Data.Data (Data) import Data.Generics (everything, ext1Q, ext2Q) import Data.List (sortOn) import Data.Maybe (maybeToList) 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 . D.toList $ everything mappend (const mempty `ext2Q` queryLocated `ext1Q` querySrcSpanAnn) a where queryLocated :: (Data e0) => GenLocated e0 e1 -> DList RealSrcSpan queryLocated (L mspn _) = maybe mempty srcSpanToRealSrcSpanDList (cast mspn :: Maybe SrcSpan) querySrcSpanAnn :: SrcSpanAnn' a -> DList RealSrcSpan querySrcSpanAnn = srcSpanToRealSrcSpanDList . locA srcSpanToRealSrcSpanDList = D.fromList . maybeToList . srcSpanToRealSrcSpan ormolu-0.5.3.0/src/Ormolu/Processing/0000755000000000000000000000000007346545000015543 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Processing/Common.hs0000644000000000000000000000340607346545000017332 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 qualified Data.IntSet as IntSet import Data.Text (Text) import qualified Data.Text 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.5.3.0/src/Ormolu/Processing/Cpp.hs0000644000000000000000000000360107346545000016621 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- | Support for CPP. module Ormolu.Processing.Cpp ( cppLines, ) where import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.Maybe (isJust) import Data.Text (Text) import qualified Data.Text 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 ormolu-0.5.3.0/src/Ormolu/Processing/Preprocess.hs0000644000000000000000000001422407346545000020227 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} {-# 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 qualified Data.IntMap.Strict as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import qualified Data.List as L import Data.Maybe (isJust) import Data.Text (Text) import qualified Data.Text 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.5.3.0/src/Ormolu/Terminal.hs0000644000000000000000000000565407346545000015550 0ustar0000000000000000{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | An abstraction for colorful output in terminal. module Ormolu.Terminal ( -- * The 'Term' monad Term, ColorMode (..), runTerm, -- * Styling bold, cyan, green, red, -- * Printing put, putS, putSrcSpan, putRealSrcSpan, newline, ) where import Control.Monad.Reader import Data.Text (Text) import qualified Data.Text.IO as T import GHC.Types.SrcLoc import Ormolu.Utils (showOutputable) import System.Console.ANSI import System.IO (Handle, hFlush, hPutStr) ---------------------------------------------------------------------------- -- The 'Term' monad -- | Terminal monad. newtype Term a = Term (ReaderT RC IO a) deriving (Functor, Applicative, Monad) -- | Reader context of 'Term'. data RC = RC { -- | Whether to use colors rcUseColor :: Bool, -- | Handle to print to rcHandle :: Handle } -- | Whether to use colors and other features of ANSI terminals. data ColorMode = Never | Always | Auto deriving (Eq, Show) -- | Run 'Term' monad. runTerm :: -- | Monad to run Term a -> -- | Color mode ColorMode -> -- | Handle to print to Handle -> IO a runTerm (Term m) colorMode rcHandle = do rcUseColor <- case colorMode of Never -> return False Always -> return True Auto -> hSupportsANSI rcHandle x <- runReaderT m RC {..} hFlush rcHandle return x ---------------------------------------------------------------------------- -- Styling -- | Make the inner computation output bold text. bold :: Term a -> Term a bold = withSGR [SetConsoleIntensity BoldIntensity] -- | Make the inner computation output cyan text. cyan :: Term a -> Term a cyan = withSGR [SetColor Foreground Dull Cyan] -- | Make the inner computation output green text. green :: Term a -> Term a green = withSGR [SetColor Foreground Dull Green] -- | Make the inner computation output red text. red :: Term a -> Term a red = withSGR [SetColor Foreground Dull Red] -- | Alter 'SGR' for inner computation. withSGR :: [SGR] -> Term a -> Term a withSGR sgrs (Term m) = Term $ do RC {..} <- ask if rcUseColor then do liftIO $ hSetSGR rcHandle sgrs x <- m liftIO $ hSetSGR rcHandle [Reset] return x else m ---------------------------------------------------------------------------- -- Printing -- | Output 'Text'. put :: Text -> Term () put txt = Term $ do RC {..} <- ask liftIO $ T.hPutStr rcHandle txt -- | Output 'String'. putS :: String -> Term () putS str = Term $ do RC {..} <- ask liftIO $ hPutStr rcHandle str -- | Output a 'GHC.SrcSpan'. putSrcSpan :: SrcSpan -> Term () putSrcSpan = putS . showOutputable -- | Output a 'GHC.RealSrcSpan'. putRealSrcSpan :: RealSrcSpan -> Term () putRealSrcSpan = putS . showOutputable -- | Output a newline. newline :: Term () newline = Term $ do RC {..} <- ask liftIO $ T.hPutStr rcHandle "\n" ormolu-0.5.3.0/src/Ormolu/Utils.hs0000644000000000000000000001233507346545000015067 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Random utilities used by the code. module Ormolu.Utils ( RelativePos (..), attachRelativePos, combineSrcSpans', notImplemented, showOutputable, splitDocString, incSpanLine, separatedByBlank, separatedByBlankNE, onTheSameLine, HasSrcSpan (..), getLoc', matchAddEpAnn, textToStringBuffer, ) where import Data.List (dropWhileEnd) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE import Data.Maybe (fromMaybe) import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Foreign as TFFI import Foreign (pokeElemOff, withForeignPtr) import qualified GHC.Data.Strict as Strict import GHC.Data.StringBuffer (StringBuffer (..)) import GHC.Driver.Ppr import GHC.DynFlags (baseDynFlags) import GHC.ForeignPtr (mallocPlainForeignPtrBytes) import GHC.Hs import GHC.IO.Unsafe (unsafePerformIO) import GHC.Types.SrcLoc import GHC.Utils.Outputable -- | 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 ormolu-0.5.3.0/src/Ormolu/Utils/0000755000000000000000000000000007346545000014527 5ustar0000000000000000ormolu-0.5.3.0/src/Ormolu/Utils/Cabal.hs0000644000000000000000000001776607346545000016106 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Utils.Cabal ( CabalSearchResult (..), CabalInfo (..), Extension (..), getCabalInfoForSourceFile, findCabalFile, parseCabalInfo, ) where import Control.Exception import Control.Monad.IO.Class import qualified Data.ByteString as B import Data.IORef import Data.Map.Lazy (Map) import qualified Data.Map.Lazy as M import Data.Maybe (maybeToList) import Data.Set (Set) import qualified Data.Set as Set import qualified Distribution.ModuleName as ModuleName import Distribution.PackageDescription import Distribution.PackageDescription.Parsec import qualified Distribution.Types.CondTree as CT import Distribution.Utils.Path (getSymbolicPath) import Language.Haskell.Extension import Ormolu.Config import Ormolu.Exception import System.Directory import System.FilePath import System.IO.Error (isDoesNotExistError) 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 $ do 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 sourceFile = liftIO $ do parentDir <- takeDirectory <$> makeAbsolute sourceFile dirEntries <- listDirectory parentDir `catch` \case (isDoesNotExistError -> True) -> pure [] e -> throwIO e let findDotCabal = \case [] -> pure Nothing e : es | takeExtension e == ".cabal" -> doesFileExist (parentDir e) >>= \case True -> pure $ Just e False -> findDotCabal es _ : es -> findDotCabal es findDotCabal dirEntries >>= \case Just cabalFile -> pure . Just $ parentDir cabalFile Nothing -> if isDrive parentDir then pure Nothing else findCabalFile parentDir -- | 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. cabalCacheRef :: IORef (Map FilePath CachedCabalFile) cabalCacheRef = unsafePerformIO $ newIORef M.empty {-# NOINLINE cabalCacheRef #-} -- | 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 cabalCache <- readIORef cabalCacheRef CachedCabalFile {..} <- whenNothing (M.lookup cabalFile cabalCache) $ do cabalFileBs <- B.readFile cabalFile genericPackageDescription <- whenNothing (parseGenericPackageDescriptionMaybe cabalFileBs) $ throwIO (OrmoluCabalFileParsingFailed cabalFile) let extensionsAndDeps = getExtensionAndDepsMap cabalFile genericPackageDescription cachedCabalFile = CachedCabalFile {..} atomicModifyIORef cabalCacheRef $ (,cachedCabalFile) . M.insert cabalFile cachedCabalFile let (dynOpts, dependencies, mentioned) = case M.lookup (dropExtensions sourceFileAbs) extensionsAndDeps of Nothing -> ([], [], 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 whenNothing :: (Monad m) => Maybe a -> m a -> m a whenNothing maya ma = maybe ma pure maya -- | 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.5.3.0/src/Ormolu/Utils/Fixity.hs0000644000000000000000000000420007346545000016333 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.Utils.Fixity ( getFixityOverridesForSourceFile, parseFixityDeclarationStr, ) where import Control.Exception (throwIO) import Control.Monad.IO.Class import Data.Bifunctor (first) import Data.IORef import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import qualified Data.Text as T import Ormolu.Exception import Ormolu.Fixity import Ormolu.Fixity.Parser import Ormolu.Utils.Cabal import Ormolu.Utils.IO (readFileUtf8) import System.Directory import System.FilePath import System.IO.Unsafe (unsafePerformIO) import Text.Megaparsec (errorBundlePretty) -- | Cache ref that stores fixity overrides per cabal file. cacheRef :: IORef (Map FilePath FixityMap) cacheRef = unsafePerformIO (newIORef Map.empty) {-# NOINLINE cacheRef #-} -- | Attempt to locate and parse an @.ormolu@ file. If it does not exist, -- empty fixity map is returned. This function maintains a cache of fixity -- overrides where cabal file paths act as keys. getFixityOverridesForSourceFile :: (MonadIO m) => -- | 'CabalInfo' already obtained for this source file CabalInfo -> m FixityMap getFixityOverridesForSourceFile CabalInfo {..} = liftIO $ do cache <- readIORef cacheRef case Map.lookup ciCabalFilePath cache of Nothing -> do let dotOrmolu = replaceFileName ciCabalFilePath ".ormolu" exists <- doesFileExist dotOrmolu if exists then do dotOrmoluRelative <- makeRelativeToCurrentDirectory dotOrmolu contents <- readFileUtf8 dotOrmolu case parseFixityMap dotOrmoluRelative contents of Left errorBundle -> throwIO (OrmoluFixityOverridesParseError errorBundle) Right x -> do modifyIORef' cacheRef (Map.insert ciCabalFilePath x) return x else return Map.empty Just x -> return x -- | 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 ormolu-0.5.3.0/src/Ormolu/Utils/IO.hs0000644000000000000000000000225207346545000015373 0ustar0000000000000000-- | Write 'Text' to files using UTF8 and ignoring native -- line ending conventions. module Ormolu.Utils.IO ( writeFileUtf8, readFileUtf8, getContentsUtf8, ) where import Control.Exception (throwIO) import Control.Monad.IO.Class import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.Text (Text) import qualified Data.Text.Encoding as TE -- | 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' ormolu-0.5.3.0/tests/Ormolu/0000755000000000000000000000000007346545000014002 5ustar0000000000000000ormolu-0.5.3.0/tests/Ormolu/CabalInfoSpec.hs0000644000000000000000000000701207346545000016767 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.CabalInfoSpec (spec) where import qualified Data.Set 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 "-XHaskell2010"] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["Cabal-syntax", "Diff", "MemoTrie", "ansi-terminal", "array", "base", "binary", "bytestring", "containers", "directory", "dlist", "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 "-XHaskell2010"] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["Cabal-syntax", "QuickCheck", "base", "containers", "directory", "filepath", "ghc-lib-parser", "hspec", "hspec-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.empty 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.5.3.0/tests/Ormolu/Diff/0000755000000000000000000000000007346545000014652 5ustar0000000000000000ormolu-0.5.3.0/tests/Ormolu/Diff/TextSpec.hs0000644000000000000000000000423307346545000016747 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} module Ormolu.Diff.TextSpec (spec) where import Data.Text (Text) import Ormolu.Diff.Text import Ormolu.Terminal import Ormolu.Utils.IO import Path import Path.IO import qualified System.FilePath as FP import System.IO (hClose) 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" actualDiffText <- printDiff actualDiff actualDiffText `shouldBe` expectedDiffText -- | Print to a 'Text' value. printDiff :: TextDiff -> IO Text printDiff diff = withSystemTempFile "ormolu-diff-test" $ \path h -> do runTerm (printTextDiff diff) Never h hClose h readFileUtf8 (toFilePath path) 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.5.3.0/tests/Ormolu/Fixity/0000755000000000000000000000000007346545000015256 5ustar0000000000000000ormolu-0.5.3.0/tests/Ormolu/Fixity/ParserSpec.hs0000644000000000000000000001137307346545000017666 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Fixity.ParserSpec (spec) where import qualified Data.Map.Strict as Map import Data.Text (Text) import qualified Data.Text as T import Ormolu.Fixity import Ormolu.Fixity.Parser import Test.Hspec import Test.Hspec.Megaparsec spec :: Spec spec = do describe "parseFixtiyDeclaration" $ do it "parses a simple infixr declaration" $ parseFixityDeclaration "infixr 5 $" `shouldParse` [("$", FixityInfo (Just InfixR) 5 5)] it "parses a simple infixl declaration" $ parseFixityDeclaration "infixl 5 $" `shouldParse` [("$", FixityInfo (Just InfixL) 5 5)] it "parses a simple infix declaration" $ parseFixityDeclaration "infix 5 $" `shouldParse` [("$", FixityInfo (Just InfixN) 5 5)] it "parses a declaration for a ticked identifier" $ parseFixityDeclaration "infixl 5 `foo`" `shouldParse` [("foo", FixityInfo (Just InfixL) 5 5)] it "parses a declaration for a ticked identifier (constructor case)" $ parseFixityDeclaration "infixl 5 `Foo`" `shouldParse` [("Foo", FixityInfo (Just InfixL) 5 5)] it "parses a multi-operator declaration" $ parseFixityDeclaration "infixl 5 $, ., `Foo`, `bar`" `shouldParse` [ ("$", FixityInfo (Just InfixL) 5 5), (".", FixityInfo (Just InfixL) 5 5), ("Foo", FixityInfo (Just InfixL) 5 5), ("bar", FixityInfo (Just InfixL) 5 5) ] it "parses a declaration with a unicode operator" $ parseFixityDeclaration "infixr 5 ×" `shouldParse` [("×", FixityInfo (Just InfixR) 5 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" ] ) describe "parseFixityMap" $ do it "parses the empty input without choking" $ parseFixityMap "" "" `shouldParse` Map.empty it "parses a collection of declarations" $ -- The example is taken from base. parseFixityMap "" ( T.unlines [ "infixr 9 .", "infixr 5 ++", "infixl 4 <$", "infixl 1 >>, >>=", "infixr 1 =<<", "infixr 0 $, $!", "infixl 4 <*>, <*, *>, <**>" ] ) `shouldParse` Map.fromList [ ("$", FixityInfo (Just InfixR) 0 0), ("$!", FixityInfo (Just InfixR) 0 0), ("*>", FixityInfo (Just InfixL) 4 4), ("++", FixityInfo (Just InfixR) 5 5), (".", FixityInfo (Just InfixR) 9 9), ("<$", FixityInfo (Just InfixL) 4 4), ("<*", FixityInfo (Just InfixL) 4 4), ("<**>", FixityInfo (Just InfixL) 4 4), ("<*>", FixityInfo (Just InfixL) 4 4), ("=<<", FixityInfo (Just InfixR) 1 1), (">>", FixityInfo (Just InfixL) 1 1), (">>=", FixityInfo (Just InfixL) 1 1) ] it "combines conflicting declarations correctly" $ parseFixityMap "" ( T.unlines [ "infixr 9 ., ^", "infixr 7 ., $", "infixr 9 ^ ", "infixl 7 $" ] ) `shouldParse` Map.fromList [ ("$", FixityInfo Nothing 7 7), (".", FixityInfo (Just InfixR) 7 9), ("^", FixityInfo (Just InfixR) 9 9) ] it "handles CRLF line endings correctly" $ parseFixityMap "" `shouldSucceedOn` ( unlinesCrlf [ "infixr 9 .", "infixr 5 ++" ] ) it "fails with correct parse error (keyword wrong second line)" $ parseFixityMap "" "infixr 5 .\nfoobar 5 $" `shouldFailWith` err 11 ( mconcat [ utok 'f', etoks "infix", etoks "infixl", etoks "infixr", eeof ] ) unlinesCrlf :: [Text] -> Text unlinesCrlf = T.concat . fmap (<> "\r\n") ormolu-0.5.3.0/tests/Ormolu/Fixity/PrinterSpec.hs0000644000000000000000000000333707346545000020056 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.Fixity.PrinterSpec (spec) where import qualified Data.Char as Char import qualified Data.Map.Strict as Map import qualified Data.Text as T import Ormolu.Fixity import Ormolu.Fixity.Parser import Ormolu.Fixity.Printer import Test.Hspec import Test.Hspec.Megaparsec import Test.QuickCheck newtype FixityMapWrapper = FixityMapWrapper FixityMap deriving (Show) instance Arbitrary FixityMapWrapper where arbitrary = FixityMapWrapper . Map.fromListWith (<>) <$> listOf ((,) <$> genOperator <*> genFixityInfo) where scaleDown = scale (`div` 4) genOperator = OpName . T.pack <$> oneof [genNormalOperator, genIdentifier] genNormalOperator = listOf1 (scaleDown arbitrary `suchThat` isOperatorConstituent) isOperatorConstituent x = (Char.isSymbol x || Char.isPunctuation x) && x `notElem` ",`()" genIdentifier = do x <- arbitrary `suchThat` Char.isLetter xs <- listOf1 (scaleDown arbitrary `suchThat` isIdentifierConstituent) return (x : xs) isIdentifierConstituent x = Char.isAlphaNum x || x == '_' || x == '\'' genFixityInfo = do fiDirection <- elements [ Nothing, Just InfixL, Just InfixR, Just InfixN ] fiMinPrecedence <- chooseInt (0, 9) fiMaxPrecedence <- chooseInt (0, 9) `suchThat` (>= fiMinPrecedence) return FixityInfo {..} spec :: Spec spec = do describe "parseFixityMap & printFixityMap" $ it "arbitrary fixity maps are printed and parsed back correctly" $ property $ \(FixityMapWrapper fixityMap) -> parseFixityMap "" (printFixityMap fixityMap) `shouldParse` fixityMap ormolu-0.5.3.0/tests/Ormolu/HackageInfoSpec.hs0000644000000000000000000003426307346545000017320 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Ormolu.HackageInfoSpec (spec) where import qualified Data.Map.Strict as Map import Data.Maybe (mapMaybe) import qualified Data.Set as Set import Distribution.Types.PackageName (PackageName) import Ormolu.Fixity import Test.Hspec -- | Build a fixity map using the Hackage/Hoogle database, and the boot -- package list, and then check the fixity of the specified subset of -- operators. checkFixityMap :: -- | List of dependencies [PackageName] -> -- | Threshold to choose the conflict resolution strategy Float -> -- | Associative list representing a subset of the resulting fixity map -- that should be checked. [(OpName, FixityInfo)] -> Expectation checkFixityMap dependencies threshold expectedResult = actualResult `shouldBe` expectedResult where actualResult = mapMaybe (\(k, _) -> (k,) <$> lookupFixity k resultMap) expectedResult resultMap = buildFixityMap' packageToOps packageToPopularity bootPackages threshold (Set.fromList dependencies) -- | Build a fixity map from a custom package database, and then check the -- fixity of the specified subset of operators. checkFixityMap' :: -- | Associative list for packageToOps: -- package name -map-> (operator -map-> fixity) [(PackageName, [(OpName, FixityInfo)])] -> -- | Associative list for packageToPopularity: -- package name -map-> download count [(PackageName, Int)] -> -- | List of packages that should have a higher priority than -- unspecified packages (boot packages) [PackageName] -> -- | List of dependencies [PackageName] -> -- | Threshold to choose the conflict resolution strategy Float -> -- | Associative list representing a subset of the resulting fixity map -- that should be checked. [(OpName, FixityInfo)] -> Expectation checkFixityMap' lPackageToOps lPackageToPopularity highPrioPackages dependencies threshold expectedResult = actualResult `shouldBe` expectedResult where actualResult = mapMaybe (\(k, _) -> (k,) <$> lookupFixity k resultMap) expectedResult resultMap = buildFixityMap' lPackageToOps' lPackageToPopularity' (Set.fromList highPrioPackages) threshold (Set.fromList dependencies) lPackageToOps' = Map.map Map.fromList $ Map.fromList lPackageToOps lPackageToPopularity' = Map.fromList lPackageToPopularity spec :: Spec spec = do it "correctly merges fixities when a conflict appears in unspecified \ \packages, with max(pop) < threshold" $ do let operators = [ ("A", [("+", FixityInfo (Just InfixL) 4 4)]), ("B", [("+", FixityInfo (Just InfixR) 6 6)]) ] popularity = [ ("A", 3), ("B", 5) ] dependencies = [] higherPriorityPackages = [] threshold = 0.9 result = [ ("+", FixityInfo Nothing 4 6) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "keeps only the most popular declaration when a conflict appears in \ \unspecified packages, with max(pop) >= threshold" $ do let operators = [ ("A", [("+", FixityInfo (Just InfixL) 4 4)]), ("B", [("+", FixityInfo (Just InfixR) 6 6)]) ] popularity = [ ("A", 5), ("B", 103) ] dependencies = [] higherPriorityPackages = [] threshold = 0.9 result = [ ("+", FixityInfo (Just InfixR) 6 6) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "merges the ex-aequo most popular declaration when a conflict appears \ \in unspecified packages, with max(pop) >= threshold" $ do let operators = [ ("A", [("+", FixityInfo (Just InfixL) 4 4)]), ("B", [("+", FixityInfo (Just InfixR) 6 6)]), ("C", [("+", FixityInfo (Just InfixR) 8 8)]) ] popularity = [ ("A", 5), ("B", 103), ("C", 103) ] dependencies = [] higherPriorityPackages = [] threshold = 0.4 result = [ ("+", FixityInfo (Just InfixR) 6 8) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "keeps only the most popular declaration when a conflict appears in \ \unspecified packages, threshold == 0" $ do let operators = [ ("A", [("+", FixityInfo (Just InfixL) 4 4)]), ("B", [("+", FixityInfo (Just InfixR) 6 6)]) ] popularity = [ ("A", 5), ("B", 103) ] dependencies = [] higherPriorityPackages = [] threshold = 0.0 result = [ ("+", FixityInfo (Just InfixR) 6 6) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "merges all declarations when a conflict appears in unspecified \ \packages, threshold > 1" $ do let operators = [ ("A", [("+", FixityInfo (Just InfixN) 4 4)]), ("B", [("+", FixityInfo (Just InfixN) 6 6)]), ("C", [("+", FixityInfo (Just InfixN) 8 8)]) ] popularity = [ ("A", 0), ("B", 0), ("C", 11103) ] dependencies = [] higherPriorityPackages = [] threshold = 10.0 result = [ ("+", FixityInfo (Just InfixN) 4 8) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "merges all declarations when a conflict appears in cabal \ \dependencies" $ do let operators = [ ( "A", [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2) ] ), ( "B", [ ("+", FixityInfo (Just InfixN) 6 6), ("-", FixityInfo (Just InfixL) 4 4) ] ), ("C", [("+", FixityInfo (Just InfixN) 8 8)]) ] popularity = [ ("A", 0), ("B", 0), ("C", 11103) ] dependencies = ["B", "C"] higherPriorityPackages = [] threshold = 0.4 result = [ ("+", FixityInfo (Just InfixN) 6 8), ("-", FixityInfo (Just InfixL) 4 4) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "merges all declarations when a conflict appears in higher-priority \ \packages" $ do let operators = [ ( "A", [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2) ] ), ( "B", [ ("+", FixityInfo (Just InfixN) 6 6), ("-", FixityInfo (Just InfixL) 4 4) ] ), ("C", [("+", FixityInfo (Just InfixN) 8 8)]) ] popularity = [ ("A", 0), ("B", 0), ("C", 11103) ] dependencies = [] higherPriorityPackages = ["B", "C"] threshold = 0.4 result = [ ("+", FixityInfo (Just InfixN) 6 8), ("-", FixityInfo (Just InfixL) 4 4) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "whitelists declarations from base even when it is not listed in \ \cabal dependencies" $ do let operators = [ ( "base", [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2) ] ), ( "B", [ ("+", FixityInfo (Just InfixN) 6 6), ("-", FixityInfo (Just InfixL) 4 4) ] ), ( "C", [ ("+", FixityInfo (Just InfixN) 8 8), ("|>", FixityInfo (Just InfixN) 1 1) ] ) ] popularity = [ ("base", 0), ("B", 2), ("C", 11103) ] dependencies = ["B", "C"] higherPriorityPackages = [] threshold = 0.4 result = [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2), ("|>", FixityInfo (Just InfixN) 1 1) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "whitelists declarations from base when base is also listed in cabal \ \dependencies" $ do let operators = [ ( "base", [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2) ] ), ( "B", [ ("+", FixityInfo (Just InfixN) 6 6), ("?=", FixityInfo (Just InfixL) 4 4) ] ), ( "C", [ ("<|>", FixityInfo (Just InfixN) 8 8), ("?=", FixityInfo (Just InfixN) 1 1) ] ) ] popularity = [ ("base", 0), ("B", 2), ("C", 11103) ] dependencies = ["base", "B"] higherPriorityPackages = [] threshold = 0.6 result = [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2), ("?=", FixityInfo (Just InfixL) 4 4) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "gives higher priority to declarations from cabal dependencies than \ \declarations from both higher-priority & unspecified packages" $ do let operators = [ ( "base", [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2) ] ), ( "B", [ ("+", FixityInfo (Just InfixN) 6 6), ("?=", FixityInfo (Just InfixL) 4 4) ] ), ( "C", [ ("<|>", FixityInfo (Just InfixN) 8 8), ("?=", FixityInfo (Just InfixN) 1 1) ] ), ("D", [("+", FixityInfo (Just InfixR) 2 2)]) ] popularity = [ ("base", 0), ("B", 2), ("C", 11103) ] dependencies = ["base", "B"] higherPriorityPackages = ["D"] threshold = 0.6 result = [ ("?=", FixityInfo (Just InfixL) 4 4), ("<|>", FixityInfo (Just InfixN) 8 8) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "gives higher priority to declarations from higher-priority packages \ \than declarations from unspecified packages" $ do let operators = [ ( "base", [ ("+", FixityInfo (Just InfixR) 4 4), ("-", FixityInfo (Just InfixR) 2 2) ] ), ( "B", [ ("+", FixityInfo (Just InfixN) 6 6), ("?=", FixityInfo (Just InfixL) 4 4) ] ), ( "C", [ ("<|>", FixityInfo (Just InfixN) 8 8), ("?=", FixityInfo (Just InfixN) 1 1) ] ), ("D", [("+", FixityInfo (Just InfixR) 2 2)]) ] popularity = [ ("base", 0), ("B", 2), ("C", 11103) ] dependencies = [] higherPriorityPackages = ["B"] threshold = 0.6 result = [ ("+", FixityInfo (Just InfixR) 4 4), ("?=", FixityInfo (Just InfixL) 4 4), ("<|>", FixityInfo (Just InfixN) 8 8) ] checkFixityMap' operators popularity higherPriorityPackages dependencies threshold result it "gives the correct fixity info for ':' (from base)" $ do let dependencies = [] threshold = 0.6 result = [ (":", FixityInfo (Just InfixR) 5 5) ] checkFixityMap dependencies threshold result it "gives the base's fixity info for '<|>', even when a dependency has a \ \conflicting declaration for it" $ do let dependencies = ["pandoc"] threshold = 0.9 result = [ ("<|>", FixityInfo (Just InfixL) 3 3) ] checkFixityMap dependencies threshold result it "gives the containers's fixity info for ':>' (because 'containers' is \ \a higher-priority package), even though max(pop) < threshold for \ \this operator)" $ do let dependencies = [] threshold = 0.9 result = [ (":>", FixityInfo (Just InfixL) 5 5) ] checkFixityMap dependencies threshold result it "gives the servant's fixity info for ':>' once servant is added as a \ \dependency (although ':>' is also defined in 'containers', a \ \higher-priority package)" $ do let dependencies = ["servant"] threshold = 0.9 result = [ (":>", FixityInfo (Just InfixR) 4 4) ] checkFixityMap dependencies threshold result ormolu-0.5.3.0/tests/Ormolu/OpTreeSpec.hs0000644000000000000000000001040607346545000016350 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.OpTreeSpec (spec) where import qualified Data.Map.Strict as Map import Data.Maybe (fromJust) import Data.Text (Text) import qualified Data.Text as T import GHC.Types.Name (mkOccName, varName) import GHC.Types.Name.Reader (mkRdrUnqual) import Ormolu.Fixity import Ormolu.Fixity.Internal (LazyFixityMap (..)) 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 lFixities inputTree expectedOutputTree = removeOpInfo actualOutputTree `shouldBe` expectedOutputTree where removeOpInfo (OpNode x) = OpNode x removeOpInfo (OpBranches exprs ops) = OpBranches (removeOpInfo <$> exprs) (opiOp <$> ops) actualOutputTree = reassociateOpTree convertName Map.empty fixityMap inputTree fixityMap = LazyFixityMap [Map.fromList lFixities] convertName = Just . mkRdrUnqual . mkOccName varName . T.unpack . unOpName -- | Associative list of fixities for operators from "base" baseFixities :: [(OpName, FixityInfo)] baseFixities = Map.toList . fromJust $ Map.lookup "base" packageToOps 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 (Just InfixL) 5 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 (Just InfixL) 5 5), ("*", FixityInfo (Just InfixL) 7 7), ("-", FixityInfo (Just InfixL) 5 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 (Just InfixL) 5 7), ("*", FixityInfo (Just InfixL) 8 8), ("-", FixityInfo (Just InfixL) 4 6) ] 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 (Just InfixL) 0 5), ("|", FixityInfo (Just InfixL) 4 8), ("$", FixityInfo (Just InfixR) 0 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"] ["+"] ] ["$", "$"] checkReassociate baseFixities inputTree outputTree ormolu-0.5.3.0/tests/Ormolu/Parser/0000755000000000000000000000000007346545000015236 5ustar0000000000000000ormolu-0.5.3.0/tests/Ormolu/Parser/OptionsSpec.hs0000644000000000000000000000171507346545000020044 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Parser.OptionsSpec (spec) where import qualified Data.Text 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.5.3.0/tests/Ormolu/Parser/ParseFailureSpec.hs0000644000000000000000000000131007346545000020762 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.5.3.0/tests/Ormolu/Parser/PragmaSpec.hs0000644000000000000000000000224507346545000017617 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Parser.PragmaSpec (spec) where import Data.Text (Text) import qualified Data.Text 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.5.3.0/tests/Ormolu/PrinterSpec.hs0000644000000000000000000000752607346545000016606 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Ormolu.PrinterSpec (spec) where import Control.Exception import Control.Monad import Data.List (isSuffixOf) import qualified Data.Map as Map import Data.Maybe (isJust) import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T import Ormolu import Ormolu.Fixity import Ormolu.Utils.IO import Path import Path.IO import System.Environment (lookupEnv) import qualified System.FilePath as F import Test.Hspec spec :: Spec spec = do es <- runIO locateExamples forM_ es checkExample -- | Fixities that are to be used with the test examples. testsuiteFixities :: FixityMap testsuiteFixities = Map.fromList [ (".=", FixityInfo (Just InfixR) 8 8), ("#", FixityInfo (Just InfixR) 5 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 = testsuiteFixities } 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.5.3.0/tests/0000755000000000000000000000000007346545000012525 5ustar0000000000000000ormolu-0.5.3.0/tests/Spec.hs0000644000000000000000000000005407346545000013752 0ustar0000000000000000{-# OPTIONS_GHC -F -pgmF hspec-discover #-}