fourmolu-0.18.0.0/app/0000755000000000000000000000000014745250261012562 5ustar0000000000000000fourmolu-0.18.0.0/data/0000755000000000000000000000000014745250261012713 5ustar0000000000000000fourmolu-0.18.0.0/data/cabal-tests/0000755000000000000000000000000014745250261015115 5ustar0000000000000000fourmolu-0.18.0.0/data/diff-tests/0000755000000000000000000000000014745250261014763 5ustar0000000000000000fourmolu-0.18.0.0/data/diff-tests/inputs/0000755000000000000000000000000014745250261016305 5ustar0000000000000000fourmolu-0.18.0.0/data/diff-tests/outputs/0000755000000000000000000000000014745250261016506 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/0000755000000000000000000000000014745250261014531 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/0000755000000000000000000000000014745250261017016 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/annotation/0000755000000000000000000000000014745250261021170 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/class/0000755000000000000000000000000014745250261020123 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/data/0000755000000000000000000000000014745250261017727 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/0000755000000000000000000000000014745250261022325 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/data/gadt/0000755000000000000000000000000014745250261020646 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/default/0000755000000000000000000000000014745250261020442 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/deriving/0000755000000000000000000000000014745250261020625 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/foreign/0000755000000000000000000000000014745250261020447 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/instance/0000755000000000000000000000000014745250261020622 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/0000755000000000000000000000000014745250261021444 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/role-annotation/0000755000000000000000000000000014745250261022127 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/0000755000000000000000000000000014745250261021017 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/complete/0000755000000000000000000000000014745250261022627 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/0000755000000000000000000000000014745250261022333 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/inline/0000755000000000000000000000000014745250261022275 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/minimal/0000755000000000000000000000000014745250261022445 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/0000755000000000000000000000000014745250261022474 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/set-cost-centre/0000755000000000000000000000000014745250261024036 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/0000755000000000000000000000000014745250261023147 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/signature/type/0000755000000000000000000000000014745250261022000 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/splice/0000755000000000000000000000000014745250261020275 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/type/0000755000000000000000000000000014745250261017777 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/type-families/0000755000000000000000000000000014745250261021566 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/0000755000000000000000000000000014745250261025275 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/0000755000000000000000000000000014745250261023756 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/0000755000000000000000000000000014745250261024026 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/0000755000000000000000000000000014745250261021674 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/0000755000000000000000000000000014745250261020132 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/0000755000000000000000000000000014745250261021757 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/0000755000000000000000000000000014745250261023111 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/0000755000000000000000000000000014745250261024630 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/do/0000755000000000000000000000000014745250261022361 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/0000755000000000000000000000000014745250261023074 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/0000755000000000000000000000000014745250261023434 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/function/record/0000755000000000000000000000000014745250261023235 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/other/0000755000000000000000000000000014745250261021253 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/0000755000000000000000000000000014745250261023504 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/declaration/warning/0000755000000000000000000000000014745250261020463 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/fourmolu/0000755000000000000000000000000014745250261016401 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/import/0000755000000000000000000000000014745250261016043 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/module-header/0000755000000000000000000000000014745250261017244 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/other/0000755000000000000000000000000014745250261015652 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/other/cpp/0000755000000000000000000000000014745250261016434 5ustar0000000000000000fourmolu-0.18.0.0/data/examples/other/disabling/0000755000000000000000000000000014745250261017606 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/0000755000000000000000000000000014745250261014563 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/column-limit/0000755000000000000000000000000014745250261017174 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/comma-style/0000755000000000000000000000000014745250261017015 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/function-arrows/0000755000000000000000000000000014745250261017723 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/haddock-style/0000755000000000000000000000000014745250261017316 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/import-export/0000755000000000000000000000000014745250261017414 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/import-grouping/0000755000000000000000000000000014745250261017725 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/indentation/0000755000000000000000000000000014745250261017077 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/let-style/0000755000000000000000000000000014745250261016505 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/0000755000000000000000000000000014745250261021126 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/record-brace-space/0000755000000000000000000000000014745250261020204 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/respectful/0000755000000000000000000000000014745250261016737 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/respectful-module-where/0000755000000000000000000000000014745250261021332 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/single-constraint-parens/0000755000000000000000000000000014745250261021514 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/single-deriving-parens/0000755000000000000000000000000014745250261021137 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/sort-constraints/0000755000000000000000000000000014745250261020117 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/sort-derived-classes/0000755000000000000000000000000014745250261020625 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/sort-deriving-clauses/0000755000000000000000000000000014745250261021014 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/trailing-section-operators/0000755000000000000000000000000014745250261022052 5ustar0000000000000000fourmolu-0.18.0.0/data/fourmolu/unicode-syntax/0000755000000000000000000000000014745250261017535 5ustar0000000000000000fourmolu-0.18.0.0/data/parse-failures/0000755000000000000000000000000014745250261015635 5ustar0000000000000000fourmolu-0.18.0.0/extract-hackage-info/0000755000000000000000000000000014745250261015766 5ustar0000000000000000fourmolu-0.18.0.0/fixity-tests/0000755000000000000000000000000014745250261014456 5ustar0000000000000000fourmolu-0.18.0.0/region-tests/0000755000000000000000000000000014745250261014425 5ustar0000000000000000fourmolu-0.18.0.0/src/0000755000000000000000000000000014745250261012571 5ustar0000000000000000fourmolu-0.18.0.0/src/GHC/0000755000000000000000000000000014745250261013172 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/0000755000000000000000000000000014745250261014046 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Config/0000755000000000000000000000000014745250261015253 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Diff/0000755000000000000000000000000014745250261014716 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Fixity/0000755000000000000000000000000014745250261015322 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Imports/0000755000000000000000000000000014745250261015503 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Parser/0000755000000000000000000000000014745250261015302 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Printer/0000755000000000000000000000000014745250261015471 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/0000755000000000000000000000000014745250261016357 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/0000755000000000000000000000000014745250261020604 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Processing/0000755000000000000000000000000014745250261016162 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Terminal/0000755000000000000000000000000014745250261015621 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu/Utils/0000755000000000000000000000000014745250261015146 5ustar0000000000000000fourmolu-0.18.0.0/tests/0000755000000000000000000000000014745250261013144 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/0000755000000000000000000000000014745250261014421 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/Config/0000755000000000000000000000000014745250261015626 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/Diff/0000755000000000000000000000000014745250261015271 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/Fixity/0000755000000000000000000000000014745250261015675 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/Integration/0000755000000000000000000000000014745250261016704 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/Parser/0000755000000000000000000000000014745250261015655 5ustar0000000000000000fourmolu-0.18.0.0/tests/Ormolu/Utils/0000755000000000000000000000000014745250261015521 5ustar0000000000000000fourmolu-0.18.0.0/src/Ormolu.hs0000644000000000000000000002217414745250261014410 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | A formatter for Haskell source code. This module exposes the official -- stable API, other modules may be not as reliable. module Ormolu ( -- * Top-level formatting functions ormolu, ormoluFile, ormoluStdin, -- * Configuration Config (..), ColorMode (..), RegionIndices (..), SourceType (..), defaultConfig, detectSourceType, refineConfig, DynOption (..), PrinterOpts (..), PrinterOptsPartial, PrinterOptsTotal, defaultPrinterOpts, findConfigFile, ConfigNotFound (..), configFileName, resolvePrinterOpts, -- * Cabal info CabalUtils.CabalSearchResult (..), CabalUtils.CabalInfo (..), CabalUtils.getCabalInfoForSourceFile, -- * Fixity overrides and module re-exports FixityOverrides, defaultFixityOverrides, ModuleReexports, defaultModuleReexports, -- * Working with exceptions OrmoluException (..), withPrettyOrmoluExceptions, ) where import Control.Exception import Control.Monad import Control.Monad.IO.Class (MonadIO (..)) import Data.Map.Strict qualified as Map import Data.Maybe (fromMaybe) import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import Data.Text.IO.Utf8 qualified as T.Utf8 import Debug.Trace import GHC.Driver.Errors.Types import GHC.Types.Error import GHC.Types.SrcLoc import GHC.Utils.Error import Ormolu.Config import Ormolu.Diff.ParseResult import Ormolu.Diff.Text import Ormolu.Exception import Ormolu.Fixity import Ormolu.Parser import Ormolu.Parser.CommentStream (CommentStream (..)) import Ormolu.Parser.Result import Ormolu.Printer import Ormolu.Utils (showOutputable) import Ormolu.Utils.Cabal qualified as CabalUtils import System.FilePath -- | Format a 'Text'. -- -- The function -- -- * Needs 'IO' because some functions from GHC that are necessary to -- setup parsing context require 'IO'. There should be no visible -- side-effects though. -- * Takes file name just to use it in parse error messages. -- * Throws 'OrmoluException'. -- -- __NOTE__: The caller is responsible for setting the appropriate value in -- the 'cfgSourceType' field. Autodetection of source type won't happen -- here, see 'detectSourceType'. ormolu :: (MonadIO m) => -- | Ormolu configuration Config RegionIndices -> -- | Location of source file FilePath -> -- | Input to format Text -> m Text ormolu cfgWithIndices path originalInput = do let totalLines = length (T.lines originalInput) cfg = regionIndicesToDeltas totalLines <$> cfgWithIndices fixityMap = packageFixityMap (overapproximatedDependencies cfg) -- memoized on the set of dependencies when (cfgDebug cfg) $ do traceM $ unwords ["*** CONFIG ***", show cfg] (warnings, result0) <- parseModule' cfg fixityMap OrmoluParsingFailed path originalInput when (cfgDebug cfg) $ do forM_ warnings $ \driverMsg -> do let driverMsgSDoc = formatBulleted $ diagnosticMessage defaultOpts driverMsg traceM $ unwords ["*** WARNING ***", showOutputable driverMsgSDoc] forM_ result0 $ \case ParsedSnippet r -> do let CommentStream comments = prCommentStream r forM_ comments $ \(L loc comment) -> traceM $ unwords ["*** COMMENT ***", showOutputable loc, show comment] _ -> pure () -- We're forcing 'formattedText' here because otherwise errors (such as -- messages about not-yet-supported functionality) will be thrown later -- when we try to parse the rendered code back, inside of GHC monad -- wrapper which will lead to error messages presenting the exceptions as -- GHC bugs. let !formattedText = printSnippets (cfgDebug cfg) result0 $ cfgPrinterOpts cfgWithIndices 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 (cfgDebug cfg) result1 $ cfgPrinterOpts cfgWithIndices 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 = liftIO (T.Utf8.readFile 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 = liftIO T.Utf8.getContents >>= ormolu cfg "" -- | Refine a 'Config' by incorporating given 'SourceType', 'CabalInfo', and -- fixity overrides 'FixityMap'. You can use 'detectSourceType' to deduce -- 'SourceType' based on the file extension, -- 'CabalUtils.getCabalInfoForSourceFile' to obtain 'CabalInfo' and -- 'getFixityOverridesForSourceFile' for 'FixityMap'. -- -- @since 0.5.3.0 refineConfig :: -- | Source type to use SourceType -> -- | Cabal info for the file, if available Maybe CabalUtils.CabalInfo -> -- | Fixity overrides, if available Maybe FixityOverrides -> -- | Module re-exports, if available Maybe ModuleReexports -> -- | 'Config' to refine Config region -> -- | Refined 'Config' Config region refineConfig sourceType mcabalInfo mfixityOverrides mreexports rawConfig = rawConfig { cfgDynOptions = cfgDynOptions rawConfig ++ dynOptsFromCabal, cfgFixityOverrides = FixityOverrides $ Map.unions [ unFixityOverrides fixityOverrides, unFixityOverrides (cfgFixityOverrides rawConfig), unFixityOverrides defaultFixityOverrides ], cfgModuleReexports = ModuleReexports $ Map.unionsWith (<>) [ unModuleReexports reexports, unModuleReexports (cfgModuleReexports rawConfig), unModuleReexports defaultModuleReexports ], cfgDependencies = Set.union (cfgDependencies rawConfig) depsFromCabal, cfgSourceType = sourceType, cfgLocalModules = cfgLocalModules rawConfig <> maybe Set.empty (Set.fromList . CabalUtils.ciModules) mcabalInfo } where fixityOverrides = fromMaybe defaultFixityOverrides mfixityOverrides reexports = fromMaybe defaultModuleReexports mreexports (dynOptsFromCabal, depsFromCabal) = case mcabalInfo of Nothing -> -- If no cabal info is provided, assume base as a dependency by -- default. ([], defaultDependencies) Just CabalUtils.CabalInfo {..} -> -- It makes sense to take into account the operator info for the -- package itself if we know it, as if it were its own dependency. (ciDynOpts, Set.insert ciPackageName ciDependencies) ---------------------------------------------------------------------------- -- Helpers -- | A wrapper around 'parseModule'. parseModule' :: (MonadIO m) => -- | Ormolu configuration Config RegionDeltas -> -- | Fixity Map for operators PackageFixityMap -> -- | How to obtain 'OrmoluException' to throw when parsing fails (SrcSpan -> String -> OrmoluException) -> -- | File name to use in errors FilePath -> -- | Actual input for the parser Text -> m (DriverMessages, [SourceSnippet]) parseModule' cfg fixityMap mkException path str = do (warnings, r) <- parseModule cfg fixityMap path str case r of Left (spn, err) -> liftIO $ throwIO (mkException spn err) Right x -> return (warnings, x) -- | Detect 'SourceType' based on the file extension. detectSourceType :: FilePath -> SourceType detectSourceType mpath = if takeExtension mpath == ".hsig" then SignatureSource else ModuleSource fourmolu-0.18.0.0/src/Ormolu/Config.hs0000644000000000000000000002277214745250261015621 0ustar0000000000000000{-# LANGUAGE ApplicativeDo #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -Wno-orphans #-} -- | Configuration options used by the tool. module Ormolu.Config ( Config (..), ColorMode (..), RegionIndices (..), RegionDeltas (..), SourceType (..), defaultConfig, overapproximatedDependencies, regionIndicesToDeltas, DynOption (..), dynOptionToLocatedStr, -- * Fourmolu configuration PrinterOpts (..), PrinterOptsPartial, PrinterOptsTotal, defaultPrinterOpts, defaultPrinterOptsYaml, fillMissingPrinterOpts, resolvePrinterOpts, CommaStyle (..), FunctionArrowsStyle (..), HaddockPrintStyle (..), HaddockPrintStyleModule (..), ImportExportStyle (..), ImportGrouping (..), ImportGroup (..), ImportGroupRule (..), ImportModuleMatcher (..), ImportRulePriority (..), matchAllRulePriority, matchLocalRulePriority, defaultImportRulePriority, QualifiedImportMatcher (..), LetStyle (..), InStyle (..), Unicode (..), ColumnLimit (..), SingleDerivingParens (..), parsePrinterOptsCLI, parsePrinterOptType, -- ** Loading Fourmolu configuration ConfigNotFound (..), findConfigFile, configFileName, FourmoluConfig (..), emptyConfig, ) where import Control.Monad (forM) import Data.Aeson ((.!=), (.:?)) import Data.Aeson qualified as Aeson import Data.Aeson.Types qualified as Aeson import Data.Functor.Identity (Identity (..)) import Data.Map.Strict qualified as Map import Data.Set (Set) import Data.Set qualified as Set import Data.String (fromString) import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import GHC.Generics (Generic) import GHC.Types.SrcLoc qualified as GHC import Ormolu.Config.Gen import Ormolu.Config.Types import Ormolu.Fixity import Ormolu.Terminal (ColorMode (..)) import Ormolu.Utils.Fixity (parseFixityDeclarationStr, parseModuleReexportDeclarationStr) import System.Directory ( XdgDirectory (XdgConfig), findFile, getXdgDirectory, makeAbsolute, ) import System.FilePath (takeDirectory) #if !MIN_VERSION_base(4,20,0) import Data.List (foldl') #endif -- | Type of sources that can be formatted by Ormolu. data SourceType = -- | Consider the input as a regular Haskell module ModuleSource | -- | Consider the input as a Backpack module signature SignatureSource deriving (Eq, Show) -- | Ormolu configuration. data Config region = Config { -- | Dynamic options to pass to GHC parser cfgDynOptions :: ![DynOption], -- | Fixity overrides cfgFixityOverrides :: !FixityOverrides, -- | Module reexports to take into account when doing fixity resolution cfgModuleReexports :: !ModuleReexports, -- | Known dependencies, if any cfgDependencies :: !(Set PackageName), -- | Do formatting faster but without automatic detection of defects cfgUnsafe :: !Bool, -- | Output information useful for debugging cfgDebug :: !Bool, -- | Checks if re-formatting the result is idempotent cfgCheckIdempotence :: !Bool, -- | How to parse the input (regular haskell module or Backpack file) cfgSourceType :: !SourceType, -- | Whether to use colors and other features of ANSI terminals cfgColorMode :: !ColorMode, -- | Region selection cfgRegion :: !region, cfgPrinterOpts :: !PrinterOptsTotal, cfgLocalModules :: !(Set ModuleName) } deriving (Eq, Show, Functor, Generic) -- | Region selection as the combination of start and end line numbers. data RegionIndices = RegionIndices { -- | Start line of the region to format regionStartLine :: !(Maybe Int), -- | End line of the region to format regionEndLine :: !(Maybe Int) } deriving (Eq, Show) -- | Region selection as the length of the literal prefix and the literal -- suffix. data RegionDeltas = RegionDeltas { -- | Prefix length in number of lines regionPrefixLength :: !Int, -- | Suffix length in number of lines regionSuffixLength :: !Int } deriving (Eq, Show) -- | Default @'Config' 'RegionIndices'@. defaultConfig :: Config RegionIndices defaultConfig = Config { cfgDynOptions = [], cfgFixityOverrides = defaultFixityOverrides, cfgModuleReexports = defaultModuleReexports, cfgDependencies = Set.empty, cfgUnsafe = False, cfgDebug = False, cfgCheckIdempotence = False, cfgSourceType = ModuleSource, cfgColorMode = Auto, cfgRegion = RegionIndices { regionStartLine = Nothing, regionEndLine = Nothing }, cfgPrinterOpts = defaultPrinterOpts, cfgLocalModules = Set.empty } -- | Return all dependencies of the module. This includes both the declared -- dependencies of the component we are working with and all potential -- module re-export targets. overapproximatedDependencies :: Config region -> Set PackageName overapproximatedDependencies Config {..} = Set.union cfgDependencies potentialReexportTargets where potentialReexportTargets = Set.fromList . concatMap toTargetPackages $ Map.elems (unModuleReexports cfgModuleReexports) toTargetPackages = concatMap $ \case (Nothing, _) -> [] (Just x, _) -> [x] -- | Convert 'RegionIndices' into 'RegionDeltas'. regionIndicesToDeltas :: -- | Total number of lines in the input Int -> -- | Region indices RegionIndices -> -- | Region deltas RegionDeltas regionIndicesToDeltas total RegionIndices {..} = RegionDeltas { regionPrefixLength = maybe 0 (subtract 1) regionStartLine, regionSuffixLength = maybe 0 (total -) regionEndLine } -- | A wrapper for dynamic options. newtype DynOption = DynOption { unDynOption :: String } deriving (Eq, Ord, Show) -- | Convert 'DynOption' to @'GHC.Located' 'String'@. dynOptionToLocatedStr :: DynOption -> GHC.Located String dynOptionToLocatedStr (DynOption o) = GHC.L GHC.noSrcSpan o ---------------------------------------------------------------------------- -- Fourmolu configuration -- | A version of 'PrinterOpts' where any field can be empty. -- This corresponds to the information in a config file or in CLI options. type PrinterOptsPartial = PrinterOpts Maybe deriving instance Eq PrinterOptsPartial deriving instance Show PrinterOptsPartial instance Semigroup PrinterOptsPartial where (<>) = fillMissingPrinterOpts instance Monoid PrinterOptsPartial where mempty = emptyPrinterOpts instance Aeson.FromJSON PrinterOptsPartial where parseJSON = Aeson.withObject "PrinterOpts" $ \o -> parsePrinterOptsJSON (parseField o) where parseField :: (Aeson.FromJSON a) => Aeson.Object -> String -> Aeson.Parser (Maybe a) parseField o keyName = do let key = fromString keyName mValue <- o Aeson..:? key forM mValue $ \value -> Aeson.parseJSON value Aeson. Aeson.Key key -- | A version of 'PrinterOpts' without empty fields. type PrinterOptsTotal = PrinterOpts Identity deriving instance Eq PrinterOptsTotal deriving instance Show PrinterOptsTotal -- | Apply the given configuration in order (later options override earlier). resolvePrinterOpts :: [PrinterOptsPartial] -> PrinterOptsTotal resolvePrinterOpts = foldl' (flip fillMissingPrinterOpts) defaultPrinterOpts ---------------------------------------------------------------------------- -- Loading Fourmolu configuration data FourmoluConfig = FourmoluConfig { cfgFilePrinterOpts :: PrinterOptsPartial, cfgFileFixities :: FixityOverrides, cfgFileReexports :: ModuleReexports } deriving (Eq, Show) instance Aeson.FromJSON FourmoluConfig where parseJSON = Aeson.withObject "FourmoluConfig" $ \o -> do cfgFilePrinterOpts <- Aeson.parseJSON (Aeson.Object o) rawFixities <- o .:? "fixities" .!= [] cfgFileFixities <- case mapM parseFixityDeclarationStr rawFixities of Right fixities -> return . FixityOverrides . Map.fromList . concat $ fixities Left e -> fail e rawReexports <- o .:? "reexports" .!= [] cfgFileReexports <- case mapM parseModuleReexportDeclarationStr rawReexports of Right reexports -> return . ModuleReexports . Map.fromListWith (<>) $ reexports Left e -> fail e return FourmoluConfig {..} emptyConfig :: FourmoluConfig emptyConfig = FourmoluConfig { cfgFilePrinterOpts = mempty, cfgFileFixities = FixityOverrides mempty, cfgFileReexports = ModuleReexports mempty } -- | Find a fourmolu configuration file. -- -- Looks for a file named /fourmolu.yaml/, first in the given path and -- its parents, and then in the XDG config directory. findConfigFile :: FilePath -> IO (Either ConfigNotFound FilePath) findConfigFile rootDir = do rootDirAbs <- makeAbsolute rootDir xdg <- getXdgDirectory XdgConfig "" let dirs = getParents rootDirAbs ++ [xdg] maybe (Left $ ConfigNotFound dirs) Right <$> findFile dirs configFileName where -- getParents "/a/b/c/" == ["/a/b/c/", "/a/b/", "/a/", "/"] getParents dir = let parentDir = takeDirectory dir in dir : if parentDir == dir then [] else getParents parentDir data ConfigNotFound = ConfigNotFound { searchDirs :: [FilePath] } deriving (Show) -- | Expected file name for YAML config. configFileName :: FilePath configFileName = "fourmolu.yaml" fourmolu-0.18.0.0/src/Ormolu/Diff/ParseResult.hs0000644000000000000000000002160514745250261017527 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeepSubsumption #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | This module allows us to diff two 'ParseResult's. module Ormolu.Diff.ParseResult ( ParseResultDiff (..), diffParseResult, ) where import Data.ByteString (ByteString) import Data.Char (isSpace) import Data.Foldable import Data.Function import Data.Generics import Data.List (sortOn) import Data.Text qualified as T import GHC.Data.FastString (FastString) import GHC.Hs import GHC.Types.SourceText import GHC.Types.SrcLoc import Ormolu.Config.Gen (ImportGrouping (ImportGroupSingle)) import Ormolu.Imports (normalizeImports) import Ormolu.Parser.CommentStream import Ormolu.Parser.Result import Ormolu.Utils import Type.Reflection qualified as TR -- | Result of comparing two 'ParseResult's. data ParseResultDiff = -- | Two parse results are the same Same | -- | Two parse results differ Different [RealSrcSpan] deriving (Show) instance Semigroup ParseResultDiff where Same <> a = a a <> Same = a Different xs <> Different ys = Different (xs ++ ys) instance Monoid ParseResultDiff where mempty = Same -- | Return 'Diff' of two 'ParseResult's. diffParseResult :: ParseResult -> ParseResult -> ParseResultDiff diffParseResult ParseResult { prCommentStream = cstream0, prParsedSource = hs0 } ParseResult { prCommentStream = cstream1, prParsedSource = hs1 } = diffCommentStream cstream0 cstream1 <> diffHsModule hs0 {hsmodImports = concat . normalizeImports False mempty ImportGroupSingle $ hsmodImports hs0} hs1 {hsmodImports = concat . normalizeImports False mempty ImportGroupSingle $ hsmodImports hs1} diffCommentStream :: CommentStream -> CommentStream -> ParseResultDiff diffCommentStream (CommentStream cs) (CommentStream cs') | commentLines cs == commentLines cs' = Same | otherwise = Different [] where commentLines = concatMap (toList . unComment . unLoc) -- | Compare two modules for equality disregarding certain semantically -- irrelevant features like exact print annotations. diffHsModule :: HsModule GhcPs -> HsModule GhcPs -> ParseResultDiff diffHsModule = genericQuery where genericQuery :: GenericQ (GenericQ ParseResultDiff) genericQuery x y -- 'ByteString' implements 'Data' instance manually and does not -- implement 'toConstr', so we have to deal with it in a special way. | Just x' <- cast x, Just y' <- cast y = if x' == (y' :: ByteString) then Same else Different [] | Just rep <- isEpTokenish x, Just rep' <- isEpTokenish y = -- Only check whether the Ep(Uni)Tokens are of the same type; don't -- look at the actual payload (e.g. the location). if rep == rep' then Same else Different [] | typeOf x == typeOf y, toConstr x == toConstr y = mconcat $ gzipWithQ ( genericQuery -- EPA-related `extQ` considerEqual @SrcSpan `ext1Q` epAnnEq `extQ` considerEqual @SourceText `extQ` considerEqual @EpAnnComments -- ~ XCGRHSs GhcPs `extQ` considerEqual @EpaLocation `extQ` considerEqual @EpLayout `extQ` considerEqual @AnnSig `extQ` considerEqual @HsRuleAnn `extQ` considerEqual @EpLinearArrow `extQ` considerEqual @AnnSynDecl `extQ` considerEqual @IsUnicodeSyntax -- FastString (for example for string literals) `extQ` considerEqualVia' ((==) @FastString) -- Haddock strings `extQ` hsDocStringEq -- Whether imports are pre- or post-qualified `extQ` importDeclQualifiedStyleEq -- Whether a class has an empty context `extQ` classDeclCtxEq -- Whether there are parens around a derived type class `extQ` derivedTyClsEq `extQ` typeEq `extQ` dataDeclEq `extQ` conDeclEq -- For better error messages `ext2Q` forLocated ) x y | otherwise = Different [] -- Return the 'TR.SomeTypeRep' of the type of the given value if it is an -- 'EpToken', an 'EpUniToken', or a list of these. isEpTokenish :: (Typeable a) => a -> Maybe TR.SomeTypeRep isEpTokenish = fmap TR.SomeTypeRep . go . TR.typeOf where go :: TR.TypeRep a -> Maybe (TR.TypeRep a) go rep = case rep of TR.App t t' | Just HRefl <- TR.eqTypeRep t (TR.typeRep @[]) -> TR.App t <$> go t' TR.App (TR.App t _) _ -> rep <$ TR.eqTypeRep t (TR.typeRep @EpUniToken) TR.App t _ -> rep <$ TR.eqTypeRep t (TR.typeRep @EpToken) _ -> Nothing considerEqualVia :: forall a. (Typeable a) => (a -> a -> ParseResultDiff) -> a -> GenericQ ParseResultDiff considerEqualVia f x (cast -> Just x') = f x x' considerEqualVia _ _ _ = Different [] considerEqualVia' f = considerEqualVia $ \x x' -> if f x x' then Same else Different [] considerEqualOn :: (Typeable a, Data b) => (a -> b) -> a -> GenericQ ParseResultDiff considerEqualOn f = considerEqualVia (genericQuery `on` f) considerEqual :: forall a. (Typeable a) => a -> GenericQ ParseResultDiff considerEqual = considerEqualVia $ \_ _ -> Same epAnnEq :: EpAnn a -> b -> ParseResultDiff epAnnEq _ _ = Same importDeclQualifiedStyleEq = considerEqualVia' f where f QualifiedPre QualifiedPost = True f QualifiedPost QualifiedPre = True f x x' = x == x' hsDocStringEq :: HsDocString -> GenericQ ParseResultDiff hsDocStringEq = considerEqualVia' ((==) `on` (map (T.dropWhile isSpace) . splitDocString True)) forLocated :: (Data e0, Data e1) => GenLocated e0 e1 -> GenericQ ParseResultDiff forLocated x@(L mspn _) y = maybe id appendSpan (cast `ext1Q` (Just . epAnnLoc) $ mspn) (genericQuery x y) where epAnnLoc :: EpAnn ann -> SrcSpan epAnnLoc = locA 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 -- The order of contexts doesn't matter normalizeContext :: HsContext GhcPs -> HsContext GhcPs normalizeContext = sortOn showOutputable normalizeMContext :: Maybe (LHsContext GhcPs) -> Maybe (LHsContext GhcPs) normalizeMContext Nothing = Nothing normalizeMContext (Just (L _ [])) = Nothing normalizeMContext (Just (L ann ctx)) = Just (L ann $ normalizeContext ctx) typeEq :: HsType GhcPs -> GenericQ ParseResultDiff typeEq = considerEqualOn $ \case HsQualTy ann ctx body -> HsQualTy ann (fmap normalizeContext ctx) body ty -> ty classDeclCtxEq :: TyClDecl GhcPs -> GenericQ ParseResultDiff classDeclCtxEq = considerEqualOn $ \case ClassDecl {..} -> ClassDecl {tcdCtxt = normalizeMContext tcdCtxt, ..} d -> d dataDeclEq :: HsDataDefn GhcPs -> GenericQ ParseResultDiff dataDeclEq = considerEqualOn $ \case HsDataDefn {..} -> HsDataDefn { -- The order of classes in the context doesn't matter dd_ctxt = normalizeMContext dd_ctxt, -- The order of deriving clauses doesn't matter. Note: need to normalize before sorting, otherwise -- we'll get a different sort order! dd_derivs = sortOn showOutputable ((fmap . fmap) normalizeDerivingClause dd_derivs), .. } conDeclEq :: ConDecl GhcPs -> GenericQ ParseResultDiff conDeclEq = considerEqualOn $ \case ConDeclGADT {..} -> ConDeclGADT {con_mb_cxt = normalizeMContext con_mb_cxt, ..} ConDeclH98 {..} -> ConDeclH98 {con_mb_cxt = normalizeMContext con_mb_cxt, ..} normalizeDerivingClause :: HsDerivingClause GhcPs -> HsDerivingClause GhcPs normalizeDerivingClause HsDerivingClause {deriv_clause_tys, ..} = HsDerivingClause {deriv_clause_tys = fmap normalizeDerivClauseTys deriv_clause_tys, ..} normalizeDerivClauseTys :: DerivClauseTys GhcPs -> DerivClauseTys GhcPs normalizeDerivClauseTys (DctSingle ann ty) = DctMulti ann [ty] -- The order of types in deriving clauses doesn't matter normalizeDerivClauseTys (DctMulti ann tys) = DctMulti ann (sortOn showOutputable tys) derivedTyClsEq :: DerivClauseTys GhcPs -> GenericQ ParseResultDiff derivedTyClsEq = considerEqualVia $ \lc rc -> genericQuery (normalizeDerivClauseTys lc) (normalizeDerivClauseTys rc) fourmolu-0.18.0.0/src/Ormolu/Diff/Text.hs0000644000000000000000000002320014745250261016173 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QualifiedDo #-} {-# LANGUAGE RecordWildCards #-} -- | This module allows us to diff two 'Text' values. module Ormolu.Diff.Text ( TextDiff, diffText, selectSpans, printTextDiff, ) where import Control.Monad (unless, when) import Data.Algorithm.Diff qualified as D import Data.Foldable (for_) import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.Maybe (listToMaybe) import Data.Text (Text) import Data.Text qualified as T import GHC.Types.SrcLoc import Ormolu.Terminal import Ormolu.Terminal.QualifiedDo qualified as Term #if !MIN_VERSION_base(4,20,0) import Data.List (foldl') #endif ---------------------------------------------------------------------------- -- Types -- | Result of diffing two 'Text's. data TextDiff = TextDiff { -- | Path to the file that is being diffed textDiffPath :: FilePath, -- | The list of differences textDiffDiffList :: DiffList, -- | Selected lines. Only hunks that contain selected lines will be -- displayed, unless 'textDiffSelectedLines' is empty, in which case the -- whole diff will be displayed. textDiffSelectedLines :: IntSet } deriving (Eq, Show) -- | List of lines tagged by 'D.Both', 'D.First', or 'D.Second'. type DiffList = [D.Diff [Text]] -- | Similar to 'DiffList', but with line numbers assigned. type DiffList' = [D.Diff [(Int, Int, Text)]] -- | Diff hunk. data Hunk = Hunk { hunkFirstStartLine :: Int, hunkFirstLength :: Int, hunkSecondStartLine :: Int, hunkSecondLength :: Int, hunkDiff :: DiffList } deriving (Show) ---------------------------------------------------------------------------- -- API -- | Diff two texts and produce a 'TextDiff'. diffText :: -- | Text before Text -> -- | Text after Text -> -- | Path to use FilePath -> -- | The resulting diff or 'Nothing' if the inputs are identical Maybe TextDiff diffText a b path = if all isBoth xs then Nothing else Just TextDiff { textDiffPath = path, textDiffDiffList = xs, textDiffSelectedLines = IntSet.empty } where xs = D.getGroupedDiff (lines' a) (lines' b) isBoth = \case D.Both _ _ -> True D.First _ -> False D.Second _ -> False -- T.lines ignores trailing blank lines lines' = T.splitOn "\n" -- | Select certain spans in the diff (line numbers are interpreted as -- belonging to the “before” state). Only selected spans will be printed. selectSpans :: [RealSrcSpan] -> TextDiff -> TextDiff selectSpans ss textDiff = textDiff {textDiffSelectedLines = xs} where xs = foldl' addOneSpan (textDiffSelectedLines textDiff) ss addOneSpan linesSoFar s = let start = srcSpanStartLine s end = srcSpanEndLine s in IntSet.union linesSoFar (IntSet.fromAscList [start .. end]) -- | Print the given 'TextDiff' as a 'Term' action. This function tries to -- mimic the style of @git diff@. printTextDiff :: TextDiff -> Term printTextDiff TextDiff {..} = Term.do (bold . put . T.pack) textDiffPath newline for_ (toHunks (assignLines textDiffDiffList)) $ \hunk@Hunk {..} -> when (isSelectedLine textDiffSelectedLines hunk) $ Term.do cyan $ Term.do put "@@ -" putShow hunkFirstStartLine put "," putShow hunkFirstLength put " +" putShow hunkSecondStartLine put "," putShow hunkSecondLength put " @@" newline for_ hunkDiff $ \case D.Both ys _ -> for_ ys $ \y -> Term.do unless (T.null y) $ put " " put y newline D.First ys -> for_ ys $ \y -> red $ Term.do put "-" unless (T.null y) $ put " " put y newline D.Second ys -> for_ ys $ \y -> green $ Term.do put "+" unless (T.null y) $ put " " put y newline ---------------------------------------------------------------------------- -- Helpers -- | Assign lines to a 'DiffList'. assignLines :: DiffList -> DiffList' assignLines = go 1 1 id where go _ _ acc [] = acc [] go !firstLine !secondLine acc (x : xs) = case x of D.Both a b -> let firstInc = length a secondInc = length b a' = zip3 (iterate (+ 1) firstLine) (iterate (+ 1) secondLine) a in go (firstLine + firstInc) (secondLine + secondInc) (acc . (D.Both a' a' :)) xs D.First a -> let firstInc = length a a' = zip3 (iterate (+ 1) firstLine) (repeat secondLine) a in go (firstLine + firstInc) secondLine (acc . (D.First a' :)) xs D.Second b -> let secondInc = length b b' = zip3 (repeat firstLine) (iterate (+ 1) secondLine) b in go firstLine (secondLine + secondInc) (acc . (D.Second b' :)) xs -- | Form 'Hunk's from a 'DiffList''. toHunks :: DiffList' -> [Hunk] toHunks = go 0 False id id [] where -- How many lines of context (that is, lines present in both texts) to -- show per hunk. margin = 3 go :: Int -> Bool -> ([Hunk] -> [Hunk]) -> (DiffList' -> DiffList') -> [(Int, Int, Text)] -> DiffList' -> [Hunk] go !n gotChanges hunksAcc currentAcc bothHistory = \case [] -> if gotChanges then let currentAcc' = addBothAfter p currentAcc p = take margin (reverse bothHistory) in case formHunk (currentAcc' []) of Nothing -> hunksAcc [] Just hunk -> hunksAcc [hunk] else hunksAcc [] (x : xs) -> case x of D.Both a _ -> let currentAcc' = addBothAfter p currentAcc p = reverse (drop (n' - margin) bothHistory') hunksAcc' = case formHunk (currentAcc' []) of Nothing -> hunksAcc Just hunk -> hunksAcc . (hunk :) bothHistory' = reverse a ++ bothHistory lena = length a n' = n + lena in if gotChanges && n' > margin * 2 then go 0 False hunksAcc' id bothHistory' xs else go n' gotChanges hunksAcc currentAcc bothHistory' xs piece -> if gotChanges then let currentAcc' = currentAcc . addBothBefore p (piece :) p = reverse bothHistory in go 0 True hunksAcc currentAcc' [] xs else let currentAcc' = addBothBefore p (piece :) p = reverse (take margin bothHistory) in go 0 True hunksAcc currentAcc' [] xs addBothBefore [] acc = acc addBothBefore p acc = (D.Both p p :) . acc addBothAfter [] acc = acc addBothAfter p acc = acc . (D.Both p p :) -- | Form a 'Hunk'. formHunk :: DiffList' -> Maybe Hunk formHunk xsRaw = do let xs = trimEmpty xsRaw hunkFirstStartLine <- listToMaybe xs >>= firstStartLine let hunkFirstLength = firstLength xs hunkSecondStartLine <- listToMaybe xs >>= secondStartLine let hunkSecondLength = secondLength xs hunkDiff = mapDiff (fmap third) xs return Hunk {..} -- | Trim empty “both” lines from beginning and end of a 'DiffList''. trimEmpty :: DiffList' -> DiffList' trimEmpty = go True id where go isFirst acc = \case [] -> acc [] [D.Both x _] -> let x' = reverse $ dropWhile (T.null . third) (reverse x) in go False (acc . (D.Both x' x' :)) [] (D.Both x _ : xs) -> let x' = dropWhile (T.null . third) x in if isFirst then go False (acc . (D.Both x' x' :)) xs else go False (acc . (D.Both x x :)) xs (x : xs) -> go False (acc . (x :)) xs firstStartLine :: D.Diff [(Int, Int, a)] -> Maybe Int firstStartLine = \case D.Both ((x, _, _) : _) _ -> Just x D.First ((x, _, _) : _) -> Just x D.Second ((x, _, _) : _) -> Just x _ -> Nothing firstLength :: [D.Diff [(Int, Int, a)]] -> Int firstLength = go 0 where go n [] = n go !n (x : xs) = case x of D.Both as _ -> go (n + length as) xs D.First as -> go (n + length as) xs D.Second _ -> go n xs secondStartLine :: D.Diff [(Int, Int, a)] -> Maybe Int secondStartLine = \case D.Both ((_, x, _) : _) _ -> Just x D.First ((_, x, _) : _) -> Just x D.Second ((_, x, _) : _) -> Just x _ -> Nothing secondLength :: [D.Diff [(Int, Int, a)]] -> Int secondLength = go 0 where go n [] = n go !n (x : xs) = case x of D.Both as _ -> go (n + length as) xs D.First _ -> go n xs D.Second as -> go (n + length as) xs mapDiff :: (a -> b) -> [D.Diff a] -> [D.Diff b] mapDiff f = fmap $ \case D.Both a b -> D.Both (f a) (f b) D.First a -> D.First (f a) D.Second b -> D.Second (f b) third :: (Int, Int, Text) -> Text third (_, _, x) = x isSelectedLine :: IntSet -> Hunk -> Bool isSelectedLine selected Hunk {..} = -- If the set of selected lines is empty, everything is selected. IntSet.null selected || not (IntSet.disjoint selected hunkOriginalLines) where hunkOriginalLines = IntSet.fromAscList (take hunkFirstLength [hunkFirstStartLine ..]) fourmolu-0.18.0.0/src/Ormolu/Exception.hs0000644000000000000000000001045414745250261016344 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QualifiedDo #-} -- | 'OrmoluException' type and surrounding definitions. module Ormolu.Exception ( OrmoluException (..), printOrmoluException, withPrettyOrmoluExceptions, ) where import Control.Exception import Data.Foldable (for_) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Text (Text) import Data.Text qualified as T import Data.Void (Void) import Distribution.Parsec.Error (PError, showPError) import GHC.Types.SrcLoc import Ormolu.Diff.Text (TextDiff, printTextDiff) import Ormolu.Terminal import Ormolu.Terminal.QualifiedDo qualified as Term import System.Exit (ExitCode (..)) import System.IO import Text.Megaparsec (ParseErrorBundle, errorBundlePretty) -- | Ormolu exception representing all cases when Ormolu can fail. data OrmoluException = -- | Parsing of original source code failed OrmoluParsingFailed SrcSpan String | -- | Parsing of formatted source code failed OrmoluOutputParsingFailed SrcSpan String | -- | Original and resulting ASTs differ OrmoluASTDiffers TextDiff [RealSrcSpan] | -- | Formatted source code is not idempotent OrmoluNonIdempotentOutput TextDiff | -- | Some GHC options were not recognized OrmoluUnrecognizedOpts (NonEmpty String) | -- | Cabal file parsing failed OrmoluCabalFileParsingFailed FilePath (NonEmpty PError) | -- | Missing input file path when using stdin input and -- accounting for .cabal files OrmoluMissingStdinInputFile | -- | A parse error in a fixity overrides file OrmoluFixityOverridesParseError (ParseErrorBundle Text Void) deriving (Show) instance Exception OrmoluException where displayException = T.unpack . runTermPure . printOrmoluException -- | Print an 'OrmoluException'. printOrmoluException :: OrmoluException -> Term printOrmoluException = \case OrmoluParsingFailed s e -> Term.do bold (putOutputable s) newline put " The GHC parser (in Haddock mode) failed:" newline put " " put (T.pack e) newline OrmoluOutputParsingFailed s e -> Term.do bold (putOutputable s) newline put " Parsing of formatted code failed:" newline put " " put (T.pack e) newline OrmoluASTDiffers diff ss -> Term.do printTextDiff diff newline put " AST of input and AST of formatted code differ." newline for_ ss $ \s -> Term.do put " at " putOutputable s newline put " Please, consider reporting the bug." newline put " To format anyway, use --unsafe." newline OrmoluNonIdempotentOutput diff -> Term.do printTextDiff diff newline put " Formatting is not idempotent." newline put " Please, consider reporting the bug." newline OrmoluUnrecognizedOpts opts -> Term.do put "The following GHC options were not recognized:" newline put " " (put . T.unwords . map T.pack . NE.toList) opts newline OrmoluCabalFileParsingFailed cabalFile parseErrors -> Term.do put "Parsing this .cabal file failed:" newline for_ parseErrors $ \e -> Term.do put . T.pack $ " " <> showPError cabalFile e newline OrmoluMissingStdinInputFile -> Term.do put "The --stdin-input-file option is necessary when using input" newline put "from stdin and accounting for .cabal files" newline OrmoluFixityOverridesParseError errorBundle -> Term.do put . T.pack . errorBundlePretty $ errorBundle newline -- | Inside this wrapper 'OrmoluException' will be caught and displayed -- nicely. withPrettyOrmoluExceptions :: -- | Color mode ColorMode -> -- | Action that may throw an exception IO ExitCode -> IO ExitCode withPrettyOrmoluExceptions colorMode m = m `catch` h where h e = do runTerm (printOrmoluException e) colorMode stderr return . ExitFailure $ case e of -- Error code 1 is for 'error' or 'notImplemented' -- 2 used to be for erroring out on CPP OrmoluParsingFailed {} -> 3 OrmoluOutputParsingFailed {} -> 4 OrmoluASTDiffers {} -> 5 OrmoluNonIdempotentOutput {} -> 6 OrmoluUnrecognizedOpts {} -> 7 OrmoluCabalFileParsingFailed {} -> 8 OrmoluMissingStdinInputFile {} -> 9 OrmoluFixityOverridesParseError {} -> 10 fourmolu-0.18.0.0/src/Ormolu/Fixity.hs0000644000000000000000000001252714745250261015665 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | Definitions for fixity analysis. module Ormolu.Fixity ( OpName, pattern OpName, unOpName, occOpName, FixityDirection (..), FixityInfo (..), defaultFixityInfo, FixityApproximation (..), defaultFixityApproximation, FixityOverrides (..), defaultFixityOverrides, ModuleReexports (..), defaultModuleReexports, PackageFixityMap (..), ModuleFixityMap (..), inferFixity, HackageInfo (..), hackageInfo, defaultDependencies, packageFixityMap, packageFixityMap', moduleFixityMap, applyFixityOverrides, ) where import Data.Binary qualified as Binary import Data.Binary.Get qualified as Binary import Data.ByteString.Lazy qualified as BL import Data.FileEmbed (embedFile) import Data.List.NonEmpty (NonEmpty) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.MemoTrie (memo) import Data.Set (Set) import Data.Set qualified as Set import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName, mkPackageName, unPackageName) import Language.Haskell.Syntax.ImpExp (ImportListInterpretation (..)) import Ormolu.Fixity.Imports (FixityImport (..)) import Ormolu.Fixity.Internal -- | The built-in 'HackageInfo' used by Ormolu. hackageInfo :: HackageInfo hackageInfo = Binary.runGet Binary.get $ BL.fromStrict $(embedFile "extract-hackage-info/hackage-info.bin") -- | Default set of packages to assume as dependencies e.g. when no Cabal -- file is found or taken into consideration. defaultDependencies :: Set PackageName defaultDependencies = Set.singleton (mkPackageName "base") -- | Compute the fixity map that is specific to the package we are formatting. packageFixityMap :: -- | Set of packages to select Set PackageName -> -- | Package fixity map PackageFixityMap packageFixityMap = packageFixityMap' hackageInfo -- | The same as 'packageFixityMap', except this specific version of the -- function allows the user to specify 'HackageInfo' used to build the final -- fixity map. packageFixityMap' :: -- | Hackage info HackageInfo -> -- | Set of packages to select Set PackageName -> -- | Package fixity map PackageFixityMap packageFixityMap' (HackageInfo m) = memoSet $ \dependencies -> -- The core idea here is to transform: -- -- Map PackageName (Map ModuleName (Map OpName FixityInfo)) -- -- into -- -- Map OpName [(PackageName, ModuleName, FixityInfo)] -- -- which we accomplish by turning 'Map's into tuples with 'Map.toList' and -- then flattening them with 'flatten :: [(a, [b])] -> [(a, b)]'. -- -- The target type results from the need to be able to quickly index by -- the operator name when we do fixity resolution later. PackageFixityMap . Map.mapMaybe NE.nonEmpty . Map.fromListWith (<>) . fmap rearrange . flatten . Map.toList . Map.map (flatten . Map.toList . Map.map Map.toList) $ Map.restrictKeys m dependencies where rearrange (packageName, (moduleName, (opName, fixityInfo))) = (opName, [(packageName, moduleName, fixityInfo)]) flatten xs = do (k, vs) <- xs v <- vs return (k, v) -- | Compute the fixity map that is specific to the module we are formatting. moduleFixityMap :: -- | Fixity information selected from dependencies of this package PackageFixityMap -> -- | A simplified representation of the import list in this module [FixityImport] -> -- | Fixity map specific to this module ModuleFixityMap moduleFixityMap (PackageFixityMap m) imports = ModuleFixityMap $ Map.insert ":" (Given colonFixityInfo) (Map.map FromModuleImports (Map.mapMaybeWithKey select m)) where select :: OpName -> NonEmpty (PackageName, ModuleName, FixityInfo) -> Maybe (NonEmpty (FixityQualification, FixityInfo)) select opName = let f (packageName, moduleName, fixityInfo) = (,fixityInfo) <$> resolveThroughImports packageName moduleName opName in NE.nonEmpty . concatMap f resolveThroughImports :: PackageName -> ModuleName -> OpName -> [FixityQualification] resolveThroughImports packageName moduleName opName = let doesImportMatch FixityImport {..} = let packageMatches = case fimportPackage of Nothing -> True Just p -> p == packageName moduleMatches = fimportModule == moduleName opMatches = case fimportList of Nothing -> True Just (Exactly, xs) -> opName `elem` xs Just (EverythingBut, xs) -> opName `notElem` xs in packageMatches && moduleMatches && opMatches in fimportQualified <$> filter doesImportMatch imports -- | Apply fixity overrides. applyFixityOverrides :: -- | User overrides FixityOverrides -> -- | Module fixity map ModuleFixityMap -> -- | Module fixity map with overrides applied ModuleFixityMap applyFixityOverrides (FixityOverrides o) (ModuleFixityMap m) = ModuleFixityMap (Map.union (Map.map Given o) m) memoSet :: (Set PackageName -> v) -> Set PackageName -> v memoSet f = memo (f . Set.fromAscList . fmap mkPackageName) . fmap unPackageName . Set.toAscList fourmolu-0.18.0.0/src/Ormolu/Fixity/Imports.hs0000644000000000000000000000612714745250261017321 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | Simplified representation of the import list for the purposes of fixity -- inference. module Ormolu.Fixity.Imports ( FixityImport (..), extractFixityImports, applyModuleReexports, ) where import Data.Bifunctor (second) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName import GHC.Data.FastString qualified as GHC import GHC.Hs hiding (ModuleName, OpName) import GHC.Types.Name.Occurrence import GHC.Types.PkgQual (RawPkgQual (..)) import GHC.Types.SourceText (StringLiteral (..)) import GHC.Types.SrcLoc import Ormolu.Fixity.Internal import Ormolu.Utils (ghcModuleNameToCabal) -- | Simplified info about an import. data FixityImport = FixityImport { fimportPackage :: !(Maybe PackageName), fimportModule :: !ModuleName, fimportQualified :: !FixityQualification, fimportList :: !(Maybe (ImportListInterpretation, [OpName])) } -- | Extract 'FixityImport's from the AST. extractFixityImports :: [LImportDecl GhcPs] -> [FixityImport] extractFixityImports = fmap (extractFixityImport . unLoc) -- | Extract an individual 'FixityImport'. extractFixityImport :: ImportDecl GhcPs -> FixityImport extractFixityImport ImportDecl {..} = FixityImport { fimportPackage = case ideclPkgQual of NoRawPkgQual -> Nothing RawPkgQual strLiteral -> Just . mkPackageName . GHC.unpackFS . sl_fs $ strLiteral, fimportModule = ideclName', fimportQualified = case (ideclQualified, ideclAs') of (QualifiedPre, Nothing) -> OnlyQualified ideclName' (QualifiedPost, Nothing) -> OnlyQualified ideclName' (QualifiedPre, Just m) -> OnlyQualified m (QualifiedPost, Just m) -> OnlyQualified m (NotQualified, Nothing) -> UnqualifiedAndQualified ideclName' (NotQualified, Just m) -> UnqualifiedAndQualified m, fimportList = fmap (second (concatMap (fmap occOpName . ieToOccNames . unLoc) . unLoc)) ideclImportList } where ideclName' = ghcModuleNameToCabal (unLoc ideclName) ideclAs' = ghcModuleNameToCabal . unLoc <$> ideclAs ieToOccNames :: IE GhcPs -> [OccName] ieToOccNames = \case IEVar _ (L _ x) _ -> [occName x] IEThingAbs _ (L _ x) _ -> [occName x] IEThingAll _ (L _ x) _ -> [occName x] -- TODO not quite correct, but how to do better? IEThingWith _ (L _ x) _ xs _ -> occName x : fmap (occName . unLoc) xs _ -> [] -- | Apply given module re-exports. applyModuleReexports :: ModuleReexports -> [FixityImport] -> [FixityImport] applyModuleReexports (ModuleReexports reexports) imports = imports >>= expand where expand i = do case Map.lookup (fimportModule i) reexports of Nothing -> pure i Just exports -> let exportToImport (mpackageName, mmodule) = i { fimportPackage = mpackageName, fimportModule = mmodule } in NE.toList exports >>= expand . exportToImport fourmolu-0.18.0.0/src/Ormolu/Fixity/Internal.hs0000644000000000000000000002466514745250261017447 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Fixity.Internal ( OpName, pattern OpName, unOpName, occOpName, FixityDirection (..), FixityInfo (..), colonFixityInfo, defaultFixityInfo, FixityApproximation (..), defaultFixityApproximation, HackageInfo (..), FixityOverrides (..), defaultFixityOverrides, ModuleReexports (..), defaultModuleReexports, PackageFixityMap (..), ModuleFixityMap (..), FixityProvenance (..), FixityQualification (..), inferFixity, ) where import Data.Binary (Binary) import Data.Binary qualified as Binary import Data.Binary.Get qualified as Binary import Data.Binary.Put qualified as Binary import Data.ByteString.Short (ShortByteString) import Data.ByteString.Short qualified as SBS import Data.Choice (Choice) import Data.Choice qualified as Choice import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Map.Strict (Map) import Data.Map.Strict qualified as Map import Data.Maybe (fromMaybe) import Data.String (IsString (..)) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Encoding qualified as T import Debug.Trace (trace) import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName import GHC.Data.FastString (fs_sbs) import GHC.Generics (Generic) import GHC.Types.Name (OccName (occNameFS)) import GHC.Types.Name.Reader (RdrName (..), rdrNameOcc) import Ormolu.Utils (ghcModuleNameToCabal) -- | An operator name. newtype OpName = MkOpName { -- | Invariant: UTF-8 encoded getOpName :: ShortByteString } deriving newtype (Eq, Ord, Binary) -- | Convert an 'OpName' to 'Text'. unOpName :: OpName -> Text unOpName = T.decodeUtf8 . SBS.fromShort . getOpName pattern OpName :: Text -> OpName pattern OpName opName <- (unOpName -> opName) where OpName = MkOpName . SBS.toShort . T.encodeUtf8 {-# COMPLETE OpName #-} -- | Convert an 'OccName to an 'OpName'. occOpName :: OccName -> OpName occOpName = MkOpName . fs_sbs . occNameFS instance Show OpName where show = T.unpack . unOpName instance IsString OpName where fromString = OpName . T.pack -- | Fixity direction. data FixityDirection = InfixL | InfixR | InfixN deriving stock (Eq, Ord, Show, Generic) deriving anyclass (Binary) -- | Fixity information about an infix operator. This type provides precise -- information as opposed to 'FixityApproximation'. data FixityInfo = FixityInfo { -- | Fixity direction fiDirection :: FixityDirection, -- | Precedence fiPrecedence :: Double } deriving stock (Eq, Ord, Show, Generic) instance Binary FixityInfo where put FixityInfo {..} = do Binary.put fiDirection Binary.putDoublele fiPrecedence get = do fiDirection <- Binary.get fiPrecedence <- Binary.getDoublele pure FixityInfo {..} -- | Fixity info of the built-in colon data constructor. colonFixityInfo :: FixityInfo colonFixityInfo = FixityInfo InfixR 5 -- | Fixity that is implicitly assumed if no fixity declaration is present. defaultFixityInfo :: FixityInfo defaultFixityInfo = FixityInfo InfixL 9 -- | Approximation of fixity information that takes the uncertainty that can -- arise from conflicting definitions into account. data FixityApproximation = FixityApproximation { -- | Fixity direction if it is known faDirection :: Maybe FixityDirection, -- | Minimum precedence level found in the (maybe conflicting) -- definitions for the operator (inclusive) faMinPrecedence :: Double, -- | Maximum precedence level found in the (maybe conflicting) -- definitions for the operator (inclusive) faMaxPrecedence :: Double } deriving stock (Eq, Ord, Show, Generic) instance Binary FixityApproximation where put FixityApproximation {..} = do Binary.put faDirection Binary.putDoublele faMinPrecedence Binary.putDoublele faMaxPrecedence get = do faDirection <- Binary.get faMinPrecedence <- Binary.getDoublele faMaxPrecedence <- Binary.getDoublele pure FixityApproximation {..} -- | Gives the ability to merge two (maybe conflicting) definitions for an -- operator, keeping the higher level of compatible information from both. instance Semigroup FixityApproximation where FixityApproximation {faDirection = dir1, faMinPrecedence = min1, faMaxPrecedence = max1} <> FixityApproximation {faDirection = dir2, faMinPrecedence = min2, faMaxPrecedence = max2} = FixityApproximation { faDirection = dir', faMinPrecedence = min min1 min2, faMaxPrecedence = max max1 max2 } where dir' = case (dir1, dir2) of (Just a, Just b) | a == b -> Just a _ -> Nothing -- | The lowest level of information we can have about an operator. defaultFixityApproximation :: FixityApproximation defaultFixityApproximation = fixityInfoToApproximation defaultFixityInfo -- | Convert from 'FixityInfo' to 'FixityApproximation'. fixityInfoToApproximation :: FixityInfo -> FixityApproximation fixityInfoToApproximation FixityInfo {..} = FixityApproximation { faDirection = Just fiDirection, faMinPrecedence = fiPrecedence, faMaxPrecedence = fiPrecedence } -- | The map of operators declared by each package grouped by module name. newtype HackageInfo = HackageInfo (Map PackageName (Map ModuleName (Map OpName FixityInfo))) deriving stock (Generic) deriving anyclass (Binary) -- | Map from the operator name to its 'FixityInfo'. newtype FixityOverrides = FixityOverrides { unFixityOverrides :: Map OpName FixityInfo } deriving stock (Eq, Show) -- | Fixity overrides to use by default. defaultFixityOverrides :: FixityOverrides defaultFixityOverrides = FixityOverrides Map.empty -- | Module re-exports newtype ModuleReexports = ModuleReexports { unModuleReexports :: Map ModuleName (NonEmpty (Maybe PackageName, ModuleName)) } deriving stock (Eq, Show) -- | Module re-exports to apply by default. defaultModuleReexports :: ModuleReexports defaultModuleReexports = ModuleReexports . Map.fromList $ [ ( "Control.Lens", l "lens" [ "Control.Lens.At", "Control.Lens.Cons", "Control.Lens.Each", "Control.Lens.Empty", "Control.Lens.Equality", "Control.Lens.Fold", "Control.Lens.Getter", "Control.Lens.Indexed", "Control.Lens.Iso", "Control.Lens.Lens", "Control.Lens.Level", "Control.Lens.Plated", "Control.Lens.Prism", "Control.Lens.Reified", "Control.Lens.Review", "Control.Lens.Setter", "Control.Lens.TH", "Control.Lens.Traversal", "Control.Lens.Tuple", "Control.Lens.Type", "Control.Lens.Wrapped", "Control.Lens.Zoom" ] ), ( "Servant", l "servant" [ "Servant.API" ] ), ( "Optics", l "optics" [ "Optics.Fold", "Optics.Operators", "Optics.IxAffineFold", "Optics.IxFold", "Optics.IxTraversal", "Optics.Traversal" ] ), ( "Test.Hspec", l "hspec-expectations" [ "Test.Hspec.Expectations" ] ) ] where l packageName xs = (Just packageName,) <$> NE.fromList xs -- | Fixity information that is specific to a package being formatted. It -- requires module-specific imports in order to be usable. newtype PackageFixityMap = PackageFixityMap (Map OpName (NonEmpty (PackageName, ModuleName, FixityInfo))) deriving stock (Eq, Show) -- | Fixity map that takes into account imports in a particular module. newtype ModuleFixityMap = ModuleFixityMap (Map OpName FixityProvenance) deriving stock (Eq, Show) -- | Provenance of fixity info. data FixityProvenance = -- | 'FixityInfo' of a built-in operator or provided by a user override. Given FixityInfo | -- | 'FixityInfo' to be inferred from module imports. FromModuleImports (NonEmpty (FixityQualification, FixityInfo)) deriving stock (Eq, Show) -- | Fixity qualification that determines how 'FixityInfo' matches a -- particular use of an operator, given whether it is qualified or -- unqualified and the module name used. data FixityQualification = UnqualifiedAndQualified ModuleName | OnlyQualified ModuleName deriving stock (Eq, Show) -- | Get a 'FixityApproximation' of an operator. inferFixity :: -- | Whether to print debug info regarding fixity inference Choice "debug" -> -- | Operator name RdrName -> -- | Module fixity map ModuleFixityMap -> -- | The resulting fixity approximation FixityApproximation inferFixity debug rdrName (ModuleFixityMap m) = if Choice.isTrue debug then trace (renderFixityJustification opName moduleName m result) result else result where result = case Map.lookup opName m of Nothing -> defaultFixityApproximation Just (Given fixityInfo) -> fixityInfoToApproximation fixityInfo Just (FromModuleImports xs) -> let isMatching (provenance, _fixityInfo) = case provenance of UnqualifiedAndQualified mn -> maybe True (== mn) moduleName OnlyQualified mn -> maybe False (== mn) moduleName in fromMaybe defaultFixityApproximation . foldMap (Just . fixityInfoToApproximation . snd) $ NE.filter isMatching xs opName = occOpName (rdrNameOcc rdrName) moduleName = case rdrName of Qual x _ -> Just (ghcModuleNameToCabal x) _ -> Nothing -- | Render a human-readable account of why a certain 'FixityApproximation' -- was chosen for an operator. renderFixityJustification :: -- | Operator name OpName -> -- | Qualification of the operator name Maybe ModuleName -> -- | Module fixity map Map OpName FixityProvenance -> -- | The chosen fixity approximation FixityApproximation -> String renderFixityJustification opName mqualification m approximation = concat [ "FIXITY analysis of ", show opName, case mqualification of Nothing -> "" Just mn -> " qualified in " ++ show mn, "\n Provenance: " ++ show (Map.lookup opName m), "\n Inferred: " ++ show approximation ] fourmolu-0.18.0.0/src/Ormolu/Fixity/Parser.hs0000644000000000000000000001335314745250261017117 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Parser for fixity maps. module Ormolu.Fixity.Parser ( parseDotOrmolu, parseFixityDeclaration, parseModuleReexportDeclaration, -- * Raw parsers pFixity, pOperator, pModuleName, pPackageName, -- * Internal isIdentifierFirstChar, isIdentifierConstituent, isOperatorConstituent, isPackageNameConstituent, isModuleSegmentFirstChar, isModuleSegmentConstituent, ) where import Control.Monad (void, when) import Data.Bifunctor (bimap) import Data.Char (isAlphaNum, isUpper) import Data.Char qualified as Char import Data.Either (partitionEithers) import Data.List (intercalate) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as T import Data.Void (Void) import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName (PackageName, mkPackageName) import Ormolu.Fixity import Text.Megaparsec import Text.Megaparsec.Char import Text.Megaparsec.Char.Lexer qualified as L type Parser = Parsec Void Text -- TODO Support fixity namespacing? -- https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0065-type-infix.rst -- -- Note that currently, our fixity machinery does *not* do any namespacing: -- -- - https://github.com/tweag/ormolu/pull/994#pullrequestreview-1396958951 -- brought this up in the past -- -- - https://github.com/tweag/ormolu/pull/1029#issue-1718217029 -- has a concrete example (morley-prelude) where namespacing would matter -- | Parse textual representation of 'FixityOverrides'. parseDotOrmolu :: -- | Location of the file we are parsing (only for parse errors) FilePath -> -- | File contents to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) (FixityOverrides, ModuleReexports) parseDotOrmolu = runParser pDotOrmolu -- | Parse a single self-contained fixity declaration. parseFixityDeclaration :: -- | Text to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) [(OpName, FixityInfo)] parseFixityDeclaration = runParser (pFixity <* eof) "" -- | Parse a single self-contained module re-export declaration. parseModuleReexportDeclaration :: -- | Text to parse Text -> -- | Parse result Either (ParseErrorBundle Text Void) (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) parseModuleReexportDeclaration = runParser (pModuleReexport <* eof) "" pDotOrmolu :: Parser (FixityOverrides, ModuleReexports) pDotOrmolu = bimap (FixityOverrides . Map.fromList . mconcat) (ModuleReexports . Map.map NE.sort . Map.fromListWith (<>)) . partitionEithers <$> (configLine `sepEndBy` (void eol *> hidden space)) <* eof where configLine = eitherP pFixity pModuleReexport -- | Parse a single fixity declaration, such as -- -- > infixr 4 +++, >>> pFixity :: Parser [(OpName, FixityInfo)] pFixity = do fiDirection <- pFixityDirection hidden hspace1 offsetAtPrecedence <- getOffset fiPrecedence <- try L.float <|> (fromIntegral <$> (L.decimal :: Parser Integer)) when (fiPrecedence > 9) $ region (setErrorOffset offsetAtPrecedence) (fail "precedence should not be greater than 9") hidden hspace1 ops <- sepBy1 pOperator (char ',' >> hidden hspace) hidden hspace let fixityInfo = FixityInfo {..} return ((,fixityInfo) <$> ops) pFixityDirection :: Parser FixityDirection pFixityDirection = choice [ InfixL <$ string "infixl", InfixR <$ string "infixr", InfixN <$ string "infix" ] -- | See pOperator :: Parser OpName pOperator = OpName <$> (tickedOperator <|> normalOperator) where tickedOperator = between tick tick haskellIdentifier tick = char '`' haskellIdentifier = T.cons <$> letterChar <*> takeWhileP Nothing isIdentifierConstituent normalOperator = takeWhile1P (Just "operator character") isOperatorConstituent pModuleReexport :: Parser (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) pModuleReexport = do void (string "module") hidden hspace1 exportingModule <- pModuleName hidden hspace1 void (string "exports") hidden hspace1 mexportedPackage <- optional $ between (char '\"') (char '\"') pPackageName <* hidden hspace1 exportedModule <- pModuleName hidden hspace return (exportingModule, NE.singleton (mexportedPackage, exportedModule)) pModuleName :: Parser ModuleName pModuleName = ModuleName.fromString . intercalate "." <$> sepBy1 pModuleSegment (char '.') "module name" where pModuleSegment = do x <- satisfy isModuleSegmentFirstChar "capital letter" xs <- many ( satisfy isModuleSegmentConstituent "module segment continuation" ) return (x : xs) pPackageName :: Parser PackageName pPackageName = mkPackageName <$> some (satisfy isPackageNameConstituent) "package name" -- Internal predicates (exposed for testing) isIdentifierFirstChar :: Char -> Bool isIdentifierFirstChar = Char.isLetter isIdentifierConstituent :: Char -> Bool isIdentifierConstituent x = Char.isAlphaNum x || x == '_' || x == '\'' isOperatorConstituent :: Char -> Bool isOperatorConstituent x = (Char.isSymbol x || Char.isPunctuation x) && (x /= ',' && x /= '`' && x /= '(' && x /= ')') isPackageNameConstituent :: Char -> Bool isPackageNameConstituent x = x == '-' || isAlphaNum x isModuleSegmentFirstChar :: Char -> Bool isModuleSegmentFirstChar x = isAlphaNum x && isUpper x isModuleSegmentConstituent :: Char -> Bool isModuleSegmentConstituent x = x == '_' || x == '\'' || isAlphaNum x fourmolu-0.18.0.0/src/Ormolu/Fixity/Printer.hs0000644000000000000000000000530714745250261017306 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Printer for fixity overrides. module Ormolu.Fixity.Printer ( printDotOrmolu, ) where import Data.Char qualified as Char import Data.List (intercalate) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict qualified as Map import Data.Semigroup (sconcat) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Lazy qualified as TL import Data.Text.Lazy.Builder (Builder) import Data.Text.Lazy.Builder qualified as B import Data.Text.Lazy.Builder.Int qualified as B import Data.Text.Lazy.Builder.RealFloat qualified as B import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName import Ormolu.Fixity -- | Print out a textual representation of an @.ormolu@ file. printDotOrmolu :: FixityOverrides -> ModuleReexports -> Text printDotOrmolu (FixityOverrides fixityOverrides) (ModuleReexports moduleReexports) = TL.toStrict . B.toLazyText $ (mconcat . fmap renderSingleFixityOverride . Map.toList) fixityOverrides <> (mconcat . fmap renderSingleModuleReexport . Map.toList) moduleReexports renderSingleFixityOverride :: (OpName, FixityInfo) -> Builder renderSingleFixityOverride (OpName operator, FixityInfo {..}) = mconcat [ case fiDirection of InfixL -> "infixl" InfixR -> "infixr" InfixN -> "infix", " ", renderPrecedence fiPrecedence, " ", if isTickedOperator operator then "`" <> B.fromText operator <> "`" else B.fromText operator, "\n" ] where isTickedOperator = maybe True (Char.isLetter . fst) . T.uncons renderSingleModuleReexport :: (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) -> Builder renderSingleModuleReexport (exportingModule, exports) = sconcat (renderSingle <$> exports) where renderSingle (mexportedPackage, exportedModule) = mconcat [ "module ", renderModuleName exportingModule, " exports ", renderOptionalPackageName mexportedPackage, renderModuleName exportedModule, "\n" ] renderOptionalPackageName = \case Nothing -> mempty Just x -> "\"" <> B.fromString (unPackageName x) <> "\" " renderModuleName :: ModuleName -> Builder renderModuleName = B.fromString . intercalate "." . ModuleName.components -- | Render precedence using integer representation for whole numbers. renderPrecedence :: Double -> Builder renderPrecedence x = let (n :: Int, fraction :: Double) = properFraction x isWholeEnough = fraction < 0.0001 in if isWholeEnough then B.decimal n else B.realFloat x fourmolu-0.18.0.0/src/Ormolu/Imports.hs0000644000000000000000000002157414745250261016050 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} -- | Manipulations on import lists. module Ormolu.Imports ( normalizeImports, ) where import Data.Bifunctor import Data.Char (isAlphaNum) import Data.Function (on) import Data.List (nubBy, sortBy, sortOn) import Data.Map.Strict (Map) import Data.Map.Strict qualified as M import Data.Ord (comparing) import Data.Set (Set) import Distribution.ModuleName qualified as Cabal import GHC.Data.FastString import GHC.Hs import GHC.Hs.ImpExp as GHC import GHC.Types.Name.Reader import GHC.Types.PkgQual import GHC.Types.SourceText import GHC.Types.SrcLoc import Ormolu.Config (ImportGrouping) import Ormolu.Imports.Grouping (Import (..), groupImports, prepareExistingGroups) import Ormolu.Utils (notImplemented, showOutputable) #if !MIN_VERSION_base(4,20,0) import Data.List (foldl') #endif -- | Sort, group and normalize imports. -- -- Assumes input list is sorted by source location. Output list is not necessarily -- sorted by source location, so this function should be called at most once on a -- given input list. normalizeImports :: Bool -> Set Cabal.ModuleName -> ImportGrouping -> [LImportDecl GhcPs] -> [[LImportDecl GhcPs]] normalizeImports respectful localModules importGrouping = map (fmap snd) . concatMap ( groupImports importGrouping localModules toImport . M.toAscList . M.fromListWith combineImports . fmap (\x -> (importId x, g x)) ) . prepareExistingGroups importGrouping respectful where toImport :: (ImportId, x) -> Import toImport (ImportId {..}, _) = Import {importName = importIdName, importQualified} g :: LImportDecl GhcPs -> LImportDecl GhcPs g (L l ImportDecl {..}) = L l ImportDecl { ideclImportList = second (fmap normalizeLies) <$> ideclImportList, .. } -- | Combine two import declarations. It should be assumed that 'ImportId's -- are equal. combineImports :: LImportDecl GhcPs -> LImportDecl GhcPs -> LImportDecl GhcPs combineImports (L lx ImportDecl {..}) (L _ y) = L lx ImportDecl { ideclImportList = case (ideclImportList, GHC.ideclImportList y) of (Just (hiding, L l' xs), Just (_, L _ ys)) -> Just (hiding, (L l' (normalizeLies (xs ++ ys)))) _ -> Nothing, .. } -- | Import id, a collection of all things that justify having a separate -- import entry. This is used for merging of imports. If two imports have -- the same 'ImportId' they can be merged. data ImportId = ImportId { importIsPrelude :: Bool, importPkgQual :: ImportPkgQual, importIdName :: ModuleName, importSource :: IsBootInterface, importSafe :: Bool, importQualified :: Bool, importAs :: Maybe ModuleName, importHiding :: Maybe ImportListInterpretationOrd } deriving (Eq, Ord) data ImportPkgQual = -- | The import is not qualified by a package name. NoImportPkgQual | -- | The import is qualified by an external package name. ImportPkgQual LexicalFastString | -- | The import is qualified by the current package being built, using the -- special @this@ package name. ImportPkgQualThis deriving stock (Eq, Ord) mkImportPkgQual :: RawPkgQual -> ImportPkgQual mkImportPkgQual = \case NoRawPkgQual -> NoImportPkgQual RawPkgQual (sl_fs -> fs) | fs == mkFastString "this" -> ImportPkgQualThis | otherwise -> ImportPkgQual (LexicalFastString fs) -- | 'ImportListInterpretation' does not have an 'Ord' instance. newtype ImportListInterpretationOrd = ImportListInterpretationOrd { unImportListInterpretationOrd :: ImportListInterpretation } deriving stock (Eq) instance Ord ImportListInterpretationOrd where compare = compare `on` toBool . unImportListInterpretationOrd where toBool Exactly = False toBool EverythingBut = True -- | Obtain an 'ImportId' for a given import. importId :: LImportDecl GhcPs -> ImportId importId (L _ ImportDecl {..}) = ImportId { importIsPrelude = isPrelude, importIdName = moduleName, importPkgQual = mkImportPkgQual ideclPkgQual, importSource = ideclSource, importSafe = ideclSafe, importQualified = case ideclQualified of QualifiedPre -> True QualifiedPost -> True NotQualified -> False, importAs = unLoc <$> ideclAs, importHiding = ImportListInterpretationOrd . fst <$> ideclImportList } where isPrelude = moduleNameString moduleName == "Prelude" moduleName = unLoc ideclName -- | Normalize a collection of import 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 x n wildcard g _ -> IEThingWith x n wildcard (normalizeWNames g) Nothing other -> other Just old -> let f = \case IEVar _ n _ -> IEVar Nothing n Nothing IEThingAbs _ _ _ -> new IEThingAll x n _ -> IEThingAll x n Nothing IEThingWith _ n wildcard g _ -> case new of IEVar _ _ _ -> error "Ormolu.Imports broken presupposition" IEThingAbs x _ _ -> IEThingWith (x, noAnn) n wildcard g Nothing IEThingAll x n' _ -> IEThingAll x n' Nothing IEThingWith x n' wildcard' g' _ -> let combinedWildcard = case (wildcard, wildcard') of (IEWildcard _, _) -> IEWildcard 0 (_, IEWildcard _) -> IEWildcard 0 _ -> NoIEWildcard in IEThingWith x n' combinedWildcard (normalizeWNames (g <> g')) Nothing IEModuleContents _ _ -> notImplemented "IEModuleContents" IEGroup NoExtField _ _ -> notImplemented "IEGroup" IEDoc NoExtField _ -> notImplemented "IEDoc" IEDocNamed NoExtField _ -> notImplemented "IEDocNamed" IEModuleContents _ _ -> notImplemented "IEModuleContents" IEGroup NoExtField _ _ -> notImplemented "IEGroup" IEDoc NoExtField _ -> notImplemented "IEDoc" IEDocNamed NoExtField _ -> notImplemented "IEDocNamed" in Just (f <$> old) in M.alter alter wname m -- | A wrapper for @'IEWrappedName' 'GhcPs'@ that allows us to define an -- 'Ord' instance for it. newtype IEWrappedNameOrd = IEWrappedNameOrd (IEWrappedName GhcPs) deriving (Eq) instance Ord IEWrappedNameOrd where compare (IEWrappedNameOrd x) (IEWrappedNameOrd y) = compareIewn x y -- | Project @'IEWrappedName' 'GhcPs'@ from @'IE' 'GhcPs'@. getIewn :: IE GhcPs -> IEWrappedNameOrd getIewn = \case IEVar _ x _ -> IEWrappedNameOrd (unLoc x) IEThingAbs _ x _ -> IEWrappedNameOrd (unLoc x) IEThingAll _ x _ -> IEWrappedNameOrd (unLoc x) IEThingWith _ x _ _ _ -> IEWrappedNameOrd (unLoc x) IEModuleContents _ _ -> notImplemented "IEModuleContents" IEGroup NoExtField _ _ -> notImplemented "IEGroup" IEDoc NoExtField _ -> notImplemented "IEDoc" IEDocNamed NoExtField _ -> notImplemented "IEDocNamed" -- | Like 'compareIewn' for located wrapped names. compareLIewn :: LIEWrappedName GhcPs -> LIEWrappedName GhcPs -> Ordering compareLIewn = compareIewn `on` unLoc -- | Compare two @'IEWrapppedName' 'GhcPs'@ things. compareIewn :: IEWrappedName GhcPs -> IEWrappedName GhcPs -> Ordering compareIewn = (comparing fst <> (compareRdrName `on` unLoc . snd)) `on` classify where classify :: IEWrappedName GhcPs -> (Int, LocatedN RdrName) classify = \case IEName _ x -> (0, x) IEDefault _ x -> (1, x) IEPattern _ x -> (2, x) IEType _ x -> (3, x) 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 fourmolu-0.18.0.0/src/Ormolu/Parser.hs0000644000000000000000000003355414745250261015650 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# 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.Functor.Identity (Identity (..)) import Data.Generics hiding (orElse) import Data.List qualified as L import Data.List.NonEmpty qualified as NE import Data.Text (Text) import GHC.Builtin.Names (mAIN_NAME) import GHC.Data.Bag (bagToList) import GHC.Data.EnumSet qualified as EnumSet import GHC.Data.FastString qualified as GHC import GHC.Data.Maybe (orElse) import GHC.Data.StringBuffer (StringBuffer) import GHC.Driver.Config.Parser (initParserOpts) import GHC.Driver.Errors.Types qualified as GHC import GHC.Driver.Session as GHC import GHC.DynFlags (baseDynFlags) import GHC.Hs hiding (UnicodeSyntax) import GHC.LanguageExtensions.Type (Extension (..)) import GHC.Parser qualified as GHC import GHC.Parser.Annotation qualified as GHC import GHC.Parser.Header qualified as GHC import GHC.Parser.Lexer qualified as GHC import GHC.Types.Error qualified as GHC import GHC.Types.SourceError qualified as GHC import GHC.Types.SrcLoc import GHC.Utils.Error import GHC.Utils.Exception (ExceptionMonad) import GHC.Utils.Panic qualified as GHC import Ormolu.Config import Ormolu.Config.Gen (SingleConstraintParens (..)) import Ormolu.Exception import Ormolu.Fixity hiding (packageFixityMap) import Ormolu.Fixity.Imports (applyModuleReexports, extractFixityImports) import Ormolu.Parser.CommentStream import Ormolu.Parser.Result import Ormolu.Processing.Common import Ormolu.Processing.Cpp (eraseCppLines) import Ormolu.Processing.Preprocess import Ormolu.Utils (incSpanLine, showOutputable, textToStringBuffer) -- | Parse a complete module from 'Text'. parseModule :: (MonadIO m) => -- | Ormolu configuration Config RegionDeltas -> -- | Package fixity map PackageFixityMap -> -- | File name (only for source location annotations) FilePath -> -- | Input for parser Text -> m ( GHC.DriverMessages, Either (SrcSpan, String) [SourceSnippet] ) parseModule config@Config {..} packageFixityMap path rawInput = liftIO $ do -- It's important that 'setDefaultExts' is done before -- 'parsePragmasIntoDynFlags', because otherwise we might enable an -- extension that was explicitly disabled in the file. let baseFlags = GHC.setGeneralFlag' GHC.Opt_Haddock (setDefaultExts baseDynFlags) extraOpts = dynOptionToLocatedStr <$> cfgDynOptions rawInputStringBuffer = textToStringBuffer (eraseCppLines rawInput) beginningLoc = mkSrcSpan (mkSrcLoc (GHC.mkFastString path) 1 1) (mkSrcLoc (GHC.mkFastString path) 1 1) (warnings, dynFlags) <- parsePragmasIntoDynFlags baseFlags extraOpts path rawInputStringBuffer >>= \case Right res -> pure res Left err -> throwIO (OrmoluParsingFailed beginningLoc err) let cppEnabled = EnumSet.member Cpp (GHC.extensionFlags dynFlags) implicitPrelude = EnumSet.member ImplicitPrelude (GHC.extensionFlags dynFlags) fixityImports <- parseImports dynFlags implicitPrelude path rawInputStringBuffer >>= \case Right res -> pure (applyModuleReexports cfgModuleReexports (extractFixityImports res)) Left err -> throwIO (OrmoluParsingFailed beginningLoc err) let modFixityMap = applyFixityOverrides cfgFixityOverrides (moduleFixityMap packageFixityMap fixityImports) snippets <- runExceptT . forM (preprocess cppEnabled cfgRegion rawInput) $ \case Right region -> fmap ParsedSnippet . ExceptT $ parseModuleSnippet (config $> region) modFixityMap dynFlags path rawInput Left raw -> pure $ RawSnippet raw pure (warnings, snippets) parseModuleSnippet :: (MonadIO m) => Config RegionDeltas -> ModuleFixityMap -> DynFlags -> FilePath -> Text -> m (Either (SrcSpan, String) ParseResult) parseModuleSnippet config@Config {..} modFixityMap dynFlags path rawInput = liftIO $ do let (input, indent) = removeIndentation . linesInRegion cfgRegion $ rawInput let pStateErrors pstate = let errs = bagToList . GHC.getMessages $ GHC.getPsErrorMessages pstate fixupErrSpan = incSpanLine (regionPrefixLength cfgRegion) rateSeverity = \case SevError -> 1 :: Int SevWarning -> 2 SevIgnore -> 3 showErr (errMsgDiagnostic -> err) = codeMsg <> msg where codeMsg = case diagnosticCode err of Just code -> "[" <> showOutputable code <> "] " Nothing -> "" msg = showOutputable . formatBulleted . diagnosticMessage GHC.NoDiagnosticOpts $ err in case L.sortOn (rateSeverity . errMsgSeverity) errs of [] -> Nothing err : _ -> Just (fixupErrSpan (errMsgSpan err), showErr err) parser = case cfgSourceType of ModuleSource -> GHC.parseModule SignatureSource -> GHC.parseSignature r = case runParser parser dynFlags path input of GHC.PFailed pstate -> case pStateErrors pstate of Just err -> Left err Nothing -> error "PFailed does not have an error" GHC.POk pstate (L _ (normalizeModule config -> hsModule)) -> case pStateErrors pstate of -- Some parse errors (pattern/arrow syntax in expr context) -- do not cause a parse error, but they are replaced with "_" -- by the parser and the modified AST is propagated to the -- later stages; but we fail in those cases. Just err -> Left err Nothing -> let (stackHeader, pragmas, comments) = mkCommentStream input hsModule in Right ParseResult { prParsedSource = hsModule, prSourceType = cfgSourceType, prStackHeader = stackHeader, prPragmas = pragmas, prCommentStream = comments, prExtensions = GHC.extensionFlags dynFlags, prModuleFixityMap = modFixityMap, prIndent = indent, prLocalModules = cfgLocalModules } return r -- | Normalize a 'HsModule' by sorting its export lists, dropping -- blank comments, etc. normalizeModule :: Config RegionDeltas -> HsModule GhcPs -> HsModule GhcPs normalizeModule Config {..} hsmod = everywhere ( mkT dropBlankTypeHaddocks `extT` dropBlankDataDeclHaddocks `extT` patchContext `extT` patchExprContext ) hsmod { hsmodImports = hsmodImports hsmod, hsmodDecls = filter (not . isBlankDocD . unLoc) (hsmodDecls hsmod), hsmodExt = (hsmodExt hsmod) { hsmodHaddockModHeader = mfilter (not . isBlankDocString) (hsmodHaddockModHeader (hsmodExt hsmod)) }, hsmodExports = (fmap . fmap) (filter (not . isBlankDocIE . unLoc)) (hsmodExports hsmod) } where isBlankDocString = all isSpace . renderHsDocString . hsDocString . unLoc isBlankDocD = \case DocD _ s -> isBlankDocString $ docDeclDoc s _ -> False isBlankDocIE = \case IEGroup _ _ s -> isBlankDocString s IEDoc _ s -> isBlankDocString s _ -> False dropBlankTypeHaddocks = \case L _ (HsDocTy _ ty s) :: LHsType GhcPs | isBlankDocString s -> ty a -> a dropBlankDataDeclHaddocks = \case ConDeclGADT {con_doc = Just s, ..} :: ConDecl GhcPs | isBlankDocString s -> ConDeclGADT {con_doc = Nothing, ..} ConDeclH98 {con_doc = Just s, ..} :: ConDecl GhcPs | isBlankDocString s -> ConDeclH98 {con_doc = Nothing, ..} a -> a -- For constraint contexts (both in types and in expressions), normalize -- parenthesis as decided in https://github.com/tweag/ormolu/issues/264. patchContext :: LHsContext GhcPs -> LHsContext GhcPs patchContext = fmap $ \case [x@(L _ (HsParTy _ inner))] | L _ HsForAllTy {} <- inner -> [x] | L _ HsQualTy {} <- inner -> [x] | L _ HsIParamTy {} <- inner -> [x] | ConstraintNever <- constraintParens -> [inner] | otherwise -> [x] [x@(L lx _)] | ConstraintAlways <- constraintParens -> [L lx (HsParTy noAnn x)] | otherwise -> [x] xs -> xs patchExprContext :: LHsExpr GhcPs -> LHsExpr GhcPs patchExprContext = fmap $ \case x@(HsQual _ (L _ [L _ HsPar {}]) _) -> x HsQual l0 (L l1 [x@(L lx _)]) e -> HsQual l0 (L l1 [L lx (HsPar noAnn x)]) e x -> x constraintParens = runIdentity (poSingleConstraintParens cfgPrinterOpts) -- | Enable all language extensions that we think should be enabled by -- default for ease of use. setDefaultExts :: DynFlags -> DynFlags setDefaultExts flags = L.foldl' xopt_set (lang_set flags (Just Haskell2010)) autoExts where autoExts = allExts L.\\ manualExts allExts = [minBound .. maxBound] -- | Extensions that are not enabled automatically and should be activated -- by user. manualExts :: [Extension] manualExts = [ Arrows, -- steals proc Cpp, -- forbidden BangPatterns, -- makes certain patterns with ! fail PatternSynonyms, -- steals the pattern keyword RecursiveDo, -- steals the rec keyword StaticPointers, -- steals static keyword TransformListComp, -- steals the group keyword UnboxedTuples, -- breaks (#) lens operator MagicHash, -- screws {-# these things #-} AlternativeLayoutRule, AlternativeLayoutRuleTransitional, MonadComprehensions, UnboxedSums, UnicodeSyntax, -- gives special meanings to operators like (→) TemplateHaskell, -- changes how $foo is parsed TemplateHaskellQuotes, -- enables TH subset of quasi-quotes, this -- apparently interferes with QuasiQuotes in -- weird ways ImportQualifiedPost, -- affects how Ormolu renders imports, so the -- decision of enabling this style is left to the user NegativeLiterals, -- with this, `- 1` and `-1` have differing AST LexicalNegation, -- implies NegativeLiterals LinearTypes, -- steals the (%) type operator in some cases OverloadedRecordDot, -- f.g parses differently OverloadedRecordUpdate, -- qualified fields are not supported OverloadedLabels, -- a#b is parsed differently ExtendedLiterals, -- 1#Word32 is parsed differently MultilineStrings -- """""" is parsed differently ] -- | Run a 'GHC.P' computation. runParser :: -- | Computation to run GHC.P a -> -- | Dynamic flags GHC.DynFlags -> -- | Module path FilePath -> -- | Module contents Text -> -- | Parse result GHC.ParseResult a runParser parser flags filename input = GHC.unP parser parseState where location = mkRealSrcLoc (GHC.mkFastString filename) 1 1 buffer = textToStringBuffer input parseState = GHC.initParserState (initParserOpts flags) buffer location ---------------------------------------------------------------------------- -- Helpers taken from HLint -- | Detect pragmas in the given input and return them as a collection of -- 'DynFlags'. parsePragmasIntoDynFlags :: -- | Pre-set 'DynFlags' DynFlags -> -- | Extra options (provided by user) [Located String] -> -- | File name (only for source location annotations) FilePath -> -- | Input for parser StringBuffer -> IO (Either String (GHC.DriverMessages, DynFlags)) parsePragmasIntoDynFlags flags extraOpts filepath input = catchGhcErrors $ do let (_warnings, fileOpts) = GHC.getOptions (initParserOpts flags) input filepath (flags', leftovers, warnings) <- parseDynamicFilePragma flags (extraOpts <> fileOpts) case NE.nonEmpty leftovers of Nothing -> return () Just unrecognizedOpts -> throwIO (OrmoluUnrecognizedOpts (unLoc <$> unrecognizedOpts)) let flags'' = flags' `gopt_set` Opt_KeepRawTokenStream return $ Right (warnings, flags'') -- | Detect the collection of imports used in the given input. parseImports :: -- | Pre-set 'DynFlags' DynFlags -> -- | Implicit Prelude? Bool -> -- | File name (only for source location annotations) FilePath -> -- | Input for the parser StringBuffer -> IO (Either String [LImportDecl GhcPs]) parseImports flags implicitPrelude filepath input = case GHC.unP GHC.parseHeader (GHC.initParserState popts input loc) of GHC.PFailed pst -> return $ Left (showOutputable (GHC.getPsErrorMessages pst)) GHC.POk pst rdr_module -> return $ let (_warnings, errors) = GHC.getPsMessages pst in if not (isEmptyMessages errors) then Left (showOutputable (GHC.GhcPsMessage <$> errors)) else let hsmod = unLoc rdr_module mmoduleName = hsmodName hsmod main_loc = srcLocSpan (mkSrcLoc (GHC.mkFastString filepath) 1 1) mod' = mmoduleName `orElse` L (GHC.noAnnSrcSpan main_loc) mAIN_NAME explicitImports = hsmodImports hsmod implicitImports = GHC.mkPrelImports (unLoc mod') main_loc implicitPrelude explicitImports in Right (explicitImports ++ implicitImports) where popts = initParserOpts flags loc = mkRealSrcLoc (GHC.mkFastString filepath) 1 1 -- | Catch and report GHC errors. catchGhcErrors :: (ExceptionMonad m) => m (Either String a) -> m (Either String a) catchGhcErrors m = GHC.handleGhcException reportErr (GHC.handleSourceError reportErr m) where reportErr e = return $ Left (show e) fourmolu-0.18.0.0/src/Ormolu/Parser/CommentStream.hs0000644000000000000000000002267514745250261020430 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Functions for working with comment stream. module Ormolu.Parser.CommentStream ( -- * Comment stream CommentStream (..), mkCommentStream, -- * Comment LComment, Comment (..), unComment, hasAtomsBefore, isMultilineComment, ) where import Control.Monad ((<=<)) import Data.Char (isSpace) import Data.Data (Data) import Data.Generics.Schemes import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Map.Lazy qualified as M import Data.Maybe import Data.Set qualified as S import Data.Text (Text) import Data.Text qualified as T import GHC.Data.Strict qualified as Strict import GHC.Hs (HsModule) import GHC.Hs.Doc import GHC.Hs.Extension import GHC.Hs.ImpExp import GHC.Parser.Annotation (EpAnnComments (..), getLocA) import GHC.Parser.Annotation qualified as GHC import GHC.Types.SrcLoc import Ormolu.Parser.Pragma import Ormolu.Utils (onTheSameLine) ---------------------------------------------------------------------------- -- Comment stream -- | A stream of 'RealLocated' 'Comment's in ascending order with respect to -- beginning of corresponding spans. newtype CommentStream = CommentStream [LComment] deriving (Eq, Data, Semigroup, Monoid) -- | Create 'CommentStream' from 'HsModule'. The pragmas are -- removed from the 'CommentStream'. mkCommentStream :: -- | Original input Text -> -- | Module to use for comment extraction HsModule GhcPs -> -- | Stack header, pragmas, and comment stream ( Maybe LComment, [([LComment], Pragma)], CommentStream ) mkCommentStream input hsModule = ( mstackHeader, pragmas, CommentStream comments ) where (comments, pragmas) = extractPragmas input rawComments1 (rawComments1, mstackHeader) = extractStackHeader rawComments0 -- We want to extract all comments except _valid_ Haddock comments rawComments0 = fmap (uncurry L) . M.toAscList . flip M.withoutKeys validHaddockCommentSpans . M.fromList . fmap (\(L l a) -> (l, a)) $ allComments where -- All comments, including valid and invalid Haddock comments allComments = mapMaybe unAnnotationComment $ epAnnCommentsToList =<< listify (only @EpAnnComments) hsModule where epAnnCommentsToList = \case EpaComments cs -> cs EpaCommentsBalanced pcs fcs -> pcs <> fcs -- All spans of valid Haddock comments validHaddockCommentSpans = S.fromList . mapMaybe srcSpanToRealSrcSpan . mconcat [ fmap getLoc . listify (only @(LHsDoc GhcPs)), fmap getLocA . listify isIEDocLike ] $ hsModule where isIEDocLike :: LIE GhcPs -> Bool isIEDocLike = \case L _ IEGroup {} -> True L _ IEDoc {} -> True L _ IEDocNamed {} -> True _ -> False only :: a -> Bool only _ = True ---------------------------------------------------------------------------- -- Comment type LComment = RealLocated Comment -- | A wrapper for a single comment. The 'Bool' indicates whether there were -- atoms before beginning of the comment in the original input. The -- 'NonEmpty' list inside contains lines of multiline comment @{\- … -\}@ or -- just single item\/line otherwise. data Comment = Comment Bool (NonEmpty Text) deriving (Eq, Show, Data) -- | Normalize comment string. Sometimes one multi-line comment is turned -- into several lines for subsequent outputting with correct indentation for -- each line. mkComment :: -- | Lines of original input with their indices [(Int, Text)] -> -- | Raw comment string RealLocated Text -> -- | Remaining lines of original input and the constructed 'Comment' ([(Int, Text)], LComment) mkComment ls (L l s) = (ls', comment) where comment = L l . Comment atomsBefore . removeConseqBlanks . fmap T.stripEnd $ case NE.nonEmpty (T.lines s) of Nothing -> s :| [] Just (x :| xs) -> let getIndent y = if T.all isSpace y then startIndent else T.length (T.takeWhile isSpace y) n = minimum (startIndent : fmap getIndent xs) commentPrefix = if "{-" `T.isPrefixOf` s then "" else "-- " in x :| ((commentPrefix <>) . escapeHaddockTriggers . T.drop n <$> xs) (atomsBefore, ls') = case dropWhile ((< commentLine) . fst) ls of [] -> (False, []) ((_, i) : ls'') -> case T.take 2 (T.stripStart i) of "--" -> (False, ls'') "{-" -> (False, ls'') _ -> (True, ls'') startIndent -- srcSpanStartCol counts columns starting from 1, so we subtract 1 | "{-" `T.isPrefixOf` s = srcSpanStartCol l - 1 -- For single-line comments, the only case where xs != [] is when an -- invalid haddock comment composed of several single-line comments is -- encountered. In that case, each line of xs is prefixed with an -- extra space (not present in the original comment), so we set -- startIndent = 1 to remove this space. | otherwise = 1 commentLine = srcSpanStartLine l -- | Get a collection of lines from a 'Comment'. unComment :: Comment -> NonEmpty Text unComment (Comment _ xs) = xs -- | Check whether the 'Comment' had some non-whitespace atoms in front of -- it in the original input. hasAtomsBefore :: Comment -> Bool hasAtomsBefore (Comment atomsBefore _) = atomsBefore -- | Is this comment multiline-style? isMultilineComment :: Comment -> Bool isMultilineComment (Comment _ (x :| _)) = "{-" `T.isPrefixOf` x ---------------------------------------------------------------------------- -- Helpers -- | Detect and extract stack header if it is present. extractStackHeader :: -- | Comment stream to analyze [RealLocated Text] -> ([RealLocated Text], Maybe LComment) extractStackHeader = \case [] -> ([], Nothing) (x : xs) -> let comment = snd (mkComment [] x) in if isStackHeader (unRealSrcSpan comment) then (xs, Just comment) else (x : xs, Nothing) where isStackHeader (Comment _ (x :| _)) = "stack" `T.isPrefixOf` T.stripStart (T.drop 2 x) -- | Extract pragmas and their associated comments. extractPragmas :: -- | Input Text -> -- | Comment stream to analyze [RealLocated Text] -> ([LComment], [([LComment], Pragma)]) extractPragmas input = go initialLs id id where initialLs = zip [1 ..] (T.lines input) go ls csSoFar pragmasSoFar = \case [] -> (csSoFar [], pragmasSoFar []) (x : xs) -> case parsePragma (unRealSrcSpan x) of Nothing -> let (ls', x') = mkComment ls x in go ls' (csSoFar . (x' :)) pragmasSoFar xs Just pragma -> let combined ys = (csSoFar ys, pragma) go' ls' ys rest = go ls' id (pragmasSoFar . (combined ys :)) rest in case xs of [] -> go' ls [] xs (y : ys) -> let (ls', y') = mkComment ls y in if onTheSameLine (RealSrcSpan (getRealSrcSpan x) Strict.Nothing) (RealSrcSpan (getRealSrcSpan y) Strict.Nothing) then go' ls' [y'] ys else go' ls [] xs -- | Extract @'RealLocated' 'Text'@ from 'GHC.LEpaComment'. unAnnotationComment :: GHC.LEpaComment -> Maybe (RealLocated Text) unAnnotationComment (L epaLoc (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) where mkL = case epaLoc of GHC.EpaSpan (RealSrcSpan s _) -> Just . L s _ -> const Nothing 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 fourmolu-0.18.0.0/src/Ormolu/Parser/Pragma.hs0000644000000000000000000000441314745250261017047 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | A module for parsing of pragmas from comments. module Ormolu.Parser.Pragma ( Pragma (..), parsePragma, ) where import Data.Char (isSpace) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Encoding qualified as T import GHC.Data.FastString (bytesFS, mkFastString) import GHC.Driver.Config.Parser (initParserOpts) import GHC.DynFlags (baseDynFlags) import GHC.Parser.Lexer qualified as L import GHC.Types.SrcLoc import Ormolu.Utils (textToStringBuffer) -- | Ormolu's representation of pragmas. data Pragma = -- | Language pragma PragmaLanguage [Text] | -- | GHC options pragma PragmaOptionsGHC Text | -- | Haddock options pragma PragmaOptionsHaddock Text deriving (Show, Eq) -- | Extract a pragma from a comment if possible, or return 'Nothing' -- otherwise. parsePragma :: -- | Comment to try to parse Text -> Maybe Pragma parsePragma input = do contents <- T.stripSuffix "#-}" =<< T.stripPrefix "{-#" input let (pragmaName, cs) = (T.break isSpace . T.dropWhile isSpace) contents case T.toLower pragmaName of "language" -> PragmaLanguage <$> parseExtensions cs "options_ghc" -> Just $ PragmaOptionsGHC (T.strip cs) "options_haddock" -> Just $ PragmaOptionsHaddock (T.strip cs) _ -> Nothing -- | Assuming the input consists of a series of tokens from a language -- pragma, return the set of enabled extensions. parseExtensions :: Text -> Maybe [Text] parseExtensions str = tokenize str >>= go where go = \case [L.ITconid ext] -> return [fsToText ext] (L.ITconid ext : L.ITcomma : xs) -> (fsToText ext :) <$> go xs _ -> Nothing fsToText = T.decodeUtf8 . bytesFS -- | Tokenize a given input using GHC's lexer. tokenize :: Text -> Maybe [L.Token] tokenize input = case L.unP pLexer parseState of L.PFailed {} -> Nothing L.POk _ x -> Just x where location = mkRealSrcLoc (mkFastString "") 1 1 buffer = textToStringBuffer input parseState = L.initParserState parserOpts buffer location parserOpts = initParserOpts baseDynFlags -- | Haskell lexer. pLexer :: L.P [L.Token] pLexer = go where go = do r <- L.lexer False return case unLoc r of L.ITeof -> return [] x -> (x :) <$> go fourmolu-0.18.0.0/src/Ormolu/Parser/Result.hs0000644000000000000000000000246514745250261017123 0ustar0000000000000000-- | A type for result of parsing. module Ormolu.Parser.Result ( SourceSnippet (..), ParseResult (..), ) where import Data.Set (Set) import Data.Text (Text) import Distribution.ModuleName (ModuleName) import GHC.Data.EnumSet (EnumSet) import GHC.Hs (GhcPs, HsModule) import GHC.LanguageExtensions.Type import Ormolu.Config (SourceType) import Ormolu.Fixity (ModuleFixityMap) import Ormolu.Parser.CommentStream import Ormolu.Parser.Pragma (Pragma) -- | Either a 'ParseResult', or a raw snippet. data SourceSnippet = RawSnippet Text | ParsedSnippet ParseResult -- | A collection of data that represents a parsed module in Ormolu. data ParseResult = ParseResult { -- | Parsed module or signature prParsedSource :: HsModule GhcPs, -- | Either regular module or signature file prSourceType :: SourceType, -- | Stack header prStackHeader :: Maybe LComment, -- | Pragmas and the associated comments prPragmas :: [([LComment], Pragma)], -- | Comment stream prCommentStream :: CommentStream, -- | Enabled extensions prExtensions :: EnumSet Extension, -- | Fixity map for operators prModuleFixityMap :: ModuleFixityMap, -- | Indentation level, can be non-zero in case of region formatting prIndent :: Int, -- | Local modules prLocalModules :: Set ModuleName } fourmolu-0.18.0.0/src/Ormolu/Printer.hs0000644000000000000000000000227014745250261016026 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | Pretty-printer for Haskell AST. module Ormolu.Printer ( printSnippets, PrinterOpts (..), ) where import Data.Text (Text) import Data.Text qualified as T import Ormolu.Config 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 :: -- | Whether to print out debug information during printing Bool -> -- | Result of parsing [SourceSnippet] -> PrinterOptsTotal -> -- | Resulting rendition Text printSnippets debug snippets printerOpts = T.concat . fmap printSnippet $ snippets where printSnippet = \case ParsedSnippet ParseResult {..} -> reindent prIndent $ runR ( p_hsModule prStackHeader prPragmas prParsedSource ) (mkSpanStream prParsedSource) prCommentStream printerOpts prLocalModules prSourceType prExtensions prModuleFixityMap debug RawSnippet r -> r fourmolu-0.18.0.0/src/Ormolu/Printer/Combinators.hs0000644000000000000000000003251514745250261020313 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | Printing combinators. The definitions here are presented in such an -- order so you can just go through the Haddocks and by the end of the file -- you should have a pretty good idea how to program rendering logic. module Ormolu.Printer.Combinators ( -- * The 'R' monad R, runR, getEnclosingSpan, getEnclosingSpanWhere, getEnclosingComments, isExtensionEnabled, -- * Combinators -- ** Basic txt, txtStripIndent, atom, space, newline, declNewline, multilineCommentNewline, inci, inciBy, inciIf, inciByFrac, askSourceType, askModuleFixityMap, askDebug, located, encloseLocated, located', switchLayout, switchLayoutNoLimit, spansLayout, Layout (..), vlayout, getLayout, breakpoint, breakpoint', getPrinterOpt, getLocalModules, -- ** Formatting lists sep, sepSemi, canUseBraces, useBraces, dontUseBraces, -- ** Wrapping BracketStyle (..), sitcc, backticks, banana, braces, brackets, parens, parensHash, pragmaBraces, pragma, -- ** Literals comma, commaDel, commaDelImportExport, equals, token'Larrowtail, token'Rarrowtail, token'darrow, token'dcolon, token'larrow, token'larrowtail, token'rarrow, token'rarrowtail, token'star, token'forall, token'oparenbar, token'cparenbar, token'openExpQuote, token'closeQuote, token'lolly, -- ** Stateful markers SpanMark (..), spanMarkSpan, HaddockStyle (..), setSpanMark, getSpanMark, -- ** Placement Placement (..), placeHanging, ) where import Control.Monad import Data.List (intersperse) import Data.Text (Text) import GHC.Data.Strict qualified as Strict import GHC.LanguageExtensions.Type import GHC.Parser.Annotation hiding (IsUnicodeSyntax (..)) import GHC.Types.SrcLoc hiding (spans) import Ormolu.Config import Ormolu.Printer.Comments import Ormolu.Printer.Internal ---------------------------------------------------------------------------- -- 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 :: (HasLoc l) => -- | Thing to enter GenLocated l a -> -- | How to render inner value (a -> R ()) -> R () located (L l' a) f = case locA l' of UnhelpfulSpan _ -> f a RealSrcSpan l _ -> do spitPrecedingComments l withEnclosingSpan l $ switchLayout [RealSrcSpan l Strict.Nothing] (f a) spitFollowingComments l -- | Similar to 'located', but when the "payload" is an empty list, print -- virtual elements at the start and end of the source span to prevent comments -- from "floating out". encloseLocated :: (HasLoc l) => GenLocated l [a] -> ([a] -> R ()) -> R () encloseLocated la f = located la $ \a -> do when (null a) $ located (L startSpan ()) pure f a when (null a) $ located (L endSpan ()) pure where l = locA la (startLoc, endLoc) = (srcSpanStart l, srcSpanEnd l) (startSpan, endSpan) = (mkSrcSpan startLoc startLoc, mkSrcSpan endLoc endLoc) -- | A version of 'located' with arguments flipped. located' :: (HasLoc 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 r = do layout <- spansLayout spans enterLayout layout r -- | Same as 'switchLayout', except disregards the column limit. -- -- It should be used for the argument list in function definitions because -- the column limit can't be enforced there without changing the AST. switchLayoutNoLimit :: [SrcSpan] -> R () -> R () switchLayoutNoLimit spans = enterLayout (spansLayoutWithLimit NoLimit spans) -- | Which layout combined spans result in? spansLayout :: [SrcSpan] -> R Layout spansLayout spans = do colLimit <- getPrinterOpt poColumnLimit pure $ spansLayoutWithLimit colLimit spans spansLayoutWithLimit :: ColumnLimit -> [SrcSpan] -> Layout spansLayoutWithLimit colLimit = \case [] -> SingleLine (x : xs) -> let combinedSpan = foldr combineSrcSpans x xs in if isOneLineSpan combinedSpan && not (shouldBreakSingleLine combinedSpan) then SingleLine else MultiLine where shouldBreakSingleLine srcSpan = case (srcSpan, colLimit) of (RealSrcSpan rs _, ColumnLimit maxLineLength) -> let spanLineLength = srcSpanEndCol rs - srcSpanStartCol rs in spanLineLength > fromIntegral maxLineLength _ -> False -- | 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 token'oparenbar token'cparenbar -- | Surround given entity by curly braces @{@ and @}@. braces :: BracketStyle -> R () -> R () braces = brackets_ False (txt "{") (txt "}") -- | Surround given entity by square brackets @[@ and @]@. brackets :: BracketStyle -> R () -> R () brackets = brackets_ False (txt "[") (txt "]") -- | Surround given entity by parentheses @(@ and @)@. parens :: BracketStyle -> R () -> R () parens = brackets_ False (txt "(") (txt ")") -- | Surround given entity by @(# @ and @ #)@. parensHash :: BracketStyle -> R () -> R () parensHash = brackets_ True (txt "(#") (txt "#)") -- | 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 R () -> -- | Closing bracket R () -> -- | Bracket style BracketStyle -> -- | Inner expression R () -> R () brackets_ needBreaks open close style m = sitcc (vlayout singleLine multiLine) where singleLine = do open when needBreaks space m when needBreaks space close multiLine = do open commaStyle <- getPrinterOpt poCommaStyle case commaStyle of Leading -> if needBreaks then inci $ newline >> m else inciIf (style == S) $ space >> m Trailing -> if needBreaks then newline >> inci m else space >> sitcc m newline inciIf (style == S) close ---------------------------------------------------------------------------- -- Literals -- | Print @,@. comma :: R () comma = txt "," -- | Delimiting combination with 'comma'. To be used with 'sep'. commaDel :: R () commaDel = getPrinterOpt poCommaStyle >>= commaDel' -- | Delimiting combination with 'comma' for import-export lists. -- To be used with `sep`. commaDelImportExport :: R () commaDelImportExport = getPrinterOpt poImportExportStyle >>= \case ImportExportLeading -> commaDel' Leading ImportExportTrailing -> commaDel' Trailing ImportExportDiffFriendly -> commaDel' Trailing commaDel' :: CommaStyle -> R () commaDel' = \case Leading -> breakpoint' >> comma >> space Trailing -> comma >> breakpoint -- | Print @=@. Do not use @'txt' "="@. equals :: R () equals = interferingTxt "=" ---------------------------------------------------------------------------- -- Token literals -- The names of the following literals are from GHC's -- @compiler/GHC/Parser/Lexer.x@. -- | Print @⤛@ or @-<<@ as appropriate. token'Larrowtail :: R () token'Larrowtail = "⤛" `whenUnicodeOtherwise` "-<<" -- | Print @⤜@ or @>>-@ as appropriate. token'Rarrowtail :: R () token'Rarrowtail = "⤜" `whenUnicodeOtherwise` ">>-" -- | Print @⇒@ or @=>@ as appropriate. token'darrow :: R () token'darrow = "⇒" `whenUnicodeOtherwise` "=>" -- | Print @∷@ or @::@ as appropriate. token'dcolon :: R () token'dcolon = "∷" `whenUnicodeOtherwise` "::" -- | Print @←@ or @<-@ as appropriate. token'larrow :: R () token'larrow = "←" `whenUnicodeOtherwise` "<-" -- | Print @⤙@ or @-<@ as appropriate. token'larrowtail :: R () token'larrowtail = "⤙" `whenUnicodeOtherwise` "-<" -- | Print @→@ or @->@ as appropriate. token'rarrow :: R () token'rarrow = "→" `whenUnicodeOtherwise` "->" -- | Print @⤚@ or @>-@ as appropriate. token'rarrowtail :: R () token'rarrowtail = "⤚" `whenUnicodeOtherwise` ">-" -- | Print @★@ or @*@ as appropriate. token'star :: R () token'star = "★" `whenUnicodeOtherwise` "*" -- | Print @∀@ or @forall@ as appropriate. token'forall :: R () token'forall = "∀" `whenUnicodeOtherwise` "forall" -- | Print @⦇@ or @(|@ as appropriate. token'oparenbar :: R () token'oparenbar = "⦇" `whenUnicodeOtherwise` "(|" -- | Print @⦈@ or @|)@ as appropriate. token'cparenbar :: R () token'cparenbar = "⦈" `whenUnicodeOtherwise` "|)" -- | Print @⟦@ or @[|@ as appropriate. token'openExpQuote :: R () token'openExpQuote = "⟦" `whenUnicodeOtherwise` "[|" -- | Print @⟧@ or @|]@ as appropriate. token'closeQuote :: R () token'closeQuote = "⟧" `whenUnicodeOtherwise` "|]" -- | Print @⊸@ or @%1 ->@ as appropriate. token'lolly :: R () token'lolly = "⊸" `whenUnicodeOtherwise` "%1 ->" -- | Write the one text or the other depending on whether Unicode is enabled. whenUnicodeOtherwise :: Text -> Text -> R () unicodeText `whenUnicodeOtherwise` asciiText = do unicodePrinterOption <- getPrinterOpt poUnicode unicodeExtensionIsEnabled <- isExtensionEnabled UnicodeSyntax txt $ case unicodePrinterOption of UnicodeDetect -> if unicodeExtensionIsEnabled then unicodeText else asciiText UnicodeAlways -> unicodeText UnicodeNever -> asciiText ---------------------------------------------------------------------------- -- 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 fourmolu-0.18.0.0/src/Ormolu/Printer/Comments.hs0000644000000000000000000002277714745250261017631 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- | Helpers for formatting of comments. This is low-level code, use -- "Ormolu.Printer.Combinators" unless you know what you are doing. module Ormolu.Printer.Comments ( spitPrecedingComments, spitFollowingComments, spitRemainingComments, spitCommentNow, spitCommentPending, ) where import Control.Monad import Data.List.NonEmpty qualified as NE import Data.Maybe (listToMaybe) import GHC.Types.SrcLoc import Ormolu.Parser.CommentStream import Ormolu.Printer.Internal ---------------------------------------------------------------------------- -- Top-level -- | Output all preceding comments for an element at given location. spitPrecedingComments :: -- | Span of the element to attach comments to RealSrcSpan -> R () spitPrecedingComments ref = do comments <- handleCommentSeries (spitPrecedingComment ref) when (not $ null comments) $ do lastMark <- getSpanMark -- Insert a blank line between the preceding comments and the thing -- after them if there was a blank line in the input. when (needsNewlineBefore ref lastMark) newline -- | Output all comments following an element at given location. spitFollowingComments :: -- | Span of the element to attach comments to RealSrcSpan -> R () spitFollowingComments ref = do trimSpanStream ref void $ handleCommentSeries (spitFollowingComment ref) -- | Output all remaining comments in the comment stream. spitRemainingComments :: R () spitRemainingComments = do -- Make sure we have a blank a line between the last definition and the -- trailing comments. newline void $ handleCommentSeries spitRemainingComment ---------------------------------------------------------------------------- -- Single-comment functions -- | Output a single preceding comment for an element at given location. spitPrecedingComment :: -- | Span of the element to attach comments to RealSrcSpan -> -- | The comment that was output, if any R (Maybe LComment) spitPrecedingComment ref = do mlastMark <- getSpanMark let p (L l _) = realSrcSpanEnd l <= realSrcSpanStart ref withPoppedComment p $ \l comment -> do lineSpans <- thisLineSpans let thisCommentLine = srcLocLine (realSrcSpanStart l) needsNewline = case listToMaybe lineSpans of Nothing -> False Just spn -> srcLocLine (realSrcSpanEnd spn) /= thisCommentLine when (needsNewline || needsNewlineBefore l mlastMark) newline spitCommentNow l comment if theSameLinePre l ref then space else newline -- | Output a comment that follows element at given location immediately on -- the same line, if there is any. spitFollowingComment :: -- | AST element to attach comments to RealSrcSpan -> -- | The comment that was output, if any R (Maybe LComment) spitFollowingComment ref = do mlastMark <- getSpanMark mnSpn <- nextEltSpan -- Get first enclosing span that is not equal to reference span, i.e. it's -- truly something enclosing the AST element. meSpn <- getEnclosingSpanWhere (/= ref) withPoppedComment (commentFollowsElt ref mnSpn meSpn mlastMark) $ \l comment -> if theSameLinePost l ref then if isMultilineComment comment then space >> spitCommentNow l comment else spitCommentPending OnTheSameLine l comment else do when (needsNewlineBefore l mlastMark) $ registerPendingCommentLine OnNextLine "" spitCommentPending OnNextLine l comment -- | Output a single remaining comment from the comment stream. spitRemainingComment :: -- | The comment that was output, if any R (Maybe LComment) spitRemainingComment = do mlastMark <- getSpanMark withPoppedComment (const True) $ \l comment -> do when (needsNewlineBefore l mlastMark) newline spitCommentNow l comment newline ---------------------------------------------------------------------------- -- Helpers -- | Output series of comments. handleCommentSeries :: -- | Output and return the next comment, if any R (Maybe LComment) -> -- | The comments outputted R [LComment] handleCommentSeries f = go where go = do mComment <- f case mComment of Nothing -> return [] Just comment -> (comment :) <$> go -- | Try to pop a comment using given predicate and if there is a comment -- matching the predicate, print it out. withPoppedComment :: -- | Comment predicate (LComment -> Bool) -> -- | Printing function (RealSrcSpan -> Comment -> R ()) -> -- | Are we done? R (Maybe LComment) withPoppedComment p f = do r <- popComment p case r of Nothing -> return () Just (L l comment) -> f l comment return r -- | Determine if we need to insert a newline between current comment and -- last printed comment. needsNewlineBefore :: -- | Current comment span RealSrcSpan -> -- | Last printed comment span Maybe SpanMark -> Bool needsNewlineBefore _ (Just (HaddockSpan _ _)) = True needsNewlineBefore l mlastMark = case spanMarkSpan <$> mlastMark of Nothing -> False Just lastMark -> srcSpanStartLine l > srcSpanEndLine lastMark + 1 -- | Is the preceding comment and AST element are on the same line? theSameLinePre :: -- | Current comment span RealSrcSpan -> -- | AST element location RealSrcSpan -> Bool theSameLinePre l ref = srcSpanEndLine l == srcSpanStartLine ref -- | Is the following comment and AST element are on the same line? theSameLinePost :: -- | Current comment span RealSrcSpan -> -- | AST element location RealSrcSpan -> Bool theSameLinePost l ref = srcSpanStartLine l == srcSpanEndLine ref -- | Determine if given comment follows AST element. commentFollowsElt :: -- | Location of AST element RealSrcSpan -> -- | Location of next AST element Maybe RealSrcSpan -> -- | Location of enclosing AST element Maybe RealSrcSpan -> -- | Location of last comment in the series Maybe SpanMark -> -- | Comment to test LComment -> Bool commentFollowsElt ref mnSpn meSpn mlastMark (L l comment) = -- A comment follows a AST element if all 4 conditions are satisfied: goesAfter && logicallyFollows && noEltBetween && (continuation || lastInEnclosing || supersedesParentElt) where -- 1) The comment starts after end of the AST element: goesAfter = realSrcSpanStart l >= realSrcSpanEnd ref -- 2) The comment logically belongs to the element, four cases: logicallyFollows = theSameLinePost l ref -- a) it's on the same line || continuation -- b) it's a continuation of a comment block || lastInEnclosing -- c) it's the last element in the enclosing construct -- 3) There is no other AST element between this element and the comment: noEltBetween = case mnSpn of Nothing -> True Just nspn -> realSrcSpanStart nspn >= realSrcSpanEnd l -- 4) Less obvious: if column of comment is closer to the start of -- enclosing element, it probably related to that parent element, not to -- the current child element. This rule is important because otherwise -- all comments would end up assigned to closest inner elements, and -- parent elements won't have a chance to get any comments assigned to -- them. This is not OK because comments will get indented according to -- the AST elements they are attached to. -- -- Skip this rule if the comment is a continuation of a comment block. supersedesParentElt = case meSpn of Nothing -> True Just espn -> let startColumn = srcLocCol . realSrcSpanStart in startColumn espn > startColumn ref || ( abs (startColumn espn - startColumn l) >= abs (startColumn ref - startColumn l) ) continuation = -- A comment is a continuation when it doesn't have non-whitespace -- lexemes in front of it and goes right after the previous comment. not (hasAtomsBefore comment) && ( case mlastMark of Just (HaddockSpan _ _) -> False Just (CommentSpan spn) -> srcSpanEndLine spn + 1 == srcSpanStartLine l _ -> False ) lastInEnclosing = case meSpn of -- When there is no enclosing element, return false Nothing -> False -- When there is an enclosing element, Just espn -> let -- Make sure that the comment is inside the enclosing element insideParent = realSrcSpanEnd l <= realSrcSpanEnd espn -- And check if the next element is outside of the parent nextOutsideParent = case mnSpn of Nothing -> True Just nspn -> realSrcSpanEnd espn < realSrcSpanStart nspn in insideParent && nextOutsideParent -- | Output a 'Comment' immediately. This is a low-level printing function. spitCommentNow :: RealSrcSpan -> Comment -> R () spitCommentNow spn comment = do sitcc . sequence_ . NE.intersperse newline . fmap txt . unComment $ comment setSpanMark (CommentSpan spn) -- | Output a 'Comment' at the end of correct line or after it depending on -- 'CommentPosition'. Used for comments that may potentially follow on the -- same line as something we just rendered, but not immediately after it. spitCommentPending :: CommentPosition -> RealSrcSpan -> Comment -> R () spitCommentPending position spn comment = do let wrapper = case position of OnTheSameLine -> sitcc OnNextLine -> id wrapper . sequence_ . NE.toList . fmap (registerPendingCommentLine position) . unComment $ comment setSpanMark (CommentSpan spn) fourmolu-0.18.0.0/src/Ormolu/Printer/Internal.hs0000644000000000000000000005321614745250261017610 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | In most cases import "Ormolu.Printer.Combinators" instead, these -- functions are the low-level building blocks and should not be used on -- their own. The 'R' monad is re-exported from "Ormolu.Printer.Combinators" -- as well. module Ormolu.Printer.Internal ( -- * The 'R' monad R, runR, -- * Internal functions txt, txtStripIndent, interferingTxt, atom, space, newline, declNewline, multilineCommentNewline, askSourceType, askModuleFixityMap, askDebug, inci, inciBy, inciByFrac, sitcc, sitccIfTrailing, Layout (..), enterLayout, vlayout, getLayout, getPrinterOpt, getLocalModules, -- * Helpers for braces useBraces, dontUseBraces, canUseBraces, -- * Special helpers for comment placement CommentPosition (..), registerPendingCommentLine, trimSpanStream, nextEltSpan, popComment, getEnclosingComments, getEnclosingSpan, getEnclosingSpanWhere, withEnclosingSpan, thisLineSpans, -- * Stateful markers SpanMark (..), spanMarkSpan, HaddockStyle (..), setSpanMark, getSpanMark, -- * Extensions isExtensionEnabled, ) where import Control.Monad import Control.Monad.Reader import Control.Monad.State.Strict import Data.Bool (bool) import Data.Char (isSpace) import Data.Choice (Choice) import Data.Choice qualified as Choice import Data.Coerce import Data.Functor ((<&>)) import Data.Functor.Identity (runIdentity) import Data.List (find) import Data.Maybe (listToMaybe) import Data.Set (Set) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Lazy qualified as TL import Data.Text.Lazy.Builder import Distribution.ModuleName (ModuleName) import GHC.Data.EnumSet (EnumSet) import GHC.Data.EnumSet qualified as EnumSet import GHC.LanguageExtensions.Type import GHC.Types.SrcLoc import GHC.Utils.Outputable (Outputable) import Ormolu.Config import Ormolu.Fixity (ModuleFixityMap) import Ormolu.Parser.CommentStream import Ormolu.Printer.SpanStream import Ormolu.Utils (showOutputable) ---------------------------------------------------------------------------- -- The 'R' monad -- | The 'R' monad hosts combinators that allow us to describe how to render -- AST. newtype R a = R (ReaderT RC (State SC) a) deriving (Functor, Applicative, Monad) -- | Reader context of 'R'. This should be used when we control rendering by -- enclosing certain expressions with wrappers. data RC = RC { -- | Indentation level, as the column index we need to start from after -- a newline if we break lines rcIndent :: !Int, -- | Current layout rcLayout :: Layout, -- | Spans of enclosing elements of AST rcEnclosingSpans :: [RealSrcSpan], -- | Whether the last expression in the layout can use braces rcCanUseBraces :: Bool, rcPrinterOpts :: PrinterOptsTotal, rcLocalModules :: Set ModuleName, -- | Enabled extensions rcExtensions :: EnumSet Extension, -- | Whether the source is a signature or a regular module rcSourceType :: SourceType, -- | Module fixity map rcModuleFixityMap :: ModuleFixityMap, -- | Whether to print out debug information during printing rcDebug :: !Bool } -- | 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 -> PrinterOptsTotal -> Set ModuleName -> -- | Whether the source is a signature or a regular module SourceType -> -- | Enabled extensions EnumSet Extension -> -- | Module fixity map ModuleFixityMap -> -- | Resulting rendition Bool -> Text runR (R m) sstream cstream printerOpts localModules sourceType extensions moduleFixityMap debug = TL.toStrict . toLazyText . scBuilder $ execState (runReaderT m rc) sc where rc = RC { rcIndent = 0, rcLayout = MultiLine, rcEnclosingSpans = [], rcCanUseBraces = False, rcPrinterOpts = printerOpts, rcLocalModules = localModules, rcExtensions = extensions, rcSourceType = sourceType, rcModuleFixityMap = moduleFixityMap, rcDebug = debug } 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 -- | Same as 'txt', except strip leading whitespace equal to the current -- indentation level. Useful for multiline comments, where the AST contains -- the full leading whitespace. txtStripIndent :: Text -> R () txtStripIndent s = do indent <- R (asks rcIndent) let (leadingSpaces, s') = T.span isSpace s txt $ T.drop indent leadingSpaces <> s' -- | 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 } declNewline :: R () declNewline = newlineRawN =<< getPrinterOpt poNewlinesBetweenDecls -- | Add a newline in a multiline comment. -- -- Can't use 'newline' because it avoids adding multiple consecutive newlines. -- Single-line comments don't have this issue because each line has at least "--". multilineCommentNewline :: R () multilineCommentNewline = -- inlining part of rawNewline here because rawNewline still swallows newlines -- when called consecutively R . modify $ \sc -> sc { scBuilder = scBuilder sc <> "\n", scColumn = 0, scIndent = 0, scThisLineSpans = [], scRequestedDelimiter = AfterNewline } -- | 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 = newlineRawN 1 -- | Low-level newline primitive. This always inserts 'n' newlines. newlineRawN :: Int -> R () newlineRawN n = R . modify $ \sc -> let requestedDel = scRequestedDelimiter sc builderSoFar = scBuilder sc n' = case requestedDel of AfterNewline -> n - 1 RequestedNewline -> n - 1 VeryBeginning -> n - 1 _ -> n in sc { scBuilder = builderSoFar <> mconcat (replicate n' "\n"), scColumn = 0, scIndent = 0, scThisLineSpans = [], scRequestedDelimiter = case scRequestedDelimiter sc of AfterNewline -> RequestedNewline RequestedNewline -> RequestedNewline VeryBeginning -> VeryBeginning _ -> AfterNewline } -- | Return the source type. askSourceType :: R SourceType askSourceType = R (asks rcSourceType) -- | Retrieve the module fixity map. askModuleFixityMap :: R ModuleFixityMap askModuleFixityMap = R (asks rcModuleFixityMap) -- | Retrieve whether we should print out certain debug information while -- printing. askDebug :: R (Choice "debug") askDebug = R (asks (Choice.fromBool . rcDebug)) -- | Like 'inci', but indents by exactly the given number of steps. inciBy :: Int -> R () -> R () inciBy step (R m) = R (local modRC m) where modRC rc = rc { rcIndent = -- Currently, in parenthesized expressions, we keep expressions aligned on -- the left, and increase indentation from that point. But this means that -- all subsequent indentation levels will be misaligned with the indentation, -- assuming the parentheses starts on the indentation column: -- -- ( Maybe -- Int -> -- String -- ) -- ^^^^ 'Int' is 4 spaces from indentation start -- ^^^^^^ but 6 spaces from start of column -- -- To fix this, we mitigated the symptom by rounding down the indentation to -- the indentation first before incrementing. -- https://github.com/fourmolu/fourmolu/pull/37#discussion_r497904191 -- -- But this causes a regression with 2 space indentation, where a wrapped line -- isn't indented enough if the parentheses does NOT start on the indentation -- column. -- https://github.com/fourmolu/fourmolu/issues/428 -- -- Ideally, we'd rather indicate that the "current" indentation is shifted, -- while the "next" indentation should increase from the parentheses. However, -- that would probably be a lot of reworking the rcIndent machinery. Instead, -- we'll just restrict this patch to only apply on indentation > 2. let modifyIndent = if poIndentation (rcPrinterOpts rc) > 2 then roundDownToNearest step else id in modifyIndent (rcIndent rc) + step } roundDownToNearest r n = (n `div` r) * r -- | Like 'inci', but indents by the given fraction of a full step. inciByFrac :: Rational -> R () -> R () inciByFrac x m = do indentStep <- getPrinterOpt poIndentation let step = truncate $ fromIntegral indentStep * x inciBy step m -- | 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 = inciByFrac 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) -- | When using trailing commas, same as 'sitcc'; when using leading commas, -- runs the input action unmodified. sitccIfTrailing :: R () -> R () sitccIfTrailing x = getPrinterOpt poCommaStyle >>= \case Leading -> id x Trailing -> sitcc x -- | 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) -- | Get a particular 'PrinterOpts' field from the environment. getPrinterOpt :: (forall f. PrinterOpts f -> f a) -> R a getPrinterOpt f = R $ asks $ runIdentity . f . rcPrinterOpts getLocalModules :: R (Set ModuleName) getLocalModules = R $ asks rcLocalModules ---------------------------------------------------------------------------- -- Special helpers for comment placement -- | Register a comment line for outputting. It will be inserted right -- before next newline. When the comment goes after something else on the -- same line, a space will be inserted between preceding text and the -- comment when necessary. registerPendingCommentLine :: -- | Comment position CommentPosition -> -- | 'Text' to output Text -> R () registerPendingCommentLine position text = R $ do modify $ \sc -> sc { scPendingComments = (position, text) : scPendingComments sc } -- | Drop elements that begin before or at the same place as given -- 'SrcSpan'. trimSpanStream :: -- | Reference span RealSrcSpan -> R () trimSpanStream ref = do let leRef :: RealSrcSpan -> Bool leRef x = realSrcSpanStart x <= realSrcSpanStart ref R . modify $ \sc -> sc { scSpanStream = coerce (dropWhile leRef) (scSpanStream sc) } -- | Get location of next element in AST. nextEltSpan :: R (Maybe RealSrcSpan) nextEltSpan = listToMaybe . coerce <$> R (gets scSpanStream) -- | Pop a 'Comment' from the 'CommentStream' if given predicate is -- satisfied and there are comments in the stream. popComment :: (LComment -> Bool) -> R (Maybe LComment) popComment f = R $ do CommentStream cstream <- gets scCommentStream case cstream of (x : xs) | f x -> do modify $ \sc -> sc {scCommentStream = CommentStream xs} return $ Just x _ -> return Nothing -- | Get the comments contained in the enclosing span. getEnclosingComments :: R [LComment] getEnclosingComments = do isEnclosed <- getEnclosingSpan <&> \case Just enclSpan -> containsSpan enclSpan Nothing -> const False CommentStream cstream <- R $ gets scCommentStream pure $ takeWhile (isEnclosed . getLoc) cstream -- | Get the immediately enclosing 'RealSrcSpan'. getEnclosingSpan :: R (Maybe RealSrcSpan) getEnclosingSpan = getEnclosingSpanWhere (const True) -- | Get the first enclosing 'RealSrcSpan' that satisfies given predicate. getEnclosingSpanWhere :: -- | Predicate to use (RealSrcSpan -> Bool) -> R (Maybe RealSrcSpan) getEnclosingSpanWhere f = find f <$> R (asks rcEnclosingSpans) -- | Set 'RealSrcSpan' of enclosing span for the given computation. withEnclosingSpan :: RealSrcSpan -> R () -> R () withEnclosingSpan spn (R m) = R (local modRC m) where modRC rc = rc { rcEnclosingSpans = spn : rcEnclosingSpans rc } -- | Get spans on this line so far. thisLineSpans :: R [RealSrcSpan] thisLineSpans = R (gets scThisLineSpans) ---------------------------------------------------------------------------- -- Stateful markers -- | An auxiliary marker for keeping track of last output element. data SpanMark = -- | Haddock comment HaddockSpan HaddockStyle RealSrcSpan | -- | Non-haddock comment CommentSpan RealSrcSpan | -- | A statement in a do-block and such span StatementSpan RealSrcSpan -- | Project 'RealSrcSpan' from 'SpanMark'. spanMarkSpan :: SpanMark -> RealSrcSpan spanMarkSpan = \case HaddockSpan _ s -> s CommentSpan s -> s StatementSpan s -> s -- | Haddock string style. data HaddockStyle = -- | @-- |@ Pipe | -- | @-- ^@ Caret | -- | @-- *@ Asterisk Int | -- | @-- $@ Named String -- | Set span of last output comment. setSpanMark :: -- | Span mark to set SpanMark -> R () setSpanMark spnMark = R . modify $ \sc -> sc { scSpanMark = Just spnMark } -- | Get span of last output comment. getSpanMark :: R (Maybe SpanMark) getSpanMark = R (gets scSpanMark) ---------------------------------------------------------------------------- -- Helpers for braces -- | Make the inner computation use braces around single-line layouts. useBraces :: R () -> R () useBraces (R r) = R (local (\i -> i {rcCanUseBraces = True}) r) -- | Make the inner computation omit braces around single-line layouts. dontUseBraces :: R () -> R () dontUseBraces (R r) = R (local (\i -> i {rcCanUseBraces = False}) r) -- | Return 'True' if we can use braces in this context. canUseBraces :: R Bool canUseBraces = R (asks rcCanUseBraces) ---------------------------------------------------------------------------- -- Extensions isExtensionEnabled :: Extension -> R Bool isExtensionEnabled ext = R . asks $ EnumSet.member ext . rcExtensions fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Common.hs0000644000000000000000000001623014745250261020145 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Rendering of commonly useful bits. module Ormolu.Printer.Meat.Common ( FamilyStyle (..), p_hsmodName, p_ieWrappedName, p_rdrName, p_qualName, p_infixDefHelper, p_hsDoc, p_hsDoc', p_sourceText, p_namespaceSpec, p_arrow, ) where import Control.Monad import Data.Choice (Choice) import Data.Choice qualified as Choice import Data.Foldable (traverse_) import Data.Text qualified as T import GHC.Data.FastString import GHC.Hs.Binds import GHC.Hs.Doc import GHC.Hs.Extension (GhcPs) import GHC.Hs.ImpExp import GHC.LanguageExtensions.Type (Extension (..)) import GHC.Parser.Annotation import GHC.Types.Name.Occurrence (OccName (..), occNameString) import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import Language.Haskell.Syntax (HsArrowOf (..)) import Language.Haskell.Syntax.Module.Name import Ormolu.Config import Ormolu.Printer.Combinators import Ormolu.Utils -- | Data and type family style. data FamilyStyle = -- | Declarations in type classes Associated | -- | Top-level declarations Free -- | Outputs the name of the module-like entity, preceeded by the correct prefix ("module" or "signature"). p_hsmodName :: ModuleName -> R () p_hsmodName mname = do sourceType <- askSourceType txt $ case sourceType of ModuleSource -> "module" SignatureSource -> "signature" space atom mname p_ieWrappedName :: IEWrappedName GhcPs -> R () p_ieWrappedName = \case IEName _ x -> p_rdrName x IEDefault _ x -> do txt "default" space p_rdrName x IEPattern _ x -> do txt "pattern" space p_rdrName x IEType _ x -> do txt "type" space p_rdrName x -- | Render a @'LocatedN' 'RdrName'@. p_rdrName :: LocatedN RdrName -> R () p_rdrName l = located l $ \x -> do unboxedSums <- isExtensionEnabled UnboxedSums let wrapper EpAnn {anns} = case anns of NameAnnQuote {nann_quoted} -> tickPrefix . wrapper nann_quoted NameAnn {nann_adornment = NameParens {}} -> parens N . handleUnboxedSumsAndHashInteraction NameAnn {nann_adornment = NameBackquotes {}} -> backticks -- whether the `->` identifier is parenthesized NameAnnRArrow {nann_mopen = Just _} -> parens N -- special case for unboxed unit tuples NameAnnOnly {nann_adornment = NameParensHash {}} -> const $ txt "(# #)" _ -> id -- When UnboxedSums is enabled, `(#` is a single lexeme, so we have to -- insert spaces when we have a parenthesized operator starting with `#`. handleUnboxedSumsAndHashInteraction | unboxedSums, -- Qualified names do not start wth a `#`. Unqual (occNameString -> '#' : _) <- x = \y -> space *> y <* space | otherwise = id wrapper (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 . sitcc 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 Choice "endNewline" -> -- | The 'LHsDoc' to render LHsDoc GhcPs -> R () p_hsDoc hstyle needsNewline lstr = do poHStyle <- getPrinterOpt poHaddockStyle p_hsDoc' poHStyle hstyle needsNewline lstr -- | Print a Haddock. p_hsDoc' :: -- | 'haddock-style' configuration option HaddockPrintStyle -> -- | Haddock style HaddockStyle -> -- | Finish the doc string with a newline Choice "endNewline" -> -- | The 'LHsDoc' to render LHsDoc GhcPs -> R () p_hsDoc' poHStyle 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 shouldEscapeCommentBraces = case poHStyle of HaddockSingleLine -> False HaddockMultiLine -> True HaddockMultiLineCompact -> True let docStringLines = splitDocString shouldEscapeCommentBraces $ hsDocString str if poHStyle == HaddockSingleLine || length docStringLines <= 1 then do txt $ "-- " <> haddockDelim space sep (newline >> txt "--" >> space) txt docStringLines else do txt . T.concat $ [ "{-", case (hstyle, poHStyle) of (Pipe, HaddockMultiLineCompact) -> "" _ -> " ", haddockDelim ] space sep multilineCommentNewline txtStripIndent docStringLines newline txt "-}" when (Choice.isTrue needsNewline) newline traverse_ (setSpanMark . HaddockSpan hstyle) =<< getSrcSpan l where haddockDelim = case hstyle of Pipe -> "|" Caret -> "^" Asterisk n -> T.replicate n "*" Named name -> "$" <> T.pack name getSrcSpan = \case -- 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. UnhelpfulSpan _ -> getEnclosingSpan RealSrcSpan spn _ -> pure $ Just spn p_sourceText :: SourceText -> R () p_sourceText = \case NoSourceText -> pure () SourceText s -> atom @FastString s p_namespaceSpec :: NamespaceSpecifier -> R () p_namespaceSpec = \case NoNamespaceSpecifier -> pure () TypeNamespaceSpecifier _ -> txt "type" *> space DataNamespaceSpecifier _ -> txt "data" *> space p_arrow :: (mult -> R ()) -> HsArrowOf mult GhcPs -> R () p_arrow p_mult = \case HsUnrestrictedArrow _ -> token'rarrow HsLinearArrow _ -> token'lolly HsExplicitMult _ mult -> do txt "%" p_mult mult space token'rarrow fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration.hs0000644000000000000000000002663414745250261021153 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | Rendering of declarations. module Ormolu.Printer.Meat.Declaration ( p_hsDecls, p_hsDeclsRespectGrouping, ) where import Data.Choice (pattern Without) import Data.List (sort) import Data.List.NonEmpty (NonEmpty (..), (<|)) import Data.List.NonEmpty qualified as NE import GHC.Hs import GHC.Types.Name.Occurrence (occNameFS) import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Config (SourceType (SignatureSource)) import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Annotation import Ormolu.Printer.Meat.Declaration.Class import Ormolu.Printer.Meat.Declaration.Data import Ormolu.Printer.Meat.Declaration.Default import Ormolu.Printer.Meat.Declaration.Foreign import Ormolu.Printer.Meat.Declaration.Instance import Ormolu.Printer.Meat.Declaration.RoleAnnotation import Ormolu.Printer.Meat.Declaration.Rule import Ormolu.Printer.Meat.Declaration.Signature import Ormolu.Printer.Meat.Declaration.Splice import Ormolu.Printer.Meat.Declaration.Type import Ormolu.Printer.Meat.Declaration.TypeFamily import Ormolu.Printer.Meat.Declaration.Value import Ormolu.Printer.Meat.Declaration.Warning import Ormolu.Printer.Meat.Type import Ormolu.Utils data UserGrouping = -- | Always put newlines where we think they should be Disregard | -- | Respect user preferences regarding grouping Respect deriving (Eq, Show) p_hsDecls :: FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDecls = p_hsDecls' Disregard -- | Like 'p_hsDecls' but respects user choices regarding grouping. If the -- user omits newlines between declarations, we also omit them in most -- cases, except when said declarations have associated Haddocks. -- -- Does some normalization (compress subsequent newlines into a single one) p_hsDeclsRespectGrouping :: FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDeclsRespectGrouping = p_hsDecls' Respect p_hsDecls' :: UserGrouping -> FamilyStyle -> [LHsDecl GhcPs] -> R () p_hsDecls' grouping style decls = do isSig <- (== SignatureSource) <$> askSourceType sepSemi id $ -- Return a list of rendered declarations, adding a newline to separate -- groups. case groupDecls isSig decls of [] -> [] (x : xs) -> renderGroup x ++ concat (zipWith renderGroupWithPrev (x : xs) xs) where renderGroup = NE.toList . fmap (located' $ dontUseBraces . p_hsDecl style) renderGroupWithPrev prev curr = -- We can omit a blank line when the user didn't add one, but we must -- ensure we always add blank lines around documented declarations case grouping of Disregard -> declNewline : renderGroup curr Respect -> if separatedByBlankNE getLocA prev curr || isDocumented prev || isDocumented curr then declNewline : 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 (Without #endNewline) str DocCommentPrev str -> p_hsDoc Caret (Without #endNewline) str DocCommentNamed name str -> p_hsDoc (Named name) (Without #endNewline) str DocGroup n str -> p_hsDoc (Asterisk n) (Without #endNewline) 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 (hsq_explicit tcdTyVars) getLocA (located' p_hsTyVarBndr) 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 (OrPat _ ps) = foldMap (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) patBindNames (EmbTyPat _ _) = [] patBindNames (InvisPat _ _) = [] fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Annotation.hs0000644000000000000000000000120314745250261023246 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" fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Class.hs0000644000000000000000000000633614745250261022215 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.Config 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 token'darrow breakpoint p_classFundeps :: [LHsFunDep GhcPs] -> R () p_classFundeps fdeps = unless (null fdeps) $ do breakpoint txt "|" space inci' $ sep commaDel (sitcc . located' p_funDep) fdeps where inci' x = getPrinterOpt poCommaStyle >>= \case Leading -> id x Trailing -> inci x p_funDep :: FunDep GhcPs -> R () p_funDep (FunDep _ before after) = do sep space p_rdrName before space token'rarrow space sep space p_rdrName after ---------------------------------------------------------------------------- -- Helpers isInfix :: LexicalFixity -> Bool isInfix = \case Infix -> True Prefix -> False fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Data.hs0000644000000000000000000002700414745250261022014 0ustar0000000000000000{-# LANGUAGE BlockArguments #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} -- | Renedring of data type declarations. module Ormolu.Printer.Meat.Declaration.Data ( p_dataDecl, ) where import Control.Monad import Data.Choice (Choice, pattern Is, pattern Isn't, pattern With) import Data.Choice qualified as Choice import Data.List (sortOn) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Maybe (isJust, isNothing, maybeToList) import Data.Text qualified as Text import Data.Void import GHC.Hs import GHC.Types.Fixity import GHC.Types.ForeignCall import GHC.Types.Name.Reader import GHC.Types.SrcLoc import Ormolu.Config import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type import Ormolu.Utils p_dataDecl :: -- | Whether to format as data family FamilyStyle -> -- | Type constructor LocatedN RdrName -> -- | Type variables [tyVar] -> -- | Get location information for type variables (tyVar -> SrcSpan) -> -- | How to print type variables (tyVar -> R ()) -> -- | Lexical fixity LexicalFixity -> -- | Data definition HsDataDefn GhcPs -> R () p_dataDecl style name tyVars getTyVarLoc p_tyVar fixity HsDataDefn {..} = do txt $ case dd_cons of NewTypeCon _ -> "newtype" DataTypeCons False _ -> "data" DataTypeCons True _ -> "type data" txt $ case style of Associated -> mempty Free -> " instance" let constructorSpans = getLocA name : fmap getTyVarLoc tyVars sigSpans = maybeToList . fmap getLocA $ dd_kindSig contextSpans = maybeToList . fmap getLocA $ dd_ctxt ctypeSpans = maybeToList . fmap getLocA $ dd_cType declHeaderSpans = constructorSpans ++ sigSpans ++ contextSpans ++ ctypeSpans switchLayout declHeaderSpans . inci $ do case unLoc <$> dd_cType of Nothing -> pure () Just (CType prag header (type_, _)) -> do breakpoint p_sourceText prag case header of Nothing -> pure () Just (Header h _) -> space *> p_sourceText h space p_sourceText type_ txt " #-}" breakpoint forM_ dd_ctxt p_lhsContext switchLayout constructorSpans $ p_infixDefHelper (isInfix fixity) True (p_rdrName name) (p_tyVar <$> tyVars) forM_ dd_kindSig $ \k -> do space token'dcolon breakpoint inci $ located k p_hsType let dd_cons' = case dd_cons of NewTypeCon a -> [a] DataTypeCons _ as -> as gadt = isJust dd_kindSig || any (isGadt . unLoc) dd_cons' case dd_cons' of [] -> pure () first_dd_cons : _ -> if gadt then inci $ do switchLayout declHeaderSpans $ do breakpoint txt "where" breakpoint sepSemi (located' (p_conDecl (Isn't #singleRecCon))) dd_cons' else switchLayout (getLocA name : (getLocA <$> dd_cons')) . inci $ do let singleRecCon = case dd_cons' of [L _ ConDeclH98 {con_args = RecCon {}}] -> Is #singleRecCon _ -> Isn't #singleRecCon compactLayoutAroundEquals = onTheSameLine (getLocA name) (combineSrcSpans' (conDeclConsSpans (unLoc first_dd_cons))) conDeclConsSpans = \case ConDeclGADT {..} -> getLocA <$> con_names ConDeclH98 {..} -> getLocA con_name :| [] if hasHaddocks dd_cons' then newline else if Choice.isTrue singleRecCon && compactLayoutAroundEquals 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' || Choice.isFalse singleRecCon then sitcc else id sep s (sitcc' . located' (p_conDecl singleRecCon)) dd_cons' unless (null dd_derivs) breakpoint sortDerivingClauses <- getPrinterOpt poSortDerivingClauses let sortedDeriving = if sortDerivingClauses then sortOn (derivingStrategyKey . fmap unLoc . deriv_clause_strategy . unLoc) dd_derivs else dd_derivs inci $ sep newline (located' p_hsDerivingClause) sortedDeriving where derivingStrategyKey Nothing = ClauseNoStrategy derivingStrategyKey (Just strategy) = case strategy of StockStrategy _ -> ClauseStockStrategy NewtypeStrategy _ -> ClauseNewtypeStrategy AnyclassStrategy _ -> ClauseAnyclassStrategy ViaStrategy ty -> ClauseViaStrategy (showOutputable ty) data DerivingClauseSortKey = ClauseNoStrategy | ClauseStockStrategy | ClauseNewtypeStrategy | ClauseAnyclassStrategy | ClauseViaStrategy String deriving (Eq, Ord) p_conDecl :: Choice "singleRecCon" -> ConDecl GhcPs -> R () p_conDecl _ ConDeclGADT {..} = do mapM_ (p_hsDoc Pipe (With #endNewline)) con_doc switchLayout conDeclSpn $ do let c :| cs = con_names p_rdrName c unless (null cs) . inci $ do commaDel sep commaDel p_rdrName cs inci $ do let conTy = case con_g_args of PrefixConGADT NoExtField xs -> let go (HsScaled a b) t = addCLocA t b (HsFunTy NoExtField a b t) in foldr go con_res_ty xs RecConGADT _ r -> addCLocA r con_res_ty $ HsFunTy NoExtField (HsUnrestrictedArrow noAnn) (la2la $ HsRecTy noAnn <$> r) con_res_ty qualTy = case con_mb_cxt of Nothing -> conTy Just qs -> addCLocA qs conTy $ HsQualTy NoExtField qs conTy quantifiedTy :: LHsType GhcPs quantifiedTy = addCLocA con_bndrs qualTy $ hsOuterTyVarBndrsToHsType (unLoc con_bndrs) qualTy startTypeAnnotationDecl quantifiedTy id p_hsType where conDeclSpn = fmap getLocA (NE.toList con_names) <> [getLocA con_bndrs] <> maybeToList (fmap getLocA con_mb_cxt) <> conArgsSpans conArgsSpans = case con_g_args of PrefixConGADT NoExtField xs -> getLocA . hsScaledThing <$> xs RecConGADT _ x -> [getLocA x] p_conDecl singleRecCon ConDeclH98 {..} = case con_args of PrefixCon (_ :: [Void]) xs -> do renderConDoc renderContext switchLayout conDeclSpn $ do p_rdrName con_name let args = hsScaledThing <$> xs argsHaveDocs = conArgsHaveHaddocks args delimiter = if argsHaveDocs then newline else breakpoint unless (null xs) delimiter inci . sitcc $ sep delimiter (sitcc . located' p_hsType) args RecCon l -> do renderConDoc renderContext switchLayout conDeclSpn $ do p_rdrName con_name breakpoint inciIf (Choice.isFalse singleRecCon) (located l p_conDeclFields) InfixCon (HsScaled _ l) (HsScaled _ r) -> do -- manually render these let (lType, larg_doc) = splitDocTy l let (rType, rarg_doc) = splitDocTy r -- the constructor haddock can go on top of the entire constructor -- only if neither argument has haddocks let putConDocOnTop = isNothing larg_doc && isNothing rarg_doc when putConDocOnTop renderConDoc renderContext switchLayout conDeclSpn $ do -- the left arg haddock can use pipe only if the infix constructor has docs if isJust con_doc then do mapM_ (p_hsDoc Pipe (With #endNewline)) larg_doc located lType p_hsType breakpoint else do located lType p_hsType case larg_doc of Just doc -> space >> p_hsDoc Caret (With #endNewline) doc Nothing -> breakpoint inci $ do unless putConDocOnTop renderConDoc p_rdrName con_name case rarg_doc of Just doc -> newline >> p_hsDoc Pipe (With #endNewline) doc Nothing -> breakpoint located rType p_hsType where renderConDoc = mapM_ (p_hsDoc Pipe (With #endNewline)) con_doc renderContext = switchLayout conNameWithContextSpn $ do when con_forall $ do p_forallBndrs ForAllInvis p_hsTyVarBndr con_ex_tvs breakpoint indent <- getPrinterOpt poIndentation vlayout (pure ()) . txt $ Text.replicate (indent - 2) " " forM_ con_mb_cxt p_lhsContext conNameWithContextSpn = [getHasLoc $ acdh_forall con_ext] <> fmap getLocA con_ex_tvs <> maybeToList (fmap getLocA con_mb_cxt) <> [conNameSpn] conDeclSpn = conNameSpn : conArgsSpans conNameSpn = getLocA con_name conArgsSpans = case con_args of PrefixCon (_ :: [Void]) xs -> getLocA . hsScaledThing <$> xs RecCon l -> [getLocA l] InfixCon x y -> getLocA . hsScaledThing <$> [x, y] splitDocTy = \case L _ (HsDocTy _ ty doc) -> (ty, Just doc) ty -> (ty, Nothing) p_lhsContext :: LHsContext GhcPs -> R () p_lhsContext = \case L _ [] -> pure () ctx -> do located ctx p_hsContext space token'darrow breakpoint isGadt :: ConDecl GhcPs -> Bool isGadt = \case ConDeclGADT {} -> True ConDeclH98 {} -> False p_hsDerivingClause :: HsDerivingClause GhcPs -> R () p_hsDerivingClause HsDerivingClause {..} = do singleDerivingParens <- getPrinterOpt poSingleDerivingParens txt "deriving" let derivingWhat = located deriv_clause_tys $ \case DctSingle NoExtField sigTy | DerivingAlways <- singleDerivingParens -> parens N $ located sigTy p_hsSigType | otherwise -> located sigTy p_hsSigType DctMulti NoExtField sigTys | [sigTy] <- sigTys, DerivingNever <- singleDerivingParens -> located sigTy p_hsSigType | otherwise -> do sortDerivedClasses <- getPrinterOpt poSortDerivedClasses let sort = if sortDerivedClasses then sortOn showOutputable else id parens N $ sep commaDel (sitcc . located' p_hsSigType) (sort 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 hasHaddocks :: [LConDecl GhcPs] -> Bool hasHaddocks = any (f . unLoc) where f ConDeclH98 {..} = isJust con_doc || case con_args of PrefixCon [] xs -> conArgsHaveHaddocks (hsScaledThing <$> xs) _ -> False f _ = False conArgsHaveHaddocks :: [LBangType GhcPs] -> Bool conArgsHaveHaddocks xs = let hasDocs = \case HsDocTy {} -> True _ -> False in any (hasDocs . unLoc) xs fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Default.hs0000644000000000000000000000077614745250261022536 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Printer.Meat.Declaration.Default ( p_defaultDecl, ) where import GHC.Data.Maybe (whenIsJust) import GHC.Hs import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type p_defaultDecl :: DefaultDecl GhcPs -> R () p_defaultDecl (DefaultDecl _ mclass ts) = do txt "default" whenIsJust mclass $ \c -> do breakpoint p_rdrName c breakpoint inci . parens N $ sep commaDel (sitcc . located' p_hsType) ts fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Foreign.hs0000644000000000000000000000366014745250261022536 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Printer.Meat.Declaration.Foreign ( p_foreignDecl, ) where import Control.Monad import GHC.Hs import GHC.Types.ForeignCall import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Signature p_foreignDecl :: ForeignDecl GhcPs -> R () p_foreignDecl = \case fd@ForeignImport {fd_fi} -> do p_foreignImport fd_fi p_foreignTypeSig fd fd@ForeignExport {fd_fe} -> do p_foreignExport fd_fe p_foreignTypeSig fd -- | Printer for the last part of an import\/export, which is function name -- and type signature. p_foreignTypeSig :: ForeignDecl GhcPs -> R () p_foreignTypeSig fd = do breakpoint inci . switchLayout [ getLocA (fd_name fd), (getLocA . fd_sig_ty) fd ] $ do p_rdrName (fd_name fd) p_typeAscription (fd_sig_ty fd) -- | Printer for 'ForeignImport'. -- -- These have the form: -- -- > foreign import callingConvention [safety] [identifier] -- -- We need to check whether the safety has a good source, span, as it -- defaults to 'PlaySafe' if you don't have anything in the source. -- -- We also layout the identifier using the 'SourceText', because printing -- with the other two fields of 'CImport' is very complicated. See the -- 'Outputable' instance of 'ForeignImport' for details. p_foreignImport :: ForeignImport GhcPs -> R () p_foreignImport (CImport sourceText cCallConv safety _ _) = do txt "foreign import" space located cCallConv atom -- Need to check for 'noLoc' for the 'safe' annotation when (isGoodSrcSpan $ getLocA safety) (space >> atom safety) space located sourceText p_sourceText p_foreignExport :: ForeignExport GhcPs -> R () p_foreignExport (CExport sourceText (L loc (CExportStatic _ _ cCallConv))) = do txt "foreign export" space located (L loc cCallConv) atom space located sourceText p_sourceText fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Instance.hs0000644000000000000000000001013614745250261022705 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Type class, type family, and data family instance declarations. module Ormolu.Printer.Meat.Declaration.Instance ( p_clsInstDecl, p_tyFamInstDecl, p_dataFamInstDecl, p_standaloneDerivDecl, ) where import Control.Arrow import Control.Monad import Data.Foldable import Data.Function (on) import Data.List (sortBy) import Data.Maybe (maybeToList) 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.Declaration.Warning import Ormolu.Printer.Meat.Type p_standaloneDerivDecl :: DerivDecl GhcPs -> R () p_standaloneDerivDecl DerivDecl {deriv_ext = (mWarnTxt, _), ..} = do let typesAfterInstance = located (hswc_body deriv_type) p_hsSigType instTypes toIndent = inci $ do txt "instance" for_ mWarnTxt $ \warnTxt -> do breakpoint located warnTxt p_warningTxt 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 {cid_ext = (mWarnTxt, _, _), ..} = 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) switchLayout (maybeToList (getLocA <$> mWarnTxt) <> [getLocA cid_poly_ty]) $ do for_ mWarnTxt $ \warnTxt -> do breakpoint located warnTxt p_warningTxt breakpoint located cid_poly_ty $ \sigTy -> 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 lhsTypeArgSrcSpan p_lhsTypeArg 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 () fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/OpTree.hs0000644000000000000000000002251114745250261022337 0ustar0000000000000000{-# LANGUAGE BlockArguments #-} {-# LANGUAGE LambdaCase #-} -- | Printing of operator trees. module Ormolu.Printer.Meat.Declaration.OpTree ( p_exprOpTree, exprOpTree, p_cmdOpTree, cmdOpTree, p_tyOpTree, tyOpTree, getOpName, getOpNameStr, ) where import Data.Functor ((<&>)) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE 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.Config (poIndentation, poTrailingSectionOperators) import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common (p_rdrName) import Ormolu.Printer.Meat.Declaration.Value ( IsApplicand (..), cmdTopPlacement, exprPlacement, p_hsCmdTop, p_hsExpr, p_hsExpr', ) import Ormolu.Printer.Meat.Type (p_hsType) import Ormolu.Printer.Operators -- | 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 :: (HasLoc 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)) = BinaryOpBranches (exprOpTree x) op (exprOpTree y) exprOpTree n = OpNode n -- | Print an operator tree where leaves are values. p_exprOpTree :: -- | Bracket style to use BracketStyle -> -- | N-ary 'OpTree' to render, enhanced with information regarding -- operator fixity OpTree (LHsExpr GhcPs) (OpInfo (LHsExpr GhcPs)) -> R () p_exprOpTree s (OpNode x) = located x (p_hsExpr' NotApplicand s) p_exprOpTree s t@(OpBranches exprs@(firstExpr :| otherExprs) ops) = do trailingSectionOperators <- getPrinterOpt poTrailingSectionOperators let placement = opBranchPlacement exprPlacement firstExpr (last otherExprs) rightMostNode = \case n@(OpNode _) -> n OpBranches exprs'' _ -> rightMostNode (NE.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) = -- Enabled by config trailingSectionOperators -- An operator with fixity InfixR 0, like seq, $, and $ variants, -- is required && isHardSplitterOp (opiFixityApproximation opi) -- the LHS must be single-line && isOneLineSpan (opTreeLoc prevExpr) -- can only happen when a breakpoint would have been added anyway && placement == Normal -- if the node just on the left of the operator (so the rightmost -- node of the subtree prevExpr) is a do-block, then we cannot -- place the operator in a trailing position (because it would be -- read as being part of the do-block) && not (isDoBlock $ rightMostNode prevExpr) -- If all operators at the current level match the conditions to be -- trailing, then put them in a trailing position isTrailing = all couldBeTrailing $ zip (NE.toList exprs) ops ub <- if isTrailing then return useBraces else opBranchBraceStyle placement indent <- getPrinterOpt poIndentation 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 let withPlacement m = -- This case prevents an operator from being indented past the start of a `do` block -- constituting its left operand, thus altering the AST. -- This is only relevant when the `do` block is on one line, as otherwise we will -- insert a newline after `do` anyway. -- This isn't an issue in Ormolu because this problem doesn't come up with 2-space -- indents, only when the indentation goes past the "do" column. if indent > 2 && isDoBlock firstExpr && isOneLineSpan (opTreeLoc firstExpr) then breakpoint >> m else placeHanging placement m withPlacement $ 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])))) -> BinaryOpBranches (cmdOpTree x) op (cmdOpTree y) 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 (firstExpr :| otherExprs) ops) = do let 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)) = BinaryOpBranches (tyOpTree l) op (tyOpTree r) 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 (firstExpr :| otherExprs) ops) = do let 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 fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/RoleAnnotation.hs0000644000000000000000000000162614745250261024101 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" fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Rule.hs0000644000000000000000000000310414745250261022045 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Printer.Meat.Declaration.Rule ( p_ruleDecls, ) where import Control.Monad (unless) import GHC.Hs import GHC.Types.Basic import GHC.Types.SourceText import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Signature import Ormolu.Printer.Meat.Declaration.Value import Ormolu.Printer.Meat.Type p_ruleDecls :: RuleDecls GhcPs -> R () p_ruleDecls (HsRules _ xs) = pragma "RULES" $ sep breakpoint (sitcc . located' p_ruleDecl) xs p_ruleDecl :: RuleDecl GhcPs -> R () p_ruleDecl (HsRule _ ruleName activation tyvars ruleBndrs lhs rhs) = do located ruleName p_ruleName space p_activation activation space case tyvars of Nothing -> return () Just xs -> do p_forallBndrs ForAllInvis p_hsTyVarBndr xs space -- It appears that there is no way to tell if there was an empty forall -- in the input or no forall at all. We do not want to add redundant -- foralls, so let's just skip the empty ones. unless (null ruleBndrs) $ p_forallBndrs ForAllInvis p_ruleBndr ruleBndrs breakpoint inci $ do located lhs p_hsExpr space equals inci $ do breakpoint located rhs p_hsExpr p_ruleName :: RuleName -> R () p_ruleName name = atom (HsString NoSourceText name :: HsLit GhcPs) p_ruleBndr :: RuleBndr GhcPs -> R () p_ruleBndr = \case RuleBndr _ x -> p_rdrName x RuleBndrSig _ x HsPS {..} -> parens N . sitcc $ do p_rdrName x p_typeAscription (lhsTypeToSigType hsps_body) fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Signature.hs0000644000000000000000000001244514745250261023107 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Type signature declarations. module Ormolu.Printer.Meat.Declaration.Signature ( p_sigDecl, p_typeAscription, p_activation, p_standaloneKindSig, ) where import Control.Monad import GHC.Data.BooleanFormula import GHC.Hs import GHC.Types.Basic import GHC.Types.Fixity import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Type import Ormolu.Utils p_sigDecl :: Sig GhcPs -> R () p_sigDecl = \case TypeSig _ names hswc -> p_typeSig True names (hswc_body hswc) PatSynSig _ names sigType -> p_patSynSig names sigType ClassOpSig _ def names sigType -> p_classOpSig def names sigType FixSig _ sig -> p_fixSig sig InlineSig _ name inlinePragma -> p_inlineSig name inlinePragma SpecSig _ name ts inlinePragma -> p_specSig name ts inlinePragma SpecInstSig _ sigType -> p_specInstSig sigType MinimalSig _ booleanFormula -> p_minimalSig booleanFormula CompleteMatchSig _ cs ty -> p_completeSig cs ty SCCFunSig _ name literal -> p_sccSig name literal p_typeSig :: -- | Should the tail of the names be indented Bool -> -- | Names (before @::@) [LocatedN RdrName] -> -- | Type LHsSigType GhcPs -> R () p_typeSig _ [] _ = return () -- should not happen though p_typeSig indentTail (n : ns) sigType = do p_rdrName n if null ns then p_typeAscription sigType else inciIf indentTail $ do commaDel sep commaDel p_rdrName ns p_typeAscription sigType p_typeAscription :: LHsSigType GhcPs -> R () p_typeAscription lsigType = inci $ startTypeAnnotationDecl lsigType (unLoc . sig_body) 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 namespace names (Fixity n dir) -> do txt $ case dir of InfixL -> "infixl" InfixR -> "infixr" InfixN -> "infix" space atom n space p_namespaceSpec namespace 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 token'dcolon 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 [LIdP GhcPs] -> -- | Type Maybe (LocatedN RdrName) -> R () p_completeSig cs mty = switchLayout (getLocA <$> cs) $ pragma "COMPLETE" . inci $ do sep commaDel p_rdrName cs forM_ mty $ \ty -> do space token'dcolon 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 startTypeAnnotation sigTy p_hsSigType fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Splice.hs0000644000000000000000000000050314745250261022355 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration.Splice ( p_spliceDecl, ) where import GHC.Hs import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Declaration.Value (p_hsUntypedSplice) p_spliceDecl :: SpliceDecl GhcPs -> R () p_spliceDecl (SpliceDecl NoExtField splice deco) = located splice $ p_hsUntypedSplice deco fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/StringLiteral.hs0000644000000000000000000001354114745250261023727 0ustar0000000000000000{-# LANGUAGE BlockArguments #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Printer.Meat.Declaration.StringLiteral (p_stringLit) where import Control.Applicative (Alternative (..)) import Control.Category ((>>>)) import Control.Monad ((>=>)) import Data.Semigroup (Min (..)) import Data.Text (Text) import Data.Text qualified as T import GHC.Data.FastString import GHC.Parser.CharClass (is_space) import Ormolu.Printer.Combinators import Ormolu.Utils -- | Print the source text of a string literal while indenting gaps and newlines -- correctly. p_stringLit :: FastString -> R () p_stringLit src = case parseStringLiteral $ T.pack $ unpackFS src of Nothing -> error $ "Internal Ormolu error: couldn't parse string literal: " <> show src Just ParsedStringLiteral {..} -> sitcc do txt startMarker case stringLiteralKind of RegularStringLiteral -> do let singleLine = txt $ T.concat segments multiLine = sep breakpoint f (attachRelativePos segments) where f :: (RelativePos, Text) -> R () f (pos, s) = case pos of SinglePos -> txt s FirstPos -> txt s *> txt "\\" MiddlePos -> txt "\\" *> txt s *> txt "\\" LastPos -> txt "\\" *> txt s vlayout singleLine multiLine MultilineStringLiteral -> sep breakpoint' txt segments txt endMarker -- | The start/end marker of the literal, whether it is a regular or a multiline -- literal, and the segments of the literals (separated by gaps for a regular -- literal, and separated by newlines for a multiline literal). data ParsedStringLiteral = ParsedStringLiteral { startMarker, endMarker :: Text, stringLiteralKind :: StringLiteralKind, segments :: [Text] } deriving stock (Show, Eq) -- | A regular or a multiline string literal. data StringLiteralKind = RegularStringLiteral | MultilineStringLiteral deriving stock (Show, Eq) -- | Turn a string literal (as it exists in the source) into a more structured -- form for printing. This should never return 'Nothing' for literals that the -- GHC parser accepted. parseStringLiteral :: Text -> Maybe ParsedStringLiteral parseStringLiteral = \s -> do psl <- (stripStartEndMarker MultilineStringLiteral "\"\"\"" s) <|> (stripStartEndMarker RegularStringLiteral "\"" s) let splitSegments = case stringLiteralKind psl of RegularStringLiteral -> splitGaps MultilineStringLiteral -> splitMultilineString pure psl {segments = concatMap splitSegments $ segments psl} where -- Remove the given marker from the start and the end (at the end, -- optionally also remove a #). stripStartEndMarker :: StringLiteralKind -> Text -> Text -> Maybe ParsedStringLiteral stripStartEndMarker stringLiteralKind marker s = do let startMarker = marker suffix <- T.stripPrefix startMarker s let markerWithHash = marker <> "#" (endMarker, infix_) <- ((markerWithHash,) <$> T.stripSuffix markerWithHash suffix) <|> ((marker,) <$> T.stripSuffix marker suffix) pure ParsedStringLiteral {segments = [infix_], ..} -- Split a string on gaps (backslash delimited whitespaces). -- -- > splitGaps "bar\\ \\fo\\&o" == ["bar", "fo\\&o"] splitGaps :: Text -> [Text] splitGaps s = go $ T.breakOnAll "\\" s where go [] = [s] go ((pre, suf) : bs) = case T.uncons suf of Just ('\\', T.uncons -> Just (c, s')) | is_space c, let rest = T.drop 1 $ T.dropWhile (/= '\\') s' -> pre : splitGaps rest | otherwise -> go $ (if c == '\\' then drop 1 else id) bs _ -> go bs -- See the the MultilineStrings GHC proposal and 'lexMultilineString' from -- "GHC.Parser.String" for reference. -- -- https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0569-multiline-strings.rst#proposed-change-specification splitMultilineString :: Text -> [Text] splitMultilineString = splitGaps -- There is no reason to use gaps with multiline string literals, so -- we collapse them. >>> T.concat >>> splitNewlines >>> fmap expandLeadingTabs >>> rmCommonWhitespacePrefixAndBlank -- See the definition of newlines on -- . splitNewlines :: Text -> [Text] splitNewlines = T.splitOn "\r\n" >=> T.split isNewlineish where isNewlineish c = c == '\n' || c == '\r' || c == '\f' -- See GHC's 'lexMultilineString'. expandLeadingTabs :: Text -> Text expandLeadingTabs = T.concat . go 0 where go :: Int -> Text -> [Text] go col s = case T.breakOn "\t" s of (pre, T.uncons -> Just (_, suf)) -> let col' = col + T.length pre fill = 8 - (col' `mod` 8) in pre : T.replicate fill " " : go (col' + fill) suf _ -> [s] -- Don't touch the first line, and remove common whitespace from all -- remaining lines as well as convert those consisting only of whitespace to -- empty lines. rmCommonWhitespacePrefixAndBlank :: [Text] -> [Text] rmCommonWhitespacePrefixAndBlank = \case [] -> [] hd : tl -> hd : tl' where (leadingSpaces, tl') = unzip $ countLeadingAndBlank <$> tl commonWs :: Int commonWs = maybe 0 getMin $ mconcat leadingSpaces countLeadingAndBlank :: Text -> (Maybe (Min Int), Text) countLeadingAndBlank l | T.all is_space l = (Nothing, "") | otherwise = (Just $ Min leadingSpace, T.drop commonWs l) where leadingSpace = T.length $ T.takeWhile is_space l fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Type.hs0000644000000000000000000000200614745250261022057 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 fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs0000644000000000000000000000603014745250261023222 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 startTypeAnnotation 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 token'rarrow 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 fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Value.hs0000644000000000000000000013571414745250261022227 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Printer.Meat.Declaration.Value ( p_valDecl, p_pat, p_hsExpr, p_hsUntypedSplice, IsApplicand (..), p_hsExpr', p_hsCmdTop, exprPlacement, cmdTopPlacement, ) where import Control.Monad import Data.Bool (bool) import Data.Choice (pattern Isn't) import Data.Data hiding (Infix, Prefix) import Data.Function (on) import Data.Functor ((<&>)) import Data.Generics.Schemes (everything) import Data.List (intersperse, sortBy, unsnoc) import Data.List.NonEmpty (NonEmpty (..), (<|)) import Data.List.NonEmpty qualified as NE import Data.Maybe import Data.Text (Text) import Data.Text qualified as Text import Data.Void import GHC.Data.Strict qualified as Strict import GHC.Hs import GHC.LanguageExtensions.Type (Extension (NegativeLiterals)) import GHC.Types.Basic import GHC.Types.Fixity import GHC.Types.Name.Reader import GHC.Types.SourceText import GHC.Types.SrcLoc import Language.Haskell.Syntax.Basic import Ormolu.Config import Ormolu.Printer.Combinators import Ormolu.Printer.Internal (sitccIfTrailing) 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.Declaration.StringLiteral 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 multAnn grhss -> p_match PatternBind False multAnn 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)) ~ EpAnnCO, 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) (HsNoMultAnn NoExtField) (matchStrictness m) -- We use the spans of the individual patterns. (unLoc 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 -> -- | Multiplicity annotation HsMultAnn GhcPs -> -- | 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)) ~ EpAnnCO) => -- | 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 -> -- | Multiplicity annotation HsMultAnn GhcPs -> -- | Strictness prefix (FunBind) SrcStrictness -> -- | Argument patterns [LPat GhcPs] -> -- | Equations GRHSs GhcPs (LocatedA body) -> R () p_match' placer render style isInfix multAnn 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 multAnn of HsNoMultAnn NoExtField -> pure () HsPct1Ann _ -> txt "%1" *> space HsMultAnn _ ty -> do txt "%" located ty p_hsType space case strictness of NoSrcStrict -> return () SrcStrict -> txt "!" SrcLazy -> txt "~" indentBody <- case NE.nonEmpty m_pats of Nothing -> False <$ case style of Function name -> p_rdrName name _ -> return () Just ne_pats@(head_pat :| tail_pats) -> do let combinedSpans = case style of Function name -> combineSrcSpans (getLocA name) patSpans _ -> patSpans patSpans = combineSrcSpans' (getLocA <$> ne_pats) indentBody = not (isOneLineSpan combinedSpans) switchLayoutNoLimit [combinedSpans] $ do let stdCase = sep breakpoint (located' p_pat) m_pats case style of Function name -> p_infixDefHelper isInfix indentBody (p_rdrName name) (located' p_pat <$> m_pats) PatternBind -> stdCase Case -> stdCase Lambda -> do let needsSpace = case unLoc head_pat of LazyPat _ _ -> True BangPat _ _ -> True SplicePat _ _ -> True InvisPat _ _ -> True _ -> False txt "\\" when needsSpace space sitcc stdCase LambdaCase -> do located' p_pat head_pat unless (null tail_pats) $ do breakpoint -- When we have multiple patterns (with `\cases`) across multiple -- lines, we have to indent all but the first pattern. inci $ sep breakpoint (located' p_pat) tail_pats return indentBody let -- Calculate position of end of patterns. This is useful when we decide -- about putting certain constructions in hanging positions. endOfPats = case NE.nonEmpty m_pats of Nothing -> case style of Function name -> Just (getLocA name) _ -> Nothing Just pats -> (Just . getLocA . NE.last) pats isCase = \case Case -> True LambdaCase -> True _ -> False hasGuards = withGuards grhssGRHSs grhssSpan = combineSrcSpans' $ getGRHSSpan . unLoc <$> NE.fromList grhssGRHSs patGrhssSpan = maybe grhssSpan (combineSrcSpans grhssSpan . srcLocSpan . srcSpanEnd) endOfPats placement = case endOfPats of Just spn | any guardNeedsLineBreak grhssGRHSs || not (onTheSameLine spn grhssSpan) -> Normal _ -> blockPlacement placer grhssGRHSs guardNeedsLineBreak :: XRec GhcPs (GRHS GhcPs body) -> Bool guardNeedsLineBreak (L _ (GRHS _ guardLStmts _)) = case guardLStmts of [] -> False [g] -> not . isOneLineSpan . getLocA $ g _ -> True p_body = do let groupStyle = if isCase style && hasGuards then RightArrow else EqualSign sep breakpoint (located' (p_grhs' placement placer render groupStyle)) grhssGRHSs p_where = do unless (eqEmptyLocalBinds grhssLocalBinds) $ do breakpoint indentWhere <- getPrinterOpt poIndentWheres bool (inciByFrac (-1 / 2)) id indentWhere $ txt "where" breakpoint inciIf indentWhere $ 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 >> token'rarrow 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 sitccIfTrailing (sep commaDel (sitcc . located' p_stmt) xs) space inci $ case style of EqualSign -> equals RightArrow -> token'rarrow -- 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. indent <- getPrinterOpt poIndentation inciIf (indent <= 2 && parentPlacement == Normal) (placeHanging placement p_body) where placement = case endOfGuards of Nothing -> placer (unLoc body) Just spn -> if onTheSameLine spn (getLocA body) then placer (unLoc body) else Normal endOfGuards = case NE.nonEmpty guards of Nothing -> Nothing Just gs -> (Just . getLocA . NE.last) gs p_body = located body render p_hsCmd :: HsCmd GhcPs -> R () p_hsCmd = p_hsCmd' NotApplicand N p_hsCmd' :: IsApplicand -> BracketStyle -> HsCmd GhcPs -> R () p_hsCmd' isApp s = \case HsCmdArrApp _ body input arrType rightToLeft -> do let (l, r) = if rightToLeft then (body, input) else (input, body) located l $ p_hsExpr' NotApplicand s breakpoint inci $ do case (arrType, rightToLeft) of (HsFirstOrderApp, True) -> token'larrowtail (HsHigherOrderApp, True) -> token'Larrowtail (HsFirstOrderApp, False) -> token'rarrowtail (HsHigherOrderApp, False) -> token'Rarrowtail placeHanging (exprPlacement (unLoc input)) $ located r p_hsExpr HsCmdArrForm _ form Prefix cmds -> banana s $ do located form p_hsExpr unless (null cmds) $ do breakpoint inci (sequence_ (intersperse breakpoint (located' (p_hsCmdTop N) <$> cmds))) HsCmdArrForm _ form Infix [left, right] -> do modFixityMap <- askModuleFixityMap debug <- askDebug let opTree = BinaryOpBranches (cmdOpTree left) form (cmdOpTree right) p_cmdOpTree s (reassociateOpTree debug (getOpName . unLoc) modFixityMap opTree) HsCmdArrForm _ _ Infix _ -> notImplemented "HsCmdArrForm" HsCmdApp _ cmd expr -> do located cmd (p_hsCmd' Applicand s) breakpoint inci $ located expr p_hsExpr HsCmdLam _ variant mgroup -> p_lam isApp variant cmdPlacement p_hsCmd mgroup HsCmdPar _ c -> parens N $ sitcc $ located c p_hsCmd HsCmdCase _ e mgroup -> p_case isApp cmdPlacement p_hsCmd e mgroup HsCmdIf anns _ if' then' else' -> p_if cmdPlacement p_hsCmd anns if' then' else' HsCmdLet (letToken, _) localBinds c -> p_let (s == S) p_hsCmd letToken localBinds c HsCmdDo _ es -> do txt "do" p_stmts S isApp cmdPlacement (p_hsCmd' NotApplicand) es -- | Print a top-level command. p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () p_hsCmdTop s (HsCmdTop _ cmd) = located cmd (p_hsCmd' NotApplicand s) -- | Render an expression preserving blank lines between such consecutive -- expressions found in the original source code. withSpacing :: -- | Rendering function (a -> R ()) -> -- | Entity to render LocatedAn ann a -> R () withSpacing f l = located l $ \x -> do case getLocA l of UnhelpfulSpan _ -> f x RealSrcSpan currentSpn _ -> do getSpanMark >>= \case -- Spacing before comments will be handled by the code -- that prints comments, so we just have to deal with -- blank lines between statements here. Just (StatementSpan lastSpn) -> if srcSpanStartLine currentSpn > srcSpanEndLine lastSpn + 1 then newline else return () _ -> return () f x -- In some cases the (f x) expression may insert a new mark. We want -- to be careful not to override comment marks. getSpanMark >>= \case Just (HaddockSpan _ _) -> return () Just (CommentSpan _) -> return () _ -> setSpanMark (StatementSpan currentSpn) p_stmt :: Stmt GhcPs (LHsExpr GhcPs) -> R () p_stmt = p_stmt' N exprPlacement (p_hsExpr' NotApplicand) p_stmt' :: ( Anno [LStmt GhcPs (XRec GhcPs body)] ~ SrcSpanAnnLW, Anno (Stmt GhcPs (XRec GhcPs body)) ~ SrcSpanAnnA, Anno body ~ SrcSpanAnnA ) => BracketStyle -> -- | Placer (body -> Placement) -> -- | Render (BracketStyle -> body -> R ()) -> -- | Statement to render Stmt GhcPs (XRec GhcPs body) -> R () p_stmt' s placer render = \case LastStmt _ body _ _ -> located body (render s) BindStmt _ p f@(getLocA -> l) -> do located p p_pat space token'larrow let loc = getLocA p placement | isOneLineSpan (mkSrcSpan (srcSpanEnd loc) (srcSpanStart l)) = placer (unLoc f) | otherwise = Normal switchLayout [loc, l] $ placeHanging placement (located f (render N)) BodyStmt _ body _ _ -> located body (render s) LetStmt epAnnLet binds -> p_let' True epAnnLet binds Nothing ParStmt {} -> -- 'ParStmt' should always be eliminated in 'gatherStmts' 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 'gatherStmts'. 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' s placer render)) p_stmts :: ( Anno [LStmt GhcPs (XRec GhcPs body)] ~ SrcSpanAnnLW, Anno (Stmt GhcPs (XRec GhcPs body)) ~ SrcSpanAnnA, Anno body ~ SrcSpanAnnA ) => BracketStyle -> IsApplicand -> -- | Placer (body -> Placement) -> -- | Render (BracketStyle -> body -> R ()) -> -- | Statements to render XRec GhcPs [LStmt GhcPs (XRec GhcPs body)] -> R () p_stmts s isApp placer render es = do breakpoint ub <- layoutToBraces <$> getLayout let p_stmtExt (relPos, stmt) = ub' $ withSpacing (p_stmt' s placer render) stmt where -- We need to set brace usage information for all but the last -- statement (e.g.in the case of nested do blocks). ub' = case relPos of FirstPos -> ub MiddlePos -> ub LastPos -> id SinglePos -> id inciApplicand isApp . located es $ sepSemi p_stmtExt . attachRelativePos p_hsLocalBinds :: HsLocalBinds GhcPs -> R () p_hsLocalBinds = \case HsValBinds epAnn (ValBinds _ binds 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 <$> binds) ++ (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 items' = sortBy (leftmost_smallest `on` getLocA) items sitcc $ sepSemi p_item' (attachRelativePos items') 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}} | -- excluding cases where there are no bindings not $ isZeroWidthSpan (locA al_anchor) -> located (L al_anchor ()) . const _ -> id p_dotFieldOcc :: DotFieldOcc GhcPs -> R () p_dotFieldOcc = p_rdrName . fmap (mkVarUnqual . field_label) . dfoLabel p_dotFieldOccs :: [DotFieldOcc GhcPs] -> R () p_dotFieldOccs = sep (txt ".") p_dotFieldOcc p_fieldOcc :: FieldOcc GhcPs -> R () p_fieldOcc FieldOcc {..} = p_rdrName foLabel p_hsFieldBind :: (lhs ~ GenLocated l a, HasLoc 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 (getLocA hfbLHS) (getLocA hfbRHS) then exprPlacement (unLoc hfbRHS) else Normal placeHanging placement (located hfbRHS p_hsExpr) p_hsExpr :: HsExpr GhcPs -> R () p_hsExpr = p_hsExpr' NotApplicand N -- | An applicand is the left-hand side in a function application, i.e. @f@ in -- @f a@. We need to track this in order to add extra identation in cases like -- -- > foo = -- > do -- > succ -- > 1 data IsApplicand = Applicand | NotApplicand inciApplicand :: IsApplicand -> R () -> R () inciApplicand = \case Applicand -> inci . inci NotApplicand -> inci p_hsExpr' :: IsApplicand -> BracketStyle -> HsExpr GhcPs -> R () p_hsExpr' isApp s = \case HsVar _ name -> p_rdrName name HsUnboundVar _ occ -> atom occ HsOverLabel sourceText _ -> do txt "#" p_sourceText sourceText HsIPVar _ (HsIPName name) -> do txt "?" atom name HsOverLit _ v -> atom (ol_val v) HsLit _ lit -> case lit of HsString (SourceText stxt) _ -> p_stringLit stxt HsStringPrim (SourceText stxt) _ -> p_stringLit stxt HsMultilineString (SourceText stxt) _ -> p_stringLit stxt r -> atom r HsLam _ variant mgroup -> p_lam isApp variant exprPlacement p_hsExpr mgroup HsApp _ f x -> do let -- In order to format function applications with multiple parameters -- nicer, traverse the AST to gather the function and all the -- parameters together. gatherArgs f' knownArgs = case f' of L _ (HsApp _ l r) -> gatherArgs l (r <| knownArgs) _ -> (f', knownArgs) (func, args) = gatherArgs f (x :| []) -- We need to handle the last argument specially if it is a -- hanging construct, so separate it from the rest. (initp, lastp) = (NE.init args, NE.last args) initSpan = combineSrcSpans' $ getLocA f :| [(srcLocSpan . srcSpanStart . getLocA) lastp] -- Hang the last argument only if the initial arguments span one line. placement <- spansLayout [initSpan] <&> \case SingleLine -> exprPlacement (unLoc lastp) MultiLine -> 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 indentArg = -- Normally, inciApplicand handles the case of multiline -- function application in a do-block, but in the specific -- case of: -- -- do f -- a -- -- we need to indent by exactly 2 spaces, to avoid going past -- the start of the statement. case unLoc func of HsDo {} | isOneLineSpan (getLocA func) -> inciBy 2 _ -> inci ub <- getLayout <&> \case SingleLine -> useBraces MultiLine -> id ub $ do located func (p_hsExpr' Applicand 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' Applicand s) breakpoint sep breakpoint (located' p_hsExpr) initp placeHanging placement $ located lastp p_hsExpr HsAppType _ e a -> do located e p_hsExpr breakpoint inci $ do txt "@" located (hswc_body a) p_hsType OpApp _ x op y -> do modFixityMap <- askModuleFixityMap debug <- askDebug let opTree = BinaryOpBranches (exprOpTree x) op (exprOpTree y) p_exprOpTree s (reassociateOpTree debug (getOpName . unLoc) modFixityMap opTree) NegApp _ e _ -> do negativeLiterals <- isExtensionEnabled NegativeLiterals let isLiteral = case unLoc e of HsLit {} -> True HsOverLit {} -> True _ -> False txt "-" -- If NegativeLiterals is enabled, we have to insert a space before -- negated literals, as `- 1` and `-1` have differing AST. when (negativeLiterals && isLiteral) space located e p_hsExpr HsPar _ e -> do csSpans <- fmap (flip RealSrcSpan Strict.Nothing . getLoc) <$> getEnclosingComments switchLayout (locA e : csSpans) $ parens s (sitcc $ 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_hsExprListItem Missing _ -> pure () parens' = case boxity of Boxed -> parens Unboxed -> parensHash enclSpan <- fmap (flip RealSrcSpan Strict.Nothing) . maybeToList <$> getEnclosingSpan if isSection then switchLayout [] . parens' s $ sep comma p_arg args else switchLayout enclSpan . parens' s $ sep commaDel p_arg args ExplicitSum _ tag arity e -> p_unboxedSum N tag arity (located e p_hsExpr) HsCase _ e mgroup -> p_case isApp exprPlacement p_hsExpr e mgroup HsIf anns if' then' else' -> p_if exprPlacement p_hsExpr anns if' then' else' HsMultiIf _ guards -> do txt "if" breakpoint inciApplicand isApp $ sep newline (located' (p_grhs RightArrow)) guards HsLet (letToken, _) localBinds e -> p_let (s == S) p_hsExpr letToken localBinds e HsDo _ doFlavor es -> do let doBody moduleName header = do forM_ moduleName $ \m -> atom m *> txt "." txt header p_stmts S isApp exprPlacement (p_hsExpr' NotApplicand) es case doFlavor of DoExpr moduleName -> doBody moduleName "do" MDoExpr moduleName -> doBody moduleName "mdo" ListComp -> p_listComp s es MonadComp -> p_listComp s es GhciStmtCtxt -> notImplemented "GhciStmtCtxt" ExplicitList _ xs -> brackets s $ sep commaDel (sitcc . located' p_hsExprListItem) xs RecordCon {..} -> do p_rdrName rcon_con breakpointPreRecordBrace 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 breakpointPreRecordBrace let p_recFields p_lbl = sep commaDel (sitcc . located' (p_hsFieldBind p_lbl)) p_fieldLabelStrings (FieldLabelStrings flss) = p_dotFieldOccs $ unLoc <$> flss inci . braces N $ case rupd_flds of RegularRecUpdFields {..} -> p_recFields (located' p_fieldOcc) recUpdFields OverloadedRecUpdFields {..} -> p_recFields (located' p_fieldLabelStrings) olRecUpdFields HsGetField {..} -> do located gf_expr p_hsExpr txt "." located gf_field p_dotFieldOcc HsProjection {..} -> parens N $ do txt "." p_dotFieldOccs (NE.toList proj_flds) ExprWithTySig _ x HsWC {hswc_body} -> sitcc $ do located x p_hsExpr inci $ startTypeAnnotation 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 _ x -> p_hsQuote x HsTypedSplice _ expr -> p_hsSpliceTH True expr DollarSplice HsUntypedSplice _ untySplice -> p_hsUntypedSplice DollarSplice untySplice HsProc _ p e -> do txt "proc" located p $ \x -> do breakpoint inci (p_pat x) breakpoint token'rarrow 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 HsEmbTy _ HsWC {hswc_body} -> do txt "type" space located hswc_body p_hsType -- similar to HsForAllTy HsForAll _ tele e -> do p_hsForAllTelescope (Isn't #multiline) tele located e p_hsExpr -- similar to HsQualTy HsQual _ qs e -> do located qs $ p_hsContext' p_hsExpr p_hsQualArrow (Isn't #multiline) located e p_hsExpr -- similar to HsFunTy HsFunArr _ arrow x y -> do located x p_hsExpr p_hsFun (Isn't #multiline) p_hsExpr arrow y -- | Print a list comprehension. -- -- BracketStyle should be N except in a do-block, which must be S or else it's a parse error. p_listComp :: BracketStyle -> XRec GhcPs [ExprLStmt GhcPs] -> R () p_listComp s es = sitcc (vlayout singleLine multiLine) where singleLine = do txt "[" body txt "]" multiLine = do txt "[" >> space (if s == S then sitcc else id) $ do body newline txt "]" body = located es p_body p_body xs = do let (stmts, yield) = case unsnoc xs of Nothing -> error $ "list comprehension unexpectedly had no expressions" Just (ys, y) -> (ys, y) sitcc $ located yield p_stmt breakpoint txt "|" space p_bodyParallels (gatherStmts stmts) -- print the list of list comprehension sections, e.g. -- [ "| x <- xs, y <- ys, let z = x <> y", "| a <- f z" ] p_bodyParallels = sep (breakpoint >> txt "|" >> space) (sitccIfTrailing . p_bodyParallelStmts) -- print a list comprehension section within a pipe, e.g. -- [ "x <- xs", "y <- ys", "let z = x <> y" ] p_bodyParallelStmts = sep commaDel (located' (sitcc . p_stmt)) -- | Gather the set of statements in a list comprehension. -- -- For example, this code: -- -- @ -- [ a + b + c + d -- | a <- as, let b = a + a -- | c <- cs -- | d <- ds, then sort by f -- ] -- @ -- -- is parsed as roughly: -- -- @ -- [ ParStmt -- [ ParStmtBlock -- [ BindStmt [| a <- as |] -- , LetStmt [| let b = a + a |] -- ] -- , ParStmtBlock -- [ BindStmt [| c <- cs |] -- ] -- , ParStmtBlock -- [ TransStmt -- [ BindStmt [| d <- ds |] -- ] -- [| then sort by f |] -- ] -- ] -- , LastStmt [| a + b + c + d |] -- ] -- @ -- -- The final expression is parsed out in p_body, and the rest is passed -- to this function. This function takes the above tree as input and -- normalizes it into: -- -- @ -- [ [ BindStmt [| a <- as |] -- , LetStmt [| let b = a + a |] -- ] -- , [ BindStmt [| c <- cs |] -- ] -- , [ BindStmt [| d <- ds |] -- , TransStmt [] [| then sortWith by f |] -- ] -- ] -- @ -- -- Notes: -- * The number of elements in the outer list is the number of pipes in -- the comprehension; i.e. 1 unless -XParallelListComp is enabled gatherStmts :: [ExprLStmt GhcPs] -> [[ExprLStmt GhcPs]] gatherStmts = \case -- When -XParallelListComp is enabled + list comprehension has -- multiple pipes, input will have exactly 1 element, and it -- will be ParStmt. [L _ (ParStmt _ blocks _ _)] -> [ concatMap collectNonParStmts stmts | ParStmtBlock _ stmts _ _ <- blocks ] -- Otherwise, list will not contain any ParStmt stmts -> [ concatMap collectNonParStmts stmts ] where collectNonParStmts = \case L _ ParStmt {} -> unexpected "ParStmt" stmt@(L _ TransStmt {trS_stmts}) -> concatMap collectNonParStmts trS_stmts ++ [stmt] stmt -> [stmt] unexpected label = error $ "Unexpected " <> label <> "! Please file a bug." 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 token'larrow 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 token'larrow 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) breakpointPreRecordBrace 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)) ~ EpAnnCO, Anno (Match GhcPs (LocatedA body)) ~ SrcSpanAnnA ) => IsApplicand -> -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Expression LHsExpr GhcPs -> -- | Match group MatchGroup GhcPs (LocatedA body) -> R () p_case isApp placer render e mgroup = do txt "case" space located e p_hsExpr space txt "of" breakpoint inciApplicand isApp (p_matchGroup' placer render Case mgroup) p_lam :: ( Anno (GRHS GhcPs (LocatedA body)) ~ EpAnnCO, Anno (Match GhcPs (LocatedA body)) ~ SrcSpanAnnA ) => IsApplicand -> -- | Variant (@\\@ or @\\case@ or @\\cases@) HsLamVariant -> -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Expression MatchGroup GhcPs (LocatedA body) -> R () p_lam isApp variant placer render mgroup = do let mCaseTxt = case variant of LamSingle -> Nothing LamCase -> Just "\\case" LamCases -> Just "\\cases" mgs = if isJust mCaseTxt then LambdaCase else Lambda pMatchGroup = p_matchGroup' placer render mgs mgroup case mCaseTxt of Nothing -> pMatchGroup Just caseTxt -> do txt caseTxt breakpoint inciApplicand isApp pMatchGroup p_if :: -- | Placer (body -> Placement) -> -- | Render (body -> R ()) -> -- | Annotations AnnsIf -> -- | If LHsExpr GhcPs -> -- | Then LocatedA body -> -- | Else LocatedA body -> R () p_if placer render anns if' then' else' = do txt "if" space located if' p_hsExpr breakpoint commentSpans <- fmap getLoc <$> getEnclosingComments let (thenSpan, elseSpan) = (locA aiThen, locA aiElse) where AnnsIf {aiThen, aiElse} = anns locatedToken tokenSpan token = located (L tokenSpan ()) $ \_ -> txt token betweenSpans spanA spanB s = spanA < s && s < spanB placeHangingLocated tokenSpan bodyLoc@(L _ body) = do let bodySpan = getLocA bodyLoc hasComments = fromMaybe False $ do tokenRealSpan <- srcSpanToRealSrcSpan tokenSpan bodyRealSpan <- srcSpanToRealSrcSpan bodySpan pure $ any (betweenSpans tokenRealSpan bodyRealSpan) commentSpans placement = if hasComments then Normal else placer body switchLayout [tokenSpan, bodySpan] $ placeHanging placement (located bodyLoc render) inci $ do locatedToken thenSpan "then" space placeHangingLocated thenSpan then' breakpoint locatedToken elseSpan "else" space placeHangingLocated elseSpan else' p_let :: -- | True if in do-block Bool -> -- | Render (body -> R ()) -> -- | Annotation for the `let` block EpToken "let" -> HsLocalBinds GhcPs -> LocatedA body -> R () p_let inDo render letToken localBinds e = p_let' inDo letToken localBinds $ Just (located e render) p_let' :: -- | True if in do-block Bool -> -- | Annotation for the `let` block EpToken "let" -> -- | Let bindings HsLocalBinds GhcPs -> -- | Optional 'in' body Maybe (R ()) -> R () p_let' inDo letLoc localBinds mBody = do letStyle <- getPrinterOpt poLetStyle inStyle <- getPrinterOpt poInStyle layout <- getLayout -- isAllInline = True if whole "let ... in ..." should be one line let isAllInline = layout == SingleLine && (not inDo || isJust mBody) -- isBlockInline = True if each "let ..." + "in ..." block should be one line let isBlockInline = case letStyle of _ | isAllInline -> True LetAuto -> -- check if local binds are on the same line as the "let" keyword; -- if we can't figure out the positions, just fallback to `inline` style fromMaybe True $ do letStartLine <- case letLoc of EpTok loc -> pure . srcSpanStartLine . epaLocationRealSrcSpan $ loc NoEpTok -> Nothing localBindsStartLine <- localBindsEpAnns localBinds >>= epAnnsStartLine pure $ -- special case when let has zero local binds if localBindsStartLine == -1 then True else letStartLine == localBindsStartLine LetInline -> True LetNewline -> False LetMixed -> numLocalBinds <= 1 let inString = case inStyle of _ | inDo -> " in" InRightAlign -> " in" InLeftAlign | isBlockInline -> "in " | otherwise -> "in" InNoSpace -> "in" -- helpers let block keyword body = do txt keyword if isBlockInline then space >> sitcc body else newline >> inci body sitcc $ do block "let" (p_hsLocalBinds localBinds) case mBody of Just body | isAllInline -> do space block "in" body | otherwise -> do newline block inString body Nothing -> pure () where numLocalBinds = case localBinds of HsValBinds _ (ValBinds _ binds sigs) -> length binds + length sigs HsValBinds _ (XValBindsLR (NValBinds binds sigs)) -> length binds + length sigs HsIPBinds _ (IPBinds _ binds) -> length binds EmptyLocalBinds _ -> 0 localBindsEpAnns = \case HsValBinds epanns _ -> Just epanns HsIPBinds epanns _ -> Just epanns EmptyLocalBinds _ -> Nothing epAnnsStartLine epAnn = case entry epAnn of EpaSpan (RealSrcSpan r _) -> Just $ srcSpanStartLine r _ -> Nothing 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 . sitcc . 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 OrPat _ pats -> sepSemi (located' p_pat) (NE.toList pats) SumPat _ pat tag arity -> p_unboxedSum S tag arity (located pat p_pat) ConPat _ pat details -> case details of PrefixCon tys xs -> sitcc $ do p_rdrName pat unless (null tys && null xs) breakpoint inci . sitcc $ sep breakpoint (sitcc . either p_hsConPatTyArg (located' p_pat)) $ (Left <$> tys) <> (Right <$> xs) RecCon (HsRecFields _ fields dotdot) -> do p_rdrName pat breakpointPreRecordBrace let f = \case Nothing -> txt ".." Just x -> located x p_pat_hsFieldBind inci . braces N . sep commaDel f $ case dotdot of Nothing -> Just <$> fields Just (L _ (RecFieldsDotDot n)) -> (Just <$> take n fields) ++ [Nothing] InfixCon l r -> do switchLayout [getLocA l, getLocA r] $ do located l p_pat breakpoint inci $ do p_rdrName pat space located r p_pat ViewPat _ expr pat -> sitcc $ do located expr p_hsExpr space token'rarrow breakpoint inci (located pat p_pat) SplicePat _ splice -> p_hsUntypedSplice DollarSplice splice LitPat _ p -> atom p NPat _ v (isJust -> isNegated) _ -> do when isNegated $ do txt "-" negativeLiterals <- isExtensionEnabled NegativeLiterals when negativeLiterals space located v (atom . ol_val) NPlusKPat _ n k _ _ _ -> sitcc $ do p_rdrName n breakpoint inci $ do txt "+" space located k (atom . ol_val) SigPat _ pat HsPS {..} -> do located pat p_pat p_typeAscription (lhsTypeToSigType hsps_body) EmbTyPat _ (HsTP _ ty) -> do txt "type" space located ty p_hsType InvisPat _ tyPat -> p_tyPat tyPat p_tyPat :: HsTyPat GhcPs -> R () p_tyPat (HsTP _ ty) = txt "@" *> located ty p_hsType p_hsConPatTyArg :: HsConPatTyArg GhcPs -> R () p_hsConPatTyArg (HsConPatTyArg _ patSigTy) = p_tyPat patSigTy p_pat_hsFieldBind :: HsRecField GhcPs (LPat GhcPs) -> R () p_pat_hsFieldBind HsFieldBind {..} = do located hfbLHS p_fieldOcc unless hfbPun $ do space equals breakpoint inci (located hfbRHS p_pat) p_unboxedSum :: BracketStyle -> ConTag -> Arity -> R () -> R () p_unboxedSum s tag arity m = do let before = tag - 1 after = arity - before - 1 args = replicate before Nothing <> [Just m] <> replicate after Nothing f x = case x :: Maybe (R ()) of Nothing -> space Just m' -> do space m' space parensHash s $ sep (txt "|") f args p_hsUntypedSplice :: SpliceDecoration -> HsUntypedSplice GhcPs -> R () p_hsUntypedSplice deco = \case HsUntypedSpliceExpr _ expr -> p_hsSpliceTH False expr deco HsQuasiQuote _ quoterName str -> do txt "[" p_rdrName (noLocA quoterName) txt "|" -- QuasiQuoters often rely on precise custom strings. We cannot do any -- formatting here without potentially breaking someone's code. atom str txt "|]" p_hsSpliceTH :: -- | Typed splice? Bool -> -- | Splice expression LHsExpr GhcPs -> -- | Splice decoration SpliceDecoration -> R () p_hsSpliceTH isTyped expr = \case DollarSplice -> do txt decoSymbol located expr (sitcc . p_hsExpr) BareSplice -> located expr (sitcc . p_hsExpr) where decoSymbol = if isTyped then "$$" else "$" p_hsQuote :: HsQuote GhcPs -> R () p_hsQuote = \case ExpBr (bracketAnn, _) expr -> do let name = case bracketAnn of BracketNoE {} -> "" BracketHasE {} -> "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 let (startQuote, endQuote) = if Text.null name then (token'openExpQuote, token'closeQuote) else (txt "[" >> txt name >> txt "|", txt "|]") startQuote breakpoint' inci $ do dontUseBraces body breakpoint' endQuote -- 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 ---------------------------------------------------------------------------- -- 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 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 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 _ variant mg -> case variant of LamSingle -> case mg of MG _ (L _ [L _ (Match _ _ (L _ (x : xs)) _)]) | isOneLineSpan (combineSrcSpans' $ fmap getLocA (x :| xs)) -> Hanging _ -> Normal LamCase -> Hanging LamCases -> 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 -- | For use before record braces. Collapse to empty if not 'poRecordBraceSpace'. breakpointPreRecordBrace :: R () breakpointPreRecordBrace = do useSpace <- getPrinterOpt poRecordBraceSpace if useSpace then breakpoint else breakpoint' -- | For nested lists/tuples, pad with whitespace so that we always indent correctly, -- rather than sometimes indenting by 2 regardless of 'poIndentation'. p_hsExprListItem :: HsExpr GhcPs -> R () p_hsExprListItem e = do indent <- getPrinterOpt poIndentation when (listLike e) $ do getPrinterOpt poCommaStyle >>= \case Leading -> breakpoint' Trailing -> pure () vlayout (pure ()) (spaces $ indent - 2) p_hsExpr e where spaces n = txt $ Text.replicate n " " listLike = \case ExplicitList {} -> True ExplicitTuple {} -> True _ -> False fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Warning.hs0000644000000000000000000000307414745250261022551 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Printer.Meat.Declaration.Warning ( p_warnDecls, p_warningTxt, ) where import Data.Foldable import Data.Text (Text) import Data.Text qualified as T import GHC.Hs import GHC.Types.SourceText import GHC.Types.SrcLoc import GHC.Unit.Module.Warnings import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Utils p_warnDecls :: WarnDecls GhcPs -> R () p_warnDecls (Warnings _ warnings) = traverse_ (located' p_warnDecl) warnings p_warnDecl :: WarnDecl GhcPs -> R () p_warnDecl (Warning (namespace, _) fnames wtxt) = do let (pragmaText, lits) = warningText wtxt switchLayout (fmap getLocA fnames ++ fmap getLocA lits) $ pragma pragmaText . inci $ do p_namespaceSpec namespace sep commaDel p_rdrName fnames breakpoint p_lits lits p_warningTxt :: WarningTxt GhcPs -> R () p_warningTxt wtxt = do let (pragmaText, lits) = warningText wtxt inci $ pragma pragmaText $ inci $ p_lits lits warningText :: WarningTxt GhcPs -> (Text, [LocatedE StringLiteral]) warningText = \case WarningTxt mcat _ lits -> ("WARNING" <> T.pack cat, fmap hsDocString <$> lits) where cat = case unLoc <$> mcat of Just InWarningCategory {..} -> " in " <> show (showOutputable @WarningCategory (unLoc iwc_wc)) Nothing -> "" DeprecatedTxt _ lits -> ("DEPRECATED", fmap hsDocString <$> lits) p_lits :: [LocatedE StringLiteral] -> R () p_lits = \case [l] -> atom l ls -> brackets N $ sep commaDel atom ls fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/ImportExport.hs0000644000000000000000000001606214745250261021374 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of import and export lists. module Ormolu.Printer.Meat.ImportExport ( p_hsmodExports, p_hsmodImport, ) where import Control.Monad import Data.Choice (pattern Without) import Data.Foldable (for_, traverse_) import Data.List (inits) import Data.Text qualified as T import GHC.Hs import GHC.LanguageExtensions.Type import GHC.Types.PkgQual import GHC.Types.SrcLoc import Ormolu.Config import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration.Warning import Ormolu.Utils (RelativePos (..), attachRelativePos) p_hsmodExports :: [LIE GhcPs] -> R () p_hsmodExports xs = parens' False $ do layout <- getLayout sep breakpoint (\(isAllPrevDoc, p, l) -> sitcc (located (addDocSrcSpan l) (p_lie layout isAllPrevDoc p))) (withAllPrevDoc $ attachRelativePos xs) where -- In order to correctly set the layout when a doc comment is present. addDocSrcSpan lie@(L l ie) = case ieExportDoc ie of Nothing -> lie Just (L l' _) -> L (l <> noAnnSrcSpan l') ie p_hsmodImport :: ImportDecl GhcPs -> R () p_hsmodImport ImportDecl {..} = do useQualifiedPost <- isExtensionEnabled ImportQualifiedPost txt "import" space when (ideclSource == IsBoot) (txt "{-# SOURCE #-}") space when ideclSafe (txt "safe") space when (isImportDeclQualified ideclQualified && not useQualifiedPost) (txt "qualified") space case ideclPkgQual of NoRawPkgQual -> return () RawPkgQual slit -> atom slit space inci $ do located ideclName atom when (isImportDeclQualified ideclQualified && useQualifiedPost) (space >> txt "qualified") case ideclAs of Nothing -> return () Just l -> do space txt "as" space located l atom space case ideclImportList of Nothing -> return () Just (hiding, L _ xs) -> do case hiding of Exactly -> pure () EverythingBut -> txt "hiding" breakIfNotDiffFriendly parens' True $ do layout <- getLayout sep breakpoint (\(p, l) -> sitcc (located l (p_lie layout False p))) (attachRelativePos xs) newline p_lie :: Layout -> Bool -> RelativePos -> IE GhcPs -> R () p_lie encLayout isAllPrevDoc relativePos = \case IEVar mwarn l1 exportDoc -> do for_ mwarn $ \warnTxt -> do located warnTxt p_warningTxt breakpoint withComma $ located l1 p_ieWrappedName p_exportDoc exportDoc IEThingAbs _ l1 exportDoc -> do withComma $ located l1 p_ieWrappedName p_exportDoc exportDoc IEThingAll _ l1 exportDoc -> do withComma $ do located l1 p_ieWrappedName space txt "(..)" p_exportDoc exportDoc IEThingWith _ l1 w xs exportDoc -> sitcc $ do withComma $ do located l1 p_ieWrappedName breakIfNotDiffFriendly inci $ do let names :: [R ()] names = located' p_ieWrappedName <$> xs parens' False . sep commaDelImportExport sitcc $ case w of NoIEWildcard -> names IEWildcard n -> let (before, after) = splitAt n names in before ++ [txt ".."] ++ after p_exportDoc exportDoc IEModuleContents _ l1 -> withComma $ located l1 p_hsmodName IEGroup NoExtField n str -> do case relativePos of SinglePos -> return () FirstPos -> return () MiddlePos -> newline LastPos -> newline indentDoc $ p_hsDoc (Asterisk n) (Without #endNewline) str IEDoc NoExtField str -> indentDoc $ p_hsDoc Pipe (Without #endNewline) str IEDocNamed NoExtField str -> indentDoc $ txt $ "-- $" <> T.pack str where -- Add a comma to a import-export list element withComma m = case encLayout of SingleLine -> case relativePos of SinglePos -> void m FirstPos -> m >> comma MiddlePos -> m >> comma LastPos -> void m MultiLine -> do commaStyle <- getCommaStyle case commaStyle of Leading -> case relativePos of FirstPos -> m _ | isAllPrevDoc -> inciBy 2 m SinglePos -> m _ -> comma >> space >> m Trailing -> m >> comma -- This is used to support `@since` annotations for (re)exported items. It -- /must/ use caret style comments, see -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12098 and -- https://github.com/haskell/haddock/issues/1629#issuecomment-1931354411. p_exportDoc :: Maybe (ExportDoc GhcPs) -> R () p_exportDoc = traverse_ $ \exportDoc -> do breakpoint p_hsDoc Caret (Without #endNewline) exportDoc indentDoc m = do commaStyle <- getCommaStyle case commaStyle of Trailing -> m Leading -> case relativePos of SinglePos -> m FirstPos -> m _ -> inciBy 2 m ieExportDoc :: IE GhcPs -> Maybe (ExportDoc GhcPs) ieExportDoc = \case IEVar _ _ doc -> doc IEThingAbs _ _ doc -> doc IEThingAll _ _ doc -> doc IEThingWith _ _ _ _ doc -> doc IEModuleContents {} -> Nothing IEGroup {} -> Nothing IEDoc {} -> Nothing IEDocNamed {} -> Nothing ---------------------------------------------------------------------------- -- | Annotate each element with a Bool indicating if all preceding elements are -- documentation elements. withAllPrevDoc :: [(RelativePos, LIE GhcPs)] -> [(Bool, RelativePos, LIE GhcPs)] withAllPrevDoc xs = zipWith go (inits xs) xs where go prevElems (p, l) = (all (isDoc . snd) prevElems, p, l) isDoc = \case L _ IEDoc {} -> True L _ IEGroup {} -> True L _ IEDocNamed {} -> True _ -> False -- | Surround given entity by parentheses @(@ and @)@. parens' :: Bool -> R () -> R () parens' topLevelImport m = getPrinterOpt poImportExportStyle >>= \case ImportExportDiffFriendly -> do txt "(" breakpoint' sitcc body vlayout (txt ")") (inciByFrac (-1) trailingParen) _ -> sitcc $ do txt "(" body txt ")" where body = vlayout singleLine multiLine singleLine = m multiLine = do commaStyle <- getCommaStyle case commaStyle of -- On leading commas, list elements are inline with the enclosing parentheses Leading -> do space m newline -- On trailing commas, list elements are indented Trailing -> do space sitcc m newline trailingParen = if topLevelImport then txt " )" else txt ")" getCommaStyle :: R CommaStyle getCommaStyle = getPrinterOpt poImportExportStyle >>= \case ImportExportLeading -> pure Leading ImportExportTrailing -> pure Trailing ImportExportDiffFriendly -> pure Trailing breakIfNotDiffFriendly :: R () breakIfNotDiffFriendly = getPrinterOpt poImportExportStyle >>= \case ImportExportDiffFriendly -> space _ -> breakpoint fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Module.hs0000644000000000000000000000764314745250261020152 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} -- | Rendering of modules. module Ormolu.Printer.Meat.Module ( p_hsModule, ) where import Control.Monad import Data.Choice (pattern With) import GHC.Hs hiding (comment) import GHC.Types.SrcLoc import Ormolu.Config import Ormolu.Imports (normalizeImports) import Ormolu.Parser.CommentStream import Ormolu.Parser.Pragma import Ormolu.Printer.Combinators import Ormolu.Printer.Comments import Ormolu.Printer.Meat.Common import Ormolu.Printer.Meat.Declaration import Ormolu.Printer.Meat.Declaration.Warning import Ormolu.Printer.Meat.ImportExport import Ormolu.Printer.Meat.Pragma -- | Render a module-like entity (either a regular module or a backpack -- signature). p_hsModule :: -- | Stack header Maybe LComment -> -- | Pragmas and the associated comments [([LComment], Pragma)] -> -- | AST to print HsModule GhcPs -> R () p_hsModule mstackHeader pragmas hsmod@HsModule {..} = do let XModulePs {..} = hsmodExt deprecSpan = maybe [] (pure . getLocA) hsmodDeprecMessage exportSpans = maybe [] (pure . getLocA) hsmodExports switchLayout (deprecSpan <> exportSpans) $ do forM_ mstackHeader $ \(L spn comment) -> do spitCommentNow spn comment newline newline p_pragmas pragmas newline mapM_ (p_hsModuleHeader hsmod) hsmodName newline respectful <- getPrinterOpt poRespectful localModules <- getLocalModules importGrouping <- getPrinterOpt poImportGrouping forM_ (normalizeImports respectful localModules importGrouping hsmodImports) $ \importGroup -> do forM_ importGroup (located' p_hsmodImport) newline declNewline switchLayout (getLocA <$> hsmodDecls) $ do preserveSpacing <- getPrinterOpt poRespectful (if preserveSpacing then p_hsDeclsRespectGrouping else p_hsDecls) Free hsmodDecls newline spitRemainingComments p_hsModuleHeader :: HsModule GhcPs -> LocatedA ModuleName -> R () p_hsModuleHeader HsModule {hsmodExt = XModulePs {..}, ..} moduleName = do located moduleName $ \name -> do poHStyle <- getPrinterOpt poHaddockStyleModule >>= \case PrintStyleInherit -> getPrinterOpt poHaddockStyle PrintStyleOverride style -> pure style forM_ hsmodHaddockModHeader (p_hsDoc' poHStyle Pipe (With #endNewline)) p_hsmodName name forM_ hsmodDeprecMessage $ \w -> do breakpoint located' p_warningTxt w isRespectful <- getPrinterOpt poRespectful isDiffFriendly <- (== ImportExportDiffFriendly) <$> getPrinterOpt poImportExportStyle let breakpointBeforeExportList = case (hsmodDeprecMessage, hsmodExports) of _ | not isDiffFriendly -> breakpoint (Nothing, _) -> space (Just _, Just exports) | (not . isOneLineSpan) (getLocA exports) -> space _ -> breakpoint breakpointBeforeWhere | not isRespectful = breakpointBeforeExportList | isOnSameLine am_mod am_where || isOnSameLine am_sig am_where = space | Just closeParen <- mCloseParen, isOnSameLine closeParen am_where = space | otherwise = newline case hsmodExports of Nothing -> return () Just l -> do breakpointBeforeExportList encloseLocated l $ \exports -> do inci (p_hsmodExports exports) breakpointBeforeWhere txt "where" newline where AnnsModule {am_sig, am_mod, am_where} = anns hsmodAnn mCloseParen = do AnnList {al_brackets} <- anns . getLoc <$> hsmodExports case al_brackets of ListParens _ closeParen -> pure closeParen _ -> error "Unexpectedly got a different kind of bracket in module export list" isOnSameLine = curry $ \case (EpTok token1, EpTok token2) -> let loc1 = epaLocationRealSrcSpan token1 loc2 = epaLocationRealSrcSpan token2 in srcSpanEndLine loc1 == srcSpanStartLine loc2 _ -> False fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Pragma.hs0000644000000000000000000000573114745250261020130 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | Pretty-printing of language pragmas. module Ormolu.Printer.Meat.Pragma ( p_pragmas, ) where import Control.Monad import Data.Char (isUpper) import Data.List qualified as L import Data.Set (Set) import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import GHC.Driver.Flags (Language) import GHC.Types.SrcLoc import Ormolu.Parser.CommentStream import Ormolu.Parser.Pragma (Pragma (..)) import Ormolu.Printer.Combinators hiding (Placement (..)) import Ormolu.Printer.Comments -- | Pragma classification. data PragmaTy = Language LanguagePragmaClass | OptionsGHC | OptionsHaddock deriving (Eq, Ord) -- | Language pragma classification. -- -- The order in which language pragmas are put in the input sometimes -- matters. This is because some language extensions can enable other -- extensions, yet the extensions coming later in the list have the ability -- to change it. So here we classify all extensions by assigning one of the -- four groups to them. Then we only sort inside of the groups. -- -- 'Ord' instance of this data type is what affects the sorting. -- -- See also: data LanguagePragmaClass = -- | A pack of extensions like @GHC2021@ or @Haskell2010@ ExtensionPack | -- | All other extensions Normal | -- | Extensions starting with "No" Disabling | -- | Extensions that should go after everything else Final deriving (Eq, Ord) -- | Print a collection of 'Pragma's with their associated comments. p_pragmas :: [([LComment], Pragma)] -> R () p_pragmas ps = do let prepare = L.sortOn snd . L.nub . concatMap analyze analyze = \case (cs, PragmaLanguage xs) -> let f x = (cs, (Language (classifyLanguagePragma x), x)) in f <$> xs (cs, PragmaOptionsGHC x) -> [(cs, (OptionsGHC, x))] (cs, PragmaOptionsHaddock x) -> [(cs, (OptionsHaddock, x))] forM_ (prepare ps) $ \(cs, (pragmaTy, x)) -> p_pragma cs pragmaTy x p_pragma :: [LComment] -> PragmaTy -> Text -> R () p_pragma comments ty x = do forM_ comments $ \(L l comment) -> do spitCommentNow l comment newline txt "{-# " txt $ case ty of Language _ -> "LANGUAGE" OptionsGHC -> "OPTIONS_GHC" OptionsHaddock -> "OPTIONS_HADDOCK" space txt x txt " #-}" newline -- | Classify a 'LanguagePragma'. classifyLanguagePragma :: Text -> LanguagePragmaClass classifyLanguagePragma = \case str | str `Set.member` extensionPacks -> ExtensionPack "ImplicitPrelude" -> Final "CUSKs" -> Final str -> case T.splitAt 2 str of ("No", rest) -> case T.uncons rest of Nothing -> Normal Just (x, _) -> if isUpper x then Disabling else Normal _ -> Normal -- | Extension packs, like @GHC2021@ and @Haskell2010@. extensionPacks :: Set Text extensionPacks = Set.fromList $ T.pack . show <$> [minBound :: Language .. maxBound] fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Type.hs0000644000000000000000000003246214745250261017643 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} -- | Rendering of types. module Ormolu.Printer.Meat.Type ( p_hsType, startTypeAnnotation, startTypeAnnotationDecl, hasDocStrings, p_hsContext, p_hsContext', p_hsTyVarBndr, ForAllVisibility (..), p_forallBndrs, p_conDeclFields, p_lhsTypeArg, p_hsSigType, p_hsForAllTelescope, p_hsQualArrow, p_hsFun, hsOuterTyVarBndrsToHsType, lhsTypeToSigType, ) where import Control.Monad import Data.Choice (Choice, pattern With, pattern Without) import Data.Choice qualified as Choice import Data.Functor ((<&>)) import Data.List (sortOn) import GHC.Data.Strict qualified as Strict import GHC.Hs hiding (isPromoted) import GHC.Types.SourceText import GHC.Types.SrcLoc import GHC.Types.Var import GHC.Utils.Outputable (Outputable) import Ormolu.Config import Ormolu.Printer.Combinators import Ormolu.Printer.Meat.Common import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration.OpTree (p_tyOpTree, tyOpTree) import Ormolu.Printer.Meat.Declaration.StringLiteral import {-# SOURCE #-} Ormolu.Printer.Meat.Declaration.Value (p_hsUntypedSplice) import Ormolu.Printer.Operators import Ormolu.Utils p_hsType :: HsType GhcPs -> R () p_hsType t = do layout <- getLayout p_hsType' (Choice.fromBool $ hasDocStrings t || layout == MultiLine) t p_hsType' :: Choice "multiline" -> HsType GhcPs -> R () p_hsType' isMultiline = \case HsForAllTy _ tele t -> do p_hsForAllTelescope isMultiline tele located t p_hsType HsQualTy _ qs t -> do located qs p_hsContext p_hsQualArrow isMultiline case unLoc t of HsQualTy {} -> p_hsTypeR (unLoc t) HsFunTy {} -> located t p_hsType _ -> 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 -> do located x p_hsType p_hsFun isMultiline p_hsTypeR arrow y HsListTy _ t -> located t (brackets N . p_hsType) HsTupleTy _ tsort xs -> let parens' = case tsort of HsUnboxedTuple -> parensHash N HsBoxedOrConstraintTuple -> parens N in parens' $ sep commaDel (sitcc . located' p_hsType) xs HsSumTy _ xs -> parensHash N $ sep (space >> txt "|" >> breakpoint) (sitcc . located' p_hsType) xs HsOpTy _ _ x op y -> do modFixityMap <- askModuleFixityMap debug <- askDebug let opTree = BinaryOpBranches (tyOpTree x) op (tyOpTree y) p_tyOpTree (reassociateOpTree debug (Just . unLoc) modFixityMap opTree) HsParTy _ t -> do csSpans <- fmap (flip RealSrcSpan Strict.Nothing . getLoc) <$> getEnclosingComments switchLayout (locA t : csSpans) $ parens N (sitcc $ located t p_hsType) HsIParamTy _ n t -> sitcc $ do located n atom inci $ startTypeAnnotation t p_hsType HsStarTy _ _ -> token'star HsKindSig _ t k -> sitcc $ do located t p_hsType inci $ startTypeAnnotation k p_hsType HsSpliceTy _ splice -> p_hsUntypedSplice DollarSplice splice HsDocTy _ t str -> do usePipe <- getPrinterOpt poFunctionArrows <&> \case TrailingArrows -> True LeadingArrows -> False LeadingArgsArrows -> False if usePipe then do p_hsDoc Pipe (With #endNewline) str located t p_hsType else do located t p_hsType newline p_hsDoc Caret (Without #endNewline) str HsBangTy _ (HsBang u s) t -> do case u of SrcUnpack -> txt "{-# UNPACK #-}" >> space SrcNoUnpack -> txt "{-# NOUNPACK #-}" >> space NoSrcUnpack -> return () case s of SrcLazy -> txt "~" SrcStrict -> txt "!" NoSrcStrict -> return () located t p_hsType HsRecTy _ fields -> p_conDeclFields fields HsExplicitListTy _ p xs -> do case p of IsPromoted -> txt "'" NotPromoted -> return () brackets N $ do -- If this list is promoted and the first element starts with a single -- quote, we need to put a space in between or it fails to parse. case (p, xs) of (IsPromoted, L _ t : _) | startsWithSingleQuote t -> space _ -> return () sep commaDel (sitcc . located' p_hsType) xs HsExplicitTupleTy _ p xs -> do case p of IsPromoted -> txt "'" NotPromoted -> return () parens N $ do -- If this tuple is promoted and the first element starts with a single -- quote, we need to put a space in between or it fails to parse. case (p, xs) of (IsPromoted, L _ t : _) | startsWithSingleQuote t -> space _ -> return () sep commaDel (located' p_hsType) xs HsTyLit _ t -> case t of HsStrTy (SourceText s) _ -> p_stringLit s a -> atom a HsWildCardTy _ -> txt "_" XHsType t -> atom t where startsWithSingleQuote = \case HsAppTy _ (L _ f) _ -> startsWithSingleQuote f HsTyVar _ IsPromoted _ -> True HsExplicitTupleTy {} -> True HsExplicitListTy {} -> True HsTyLit _ HsCharTy {} -> True _ -> False p_hsTypeR m = p_hsType' isMultiline m startTypeAnnotation :: (HasLoc l) => GenLocated l a -> (a -> R ()) -> R () startTypeAnnotation = startTypeAnnotation' breakpoint breakpoint startTypeAnnotationDecl :: (HasLoc l) => GenLocated l a -> (a -> HsType GhcPs) -> (a -> R ()) -> R () startTypeAnnotationDecl lItem getType = startTypeAnnotation' ( if hasDocStrings $ getType $ unLoc lItem then newline else breakpoint ) breakpoint lItem startTypeAnnotation' :: (HasLoc l) => R () -> R () -> GenLocated l a -> (a -> R ()) -> R () startTypeAnnotation' breakTrailing breakLeading lItem renderItem = getPrinterOpt poFunctionArrows >>= \case TrailingArrows -> do space token'dcolon breakTrailing located lItem renderItem LeadingArrows -> do breakLeading located lItem $ \item -> do token'dcolon space renderItem item LeadingArgsArrows -> do space token'dcolon breakTrailing located lItem renderItem -- | 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 = p_hsContext' p_hsType p_hsContext' :: (Outputable (GenLocated (Anno a) a), HasLoc (Anno a)) => (a -> R ()) -> [XRec GhcPs a] -> R () p_hsContext' f = \case [] -> txt "()" [x] -> located x f xs -> do shouldSort <- getPrinterOpt poSortConstraints let sort = if shouldSort then sortOn showOutputable else id parens N $ sep commaDel (sitcc . located' f) (sort xs) class IsTyVarBndrFlag flag where isInferred :: flag -> Bool p_tyVarBndrFlag :: flag -> R () p_tyVarBndrFlag _ = pure () instance IsTyVarBndrFlag () where isInferred () = False instance IsTyVarBndrFlag Specificity where isInferred = \case InferredSpec -> True SpecifiedSpec -> False instance IsTyVarBndrFlag (HsBndrVis GhcPs) where isInferred _ = False p_tyVarBndrFlag = \case HsBndrRequired NoExtField -> pure () HsBndrInvisible _ -> txt "@" p_hsTyVarBndr :: (IsTyVarBndrFlag flag) => HsTyVarBndr flag GhcPs -> R () p_hsTyVarBndr HsTvb {..} = do p_tyVarBndrFlag tvb_flag let wrap | isInferred tvb_flag = braces N | otherwise = case tvb_kind of HsBndrKind {} -> parens N HsBndrNoKind {} -> id wrap $ do case tvb_var of HsBndrVar _ x -> p_rdrName x HsBndrWildCard _ -> txt "_" case tvb_kind of HsBndrKind _ k -> inci $ startTypeAnnotation k p_hsType HsBndrNoKind _ -> pure () data ForAllVisibility = ForAllInvis | ForAllVis -- | Render several @forall@-ed variables. p_forallBndrs :: (HasLoc l) => ForAllVisibility -> (a -> R ()) -> [GenLocated l a] -> R () p_forallBndrs vis p tyvars = do p_forallBndrsStart p tyvars p_forallBndrsEnd vis p_forallBndrsStart :: (HasLoc l) => (a -> R ()) -> [GenLocated l a] -> R () p_forallBndrsStart _ [] = token'forall p_forallBndrsStart p tyvars = do switchLayout (locA <$> tyvars) $ do token'forall breakpoint inci $ do sitcc $ sep breakpoint (sitcc . located' p) tyvars p_forallBndrsEnd :: ForAllVisibility -> R () p_forallBndrsEnd ForAllInvis = txt "." >> space p_forallBndrsEnd ForAllVis = space >> token'rarrow 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 commaStyle <- getPrinterOpt poCommaStyle when (commaStyle == Trailing) $ mapM_ (p_hsDoc Pipe (With #endNewline)) cd_fld_doc sitcc $ sep commaDel (located' (p_rdrName . foLabel)) cd_fld_names getPrinterOpt poFunctionArrows >>= \case LeadingArrows -> inci $ do breakpoint token'dcolon space p_hsType (unLoc cd_fld_type) TrailingArrows -> do space token'dcolon breakpoint sitcc . inci $ p_hsType (unLoc cd_fld_type) LeadingArgsArrows -> do space token'dcolon breakpoint sitcc . inci $ p_hsType (unLoc cd_fld_type) when (commaStyle == Leading) $ mapM_ (inciByFrac (-1) . (newline >>) . p_hsDoc Caret (Without #endNewline)) cd_fld_doc p_lhsTypeArg :: LHsTypeArg GhcPs -> R () p_lhsTypeArg = \case HsValArg NoExtField 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 p_hsForAllTelescope :: Choice "multiline" -> HsForAllTelescope GhcPs -> R () p_hsForAllTelescope isMultiline tele = do vis <- case tele of HsForAllInvis _ bndrs -> do p_forallBndrsStart p_hsTyVarBndr bndrs pure ForAllInvis HsForAllVis _ bndrs -> do p_forallBndrsStart p_hsTyVarBndr bndrs pure ForAllVis getPrinterOpt poFunctionArrows >>= \case LeadingArrows | Choice.isTrue isMultiline -> do interArgBreak txt " " p_forallBndrsEnd vis _ -> do p_forallBndrsEnd vis interArgBreak where interArgBreak = if Choice.isTrue isMultiline then newline else breakpoint p_hsQualArrow :: Choice "multiline" -> R () p_hsQualArrow isMultiline = getPrinterOpt poFunctionArrows >>= \case LeadingArrows -> interArgBreak >> token'darrow >> space TrailingArrows -> space >> token'darrow >> interArgBreak LeadingArgsArrows -> space >> token'darrow >> interArgBreak where interArgBreak = if Choice.isTrue isMultiline then newline else breakpoint p_hsFun :: (HasLoc l) => Choice "multiline" -> (a -> R ()) -> HsArrowOf (GenLocated l a) GhcPs -> GenLocated l a -> R () p_hsFun isMultiline renderItem arrow rhsLoc = getPrinterOpt poFunctionArrows >>= \case LeadingArrows -> do interArgBreak located rhsLoc $ \rhs -> do renderArrow space renderItem rhs TrailingArrows -> do space renderArrow interArgBreak located rhsLoc $ \rhs -> do renderItem rhs LeadingArgsArrows -> do interArgBreak located rhsLoc $ \rhs -> do renderArrow space renderItem rhs where interArgBreak = if Choice.isTrue isMultiline then newline else breakpoint renderArrow = p_arrow (located' renderItem) arrow ---------------------------------------------------------------------------- -- Conversion functions -- 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 noAnn bndrs) ty lhsTypeToSigType :: LHsType GhcPs -> LHsSigType GhcPs lhsTypeToSigType ty = L (getLoc ty) . HsSig NoExtField (HsOuterImplicit NoExtField) $ ty fourmolu-0.18.0.0/src/Ormolu/Printer/Operators.hs0000644000000000000000000004022614745250261020007 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE PatternSynonyms #-} -- | This module helps handle operator chains composed of different -- operators that may have different precedence and fixities. module Ormolu.Printer.Operators ( OpTree (..), pattern BinaryOpBranches, OpInfo (..), opTreeLoc, reassociateOpTree, isHardSplitterOp, ) where import Data.Choice (Choice) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import GHC.Parser.Annotation 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 (NonEmpty (OpTree ty op)) [op] deriving (Eq, Show) pattern BinaryOpBranches :: OpTree ty op -> op -> OpTree ty op -> OpTree ty op pattern BinaryOpBranches x op y = OpBranches (x :| [y]) [op] -- | Wrapper for an operator, carrying information about its name and -- fixity. data OpInfo op = OpInfo { -- | The actual operator opiOp :: op, -- | Its name, if available. We use 'Maybe RdrName' here instead of -- 'RdrName' because the name-fetching function received by -- 'reassociateOpTree' returns a 'Maybe' opiName :: Maybe RdrName, -- | Information about the fixity direction and precedence level of the -- operator opiFixityApproximation :: FixityApproximation } deriving (Eq) -- | Compare the precedence level of two operators. 'OpInfo' is required -- (and not just 'FixityInfo') because operator names are used in the case -- of equality. compareOp :: OpInfo op -> OpInfo op -> Maybe Ordering compareOp (OpInfo _ mName1 FixityApproximation {faMinPrecedence = min1, faMaxPrecedence = max1}) (OpInfo _ mName2 FixityApproximation {faMinPrecedence = min2, faMaxPrecedence = max2}) = if -- Only declare two precedence levels as equal when -- * either both precedence levels are precise -- (fiMinPrecedence == fiMaxPrecedence) and match -- * or when the precedence levels are imprecise but when the -- operator names match | min1 == min2 && max1 == max2 && (min1 == max1 || sameSymbol) -> Just EQ | max1 < min2 -> Just LT | max2 < min1 -> Just GT | otherwise -> Nothing where sameSymbol = case (mName1, mName2) of (Just n1, Just n2) -> n1 == n2 _ -> False -- | Return combined 'SrcSpan's of all elements in this 'OpTree'. opTreeLoc :: (HasLoc l) => OpTree (GenLocated l a) b -> SrcSpan opTreeLoc (OpNode n) = getHasLoc n opTreeLoc (OpBranches exprs _) = combineSrcSpans' . 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 :: -- | Whether to print debug info regarding fixity inference Choice "debug" -> -- | How to get name of an operator (op -> Maybe RdrName) -> -- | Fixity Map ModuleFixityMap -> -- | Original 'OpTree' OpTree ty op -> -- | Re-associated 'OpTree', with added context and info around operators OpTree ty (OpInfo op) reassociateOpTree debug getOpName modFixityMap = reassociateFlatOpTree . makeFlatOpTree . addFixityInfo debug modFixityMap getOpName -- | Wrap every operator of the tree with 'OpInfo' to carry the information -- about its fixity (extracted from the specified fixity map). addFixityInfo :: -- | Whether to print debug info regarding fixity inference Choice "debug" -> -- | Fixity map for operators ModuleFixityMap -> -- | How to get the name of an operator (op -> Maybe RdrName) -> -- | 'OpTree' OpTree ty op -> -- | 'OpTree', with fixity info wrapped around each operator OpTree ty (OpInfo op) addFixityInfo _ _ _ (OpNode n) = OpNode n addFixityInfo debug modFixityMap getOpName (OpBranches exprs ops) = OpBranches (addFixityInfo debug modFixityMap getOpName <$> exprs) (toOpInfo <$> ops) where toOpInfo o = OpInfo o mrdrName fixityApproximation where mrdrName = getOpName o fixityApproximation = case mrdrName of Nothing -> defaultFixityApproximation Just rdrName -> inferFixity debug rdrName modFixityMap -- | Given a 'OpTree' of any shape, produce a flat 'OpTree', where every -- node and operator is directly connected to the root. makeFlatOpTree :: OpTree ty op -> OpTree ty op makeFlatOpTree (OpNode n) = OpNode n makeFlatOpTree (OpBranches exprs ops) = OpBranches rExprs rOps where makeFlatOpTree' expr = case makeFlatOpTree expr of OpNode n -> (NE.singleton (OpNode n), []) OpBranches noptExprs noptOps -> (noptExprs, noptOps) flattenedSubTrees = makeFlatOpTree' <$> exprs rExprs = fst =<< flattenedSubTrees rOps = concat $ interleave (snd <$> NE.toList flattenedSubTrees) (pure <$> ops) interleave (x : xs) (y : ys) = x : y : interleave xs ys interleave [] ys = ys interleave xs [] = xs -- | Starting from a flat 'OpTree' (i.e. a n-ary tree of depth 1, -- without regard for operator fixities), build an 'OpTree' with proper -- sub-trees (according to the fixity info carried by the nodes). -- -- We have two complementary ways to build the proper sub-trees: -- -- * if we can find a set of operators "minOps" at the current level where -- forall (op1, op2) \in minOps x minOps, op1 `equal` op2 -- forall (op1, op2) \in minOps x (opsOfCurrentLevel \ minOps), -- op1 `lessThan` op2 -- then we can build a subtree with the exprs and ops located "between" -- each element of minOps. -- For example, if minOps = {op0, op2, op5}, -- and if [...] means "extract a subtree", then -- currentLevel = -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- will become -- [ex0 op0 [ex1 op1 ex2] op2 [ex3 op3 ex4 op4 ex5] op5 [ex6 op6 ex7]] -- * if we can find a set of operators "maxOps" at the current level where -- forall (op1, op2) \in maxOps x maxOps, op1 `equal` op2 -- forall (op1, op2) \in maxOps x (opsOfCurrentLevel \ maxOps), -- op1 `greaterThan` op2 -- then we can build a subtree with every contiguous range of elements -- from maxOps (and the exprs on their sides) -- For example, if maxOps = {op0, op1, op4}, -- and if [...] means "extract a subtree", then -- currentLevel = -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- will become -- [[ex0 op0 ex1 op1 ex2] op2 ex3 op3 [ex4 op4 ex5] op5 ex6 op6 ex7] -- -- We will also recursively apply the same logic on every sub-tree built -- during the process. The two principles are not overlapping and thus are -- required, because we are comparing precedence level ranges. In the case -- where we can't find a non-empty set {min,max}Ops with one logic or the -- other, we finally try to split the tree on “hard splitters” if there is -- any. reassociateFlatOpTree :: -- | Flat 'OpTree', with fixity info wrapped around each operator OpTree ty (OpInfo op) -> -- | Re-associated 'OpTree', with fixity info wrapped around each operator OpTree ty (OpInfo op) reassociateFlatOpTree tree@(OpNode _) = tree reassociateFlatOpTree tree@(OpBranches noptExprs noptOps) = case indexOfMinMaxPrecOps noptOps of (Just minIndices, _) -> splitTree noptExprs noptOps minIndices (_, Just maxIndices) -> groupTree noptExprs noptOps maxIndices _ -> case indicesOfHardSplitter of [] -> tree indices -> splitTree noptExprs noptOps indices where indicesOfHardSplitter = fmap fst $ filter (isHardSplitterOp . opiFixityApproximation . snd) $ zip [0 ..] noptOps indexOfMinMaxPrecOps [] = (Nothing, Nothing) indexOfMinMaxPrecOps (oo : oos) = go oos 1 oo (Just [0]) oo (Just [0]) where go :: -- Remaining operators to look up [OpInfo op] -> -- Index of the next operator Int -> -- representative of the current minOps set, if there is one, -- or representative of the lowest precedence level encountered -- so far otherwise OpInfo op -> -- indices of the elements of the candidate minOps set, -- if there is any Maybe [Int] -> -- representative of the current maxOps set, if there is one, or -- representative of the highest precedence level encountered -- so far otherwise OpInfo op -> -- indices of the elements of the candidate maxOps set, -- if there is any Maybe [Int] -> -- (indices of minOps elements, indices of maxOps elements) (Maybe [Int], Maybe [Int]) go [] _ _ minRes _ maxRes = (reverse <$> minRes, reverse <$> maxRes) go (o : os) i minOpi minRes maxOpi maxRes = let (minOpi', minRes') = case compareOp o minOpi of Just EQ -> (minOpi, (:) i <$> minRes) Just LT -> (o, Just [i]) Just GT -> (minOpi, minRes) Nothing -> (combine minOpi o, Nothing) (maxOpi', maxRes') = case compareOp o maxOpi of Just EQ -> (maxOpi, (:) i <$> maxRes) Just LT -> (maxOpi, maxRes) Just GT -> (o, Just [i]) Nothing -> (combine maxOpi o, Nothing) -- Merge two potential {min/max}Ops representatives for -- which the comparison gave 'OpUnknown' into a representative -- of the {lowest/highest} precedence level encountered so far combine (OpInfo x _ fix1) (OpInfo _ _ fix2) = OpInfo x Nothing (fix1 <> fix2) in go os (i + 1) minOpi' minRes' maxOpi' maxRes' -- If indices = [0, 2, 5], transform -- [ex0 op0 ex1 op1 ex2 op2 ex3 op3 ex4 op4 ex5 op5 ex6 op6 ex7] -- into -- [ex0 op0 [ex1 op1 ex2] op2 [ex3 op3 ex4 op4 ex5] op5 [ex6 op6 ex7]] splitTree nExprs nOps indices = go (NE.toList 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 (NE.fromList subExprs) subOps in OpBranches (NE.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 (NE.toList 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' = case NE.nonEmpty subExprs of Nothing -> NE.fromList resExprs Just subExprs' -> buildFromSub subExprs' subOps :| resExprs in OpBranches (NE.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 (NE.reverse subExprs) (reverse subOps) -- | Indicate if an operator has @'InfixR' 0@ fixity. We special-case this -- class of operators because they often have, like ('$'), a specific -- “separator” use-case, and we sometimes format them differently than other -- operators. isHardSplitterOp :: FixityApproximation -> Bool isHardSplitterOp = (== FixityApproximation (Just InfixR) 0 0) fourmolu-0.18.0.0/src/Ormolu/Printer/SpanStream.hs0000644000000000000000000000262614745250261020110 0ustar0000000000000000-- | Build span stream from AST. module Ormolu.Printer.SpanStream ( SpanStream (..), mkSpanStream, ) where import Data.Data (Data) import Data.Foldable (toList) import Data.Generics (everything, ext1Q, ext2Q) import Data.List (sortOn) import Data.Maybe (maybeToList) import Data.Sequence (Seq) import Data.Sequence qualified as Seq import Data.Typeable (cast) import GHC.Parser.Annotation import GHC.Types.SrcLoc -- | A stream of 'RealSrcSpan's in ascending order. This allows us to tell -- e.g. whether there is another \"located\" element of AST between current -- element and comment we're considering for printing. newtype SpanStream = SpanStream [RealSrcSpan] deriving (Eq, Show, Data, Semigroup, Monoid) -- | Create 'SpanStream' from a data structure containing \"located\" -- elements. mkSpanStream :: (Data a) => -- | Data structure to inspect (AST) a -> SpanStream mkSpanStream a = SpanStream . sortOn realSrcSpanStart . toList $ everything mappend (const mempty `ext2Q` queryLocated `ext1Q` queryEpAnn) a where queryLocated :: (Data e0) => GenLocated e0 e1 -> Seq RealSrcSpan queryLocated (L mspn _) = maybe mempty srcSpanToRealSrcSpanSeq (cast mspn :: Maybe SrcSpan) queryEpAnn :: EpAnn ann -> Seq RealSrcSpan queryEpAnn = srcSpanToRealSrcSpanSeq . locA srcSpanToRealSrcSpanSeq = Seq.fromList . maybeToList . srcSpanToRealSrcSpan fourmolu-0.18.0.0/src/Ormolu/Processing/Common.hs0000644000000000000000000000340614745250261017751 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} -- | Common definitions for pre- and post- processing. module Ormolu.Processing.Common ( removeIndentation, reindent, linesInRegion, intSetToRegions, ) where import Data.Char (isSpace) import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.Text (Text) import Data.Text qualified as T import Ormolu.Config -- | Remove indentation from a given 'Text'. Return the input with indentation -- removed and the detected indentation level. removeIndentation :: Text -> (Text, Int) removeIndentation (T.lines -> xs) = (T.unlines (T.drop n <$> xs), n) where n = minimum (getIndent <$> xs) getIndent y = if T.all isSpace y then 0 else T.length (T.takeWhile isSpace y) -- | Add indentation to a 'Text'. reindent :: Int -> Text -> Text reindent i = T.unlines . fmap (T.replicate i " " <>) . T.lines -- | All lines in the region specified by 'RegionDeltas'. linesInRegion :: RegionDeltas -> Text -> Text linesInRegion RegionDeltas {..} (T.lines -> ls) = T.unlines middle where (_, nonPrefix) = splitAt regionPrefixLength ls middle = take (length nonPrefix - regionSuffixLength) nonPrefix -- | Convert a set of line indices into disjoint 'RegionDelta's intSetToRegions :: -- | Total number of lines Int -> IntSet -> [RegionDeltas] intSetToRegions total (IntSet.toAscList -> indices) = regionIndicesToDeltas total <$> go Nothing indices where go Nothing [] = [] go (Just (a, b)) [] = [RegionIndices (Just a) (Just b)] go Nothing (i : is) = go (Just (i, i)) is go (Just (a, b)) (i : is) | b + 1 == i = go (Just (a, i)) is | otherwise = RegionIndices (Just a) (Just b) : go (Just (i, i)) is fourmolu-0.18.0.0/src/Ormolu/Processing/Cpp.hs0000644000000000000000000000430414745250261017241 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- | Support for CPP. module Ormolu.Processing.Cpp ( cppLines, eraseCppLines, ) where import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.Maybe (isJust) import Data.Text (Text) import Data.Text qualified as T -- | State of the CPP processor. data State = -- | Outside of CPP directives Outside | -- | In a conditional expression, with a positive nesting count InConditional Int | -- | In a continuation (after @\\@), but not in a conditional expression InContinuation deriving (Eq, Show) -- | Return an 'IntSet' containing all lines which are affected by CPP. cppLines :: Text -> IntSet cppLines input = IntSet.fromAscList $ go Outside (T.lines input `zip` [1 ..]) where go _ [] = [] go state ((line, i) : ls) | any for ["define ", "include ", "undef "] = i : go contState ls | any for ["ifdef ", "ifndef ", "if "] = let state' = case state of InConditional nc -> InConditional (nc + 1) _ -> InConditional 1 in i : go state' ls | for "endif" = let state' = case state of InConditional nc | nc > 1 -> InConditional (nc - 1) _ -> Outside in i : go state' ls | otherwise = let is = case state of Outside -> [] _ -> [i] state' = case state of InContinuation -> contState _ -> state in is <> go state' ls where for directive = isJust $ do s <- T.stripStart <$> T.stripPrefix "#" line T.stripPrefix directive s contState = if "\\" `T.isSuffixOf` line && not inConditional then InContinuation else Outside where inConditional = case state of InConditional {} -> True _ -> False -- | Replace all lines affected by CPP with blank lines. eraseCppLines :: Text -> Text eraseCppLines input = T.unlines . fmap eraseCpp $ T.lines input `zip` [1 ..] where linesToErase = cppLines input eraseCpp (x, i) = if i `IntSet.member` linesToErase then "\n" else x fourmolu-0.18.0.0/src/Ormolu/Processing/Preprocess.hs0000644000000000000000000001514314745250261020647 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Preprocessing for input source code. module Ormolu.Processing.Preprocess ( preprocess, ) where import Control.Monad import Data.Array as A import Data.Bifunctor (bimap) import Data.Char (isSpace) import Data.Function ((&)) import Data.IntMap (IntMap) import Data.IntMap.Strict qualified as IntMap import Data.IntSet (IntSet) import Data.IntSet qualified as IntSet import Data.List qualified as L import Data.Maybe (isJust) import Data.Text (Text) import Data.Text qualified as T import Ormolu.Config (RegionDeltas (..)) import Ormolu.Processing.Common import Ormolu.Processing.Cpp -- | Preprocess the specified region of the input into raw snippets -- and subregions to be formatted. preprocess :: -- | Whether CPP is enabled Bool -> RegionDeltas -> Text -> [Either Text RegionDeltas] preprocess cppEnabled region rawInput = rawSnippetsAndRegionsToFormat where (linesNotToFormat', replacementLines) = linesNotToFormat cppEnabled region rawInput regionsToFormat = intSetToRegions rawLineLength $ IntSet.fromAscList [1 .. rawLineLength] IntSet.\\ linesNotToFormat' regionsNotToFormat = intSetToRegions rawLineLength linesNotToFormat' -- We want to interleave the regionsToFormat and regionsNotToFormat. -- If the first non-formattable region starts at the first line, it is -- the first interleaved region, otherwise, we start with the first -- region to format. interleave' = case regionsNotToFormat of r : _ | regionPrefixLength r == 0 -> interleave _ -> flip interleave rawSnippets = flip linesInRegion updatedInput <$> regionsNotToFormat where updatedInput = T.unlines . fmap updateLine . zip [1 ..] . T.lines $ rawInput updateLine (i, line) = IntMap.findWithDefault line i replacementLines rawSnippetsAndRegionsToFormat = interleave' (Left <$> rawSnippets) (Right <$> regionsToFormat) >>= patchSeparatingBlankLines & dropWhile isBlankRawSnippet & L.dropWhileEnd isBlankRawSnippet -- For every formattable region, we want to ensure that it is separated by -- a blank line from preceding/succeeding raw snippets if it starts/ends -- with a blank line. -- Empty formattable regions are replaced by a blank line instead. -- Extraneous raw snippets at the start/end are dropped afterwards. patchSeparatingBlankLines = \case Right r@RegionDeltas {..} -> if T.all isSpace (linesInRegion r rawInput) then [blankRawSnippet] else [blankRawSnippet | isBlankLine regionPrefixLength] <> [Right r] <> [blankRawSnippet | isBlankLine (rawLineLength - regionSuffixLength - 1)] Left r -> [Left r] where blankRawSnippet = Left "\n" isBlankLine i = isJust . mfilter (T.all isSpace) $ rawLines !!? i isBlankRawSnippet = \case Left r | T.all isSpace r -> True _ -> False rawLines = A.listArray (0, length rawLines' - 1) rawLines' where rawLines' = T.lines rawInput rawLineLength = length rawLines interleave [] bs = bs interleave (a : as) bs = a : interleave bs as xs !!? i = if A.bounds xs `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 marker <- disablingMagicComment line, state == OrmoluEnabled = ([i], [(i, marker)]) : go OrmoluDisabled ls | Just marker <- enablingMagicComment line, state == OrmoluDisabled = ([i], [(i, marker)]) : 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`) -- | If the given string is an enabling marker (Ormolu or Fourmolu style), then -- return 'Just' the enabling marker + rest of the string. Otherwise return 'Nothing'. enablingMagicComment :: Text -> Maybe Text enablingMagicComment s | Just rest <- isMagicComment "ORMOLU_ENABLE" s = Just $ "{- ORMOLU_ENABLE -}" <> rest | Just rest <- isMagicComment "FOURMOLU_ENABLE" s = Just $ "{- FOURMOLU_ENABLE -}" <> rest | otherwise = Nothing -- | If the given string is a disabling marker (Ormolu or Fourmolu style), then -- return 'Just' the disabling marker + rest of the string. Otherwise return 'Nothing'. disablingMagicComment :: Text -> Maybe Text disablingMagicComment s | Just rest <- isMagicComment "ORMOLU_DISABLE" s = Just $ "{- ORMOLU_DISABLE -}" <> rest | Just rest <- isMagicComment "FOURMOLU_DISABLE" s = Just $ "{- FOURMOLU_DISABLE -}" <> rest | otherwise = Nothing -- | 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 fourmolu-0.18.0.0/src/Ormolu/Terminal.hs0000644000000000000000000000621114745250261016155 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | An abstraction for colorful output in terminal. module Ormolu.Terminal ( -- * The 'Term' abstraction Term, ColorMode (..), runTerm, runTermPure, -- * Styling bold, cyan, green, red, -- * Printing put, putShow, putOutputable, newline, ) where import Control.Applicative (Const (..)) import Control.Monad (forM_) import Data.Foldable (toList) import Data.Sequence (Seq) import Data.Sequence qualified as Seq import Data.Text (Text) import Data.Text qualified as T import Data.Text.IO.Utf8 qualified as T.Utf8 import GHC.Utils.Outputable (Outputable) import Ormolu.Utils (showOutputable) import System.Console.ANSI import System.IO (Handle, hFlush) ---------------------------------------------------------------------------- -- The 'Term' abstraction type Term = TermOutput () newtype TermOutput a = TermOutput (Const (Seq TermOutputNode) a) deriving (Semigroup, Monoid, Functor, Applicative) data TermOutputNode = OutputText Text | WithColor Color Term | WithBold Term singleTerm :: TermOutputNode -> Term singleTerm = TermOutput . Const . Seq.singleton -- | Whether to use colors and other features of ANSI terminals. data ColorMode = Never | Always | Auto deriving (Eq, Show, Enum, Bounded) -- | Run 'Term' monad. runTerm :: Term -> -- | Color mode ColorMode -> -- | Handle to print to Handle -> IO () runTerm term0 colorMode handle = do useSGR <- case colorMode of Never -> return False Always -> return True Auto -> hSupportsANSI handle runTerm' useSGR term0 hFlush handle where runTerm' useSGR = go where go (TermOutput (Const nodes)) = forM_ nodes $ \case OutputText s -> T.Utf8.hPutStr handle s WithColor color term -> withSGR [SetColor Foreground Dull color] (go term) WithBold term -> withSGR [SetConsoleIntensity BoldIntensity] (go term) withSGR sgrs m | useSGR = hSetSGR handle sgrs >> m >> hSetSGR handle [Reset] | otherwise = m runTermPure :: Term -> Text runTermPure (TermOutput (Const nodes)) = T.concat . toList . flip fmap nodes $ \case OutputText s -> s WithColor _ term -> runTermPure term WithBold term -> runTermPure term ---------------------------------------------------------------------------- -- Styling -- | Make the output bold text. bold :: Term -> Term bold = singleTerm . WithBold -- | Make the output cyan text. cyan :: Term -> Term cyan = singleTerm . WithColor Cyan -- | Make the output green text. green :: Term -> Term green = singleTerm . WithColor Green -- | Make the output red text. red :: Term -> Term red = singleTerm . WithColor Red ---------------------------------------------------------------------------- -- Printing -- | Output 'Text'. put :: Text -> Term put = singleTerm . OutputText -- | Output a 'Show' value. putShow :: (Show a) => a -> Term putShow = put . T.pack . show -- | Output an 'Outputable' value. putOutputable :: (Outputable a) => a -> Term putOutputable = put . T.pack . showOutputable -- | Output a newline. newline :: Term newline = put "\n" fourmolu-0.18.0.0/src/Ormolu/Terminal/QualifiedDo.hs0000644000000000000000000000021714745250261020343 0ustar0000000000000000module Ormolu.Terminal.QualifiedDo ((>>)) where import Ormolu.Terminal import Prelude hiding ((>>)) (>>) :: Term -> Term -> Term (>>) = (<>) fourmolu-0.18.0.0/src/Ormolu/Utils.hs0000644000000000000000000001360614745250261015510 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} -- | Random utilities used by the code. module Ormolu.Utils ( RelativePos (..), attachRelativePos, combineSrcSpans', notImplemented, showOutputable, splitDocString, incSpanLine, separatedByBlank, separatedByBlankNE, onTheSameLine, groupBy', textToStringBuffer, ghcModuleNameToCabal, ) where import Data.List (dropWhileEnd) import Data.List.NonEmpty (NonEmpty (..)) import Data.List.NonEmpty qualified as NE import Data.Maybe (fromMaybe) import Data.Text (Text) import Data.Text qualified as T import Data.Text.Foreign qualified as TFFI import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Foreign (pokeElemOff, withForeignPtr) import GHC.Data.Strict qualified as Strict import GHC.Data.StringBuffer (StringBuffer (..)) import GHC.Driver.Ppr import GHC.DynFlags (baseDynFlags) import GHC.ForeignPtr (mallocPlainForeignPtrBytes) import GHC.Hs hiding (ModuleName) import GHC.IO.Unsafe (unsafePerformIO) import GHC.Types.SrcLoc import GHC.Utils.Outputable (Outputable (..)) import Language.Haskell.Syntax.Module.Name qualified as GHC -- | Relative positions in a list. data RelativePos = SinglePos | FirstPos | MiddlePos | LastPos deriving (Eq, Show) -- | Attach 'RelativePos'es to elements of a given list. attachRelativePos :: [a] -> [(RelativePos, a)] attachRelativePos = \case [] -> [] [x] -> [(SinglePos, x)] (x : xs) -> (FirstPos, x) : markLast xs where markLast [] = [] markLast [x] = [(LastPos, x)] markLast (x : xs) = (MiddlePos, x) : markLast xs -- | Combine all source spans from the given list. combineSrcSpans' :: NonEmpty SrcSpan -> SrcSpan combineSrcSpans' (x :| xs) = foldr combineSrcSpans x xs -- | Placeholder for things that are not yet implemented. notImplemented :: String -> a notImplemented msg = error $ "not implemented yet: " ++ msg -- | Pretty-print an 'GHC.Outputable' thing. showOutputable :: (Outputable o) => o -> String showOutputable = showSDoc baseDynFlags . ppr -- | Split and normalize a doc string. The result is a list of lines that -- make up the comment. splitDocString :: Bool -> HsDocString -> [Text] splitDocString shouldEscapeCommentBraces docStr = case r of [] -> [""] _ -> r where r = fmap (escapeLeadingDollar . escapeCommentBraces) . 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' = case docStr of -- comments using '--' MultiLineDocString {} -> dropPaddingSpace -- comments using '{-' NestedDocString {} -> \case x : xs | Just (' ', x') <- T.uncons x -> x' : xs xs -> xs -- don't care about generated GeneratedDocString {} -> id 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 escapeCommentBraces = if shouldEscapeCommentBraces then T.replace "{-" "{\\-" . T.replace "-}" "-\\}" else id -- | 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)) -- | A generalisation of 'groupBy' to functions which aren't equivalences - a group ends -- when comparison fails with the previous element, rather than the first of the group. groupBy' :: (a -> a -> Bool) -> [a] -> [NonEmpty a] groupBy' eq = flip foldr [] $ \x -> \case [] -> [pure x] (y :| ys) : zs -> if x `eq` y then (x :| y : ys) : zs else pure x : (y :| ys) : zs -- | Convert 'Text' to a 'StringBuffer' by making a copy. textToStringBuffer :: Text -> StringBuffer textToStringBuffer txt = unsafePerformIO $ do buf <- mallocPlainForeignPtrBytes (len + 3) withForeignPtr buf $ \ptr -> do TFFI.unsafeCopyToPtr txt ptr -- last three bytes have to be zero for easier decoding pokeElemOff ptr len 0 pokeElemOff ptr (len + 1) 0 pokeElemOff ptr (len + 2) 0 pure StringBuffer {buf, len, cur = 0} where len = TFFI.lengthWord8 txt -- | Convert GHC's 'ModuleName' into the one used by Cabal. ghcModuleNameToCabal :: GHC.ModuleName -> ModuleName ghcModuleNameToCabal = ModuleName.fromString . GHC.moduleNameString fourmolu-0.18.0.0/src/Ormolu/Utils/Cabal.hs0000644000000000000000000002211214745250261016502 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Utils.Cabal ( CabalSearchResult (..), CabalInfo (..), Extension (..), getCabalInfoForSourceFile, findCabalFile, parseCabalInfo, ) where import Control.Exception import Control.Monad.IO.Class import Data.ByteString qualified as B import Data.Map.Lazy (Map) import Data.Map.Lazy qualified as M import Data.Maybe (maybeToList) import Data.Set (Set) import Data.Set qualified as Set import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.PackageDescription import Distribution.PackageDescription.Parsec import Distribution.Types.CondTree qualified as CT import Distribution.Utils.Path (getSymbolicPath) import Language.Haskell.Extension import Ormolu.Config import Ormolu.Exception import Ormolu.Fixity import Ormolu.Utils.IO (Cache, findClosestFileSatisfying, newCache, withCache) import System.Directory import System.FilePath import System.IO.Unsafe (unsafePerformIO) -- | The result of searching for a @.cabal@ file. -- -- @since 0.5.3.0 data CabalSearchResult = -- | Cabal file could not be found CabalNotFound | -- | Cabal file was found, but it did not mention the source file in -- question CabalDidNotMention CabalInfo | -- | Cabal file was found and it mentions the source file in question CabalFound CabalInfo deriving (Eq, Show) -- | Cabal information of interest to Ormolu. data CabalInfo = CabalInfo { -- | Package name ciPackageName :: !PackageName, -- | Extension and language settings in the form of 'DynOption's ciDynOpts :: ![DynOption], -- | Direct dependencies ciDependencies :: !(Set PackageName), -- | Absolute path to the cabal file ciCabalFilePath :: !FilePath, -- | Local modules ciModules :: ![ModuleName] } deriving (Eq, Show) -- | Locate a @.cabal@ file corresponding to the given Haskell source file -- and obtain 'CabalInfo' from it. getCabalInfoForSourceFile :: (MonadIO m) => -- | Haskell source file FilePath -> -- | Extracted cabal info, if any m CabalSearchResult getCabalInfoForSourceFile sourceFile = liftIO (findCabalFile sourceFile) >>= \case Just cabalFile -> do (mentioned, cabalInfo) <- parseCabalInfo cabalFile sourceFile return ( if mentioned then CabalFound cabalInfo else CabalDidNotMention cabalInfo ) Nothing -> return CabalNotFound -- | Find the path to an appropriate @.cabal@ file for a Haskell source -- file, if available. findCabalFile :: (MonadIO m) => -- | Path to a Haskell source file in a project with a @.cabal@ file FilePath -> -- | Absolute path to the @.cabal@ file, if available m (Maybe FilePath) findCabalFile = findClosestFileSatisfying $ \x -> takeExtension x == ".cabal" -- | Parsed cabal file information to be shared across multiple source files. data CachedCabalFile = CachedCabalFile { -- | Parsed generic package description. genericPackageDescription :: GenericPackageDescription, -- | Map from Haskell source file paths (without any extensions) to the -- corresponding 'DynOption's and dependencies. extensionsAndDeps :: Map FilePath ([DynOption], [PackageName]), -- | Modules defined in the cabal file localModules :: [ModuleName] } deriving (Show) -- | Cache ref that stores 'CachedCabalFile' per Cabal file. cacheRef :: Cache FilePath CachedCabalFile cacheRef = unsafePerformIO newCache {-# NOINLINE cacheRef #-} -- | Parse 'CabalInfo' from a @.cabal@ file at the given 'FilePath'. parseCabalInfo :: (MonadIO m) => -- | Location of the .cabal file FilePath -> -- | Location of the source file we are formatting FilePath -> -- | Indication if the source file was mentioned in the Cabal file and the -- extracted 'CabalInfo' m (Bool, CabalInfo) parseCabalInfo cabalFileAsGiven sourceFileAsGiven = liftIO $ do cabalFile <- makeAbsolute cabalFileAsGiven sourceFileAbs <- makeAbsolute sourceFileAsGiven CachedCabalFile {..} <- withCache cacheRef cabalFile $ do cabalFileBs <- B.readFile cabalFile genericPackageDescription <- whenLeft (snd . runParseResult $ parseGenericPackageDescription cabalFileBs) $ throwIO . OrmoluCabalFileParsingFailed cabalFile . snd let extensionsAndDeps = getExtensionAndDepsMap cabalFile genericPackageDescription localModules = getLocalModules genericPackageDescription pure CachedCabalFile {..} let (dynOpts, dependencies, mentioned) = case M.lookup (dropExtensions sourceFileAbs) extensionsAndDeps of Nothing -> ([], Set.toList defaultDependencies, False) Just (dynOpts', dependencies') -> (dynOpts', dependencies', True) pdesc = packageDescription genericPackageDescription return ( mentioned, CabalInfo { ciPackageName = pkgName (package pdesc), ciDynOpts = dynOpts, ciDependencies = Set.fromList dependencies, ciCabalFilePath = cabalFile, ciModules = localModules } ) where whenLeft :: (Applicative f) => Either e a -> (e -> f a) -> f a whenLeft eitha ma = either ma pure eitha getLocalModules :: GenericPackageDescription -> [ModuleName] getLocalModules = extractPackageModules where extractPackageModules :: GenericPackageDescription -> [ModuleName] extractPackageModules GenericPackageDescription {..} = mconcat [ maybe [] (extractLibraryModules . condTreeData) condLibrary, extractLibraryModules . condTreeData . snd =<< condSubLibraries, extractForeignLibraryModules . condTreeData . snd =<< condForeignLibs, extractExecutableModules . condTreeData . snd =<< condExecutables, extractTestSuiteModules . condTreeData . snd =<< condTestSuites, extractBenchmarkModules . condTreeData . snd =<< condBenchmarks ] extractLibraryModules :: Library -> [ModuleName] extractLibraryModules Library {..} = mconcat [exposedModules, extractBuildInfoModules libBuildInfo] extractForeignLibraryModules :: ForeignLib -> [ModuleName] extractForeignLibraryModules = extractBuildInfoModules . foreignLibBuildInfo extractExecutableModules :: Executable -> [ModuleName] extractExecutableModules = extractBuildInfoModules . buildInfo extractTestSuiteModules :: TestSuite -> [ModuleName] extractTestSuiteModules = extractBuildInfoModules . testBuildInfo extractBenchmarkModules :: Benchmark -> [ModuleName] extractBenchmarkModules = extractBuildInfoModules . benchmarkBuildInfo extractBuildInfoModules :: BuildInfo -> [ModuleName] extractBuildInfoModules BuildInfo {..} = mconcat [otherModules, virtualModules, autogenModules] -- | 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 [getSymbolicPath modulePath] buildInfo extractFromTestSuite TestSuite {..} = extractFromBuildInfo mainPath testBuildInfo where mainPath = case testInterface of TestSuiteExeV10 _ p -> [getSymbolicPath p] TestSuiteLibV09 _ p -> [ModuleName.toFilePath p] TestSuiteUnsupported {} -> [] extractFromBenchmark Benchmark {..} = extractFromBuildInfo mainPath benchmarkBuildInfo where mainPath = case benchmarkInterface of BenchmarkExeV10 _ p -> [getSymbolicPath p] BenchmarkUnsupported {} -> [] fourmolu-0.18.0.0/src/Ormolu/Utils/Fixity.hs0000644000000000000000000000547314745250261016767 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Ormolu.Utils.Fixity ( getDotOrmoluForSourceFile, parseFixityDeclarationStr, parseModuleReexportDeclarationStr, ) where import Control.Exception (throwIO) import Control.Monad.IO.Class import Data.Bifunctor (first) import Data.List.NonEmpty (NonEmpty) import Data.Text qualified as T import Data.Text.IO.Utf8 qualified as T.Utf8 import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import Ormolu.Exception import Ormolu.Fixity import Ormolu.Fixity.Parser import Ormolu.Utils.IO (Cache, findClosestFileSatisfying, newCache, withCache) import System.Directory import System.IO.Unsafe (unsafePerformIO) import Text.Megaparsec (errorBundlePretty) -- | Attempt to locate and parse an @.ormolu@ file. If it does not exist, -- default fixity map and module reexports are returned. This function -- maintains a cache of fixity overrides and module re-exports where cabal -- file paths act as keys. getDotOrmoluForSourceFile :: (MonadIO m) => -- | 'CabalInfo' already obtained for this source file FilePath -> m (FixityOverrides, ModuleReexports) getDotOrmoluForSourceFile sourceFile = liftIO (findDotOrmoluFile sourceFile) >>= \case Just dotOrmoluFile -> liftIO $ withCache cacheRef dotOrmoluFile $ do dotOrmoluRelative <- makeRelativeToCurrentDirectory dotOrmoluFile contents <- T.Utf8.readFile dotOrmoluFile case parseDotOrmolu dotOrmoluRelative contents of Left errorBundle -> throwIO (OrmoluFixityOverridesParseError errorBundle) Right x -> return x Nothing -> return (defaultFixityOverrides, defaultModuleReexports) -- | Find the path to an appropriate @.ormolu@ file for a Haskell source -- file, if available. findDotOrmoluFile :: (MonadIO m) => -- | Path to a Haskell source file FilePath -> -- | Absolute path to the closest @.ormolu@ file, if available m (Maybe FilePath) findDotOrmoluFile = findClosestFileSatisfying $ \x -> x == ".ormolu" -- | Cache ref that maps names of @.ormolu@ files to their contents. cacheRef :: Cache FilePath (FixityOverrides, ModuleReexports) cacheRef = unsafePerformIO newCache {-# NOINLINE cacheRef #-} -- | A wrapper around 'parseFixityDeclaration' for parsing individual fixity -- definitions. parseFixityDeclarationStr :: -- | Input to parse String -> -- | Parse result Either String [(OpName, FixityInfo)] parseFixityDeclarationStr = first errorBundlePretty . parseFixityDeclaration . T.pack -- | A wrapper around 'parseModuleReexportDeclaration' for parsing -- a individual module reexport. parseModuleReexportDeclarationStr :: -- | Input to parse String -> -- | Parse result Either String (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) parseModuleReexportDeclarationStr = first errorBundlePretty . parseModuleReexportDeclaration . T.pack fourmolu-0.18.0.0/src/Ormolu/Utils/IO.hs0000644000000000000000000000411114745250261016006 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} module Ormolu.Utils.IO ( findClosestFileSatisfying, Cache, newCache, withCache, ) where import Control.Exception (catch, throwIO) import Control.Monad (void) import Control.Monad.IO.Class import Data.IORef import Data.Map.Lazy (Map) import Data.Map.Lazy qualified as M import System.Directory import System.FilePath import System.IO.Error (isDoesNotExistError) -- | Find the path to the closest file higher in the file hierarchy that -- satisfies a given predicate. findClosestFileSatisfying :: (MonadIO m) => -- | The predicate that determines what we are looking for (FilePath -> Bool) -> -- | Path to the starting point for the search FilePath -> -- | Absolute path to the found file if available m (Maybe FilePath) findClosestFileSatisfying isRightFile rootOfSearch = liftIO $ do parentDir <- takeDirectory <$> makeAbsolute rootOfSearch dirEntries <- listDirectory parentDir `catch` \case (isDoesNotExistError -> True) -> pure [] e -> throwIO e let searchAtParentDirLevel = \case [] -> pure Nothing x : xs -> if isRightFile x then doesFileExist (parentDir x) >>= \case True -> pure (Just x) False -> searchAtParentDirLevel xs else searchAtParentDirLevel xs searchAtParentDirLevel dirEntries >>= \case Just foundFile -> pure . Just $ parentDir foundFile Nothing -> if isDrive parentDir then pure Nothing else findClosestFileSatisfying isRightFile parentDir newtype Cache k v = Cache (IORef (Map k v)) newCache :: (Ord k) => IO (Cache k v) newCache = do var <- newIORef mempty pure (Cache var) -- | Execute an 'IO' action but only if the given key is not found in the -- cache. withCache :: (Ord k) => Cache k v -> k -> IO v -> IO v withCache (Cache cacheVar) k action = do cache <- readIORef cacheVar case M.lookup k cache of Just v -> pure v Nothing -> do v <- action void $ atomicModifyIORef cacheVar (pure . M.insert k v) pure v fourmolu-0.18.0.0/src/Ormolu/Imports/Grouping.hs0000644000000000000000000001310114745250261017625 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Imports.Grouping ( Import (..), prepareExistingGroups, groupImports, ) where import Data.Bifunctor (Bifunctor (..)) import Data.Foldable (toList) import Data.Function (on) import Data.List (groupBy, minimumBy, sortOn) import Data.List.NonEmpty (NonEmpty) import Data.List.NonEmpty qualified as NonEmpty import Data.Set (Set) import Data.Set qualified as Set import Distribution.ModuleName qualified as Cabal import GHC.Hs (GhcPs, getLocA) import Language.Haskell.Syntax (LImportDecl, ModuleName, moduleNameString) import Ormolu.Config (ImportGroup (..), ImportGroupRule (..), ImportGrouping (..), ImportModuleMatcher (..)) import Ormolu.Config qualified as Config import Ormolu.Utils (ghcModuleNameToCabal, groupBy', separatedByBlank) import Ormolu.Utils.Glob (matchesGlob) newtype ImportGroups = ImportGroups (NonEmpty ImportGroup) data Import = Import { importName :: ModuleName, importQualified :: Bool } importGroupSingleStrategy :: ImportGroups importGroupSingleStrategy = ImportGroups $ pure ImportGroup { igName = Nothing, igRules = pure matchAllImportRule } importGroupByQualifiedStrategy :: ImportGroups importGroupByQualifiedStrategy = ImportGroups $ NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = pure $ withUnqualifiedOnly matchAllImportRule }, ImportGroup { igName = Nothing, igRules = pure $ withQualifiedOnly matchAllImportRule } ] importGroupByScopeStrategy :: ImportGroups importGroupByScopeStrategy = ImportGroups $ NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = pure matchAllImportRule }, ImportGroup { igName = Nothing, igRules = pure matchLocalModulesRule } ] importGroupByScopeThenQualifiedStrategy :: ImportGroups importGroupByScopeThenQualifiedStrategy = ImportGroups $ NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = pure $ withQualified matchModule } | matchModule <- [matchAllImportRule, matchLocalModulesRule], withQualified <- [withUnqualifiedOnly, withQualifiedOnly] ] groupsFromConfig :: Config.ImportGrouping -> ImportGroups groupsFromConfig = \case Config.ImportGroupLegacy -> importGroupSingleStrategy Config.ImportGroupPreserve -> importGroupSingleStrategy Config.ImportGroupSingle -> importGroupSingleStrategy Config.ImportGroupByQualified -> importGroupByQualifiedStrategy Config.ImportGroupByScope -> importGroupByScopeStrategy Config.ImportGroupByScopeThenQualified -> importGroupByScopeThenQualifiedStrategy Config.ImportGroupCustom igs -> ImportGroups igs matchAllImportRule :: ImportGroupRule matchAllImportRule = ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = Config.MatchBothQualifiedAndUnqualified, igrPriority = Config.matchAllRulePriority } matchLocalModulesRule :: ImportGroupRule matchLocalModulesRule = ImportGroupRule { igrModuleMatcher = MatchLocalModules, igrQualifiedMatcher = Config.MatchBothQualifiedAndUnqualified, igrPriority = Config.matchLocalRulePriority } withQualifiedOnly :: ImportGroupRule -> ImportGroupRule withQualifiedOnly ImportGroupRule {..} = ImportGroupRule { igrQualifiedMatcher = Config.MatchQualifiedOnly, .. } withUnqualifiedOnly :: ImportGroupRule -> ImportGroupRule withUnqualifiedOnly ImportGroupRule {..} = ImportGroupRule { igrQualifiedMatcher = Config.MatchUnqualifiedOnly, .. } matchesRule :: Set Cabal.ModuleName -> Import -> ImportGroupRule -> Bool matchesRule localMods Import {..} ImportGroupRule {..} = matchesModules && matchesQualified where matchesModules = case igrModuleMatcher of MatchAllModules -> True MatchLocalModules -> ghcModuleNameToCabal importName `Set.member` localMods MatchGlob gl -> moduleNameString importName `matchesGlob` gl matchesQualified = case igrQualifiedMatcher of Config.MatchQualifiedOnly -> importQualified Config.MatchUnqualifiedOnly -> not importQualified Config.MatchBothQualifiedAndUnqualified -> True prepareExistingGroups :: ImportGrouping -> Bool -> [LImportDecl GhcPs] -> [[LImportDecl GhcPs]] prepareExistingGroups ig respectful = case ig of ImportGroupPreserve -> preserveGroups ImportGroupLegacy | respectful -> preserveGroups _ -> flattenGroups where preserveGroups = map toList . groupBy' (\x y -> not $ separatedByBlank getLocA x y) flattenGroups = pure groupImports :: forall x. ImportGrouping -> Set Cabal.ModuleName -> (x -> Import) -> [x] -> [[x]] groupImports ig localModules fToImport = regroup . fmap (breakTies . matchRules) where ImportGroups igs = groupsFromConfig ig indexedGroupRules :: [(Int, [ImportGroupRule])] indexedGroupRules = zip [0 ..] (toList . igRules <$> toList igs) matchRules :: x -> ([(Int, [ImportGroupRule])], x) matchRules x = let imp = fToImport x testRule (_, rules) = any (matchesRule localModules imp) rules in (filter testRule indexedGroupRules, x) breakTies :: ([(Int, [ImportGroupRule])], x) -> (Int, x) breakTies ([], x) = (maxBound, x) -- Any non-matched imports will be in the last group breakTies (matches, x) = (fst . minimumBy (compare `on` snd) $ second (minimum . fmap igrPriority) <$> matches, x) regroup :: [(Int, x)] -> [[x]] regroup = fmap (fmap snd) . groupBy ((==) `on` fst) . sortOn fst fourmolu-0.18.0.0/src/Ormolu/Utils/Glob.hs0000644000000000000000000000227714745250261016375 0ustar0000000000000000module Ormolu.Utils.Glob ( Glob, mkGlob, matchesGlob, ) where import Data.List (elemIndex, stripPrefix) import Data.Maybe (fromMaybe) newtype Glob = Glob [GlobPart] deriving (Eq, Show) data GlobPart = MatchExactly !String | SingleWildcard | DoubleWildcard deriving (Eq, Show) mkGlob :: String -> Glob mkGlob = Glob . parsePart where parsePart :: String -> [GlobPart] parsePart s = case s of [] -> [] '*' : '*' : t -> DoubleWildcard : parsePart t '*' : t -> SingleWildcard : parsePart t t -> let (m, t') = break (== '*') t in MatchExactly m : parsePart t' matchesGlob :: String -> Glob -> Bool matchesGlob s (Glob ps) = s `matchesGlobParts` ps matchesGlobParts :: String -> [GlobPart] -> Bool matchesGlobParts s g = case g of [] -> null s MatchExactly p : g' -> case stripPrefix p s of Nothing -> False Just s' -> s' `matchesGlobParts` g' SingleWildcard : g' -> let l = fromMaybe (length s) (elemIndex '.' s) in or [s' `matchesGlobParts` g' | i <- [0 .. l], let s' = drop i s] DoubleWildcard : g' -> or [s' `matchesGlobParts` g' | i <- [0 .. length s], let s' = drop i s] fourmolu-0.18.0.0/src/GHC/DynFlags.hs0000644000000000000000000000300614745250261015234 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 { -- see https://github.com/tweag/ormolu/issues/1087 archOS_arch = ArchJavaScript, archOS_OS = OSUnknown }, platformWordSize = PW8, platformUnregisterised = True, platformByteOrder = LittleEndian, platformHasGnuNonexecStack = False, platformHasIdentDirective = False, platformHasSubsectionsViaSymbols = False, platformIsCrossCompiling = False, platformLeadingUnderscore = False, platformTablesNextToCode = False, platformHasLibm = False, platform_constants = Nothing }, sPlatformMisc = PlatformMisc {}, sToolSettings = ToolSettings { toolSettings_opt_P_fingerprint = fingerprint0, toolSettings_pgm_F = "" } } baseDynFlags :: DynFlags baseDynFlags = defaultDynFlags fakeSettings fourmolu-0.18.0.0/src/Ormolu/Config/Gen.hs0000644000000000000000000005572514745250261016336 0ustar0000000000000000{- FOURMOLU_DISABLE -} {- ***** DO NOT EDIT: This module is autogenerated ***** -} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Ormolu.Config.Gen ( PrinterOpts (..) , CommaStyle (..) , FunctionArrowsStyle (..) , HaddockPrintStyle (..) , HaddockPrintStyleModule (..) , ImportExportStyle (..) , LetStyle (..) , InStyle (..) , Unicode (..) , SingleConstraintParens (..) , ColumnLimit (..) , SingleDerivingParens (..) , ImportGrouping (..) , emptyPrinterOpts , defaultPrinterOpts , defaultPrinterOptsYaml , fillMissingPrinterOpts , parsePrinterOptsCLI , parsePrinterOptsJSON , parsePrinterOptType ) where import qualified Data.Aeson as Aeson import qualified Data.Aeson.Types as Aeson import Data.Functor.Identity (Identity) import Data.List.NonEmpty (NonEmpty) import Data.Scientific (floatingOrInteger) import qualified Data.Text as Text import GHC.Generics (Generic) import qualified Ormolu.Config.Types as CT import Text.Read (readEither, readMaybe) -- | Options controlling formatting output. data PrinterOpts f = PrinterOpts { -- | Number of spaces per indentation step poIndentation :: f Int , -- | Max line length for automatic line breaking poColumnLimit :: f ColumnLimit , -- | Styling of arrows in type signatures poFunctionArrows :: f FunctionArrowsStyle , -- | How to place commas in multi-line lists, records, etc. poCommaStyle :: f CommaStyle , -- | Styling of import/export lists poImportExportStyle :: f ImportExportStyle , -- | Rules for grouping import declarations poImportGrouping :: f ImportGrouping , -- | Whether to full-indent or half-indent 'where' bindings past the preceding body poIndentWheres :: f Bool , -- | Whether to leave a space before an opening record brace poRecordBraceSpace :: f Bool , -- | Number of spaces between top-level declarations poNewlinesBetweenDecls :: f Int , -- | How to print Haddock comments poHaddockStyle :: f HaddockPrintStyle , -- | How to print module docstring poHaddockStyleModule :: f HaddockPrintStyleModule , -- | Styling of let blocks poLetStyle :: f LetStyle , -- | How to align the 'in' keyword with respect to the 'let' keyword poInStyle :: f InStyle , -- | Whether to put parentheses around a single constraint poSingleConstraintParens :: f SingleConstraintParens , -- | Whether to put parentheses around a single deriving class poSingleDerivingParens :: f SingleDerivingParens , -- | Whether to sort constraints poSortConstraints :: f Bool , -- | Whether to sort derived classes poSortDerivedClasses :: f Bool , -- | Whether to sort deriving clauses poSortDerivingClauses :: f Bool , -- | Whether to place section operators (those that are infixr 0, such as $) in trailing position, continuing the expression indented below poTrailingSectionOperators :: f Bool , -- | Output Unicode syntax poUnicode :: f Unicode , -- | Give the programmer more choice on where to insert blank lines poRespectful :: f Bool } deriving (Generic) emptyPrinterOpts :: PrinterOpts Maybe emptyPrinterOpts = PrinterOpts { poIndentation = Nothing , poColumnLimit = Nothing , poFunctionArrows = Nothing , poCommaStyle = Nothing , poImportExportStyle = Nothing , poImportGrouping = Nothing , poIndentWheres = Nothing , poRecordBraceSpace = Nothing , poNewlinesBetweenDecls = Nothing , poHaddockStyle = Nothing , poHaddockStyleModule = Nothing , poLetStyle = Nothing , poInStyle = Nothing , poSingleConstraintParens = Nothing , poSingleDerivingParens = Nothing , poSortConstraints = Nothing , poSortDerivedClasses = Nothing , poSortDerivingClauses = Nothing , poTrailingSectionOperators = Nothing , poUnicode = Nothing , poRespectful = Nothing } defaultPrinterOpts :: PrinterOpts Identity defaultPrinterOpts = PrinterOpts { poIndentation = pure 4 , poColumnLimit = pure NoLimit , poFunctionArrows = pure TrailingArrows , poCommaStyle = pure Leading , poImportExportStyle = pure ImportExportDiffFriendly , poImportGrouping = pure ImportGroupLegacy , poIndentWheres = pure False , poRecordBraceSpace = pure False , poNewlinesBetweenDecls = pure 1 , poHaddockStyle = pure HaddockMultiLine , poHaddockStyleModule = pure PrintStyleInherit , poLetStyle = pure LetAuto , poInStyle = pure InRightAlign , poSingleConstraintParens = pure ConstraintAlways , poSingleDerivingParens = pure DerivingAlways , poSortConstraints = pure False , poSortDerivedClasses = pure False , poSortDerivingClauses = pure False , poTrailingSectionOperators = pure True , poUnicode = pure UnicodeNever , poRespectful = pure True } -- | Fill the field values that are 'Nothing' in the first argument -- with the values of the corresponding fields of the second argument. fillMissingPrinterOpts :: forall f. Applicative f => PrinterOpts Maybe -> PrinterOpts f -> PrinterOpts f fillMissingPrinterOpts p1 p2 = PrinterOpts { poIndentation = maybe (poIndentation p2) pure (poIndentation p1) , poColumnLimit = maybe (poColumnLimit p2) pure (poColumnLimit p1) , poFunctionArrows = maybe (poFunctionArrows p2) pure (poFunctionArrows p1) , poCommaStyle = maybe (poCommaStyle p2) pure (poCommaStyle p1) , poImportExportStyle = maybe (poImportExportStyle p2) pure (poImportExportStyle p1) , poImportGrouping = maybe (poImportGrouping p2) pure (poImportGrouping p1) , poIndentWheres = maybe (poIndentWheres p2) pure (poIndentWheres p1) , poRecordBraceSpace = maybe (poRecordBraceSpace p2) pure (poRecordBraceSpace p1) , poNewlinesBetweenDecls = maybe (poNewlinesBetweenDecls p2) pure (poNewlinesBetweenDecls p1) , poHaddockStyle = maybe (poHaddockStyle p2) pure (poHaddockStyle p1) , poHaddockStyleModule = maybe (poHaddockStyleModule p2) pure (poHaddockStyleModule p1) , poLetStyle = maybe (poLetStyle p2) pure (poLetStyle p1) , poInStyle = maybe (poInStyle p2) pure (poInStyle p1) , poSingleConstraintParens = maybe (poSingleConstraintParens p2) pure (poSingleConstraintParens p1) , poSingleDerivingParens = maybe (poSingleDerivingParens p2) pure (poSingleDerivingParens p1) , poSortConstraints = maybe (poSortConstraints p2) pure (poSortConstraints p1) , poSortDerivedClasses = maybe (poSortDerivedClasses p2) pure (poSortDerivedClasses p1) , poSortDerivingClauses = maybe (poSortDerivingClauses p2) pure (poSortDerivingClauses p1) , poTrailingSectionOperators = maybe (poTrailingSectionOperators p2) pure (poTrailingSectionOperators p1) , poUnicode = maybe (poUnicode p2) pure (poUnicode p1) , poRespectful = maybe (poRespectful p2) pure (poRespectful p1) } parsePrinterOptsCLI :: Applicative f => (forall a. PrinterOptsFieldType a => String -> String -> String -> f (Maybe a)) -> f (PrinterOpts Maybe) parsePrinterOptsCLI f = pure PrinterOpts <*> f "indentation" "Number of spaces per indentation step (default: 4)" "INT" <*> f "column-limit" "Max line length for automatic line breaking (default: none)" "OPTION" <*> f "function-arrows" "Styling of arrows in type signatures (choices: \"trailing\", \"leading\", or \"leading-args\") (default: trailing)" "OPTION" <*> f "comma-style" "How to place commas in multi-line lists, records, etc. (choices: \"leading\" or \"trailing\") (default: leading)" "OPTION" <*> f "import-export-style" "Styling of import/export lists (choices: \"leading\", \"trailing\", or \"diff-friendly\") (default: diff-friendly)" "OPTION" <*> f "import-grouping" "Rules for grouping import declarations (default: legacy)" "OPTION" <*> f "indent-wheres" "Whether to full-indent or half-indent 'where' bindings past the preceding body (default: false)" "BOOL" <*> f "record-brace-space" "Whether to leave a space before an opening record brace (default: false)" "BOOL" <*> f "newlines-between-decls" "Number of spaces between top-level declarations (default: 1)" "INT" <*> f "haddock-style" "How to print Haddock comments (choices: \"single-line\", \"multi-line\", or \"multi-line-compact\") (default: multi-line)" "OPTION" <*> f "haddock-style-module" "How to print module docstring (default: same as 'haddock-style')" "OPTION" <*> f "let-style" "Styling of let blocks (choices: \"auto\", \"inline\", \"newline\", or \"mixed\") (default: auto)" "OPTION" <*> f "in-style" "How to align the 'in' keyword with respect to the 'let' keyword (choices: \"left-align\", \"right-align\", or \"no-space\") (default: right-align)" "OPTION" <*> f "single-constraint-parens" "Whether to put parentheses around a single constraint (choices: \"auto\", \"always\", or \"never\") (default: always)" "OPTION" <*> f "single-deriving-parens" "Whether to put parentheses around a single deriving class (choices: \"auto\", \"always\", or \"never\") (default: always)" "OPTION" <*> f "sort-constraints" "Whether to sort constraints (default: false)" "BOOL" <*> f "sort-derived-classes" "Whether to sort derived classes (default: false)" "BOOL" <*> f "sort-deriving-clauses" "Whether to sort deriving clauses (default: false)" "BOOL" <*> f "trailing-section-operators" "Whether to place section operators (those that are infixr 0, such as $) in trailing position, continuing the expression indented below (default: true)" "BOOL" <*> f "unicode" "Output Unicode syntax (choices: \"detect\", \"always\", or \"never\") (default: never)" "OPTION" <*> f "respectful" "Give the programmer more choice on where to insert blank lines (default: true)" "BOOL" parsePrinterOptsJSON :: Applicative f => (forall a. PrinterOptsFieldType a => String -> f (Maybe a)) -> f (PrinterOpts Maybe) parsePrinterOptsJSON f = pure PrinterOpts <*> f "indentation" <*> f "column-limit" <*> f "function-arrows" <*> f "comma-style" <*> f "import-export-style" <*> f "import-grouping" <*> f "indent-wheres" <*> f "record-brace-space" <*> f "newlines-between-decls" <*> f "haddock-style" <*> f "haddock-style-module" <*> f "let-style" <*> f "in-style" <*> f "single-constraint-parens" <*> f "single-deriving-parens" <*> f "sort-constraints" <*> f "sort-derived-classes" <*> f "sort-deriving-clauses" <*> f "trailing-section-operators" <*> f "unicode" <*> f "respectful" {---------- PrinterOpts field types ----------} class Aeson.FromJSON a => PrinterOptsFieldType a where parsePrinterOptType :: String -> Either String a instance PrinterOptsFieldType Int where parsePrinterOptType = readEither instance PrinterOptsFieldType Bool where parsePrinterOptType s = case s of "false" -> Right False "true" -> Right True _ -> Left . unlines $ [ "unknown value: " <> show s, "Valid values are: \"false\" or \"true\"" ] data CommaStyle = Leading | Trailing deriving (Eq, Show, Enum, Bounded) data FunctionArrowsStyle = TrailingArrows | LeadingArrows | LeadingArgsArrows deriving (Eq, Show, Enum, Bounded) data HaddockPrintStyle = HaddockSingleLine | HaddockMultiLine | HaddockMultiLineCompact deriving (Eq, Show, Enum, Bounded) data HaddockPrintStyleModule = PrintStyleInherit | PrintStyleOverride HaddockPrintStyle deriving (Eq, Show) data ImportExportStyle = ImportExportLeading | ImportExportTrailing | ImportExportDiffFriendly deriving (Eq, Show, Enum, Bounded) data LetStyle = LetAuto | LetInline | LetNewline | LetMixed deriving (Eq, Show, Enum, Bounded) data InStyle = InLeftAlign | InRightAlign | InNoSpace deriving (Eq, Show, Enum, Bounded) data Unicode = UnicodeDetect | UnicodeAlways | UnicodeNever deriving (Eq, Show, Enum, Bounded) data SingleConstraintParens = ConstraintAuto | ConstraintAlways | ConstraintNever deriving (Eq, Show, Enum, Bounded) data ColumnLimit = NoLimit | ColumnLimit Int deriving (Eq, Show) data SingleDerivingParens = DerivingAuto | DerivingAlways | DerivingNever deriving (Eq, Show, Enum, Bounded) data ImportGrouping = ImportGroupLegacy | ImportGroupPreserve | ImportGroupSingle | ImportGroupByScope | ImportGroupByQualified | ImportGroupByScopeThenQualified | ImportGroupCustom (NonEmpty CT.ImportGroup) deriving (Eq, Show) instance Aeson.FromJSON CommaStyle where parseJSON = Aeson.withText "CommaStyle" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType CommaStyle where parsePrinterOptType s = case s of "leading" -> Right Leading "trailing" -> Right Trailing _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"leading\" or \"trailing\"" ] instance Aeson.FromJSON FunctionArrowsStyle where parseJSON = Aeson.withText "FunctionArrowsStyle" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType FunctionArrowsStyle where parsePrinterOptType s = case s of "trailing" -> Right TrailingArrows "leading" -> Right LeadingArrows "leading-args" -> Right LeadingArgsArrows _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"trailing\", \"leading\", or \"leading-args\"" ] instance Aeson.FromJSON HaddockPrintStyle where parseJSON = Aeson.withText "HaddockPrintStyle" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType HaddockPrintStyle where parsePrinterOptType s = case s of "single-line" -> Right HaddockSingleLine "multi-line" -> Right HaddockMultiLine "multi-line-compact" -> Right HaddockMultiLineCompact _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"single-line\", \"multi-line\", or \"multi-line-compact\"" ] instance Aeson.FromJSON HaddockPrintStyleModule where parseJSON = \v -> case v of Aeson.Null -> pure PrintStyleInherit Aeson.String "" -> pure PrintStyleInherit _ -> PrintStyleOverride <$> Aeson.parseJSON v instance PrinterOptsFieldType HaddockPrintStyleModule where parsePrinterOptType = \s -> case s of "" -> pure PrintStyleInherit _ -> PrintStyleOverride <$> parsePrinterOptType s instance Aeson.FromJSON ImportExportStyle where parseJSON = Aeson.withText "ImportExportStyle" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType ImportExportStyle where parsePrinterOptType s = case s of "leading" -> Right ImportExportLeading "trailing" -> Right ImportExportTrailing "diff-friendly" -> Right ImportExportDiffFriendly _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"leading\", \"trailing\", or \"diff-friendly\"" ] instance Aeson.FromJSON LetStyle where parseJSON = Aeson.withText "LetStyle" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType LetStyle where parsePrinterOptType s = case s of "auto" -> Right LetAuto "inline" -> Right LetInline "newline" -> Right LetNewline "mixed" -> Right LetMixed _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"auto\", \"inline\", \"newline\", or \"mixed\"" ] instance Aeson.FromJSON InStyle where parseJSON = Aeson.withText "InStyle" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType InStyle where parsePrinterOptType s = case s of "left-align" -> Right InLeftAlign "right-align" -> Right InRightAlign "no-space" -> Right InNoSpace _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"left-align\", \"right-align\", or \"no-space\"" ] instance Aeson.FromJSON Unicode where parseJSON = Aeson.withText "Unicode" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType Unicode where parsePrinterOptType s = case s of "detect" -> Right UnicodeDetect "always" -> Right UnicodeAlways "never" -> Right UnicodeNever _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"detect\", \"always\", or \"never\"" ] instance Aeson.FromJSON SingleConstraintParens where parseJSON = Aeson.withText "SingleConstraintParens" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType SingleConstraintParens where parsePrinterOptType s = case s of "auto" -> Right ConstraintAuto "always" -> Right ConstraintAlways "never" -> Right ConstraintNever _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"auto\", \"always\", or \"never\"" ] instance Aeson.FromJSON ColumnLimit where parseJSON = \case Aeson.String "none" -> pure NoLimit Aeson.Number x | Right x' <- (floatingOrInteger x :: Either Double Int) -> pure $ ColumnLimit x' s -> fail . unlines $ [ "unknown value: " <> show s, "Valid values are: \"none\", or an integer" ] instance PrinterOptsFieldType ColumnLimit where parsePrinterOptType = \s -> case s of "none" -> Right NoLimit _ | Just someInt <- readMaybe s -> Right . ColumnLimit $ someInt _ -> Left . unlines $ [ "unknown value: " <> show s, "Valid values are: \"none\", or an integer" ] instance Aeson.FromJSON SingleDerivingParens where parseJSON = Aeson.withText "SingleDerivingParens" $ \s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType SingleDerivingParens where parsePrinterOptType s = case s of "auto" -> Right DerivingAuto "always" -> Right DerivingAlways "never" -> Right DerivingNever _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"auto\", \"always\", or \"never\"" ] instance Aeson.FromJSON ImportGrouping where parseJSON = \case Aeson.String "legacy" -> pure ImportGroupLegacy Aeson.String "preserve" -> pure ImportGroupPreserve Aeson.String "single" -> pure ImportGroupSingle Aeson.String "by-qualified" -> pure ImportGroupByQualified Aeson.String "by-scope" -> pure ImportGroupByScope Aeson.String "by-scope-then-qualified" -> pure ImportGroupByScopeThenQualified arr@(Aeson.Array _) -> ImportGroupCustom <$> Aeson.parseJSON arr other -> fail . unlines $ [ "unknown strategy value: " <> show other, "Valid values are: \"legacy\", \"preserve\", \"single\", \"by-qualified\", \"by-scope\", \"by-scope-then-qualified\" or a valid YAML configuration for import groups" ] instance PrinterOptsFieldType ImportGrouping where parsePrinterOptType = \case "legacy" -> Right ImportGroupLegacy "preserve" -> Right ImportGroupPreserve "single" -> Right ImportGroupSingle "by-qualified" -> Right ImportGroupByQualified "by-scope" -> Right ImportGroupByScope "by-scope-then-qualified" -> Right ImportGroupByScopeThenQualified s -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: \"legacy\", \"preserve\", \"single\", \"by-qualified\", \"by-scope\", \"by-scope-then-qualified\" or a valid YAML configuration for import groups (see fourmolu.yaml)" ] defaultPrinterOptsYaml :: String defaultPrinterOptsYaml = unlines [ "# Number of spaces per indentation step" , "indentation: 4" , "" , "# Max line length for automatic line breaking" , "column-limit: none" , "" , "# Styling of arrows in type signatures (choices: trailing, leading, or leading-args)" , "function-arrows: trailing" , "" , "# How to place commas in multi-line lists, records, etc. (choices: leading or trailing)" , "comma-style: leading" , "" , "# Styling of import/export lists (choices: leading, trailing, or diff-friendly)" , "import-export-style: diff-friendly" , "" , "# Rules for grouping import declarations" , "import-grouping: legacy" , "" , "# Whether to full-indent or half-indent 'where' bindings past the preceding body" , "indent-wheres: false" , "" , "# Whether to leave a space before an opening record brace" , "record-brace-space: false" , "" , "# Number of spaces between top-level declarations" , "newlines-between-decls: 1" , "" , "# How to print Haddock comments (choices: single-line, multi-line, or multi-line-compact)" , "haddock-style: multi-line" , "" , "# How to print module docstring" , "haddock-style-module: null" , "" , "# Styling of let blocks (choices: auto, inline, newline, or mixed)" , "let-style: auto" , "" , "# How to align the 'in' keyword with respect to the 'let' keyword (choices: left-align, right-align, or no-space)" , "in-style: right-align" , "" , "# Whether to put parentheses around a single constraint (choices: auto, always, or never)" , "single-constraint-parens: always" , "" , "# Whether to put parentheses around a single deriving class (choices: auto, always, or never)" , "single-deriving-parens: always" , "" , "# Whether to sort constraints" , "sort-constraints: false" , "" , "# Whether to sort derived classes" , "sort-derived-classes: false" , "" , "# Whether to sort deriving clauses" , "sort-deriving-clauses: false" , "" , "# Whether to place section operators (those that are infixr 0, such as $) in trailing position, continuing the expression indented below" , "trailing-section-operators: true" , "" , "# Output Unicode syntax (choices: detect, always, or never)" , "unicode: never" , "" , "# Give the programmer more choice on where to insert blank lines" , "respectful: true" , "" , "# Fixity information for operators" , "fixities: []" , "" , "# Module reexports Fourmolu should know about" , "reexports: []" , "" , "# Modules defined by the current Cabal package for import grouping" , "local-modules: []" ] fourmolu-0.18.0.0/src/Ormolu/Config/Types.hs0000644000000000000000000000674414745250261016726 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Ormolu.Config.Types ( ImportGroup (..), ImportGroupRule (..), ImportModuleMatcher (..), ImportRulePriority (..), matchAllRulePriority, matchLocalRulePriority, defaultImportRulePriority, QualifiedImportMatcher (..), ) where import Control.Applicative (Alternative (..), asum) import Data.Aeson ((.!=), (.:), (.:?)) import Data.Aeson qualified as Aeson import Data.Aeson.Types qualified as Aeson import Data.List.NonEmpty (NonEmpty) import Data.Word (Word8) import Ormolu.Utils.Glob (Glob, mkGlob) data ImportGroup = ImportGroup { igName :: !(Maybe String), igRules :: !(NonEmpty ImportGroupRule) } deriving (Eq, Show) instance Aeson.FromJSON ImportGroup where parseJSON = Aeson.withObject "ImportGroup" $ \o -> ImportGroup <$> Aeson.parseFieldMaybe o "name" <*> Aeson.parseField o "rules" data ImportGroupRule = ImportGroupRule { igrModuleMatcher :: !ImportModuleMatcher, igrQualifiedMatcher :: !QualifiedImportMatcher, igrPriority :: !ImportRulePriority } deriving (Eq, Show) instance Aeson.FromJSON ImportGroupRule where parseJSON = Aeson.withObject "rule" $ \o -> do let parseModuleMatcher = Aeson.parseJSON (Aeson.Object o) failUnknownModuleMatcher = Aeson.parseFail "Unknown or invalid module matcher" attemptParseModuleMatcher = parseModuleMatcher <|> failUnknownModuleMatcher igrModuleMatcher <- attemptParseModuleMatcher qualified <- o .:? "qualified" igrQualifiedMatcher <- case qualified of Just True -> pure MatchQualifiedOnly Just False -> pure MatchUnqualifiedOnly Nothing -> pure MatchBothQualifiedAndUnqualified let defaultPriority | MatchAllModules <- igrModuleMatcher = matchAllRulePriority | otherwise = defaultImportRulePriority igrPriority <- o .:? "priority" .!= defaultPriority pure ImportGroupRule {..} newtype ImportRulePriority = ImportRulePriority Word8 deriving (Eq, Ord, Show, Bounded) instance Aeson.FromJSON ImportRulePriority where parseJSON = fmap ImportRulePriority . Aeson.parseJSON matchAllRulePriority :: ImportRulePriority matchAllRulePriority = ImportRulePriority 100 matchLocalRulePriority :: ImportRulePriority matchLocalRulePriority = ImportRulePriority 60 -- Lower priority than "all" but higher than the default. defaultImportRulePriority :: ImportRulePriority defaultImportRulePriority = ImportRulePriority 50 data QualifiedImportMatcher = MatchQualifiedOnly | MatchUnqualifiedOnly | MatchBothQualifiedAndUnqualified deriving (Eq, Show) data ImportModuleMatcher = MatchAllModules | MatchLocalModules | MatchGlob !Glob deriving (Eq, Show) instance Aeson.FromJSON ImportModuleMatcher where parseJSON v = asum [ parseMatchModuleMatcher v, parseGlobModuleMatcher v ] where parseMatchModuleMatcher :: Aeson.Value -> Aeson.Parser ImportModuleMatcher parseMatchModuleMatcher = Aeson.withObject "ImportModuleMatcher" $ \o -> do c <- Aeson.parseField @String o "match" case c of "all" -> pure MatchAllModules "local-modules" -> pure MatchLocalModules other -> Aeson.parseFail $ "Unknown matcher: " <> other parseGlobModuleMatcher :: Aeson.Value -> Aeson.Parser ImportModuleMatcher parseGlobModuleMatcher = Aeson.withObject "ImportModuleMatcher" $ \o -> do rawGlob <- o .: "glob" let glob = mkGlob rawGlob pure (MatchGlob glob) fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration.hs-boot0000644000000000000000000000050714745250261022103 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 () fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/OpTree.hs-boot0000644000000000000000000000160214745250261023276 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 fourmolu-0.18.0.0/src/Ormolu/Printer/Meat/Declaration/Value.hs-boot0000644000000000000000000000117714745250261023163 0ustar0000000000000000module Ormolu.Printer.Meat.Declaration.Value ( p_valDecl, p_pat, p_hsExpr, p_hsUntypedSplice, p_hsExpr', p_hsCmdTop, exprPlacement, cmdTopPlacement, ) where import GHC.Hs import Ormolu.Printer.Combinators p_valDecl :: HsBindLR GhcPs GhcPs -> R () p_pat :: Pat GhcPs -> R () p_hsExpr :: HsExpr GhcPs -> R () p_hsUntypedSplice :: SpliceDecoration -> HsUntypedSplice GhcPs -> R () data IsApplicand p_hsExpr' :: IsApplicand -> BracketStyle -> HsExpr GhcPs -> R () p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () exprPlacement :: HsExpr GhcPs -> Placement cmdTopPlacement :: HsCmdTop GhcPs -> Placement fourmolu-0.18.0.0/app/Main.hs0000644000000000000000000004537014745250261014013 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Main (main) where import Control.Concurrent (MVar, newMVar, withMVar) import Control.Exception (throwIO) import Control.Monad import Data.Bool (bool) import Data.List (intercalate, isSuffixOf, sort) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict qualified as Map import Data.Maybe (fromMaybe, mapMaybe, maybeToList) import Data.Set qualified as Set import Data.Text.IO.Utf8 qualified as T.Utf8 import Data.Version (showVersion) import Data.Yaml qualified as Yaml import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import Language.Haskell.TH.Env (envQ) import Options.Applicative import Ormolu import Ormolu.Config import Ormolu.Diff.Text (diffText, printTextDiff) import Ormolu.Fixity import Ormolu.Parser (manualExts) import Ormolu.Terminal import Ormolu.Utils (showOutputable) import Ormolu.Utils.Fixity import Paths_fourmolu (version) import System.Console.Terminal.Size qualified as Terminal import System.Directory import System.Exit (ExitCode (..), exitWith) import System.FilePath qualified as FP import System.IO (hPutStrLn, stderr) import UnliftIO.Async (pooledMapConcurrently) -- | Entry point of the program. main :: IO () main = do opts@Opts {..} <- runParser optsParserInfo -- We use this to guard writes to stdout in order to avoid -- garbled output from concurrent formatting processes. outputLock <- newMVar () cfg <- resolveConfig opts let formatOne' = formatOne optConfigFileOpts optMode optSourceType cfg outputLock exitCode <- case optInputFiles of [] -> formatOne' Nothing ["-"] -> formatOne' Nothing inputs -> do let selectFailure = \case ExitSuccess -> Nothing ExitFailure n -> Just n files <- Set.toAscList . Set.fromList . concat <$> mapM getHaskellFiles inputs errorCodes <- mapMaybe selectFailure <$> pooledMapConcurrently (formatOne' . Just) files return $ if null errorCodes then ExitSuccess else ExitFailure $ if all (== 100) errorCodes then 100 else 102 exitWith exitCode where runParser p = do termWidth <- maybe 100 Terminal.width <$> Terminal.size customExecParser (prefs $ helpIndent 35 <> columns termWidth) p -- | Build the full config, by adding 'PrinterOpts' from a file, if found. resolveConfig :: Opts -> IO (Config RegionIndices) resolveConfig opts@(Opts {optConfig = cliConfig, optPrinterOpts = cliPrinterOpts}) = do fourmoluConfig <- findConfigFile' >>= \case Left ConfigNotFound {searchDirs} -> do outputDebug . unlines $ ("No " ++ show configFileName ++ " found in any of:") : map (" " ++) searchDirs pure emptyConfig Right configPath -> Yaml.decodeFileEither configPath >>= \case Left e -> do outputError . unlines $ [ "Failed to load " <> configPath <> ":", Yaml.prettyPrintParseException e ] exitWith $ ExitFailure 400 Right cfg -> do outputInfo $ "Loaded config from: " <> configPath outputDebug $ unwords ["*** CONFIG FILE ***", show cfg] pure cfg return $ cliConfig { cfgPrinterOpts = resolvePrinterOpts [ cfgFilePrinterOpts fourmoluConfig, cliPrinterOpts ], cfgFixityOverrides = FixityOverrides . mconcat . map unFixityOverrides $ [ cfgFixityOverrides cliConfig, cfgFileFixities fourmoluConfig ], cfgModuleReexports = ModuleReexports . mconcat . map unModuleReexports $ [ cfgModuleReexports cliConfig, cfgFileReexports fourmoluConfig ] } where findConfigFile' = do cwd <- getCurrentDirectory case optInputFiles opts of _ | Just configPath <- optConfigFilePath opts -> pure $ Right configPath [] -> findConfigFile cwd ["-"] -> findConfigFile cwd file : _ -> findConfigFile $ FP.takeDirectory file output = hPutStrLn stderr outputError = output outputInfo = unless (optQuiet opts) . output outputDebug = when (cfgDebug cliConfig) . output getHaskellFiles :: FilePath -> IO [FilePath] getHaskellFiles input = do isDir <- doesDirectoryExist input if isDir then filter (".hs" `isSuffixOf`) <$> listDirectoryRecursive input else return [input] -- plain file where listDirectoryRecursive fp -- automatically ignore files in certain hardcoded directories -- TODO: make configurable? | FP.takeFileName fp `elem` [".stack-work", "dist", "dist-newstyle"] = pure [] | otherwise = fmap concat . mapM (go . (fp FP.)) =<< listDirectory fp where go child = do isDir <- doesDirectoryExist child if isDir then listDirectoryRecursive child else pure [child] -- | Format a single input. formatOne :: -- | How to use .cabal files ConfigFileOpts -> -- | Mode of operation Mode -> -- | The 'SourceType' requested by the user Maybe SourceType -> -- | Configuration Config RegionIndices -> -- | Lock for writing to output handles MVar () -> -- | File to format or stdin as 'Nothing' Maybe FilePath -> IO ExitCode formatOne ConfigFileOpts {..} mode reqSourceType rawConfig outputLock mpath = withPrettyOrmoluExceptions (cfgColorMode rawConfig) $ do let getCabalInfoForSourceFile' sourceFile = do cabalSearchResult <- getCabalInfoForSourceFile sourceFile let debugEnabled = cfgDebug rawConfig case cabalSearchResult of CabalNotFound -> do when debugEnabled $ withMVar outputLock $ \_ -> hPutStrLn stderr $ "Could not find a .cabal file for " <> sourceFile return Nothing CabalDidNotMention cabalInfo -> do when debugEnabled $ do relativeCabalFile <- makeRelativeToCurrentDirectory (ciCabalFilePath cabalInfo) withMVar outputLock $ \_ -> hPutStrLn stderr $ "Found .cabal file " <> relativeCabalFile <> ", but it did not mention " <> sourceFile return (Just cabalInfo) CabalFound cabalInfo -> return (Just cabalInfo) getDotOrmoluForSourceFile' sourceFile = do if optDoNotUseDotOrmolu then return Nothing else Just <$> getDotOrmoluForSourceFile sourceFile case FP.normalise <$> mpath of -- input source = STDIN Nothing -> do mcabalInfo <- case (optStdinInputFile, optDoNotUseCabal) of (_, True) -> return Nothing (Nothing, False) -> throwIO OrmoluMissingStdinInputFile (Just inputFile, False) -> getCabalInfoForSourceFile' inputFile mdotOrmolu <- case optStdinInputFile of Nothing -> return Nothing Just inputFile -> getDotOrmoluForSourceFile' inputFile config <- patchConfig Nothing mcabalInfo mdotOrmolu case mode of Stdout -> do output <- ormoluStdin config withMVar outputLock $ \_ -> T.Utf8.putStr output 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 <- T.Utf8.getContents let stdinRepr = "" formattedInput <- ormolu config stdinRepr originalInput handleDiff originalInput formattedInput stdinRepr -- input source = a file Just inputFile -> do mcabalInfo <- if optDoNotUseCabal then return Nothing else getCabalInfoForSourceFile' inputFile mdotOrmolu <- getDotOrmoluForSourceFile' inputFile config <- patchConfig (Just (detectSourceType inputFile)) mcabalInfo mdotOrmolu case mode of Stdout -> do output <- ormoluFile config inputFile withMVar outputLock $ \_ -> T.Utf8.putStr output return ExitSuccess InPlace -> do -- ormoluFile is not used because we need originalInput originalInput <- T.Utf8.readFile inputFile formattedInput <- ormolu config inputFile originalInput when (formattedInput /= originalInput) $ T.Utf8.writeFile inputFile formattedInput return ExitSuccess Check -> do -- ormoluFile is not used because we need originalInput originalInput <- T.Utf8.readFile inputFile formattedInput <- ormolu config inputFile originalInput handleDiff originalInput formattedInput inputFile where patchConfig mdetectedSourceType mcabalInfo mdotOrmolu = do let sourceType = fromMaybe ModuleSource (reqSourceType <|> mdetectedSourceType) return $ refineConfig sourceType mcabalInfo (Just (cfgFixityOverrides rawConfig)) (Just (cfgModuleReexports rawConfig)) ( rawConfig { cfgFixityOverrides = maybe defaultFixityOverrides fst mdotOrmolu, cfgModuleReexports = maybe defaultModuleReexports snd mdotOrmolu } ) 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, -- | Whether to make the output quieter optQuiet :: !Bool, -- | Ormolu 'Config' optConfig :: !(Config RegionIndices), -- | Ormolu 'Config' optConfigFilePath :: !(Maybe FilePath), -- | Fourmolu 'PrinterOpts', optPrinterOpts :: PrinterOptsPartial, -- | Options related to info extracted from files optConfigFileOpts :: ConfigFileOpts, -- | Source type option, where 'Nothing' means autodetection optSourceType :: !(Maybe SourceType), -- | Haskell source files to format or stdin (when the list is empty) optInputFiles :: ![FilePath] } -- | Mode of operation. data Mode = -- | Output formatted source code to stdout Stdout | -- | Overwrite original file InPlace | -- | Exit with non-zero status code if -- source is not already formatted Check deriving (Eq, Show, Bounded, Enum) -- | Options related to configuration stored in the file system. data ConfigFileOpts = ConfigFileOpts { -- | DO NOT extract default-extensions and dependencies from .cabal files optDoNotUseCabal :: Bool, -- | DO NOT look for @.ormolu@ files optDoNotUseDotOrmolu :: Bool, -- | Optional path to a file which will be used to find a .cabal file -- when using input from stdin optStdinInputFile :: Maybe FilePath } deriving (Show) optsParserInfo :: ParserInfo Opts optsParserInfo = info (helper <*> ver <*> exts <*> printDefaults <*> 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 $ ["fourmolu", showVersion version] <> maybeToList $$(envQ @String "FOURMOLU_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) printDefaults :: Parser (a -> a) printDefaults = infoOption defaultPrinterOptsYaml . mconcat $ [ long "print-defaults", help "Print default configuration options that can be used in fourmolu.yaml" ] 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'" ] ) <*> (switch . mconcat) [ long "quiet", short 'q', help "Make output quieter" ] <*> configParser <*> (optional . strOption . mconcat) [ metavar "CONFIG_FILE", long "config", help "Path to the config file to use. If not specified, tries to discover one automatically." ] <*> printerOptsParser <*> configFileOptsParser <*> sourceTypeParser <*> (many . strArgument . mconcat) [ metavar "FILE", help "Haskell source files to format or stdin (the default)" ] configFileOptsParser :: Parser ConfigFileOpts configFileOptsParser = ConfigFileOpts <$> (switch . mconcat) [ long "no-cabal", help "Do not extract default-extensions and dependencies from .cabal files" ] <*> pure True -- Fourmolu: Don't add the '--no-dot-ormolu' flag, hardcode to never looking for .ormolu files <*> (optional . strOption . mconcat) [ long "stdin-input-file", help "Path which will be used to find the .cabal file when using input from stdin" ] configParser :: Parser (Config RegionIndices) configParser = Config <$> (fmap (fmap DynOption) . many . strOption . mconcat) [ long "ghc-opt", short 'o', metavar "OPT", help "GHC options to enable (e.g. language extensions)" ] <*> ( fmap (FixityOverrides . Map.fromList . mconcat) . many . option parseFixityDeclaration . mconcat ) [ long "fixity", short 'f', metavar "FIXITY", help "Fixity declaration to use (an override)" ] <*> ( fmap (ModuleReexports . Map.fromListWith (<>) . mconcat . pure) . many . option parseModuleReexportDeclaration . mconcat ) [ long "reexport", short 'r', metavar "REEXPORT", help "Module re-export that Fourmolu should know about" ] <*> (fmap Set.fromList . many . strOption . mconcat) [ long "package", short 'p', metavar "PACKAGE", help "Explicitly specified dependency (for operator fixity/precedence only)" ] <*> (switch . mconcat) [ long "unsafe", short 'u', help "Do formatting faster but without automatic detection of defects" ] <*> (switch . mconcat) [ long "debug", short 'd', help "Output information useful for debugging" ] <*> (switch . mconcat) [ long "check-idempotence", short 'c', help "Fail if formatting is not idempotent" ] -- We cannot parse the source type here, because we might need to do -- autodection based on the input file extension (not available here) -- before storing the resolved value in the config struct. <*> pure ModuleSource <*> (option parseColorMode . mconcat) [ long "color", metavar "WHEN", value Auto, help "Colorize the output; WHEN can be 'never', 'always', or 'auto' (the default)" ] <*> ( RegionIndices <$> (optional . option auto . mconcat) [ long "start-line", metavar "START", help "Start line of the region to format (starts from 1)" ] <*> (optional . option auto . mconcat) [ long "end-line", metavar "END", help "End line of the region to format (inclusive)" ] ) <*> pure defaultPrinterOpts -- unused; overwritten in resolveConfig <*> (fmap Set.fromList . many . strOption . mconcat) [ long "local-modules", short 'm', metavar "LOCAL_MODULES", help "Modules Fourmolu should consider as local by the current Cabal package" ] 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)" ] printerOptsParser :: Parser PrinterOptsPartial printerOptsParser = parsePrinterOptsCLI mkOption where mkOption name helpText placeholder = option (Just <$> eitherReader parsePrinterOptType) . mconcat $ [ long name, help helpText, metavar placeholder, value Nothing ] ---------------------------------------------------------------------------- -- Helpers -- | Parse 'Mode'. parseMode :: ReadM Mode parseMode = eitherReader $ \case "stdout" -> Right Stdout "inplace" -> Right InPlace "check" -> Right Check s -> Left $ "unknown mode: " ++ s -- | Parse a fixity declaration. parseFixityDeclaration :: ReadM [(OpName, FixityInfo)] parseFixityDeclaration = eitherReader parseFixityDeclarationStr -- | Parse a module reexport declaration. parseModuleReexportDeclaration :: ReadM (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) parseModuleReexportDeclaration = eitherReader parseModuleReexportDeclarationStr -- | Parse 'ColorMode'. parseColorMode :: ReadM ColorMode parseColorMode = eitherReader $ \case "never" -> Right Never "always" -> Right Always "auto" -> Right Auto s -> Left $ "unknown color mode: " ++ s -- | Parse the 'SourceType'. 'Nothing' means that autodetection based on -- file extension is requested. parseSourceType :: ReadM (Maybe SourceType) parseSourceType = eitherReader $ \case "module" -> Right (Just ModuleSource) "sig" -> Right (Just SignatureSource) "auto" -> Right Nothing s -> Left $ "unknown source type: " ++ s fourmolu-0.18.0.0/tests/Spec.hs0000644000000000000000000000005414745250261014371 0ustar0000000000000000{-# OPTIONS_GHC -F -pgmF hspec-discover #-} fourmolu-0.18.0.0/tests/Ormolu/CabalInfoSpec.hs0000644000000000000000000000721714745250261017415 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.CabalInfoSpec (spec) where import Data.Set qualified as Set import Distribution.Types.PackageName (unPackageName) import Ormolu.Config (DynOption (..)) import Ormolu.Utils.Cabal import System.Directory import System.FilePath import System.IO.Temp (withSystemTempDirectory) import Test.Hspec spec :: Spec spec = do describe "findCabalFile" $ do let findsOrmoluCabal start expectedCabalFile = do Just absolute <- findCabalFile start absolute `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory absolute `shouldReturn` expectedCabalFile it "returns correct absolute path" $ findsOrmoluCabal "src/Ormolu/Config.hs" "fourmolu.cabal" it "finds correct path even when it starts from nonsense" $ findsOrmoluCabal "a/b/c/d/e" "fourmolu.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 fourmolu.cabal for src/Ormolu/Config.hs" $ do (mentioned, CabalInfo {..}) <- parseCabalInfo "fourmolu.cabal" "src/Ormolu/Config.hs" mentioned `shouldBe` True unPackageName ciPackageName `shouldBe` "fourmolu" ciDynOpts `shouldBe` [DynOption "-XGHC2021"] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["Cabal-syntax", "Diff", "MemoTrie", "aeson", "ansi-terminal", "array", "base", "binary", "bytestring", "choice", "containers", "directory", "file-embed", "filepath", "ghc-lib-parser", "megaparsec", "mtl", "scientific", "syb", "text"] ciCabalFilePath `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory ciCabalFilePath `shouldReturn` "fourmolu.cabal" it "extracts correct cabal info from fourmolu.cabal for tests/Ormolu/PrinterSpec.hs" $ do (mentioned, CabalInfo {..}) <- parseCabalInfo "fourmolu.cabal" "tests/Ormolu/PrinterSpec.hs" mentioned `shouldBe` True unPackageName ciPackageName `shouldBe` "fourmolu" ciDynOpts `shouldBe` [DynOption "-XGHC2021"] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["Cabal-syntax", "Diff", "QuickCheck", "base", "bytestring", "choice", "containers", "directory", "filepath", "ghc-lib-parser", "hspec", "hspec-megaparsec", "fourmolu", "megaparsec", "path", "path-io", "pretty", "process", "temporary", "text", "yaml"] ciCabalFilePath `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory ciCabalFilePath `shouldReturn` "fourmolu.cabal" it "handles correctly files that are not mentioned in fourmolu.cabal" $ do (mentioned, CabalInfo {..}) <- parseCabalInfo "fourmolu.cabal" "src/FooBob.hs" mentioned `shouldBe` False unPackageName ciPackageName `shouldBe` "fourmolu" ciDynOpts `shouldBe` [] Set.map unPackageName ciDependencies `shouldBe` Set.fromList ["base"] ciCabalFilePath `shouldSatisfy` isAbsolute makeRelativeToCurrentDirectory ciCabalFilePath `shouldReturn` "fourmolu.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) fourmolu-0.18.0.0/tests/Ormolu/Diff/TextSpec.hs0000644000000000000000000000360614745250261017371 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} module Ormolu.Diff.TextSpec (spec) where import Data.Text.IO.Utf8 qualified as T.Utf8 import Ormolu.Diff.Text import Ormolu.Terminal import Path import System.FilePath qualified as FP import Test.Hspec spec :: Spec spec = describe "printTextDiff" $ do stdTest "one-line-added" "empty" "one-line" stdTest "one-line-removed" "one-line" "empty" stdTest "no-preceding" "main-foo" "main" stdTest "no-following" "main" "main-v2" stdTest "simple-hunk" "main-and-foo" "main-and-foo-v2" stdTest "joined-hunk" "main-and-bar" "main-and-bar-v2" stdTest "two-hunks" "main-and-baz" "main-and-baz-v2" stdTest "trimming" "spaced" "spaced-v2" stdTest "trailing-blank-line" "no-trailing-blank-line" "with-trailing-blank-line" stdTest "trimming-trailing-both-eof" "applicative-before" "applicative-after" stdTest "trimming-trailing-both-out-of-margin" "longer" "longer-v2" -- | Test diff printing. stdTest :: -- | Name of the test case String -> -- | Location of input A FilePath -> -- | Location of input B FilePath -> Spec stdTest name pathA pathB = it name $ do inputA <- parseRelFile (FP.addExtension pathA "hs") >>= T.Utf8.readFile . toFilePath . (diffInputsDir ) inputB <- parseRelFile (FP.addExtension pathB "hs") >>= T.Utf8.readFile . toFilePath . (diffInputsDir ) let expectedDiffPath = FP.addExtension name "txt" expectedDiffText <- parseRelFile expectedDiffPath >>= T.Utf8.readFile . toFilePath . (diffOutputsDir ) Just actualDiff <- pure $ diffText inputA inputB "TEST" runTermPure (printTextDiff actualDiff) `shouldBe` expectedDiffText diffTestsDir :: Path Rel Dir diffTestsDir = $(mkRelDir "data/diff-tests") diffInputsDir :: Path Rel Dir diffInputsDir = diffTestsDir $(mkRelDir "inputs") diffOutputsDir :: Path Rel Dir diffOutputsDir = diffTestsDir $(mkRelDir "outputs") fourmolu-0.18.0.0/tests/Ormolu/Fixity/ParserSpec.hs0000644000000000000000000002161714745250261020307 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Fixity.ParserSpec (spec) where import Data.List.NonEmpty (NonEmpty (..)) import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as T import Ormolu.Fixity import Ormolu.Fixity.Parser import Test.Hspec import Test.Hspec.Megaparsec import Text.Megaparsec.Error (ErrorFancy (..)) spec :: Spec spec = do describe "parseDotOrmolu" $ do it "parses the empty input without choking" $ parseDotOrmolu "" "" `shouldParse` (FixityOverrides Map.empty, ModuleReexports Map.empty) it "parses a collection of fixity declarations" $ -- The example is taken from base. parseDotOrmolu "" ( T.unlines [ "infixr 9 .", "infixr 5 ++", "infixl 4 <$", "infixl 1 >>, >>=", "infixr 1 =<<", "infixr 0 $, $!", "infixl 4 <*>, <*, *>, <**>" ] ) `shouldParse` ( exampleFixityOverrides, ModuleReexports Map.empty ) it "accepts fractional operator precedences" $ parseDotOrmolu "" ( T.unlines [ "infixr 3 >~<", "infixr 3.3 |~|", "infixr 3.7 <~>" ] ) `shouldParse` ( fractionalFixityOverrides, ModuleReexports Map.empty ) it "combines conflicting fixity declarations correctly" $ parseDotOrmolu "" ( T.unlines [ "infixr 9 ., ^", "infixr 7 ., $", "infixr 9 ^ ", "infixl 7 $" ] ) `shouldParse` ( FixityOverrides ( Map.fromList [ ("$", FixityInfo InfixL 7), (".", FixityInfo InfixR 7), ("^", FixityInfo InfixR 9) ] ), ModuleReexports Map.empty ) it "handles CRLF line endings correctly" $ parseDotOrmolu "" `shouldSucceedOn` unlinesCrlf [ "infixr 9 .", "infixr 5 ++" ] it "parses inputs without a trailing newline" $ parseDotOrmolu "" `shouldSucceedOn` T.intercalate "\n" [ "infixr 9 .", "infixr 5 ++" ] it "fails with correct parse error (keyword wrong second line)" $ parseDotOrmolu "" "infixr 5 .\nfoobar 5 $" `shouldFailWith` err 11 ( mconcat [ utok 'f', etoks "infix", etoks "infixl", etoks "infixr", etoks "module", eeof ] ) it "parses module re-exports and combines them correctly" $ parseDotOrmolu "" ( T.unlines [ "module Control.Lens exports Control.Lens.Lens", "module Control.Lens exports \"lens\" Control.Lens.At", "module Text.Megaparsec exports Control.Monad.Combinators" ] ) `shouldParse` (FixityOverrides Map.empty, exampleModuleReexports) it "parses fixity declarations + module re-export declarations with blanks" $ parseDotOrmolu "" ( T.unlines [ "module Control.Lens exports Control.Lens.Lens", "", "infixr 5 ++", "infixl 4 <$", "", "", "module Control.Lens exports \"lens\" Control.Lens.At", "infixr 9 .", "module Text.Megaparsec exports Control.Monad.Combinators", "infixl 1 >>, >>=", "infixr 1 =<<", "", "infixr 0 $, $!", "infixl 4 <*>, <*, *>, <**>" ] ) `shouldParse` (exampleFixityOverrides, exampleModuleReexports) describe "parseFixtiyDeclaration" $ do it "parses a simple infixr declaration" $ parseFixityDeclaration "infixr 5 $" `shouldParse` [("$", FixityInfo InfixR 5)] it "parses a simple infixl declaration" $ parseFixityDeclaration "infixl 5 $" `shouldParse` [("$", FixityInfo InfixL 5)] it "parses a simple infix declaration" $ parseFixityDeclaration "infix 5 $" `shouldParse` [("$", FixityInfo InfixN 5)] it "parses a declaration for a ticked identifier" $ parseFixityDeclaration "infixl 5 `foo`" `shouldParse` [("foo", FixityInfo InfixL 5)] it "parses a declaration for a ticked identifier (constructor case)" $ parseFixityDeclaration "infixl 5 `Foo`" `shouldParse` [("Foo", FixityInfo InfixL 5)] it "parses a multi-operator declaration" $ parseFixityDeclaration "infixl 5 $, ., `Foo`, `bar`" `shouldParse` [ ("$", FixityInfo InfixL 5), (".", FixityInfo InfixL 5), ("Foo", FixityInfo InfixL 5), ("bar", FixityInfo InfixL 5) ] it "parses a declaration with a unicode operator" $ parseFixityDeclaration "infixr 5 ×" `shouldParse` [("×", FixityInfo InfixR 5)] it "fails with correct parse error (keyword wrong)" $ parseFixityDeclaration "foobar 5 $" `shouldFailWith` err 0 ( mconcat [ utoks "foobar", etoks "infix", etoks "infixl", etoks "infixr" ] ) it "fails with correct parse error (missing operator)" $ parseFixityDeclaration "infixr 5 " `shouldFailWith` err 9 ( mconcat [ ueof, etok '`', elabel "operator character" ] ) it "fails with correct parse error (trailing comma)" $ parseFixityDeclaration "infixr 5 ., " `shouldFailWith` err 12 ( mconcat [ ueof, etok '`', elabel "operator character" ] ) it "fails with correct parse error (precedence greater than 9)" $ parseFixityDeclaration "infixl 10 $" `shouldFailWith` errFancy 7 (fancy (ErrorFail "precedence should not be greater than 9")) describe "parseModuleReexportDeclaration" $ do it "parses a re-export declaration" $ parseModuleReexportDeclaration "module Control.Lens exports Control.Lens.Lens" `shouldParse` ( "Control.Lens", (Nothing, "Control.Lens.Lens") :| [] ) it "parses a re-export declaration (explicit package)" $ parseModuleReexportDeclaration "module Control.Lens exports \"lens\" Control.Lens.Lens" `shouldParse` ( "Control.Lens", (Just "lens", "Control.Lens.Lens") :| [] ) it "fails with correct parse error (keyword wrong)" $ parseModuleReexportDeclaration "foo Control.Lens exports Control.Lens.Lens" `shouldFailWith` err 0 ( mconcat [ utoks "foo Co", etoks "module" ] ) it "fails with correct parse error (module syntax)" $ parseModuleReexportDeclaration "module control.Lens exports Control.Lens.Lens" `shouldFailWith` err 7 ( mconcat [ utok 'c', elabel "module name" ] ) it "fails with correct parse error (typo: export intead exports)" $ parseModuleReexportDeclaration "module Control.Lens export Control.Lens.Lens" `shouldFailWith` err 20 ( mconcat [ utoks "export ", etoks "exports" ] ) exampleFixityOverrides :: FixityOverrides exampleFixityOverrides = FixityOverrides ( Map.fromList [ ("$", FixityInfo InfixR 0), ("$!", FixityInfo InfixR 0), ("*>", FixityInfo InfixL 4), ("++", FixityInfo InfixR 5), (".", FixityInfo InfixR 9), ("<$", FixityInfo InfixL 4), ("<*", FixityInfo InfixL 4), ("<**>", FixityInfo InfixL 4), ("<*>", FixityInfo InfixL 4), ("=<<", FixityInfo InfixR 1), (">>", FixityInfo InfixL 1), (">>=", FixityInfo InfixL 1) ] ) fractionalFixityOverrides :: FixityOverrides fractionalFixityOverrides = FixityOverrides ( Map.fromList [ (">~<", FixityInfo InfixR 3), ("|~|", FixityInfo InfixR 3.3), ("<~>", FixityInfo InfixR 3.7) ] ) exampleModuleReexports :: ModuleReexports exampleModuleReexports = ModuleReexports . Map.fromList $ [ ( "Control.Lens", (Nothing, "Control.Lens.Lens") :| [(Just "lens", "Control.Lens.At")] ), ( "Text.Megaparsec", (Nothing, "Control.Monad.Combinators") :| [] ) ] unlinesCrlf :: [Text] -> Text unlinesCrlf = T.concat . fmap (<> "\r\n") fourmolu-0.18.0.0/tests/Ormolu/Fixity/PrinterSpec.hs0000644000000000000000000000535214745250261020474 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ormolu.Fixity.PrinterSpec (spec) where import Data.List (intercalate) import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.Text qualified as T import Distribution.ModuleName (ModuleName) import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName (PackageName, mkPackageName) import Ormolu.Fixity import Ormolu.Fixity.Parser import Ormolu.Fixity.Printer import Test.Hspec import Test.Hspec.Megaparsec import Test.QuickCheck instance Arbitrary FixityOverrides where arbitrary = FixityOverrides . Map.fromList <$> listOf ((,) <$> genOperator <*> genFixityInfo) where genOperator = OpName . T.pack <$> oneof [genNormalOperator, genIdentifier] genNormalOperator = listOf1 (scaleDown arbitrary `suchThat` isOperatorConstituent) genIdentifier = do x <- arbitrary `suchThat` isIdentifierFirstChar xs <- listOf1 (scaleDown arbitrary `suchThat` isIdentifierConstituent) return (x : xs) genFixityInfo = do fiDirection <- elements [ InfixL, InfixR, InfixN ] precedenceWholePart <- fromIntegral <$> chooseInt (0, 9) precedenceFractionalPart <- if precedenceWholePart < 9.0 then (* 0.1) . fromIntegral <$> chooseInt (0, 1) else return 0 let fiPrecedence = precedenceWholePart + precedenceFractionalPart return FixityInfo {..} instance Arbitrary ModuleReexports where arbitrary = ModuleReexports . Map.fromListWith combine <$> listOf genReexport where combine x y = NE.sort (x <> y) genReexport = do exportingModule <- arbitrary exports <- NE.sort . NE.fromList . getNonEmpty <$> scaleDown arbitrary return (exportingModule, exports) instance Arbitrary PackageName where arbitrary = mkPackageName <$> listOf1 (scaleDown arbitrary `suchThat` isPackageNameConstituent) instance Arbitrary ModuleName where arbitrary = ModuleName.fromString . intercalate "." <$> scaleDown (listOf1 genSegment) where genSegment = do x <- arbitrary `suchThat` isModuleSegmentFirstChar xs <- listOf (arbitrary `suchThat` isModuleSegmentConstituent) return (x : xs) scaleDown :: Gen a -> Gen a scaleDown = scale (`div` 4) spec :: Spec spec = do describe "parseFixityOverrides & printFixityOverrides" $ it "arbitrary fixity maps are printed and parsed back correctly" $ property $ \fixityOverrides moduleReexports -> parseDotOrmolu "" (printDotOrmolu fixityOverrides moduleReexports) `shouldParse` (fixityOverrides, moduleReexports) fourmolu-0.18.0.0/tests/Ormolu/FixitySpec.hs0000644000000000000000000002655214745250261017056 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ormolu.FixitySpec (spec) where import Data.Choice (pattern Without) import Data.Function ((&)) import Data.List.NonEmpty (NonEmpty (..)) import Data.Map.Strict qualified as Map import Data.Set qualified as Set import Data.Text qualified as T import Distribution.ModuleName (ModuleName) import Distribution.Types.PackageName (PackageName) import GHC.Types.Name (OccName) import GHC.Types.Name.Occurrence (mkVarOcc) import GHC.Types.Name.Reader import Language.Haskell.Syntax.ImpExp (ImportListInterpretation (..)) import Language.Haskell.Syntax.Module.Name (mkModuleName) import Ormolu.Fixity import Ormolu.Fixity.Imports import Ormolu.Fixity.Internal import Ormolu.Utils (showOutputable) import Test.Hspec instance Show RdrName where show = showOutputable spec :: Spec spec = do it "gives the correct fixity info for (:) (built-in)" $ checkFixities [] [] [(unqual ":", FixityApproximation (Just InfixR) 5 5)] it "does not know operators from base if base is not a dependency" $ checkFixities [] [] [ (unqual "$", defaultFixityApproximation), (unqual "+", defaultFixityApproximation), (unqual "++", defaultFixityApproximation) ] it "does not know operators from base if Prelude is not imported" $ checkFixities [] [] [ (unqual "$", defaultFixityApproximation), (unqual "+", defaultFixityApproximation), (unqual "++", defaultFixityApproximation) ] it "infers fixities of operators from base correctly" $ checkFixities ["base"] [import_ "Prelude"] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", FixityApproximation (Just InfixL) 6 6), (unqual "++", FixityApproximation (Just InfixR) 5 5) ] it "does not know (>>>) when Control.Category is not imported" $ checkFixities ["base"] [import_ "Prelude"] [ (unqual ">>>", defaultFixityApproximation) ] it "infer correct fixity for (>>>) when Control.Category is imported" $ checkFixities ["base"] [ import_ "Prelude", import_ "Control.Category" ] [ (unqual ">>>", FixityApproximation (Just InfixR) 1 1) ] it "handles 'as' imports correctly" $ checkFixities ["base"] [ import_ "Control.Category" & as_ "Foo" ] [ (unqual ">>>", FixityApproximation (Just InfixR) 1 1), (qual "Foo" ">>>", FixityApproximation (Just InfixR) 1 1), (qual "Bar" ">>>", defaultFixityApproximation) ] it "handles 'qualified' imports correctly" $ checkFixities ["base"] [import_ "Control.Category" & qualified_] [ (unqual ">>>", defaultFixityApproximation), (qual "Control.Category" ">>>", FixityApproximation (Just InfixR) 1 1) ] it "handles 'qualified as' imports correctly" $ checkFixities ["base"] [import_ "Control.Category" & qualified_ & as_ "Foo"] [ (unqual ">>>", defaultFixityApproximation), (qual "Control.Category" ">>>", defaultFixityApproximation), (qual "Foo" ">>>", FixityApproximation (Just InfixR) 1 1) ] it "handles explicit import lists correctly" $ checkFixities ["base"] [import_ "Prelude" & exactly_ ["$"]] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation) ] it "handles hiding import lists correctly" $ checkFixities ["base"] [import_ "Prelude" & hiding_ ["$"]] [ (unqual "$", defaultFixityApproximation), (unqual "+", FixityApproximation (Just InfixL) 6 6), (unqual "++", FixityApproximation (Just InfixR) 5 5) ] it "handles qualified imports with explicit import lists correctly" $ checkFixities ["base"] [import_ "Prelude" & qualified_ & exactly_ ["$"]] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", defaultFixityApproximation) ] it "handles qualified import with hiding correctly" $ checkFixities ["base"] [import_ "Prelude" & qualified_ & hiding_ ["$"]] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", defaultFixityApproximation), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and explicit import lists correctly (1)" $ checkFixities ["base"] [ import_ "Prelude" & qualified_, import_ "Prelude" & exactly_ ["$"] ] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and explicit import lists correctly (2)" $ checkFixities ["base"] [ import_ "Prelude" & exactly_ ["$"], import_ "Prelude" & qualified_ ] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", defaultFixityApproximation), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and hiding import correctly (1)" $ checkFixities ["base"] [ import_ "Prelude" & qualified_, import_ "Prelude" & hiding_ ["$"] ] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", FixityApproximation (Just InfixL) 6 6), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "handles qualified import and hiding import correctly (2)" $ checkFixities ["base"] [ import_ "Prelude" & hiding_ ["$"], import_ "Prelude" & qualified_ ] [ (unqual "$", defaultFixityApproximation), (qual "Prelude" "$", FixityApproximation (Just InfixR) 0 0), (unqual "+", FixityApproximation (Just InfixL) 6 6), (qual "Prelude" "+", FixityApproximation (Just InfixL) 6 6) ] it "works for several imports from different packages" $ checkFixities ["base", "esqueleto"] [ import_ "Prelude", import_ "Database.Esqueleto.Experimental" & qualified_ & as_ "E" ] [ (unqual "$", FixityApproximation (Just InfixR) 0 0), (qual "E" "++.", FixityApproximation (Just InfixR) 5 5), (qual "E" "on", FixityApproximation (Just InfixN) 9 9) ] it "merges approximations in case of a conflict" $ checkFixities ["fclabels", "persistent"] [ import_ "Data.Label.Monadic", import_ "Database.Persist" ] [ (unqual "=.", FixityApproximation (Just InfixR) 2 3) ] it "correctly handles package-qualified imports (1)" $ checkFixities ["esqueleto"] [package_ "esqueleto" $ import_ "Database.Esqueleto.Experimental"] [(unqual "++.", FixityApproximation (Just InfixR) 5 5)] it "correctly handles package-qualified imports (2)" $ checkFixities ["esqueleto"] [package_ "bob" $ import_ "Database.Esqueleto.Experimental"] [(unqual "++.", defaultFixityApproximation)] it "default module re-exports: Control.Lens brings into scope Control.Lens.Lens" $ checkFixities ["lens"] ( applyModuleReexports defaultModuleReexports [import_ "Control.Lens"] ) [(unqual "<+~", FixityApproximation (Just InfixR) 4 4)] it "default module re-exports: Control.Lens qualified brings into scope Control.Lens.Lens" $ checkFixities ["lens"] ( applyModuleReexports defaultModuleReexports [import_ "Control.Lens" & qualified_] ) [ (unqual "<+~", defaultFixityApproximation), (qual "Control.Lens.Lens" "<+~", defaultFixityApproximation), (qual "Control.Lens" "<+~", FixityApproximation (Just InfixR) 4 4) ] it "default module re-exports: Control.Lens qualified as brings into scope Control.Lens.Lens" $ checkFixities ["lens"] ( applyModuleReexports defaultModuleReexports [import_ "Control.Lens" & qualified_ & as_ "L"] ) [ (unqual "<+~", defaultFixityApproximation), (qual "Control.Lens.Lens" "<+~", defaultFixityApproximation), (qual "Control.Lens" "<+~", defaultFixityApproximation), (qual "L" "<+~", FixityApproximation (Just InfixR) 4 4) ] it "re-export chains: exported module can itself re-export another module" $ do let reexports = ModuleReexports $ Map.insert "Foo" ((Nothing, "Control.Lens") :| []) (unModuleReexports defaultModuleReexports) checkFixities ["lens"] ( applyModuleReexports reexports [import_ "Foo"] ) [ (unqual "<+~", FixityApproximation (Just InfixR) 4 4) ] -- | Build a fixity map using the Hoogle database and then check the fixity -- of the specified subset of operators. checkFixities :: -- | List of dependencies [PackageName] -> -- | Imports [FixityImport] -> -- | Associative list representing a subset of the resulting fixity map -- that should be checked. [(RdrName, FixityApproximation)] -> Expectation checkFixities dependencies fixityImports expectedResult = actualResult `shouldBe` expectedResult where actualResult = fmap (\(k, _) -> (k, inferFixity (Without #debug) k resultMap)) expectedResult resultMap = moduleFixityMap (packageFixityMap (Set.fromList dependencies)) fixityImports qual :: String -> OpName -> RdrName qual moduleName opName = mkRdrQual (mkModuleName moduleName) (opNameToOccName opName) unqual :: OpName -> RdrName unqual = mkRdrUnqual . opNameToOccName opNameToOccName :: OpName -> OccName opNameToOccName = mkVarOcc . T.unpack . unOpName -- | Explicitly specify the package. package_ :: PackageName -> FixityImport -> FixityImport package_ packageName fixityImport = fixityImport { fimportPackage = Just packageName } -- | Construct a simple 'FixityImport'. import_ :: ModuleName -> FixityImport import_ moduleName = FixityImport { fimportPackage = Nothing, fimportModule = moduleName, fimportQualified = UnqualifiedAndQualified moduleName, fimportList = Nothing } -- | Adds an alias for an import. as_ :: ModuleName -> FixityImport -> FixityImport as_ moduleName fixityImport = fixityImport { fimportQualified = case fimportQualified fixityImport of UnqualifiedAndQualified _ -> UnqualifiedAndQualified moduleName OnlyQualified _ -> OnlyQualified moduleName } -- | Qualified imports. qualified_ :: FixityImport -> FixityImport qualified_ fixityImport = fixityImport { fimportQualified = case fimportQualified fixityImport of UnqualifiedAndQualified m -> OnlyQualified m OnlyQualified m -> OnlyQualified m } -- | Exact import lists. exactly_ :: [OpName] -> FixityImport -> FixityImport exactly_ opNames fixityImports = fixityImports { fimportList = Just (Exactly, opNames) } -- | Hiding. hiding_ :: [OpName] -> FixityImport -> FixityImport hiding_ opNames fixityImports = fixityImports { fimportList = Just (EverythingBut, opNames) } fourmolu-0.18.0.0/tests/Ormolu/OpTreeSpec.hs0000644000000000000000000001041014745250261016762 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} module Ormolu.OpTreeSpec (spec) where import Data.Choice (pattern Without) import Data.Map.Strict qualified as Map import Data.Text (Text) import Data.Text qualified as T import GHC.Types.Name (mkOccName, varName) import GHC.Types.Name.Reader (mkRdrUnqual) import Ormolu.Fixity import Ormolu.Fixity.Internal import Ormolu.Printer.Operators import Test.Hspec n :: Text -> OpTree Text OpName n = OpNode -- | Check that the input tree is actually reassociated as expected. checkReassociate :: -- | Fixity map used for the reassociation [(OpName, FixityInfo)] -> -- | Input tree OpTree Text OpName -> -- | Expected output tree OpTree Text OpName -> Expectation checkReassociate fixities inputTree expectedOutputTree = removeOpInfo actualOutputTree `shouldBe` expectedOutputTree where removeOpInfo (OpNode x) = OpNode x removeOpInfo (OpBranches exprs ops) = OpBranches (removeOpInfo <$> exprs) (opiOp <$> ops) actualOutputTree = reassociateOpTree (Without #debug) convertName modFixityMap inputTree modFixityMap = ModuleFixityMap (Map.map Given (Map.fromList fixities)) convertName = Just . mkRdrUnqual . mkOccName varName . T.unpack . unOpName spec :: Spec spec = do it "flattens a tree correctly" $ do let inputTree = OpBranches [ OpBranches [OpBranches [n "a", n "b"] ["+"], n "c"] ["+"], n "d" ] ["+"] outputTree = OpBranches [n "a", n "b", n "c", n "d"] ["+", "+", "+"] fixities = [("+", FixityInfo InfixL 5)] checkReassociate fixities inputTree outputTree it "uses 'minOps' strategy by default" $ do let inputTree = OpBranches [n "a", n "b", n "c", n "d", n "e", n "f"] ["*", "*", "+", "*", "-"] outputTree = OpBranches [ OpBranches [n "a", n "b", n "c"] ["*", "*"], OpBranches [n "d", n "e"] ["*"], n "f" ] ["+", "-"] fixities = [ ("+", FixityInfo InfixL 5), ("*", FixityInfo InfixL 7), ("-", FixityInfo InfixL 5) ] checkReassociate fixities inputTree outputTree it "uses 'maxOps' strategy if 'minOps' strategy fails" $ do let inputTree = OpBranches [n "a", n "b", n "c", n "d", n "e", n "f"] ["*", "*", "+", "*", "-"] outputTree = OpBranches [ OpBranches [n "a", n "b", n "c"] ["*", "*"], OpBranches [n "d", n "e"] ["*"], n "f" ] ["+", "-"] fixities = [ ("+", FixityInfo InfixL 5), ("*", FixityInfo InfixL 8), ("-", FixityInfo InfixL 5) ] checkReassociate fixities inputTree outputTree it "defaults to 'hardSplitter' strategy if both 'minOps' and 'maxOps' \ \strategies fail" $ do let inputTree = OpBranches [n "a", n "b", n "c", n "d", n "e", n "f"] ["@", "@", "|", "@", "$"] outputTree = OpBranches [ OpBranches [n "a", n "b", n "c", n "d", n "e"] ["@", "@", "|", "@"], n "f" ] ["$"] fixities = [ ("@", FixityInfo InfixL 4), ("|", FixityInfo InfixL 4), ("$", FixityInfo InfixR 0) ] checkReassociate fixities inputTree outputTree it "reassociates correctly: complex example 1" $ do let inputTree = OpBranches [n "f", n "1", n "2", n "3", n "4", n "5", n "6"] ["$", "+", "*", "$", "*", "+"] outputTree = OpBranches [ n "f", OpBranches [n "1", OpBranches [n "2", n "3"] ["*"]] ["+"], OpBranches [OpBranches [n "4", n "5"] ["*"], n "6"] ["+"] ] ["$", "$"] fixities = [ ("$", FixityInfo InfixR 0), ("+", FixityInfo InfixL 6), ("*", FixityInfo InfixL 7) ] checkReassociate fixities inputTree outputTree fourmolu-0.18.0.0/tests/Ormolu/Parser/OptionsSpec.hs0000644000000000000000000000171514745250261020463 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Ormolu.Parser.OptionsSpec (spec) where import Data.Text qualified as T import Ormolu import Test.Hspec spec :: Spec spec = describe "GHC options in source files take priority" $ do it "default extensions can be disabled locally" $ do let src = T.unlines [ "{-# LANGUAGE NoBlockArguments #-}", "", "test = test do test" ] fixedPoint [] src `shouldThrow` \case OrmoluParsingFailed {} -> True _ -> False it "extensions disabled via CLI can be enabled locally" $ do let src = T.unlines [ "{-# LANGUAGE BlockArguments #-}", "", "test = test do test" ] fixedPoint ["-XNoBlockArguments"] src where fixedPoint opts input = do output <- ormolu defaultConfig {cfgDynOptions = DynOption <$> opts} "" input output `shouldBe` input fourmolu-0.18.0.0/tests/Ormolu/Parser/ParseFailureSpec.hs0000644000000000000000000000131014745250261021401 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" fourmolu-0.18.0.0/tests/Ormolu/Parser/PragmaSpec.hs0000644000000000000000000000224514745250261020236 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} module Ormolu.Parser.PragmaSpec (spec) where import Data.Text (Text) import Data.Text qualified as T import Ormolu.Parser.Pragma import Test.Hspec spec :: Spec spec = describe "parsePragma" $ do stdTest "{-# LANGUAGE Foo #-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# language Foo #-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-#LANGUAGE Foo#-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# LANGUAGE Foo#-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-#language Foo#-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# lAngUAGe Foo #-}" (Just (PragmaLanguage ["Foo"])) stdTest "{-# LANGUAGE Foo, Bar #-}" (Just (PragmaLanguage ["Foo", "Bar"])) stdTest "{-# LANGUAGE Foo Bar #-}" Nothing stdTest "{-# BOO Foo #-}" Nothing stdTest "something" Nothing stdTest "{-# LANGUAGE foo, Bar #-}" Nothing stdTest "{-# OPTIONS_GHC foo bar baz #-}" (Just $ PragmaOptionsGHC "foo bar baz") stdTest "{-#OPTIONS_HADDOCK foo, bar, baz #-}" (Just $ PragmaOptionsHaddock "foo, bar, baz") stdTest :: Text -> Maybe Pragma -> Spec stdTest input result = it (T.unpack input) $ parsePragma input `shouldBe` result fourmolu-0.18.0.0/tests/Ormolu/PrinterSpec.hs0000644000000000000000000001147114745250261017217 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Ormolu.PrinterSpec (spec) where import Control.Exception import Control.Monad import Data.List (isSuffixOf) import Data.Map qualified as Map import Data.Maybe (isJust) import Data.Set qualified as Set import Data.Text (Text) import Data.Text qualified as T import Data.Text.IO.Utf8 qualified as T.Utf8 import Data.Yaml qualified as Yaml import Ormolu import Ormolu.Config import Ormolu.Fixity import Path import Path.IO import System.Environment (lookupEnv) import System.FilePath qualified as F import Test.Hspec spec :: Spec spec = do -- Config for normal Ormolu output + default Fourmolu output ormoluConfig <- runIO $ Yaml.decodeFileEither "fourmolu.yaml" >>= either (error . show) pure let ormoluPrinterOpts = resolvePrinterOpts [cfgFilePrinterOpts ormoluConfig] es <- runIO locateExamples sequence_ $ checkExample <$> [(ormoluPrinterOpts, "ormolu", "-out"), (defaultPrinterOpts, "fourmolu", "-four-out")] <*> es -- | Fixity overrides that are to be used with the test examples. testsuiteOverrides :: FixityOverrides testsuiteOverrides = FixityOverrides ( Map.fromList [ (".=", FixityInfo InfixR 8), ("#", FixityInfo InfixR 5), (">~<", FixityInfo InfixR 3), ("|~|", FixityInfo InfixR 3.3), ("<~>", FixityInfo InfixR 3.7) ] ) -- | Check a single given example. checkExample :: (PrinterOptsTotal, String, String) -> Path Rel File -> Spec checkExample (printerOpts, label, suffix) srcPath' = it (fromRelFile srcPath' ++ " works (" ++ label ++ ")") . withNiceExceptions $ do let srcPath = examplesDir srcPath' inputPath = fromRelFile srcPath config = defaultConfig { cfgPrinterOpts = printerOpts, cfgSourceType = detectSourceType inputPath, cfgFixityOverrides = testsuiteOverrides, cfgDependencies = Set.fromList [ "base", "esqueleto", "hspec", "lens", "servant" ] } expectedOutputPath <- deriveOutput srcPath suffix -- 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.Utf8.writeFile (fromRelFile expectedOutputPath) formatted0 expected <- T.Utf8.readFile $ 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 -> String -> IO (Path Rel File) deriveOutput path suffix = parseRelFile $ F.addExtension (radical ++ suffix) 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 fourmolu-0.18.0.0/tests/Ormolu/Config/PrinterOptsSpec.hs0000644000000000000000000004367514745250261021305 0ustar0000000000000000{-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -- | Tests for Fourmolu configuration options. Similar to PrinterSpec.hs -- -- Writing as a separate file to avoid merge conflicts in PrinterSpec.hs. This -- way, Fourmolu can implement its tests independently of how Ormolu does its -- testing. module Ormolu.Config.PrinterOptsSpec (spec) where import Control.Exception (catch) import Control.Monad (forM_, when) import Data.Algorithm.DiffContext qualified as Diff import Data.Char (isSpace) import Data.List.NonEmpty qualified as NonEmpty import Data.Maybe (isJust) import Data.Set qualified as S import Data.Text (Text) import Data.Text qualified as T import Data.Text.IO.Utf8 qualified as T.Utf8 import Distribution.ModuleName qualified as ModuleName import Distribution.Types.PackageName (mkPackageName) import GHC.Stack (withFrozenCallStack) import Ormolu (detectSourceType, ormolu) import Ormolu.Config import Ormolu.Exception (OrmoluException, printOrmoluException) import Ormolu.Terminal (runTerm) import Ormolu.Utils.Glob (mkGlob) import Path ( File, Path, Rel, fromRelFile, parseRelDir, parseRelFile, toFilePath, (), ) import Path.IO (doesFileExist) import System.Environment (lookupEnv) import System.IO (hClose) import System.IO.Temp (withSystemTempFile) import System.IO.Unsafe (unsafePerformIO) import Test.Hspec import Text.PrettyPrint qualified as Doc import Text.Printf (printf) data TestGroup = forall a. TestGroup { label :: String, -- | When True, takes input from 'input-multi.hs' instead of 'input.hs', where sections -- delimited by `{- // -}` will be formatted as separate Haskell files. Useful for testing -- combinations of module headers, which is normally only allowed once. isMulti :: Bool, testCases :: [a], updateConfig :: a -> PrinterOptsTotal -> PrinterOptsTotal, showTestCase :: a -> String, testCaseSuffix :: a -> String, checkIdempotence :: Bool } -- Tests where each test group is a directory with an `input.hs` file and multiple `output-*.hs` -- files that could be regenerated with ORMOLU_REGENERATE_EXAMPLES. spec :: Spec spec = mapM_ runTestGroup $ [ TestGroup { label = "indentation", isMulti = False, testCases = (,) <$> [2, 3, 4] <*> allOptions, updateConfig = \(indent, indentWheres) opts -> opts { poIndentation = pure indent, poIndentWheres = pure indentWheres }, showTestCase = \(indent, indentWheres) -> show indent ++ if indentWheres then " + indent wheres" else "", testCaseSuffix = \(indent, indentWheres) -> suffixWith [show indent, if indentWheres then "indent_wheres" else ""], checkIdempotence = True }, TestGroup { label = "column-limit", isMulti = True, testCases = [NoLimit, ColumnLimit 80, ColumnLimit 100], updateConfig = \columnLimit opts -> opts {poColumnLimit = pure columnLimit}, showTestCase = show, testCaseSuffix = \columnLimit -> let limitStr = case columnLimit of NoLimit -> "none" ColumnLimit x -> show x in suffixWith ["limit=" ++ limitStr], checkIdempotence = False }, TestGroup { label = "function-arrows", isMulti = False, testCases = allOptions, updateConfig = \functionArrows opts -> opts {poFunctionArrows = pure functionArrows}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "comma-style", isMulti = False, testCases = allOptions, updateConfig = \commaStyle opts -> opts {poCommaStyle = pure commaStyle}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "import-export", isMulti = True, testCases = allOptions, updateConfig = \commaStyle opts -> opts {poImportExportStyle = pure commaStyle}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "import-grouping", isMulti = False, testCases = [ ImportGroupPreserve, ImportGroupSingle, ImportGroupByQualified, ImportGroupByScope, ImportGroupByScopeThenQualified, ImportGroupCustom . NonEmpty.fromList $ [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Data.Text"), igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = defaultImportRulePriority } ] }, ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = ImportRulePriority 100 } ] }, ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "SomeInternal.**"), igrQualifiedMatcher = MatchQualifiedOnly, igrPriority = defaultImportRulePriority }, ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Unknown.**"), igrQualifiedMatcher = MatchUnqualifiedOnly, igrPriority = defaultImportRulePriority } ] }, ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchLocalModules, igrQualifiedMatcher = MatchUnqualifiedOnly, igrPriority = defaultImportRulePriority }, ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = MatchQualifiedOnly, igrPriority = defaultImportRulePriority } ] } ] ], updateConfig = \igs opts -> opts { poImportGrouping = pure igs }, showTestCase = showStrategy, testCaseSuffix = \igs -> suffixWith [showStrategy igs], checkIdempotence = True }, TestGroup { label = "record-brace-space", isMulti = False, testCases = allOptions, updateConfig = \recordBraceSpace opts -> opts {poRecordBraceSpace = pure recordBraceSpace}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "newlines-between-decls", isMulti = False, testCases = (,) <$> [0, 1, 2] <*> allOptions, updateConfig = \(newlines, respectful) opts -> opts { poNewlinesBetweenDecls = pure newlines, poRespectful = pure respectful }, showTestCase = \(newlines, respectful) -> show newlines ++ if respectful then " (respectful)" else "", testCaseSuffix = \(newlines, respectful) -> suffixWith [show newlines, if respectful then "respectful" else ""], checkIdempotence = True }, TestGroup { label = "haddock-style", isMulti = False, testCases = (,) <$> allOptions <*> (PrintStyleInherit : map PrintStyleOverride allOptions), updateConfig = \(haddockStyle, haddockStyleModule) opts -> opts { poHaddockStyle = pure haddockStyle, poHaddockStyleModule = pure haddockStyleModule }, showTestCase = \(haddockStyle, haddockStyleModule) -> show haddockStyle ++ case haddockStyleModule of PrintStyleInherit -> "" PrintStyleOverride style -> " + module=" ++ show style, testCaseSuffix = \(haddockStyle, haddockStyleModule) -> suffixWith [ show haddockStyle, case haddockStyleModule of PrintStyleInherit -> "" PrintStyleOverride style -> "module=" ++ show style ], checkIdempotence = True }, TestGroup { label = "let-style", isMulti = False, testCases = (,,) <$> allOptions <*> allOptions <*> [2, 4], updateConfig = \(letStyle, inStyle, indent) opts -> opts { poIndentation = pure indent, poLetStyle = pure letStyle, poInStyle = pure inStyle }, showTestCase = \(letStyle, inStyle, indent) -> printf "%s + %s (indent=%d)" (show letStyle) (show inStyle) indent, testCaseSuffix = \(letStyle, inStyle, indent) -> suffixWith [show letStyle, show inStyle, "indent=" ++ show indent], checkIdempotence = True }, TestGroup { label = "single-constraint-parens", isMulti = False, testCases = allOptions, updateConfig = \parens opts -> opts {poSingleConstraintParens = pure parens}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "single-deriving-parens", isMulti = False, testCases = allOptions, updateConfig = \parens opts -> opts {poSingleDerivingParens = pure parens}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "sort-constraints", isMulti = False, testCases = allOptions, updateConfig = \sortConstraints options -> options {poSortConstraints = pure sortConstraints}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "sort-derived-classes", isMulti = False, testCases = allOptions, updateConfig = \sortDerivedClasses opts -> opts {poSortDerivedClasses = pure sortDerivedClasses}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "sort-deriving-clauses", isMulti = False, testCases = allOptions, updateConfig = \sortDerivingClauses opts -> opts {poSortDerivingClauses = pure sortDerivingClauses}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "trailing-section-operators", isMulti = False, testCases = allOptions, updateConfig = \trailingSectionOperators opts -> opts {poTrailingSectionOperators = pure trailingSectionOperators}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "unicode-syntax", isMulti = False, testCases = allOptions, updateConfig = \unicodePreference options -> options {poUnicode = pure unicodePreference}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "respectful", isMulti = False, testCases = allOptions, updateConfig = \respectful opts -> opts {poRespectful = pure respectful}, showTestCase = show, testCaseSuffix = suffix1, checkIdempotence = True }, TestGroup { label = "respectful-module-where", isMulti = True, testCases = (,) <$> allOptions <*> allOptions, updateConfig = \(respectful, importExportStyle) opts -> opts { poRespectful = pure respectful, poImportExportStyle = pure importExportStyle }, showTestCase = \(respectful, importExportStyle) -> (if respectful then "respectful" else "not respectful") ++ " + " ++ show importExportStyle, testCaseSuffix = \(respectful, importExportStyle) -> suffixWith ["respectful=" ++ show respectful, show importExportStyle], checkIdempotence = True } ] runTestGroup :: TestGroup -> Spec runTestGroup TestGroup {..} = describe label $ forM_ testCases $ \testCase -> it ("generates the correct output for: " ++ showTestCase testCase) $ do let inputFile = testDir toRelFile (if isMulti then "input-multi.hs" else "input.hs") inputPath = fromRelFile inputFile outputFile = testDir toRelFile ("output" ++ testCaseSuffix testCase ++ ".hs") opts = updateConfig testCase defaultPrinterOpts input <- T.Utf8.readFile inputPath actual <- if isMulti then overSectionsM (T.pack "{- // -}") (runOrmolu opts checkIdempotence inputPath) input else runOrmolu opts checkIdempotence inputPath input checkResult outputFile actual where testDir = toRelDir $ "data/fourmolu/" ++ label toRelDir name = case parseRelDir name of Just path -> path Nothing -> error $ "Not a valid directory name: " ++ show name toRelFile name = case parseRelFile name of Just path -> path Nothing -> error $ "Not a valid file name: " ++ show name runOrmolu :: PrinterOptsTotal -> Bool -> FilePath -> Text -> IO Text runOrmolu opts checkIdempotence inputPath input = ormolu config inputPath input `catch` \e -> do msg <- renderOrmoluException e expectationFailure' $ unlines ["Got ormolu exception:", "", msg] where config = defaultConfig { cfgPrinterOpts = opts, cfgSourceType = detectSourceType inputPath, cfgCheckIdempotence = checkIdempotence, cfgDependencies = S.fromList [mkPackageName "base"], cfgLocalModules = S.fromList $ ModuleName.fromString <$> [ "SomeInternal.Module1", "SomeInternal.Module1.SubModuleA", "SomeInternal.Module2" ] } checkResult :: Path Rel File -> Text -> Expectation checkResult outputFile actual | shouldRegenerateOutput = T.Utf8.writeFile (fromRelFile outputFile) actual | otherwise = getFileContents outputFile >>= \case Nothing -> expectationFailure "Output does not exist. Try running with ORMOLU_REGENERATE_EXAMPLES=1" Just expected -> when (actual /= expected) $ expectationFailure . T.unpack $ getDiff ("actual", actual) ("expected", expected) {--- Helpers ---} allOptions :: (Enum a, Bounded a) => [a] allOptions = [minBound .. maxBound] suffixWith :: [String] -> String suffixWith xs = concatMap ('-' :) . filter (not . null) $ xs suffix1 :: (Show a) => a -> String suffix1 a1 = suffixWith [show a1] overSectionsM :: (Monad m) => Text -> (Text -> m Text) -> Text -> m Text overSectionsM delim f = go . T.lines where go inputLines = case break (== delim) inputLines of (section, []) -> f $ T.unlines section (pre, _ : post) -> do let (section, delimPre) = spanEnd (T.all isSpace) pre (delimPost, rest) = span (T.all isSpace) post resultPre <- f $ T.unlines section let delimLines = T.unlines $ concat [delimPre, [delim], delimPost] resultPost <- go rest pure $ resultPre <> delimLines <> resultPost getFileContents :: Path b File -> IO (Maybe Text) getFileContents path = do fileExists <- doesFileExist path if fileExists then Just <$> T.Utf8.readFile (toFilePath path) else pure Nothing getDiff :: (String, Text) -> (String, Text) -> Text getDiff (s1Name, s1) (s2Name, s2) = T.pack . Doc.render $ Diff.prettyContextDiff (Doc.text s1Name) (Doc.text s2Name) (Doc.text . T.unpack . Diff.unnumber) $ Diff.getContextDiff (Just 2) (T.lines s1) (T.lines s2) renderOrmoluException :: OrmoluException -> IO String renderOrmoluException e = withSystemTempFile "PrinterOptsSpec" $ \fp handle -> do runTerm (printOrmoluException e) Never handle hClose handle readFile fp expectationFailure' :: (HasCallStack) => String -> IO a expectationFailure' msg = do withFrozenCallStack $ expectationFailure msg -- satisfy type-checker, since hspec's expectationFailure is IO () error "unreachable" shouldRegenerateOutput :: Bool shouldRegenerateOutput = -- Use same env var as PrinterSpec.hs, to make it easy to regenerate everything at once unsafePerformIO $ isJust <$> lookupEnv "ORMOLU_REGENERATE_EXAMPLES" {-# NOINLINE shouldRegenerateOutput #-} {--- Utilities ---} spanEnd :: (a -> Bool) -> [a] -> ([a], [a]) spanEnd f xs = let xs' = reverse xs in (reverse $ dropWhile f xs', reverse $ takeWhile f xs') showStrategy :: ImportGrouping -> String showStrategy igs = case igs of ImportGroupCustom _ -> "custom" _ -> show igs fourmolu-0.18.0.0/tests/Ormolu/ConfigSpec.hs0000644000000000000000000003652514745250261017010 0ustar0000000000000000{-# LANGUAGE OverloadedStrings #-} -- | Tests for Fourmolu file configuration. module Ormolu.ConfigSpec (spec) where import Data.ByteString.Char8 qualified as Char8 import Data.List (isInfixOf) import Data.List.NonEmpty qualified as NonEmpty import Data.Map qualified as Map import Data.Yaml qualified as Yaml import Ormolu.Config (FourmoluConfig (..), ImportGroup (..), ImportGroupRule (..), ImportGrouping (..), ImportModuleMatcher (..), ImportRulePriority (ImportRulePriority), PrinterOpts (..), QualifiedImportMatcher (MatchBothQualifiedAndUnqualified, MatchQualifiedOnly, MatchUnqualifiedOnly), defaultImportRulePriority, matchAllRulePriority, resolvePrinterOpts) import Ormolu.Fixity (ModuleReexports (..)) import Ormolu.Utils.Glob (mkGlob) import Test.Hspec spec :: Spec spec = do describe "FourmoluConfig" $ do it "parses multiple reexports from same module" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "reexports:", "- module Foo exports Bar1", "- module Foo exports Bar2" ] let expected = Map.fromList [ ("Foo", NonEmpty.fromList [(Nothing, "Bar2"), (Nothing, "Bar1")]) ] cfgFileReexports config `shouldBe` ModuleReexports expected it "applies configurations in correct order" $ do let opts1 = mempty {poIndentation = Just 2} opts2 = mempty {poIndentation = Just 4} configs = [opts1, opts2] poIndentation (resolvePrinterOpts configs) `shouldBe` 4 context "when using an import grouping configuration" $ do it "parses 'legacy' as the 'ImportGroupLegacy' import grouping strategy" $ do config <- Yaml.decodeThrow "import-grouping: legacy" let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) actualStrategy `shouldBe` Just ImportGroupLegacy it "parses 'preserve' as the 'ImportGroupPreserve' import grouping strategy" $ do config <- Yaml.decodeThrow "import-grouping: preserve" let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) actualStrategy `shouldBe` Just ImportGroupPreserve it "parses 'single' as the 'ImportGroupSingle' import grouping strategy" $ do config <- Yaml.decodeThrow "import-grouping: single" let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) actualStrategy `shouldBe` Just ImportGroupSingle it "parses 'by-qualified' as the 'ImportGroupByQualified' import grouping strategy" $ do config <- Yaml.decodeThrow "import-grouping: by-qualified" let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) actualStrategy `shouldBe` Just ImportGroupByQualified it "parses 'by-scope' as the 'ImportGroupByScope' import grouping strategy" $ do config <- Yaml.decodeThrow "import-grouping: by-scope" let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) actualStrategy `shouldBe` Just ImportGroupByScope it "parses 'by-scope-then-qualified' as the 'ImportGroupByScopeThenQualified' import grouping strategy" $ do config <- Yaml.decodeThrow "import-grouping: by-scope-then-qualified" let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) actualStrategy `shouldBe` Just ImportGroupByScopeThenQualified it "fails when an unknown strategy is requested" $ do let decodeResult = Yaml.decodeEither' @FourmoluConfig "import-grouping: fake-strategy" isAnUnknownStrategyValue e = case e of Left (Yaml.AesonException msg) -> "unknown strategy value" `isInfixOf` msg _ -> False decodeResult `shouldSatisfy` isAnUnknownStrategyValue it "parses a grouping rule's name" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - name: Some name", " rules:", " - match: all" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Just "Some name", igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = matchAllRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "enables the 'qualified' rule option" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - glob: \"**\"", " qualified: yes" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "**"), igrQualifiedMatcher = MatchQualifiedOnly, igrPriority = defaultImportRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "disables the 'qualified' rule option" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - glob: \"**\"", " qualified: no" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "**"), igrQualifiedMatcher = MatchUnqualifiedOnly, igrPriority = defaultImportRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "decodes the 'priority' rule option" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - match: all", " priority: 55" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = ImportRulePriority 55 } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "parses a 'glob' rule" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - glob: Data.Text.**" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Data.Text.**"), igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = defaultImportRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "parses a 'match' rule for local modules" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - match: local-modules" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchLocalModules, igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = defaultImportRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "parses a 'match' rule for all modules" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - match: all" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Nothing, igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = matchAllRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "parses multiple group configurations and rules in their order of appearance in the configuration" $ do config <- Yaml.decodeThrow . Char8.pack . unlines $ [ "import-grouping:", " - name: Text modules", " rules:", " - glob: Data.Text", " - name: The rest", " rules:", " - match: all", " priority: 100", " - name: My internals and monads unqualified", " rules:", " - match: local-modules", " qualified: no", " - glob: Control.Monad", " qualified: no", " - name: My internals and monads qualified", " rules:", " - match: local-modules", " qualified: yes", " - glob: Control.Monad", " qualified: yes", " - name: Specific monads", " rules:", " - glob: Control.Monad.**" ] let actualStrategy = poImportGrouping (cfgFilePrinterOpts config) expectedRules = NonEmpty.fromList [ ImportGroup { igName = Just "Text modules", igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Data.Text"), igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = defaultImportRulePriority } ] }, ImportGroup { igName = Just "The rest", igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchAllModules, igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = ImportRulePriority 100 } ] }, ImportGroup { igName = Just "My internals and monads unqualified", igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchLocalModules, igrQualifiedMatcher = MatchUnqualifiedOnly, igrPriority = defaultImportRulePriority }, ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Control.Monad"), igrQualifiedMatcher = MatchUnqualifiedOnly, igrPriority = defaultImportRulePriority } ] }, ImportGroup { igName = Just "My internals and monads qualified", igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchLocalModules, igrQualifiedMatcher = MatchQualifiedOnly, igrPriority = defaultImportRulePriority }, ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Control.Monad"), igrQualifiedMatcher = MatchQualifiedOnly, igrPriority = defaultImportRulePriority } ] }, ImportGroup { igName = Just "Specific monads", igRules = NonEmpty.fromList [ ImportGroupRule { igrModuleMatcher = MatchGlob (mkGlob "Control.Monad.**"), igrQualifiedMatcher = MatchBothQualifiedAndUnqualified, igrPriority = defaultImportRulePriority } ] } ] actualStrategy `shouldBe` Just (ImportGroupCustom expectedRules) it "fails when a rule cannot be identified" $ do let decodeResult = Yaml.decodeEither' @FourmoluConfig . Char8.pack . unlines $ [ "import-grouping:", " - rules:", " - some-unknown-rule-type: whatever" ] isAnUnknownModuleMatcher e = case e of Left (Yaml.AesonException msg) -> "Unknown or invalid module matcher" `isInfixOf` msg _ -> False decodeResult `shouldSatisfy` isAnUnknownModuleMatcher fourmolu-0.18.0.0/tests/Ormolu/Integration/CLIOptionsSpec.hs0000644000000000000000000000443214745250261022041 0ustar0000000000000000module Ormolu.Integration.CLIOptionsSpec (spec) where import Data.List (isPrefixOf) import Ormolu.Integration.Utils (getFourmoluExe, readProcess) import System.FilePath (()) import System.IO.Temp (withSystemTempDirectory) import Test.Hspec spec :: Spec spec = describe "Fourmolu configuration via CLI" . beforeAll getFourmoluExe $ do it "CLI options override default" $ \fourmoluExe -> do withTempDir $ \tmpdir -> do let hsFile = tmpdir "test.hs" writeFile hsFile indented2 withoutCLI <- readProcess fourmoluExe [hsFile] withoutCLI `shouldBe` indented4 withCLI <- readProcess fourmoluExe ["--indentation=2", hsFile] withCLI `shouldBe` indented2 it "CLI options used when config file lacks option" $ \fourmoluExe -> do withTempDir $ \tmpdir -> do let hsFile = tmpdir "test.hs" writeFile hsFile indented2 let configFile = tmpdir "fourmolu.yaml" writeFile configFile "comma-style: trailing" withoutCLI <- readProcess fourmoluExe [hsFile] withoutCLI `shouldBe` indented4 withCLI <- readProcess fourmoluExe ["--indentation=2", hsFile] withCLI `shouldBe` indented2 it "CLI options override config file option" $ \fourmoluExe -> do withTempDir $ \tmpdir -> do let hsFile = tmpdir "test.hs" writeFile hsFile indented2 let configFile = tmpdir "fourmolu.yaml" writeFile configFile "indentation: 2" withoutCLI <- readProcess fourmoluExe [hsFile] withoutCLI `shouldBe` indented2 withCLI <- readProcess fourmoluExe ["--indentation=4", hsFile] withCLI `shouldBe` indented4 it "prints defaults to stdout" $ \fourmoluExe -> do stdOutput <- readProcess fourmoluExe ["--print-defaults"] -- Only check prefix of the output, so we don't have to update the test with every new option added stdOutput `shouldSatisfy` isPrefixOf "# Number of spaces per indentation step\nindentation: 4\n" where withTempDir = withSystemTempDirectory "fourmolu-cli-options-test" indented2 = unlines [ "main :: IO ()", "main =", " print 10" ] indented4 = unlines [ "main :: IO ()", "main =", " print 10" ] fourmolu-0.18.0.0/tests/Ormolu/Integration/CLISpec.hs0000644000000000000000000001114714745250261020466 0ustar0000000000000000module Ormolu.Integration.CLISpec (spec) where import Control.Monad (forM_) import Ormolu.Integration.Utils (ProcessSpec (..), getFourmoluExe, proc, readFrom, readProcess) import System.Directory (createDirectoryIfMissing) import System.FilePath (takeDirectory, ()) import System.IO.Temp (withSystemTempDirectory) import Test.Hspec spec :: Spec spec = describe "Fourmolu CLI functionality" . beforeAll getFourmoluExe $ do it "formats stdin when no files specified" $ \fourmoluExe -> do stdout <- readFrom $ (proc fourmoluExe ["--no-cabal"]) {procStdin = unformattedCode} stdout `shouldBe` formattedCode it "formats stdin when stdin specified" $ \fourmoluExe -> do stdout <- readFrom $ (proc fourmoluExe ["--no-cabal", "-"]) {procStdin = unformattedCode} stdout `shouldBe` formattedCode it "finds config file in current directory when formatting stdin" $ \fourmoluExe -> withTempDir $ \tmpdir -> do writeFile' (tmpdir "fourmolu.yaml") "single-constraint-parens: never" stdout <- readFrom $ (proc fourmoluExe ["--no-cabal", "-"]) { procStdin = "f :: (Show a) => a -> String", procCwd = Just tmpdir } stdout `shouldBe` "f :: Show a => a -> String\n" it "finds config file in ancestor directory when formatting stdin" $ \fourmoluExe -> withTempDir $ \tmpdir -> do writeFile' (tmpdir "fourmolu.yaml") "single-constraint-parens: never" let cwd = tmpdir "a" "b" "c" createDirectoryIfMissing True cwd stdout <- readFrom $ (proc fourmoluExe ["--no-cabal", "-"]) { procStdin = "f :: (Show a) => a -> String", procCwd = Just cwd } stdout `shouldBe` "f :: Show a => a -> String\n" it "finds config file in directory of input file" $ \fourmoluExe -> withTempDir $ \tmpdir -> do writeFile' (tmpdir "fourmolu.yaml") "single-constraint-parens: never" writeFile' (tmpdir "input.hs") "f :: (Show a) => a -> String" stdout <- readFrom $ (proc fourmoluExe ["--no-cabal", "input.hs"]) { procCwd = Just tmpdir } stdout `shouldBe` "f :: Show a => a -> String\n" it "finds config file in XDG directory" $ \fourmoluExe -> withTempDir $ \tmpdir -> do let configDir = tmpdir "config" writeFile' (configDir "fourmolu.yaml") "single-constraint-parens: never" stdout <- readFrom $ (proc fourmoluExe ["--no-cabal", "-"]) { procStdin = "f :: (Show a) => a -> String", procCwd = Just tmpdir, procExtraEnv = [("XDG_CONFIG_HOME", configDir)] } stdout `shouldBe` "f :: Show a => a -> String\n" it "uses specified config file" $ \fourmoluExe -> withTempDir $ \tmpdir -> do let configFile = tmpdir "foo" "my-config.yaml" let inputFile = tmpdir "bar" "input.hs" writeFile' configFile "single-constraint-parens: never" writeFile' inputFile "f :: (Show a) => a -> String" stdout <- readFrom $ (proc fourmoluExe ["--no-cabal", "--config", configFile, inputFile]) { procCwd = Just tmpdir } stdout `shouldBe` "f :: Show a => a -> String\n" it "recursively finds files in directories" $ \fourmoluExe -> do withTempDir $ \tmpdir -> do let hsFile = tmpdir "test.hs" writeFile' hsFile unformattedCode output <- readProcess fourmoluExe [tmpdir] output `shouldBe` formattedCode it "ignores files in specific directories" $ \fourmoluExe -> do withTempDir $ \tmpdir -> do let testFiles = [ tmpdir "test1.hs", tmpdir "foo/test2.hs" ] let ignoredFiles = [ tmpdir ".stack-work/test.hs", tmpdir "dist-newstyle/test.hs" ] forM_ (testFiles ++ ignoredFiles) $ \fp -> do writeFile' fp unformattedCode _ <- readProcess fourmoluExe ["-i", tmpdir] forM_ testFiles $ \fp -> do output <- readFile fp output `shouldBe` formattedCode forM_ ignoredFiles $ \fp -> do output <- readFile fp output `shouldBe` unformattedCode where withTempDir = withSystemTempDirectory "fourmolu-cli-test" writeFile' fp s = do createDirectoryIfMissing True (takeDirectory fp) writeFile fp s unformattedCode = "main=print(1+1)\n" formattedCode = "main = print (1 + 1)\n" fourmolu-0.18.0.0/tests/Ormolu/Integration/FixitySpec.hs0000644000000000000000000001165714745250261021341 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.Integration.FixitySpec (spec) where import Control.Monad (forM_) import Ormolu.Integration.Utils (getFourmoluExe, readProcess) import System.Directory (copyFile) import System.IO.Temp (withSystemTempDirectory) import Test.Hspec -- | Tests for the `fixity-tests/` directory Ormolu implemented, converted -- from nix tests to hspec tests. spec :: Spec spec = describe "fixity-tests" . beforeAll getFourmoluExe $ forM_ tests $ \Test {..} -> specify testLabel $ \fourmoluExe -> withSystemTempDirectory "fixity-test-dir" $ \tmpdir -> do let configFile = tmpdir ++ "/fourmolu.yaml" srcFile = tmpdir ++ "/input.hs" copyFile ("fixity-tests/" ++ testInputFileName) srcFile -- extend fourmolu.yaml to keep same formatting as Ormolu rootConfig <- readFile "fourmolu.yaml" writeFile configFile $ if testUseConfig then unlines [ rootConfig, -- add information in the original `fixity-tests/.ormolu` file "fixities:", "- 'infixr 8 .='", "- 'infixr 5 #, :>'", "reexports:", "- 'module Foo exports Control.Lens'" ] else rootConfig actual <- readProcess fourmoluExe . concat $ [ [srcFile, "--check-idempotence"], testArgs, if testUseConfig then [] else ["--no-cabal"] ] expected <- readFile $ "fixity-tests/" ++ testExpectedFileName actual `shouldBe` expected data Test = Test { testLabel :: String, testInputFileName :: FilePath, testArgs :: [String], testUseConfig :: Bool, testExpectedFileName :: FilePath } tests :: [Test] tests = [ Test { testLabel = "File #0 works with no extra info", testInputFileName = "test-0-input.hs", testArgs = [], testUseConfig = False, testExpectedFileName = "test-0-ugly-expected.hs" }, Test { testLabel = "File #0 works with manual fixity info", testInputFileName = "test-0-input.hs", testArgs = ["--fixity", "infixr 8 .=", "--fixity", "infixr 5 :>"], testUseConfig = False, testExpectedFileName = "test-0-with-fixity-info-expected.hs" }, Test { testLabel = "File #0 works with fixity info from config", testInputFileName = "test-0-input.hs", testArgs = ["--package", "base"], testUseConfig = True, testExpectedFileName = "test-0-with-fixity-info-expected.hs" }, Test { testLabel = "File #0 works when CLI overrides .ormolu", testInputFileName = "test-0-input.hs", testArgs = ["--package", "base", "--fixity", "infixr 5 .=", "--no-cabal"], testUseConfig = True, testExpectedFileName = "test-0-ugly-expected.hs" }, Test { testLabel = "File #1 works with no extra info", testInputFileName = "test-1-input.hs", testArgs = [], testUseConfig = False, testExpectedFileName = "test-1-no-extra-info-expected.hs" }, Test { testLabel = "File #1 works with manual fixity info", testInputFileName = "test-1-input.hs", testArgs = ["--fixity", "infixr 8 .=", "--fixity", "infixr 5 #"], testUseConfig = False, testExpectedFileName = "test-1-with-fixity-info-expected.hs" }, Test { testLabel = "File #1 works with fixity info from config", testInputFileName = "test-1-input.hs", testArgs = ["--package", "base"], testUseConfig = True, testExpectedFileName = "test-1-with-fixity-info-expected.hs" }, Test { testLabel = "File #1 works with weird fixity info overwrite", testInputFileName = "test-1-input.hs", testArgs = ["--package", "base", "--fixity", "infixr 5 $"], testUseConfig = True, testExpectedFileName = "test-1-with-fixity-info-weird-overwrite-expected.hs" }, Test { testLabel = "File #2 works with no extra info", testInputFileName = "test-2-input.hs", testArgs = ["--package", "base", "--package", "lens"], testUseConfig = False, testExpectedFileName = "test-2-no-extra-info-expected.hs" }, Test { testLabel = "File #2 works with manual reexport info", testInputFileName = "test-2-input.hs", testArgs = ["--package", "base", "--package", "lens", "--reexport", "module Foo exports Control.Lens"], testUseConfig = False, testExpectedFileName = "test-2-with-reexports-expected.hs" }, Test { testLabel = "File #2 works with fixity info from config", testInputFileName = "test-2-input.hs", testArgs = ["--package", "base", "--package", "lens"], testUseConfig = True, testExpectedFileName = "test-2-with-reexports-expected.hs" } ] fourmolu-0.18.0.0/tests/Ormolu/Integration/RegionSpec.hs0000644000000000000000000000501214745250261021274 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.Integration.RegionSpec (spec) where import Control.Monad (forM_) import Ormolu.Integration.Utils (getFourmoluExe, readProcess) import System.Directory (copyFile) import System.IO.Temp (withSystemTempDirectory) import Test.Hspec -- | Tests for the `region-tests/` directory Ormolu implemented, converted -- from nix tests to hspec tests. spec :: Spec spec = describe "region-tests" . beforeAll getFourmoluExe $ forM_ tests $ \Test {..} -> specify testLabel $ \fourmoluExe -> do withSystemTempDirectory "region-test-dir" $ \tmpdir -> do let configFile = tmpdir ++ "/fourmolu.yaml" srcFile = tmpdir ++ "/input.hs" copyFile "region-tests/src.hs" srcFile copyFile "fourmolu.yaml" configFile actual <- readProcess fourmoluExe $ [srcFile, "--check-idempotence"] ++ testArgs expected <- readFile $ "region-tests/" ++ testExpectedFileName actual `shouldBe` expected data Test = Test { testLabel :: String, testArgs :: [String], testExpectedFileName :: FilePath } tests :: [Test] tests = [ Test { testLabel = "Works with implicit arguments", testArgs = [], testExpectedFileName = "expected-result-all.hs" }, Test { testLabel = "Works with explicit arguments", testArgs = ["--start-line", "1", "--end-line", "23"], testExpectedFileName = "expected-result-all.hs" }, Test { testLabel = "Works with only --start-line", testArgs = ["--start-line", "1"], testExpectedFileName = "expected-result-all.hs" }, Test { testLabel = "Works with only --end-line", testArgs = ["--end-line", "23"], testExpectedFileName = "expected-result-all.hs" }, Test { testLabel = "Works with lines 8-9", testArgs = ["--start-line", "8", "--end-line", "9"], testExpectedFileName = "expected-result-8-9.hs" }, Test { testLabel = "Works with lines 8-10", testArgs = ["--start-line", "8", "--end-line", "10"], testExpectedFileName = "expected-result-8-10.hs" }, Test { testLabel = "Works with lines 11-14", testArgs = ["--start-line", "11", "--end-line", "14"], testExpectedFileName = "expected-result-11-14.hs" }, Test { testLabel = "Works with lines 19-23", testArgs = ["--start-line", "19", "--end-line", "23"], testExpectedFileName = "expected-result-19-23.hs" } ] fourmolu-0.18.0.0/tests/Ormolu/Integration/Utils.hs0000644000000000000000000000343614745250261020346 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} module Ormolu.Integration.Utils ( getFourmoluExe, readProcess, ProcessSpec (..), proc, readFrom, ) where import Control.Monad (when) import System.Directory (findExecutable) import System.Environment (getEnvironment) import System.Exit (ExitCode (..)) import System.Process (CreateProcess (..), readCreateProcessWithExitCode) import System.Process qualified as Process -- | Find a `fourmolu` executable on PATH. getFourmoluExe :: IO FilePath getFourmoluExe = findExecutable "fourmolu" >>= maybe (fail "Could not find fourmolu executable") return -- | Like 'System.Process.readProcess', except without specifying stdin and -- with better failure messages. readProcess :: FilePath -> [String] -> IO String readProcess cmd args = readFrom $ proc cmd args data ProcessSpec = ProcessSpec { procCmd :: FilePath, procArgs :: [String], procStdin :: String, procCwd :: Maybe FilePath, procExtraEnv :: [(String, String)] } proc :: FilePath -> [String] -> ProcessSpec proc cmd args = ProcessSpec { procCmd = cmd, procArgs = args, procStdin = "", procCwd = Nothing, procExtraEnv = [] } readFrom :: ProcessSpec -> IO String readFrom ProcessSpec {..} = do currentEnv <- getEnvironment (code, stdout, stderr) <- readCreateProcessWithExitCode (Process.proc procCmd procArgs) { cwd = procCwd, env = Just $ procExtraEnv <> currentEnv } procStdin when (code /= ExitSuccess) $ do putStrLn $ "Command failed: " ++ (unwords . map (\s -> "\"" ++ s ++ "\"")) (procCmd : procArgs) putStrLn "========== stdout ==========" putStrLn stdout putStrLn "========== stderr ==========" putStrLn stderr fail "Command failed. See output for more details." pure stdout fourmolu-0.18.0.0/tests/Ormolu/Utils/GlobSpec.hs0000644000000000000000000000473414745250261017563 0ustar0000000000000000module Ormolu.Utils.GlobSpec (spec) where import Ormolu.Utils.Glob (matchesGlob, mkGlob) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.QuickCheck (prop) import Test.QuickCheck (Arbitrary (..), listOf, suchThat) newtype Wildcardless = Wildcardless String deriving (Show) instance Arbitrary Wildcardless where arbitrary = fmap Wildcardless $ listOf (arbitrary `suchThat` (/= '*')) newtype ModuleName = ModuleName String deriving (Show) instance Arbitrary ModuleName where arbitrary = fmap ModuleName $ listOf (arbitrary `suchThat` (/= '.')) `suchThat` (not . null) spec :: Spec spec = describe "glob" $ do it "should match modules exactly" $ "Hello.world" `matchesGlob` mkGlob "Hello.world" `shouldBe` True it "should fail if case doesn't match" $ "Some.thing" `matchesGlob` mkGlob "Some.Thing" `shouldBe` False it "should allow * to match anything on the same level" $ "Level1.Level2.Level3" `matchesGlob` mkGlob "Level1.Le*2.Level3" `shouldBe` True it "should fail if input doesn't match glob even with wildcards" $ "Control.Monad.Writer.Lazy" `matchesGlob` mkGlob "Data.Functor.*.Lazy" `shouldBe` False it "should disallow * to match anything on different level" $ "Level1.Level2.Level3.Level4" `matchesGlob` mkGlob "Level1.*.Level4" `shouldBe` False it "should allow multiple *" $ "Some.Fake.Path.With.Internals" `matchesGlob` mkGlob "Some.*.Path.*.Internals" `shouldBe` True it "should allow * at the beginning" $ "MyApp42.Control.Monad" `matchesGlob` mkGlob "*42.Control.Monad" `shouldBe` True it "should allow * at the end" $ "System.IO.Stuff" `matchesGlob` mkGlob "System.IO.*" `shouldBe` True it "should allow ** to match anything on the same level" $ "Level1.Level2.Level3" `matchesGlob` mkGlob "Level1.L**2.Level3" `shouldBe` True it "should allow ** to match anything on multiple levels" $ "Level1.Level2.Level3.Level4.Level5" `matchesGlob` mkGlob "Level1.L**4.Level5" `shouldBe` True describe "Properties" $ do prop "should obey: s `matches` glob s with s being any string without '*'" $ \(Wildcardless s) -> s `matchesGlob` mkGlob s prop "should obey: (a <> b <> c) `matches` glob (a <> * <> c) with b being a module name" $ \a (ModuleName b) c -> (a <> b <> c) `matchesGlob` mkGlob (a <> "*" <> c) prop "should obey: (a <> b <> c) `matches` glob (a <> ** <> c)" $ \a b c -> (a <> b <> c) `matchesGlob` mkGlob (a <> "**" <> c) fourmolu-0.18.0.0/data/cabal-tests/test.cabal0000644000000000000000000000034614745250261017063 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 data/fourmolu/respectful-module-where/output-respectful=False-ImportExportDiffFriendly.hs0000644000000000000000000000106514745250261033333 0ustar0000000000000000fourmolu-0.18.0.0module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a, b, ) where {- // -} module Foo ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where data/fourmolu/respectful-module-where/output-respectful=True-ImportExportTrailing.hs0000644000000000000000000000111514745250261032420 0ustar0000000000000000fourmolu-0.18.0.0module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a, b, ) where {- // -} module Foo ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where data/fourmolu/respectful-module-where/output-respectful=True-ImportExportDiffFriendly.hs0000644000000000000000000000106514745250261033220 0ustar0000000000000000fourmolu-0.18.0.0module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a, b, ) where {- // -} module Foo ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where data/fourmolu/respectful-module-where/output-respectful=False-ImportExportTrailing.hs0000644000000000000000000000111514745250261032533 0ustar0000000000000000fourmolu-0.18.0.0module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a, b, ) where {- // -} module Foo ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where fourmolu-0.18.0.0/data/fourmolu/respectful-module-where/input-multi.hs0000644000000000000000000000103514745250261024154 0ustar0000000000000000module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a, b, ) where {- // -} module Foo ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where {- // -} module Foo {-# WARNING "foo" #-} ( a, b, ) where data/fourmolu/respectful-module-where/output-respectful=True-ImportExportLeading.hs0000644000000000000000000000110514745250261032211 0ustar0000000000000000fourmolu-0.18.0.0module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a , b ) where {- // -} module Foo ( a , b ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a , b ) where {- // -} module Foo {-# WARNING "foo" #-} ( a , b ) where data/fourmolu/respectful-module-where/output-respectful=False-ImportExportLeading.hs0000644000000000000000000000110514745250261032324 0ustar0000000000000000fourmolu-0.18.0.0module Foo where {- // -} module Foo where {- // -} module Foo (a, b) where {- // -} module Foo (a, b) where {- // -} module Foo ( a , b ) where {- // -} module Foo ( a , b ) where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} (a, b) where {- // -} module Foo {-# WARNING "foo" #-} ( a , b ) where {- // -} module Foo {-# WARNING "foo" #-} ( a , b ) where fourmolu-0.18.0.0/data/fourmolu/unicode-syntax/input.hs0000644000000000000000000000404214745250261021230 0ustar0000000000000000{-# LANGUAGE Arrows #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LinearTypes #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE UnicodeSyntax #-} module UnicodeExample where import Control.Arrow import Data.Kind import Language.Haskell.TH (Exp, Quote) import Prelude hiding (elem) data T = MkT {foo :: Int} data Term a where Lit :: Int -> Term Int Succ :: Term Int -> Term Int IsZero :: Term Int -> Term Bool If :: Term Bool -> Term a -> Term a -> Term a Pair :: Term a -> Term b -> Term (a, b) newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a]) data family GMap k :: Type -> Type data instance GMap (Either a b) v = GMapEither (GMap a v) (GMap b v) type family F a where F Int = Double F Bool = Char F a = String type family Id a = r | r -> a type instance Id Int = Int type instance Id Bool = Bool type family Elem c :: Type type instance Elem [e] = e data T1 a = MkT1 a construct :: a %1 -> T1 a construct x = MkT1 x deconstruct :: T1 a %1 -> a deconstruct (MkT1 x) = x pattern HeadC x <- x : xs where HeadC x = [x] pattern Point :: Int -> Int -> (Int, Int) pattern Point {x, y} = (x, y) class (Monad m, Monad (t m)) => Transform t m where lift :: m a -> (t m) a data Tree a = Leaf a | Branch (Tree a) (Tree a) instance (Eq a) => Eq (Tree a) where Leaf a == Leaf b = a == b (Branch l1 r1) == (Branch l2 r2) = (l1 == l2) && (r1 == r2) _ == _ = False add1 :: Quote m => Int -> m Exp add1 x = [|x + 1|] decl :: Quote m => m Decl decl = [d|data Foo|] monad = do putStr "x: " l <- getLine return (words l) arrow f g h = proc x -> do y <- f -< x + 1 g -< 2 * y let z = x + y t <- h -< x * z (| f (\y -> returnA -< y) |) ys returnA -< t + z elem :: (Eq a) => a -> [a] -> Bool x `elem` [] = False x `elem` (y : ys) = x == y || (x `elem` ys) h :: (forall a. a -> a) -> (Bool, Char) h f = (f True, f 'c') fourmolu-0.18.0.0/data/fourmolu/unicode-syntax/output-UnicodeNever.hs0000644000000000000000000000404714745250261024022 0ustar0000000000000000{-# LANGUAGE Arrows #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LinearTypes #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE UnicodeSyntax #-} module UnicodeExample where import Control.Arrow import Data.Kind import Language.Haskell.TH (Exp, Quote) import Prelude hiding (elem) data T = MkT {foo :: Int} data Term a where Lit :: Int -> Term Int Succ :: Term Int -> Term Int IsZero :: Term Int -> Term Bool If :: Term Bool -> Term a -> Term a -> Term a Pair :: Term a -> Term b -> Term (a, b) newtype Swizzle = MkSwizzle (forall a. (Ord a) => [a] -> [a]) data family GMap k :: Type -> Type data instance GMap (Either a b) v = GMapEither (GMap a v) (GMap b v) type family F a where F Int = Double F Bool = Char F a = String type family Id a = r | r -> a type instance Id Int = Int type instance Id Bool = Bool type family Elem c :: Type type instance Elem [e] = e data T1 a = MkT1 a construct :: a %1 -> T1 a construct x = MkT1 x deconstruct :: T1 a %1 -> a deconstruct (MkT1 x) = x pattern HeadC x <- x : xs where HeadC x = [x] pattern Point :: Int -> Int -> (Int, Int) pattern Point{x, y} = (x, y) class (Monad m, Monad (t m)) => Transform t m where lift :: m a -> (t m) a data Tree a = Leaf a | Branch (Tree a) (Tree a) instance (Eq a) => Eq (Tree a) where Leaf a == Leaf b = a == b (Branch l1 r1) == (Branch l2 r2) = (l1 == l2) && (r1 == r2) _ == _ = False add1 :: (Quote m) => Int -> m Exp add1 x = [|x + 1|] decl :: (Quote m) => m Decl decl = [d|data Foo|] monad = do putStr "x: " l <- getLine return (words l) arrow f g h = proc x -> do y <- f -< x + 1 g -< 2 * y let z = x + y t <- h -< x * z (| f (\y -> returnA -< y) |) ys returnA -< t + z elem :: (Eq a) => a -> [a] -> Bool x `elem` [] = False x `elem` (y : ys) = x == y || (x `elem` ys) h :: (forall a. a -> a) -> (Bool, Char) h f = (f True, f 'c') fourmolu-0.18.0.0/data/fourmolu/unicode-syntax/output-UnicodeAlways.hs0000644000000000000000000000412514745250261024200 0ustar0000000000000000{-# LANGUAGE Arrows #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LinearTypes #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE UnicodeSyntax #-} module UnicodeExample where import Control.Arrow import Data.Kind import Language.Haskell.TH (Exp, Quote) import Prelude hiding (elem) data T = MkT {foo ∷ Int} data Term a where Lit ∷ Int → Term Int Succ ∷ Term Int → Term Int IsZero ∷ Term Int → Term Bool If ∷ Term Bool → Term a → Term a → Term a Pair ∷ Term a → Term b → Term (a, b) newtype Swizzle = MkSwizzle (∀ a. (Ord a) ⇒ [a] → [a]) data family GMap k ∷ Type → Type data instance GMap (Either a b) v = GMapEither (GMap a v) (GMap b v) type family F a where F Int = Double F Bool = Char F a = String type family Id a = r | r → a type instance Id Int = Int type instance Id Bool = Bool type family Elem c ∷ Type type instance Elem [e] = e data T1 a = MkT1 a construct ∷ a ⊸ T1 a construct x = MkT1 x deconstruct ∷ T1 a ⊸ a deconstruct (MkT1 x) = x pattern HeadC x ← x : xs where HeadC x = [x] pattern Point ∷ Int → Int → (Int, Int) pattern Point{x, y} = (x, y) class (Monad m, Monad (t m)) ⇒ Transform t m where lift ∷ m a → (t m) a data Tree a = Leaf a | Branch (Tree a) (Tree a) instance (Eq a) ⇒ Eq (Tree a) where Leaf a == Leaf b = a == b (Branch l1 r1) == (Branch l2 r2) = (l1 == l2) && (r1 == r2) _ == _ = False add1 ∷ (Quote m) ⇒ Int → m Exp add1 x = ⟦x + 1⟧ decl ∷ (Quote m) ⇒ m Decl decl = [d|data Foo|] monad = do putStr "x: " l ← getLine return (words l) arrow f g h = proc x → do y ← f ⤙ x + 1 g ⤙ 2 * y let z = x + y t ← h ⤙ x * z ⦇ f (\y → returnA ⤙ y) ⦈ ys returnA ⤙ t + z elem ∷ (Eq a) ⇒ a → [a] → Bool x `elem` [] = False x `elem` (y : ys) = x == y || (x `elem` ys) h ∷ (∀ a. a → a) → (Bool, Char) h f = (f True, f 'c') fourmolu-0.18.0.0/data/fourmolu/unicode-syntax/output-UnicodeDetect.hs0000644000000000000000000000412514745250261024150 0ustar0000000000000000{-# LANGUAGE Arrows #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LinearTypes #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE UnicodeSyntax #-} module UnicodeExample where import Control.Arrow import Data.Kind import Language.Haskell.TH (Exp, Quote) import Prelude hiding (elem) data T = MkT {foo ∷ Int} data Term a where Lit ∷ Int → Term Int Succ ∷ Term Int → Term Int IsZero ∷ Term Int → Term Bool If ∷ Term Bool → Term a → Term a → Term a Pair ∷ Term a → Term b → Term (a, b) newtype Swizzle = MkSwizzle (∀ a. (Ord a) ⇒ [a] → [a]) data family GMap k ∷ Type → Type data instance GMap (Either a b) v = GMapEither (GMap a v) (GMap b v) type family F a where F Int = Double F Bool = Char F a = String type family Id a = r | r → a type instance Id Int = Int type instance Id Bool = Bool type family Elem c ∷ Type type instance Elem [e] = e data T1 a = MkT1 a construct ∷ a ⊸ T1 a construct x = MkT1 x deconstruct ∷ T1 a ⊸ a deconstruct (MkT1 x) = x pattern HeadC x ← x : xs where HeadC x = [x] pattern Point ∷ Int → Int → (Int, Int) pattern Point{x, y} = (x, y) class (Monad m, Monad (t m)) ⇒ Transform t m where lift ∷ m a → (t m) a data Tree a = Leaf a | Branch (Tree a) (Tree a) instance (Eq a) ⇒ Eq (Tree a) where Leaf a == Leaf b = a == b (Branch l1 r1) == (Branch l2 r2) = (l1 == l2) && (r1 == r2) _ == _ = False add1 ∷ (Quote m) ⇒ Int → m Exp add1 x = ⟦x + 1⟧ decl ∷ (Quote m) ⇒ m Decl decl = [d|data Foo|] monad = do putStr "x: " l ← getLine return (words l) arrow f g h = proc x → do y ← f ⤙ x + 1 g ⤙ 2 * y let z = x + y t ← h ⤙ x * z ⦇ f (\y → returnA ⤙ y) ⦈ ys returnA ⤙ t + z elem ∷ (Eq a) ⇒ a → [a] → Bool x `elem` [] = False x `elem` (y : ys) = x == y || (x `elem` ys) h ∷ (∀ a. a → a) → (Bool, Char) h f = (f True, f 'c') fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/input.hs0000644000000000000000000000022314745250261022616 0ustar0000000000000000data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/output-1.hs0000644000000000000000000000023214745250261023155 0ustar0000000000000000data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/output-2-respectful.hs0000644000000000000000000000023414745250261025332 0ustar0000000000000000 data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/output-0-respectful.hs0000644000000000000000000000023114745250261025325 0ustar0000000000000000data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/output-1-respectful.hs0000644000000000000000000000023114745250261025326 0ustar0000000000000000data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/output-2.hs0000644000000000000000000000023614745250261023162 0ustar0000000000000000 data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/newlines-between-decls/output-0.hs0000644000000000000000000000023214745250261023154 0ustar0000000000000000data Color = Red | Orange | Yellow | Green | Blue | Purple data Foo = Foo { a :: Int , b :: Double } type Foo2 = Foo newtype Bar = Bar Int fourmolu-0.18.0.0/data/fourmolu/sort-derived-classes/input.hs0000644000000000000000000000052114745250261022316 0ustar0000000000000000module Main where data A deriving (Show, Eq, Ord) newtype B = B Int deriving newtype (Num) deriving stock (Show, Eq, Generic) deriving (Semigroup, Monoid) via (Generically B) deriving stock (Ord, Generic) deriving (ToJSON) data C deriving (Show , Eq -- A comment that will end up in an odd place , Ord) fourmolu-0.18.0.0/data/fourmolu/sort-derived-classes/output-False.hs0000644000000000000000000000057214745250261023555 0ustar0000000000000000module Main where data A deriving (Show, Eq, Ord) newtype B = B Int deriving newtype (Num) deriving stock (Show, Eq, Generic) deriving (Semigroup, Monoid) via (Generically B) deriving stock (Ord, Generic) deriving (ToJSON) data C deriving ( Show , Eq , -- A comment that will end up in an odd place Ord ) fourmolu-0.18.0.0/data/fourmolu/sort-derived-classes/output-True.hs0000644000000000000000000000057214745250261023442 0ustar0000000000000000module Main where data A deriving (Eq, Ord, Show) newtype B = B Int deriving newtype (Num) deriving stock (Eq, Generic, Show) deriving (Monoid, Semigroup) via (Generically B) deriving stock (Generic, Ord) deriving (ToJSON) data C deriving ( Eq , -- A comment that will end up in an odd place Ord , Show ) fourmolu-0.18.0.0/data/fourmolu/comma-style/input.hs0000644000000000000000000000027314745250261020512 0ustar0000000000000000x :: [Int] x = [ 1, 2, 3 ] y :: (Int, Bool, Double) y = ( 1, True, 1.5 ) data Foo = Foo { a :: Int, b :: Bool, c :: Double } fourmolu-0.18.0.0/data/fourmolu/comma-style/output-Trailing.hs0000644000000000000000000000027314745250261022462 0ustar0000000000000000x :: [Int] x = [ 1, 2, 3 ] y :: (Int, Bool, Double) y = ( 1, True, 1.5 ) data Foo = Foo { a :: Int, b :: Bool, c :: Double } fourmolu-0.18.0.0/data/fourmolu/comma-style/output-Leading.hs0000644000000000000000000000026514745250261022255 0ustar0000000000000000x :: [Int] x = [ 1 , 2 , 3 ] y :: (Int, Bool, Double) y = ( 1 , True , 1.5 ) data Foo = Foo { a :: Int , b :: Bool , c :: Double } fourmolu-0.18.0.0/data/fourmolu/function-arrows/output-TrailingArrows.hs0000644000000000000000000000412314745250261024564 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LinearTypes #-} 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 -- | 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 :: -- | An Int Int -> -- | And a Maybe Text Maybe Text -> Foo 'Bool -- | So is 'Baz'. Baz :: forall a. a -> Foo 'String (:~>) :: Foo a -> Foo a -> Foo a -- Single line type signature is preserved instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False singleLineFun :: forall a. (C1, C2) => Int -> Bool instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT functionName :: (C1, C2, C3, C4, C5) => a -> b -> ( forall a. (C6, C7) => LongDataTypeName -> a -> AnotherLongDataTypeName -> b -> c ) -> (c -> d) -> (a, b, c, d) functionWithInterleavedCommentsTrailing :: -- arg Int -> -- result Bool functionWithInterleavedCommentsLeading :: -- arg Int -> -- result Bool multilineExprSig = do bar ( x :: Int -> Bool ) bar ( x :: -- arg Int -> -- result Bool ) bar ( x :: -- arg Int -> -- result Bool ) data Record = Record { recFun :: forall a. (C1, C2) => Int -> Int -> Bool , recOther :: Bool } foo :: Int %1 -> Bool foo :: forall x. Int %Many -> Bool fourmolu-0.18.0.0/data/fourmolu/function-arrows/input.hs0000644000000000000000000000344414745250261021423 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LinearTypes #-} 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 -- | 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 :: -- | An Int Int -> Maybe Text -> -- ^ And a Maybe Text Foo 'Bool -- | So is 'Baz'. Baz :: forall a. a -> Foo 'String (:~>) :: Foo a -> Foo a -> Foo a -- Single line type signature is preserved instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False singleLineFun :: forall a. (C1, C2) => Int -> Bool instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT functionName :: (C1, C2, C3, C4, C5) => a -> b -> ( forall a. (C6, C7) => LongDataTypeName -> a -> AnotherLongDataTypeName -> b -> c ) -> (c -> d) -> (a, b, c, d) functionWithInterleavedCommentsTrailing :: -- arg Int -> -- result Bool functionWithInterleavedCommentsLeading -- arg :: Int -- result -> Bool multilineExprSig = do bar ( x :: Int -> Bool ) bar ( x :: -- arg Int -> -- result Bool ) bar ( x -- arg :: Int -- result -> Bool ) data Record = Record { recFun :: forall a. (C1, C2) => Int -> Int -> Bool , recOther :: Bool } foo :: Int %1 -> Bool foo :: forall x. Int %Many -> Bool fourmolu-0.18.0.0/data/fourmolu/function-arrows/output-LeadingArrows.hs0000644000000000000000000000417014745250261024360 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LinearTypes #-} 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 -- | 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 -- ^ An Int -> Maybe Text -- ^ And a Maybe Text -> Foo 'Bool -- | So is 'Baz'. Baz :: forall a . a -> Foo 'String (:~>) :: Foo a -> Foo a -> Foo a -- Single line type signature is preserved instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False singleLineFun :: forall a. (C1, C2) => Int -> Bool instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT functionName :: (C1, C2, C3, C4, C5) => a -> b -> ( forall a . (C6, C7) => LongDataTypeName -> a -> AnotherLongDataTypeName -> b -> c ) -> (c -> d) -> (a, b, c, d) functionWithInterleavedCommentsTrailing -- arg :: Int -- result -> Bool functionWithInterleavedCommentsLeading -- arg :: Int -- result -> Bool multilineExprSig = do bar ( x :: Int -> Bool ) bar ( x -- arg :: Int -- result -> Bool ) bar ( x -- arg :: Int -- result -> Bool ) data Record = Record { recFun :: forall a . (C1, C2) => Int -> Int -> Bool , recOther :: Bool } foo :: Int %1 -> Bool foo :: forall x . Int %Many -> Bool fourmolu-0.18.0.0/data/fourmolu/function-arrows/output-LeadingArgsArrows.hs0000644000000000000000000000415014745250261025173 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LinearTypes #-} 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 -- | 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 -- ^ An Int -> Maybe Text -- ^ And a Maybe Text -> Foo 'Bool -- | So is 'Baz'. Baz :: forall a. a -> Foo 'String (:~>) :: Foo a -> Foo a -> Foo a -- Single line type signature is preserved instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False singleLineFun :: forall a. (C1, C2) => Int -> Bool instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT functionName :: (C1, C2, C3, C4, C5) => a -> b -> ( forall a. (C6, C7) => LongDataTypeName -> a -> AnotherLongDataTypeName -> b -> c ) -> (c -> d) -> (a, b, c, d) functionWithInterleavedCommentsTrailing :: -- arg Int -- result -> Bool functionWithInterleavedCommentsLeading :: -- arg Int -- result -> Bool multilineExprSig = do bar ( x :: Int -> Bool ) bar ( x :: -- arg Int -- result -> Bool ) bar ( x :: -- arg Int -- result -> Bool ) data Record = Record { recFun :: forall a. (C1, C2) => Int -> Int -> Bool , recOther :: Bool } foo :: Int %1 -> Bool foo :: forall x. Int %Many -> Bool fourmolu-0.18.0.0/data/fourmolu/record-brace-space/input.hs0000644000000000000000000000033514745250261021700 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} data Foo = Foo { a :: Int , b :: Int , c :: Int } x :: Foo -> Int x Foo {a = 42} = a y :: Foo -> Int y Foo {a, b, c} = a + b + c z :: Foo -> Int z Foo {..} = a + b + c fourmolu-0.18.0.0/data/fourmolu/record-brace-space/output-False.hs0000644000000000000000000000033214745250261023126 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} data Foo = Foo { a :: Int , b :: Int , c :: Int } x :: Foo -> Int x Foo{a = 42} = a y :: Foo -> Int y Foo{a, b, c} = a + b + c z :: Foo -> Int z Foo{..} = a + b + c fourmolu-0.18.0.0/data/fourmolu/record-brace-space/output-True.hs0000644000000000000000000000033514745250261023016 0ustar0000000000000000{-# LANGUAGE RecordWildCards #-} data Foo = Foo { a :: Int , b :: Int , c :: Int } x :: Foo -> Int x Foo {a = 42} = a y :: Foo -> Int y Foo {a, b, c} = a + b + c z :: Foo -> Int z Foo {..} = a + b + c fourmolu-0.18.0.0/data/fourmolu/trailing-section-operators/input.hs0000644000000000000000000000076714745250261023557 0ustar0000000000000000someShortFunction $ someShortFunction x someShortFunction $ someShortFunction $ \x -> do putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> do putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> do putStrLn x fourmolu-0.18.0.0/data/fourmolu/trailing-section-operators/output-False.hs0000644000000000000000000000102514745250261024774 0ustar0000000000000000someShortFunction $ someShortFunction x someShortFunction $ someShortFunction $ \x -> do putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> do putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> do putStrLn x fourmolu-0.18.0.0/data/fourmolu/trailing-section-operators/output-True.hs0000644000000000000000000000107514745250261024666 0ustar0000000000000000someShortFunction $ someShortFunction x someShortFunction $ someShortFunction $ \x -> do putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> do putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> putStrLn x someLongFunction $ someLongFunction $ someLongFunction $ someLongFunction $ \x -> do putStrLn x fourmolu-0.18.0.0/data/fourmolu/import-grouping/input.hs0000644000000000000000000000051414745250261021420 0ustar0000000000000000module Main where import Data.Text (Text) import Data.Maybe (maybe) import qualified Data.Text import Control.Monad (Monad (..)) import qualified System.IO as SIO import SomeInternal.Module1 (anotherDefinition, someDefinition) import qualified SomeInternal.Module2 as Mod2 import Text.Printf (printf) import qualified SomeModule fourmolu-0.18.0.0/data/fourmolu/import-grouping/output-custom.hs0000644000000000000000000000051514745250261023132 0ustar0000000000000000module Main where import Data.Text (Text) import qualified Data.Text import Control.Monad (Monad (..)) import Data.Maybe (maybe) import Text.Printf (printf) import qualified SomeInternal.Module2 as Mod2 import SomeInternal.Module1 (anotherDefinition, someDefinition) import qualified SomeModule import qualified System.IO as SIO fourmolu-0.18.0.0/data/fourmolu/import-grouping/output-ImportGroupByScopeThenQualified.hs0000644000000000000000000000051514745250261030037 0ustar0000000000000000module Main where import Control.Monad (Monad (..)) import Data.Maybe (maybe) import Data.Text (Text) import Text.Printf (printf) import qualified Data.Text import qualified SomeModule import qualified System.IO as SIO import SomeInternal.Module1 (anotherDefinition, someDefinition) import qualified SomeInternal.Module2 as Mod2 fourmolu-0.18.0.0/data/fourmolu/import-grouping/output-ImportGroupByScope.hs0000644000000000000000000000051314745250261025372 0ustar0000000000000000module Main where import Control.Monad (Monad (..)) import Data.Maybe (maybe) import Data.Text (Text) import qualified Data.Text import qualified SomeModule import qualified System.IO as SIO import Text.Printf (printf) import SomeInternal.Module1 (anotherDefinition, someDefinition) import qualified SomeInternal.Module2 as Mod2 fourmolu-0.18.0.0/data/fourmolu/import-grouping/output-ImportGroupByQualified.hs0000644000000000000000000000051314745250261026224 0ustar0000000000000000module Main where import Control.Monad (Monad (..)) import Data.Maybe (maybe) import Data.Text (Text) import SomeInternal.Module1 (anotherDefinition, someDefinition) import Text.Printf (printf) import qualified Data.Text import qualified SomeInternal.Module2 as Mod2 import qualified SomeModule import qualified System.IO as SIO fourmolu-0.18.0.0/data/fourmolu/import-grouping/output-ImportGroupPreserve.hs0000644000000000000000000000051414745250261025622 0ustar0000000000000000module Main where import Data.Maybe (maybe) import Data.Text (Text) import Control.Monad (Monad (..)) import qualified Data.Text import SomeInternal.Module1 (anotherDefinition, someDefinition) import qualified SomeInternal.Module2 as Mod2 import qualified SomeModule import qualified System.IO as SIO import Text.Printf (printf) fourmolu-0.18.0.0/data/fourmolu/import-grouping/output-ImportGroupSingle.hs0000644000000000000000000000051214745250261025246 0ustar0000000000000000module Main where import Control.Monad (Monad (..)) import Data.Maybe (maybe) import Data.Text (Text) import qualified Data.Text import SomeInternal.Module1 (anotherDefinition, someDefinition) import qualified SomeInternal.Module2 as Mod2 import qualified SomeModule import qualified System.IO as SIO import Text.Printf (printf) fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetNewline-InRightAlign-indent=4.hs0000644000000000000000000000260714745250261026427 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/input.hs0000644000000000000000000000210314745250261020174 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetMixed-InLeftAlign-indent=4.hs0000644000000000000000000000242014745250261025702 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetMixed-InNoSpace-indent=4.hs0000644000000000000000000000241414745250261025370 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetNewline-InRightAlign-indent=2.hs0000644000000000000000000000224114745250261026417 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetAuto-InNoSpace-indent=4.hs0000644000000000000000000000233014745250261025227 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetAuto-InLeftAlign-indent=2.hs0000644000000000000000000000211014745250261025536 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetNewline-InLeftAlign-indent=4.hs0000644000000000000000000000260014745250261026235 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetMixed-InRightAlign-indent=4.hs0000644000000000000000000000242314745250261026070 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetAuto-InRightAlign-indent=2.hs0000644000000000000000000000211314745250261025724 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetInline-InLeftAlign-indent=4.hs0000644000000000000000000000225714745250261026062 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetAuto-InNoSpace-indent=2.hs0000644000000000000000000000210414745250261025224 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetInline-InLeftAlign-indent=2.hs0000644000000000000000000000206714745250261026057 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetInline-InNoSpace-indent=2.hs0000644000000000000000000000206014745250261025533 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetAuto-InRightAlign-indent=4.hs0000644000000000000000000000233714745250261025736 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetInline-InNoSpace-indent=4.hs0000644000000000000000000000225014745250261025536 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetInline-InRightAlign-indent=2.hs0000644000000000000000000000206714745250261026242 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetMixed-InNoSpace-indent=2.hs0000644000000000000000000000213214745250261025363 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetInline-InRightAlign-indent=4.hs0000644000000000000000000000225714745250261026245 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetNewline-InLeftAlign-indent=2.hs0000644000000000000000000000223214745250261026234 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetMixed-InLeftAlign-indent=2.hs0000644000000000000000000000213614745250261025704 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetAuto-InLeftAlign-indent=4.hs0000644000000000000000000000233414745250261025550 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetNewline-InNoSpace-indent=4.hs0000644000000000000000000000260014745250261025720 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetNewline-InNoSpace-indent=2.hs0000644000000000000000000000223214745250261025717 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/let-style/output-LetMixed-InRightAlign-indent=2.hs0000644000000000000000000000214114745250261026063 0ustar0000000000000000{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let -- a comment a = 1 in a + 2 let_multi = let a = 1 b = 2 in a + b let_single_newline = let a = 1 in a + 2 let_multi_newline = let a = 1 b = 2 in a + b {-- do-block --} test_do = do let let a = 1 let b = 2 c = 3 let d = "hello" in print d let d = "hello" e = "world" in print (d ++ e) let f = 1 in print f {-- list comprehension --} test_list = [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 2 ] test_list_do = do x <- [ x + a + b + c | x <- xs , let , let a = 1 , let b = 2 c = 3 ] [ x + y + a + b + c | y <- ys , let , let a = 1 , let b = 2 c = 3 ] fourmolu-0.18.0.0/data/fourmolu/indentation/output-2-indent_wheres.hs0000644000000000000000000000037514745250261023773 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int , b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/indentation/output-4.hs0000644000000000000000000000042714745250261021137 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int , b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/indentation/input.hs0000644000000000000000000000037614745250261020600 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int, b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/indentation/output-4-indent_wheres.hs0000644000000000000000000000043514745250261023772 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int , b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/indentation/output-3.hs0000644000000000000000000000040514745250261021132 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int , b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/indentation/output-2.hs0000644000000000000000000000037214745250261021134 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int , b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/indentation/output-3-indent_wheres.hs0000644000000000000000000000041114745250261023763 0ustar0000000000000000module Foo ( asdf, bar, ) where data Test = Test1 { a :: Int , b :: Int } | Test2 Bool x :: IO Int x = do putStrLn "asdf" let result = y + 10 return result where y = 1 class Foo a where foo :: a -> Int fourmolu-0.18.0.0/data/fourmolu/single-deriving-parens/output-DerivingNever.hs0000644000000000000000000000022014745250261025572 0ustar0000000000000000module Main where data Foo = Foo deriving stock Show data Bar = Bar deriving stock (Show, Eq) data Bat = Bat deriving stock Show fourmolu-0.18.0.0/data/fourmolu/single-deriving-parens/output-DerivingAuto.hs0000644000000000000000000000022214745250261025425 0ustar0000000000000000module Main where data Foo = Foo deriving stock Show data Bar = Bar deriving stock (Show, Eq) data Bat = Bat deriving stock (Show) fourmolu-0.18.0.0/data/fourmolu/single-deriving-parens/input.hs0000644000000000000000000000022214745250261022626 0ustar0000000000000000module Main where data Foo = Foo deriving stock Show data Bar = Bar deriving stock (Show, Eq) data Bat = Bat deriving stock (Show) fourmolu-0.18.0.0/data/fourmolu/single-deriving-parens/output-DerivingAlways.hs0000644000000000000000000000022414745250261025757 0ustar0000000000000000module Main where data Foo = Foo deriving stock (Show) data Bar = Bar deriving stock (Show, Eq) data Bat = Bat deriving stock (Show) fourmolu-0.18.0.0/data/fourmolu/column-limit/output-limit=80.hs0000644000000000000000000000760314745250261022457 0ustar0000000000000000-- Less than 80 characters import Data.List (head, isPrefixOf, tail) -- Over 80 characters, should break this line when column-limit is set to 80. import Data.Maybe ( catMaybe, fromJust, fromMaybe, isJust, isNothing, listToMaybe, mapMaybe, maybe, maybeToList, ) -- For reference, this line had exactly 80 characters -------------------------| oneVeryLongLine :: [String] oneVeryLongLine = ["akjsndjklansdsad"] ++ ["jkanskdjnajsndjnasd"] ++ ["jknasdljknasdlnasdn"] ++ ["lajndljnasdlnasds"] oneVeryLongList :: [String] oneVeryLongList = [ "akjsndjklansdsad" , "jkanskdjnajsndjnasd" , "jknasdljknasdlnasdn" , "lajndljnasdlnasds" ] data NewDataType = NewDataType {field1 :: String, field2 :: String, field3 :: String, field4 :: String} -- Test if the current line breaking still works normally, i.e. if the user -- breaks the line, fourmolu breaks and aligns the rest. data SecondDataType = SecondDataType { field1 :: String , field2 :: String , field3 :: String , field4 :: String } data DataTypeWithAVeryLongName = DataTypeWithAVeryLongName String String String String String -- For reference, this line had exactly 80 characters -------------------------| {----- Long function signatures -----} longFunction0 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> [String] longFunction0 veryLongArg1 a b c d e f = ["a list", "of strings", "that will break the", "column limit"] longFunction1 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction1 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined longFunction12 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 longFunction12 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> String veryLongArg6 veryLongArg6 = undefined longFunction2 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction2 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 a veryLongArg6 = let aVeryLongLine = ["list one", "list one", "list one", "list one", "list one", "list one"] in undefined longFunction3 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction3 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined -- For reference, this line had exactly 80 characters -------------------------| {----- Known limitation: idempotence is broken -----} -- With the column-limit option set, fourmolu will not be idempotent in some -- cases. An example can be seen below, where the long line ends with a `do`. -- Original code testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Will become this when formatted with column-limit set to 80. testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Which, if formatted again, will become this: testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult {- // -} {----- BlockArguments (https://github.com/fourmolu/fourmolu/issues/377) -----} {-# LANGUAGE BlockArguments #-} putThen :: String -> IO a -> IO a putThen s action = putStrLn s >> action main :: IO () main = do putThen "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" do putStrLn "" fourmolu-0.18.0.0/data/fourmolu/column-limit/output-limit=none.hs0000644000000000000000000000727214745250261023171 0ustar0000000000000000-- Less than 80 characters import Data.List (head, isPrefixOf, tail) -- Over 80 characters, should break this line when column-limit is set to 80. import Data.Maybe (catMaybe, fromJust, fromMaybe, isJust, isNothing, listToMaybe, mapMaybe, maybe, maybeToList) -- For reference, this line had exactly 80 characters -------------------------| oneVeryLongLine :: [String] oneVeryLongLine = ["akjsndjklansdsad"] ++ ["jkanskdjnajsndjnasd"] ++ ["jknasdljknasdlnasdn"] ++ ["lajndljnasdlnasds"] oneVeryLongList :: [String] oneVeryLongList = ["akjsndjklansdsad", "jkanskdjnajsndjnasd", "jknasdljknasdlnasdn", "lajndljnasdlnasds"] data NewDataType = NewDataType {field1 :: String, field2 :: String, field3 :: String, field4 :: String} -- Test if the current line breaking still works normally, i.e. if the user -- breaks the line, fourmolu breaks and aligns the rest. data SecondDataType = SecondDataType { field1 :: String , field2 :: String , field3 :: String , field4 :: String } data DataTypeWithAVeryLongName = DataTypeWithAVeryLongName String String String String String -- For reference, this line had exactly 80 characters -------------------------| {----- Long function signatures -----} longFunction0 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> [String] longFunction0 veryLongArg1 a b c d e f = ["a list", "of strings", "that will break the", "column limit"] longFunction1 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction1 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined longFunction12 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 longFunction12 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> String veryLongArg6 veryLongArg6 = undefined longFunction2 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction2 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 a veryLongArg6 = let aVeryLongLine = ["list one", "list one", "list one", "list one", "list one", "list one"] in undefined longFunction3 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction3 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined -- For reference, this line had exactly 80 characters -------------------------| {----- Known limitation: idempotence is broken -----} -- With the column-limit option set, fourmolu will not be idempotent in some -- cases. An example can be seen below, where the long line ends with a `do`. -- Original code testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Will become this when formatted with column-limit set to 80. testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Which, if formatted again, will become this: testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult {- // -} {----- BlockArguments (https://github.com/fourmolu/fourmolu/issues/377) -----} {-# LANGUAGE BlockArguments #-} putThen :: String -> IO a -> IO a putThen s action = putStrLn s >> action main :: IO () main = do putThen "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" do putStrLn "" fourmolu-0.18.0.0/data/fourmolu/column-limit/output-limit=100.hs0000644000000000000000000000737614745250261022537 0ustar0000000000000000-- Less than 80 characters import Data.List (head, isPrefixOf, tail) -- Over 80 characters, should break this line when column-limit is set to 80. import Data.Maybe ( catMaybe, fromJust, fromMaybe, isJust, isNothing, listToMaybe, mapMaybe, maybe, maybeToList, ) -- For reference, this line had exactly 80 characters -------------------------| oneVeryLongLine :: [String] oneVeryLongLine = ["akjsndjklansdsad"] ++ ["jkanskdjnajsndjnasd"] ++ ["jknasdljknasdlnasdn"] ++ ["lajndljnasdlnasds"] oneVeryLongList :: [String] oneVeryLongList = ["akjsndjklansdsad", "jkanskdjnajsndjnasd", "jknasdljknasdlnasdn", "lajndljnasdlnasds"] data NewDataType = NewDataType {field1 :: String, field2 :: String, field3 :: String, field4 :: String} -- Test if the current line breaking still works normally, i.e. if the user -- breaks the line, fourmolu breaks and aligns the rest. data SecondDataType = SecondDataType { field1 :: String , field2 :: String , field3 :: String , field4 :: String } data DataTypeWithAVeryLongName = DataTypeWithAVeryLongName String String String String String -- For reference, this line had exactly 80 characters -------------------------| {----- Long function signatures -----} longFunction0 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> [String] longFunction0 veryLongArg1 a b c d e f = ["a list", "of strings", "that will break the", "column limit"] longFunction1 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction1 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined longFunction12 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 longFunction12 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> String veryLongArg6 veryLongArg6 = undefined longFunction2 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction2 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 a veryLongArg6 = let aVeryLongLine = ["list one", "list one", "list one", "list one", "list one", "list one"] in undefined longFunction3 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction3 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined -- For reference, this line had exactly 80 characters -------------------------| {----- Known limitation: idempotence is broken -----} -- With the column-limit option set, fourmolu will not be idempotent in some -- cases. An example can be seen below, where the long line ends with a `do`. -- Original code testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Will become this when formatted with column-limit set to 80. testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Which, if formatted again, will become this: testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult {- // -} {----- BlockArguments (https://github.com/fourmolu/fourmolu/issues/377) -----} {-# LANGUAGE BlockArguments #-} putThen :: String -> IO a -> IO a putThen s action = putStrLn s >> action main :: IO () main = do putThen "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" do putStrLn "" fourmolu-0.18.0.0/data/fourmolu/column-limit/input-multi.hs0000644000000000000000000000712614745250261022025 0ustar0000000000000000-- Less than 80 characters import Data.List (head, isPrefixOf, tail) -- Over 80 characters, should break this line when column-limit is set to 80. import Data.Maybe (catMaybe, fromJust, fromMaybe, isJust, isNothing, listToMaybe, mapMaybe, maybe, maybeToList) -- For reference, this line had exactly 80 characters -------------------------| oneVeryLongLine :: [String] oneVeryLongLine = ["akjsndjklansdsad"] ++ ["jkanskdjnajsndjnasd"] ++ ["jknasdljknasdlnasdn"] ++ ["lajndljnasdlnasds"] oneVeryLongList :: [String] oneVeryLongList = ["akjsndjklansdsad", "jkanskdjnajsndjnasd", "jknasdljknasdlnasdn", "lajndljnasdlnasds"] data NewDataType = NewDataType {field1 :: String, field2 :: String, field3 :: String, field4 :: String} -- Test if the current line breaking still works normally, i.e. if the user -- breaks the line, fourmolu breaks and aligns the rest. data SecondDataType = SecondDataType {field1 :: String , field2 :: String, field3 :: String, field4 :: String} data DataTypeWithAVeryLongName = DataTypeWithAVeryLongName String String String String String -- For reference, this line had exactly 80 characters -------------------------| {----- Long function signatures -----} longFunction0 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> [String] longFunction0 veryLongArg1 a b c d e f = ["a list", "of strings", "that will break the", "column limit"] longFunction1 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction1 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined longFunction12 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 longFunction12 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String -> String veryLongArg6 veryLongArg6 = undefined longFunction2 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction2 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 a veryLongArg6 = let aVeryLongLine = ["list one", "list one", "list one", "list one", "list one", "list one"] in undefined longFunction3 :: String -> String -> String -> Maybe Int -> Maybe Int -> Maybe Int -> String longFunction3 veryLongArg1 veryLongArg2 veryLongArg3 veryLongArg4 veryLongArgument5 veryLongArg6 = undefined -- For reference, this line had exactly 80 characters -------------------------| {----- Known limitation: idempotence is broken -----} -- With the column-limit option set, fourmolu will not be idempotent in some -- cases. An example can be seen below, where the long line ends with a `do`. -- Original code testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Will become this when formatted with column-limit set to 80. testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult -- Which, if formatted again, will become this: testFund :: Maybe Int testFund = firstTest oneFunctionArgument abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde $ do result <- aRandomResult {- // -} {----- BlockArguments (https://github.com/fourmolu/fourmolu/issues/377) -----} {-# LANGUAGE BlockArguments #-} putThen :: String -> IO a -> IO a putThen s action = putStrLn s >> action main :: IO () main = do putThen "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" do putStrLn "" fourmolu-0.18.0.0/data/fourmolu/import-export/output-ImportExportDiffFriendly.hs0000644000000000000000000000175714745250261026262 0ustar0000000000000000module Foo ( foo, -- * Something bar, {- | A multiline comment here -} baz, -- * Another thing MyClass ( class1, class2 ), ) where import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad ( return, (>>), (>>=) ), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) {- // -} -- https://github.com/fourmolu/fourmolu/issues/341 module Foo ( -- | asdf singleExport, ) where {- // -} -- https://github.com/fourmolu/fourmolu/issues/381 module Foo ( -- * Re-export of module module X, -- * Some other thing Foo, ) where {- // -} -- See data/examples/import/docstrings-after-exports.hs module Test ( since1, -- ^ @since 1.0 since2, -- ^ @since 2.0 since3, -- ^ @since 3.0 SinceType (..), -- ^ @since 4.0 SinceClass (..), -- ^ @since 5.0 Multi (..), {- ^ since 6.0 multi line -} ) where fourmolu-0.18.0.0/data/fourmolu/import-export/output-ImportExportTrailing.hs0000644000000000000000000000211414745250261025452 0ustar0000000000000000module Foo ( foo, -- * Something bar, {- | A multiline comment here -} baz, -- * Another thing MyClass ( class1, class2 ), ) where import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad ( return, (>>), (>>=) ), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) {- // -} -- https://github.com/fourmolu/fourmolu/issues/341 module Foo ( -- | asdf singleExport, ) where {- // -} -- https://github.com/fourmolu/fourmolu/issues/381 module Foo ( -- * Re-export of module module X, -- * Some other thing Foo, ) where {- // -} -- See data/examples/import/docstrings-after-exports.hs module Test ( since1, -- ^ @since 1.0 since2, -- ^ @since 2.0 since3, -- ^ @since 3.0 SinceType (..), -- ^ @since 4.0 SinceClass (..), -- ^ @since 5.0 Multi (..), {- ^ since 6.0 multi line -} ) where fourmolu-0.18.0.0/data/fourmolu/import-export/input-multi.hs0000644000000000000000000000201114745250261022231 0ustar0000000000000000module Foo ( foo, -- * Something bar, -- | A multiline -- comment here baz, -- * Another thing MyClass ( class1 , class2 ), ) where import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad ( return , (>>) , (>>=) ), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) {- // -} -- https://github.com/fourmolu/fourmolu/issues/341 module Foo ( -- | asdf singleExport ) where {- // -} -- https://github.com/fourmolu/fourmolu/issues/381 module Foo ( -- * Re-export of module module X, -- * Some other thing Foo, ) where {- // -} -- See data/examples/import/docstrings-after-exports.hs module Test ( since1, -- ^ @since 1.0 since2 -- ^ @since 2.0 , since3 -- ^ @since 3.0 , SinceType(..) -- ^ @since 4.0 , SinceClass(..) -- ^ @since 5.0 , Multi(..) -- ^ since 6.0 -- multi -- line ) where fourmolu-0.18.0.0/data/fourmolu/import-export/output-ImportExportLeading.hs0000644000000000000000000000205214745250261025245 0ustar0000000000000000module Foo ( foo -- * Something , bar {- | A multiline comment here -} , baz -- * Another thing , MyClass ( class1 , class2 ) ) where import qualified MegaModule as M ( Either , Maybe (Just, Nothing) , MaybeT (..) , Monad ( return , (>>) , (>>=) ) , MonadBaseControl , join , liftIO , void , (<<<) , (>>>) ) {- // -} -- https://github.com/fourmolu/fourmolu/issues/341 module Foo ( -- | asdf singleExport ) where {- // -} -- https://github.com/fourmolu/fourmolu/issues/381 module Foo ( -- * Re-export of module module X -- * Some other thing , Foo ) where {- // -} -- See data/examples/import/docstrings-after-exports.hs module Test ( since1 -- ^ @since 1.0 , since2 -- ^ @since 2.0 , since3 -- ^ @since 3.0 , SinceType (..) -- ^ @since 4.0 , SinceClass (..) -- ^ @since 5.0 , Multi (..) {- ^ since 6.0 multi line -} ) where fourmolu-0.18.0.0/data/fourmolu/sort-deriving-clauses/input.hs0000644000000000000000000000035714745250261022514 0ustar0000000000000000module Main where newtype A = A Int deriving newtype (Num) deriving stock (Show, Eq) deriving stock (Ord, Generic) deriving (ToJSON) data B -- A comment that will end up in an odd place deriving stock (Show) deriving (Eq) fourmolu-0.18.0.0/data/fourmolu/sort-deriving-clauses/output-False.hs0000644000000000000000000000037414745250261023744 0ustar0000000000000000module Main where newtype A = A Int deriving newtype (Num) deriving stock (Show, Eq) deriving stock (Ord, Generic) deriving (ToJSON) data B -- A comment that will end up in an odd place deriving stock (Show) deriving (Eq) fourmolu-0.18.0.0/data/fourmolu/sort-deriving-clauses/output-True.hs0000644000000000000000000000037514745250261023632 0ustar0000000000000000module Main where newtype A = A Int deriving (ToJSON) deriving stock (Show, Eq) deriving stock (Ord, Generic) deriving newtype (Num) data B -- A comment that will end up in an odd place deriving (Eq) deriving stock (Show) fourmolu-0.18.0.0/data/fourmolu/sort-constraints/input.hs0000644000000000000000000000134214745250261021612 0ustar0000000000000000module Main where f1 :: (Show a, Eq a) => a f1 a = a f2 :: (Show a , Eq a) => a f2 a = a -- We don't currently realise that the inner tuple type -- is a constraint tuple. f3 :: ( Generic a , (Show a, Num a) , Eq a) => a f3 a = a f4 :: (Show a, Num a) => Eq a => a f4 a = a f5 :: (Show a -- an interloping comment , Eq a) => a f5 a = a class (Show a, Eq a) => Class1 a where data (Generic a, (Show a, Eq a)) => A a deriving instance (Show a, Eq a) => Class1 Int -- We can't know this is a constraint tuple type rather than a normal -- tuple type without type information type MyConstraints a = (Show a, Eq a) -- https://github.com/fourmolu/fourmolu/issues/451 data Foo = forall a. (B, A a) => Foo a fourmolu-0.18.0.0/data/fourmolu/sort-constraints/output-False.hs0000644000000000000000000000141314745250261023042 0ustar0000000000000000module Main where f1 :: (Show a, Eq a) => a f1 a = a f2 :: ( Show a , Eq a ) => a f2 a = a -- We don't currently realise that the inner tuple type -- is a constraint tuple. f3 :: ( Generic a , (Show a, Num a) , Eq a ) => a f3 a = a f4 :: (Show a, Num a) => (Eq a) => a f4 a = a f5 :: ( Show a , -- an interloping comment Eq a ) => a f5 a = a class (Show a, Eq a) => Class1 a data (Generic a, (Show a, Eq a)) => A a deriving instance (Show a, Eq a) => Class1 Int -- We can't know this is a constraint tuple type rather than a normal -- tuple type without type information type MyConstraints a = (Show a, Eq a) -- https://github.com/fourmolu/fourmolu/issues/451 data Foo = forall a. (B, A a) => Foo a fourmolu-0.18.0.0/data/fourmolu/sort-constraints/output-True.hs0000644000000000000000000000141314745250261022727 0ustar0000000000000000module Main where f1 :: (Eq a, Show a) => a f1 a = a f2 :: ( Eq a , Show a ) => a f2 a = a -- We don't currently realise that the inner tuple type -- is a constraint tuple. f3 :: ( (Show a, Num a) , Eq a , Generic a ) => a f3 a = a f4 :: (Num a, Show a) => (Eq a) => a f4 a = a f5 :: ( -- an interloping comment Eq a , Show a ) => a f5 a = a class (Eq a, Show a) => Class1 a data ((Show a, Eq a), Generic a) => A a deriving instance (Eq a, Show a) => Class1 Int -- We can't know this is a constraint tuple type rather than a normal -- tuple type without type information type MyConstraints a = (Show a, Eq a) -- https://github.com/fourmolu/fourmolu/issues/451 data Foo = forall a. (A a, B) => Foo a fourmolu-0.18.0.0/data/fourmolu/respectful/input.hs0000644000000000000000000000017314745250261020433 0ustar0000000000000000import Foo import Foo.Inner import Bar import Baz type Foo = Int type Foo2 = Double type Bar = Int type Bar2 = Double fourmolu-0.18.0.0/data/fourmolu/respectful/output-False.hs0000644000000000000000000000017214745250261021663 0ustar0000000000000000import Bar import Baz import Foo import Foo.Inner type Foo = Int type Foo2 = Double type Bar = Int type Bar2 = Double fourmolu-0.18.0.0/data/fourmolu/respectful/output-True.hs0000644000000000000000000000017214745250261021550 0ustar0000000000000000import Foo import Foo.Inner import Bar import Baz type Foo = Int type Foo2 = Double type Bar = Int type Bar2 = Double data/fourmolu/haddock-style/output-HaddockMultiLineCompact-module=HaddockSingleLine.hs0000644000000000000000000000117014745250261032427 0ustar0000000000000000fourmolu-0.18.0.0-- | This is a test multiline -- module haddock module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {-| This is a multiline function haddock -} multi1 :: Int {-| This is a multiline function haddock -} multi2 :: Int {-| This is a multiline haddock with indentation -} multi_indentation :: Int {-| This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {-| This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/input.hs0000644000000000000000000000121114745250261021004 0ustar0000000000000000-- | This is a test multiline -- module haddock module Foo where -- | This is a singleline function haddock single1 :: Int {- | This is a singleline function haddock -} single2 :: Int -- | This is a multiline -- function haddock multi1 :: Int {- | This is a multiline function haddock -} multi2 :: Int {- | This is a multiline haddock with indentation -} multi_indentation :: Int -- | This is a haddock -- -- with two consecutive newlines -- -- -- https://github.com/fourmolu/fourmolu/issues/172 foo :: Int foo = 42 -- | This is a haddock containing another haddock -- -- > {-# LANGUAGE ScopedTypeVariables #-} haddock_in_haddock :: Int data/fourmolu/haddock-style/output-HaddockMultiLineCompact-module=HaddockMultiLine.hs0000644000000000000000000000117014745250261032300 0ustar0000000000000000fourmolu-0.18.0.0{- | This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {-| This is a multiline function haddock -} multi1 :: Int {-| This is a multiline function haddock -} multi2 :: Int {-| This is a multiline haddock with indentation -} multi_indentation :: Int {-| This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {-| This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int data/fourmolu/haddock-style/output-HaddockMultiLineCompact-module=HaddockMultiLineCompact.hs0000644000000000000000000000116714745250261033615 0ustar0000000000000000fourmolu-0.18.0.0{-| This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {-| This is a multiline function haddock -} multi1 :: Int {-| This is a multiline function haddock -} multi2 :: Int {-| This is a multiline haddock with indentation -} multi_indentation :: Int {-| This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {-| This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int data/fourmolu/haddock-style/output-HaddockMultiLine-module=HaddockMultiLineCompact.hs0000644000000000000000000000117414745250261032304 0ustar0000000000000000fourmolu-0.18.0.0{-| This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {- | This is a multiline function haddock -} multi1 :: Int {- | This is a multiline function haddock -} multi2 :: Int {- | This is a multiline haddock with indentation -} multi_indentation :: Int {- | This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {- | This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockSingleLine.hs0000644000000000000000000000121114745250261024512 0ustar0000000000000000-- | This is a test multiline -- module haddock module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int -- | This is a multiline -- function haddock multi1 :: Int -- | -- This is a multiline -- function haddock multi2 :: Int -- | This is a multiline haddock -- with indentation multi_indentation :: Int -- | This is a haddock -- -- with two consecutive newlines -- -- -- https://github.com/fourmolu/fourmolu/issues/172 foo :: Int foo = 42 -- | This is a haddock containing another haddock -- -- > {-# LANGUAGE ScopedTypeVariables #-} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockMultiLineCompact.hs0000644000000000000000000000116714745250261025704 0ustar0000000000000000{-| This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {-| This is a multiline function haddock -} multi1 :: Int {-| This is a multiline function haddock -} multi2 :: Int {-| This is a multiline haddock with indentation -} multi_indentation :: Int {-| This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {-| This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockSingleLine-module=HaddockMultiLine.hs0000644000000000000000000000121114745250261031173 0ustar0000000000000000{- | This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int -- | This is a multiline -- function haddock multi1 :: Int -- | -- This is a multiline -- function haddock multi2 :: Int -- | This is a multiline haddock -- with indentation multi_indentation :: Int -- | This is a haddock -- -- with two consecutive newlines -- -- -- https://github.com/fourmolu/fourmolu/issues/172 foo :: Int foo = 42 -- | This is a haddock containing another haddock -- -- > {-# LANGUAGE ScopedTypeVariables #-} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockSingleLine-module=HaddockSingleLine.hs0000644000000000000000000000121114745250261031322 0ustar0000000000000000-- | This is a test multiline -- module haddock module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int -- | This is a multiline -- function haddock multi1 :: Int -- | -- This is a multiline -- function haddock multi2 :: Int -- | This is a multiline haddock -- with indentation multi_indentation :: Int -- | This is a haddock -- -- with two consecutive newlines -- -- -- https://github.com/fourmolu/fourmolu/issues/172 foo :: Int foo = 42 -- | This is a haddock containing another haddock -- -- > {-# LANGUAGE ScopedTypeVariables #-} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockMultiLine-module=HaddockSingleLine.hs0000644000000000000000000000117514745250261031204 0ustar0000000000000000-- | This is a test multiline -- module haddock module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {- | This is a multiline function haddock -} multi1 :: Int {- | This is a multiline function haddock -} multi2 :: Int {- | This is a multiline haddock with indentation -} multi_indentation :: Int {- | This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {- | This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int data/fourmolu/haddock-style/output-HaddockSingleLine-module=HaddockMultiLineCompact.hs0000644000000000000000000000121014745250261032422 0ustar0000000000000000fourmolu-0.18.0.0{-| This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int -- | This is a multiline -- function haddock multi1 :: Int -- | -- This is a multiline -- function haddock multi2 :: Int -- | This is a multiline haddock -- with indentation multi_indentation :: Int -- | This is a haddock -- -- with two consecutive newlines -- -- -- https://github.com/fourmolu/fourmolu/issues/172 foo :: Int foo = 42 -- | This is a haddock containing another haddock -- -- > {-# LANGUAGE ScopedTypeVariables #-} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockMultiLine-module=HaddockMultiLine.hs0000644000000000000000000000117514745250261031055 0ustar0000000000000000{- | This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {- | This is a multiline function haddock -} multi1 :: Int {- | This is a multiline function haddock -} multi2 :: Int {- | This is a multiline haddock with indentation -} multi_indentation :: Int {- | This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {- | This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/haddock-style/output-HaddockMultiLine.hs0000644000000000000000000000117514745250261024374 0ustar0000000000000000{- | This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {- | This is a multiline function haddock -} multi1 :: Int {- | This is a multiline function haddock -} multi2 :: Int {- | This is a multiline haddock with indentation -} multi_indentation :: Int {- | This is a haddock with two consecutive newlines https://github.com/fourmolu/fourmolu/issues/172 -} foo :: Int foo = 42 {- | This is a haddock containing another haddock > {\-# LANGUAGE ScopedTypeVariables #-\} -} haddock_in_haddock :: Int fourmolu-0.18.0.0/data/fourmolu/single-constraint-parens/input.hs0000644000000000000000000000067514745250261023217 0ustar0000000000000000module Main where functionName :: (C a) => a functionName1 :: C a => a functionName2 :: (C a, D a) => a -- https://github.com/fourmolu/fourmolu/issues/340 quantifiedConstraint :: (forall a. Show a => Show (f a)) => f Int -- https://github.com/fourmolu/fourmolu/issues/374 nestedConstraint :: ((c a, c b) => c (f a b)) => Is c a -> Is c b -> Is c (f a b) -- https://github.com/fourmolu/fourmolu/issues/446 implicitParam :: (?a :: Int) => Int fourmolu-0.18.0.0/data/fourmolu/single-constraint-parens/output-ConstraintAlways.hs0000644000000000000000000000067614745250261026724 0ustar0000000000000000module Main where functionName :: (C a) => a functionName1 :: (C a) => a functionName2 :: (C a, D a) => a -- https://github.com/fourmolu/fourmolu/issues/340 quantifiedConstraint :: (forall a. (Show a) => Show (f a)) => f Int -- https://github.com/fourmolu/fourmolu/issues/374 nestedConstraint :: ((c a, c b) => c (f a b)) => Is c a -> Is c b -> Is c (f a b) -- https://github.com/fourmolu/fourmolu/issues/446 implicitParam :: (?a :: Int) => Int fourmolu-0.18.0.0/data/fourmolu/single-constraint-parens/output-ConstraintAuto.hs0000644000000000000000000000067214745250261026370 0ustar0000000000000000module Main where functionName :: (C a) => a functionName1 :: C a => a functionName2 :: (C a, D a) => a -- https://github.com/fourmolu/fourmolu/issues/340 quantifiedConstraint :: (forall a. Show a => Show (f a)) => f Int -- https://github.com/fourmolu/fourmolu/issues/374 nestedConstraint :: ((c a, c b) => c (f a b)) => Is c a -> Is c b -> Is c (f a b) -- https://github.com/fourmolu/fourmolu/issues/446 implicitParam :: (?a :: Int) => Int fourmolu-0.18.0.0/data/fourmolu/single-constraint-parens/output-ConstraintNever.hs0000644000000000000000000000067014745250261026535 0ustar0000000000000000module Main where functionName :: C a => a functionName1 :: C a => a functionName2 :: (C a, D a) => a -- https://github.com/fourmolu/fourmolu/issues/340 quantifiedConstraint :: (forall a. Show a => Show (f a)) => f Int -- https://github.com/fourmolu/fourmolu/issues/374 nestedConstraint :: ((c a, c b) => c (f a b)) => Is c a -> Is c b -> Is c (f a b) -- https://github.com/fourmolu/fourmolu/issues/446 implicitParam :: (?a :: Int) => Int fourmolu-0.18.0.0/data/examples/fourmolu/multiline-haddocks-four-out.hs0000644000000000000000000000032414745250261024272 0ustar0000000000000000-- https://github.com/fourmolu/fourmolu/pull/64 module Foo ( {- | Multiline comment in header -} foo, ) where class Foo a where {- | Multiline haddock in class -} multiline :: a fourmolu-0.18.0.0/data/examples/fourmolu/mixed-disable-pragmas-four-out.hs0000644000000000000000000000033214745250261024650 0ustar0000000000000000module Foo (foo, bar, baz, qux) where {- ORMOLU_DISABLE -} foo :: Char foo = 'a' {- FOURMOLU_ENABLE -} bar :: Char bar = 'b' {- FOURMOLU_DISABLE -} baz :: Char baz = 'c' {- ORMOLU_ENABLE -} qux :: Char qux = 'd' fourmolu-0.18.0.0/data/examples/fourmolu/mixed-disable-pragmas.hs0000644000000000000000000000033414745250261023074 0ustar0000000000000000module Foo (foo, bar, baz, qux) where {- ORMOLU_DISABLE -} foo :: Char foo = 'a' {- FOURMOLU_ENABLE -} bar :: Char bar = 'b' {- FOURMOLU_DISABLE -} baz :: Char baz = 'c' {- ORMOLU_ENABLE -} qux :: Char qux = 'd' fourmolu-0.18.0.0/data/examples/fourmolu/list-multiline.hs0000644000000000000000000000007314745250261021710 0ustar0000000000000000x = [ [1, 2] , [2, 3] , [3, 4] ] fourmolu-0.18.0.0/data/examples/fourmolu/list-multiline-out.hs0000644000000000000000000000006714745250261022520 0ustar0000000000000000x = [ [1, 2], [ 2, 3 ], [3, 4] ] fourmolu-0.18.0.0/data/examples/fourmolu/mixed-disable-pragmas-out.hs0000644000000000000000000000033214745250261023677 0ustar0000000000000000module Foo (foo, bar, baz, qux) where {- ORMOLU_DISABLE -} foo :: Char foo = 'a' {- FOURMOLU_ENABLE -} bar :: Char bar = 'b' {- FOURMOLU_DISABLE -} baz :: Char baz = 'c' {- ORMOLU_ENABLE -} qux :: Char qux = 'd' fourmolu-0.18.0.0/data/examples/fourmolu/list-multiline-four-out.hs0000644000000000000000000000011414745250261023462 0ustar0000000000000000x = [ [1, 2] , [ 2 , 3 ] , [3, 4] ] fourmolu-0.18.0.0/data/examples/fourmolu/multiline-haddocks.hs0000644000000000000000000000030014745250261022506 0ustar0000000000000000-- https://github.com/fourmolu/fourmolu/pull/64 module Foo ( -- | Multiline comment -- in header foo, ) where class Foo a where -- | Multiline haddock -- in class multiline :: a fourmolu-0.18.0.0/data/examples/fourmolu/multiline-haddocks-out.hs0000644000000000000000000000030614745250261023321 0ustar0000000000000000-- https://github.com/fourmolu/fourmolu/pull/64 module Foo ( -- | Multiline comment -- in header foo, ) where class Foo a where -- | Multiline haddock -- in class multiline :: a fourmolu-0.18.0.0/data/examples/fourmolu/type-app-promoted-four-out.hs0000644000000000000000000000001714745250261024077 0ustar0000000000000000x = foo @'True fourmolu-0.18.0.0/data/examples/fourmolu/type-app-promoted-out.hs0000644000000000000000000000001714745250261023126 0ustar0000000000000000x = foo @'True fourmolu-0.18.0.0/data/examples/fourmolu/type-app-promoted.hs0000644000000000000000000000001714745250261022321 0ustar0000000000000000x = foo @'True fourmolu-0.18.0.0/data/examples/declaration/warning/warning-multiline-four-out.hs0000644000000000000000000000041714745250261026244 0ustar0000000000000000{-# WARNING test , foo [ "These are bad functions" , "Really bad!" ] #-} test :: IO () test = pure () instance {-# WARNING "Don't use" #-} Show G1 where show = "G1" deriving instance {-# WARNING "to be removed" #-} Eq G2 fourmolu-0.18.0.0/data/examples/declaration/warning/warning-single-line-out.hs0000644000000000000000000000117214745250261025476 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 data baz "Baz is also deprecated" #-} baz = 5 data Number = Number Dobule {-# DEPRECATED type Number "Use Scientific instead." #-} head (a : _) = a {-# WARNING in "x-partial" head "This function is partial..." #-} instance {-# DEPRECATED "Don't use" #-} Show T1 instance {-# WARNING "Don't use either" #-} Show G1 deriving instance {-# DEPRECATED "to be removed" #-} Eq T2 deriving instance {-# WARNING "to be removed as well" #-} Eq G2 fourmolu-0.18.0.0/data/examples/declaration/warning/warning-multiline.hs0000644000000000000000000000034514745250261024466 0ustar0000000000000000{-# WArNING test, foo ["These are bad functions", "Really bad!"] #-} test :: IO () test = pure () instance {-# WARNING "Don't use" #-} Show G1 where show = "G1" deriving instance {-# WARNING "to be removed" #-} Eq G2 fourmolu-0.18.0.0/data/examples/declaration/warning/warning-multiline-out.hs0000644000000000000000000000036714745250261025277 0ustar0000000000000000{-# WARNING test, foo [ "These are bad functions", "Really bad!" ] #-} test :: IO () test = pure () instance {-# WARNING "Don't use" #-} Show G1 where show = "G1" deriving instance {-# WARNING "to be removed" #-} Eq G2 fourmolu-0.18.0.0/data/examples/declaration/warning/warning-single-line-four-out.hs0000644000000000000000000000117014745250261026445 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 data baz "Baz is also deprecated" #-} baz = 5 data Number = Number Dobule {-# DEPRECATED type Number "Use Scientific instead." #-} head (a : _) = a {-# WARNING in "x-partial" head "This function is partial..." #-} instance {-# DEPRECATED "Don't use" #-} Show T1 instance {-# WARNING "Don't use either" #-} Show G1 deriving instance {-# DEPRECATED "to be removed" #-} Eq T2 deriving instance {-# WARNING "to be removed as well" #-} Eq G2 fourmolu-0.18.0.0/data/examples/declaration/warning/warning-single-line.hs0000644000000000000000000000122414745250261024667 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 data baz "Baz is also deprecated" #-} baz = 5 data Number = Number Dobule {-# DEPRECATED type Number "Use Scientific instead." #-} head (a:_) = a {-# WARNING in "x-partial" head "This function is partial..." #-} instance {-# DEPRECATED "Don't use" #-} Show T1 where instance {-# WARNING "Don't use either" #-} Show G1 where deriving instance {-# DEPRECATED "to be removed" #-} Eq T2 deriving instance {-# WARNING "to be removed as well" #-} Eq G2 fourmolu-0.18.0.0/data/examples/declaration/signature/standalone-kind-four-out.hs0000644000000000000000000000035414745250261026206 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 fourmolu-0.18.0.0/data/examples/declaration/signature/standalone-kind.hs0000644000000000000000000000036014745250261024425 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 fourmolu-0.18.0.0/data/examples/declaration/signature/standalone-kind-out.hs0000644000000000000000000000034614745250261025236 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 fourmolu-0.18.0.0/data/examples/declaration/signature/complete/complete.hs0000644000000000000000000000023014745250261024766 0ustar0000000000000000{-# ComPlETe A , B, C:: Foo #-} {-# COMPLETE A , B #-} {-# ComPlETE A , B, C :: Foo#-} fourmolu-0.18.0.0/data/examples/declaration/signature/complete/complete-out.hs0000644000000000000000000000014414745250261025577 0ustar0000000000000000{-# COMPLETE A, B, C :: Foo #-} {-# COMPLETE A, B #-} {-# COMPLETE A, B, C :: Foo #-} fourmolu-0.18.0.0/data/examples/declaration/signature/complete/complete-four-out.hs0000644000000000000000000000016214745250261026550 0ustar0000000000000000{-# COMPLETE A, B, C :: Foo #-} {-# COMPLETE A, B #-} {-# COMPLETE A , B , C :: Foo #-} fourmolu-0.18.0.0/data/examples/declaration/signature/minimal/minimal-four-out.hs0000644000000000000000000000034714745250261026211 0ustar0000000000000000class Foo a where {-# MINIMAL (==) | ((/=), foo) #-} {-# MINIMAL a | ( b, c, d | e , f ) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool fourmolu-0.18.0.0/data/examples/declaration/signature/minimal/minimal.hs0000644000000000000000000000027414745250261024432 0ustar0000000000000000class Foo a where {-# MINIMAL (==) |( (/=) , foo) #-} {-# MINIMAL a | (b , c , d | e , f) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool fourmolu-0.18.0.0/data/examples/declaration/signature/minimal/minimal-out.hs0000644000000000000000000000030214745250261025227 0ustar0000000000000000class Foo a where {-# MINIMAL (==) | ((/=), foo) #-} {-# MINIMAL a | ( b, c, d | e, f ) | g #-} (==) :: a -> a -> Bool (/=) :: a -> a -> Bool fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infixr-out.hs0000644000000000000000000000006314745250261024772 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& infixr 0 data $ fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infixr.hs0000644000000000000000000000006214745250261024164 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& infixr 0 data $ fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infix.hs0000644000000000000000000000007014745250261024001 0ustar0000000000000000infix 0 infix 9 <^-^> infix 2 -> infix 0 type fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infixl-four-out.hs0000644000000000000000000000006714745250261025741 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** infixl 9 type $ fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infixr-four-out.hs0000644000000000000000000000006214745250261025742 0ustar0000000000000000infixr 8 `Foo` infixr 0 ***, &&& infixr 0 data $ fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infix-four-out.hs0000644000000000000000000000007014745250261025557 0ustar0000000000000000infix 0 infix 9 <^-^> infix 2 -> infix 0 type fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infixl.hs0000644000000000000000000000006714745250261024163 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** infixl 9 type $ fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infix-out.hs0000644000000000000000000000007114745250261024607 0ustar0000000000000000infix 0 infix 9 <^-^> infix 2 -> infix 0 type fourmolu-0.18.0.0/data/examples/declaration/signature/fixity/infixl-out.hs0000644000000000000000000000007014745250261024762 0ustar0000000000000000infixl 8 *** infixl 0 $, *, +, &&, ** infixl 9 type $ data/examples/declaration/signature/type/infix-promoted-type-constructor-four-out.hs0000644000000000000000000000016414745250261032342 0ustar0000000000000000fourmolu-0.18.0.0fun1 :: Def ('[Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[Ref s (Stored Uint32), IBool] ':-> IBool) fourmolu-0.18.0.0/data/examples/declaration/signature/type/long-multiline-applications.hs0000644000000000000000000000045614745250261027764 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) fourmolu-0.18.0.0/data/examples/declaration/signature/type/context-multi-line.hs0000644000000000000000000000014014745250261026070 0ustar0000000000000000functionName :: ( C1 , C2 , C3 ) => a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/unicode.hs0000644000000000000000000000012514745250261023760 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo ∷ ∀a. Show a ⇒ a → String foo = const () fourmolu-0.18.0.0/data/examples/declaration/signature/type/unrelated-out.hs0000644000000000000000000000022314745250261025121 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz fourmolu-0.18.0.0/data/examples/declaration/signature/type/infix-promoted-type-constructor-out.hs0000644000000000000000000000016414745250261031450 0ustar0000000000000000fun1 :: Def ('[Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[Ref s (Stored Uint32), IBool] ':-> IBool) fourmolu-0.18.0.0/data/examples/declaration/signature/type/long-multiline-applications-four-out.hs0000644000000000000000000000046614745250261031543 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) fourmolu-0.18.0.0/data/examples/declaration/signature/type/multi-value-out.hs0000644000000000000000000000016014745250261025402 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 fourmolu-0.18.0.0/data/examples/declaration/signature/type/arguments-out.hs0000644000000000000000000000034614745250261025151 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) fourmolu-0.18.0.0/data/examples/declaration/signature/type/multi-value.hs0000644000000000000000000000015614745250261024602 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 fourmolu-0.18.0.0/data/examples/declaration/signature/type/long-multiline-applications-out.hs0000644000000000000000000000043014745250261030561 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) fourmolu-0.18.0.0/data/examples/declaration/signature/type/arguments-four-out.hs0000644000000000000000000000040014745250261026111 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) fourmolu-0.18.0.0/data/examples/declaration/signature/type/unicode-four-out.hs0000644000000000000000000000013014745250261025532 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo :: forall a. (Show a) => a -> String foo = const () fourmolu-0.18.0.0/data/examples/declaration/signature/type/multi-value-four-out.hs0000644000000000000000000000017214745250261026356 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 fourmolu-0.18.0.0/data/examples/declaration/signature/type/unicode-out.hs0000644000000000000000000000013014745250261024561 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} foo :: forall a. (Show a) => a -> String foo = const () fourmolu-0.18.0.0/data/examples/declaration/signature/type/arguments.hs0000644000000000000000000000036114745250261024341 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) fourmolu-0.18.0.0/data/examples/declaration/signature/type/long-function-name.hs0000644000000000000000000000007714745250261026040 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/context-single-line-four-out.hs0000644000000000000000000000013114745250261027775 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/unrelated-four-out.hs0000644000000000000000000000022314745250261026072 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz fourmolu-0.18.0.0/data/examples/declaration/signature/type/context-multi-line-four-out.hs0000644000000000000000000000015114745250261027650 0ustar0000000000000000functionName :: ( C1 , C2 , C3 ) => a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/context-single-line.hs0000644000000000000000000000011514745250261026221 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/long-function-name-four-out.hs0000644000000000000000000000011114745250261027603 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/context-multi-line-out.hs0000644000000000000000000000013114745250261026675 0ustar0000000000000000functionName :: ( C1, C2, C3 ) => a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/context-single-line-out.hs0000644000000000000000000000011514745250261027026 0ustar0000000000000000functionName :: (C1, C2, C3) => a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/type/infix-promoted-type-constructor.hs0000644000000000000000000000016614745250261030645 0ustar0000000000000000fun1 :: Def ('[ Ref s (Stored Uint32), IBool] 'T.:-> IBool) fun2 :: Def ('[ Ref s (Stored Uint32), IBool] ':-> IBool) fourmolu-0.18.0.0/data/examples/declaration/signature/type/unrelated.hs0000644000000000000000000000022314745250261024314 0ustar0000000000000000clientFunc1 :: SomeType1 clientFunc2 :: SomeType2 clientFunc3 :: SomeType3 clientFunc1 :<|> clientFunc2 :<|> clientFunc3 = hoistClient foo bar baz fourmolu-0.18.0.0/data/examples/declaration/signature/type/long-function-name-out.hs0000644000000000000000000000007714745250261026645 0ustar0000000000000000longFunctionName :: a -> b -> c -> d -> (a, b, c, d) fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/specialize-four-out.hs0000644000000000000000000000100114745250261027401 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 fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/specialize-instance-out.hs0000644000000000000000000000055114745250261030243 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 fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/specialize.hs0000644000000000000000000000100314745250261025625 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 fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/specialize-out.hs0000644000000000000000000000076214745250261026445 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 fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/specialize-instance.hs0000644000000000000000000000056014745250261027436 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 fourmolu-0.18.0.0/data/examples/declaration/signature/specialize/specialize-instance-four-out.hs0000644000000000000000000000057014745250261031215 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 fourmolu-0.18.0.0/data/examples/declaration/signature/inline/conlike.hs0000644000000000000000000000013514745250261024254 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/inline-out.hs0000644000000000000000000000035114745250261024713 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 fourmolu-0.18.0.0/data/examples/declaration/signature/inline/conlike-four-out.hs0000644000000000000000000000013514745250261026032 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/conlike-out.hs0000644000000000000000000000013514745250261025061 0ustar0000000000000000foo :: Int foo = 5 {-# INLINE CONLIKE foo #-} bar :: Int bar = 6 {-# INLINE CONLIKE bar #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/inline.hs0000644000000000000000000000036514745250261024113 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 fourmolu-0.18.0.0/data/examples/declaration/signature/inline/noinline-out.hs0000644000000000000000000000031614745250261025251 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 #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/inlineable-out.hs0000644000000000000000000000024114745250261025535 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINEABLE foo #-} {-# INLINEABLE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINEABLE [~2] baz #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/inline-four-out.hs0000644000000000000000000000035114745250261025664 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 fourmolu-0.18.0.0/data/examples/declaration/signature/inline/inlineable-four-out.hs0000644000000000000000000000024114745250261026506 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINEABLE foo #-} {-# INLINEABLE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINEABLE [~2] baz #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/noinline-four-out.hs0000644000000000000000000000031614745250261026222 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 #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/inlineable.hs0000644000000000000000000000025414745250261024734 0ustar0000000000000000foo :: Int -> Int foo = id {-# INLINEABLE foo #-} {-# INLINEABLE [2] bar #-} bar :: Int -> Int bar = id baz :: Int -> Int baz = id {-# INLINEABLE [~2] baz #-} fourmolu-0.18.0.0/data/examples/declaration/signature/inline/noinline.hs0000644000000000000000000000033014745250261024440 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 #-} fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/single-line-out.hs0000644000000000000000000000016214745250261026042 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/single-line.hs0000644000000000000000000000016214745250261025235 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/multiline-four-out.hs0000644000000000000000000000042514745250261026611 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo , Bar :: Type -> Type -> Type pattern TypeSignature , FunctionBody , PatternSignature , WarningPragma :: [RdrName] -> HsDecl GhcPs fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/multiline-out.hs0000644000000000000000000000036314745250261025641 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type pattern TypeSignature, FunctionBody, PatternSignature, WarningPragma :: [RdrName] -> HsDecl GhcPs fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/single-line-four-out.hs0000644000000000000000000000016214745250261027013 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type fourmolu-0.18.0.0/data/examples/declaration/signature/pattern/multiline.hs0000644000000000000000000000036614745250261025037 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} pattern Arrow :: Type -> Type -> Type pattern Foo, Bar :: Type -> Type -> Type pattern TypeSignature , FunctionBody , PatternSignature , WarningPragma :: [RdrName] -> HsDecl GhcPs fourmolu-0.18.0.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre-four-out.hs0000644000000000000000000000033014745250261031163 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" #-} fourmolu-0.18.0.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre-out.hs0000644000000000000000000000032214745250261030213 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" #-} fourmolu-0.18.0.0/data/examples/declaration/signature/set-cost-centre/set-cost-centre.hs0000644000000000000000000000032314745250261027407 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" #-} fourmolu-0.18.0.0/data/examples/declaration/splice/untyped-splice-four-out.hs0000644000000000000000000000013614745250261025354 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $(foo bar) x = $( foo bar ) x = $foo fourmolu-0.18.0.0/data/examples/declaration/splice/splice-decl-out.hs0000644000000000000000000000023114745250261023616 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(foo bar) $foo $$(foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] fourmolu-0.18.0.0/data/examples/declaration/splice/grouped-splices-out.hs0000644000000000000000000000020214745250261024535 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) fourmolu-0.18.0.0/data/examples/declaration/splice/quotes.hs0000644000000000000000000000022714745250261022152 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option fourmolu-0.18.0.0/data/examples/declaration/splice/typed-splice-four-out.hs0000644000000000000000000000010114745250261025001 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$(foo bar) x = $$foo fourmolu-0.18.0.0/data/examples/declaration/splice/quasiquote-out.hs0000644000000000000000000000022114745250261023631 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] fourmolu-0.18.0.0/data/examples/declaration/splice/splice-decl-four-out.hs0000644000000000000000000000023314745250261024571 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(foo bar) $foo $$(foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] fourmolu-0.18.0.0/data/examples/declaration/splice/splice-decl.hs0000644000000000000000000000025114745250261023013 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $( foo bar) $foo $$( foo bar) $$foo foo bar [|booya|] -- TemplateHaskell allows Q () at the top level do pure [] fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-declaration-four-out.hs0000644000000000000000000000076314745250261026313 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 |] fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-unicode.hs0000644000000000000000000000014414745250261023667 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = ⟦x⟧ fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-declaration.hs0000644000000000000000000000071214745250261024527 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 |] fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-four-out.hs0000644000000000000000000000032214745250261024017 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t|Char|] foo = [|| foo bar ||] foo = [t| * |] foo = [t| a -> * -> a |] fourmolu-0.18.0.0/data/examples/declaration/splice/quasiquote.hs0000644000000000000000000000021514745250261023027 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] fourmolu-0.18.0.0/data/examples/declaration/splice/untyped-splice.hs0000644000000000000000000000016114745250261023574 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $( foo bar ) x = $( foo bar ) x = $foo fourmolu-0.18.0.0/data/examples/declaration/splice/typed-splice.hs0000644000000000000000000000012514745250261023231 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$( foo bar ) x = $$foo fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-unicode-out.hs0000644000000000000000000000014014745250261024470 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = [|x|] fourmolu-0.18.0.0/data/examples/declaration/splice/untyped-splice-out.hs0000644000000000000000000000013114745250261024376 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $(foo bar) x = $( foo bar ) x = $foo fourmolu-0.18.0.0/data/examples/declaration/splice/bracket.hs0000644000000000000000000000026114745250261022243 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t| Char |] foo = [|| foo bar ||] foo = [t| * |] foo = [t|a -> * -> a|] fourmolu-0.18.0.0/data/examples/declaration/splice/grouped-splices.hs0000644000000000000000000000020214745250261023730 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) fourmolu-0.18.0.0/data/examples/declaration/splice/grouped-splices-four-out.hs0000644000000000000000000000020214745250261025506 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} $(deriveJSON fieldLabelMod ''A) $(deriveJSON fieldLabelMod ''B) $(deriveJSON fieldLabelMod ''C) fourmolu-0.18.0.0/data/examples/declaration/splice/quotes-out.hs0000644000000000000000000000022714745250261022757 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option fourmolu-0.18.0.0/data/examples/declaration/splice/quotes-four-out.hs0000644000000000000000000000022714745250261023730 0ustar0000000000000000foo = ''R bar = 'foo bar' = 'foo_bar baz = ''(:#) baz' = ''(Foo.Bar.:#) equals = ''(==) unit = ''() list = ''[] quolified = ''Semigroup.Option fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-declaration-out.hs0000644000000000000000000000071314745250261025335 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 |] fourmolu-0.18.0.0/data/examples/declaration/splice/quasiquote-four-out.hs0000644000000000000000000000022514745250261024606 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} x = [foo| foo bar |] x = [e| foo bar {- -} |] [d| foo bar |] header = [here| #include foo|] fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-unicode-four-out.hs0000644000000000000000000000014014745250261025441 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} ascii = [|x|] unicode = [|x|] fourmolu-0.18.0.0/data/examples/declaration/splice/bracket-out.hs0000644000000000000000000000027014745250261023050 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = [| foo bar |] foo = [e| foo bar |] foo = [t|Char|] foo = [|| foo bar ||] foo = [t| * |] foo = [t| a -> * -> a |] fourmolu-0.18.0.0/data/examples/declaration/splice/typed-splice-out.hs0000644000000000000000000000007714745250261024044 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} x = $$(foo bar) x = $$foo fourmolu-0.18.0.0/data/examples/declaration/type/type-applications-four-out.hs0000644000000000000000000000011614745250261025554 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False fourmolu-0.18.0.0/data/examples/declaration/type/promotion-0.hs0000644000000000000000000000027114745250261022516 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 fourmolu-0.18.0.0/data/examples/declaration/type/lits-four-out.hs0000644000000000000000000000006714745250261023067 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () fourmolu-0.18.0.0/data/examples/declaration/type/lits-out.hs0000644000000000000000000000006114745250261022110 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () fourmolu-0.18.0.0/data/examples/declaration/type/forall-four-out.hs0000644000000000000000000000012514745250261023366 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a fourmolu-0.18.0.0/data/examples/declaration/type/wildcard-binders.hs0000644000000000000000000000002314745250261023543 0ustar0000000000000000type Const a _ = a fourmolu-0.18.0.0/data/examples/declaration/type/parens-comments-out.hs0000644000000000000000000000003714745250261024253 0ustar0000000000000000type Test = ( -- a x ) fourmolu-0.18.0.0/data/examples/declaration/type/promotion-no-puns-out.hs0000644000000000000000000000012114745250261024555 0ustar0000000000000000{-# LANGUAGE NoListTuplePuns #-} type X = (Int, String) type Y = [String, Int] fourmolu-0.18.0.0/data/examples/declaration/type/parens-comments-four-out.hs0000644000000000000000000000004514745250261025223 0ustar0000000000000000type Test = ( -- a x ) fourmolu-0.18.0.0/data/examples/declaration/type/promotion-1.hs0000644000000000000000000000050714745250261022521 0ustar0000000000000000type S2 = Proxy ( '[ '[], '[] ]) type S4 = Proxy ( '( 'Just, ' T'T)) type S5 = Proxy ( '[ 'Just, ' TT'T]) type S6 = Proxy ( '( '(), '() )) type S7 = Proxy ( '( 'a, 'b )) type S8 = Proxy ( '[ Int, Bool ]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool) ] type X = () '`PromotedInfix` () type A = '[ 'a' ] fourmolu-0.18.0.0/data/examples/declaration/type/parens-comments.hs0000644000000000000000000000003214745250261023441 0ustar0000000000000000type Test = ( -- a x) fourmolu-0.18.0.0/data/examples/declaration/type/promotion-1-four-out.hs0000644000000000000000000000047114745250261024277 0ustar0000000000000000type S2 = Proxy ('[ '[], '[]]) type S4 = Proxy ('( 'Just, ' T'T)) type S5 = Proxy ('[ 'Just, 'TT'T]) type S6 = Proxy ('( '(), '())) type S7 = Proxy ('( 'a, 'b)) type S8 = Proxy ('[Int, Bool]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool)] type X = () '`PromotedInfix` () type A = '[ 'a'] fourmolu-0.18.0.0/data/examples/declaration/type/visible-forall-four-out.hs0000644000000000000000000000020614745250261025021 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type fourmolu-0.18.0.0/data/examples/declaration/type/wildcard-binders-four-out.hs0000644000000000000000000000002314745250261025321 0ustar0000000000000000type Const a _ = a fourmolu-0.18.0.0/data/examples/declaration/type/splice-four-out.hs0000644000000000000000000000007514745250261023372 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $(bar [t|Int|]) fourmolu-0.18.0.0/data/examples/declaration/type/splice.hs0000644000000000000000000000011214745250261021604 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $( bar [t|Int|] ) fourmolu-0.18.0.0/data/examples/declaration/type/type-applications.hs0000644000000000000000000000011614745250261023776 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False fourmolu-0.18.0.0/data/examples/declaration/type/misc-kind-signatures-four-out.hs0000644000000000000000000000037214745250261026153 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 fourmolu-0.18.0.0/data/examples/declaration/type/lits.hs0000644000000000000000000000006414745250261021306 0ustar0000000000000000type A = "foo" type B = "foo\ \bar" -> () fourmolu-0.18.0.0/data/examples/declaration/type/splice-out.hs0000644000000000000000000000007514745250261022421 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} type Foo = $(bar [t|Int|]) fourmolu-0.18.0.0/data/examples/declaration/type/promotion-no-puns-four-out.hs0000644000000000000000000000012114745250261025526 0ustar0000000000000000{-# LANGUAGE NoListTuplePuns #-} type X = (Int, String) type Y = [String, Int] fourmolu-0.18.0.0/data/examples/declaration/type/visible-forall.hs0000644000000000000000000000020614745250261023243 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type fourmolu-0.18.0.0/data/examples/declaration/type/promotion-1-out.hs0000644000000000000000000000047714745250261023334 0ustar0000000000000000type S2 = Proxy ('[ '[], '[]]) type S4 = Proxy ('( 'Just, ' T'T)) type S5 = Proxy ('[ 'Just, 'TT'T]) type S6 = Proxy ('( '(), '())) type S7 = Proxy ('( 'a, 'b)) type S8 = Proxy ('[Int, Bool]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool)] type X = () '`PromotedInfix` () type A = '[ 'a'] fourmolu-0.18.0.0/data/examples/declaration/type/promotion-0-four-out.hs0000644000000000000000000000027014745250261024273 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 fourmolu-0.18.0.0/data/examples/declaration/type/misc-kind-signatures-out.hs0000644000000000000000000000037114745250261025201 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 fourmolu-0.18.0.0/data/examples/declaration/type/promotion-0-out.hs0000644000000000000000000000027014745250261023322 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 fourmolu-0.18.0.0/data/examples/declaration/type/promotion-no-puns.hs0000644000000000000000000000012114745250261023750 0ustar0000000000000000{-# Language NoListTuplePuns #-} type X = (Int, String) type Y = [String, Int] fourmolu-0.18.0.0/data/examples/declaration/type/visible-forall-out.hs0000644000000000000000000000020614745250261024050 0ustar0000000000000000-- source: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0081-forall-arrow.rst data T :: forall k -> k -> Type fourmolu-0.18.0.0/data/examples/declaration/type/type-applications-out.hs0000644000000000000000000000011614745250261024603 0ustar0000000000000000{-# LANGUAGE TypeApplications #-} type P = K @Bool @(Bool :: *) 'True 'False fourmolu-0.18.0.0/data/examples/declaration/type/wildcard-binders-out.hs0000644000000000000000000000002314745250261024350 0ustar0000000000000000type Const a _ = a fourmolu-0.18.0.0/data/examples/declaration/type/misc-kind-signatures.hs0000644000000000000000000000037214745250261024375 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 fourmolu-0.18.0.0/data/examples/declaration/type/forall-out.hs0000644000000000000000000000011714745250261022416 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a fourmolu-0.18.0.0/data/examples/declaration/type/forall.hs0000644000000000000000000000012014745250261021603 0ustar0000000000000000type CoerceLocalSig m m' = forall r a. LocalSig m r a -> LocalSig m' r a fourmolu-0.18.0.0/data/examples/declaration/instance/instance-sigs-out.hs0000644000000000000000000000031614745250261024532 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT fourmolu-0.18.0.0/data/examples/declaration/instance/empty-instance-four-out.hs0000644000000000000000000000005314745250261025672 0ustar0000000000000000instance Typeable Int instance Generic Int fourmolu-0.18.0.0/data/examples/declaration/instance/newlines-after-where-four-out.hs0000644000000000000000000000012314745250261026763 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined fourmolu-0.18.0.0/data/examples/declaration/instance/contexts-comments.hs0000644000000000000000000000027014745250261024647 0ustar0000000000000000instance ( Read a, -- Foo Read b , Read ( c, -- Bar d ) ) => Read ( a, -- Baz b ,( c, -- Quux d ) ) where readsPrec = undefined fourmolu-0.18.0.0/data/examples/declaration/instance/newlines-after-where.hs0000644000000000000000000000012114745250261025203 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-gadt-four-out.hs0000644000000000000000000000035514745250261030031 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Bar Int a where SameBar :: Bar Int Int CloseBar :: Bar Int Double OtherBar :: Bar Int a fourmolu-0.18.0.0/data/examples/declaration/instance/overlappable-instances.hs0000644000000000000000000000042314745250261025616 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 fourmolu-0.18.0.0/data/examples/declaration/instance/instance-sigs-multiple-out.hs0000644000000000000000000000023114745250261026357 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [a] -> [a] -> [a] (<*>) _ _ = [] fourmolu-0.18.0.0/data/examples/declaration/instance/multi-parameter-out.hs0000644000000000000000000000017214745250261025073 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-gadt-out.hs0000644000000000000000000000030714745250261027055 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Bar Int a where SameBar :: Bar Int Int CloseBar :: Bar Int Double OtherBar :: Bar Int a fourmolu-0.18.0.0/data/examples/declaration/instance/instance-sigs-multiple.hs0000644000000000000000000000024214745250261025554 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [ a ] -> [ a ] -> [ a ] (<*>) _ _ = [] fourmolu-0.18.0.0/data/examples/declaration/instance/instance-sigs-four-out.hs0000644000000000000000000000036014745250261025502 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-newtype-four-out.hs0000644000000000000000000000021714745250261030602 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } fourmolu-0.18.0.0/data/examples/declaration/instance/multi-parameter.hs0000644000000000000000000000020214745250261024260 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put fourmolu-0.18.0.0/data/examples/declaration/instance/empty-instance.hs0000644000000000000000000000006114745250261024113 0ustar0000000000000000instance Typeable Int instance Generic Int where fourmolu-0.18.0.0/data/examples/declaration/instance/single-parameter.hs0000644000000000000000000000025314745250261024415 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 } fourmolu-0.18.0.0/data/examples/declaration/instance/type-family-instances-four-out.hs0000644000000000000000000000045114745250261027161 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 ) fourmolu-0.18.0.0/data/examples/declaration/instance/associated-types-out.hs0000644000000000000000000000027414745250261025247 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where type Bar Int = Double instance Foo Double where type Bar Double = [Double] type Baz Double = [Double] fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances.hs0000644000000000000000000000045414745250261025336 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) fourmolu-0.18.0.0/data/examples/declaration/instance/instance-sigs.hs0000644000000000000000000000036114745250261023725 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Eq Int where (==) :: Int -> Int -> Bool (==) _ _ = False instance Ord Int where compare :: Int -> Int -> Ordering compare _ _ = GT fourmolu-0.18.0.0/data/examples/declaration/instance/type-family-instances-out.hs0000644000000000000000000000037714745250261026217 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 ) fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-newtype.hs0000644000000000000000000000021314745250261027020 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-newtype-out.hs0000644000000000000000000000021314745250261027625 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} newtype instance Foo [Double] = DoubleListFoo { unDoubleListFoo :: Double } fourmolu-0.18.0.0/data/examples/declaration/instance/empty-instance-out.hs0000644000000000000000000000005414745250261024722 0ustar0000000000000000instance Typeable Int instance Generic Int fourmolu-0.18.0.0/data/examples/declaration/instance/associated-types.hs0000644000000000000000000000033114745250261024434 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where type Bar Int = Double instance Foo Double where type Bar Double = [Double] type instance Baz Double = [Double] fourmolu-0.18.0.0/data/examples/declaration/instance/newlines-between-methods-four-out.hs0000644000000000000000000000100514745250261027644 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 fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-gadt.hs0000644000000000000000000000031614745250261026250 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} {-# LANGUAGE TypeFamilies #-} data instance Bar Int a where SameBar :: Bar Int Int CloseBar :: Bar Int Double OtherBar :: Bar Int a fourmolu-0.18.0.0/data/examples/declaration/instance/contexts-comments-out.hs0000644000000000000000000000030714745250261025455 0ustar0000000000000000instance ( Read a, -- Foo Read b, Read ( c, -- Bar d ) ) => Read ( a, -- Baz b, ( c, -- Quux d ) ) where readsPrec = undefined fourmolu-0.18.0.0/data/examples/declaration/instance/overlappable-instances-four-out.hs0000644000000000000000000000042414745250261027375 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 fourmolu-0.18.0.0/data/examples/declaration/instance/overlappable-instances-out.hs0000644000000000000000000000040414745250261026422 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 fourmolu-0.18.0.0/data/examples/declaration/instance/instance-sigs-multiple-four-out.hs0000644000000000000000000000025514745250261027336 0ustar0000000000000000{-# LANGUAGE InstanceSigs #-} instance Applicative [] where pure :: a -> [a] pure a = [a] (<*>) :: [a] -> [a] -> [a] (<*>) _ _ = [] fourmolu-0.18.0.0/data/examples/declaration/instance/contexts.hs0000644000000000000000000000032614745250261023026 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 "" fourmolu-0.18.0.0/data/examples/declaration/instance/newlines-between-methods.hs0000644000000000000000000000075114745250261026075 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 fourmolu-0.18.0.0/data/examples/declaration/instance/newlines-between-methods-out.hs0000644000000000000000000000075514745250261026706 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 fourmolu-0.18.0.0/data/examples/declaration/instance/associated-types-four-out.hs0000644000000000000000000000033214745250261026213 0ustar0000000000000000{-# LANGUAGE TypeFamilies #-} instance Foo Int where type Bar Int = Double instance Foo Double where type Bar Double = [Double] type Baz Double = [Double] fourmolu-0.18.0.0/data/examples/declaration/instance/contexts-out.hs0000644000000000000000000000034514745250261023634 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 "" fourmolu-0.18.0.0/data/examples/declaration/instance/associated-data.hs0000644000000000000000000000051314745250261024203 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 fourmolu-0.18.0.0/data/examples/declaration/instance/contexts-comments-four-out.hs0000644000000000000000000000035514745250261026431 0ustar0000000000000000instance ( Read a -- Foo , Read b , Read ( c -- Bar , d ) ) => Read ( a -- Baz , b , ( c -- Quux , d ) ) where readsPrec = undefined fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-out.hs0000644000000000000000000000043114745250261026136 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) fourmolu-0.18.0.0/data/examples/declaration/instance/associated-data-out.hs0000644000000000000000000000042614745250261025013 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 fourmolu-0.18.0.0/data/examples/declaration/instance/data-family-instances-four-out.hs0000644000000000000000000000046114745250261027112 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) fourmolu-0.18.0.0/data/examples/declaration/instance/type-family-instances.hs0000644000000000000000000000041214745250261025400 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 ) fourmolu-0.18.0.0/data/examples/declaration/instance/associated-data-four-out.hs0000644000000000000000000000047214745250261025765 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 fourmolu-0.18.0.0/data/examples/declaration/instance/contexts-four-out.hs0000644000000000000000000000040314745250261024600 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 "" fourmolu-0.18.0.0/data/examples/declaration/instance/single-parameter-out.hs0000644000000000000000000000023714745250261025224 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 fourmolu-0.18.0.0/data/examples/declaration/instance/newlines-after-where-out.hs0000644000000000000000000000011714745250261026015 0ustar0000000000000000instance Num X where (+) = undefined instance Num Y where (+) = undefined fourmolu-0.18.0.0/data/examples/declaration/instance/multi-parameter-four-out.hs0000644000000000000000000000017614745250261026050 0ustar0000000000000000instance MonadReader a ((->) a) where ask = id instance MonadState s (State s) where get = State.get put = State.put fourmolu-0.18.0.0/data/examples/declaration/instance/single-parameter-four-out.hs0000644000000000000000000000025514745250261026175 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 fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/basic1-four-out.hs0000644000000000000000000000037014745250261024720 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/basic1-out.hs0000644000000000000000000000032214745250261023744 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude1.hs0000644000000000000000000000102314745250261023515 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/phase.hs0000644000000000000000000000040014745250261023072 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 #-}fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude3-out.hs0000644000000000000000000000054714745250261024336 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude2-four-out.hs0000644000000000000000000000225514745250261025304 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude1-four-out.hs0000644000000000000000000000075514745250261025306 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/type-signature-out.hs0000644000000000000000000000037114745250261025566 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/forall-1.hs0000644000000000000000000000060614745250261023417 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/forall-1-four-out.hs0000644000000000000000000000064614745250261025201 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/forall-1-out.hs0000644000000000000000000000061214745250261024221 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/basic2.hs0000644000000000000000000000065614745250261023152 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; #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude1-out.hs0000644000000000000000000000074114745250261024330 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude2.hs0000644000000000000000000000237214745250261023526 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/never-active-out.hs0000644000000000000000000000007614745250261025200 0ustar0000000000000000{-# RULES "map-loop" [~] forall f. map' f = map' (id . f) #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/forall-0-out.hs0000644000000000000000000000022314745250261024216 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/type-signature-four-out.hs0000644000000000000000000000041714745250261026540 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude3-four-out.hs0000644000000000000000000000055114745250261025302 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude4-four-out.hs0000644000000000000000000000060314745250261025301 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/type-signature.hs0000644000000000000000000000041714745250261024762 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/basic2-out.hs0000644000000000000000000000064214745250261023752 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/phase-out.hs0000644000000000000000000000043114745250261023703 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude2-out.hs0000644000000000000000000000221714745250261024331 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/forall-0-four-out.hs0000644000000000000000000000023514745250261025172 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/never-active-four-out.hs0000644000000000000000000000007614745250261026151 0ustar0000000000000000{-# RULES "map-loop" [~] forall f. map' f = map' (id . f) #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/empty-out.hs0000644000000000000000000000002114745250261023734 0ustar0000000000000000{-# RULES #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/never-active.hs0000644000000000000000000000010314745250261024362 0ustar0000000000000000{-# RULES "map-loop" [ ~ ] forall f . map' f = map' (id . f) #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/forall-0.hs0000644000000000000000000000022014745250261023406 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude4-out.hs0000644000000000000000000000060114745250261024326 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude4.hs0000644000000000000000000000063514745250261023530 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/basic2-four-out.hs0000644000000000000000000000065614745250261024730 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/empty.hs0000644000000000000000000000002314745250261023131 0ustar0000000000000000{-# RULES #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/basic1.hs0000644000000000000000000000030614745250261023141 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/prelude3.hs0000644000000000000000000000054714745250261023531 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/phase-four-out.hs0000644000000000000000000000052314745250261024656 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 #-} fourmolu-0.18.0.0/data/examples/declaration/rewrite-rule/empty-four-out.hs0000644000000000000000000000002314745250261024707 0ustar0000000000000000{-# RULES #-} fourmolu-0.18.0.0/data/examples/declaration/data/ctype-0.hs0000644000000000000000000000006014745250261021540 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T fourmolu-0.18.0.0/data/examples/declaration/data/partly-documented.hs0000644000000000000000000000020014745250261023713 0ustar0000000000000000data Optimisation = PETransform | GeneralisedNatHack -- ^ partial eval and associated transforms deriving (Show, Eq, Generic) fourmolu-0.18.0.0/data/examples/declaration/data/strictness-four-out.hs0000644000000000000000000000023514745250261024242 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 {a :: {-# UNPACK #-} Maybe Int && Bool} fourmolu-0.18.0.0/data/examples/declaration/data/gadt-syntax-out.hs0000644000000000000000000000011514745250261023330 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where MKFoo :: a -> (a -> Bool) -> Foo fourmolu-0.18.0.0/data/examples/declaration/data/existential-multiline-four-out.hs0000644000000000000000000000037314745250261026375 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 fourmolu-0.18.0.0/data/examples/declaration/data/simple.hs0000644000000000000000000000014614745250261021555 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/partly-documented-four-out.hs0000644000000000000000000000022014745250261025473 0ustar0000000000000000data Optimisation = PETransform | -- | partial eval and associated transforms GeneralisedNatHack deriving (Show, Eq, Generic) fourmolu-0.18.0.0/data/examples/declaration/data/ctype-1-out.hs0000644000000000000000000000021314745250261022346 0ustar0000000000000000data {-# CTYPE "header.h" "an-ffi-type-with-along-name" #-} AnFFITypeWithAlongName = AnFFITypeWithAlongName { a :: X, b :: Y } fourmolu-0.18.0.0/data/examples/declaration/data/with-comment.hs0000644000000000000000000000004614745250261022676 0ustar0000000000000000data A = B -- C -- D | E fourmolu-0.18.0.0/data/examples/declaration/data/deriving-out.hs0000644000000000000000000000007614745250261022702 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) fourmolu-0.18.0.0/data/examples/declaration/data/with-weird-haddock-four-out.hs0000644000000000000000000000014414745250261025516 0ustar0000000000000000data PlusLevel' t = -- | @n + ℓ@. Plus Integer (LevelAtom' t) deriving (Show, Data) fourmolu-0.18.0.0/data/examples/declaration/data/ctype-1.hs0000644000000000000000000000021414745250261021542 0ustar0000000000000000data {-# CTYPE "header.h" "an-ffi-type-with-along-name" #-} AnFFITypeWithAlongName = AnFFITypeWithAlongName { a :: X, b :: Y } fourmolu-0.18.0.0/data/examples/declaration/data/kind-annotations-four-out.hs0000644000000000000000000000042214745250261025317 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 fourmolu-0.18.0.0/data/examples/declaration/data/datatype-contexts-out.hs0000644000000000000000000000016514745250261024552 0ustar0000000000000000data (IsString s) => T s = T data (IsString s) => T s = T data ( IsString s, IsString s ) => T s = T fourmolu-0.18.0.0/data/examples/declaration/data/wildcard-binders.hs0000644000000000000000000000002514745250261023475 0ustar0000000000000000data Proxy _ = Proxy fourmolu-0.18.0.0/data/examples/declaration/data/operators-four-out.hs0000644000000000000000000000064414745250261024063 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 fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-2-out.hs0000644000000000000000000000061714745250261025403 0ustar0000000000000000-- | Describes what sort of dictionary to generate for type class instances data Evidence = -- | An existing named instance NamedInstance (Qualified Ident) | -- | Computed instances WarnInstance -- | Warn type class with a user-defined warning message SourceType | -- | The IsSymbol type class for a given Symbol literal IsSymbolInstance PSString deriving (Show, Eq) fourmolu-0.18.0.0/data/examples/declaration/data/with-weird-haddock.hs0000644000000000000000000000013114745250261023734 0ustar0000000000000000data PlusLevel' t = Plus Integer (LevelAtom' t) -- ^ @n + ℓ@. deriving (Show, Data) fourmolu-0.18.0.0/data/examples/declaration/data/simple-broken-out.hs0000644000000000000000000000023014745250261023632 0ustar0000000000000000module Main where -- | Here we go. data Foo = Foo {unFoo :: Int} deriving (Eq) -- | And once again. data Bar = Bar {unBar :: Int} deriving (Eq) fourmolu-0.18.0.0/data/examples/declaration/data/multiline-arg-parens-out.hs0000644000000000000000000000022214745250261025123 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-1.hs0000644000000000000000000000004514745250261024570 0ustar0000000000000000data X = B !Int -- ^ y C fourmolu-0.18.0.0/data/examples/declaration/data/deriving-strategies-out.hs0000644000000000000000000000037514745250261025054 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) fourmolu-0.18.0.0/data/examples/declaration/data/deriving-strategies-four-out.hs0000644000000000000000000000043214745250261026017 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) fourmolu-0.18.0.0/data/examples/declaration/data/record-fancy-existential-out.hs0000644000000000000000000000017114745250261025772 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a b. (Show a, Eq b) => Bar { foo :: a, bars :: b } fourmolu-0.18.0.0/data/examples/declaration/data/operators.hs0000644000000000000000000000057414745250261022307 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 fourmolu-0.18.0.0/data/examples/declaration/data/operators-out.hs0000644000000000000000000000057414745250261023114 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 fourmolu-0.18.0.0/data/examples/declaration/data/infix.hs0000644000000000000000000000003114745250261021372 0ustar0000000000000000data Foo a b = a `Foo` b fourmolu-0.18.0.0/data/examples/declaration/data/simple-broken-four-out.hs0000644000000000000000000000023614745250261024611 0ustar0000000000000000module Main where -- | Here we go. data Foo = Foo {unFoo :: Int} deriving (Eq) -- | And once again. data Bar = Bar {unBar :: Int} deriving (Eq) fourmolu-0.18.0.0/data/examples/declaration/data/record-multi-const-four-out.hs0000644000000000000000000000040014745250261025565 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int -- ^ X , fooY :: Int -- ^ Y } | Bar { barX :: Int -- ^ X , barY :: Int -- ^ Y } deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/with-comment-four-out.hs0000644000000000000000000000004714745250261024455 0ustar0000000000000000data A = B -- C | -- D E fourmolu-0.18.0.0/data/examples/declaration/data/multiline-names.hs0000644000000000000000000000044214745250261023366 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) fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-1-out.hs0000644000000000000000000000005514745250261025376 0ustar0000000000000000data X = B -- | y !Int C fourmolu-0.18.0.0/data/examples/declaration/data/existential-unicode.hs0000644000000000000000000000012414745250261024235 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = ∀ a. Bar fourmolu-0.18.0.0/data/examples/declaration/data/deriving-four-out.hs0000644000000000000000000000010014745250261023637 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) fourmolu-0.18.0.0/data/examples/declaration/data/with-weird-haddock-out.hs0000644000000000000000000000013614745250261024546 0ustar0000000000000000data PlusLevel' t = -- | @n + ℓ@. Plus Integer (LevelAtom' t) deriving (Show, Data) fourmolu-0.18.0.0/data/examples/declaration/data/with-comment-out.hs0000644000000000000000000000004114745250261023476 0ustar0000000000000000data A = B -- C | -- D E fourmolu-0.18.0.0/data/examples/declaration/data/record-fancy-existential.hs0000644000000000000000000000017114745250261025165 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a b . (Show a, Eq b) => Bar { foo :: a , bars :: b } fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-0-out.hs0000644000000000000000000000013614745250261025375 0ustar0000000000000000data Foo = -- | Bar Bar -- | Field 1 Field1 -- | Field 2 Field2 fourmolu-0.18.0.0/data/examples/declaration/data/wildcard-binders-four-out.hs0000644000000000000000000000002514745250261025253 0ustar0000000000000000data Proxy _ = Proxy fourmolu-0.18.0.0/data/examples/declaration/data/record-four-out.hs0000644000000000000000000000057714745250261023330 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) fourmolu-0.18.0.0/data/examples/declaration/data/kind-annotations-out.hs0000644000000000000000000000041714745250261024352 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 fourmolu-0.18.0.0/data/examples/declaration/data/single-constructor-with-haddock.hs0000644000000000000000000000034114745250261026471 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 } fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-2-four-out.hs0000644000000000000000000000064114745250261026351 0ustar0000000000000000-- | Describes what sort of dictionary to generate for type class instances data Evidence = -- | An existing named instance NamedInstance (Qualified Ident) | -- | Computed instances WarnInstance -- | Warn type class with a user-defined warning message SourceType | -- | The IsSymbol type class for a given Symbol literal IsSymbolInstance PSString deriving (Show, Eq) fourmolu-0.18.0.0/data/examples/declaration/data/strictness.hs0000644000000000000000000000023414745250261022463 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 { a :: {-# UNPACK #-} Maybe Int && Bool } fourmolu-0.18.0.0/data/examples/declaration/data/existential-unicode-four-out.hs0000644000000000000000000000015314745250261026015 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = forall a. Bar fourmolu-0.18.0.0/data/examples/declaration/data/type-data.hs0000644000000000000000000000030014745250261022144 0ustar0000000000000000type data Universe = Character | Number | Boolean type data Maybe a = Just a | Nothing type data P :: Type -> Type -> Type where MkP :: (a ~ Natural, b ~~ Char) => P a b fourmolu-0.18.0.0/data/examples/declaration/data/existential-multiline.hs0000644000000000000000000000033414745250261024614 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 fourmolu-0.18.0.0/data/examples/declaration/data/deriving.hs0000644000000000000000000000007614745250261022075 0ustar0000000000000000newtype R r a = R (ReaderT r IO a) deriving (MonadReader r) fourmolu-0.18.0.0/data/examples/declaration/data/multiline-four-out.hs0000644000000000000000000000024614745250261024045 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = -- | One Foo | -- | Two Bar Int | -- | Three Baz deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/record-singleline-out.hs0000644000000000000000000000014314745250261024473 0ustar0000000000000000module Main where -- | Something. data Foo = Foo {fooX :: Int, fooY :: Int} deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/newtype-out.hs0000644000000000000000000000011714745250261022562 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/multiline-arg-parens-four-out.hs0000644000000000000000000000023614745250261026101 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) fourmolu-0.18.0.0/data/examples/declaration/data/single-constructor-with-haddock-four-out.hs0000644000000000000000000000037614745250261030257 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 } fourmolu-0.18.0.0/data/examples/declaration/data/existential-out.hs0000644000000000000000000000020014745250261023411 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. (a + b) => Bar a b fourmolu-0.18.0.0/data/examples/declaration/data/ctype-0-four-out.hs0000644000000000000000000000005514745250261023322 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T fourmolu-0.18.0.0/data/examples/declaration/data/fat-multiline-out.hs0000644000000000000000000000020014745250261023632 0ustar0000000000000000module Main where -- | Something. data Foo = -- | Foo Foo Int Int | -- | Bar Bar Bool Bool fourmolu-0.18.0.0/data/examples/declaration/data/invisible-binders-four-out.hs0000644000000000000000000000012614745250261025450 0ustar0000000000000000type T :: forall k. k -> forall j. j -> Type data T @k (a :: k) @(j :: Type) (b :: j) fourmolu-0.18.0.0/data/examples/declaration/data/record.hs0000644000000000000000000000050114745250261021535 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) fourmolu-0.18.0.0/data/examples/declaration/data/datatype-contexts-four-out.hs0000644000000000000000000000020014745250261025511 0ustar0000000000000000data (IsString s) => T s = T data (IsString s) => T s = T data ( IsString s , IsString s ) => T s = T fourmolu-0.18.0.0/data/examples/declaration/data/ctype-0-out.hs0000644000000000000000000000005514745250261022351 0ustar0000000000000000data {-# CTYPE "unistd.h" "useconds_t" #-} T fourmolu-0.18.0.0/data/examples/declaration/data/multiline-arg-parens.hs0000644000000000000000000000023514745250261024322 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Bar (Set Baz) -- and here we go -- and that's it Text deriving (Eq) fourmolu-0.18.0.0/data/examples/declaration/data/gadt-syntax.hs0000644000000000000000000000011714745250261022525 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where { MKFoo :: a -> (a->Bool) -> Foo } fourmolu-0.18.0.0/data/examples/declaration/data/infix-four-out.hs0000644000000000000000000000003114745250261023150 0ustar0000000000000000data Foo a b = a `Foo` b fourmolu-0.18.0.0/data/examples/declaration/data/type-data-four-out.hs0000644000000000000000000000027014745250261023730 0ustar0000000000000000type data Universe = Character | Number | Boolean type data Maybe a = Just a | Nothing type data P :: Type -> Type -> Type where MkP :: (a ~ Natural, b ~~ Char) => P a b fourmolu-0.18.0.0/data/examples/declaration/data/multiline-names-four-out.hs0000644000000000000000000000051714745250261025147 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) fourmolu-0.18.0.0/data/examples/declaration/data/newtype-four-out.hs0000644000000000000000000000012114745250261023526 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/gadt-syntax-four-out.hs0000644000000000000000000000011514745250261024301 0ustar0000000000000000{-# LANGUAGE GADTSyntax #-} data Foo where MKFoo :: a -> (a -> Bool) -> Foo fourmolu-0.18.0.0/data/examples/declaration/data/fat-multiline-four-out.hs0000644000000000000000000000022014745250261024605 0ustar0000000000000000module Main where -- | Something. data Foo = -- | Foo Foo Int Int | -- | Bar Bar Bool Bool fourmolu-0.18.0.0/data/examples/declaration/data/kind-annotations.hs0000644000000000000000000000041614745250261023544 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 fourmolu-0.18.0.0/data/examples/declaration/data/multiline-out.hs0000644000000000000000000000022414745250261023070 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = -- | One Foo | -- | Two Bar Int | -- | Three Baz deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-3.hs0000644000000000000000000000004514745250261024572 0ustar0000000000000000data A = A {- | a number -} Int Bool fourmolu-0.18.0.0/data/examples/declaration/data/existential.hs0000644000000000000000000000017614745250261022620 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. a + b => Bar a b fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-3-out.hs0000644000000000000000000000006614745250261025402 0ustar0000000000000000data A = A -- | a number Int Bool fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-0.hs0000644000000000000000000000012214745250261024563 0ustar0000000000000000data Foo = -- | Bar Bar Field1 -- ^ Field 1 Field2 -- ^ Field 2 fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-0-four-out.hs0000644000000000000000000000015214745250261026344 0ustar0000000000000000data Foo = -- | Bar Bar -- | Field 1 Field1 -- | Field 2 Field2 fourmolu-0.18.0.0/data/examples/declaration/data/simple-broken.hs0000644000000000000000000000023614745250261023033 0ustar0000000000000000module Main where -- | Here we go. data Foo = Foo { unFoo :: Int } deriving (Eq) -- | And once again. data Bar = Bar { unBar :: Int } deriving (Eq) fourmolu-0.18.0.0/data/examples/declaration/data/empty-out.hs0000644000000000000000000000005214745250261022223 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo fourmolu-0.18.0.0/data/examples/declaration/data/record-fancy-existential-four-out.hs0000644000000000000000000000017614745250261026750 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a b. (Show a, Eq b) => Bar { foo :: a , bars :: b } fourmolu-0.18.0.0/data/examples/declaration/data/existential-four-out.hs0000644000000000000000000000020014745250261024362 0ustar0000000000000000{-# LANGUAGE ExistentialQuantification #-} data Foo = forall a. MkFoo a (a -> Bool) data Bar = forall a b. (a + b) => Bar a b fourmolu-0.18.0.0/data/examples/declaration/data/infix-haddocks-four-out.hs0000644000000000000000000000141214745250261024732 0ustar0000000000000000{- https://github.com/tweag/ormolu/issues/758 -} data A = -- | Docs for :# A :# A data WithDocs = forall left right. (Show left) => -- | Docs for left arg left -- | Docs for op :*: -- | Docs for right arg right data MixedDocs = forall left right. (Show left) => left -- ^ before :*: -- | after right data DocPartial = Left {- ^ left docs on multiple lines -} :*: Right | -- | op Left :*: Right | Left :*: -- | right Right | -- | op Left :*: Right | -- | op Left :*: Right data NoDocs = Left :*: Right fourmolu-0.18.0.0/data/examples/declaration/data/multiline-names-out.hs0000644000000000000000000000044714745250261024200 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) fourmolu-0.18.0.0/data/examples/declaration/data/strictness-out.hs0000644000000000000000000000023114745250261023265 0ustar0000000000000000module Main where -- | Something. data Foo = Foo1 !Int {-# UNPACK #-} !Bool {-# NOUNPACK #-} !String | Foo2 {a :: {-# UNPACK #-} Maybe Int && Bool} fourmolu-0.18.0.0/data/examples/declaration/data/newtype.hs0000644000000000000000000000012014745250261021747 0ustar0000000000000000module Main where -- | Something. newtype Foo = Foo Int deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/datatype-contexts.hs0000644000000000000000000000015314745250261023742 0ustar0000000000000000data IsString s => T s = T data IsString s => T s = T data ( IsString s , IsString s ) => T s = T fourmolu-0.18.0.0/data/examples/declaration/data/infix-out.hs0000644000000000000000000000003114745250261022177 0ustar0000000000000000data Foo a b = a `Foo` b fourmolu-0.18.0.0/data/examples/declaration/data/infix-haddocks.hs0000644000000000000000000000120314745250261023152 0ustar0000000000000000{- https://github.com/tweag/ormolu/issues/758 -} data A = A :# A -- ^ Docs for :# data WithDocs = forall left right. Show left => left -- ^ Docs for left arg :*: -- ^ Docs for op right -- ^ Docs for right arg data MixedDocs -- | before = forall left right. Show left => left :*: right -- ^ after data DocPartial = Left -- ^ left docs -- on multiple -- lines :*: Right | Left :*: -- ^ op Right | Left :*: -- | right Right | -- | op Left :*: Right | Left :*: Right -- ^ op data NoDocs = Left :*: Right fourmolu-0.18.0.0/data/examples/declaration/data/wildcard-binders-out.hs0000644000000000000000000000002514745250261024302 0ustar0000000000000000data Proxy _ = Proxy fourmolu-0.18.0.0/data/examples/declaration/data/simple-out.hs0000644000000000000000000000014514745250261022361 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/empty.hs0000644000000000000000000000005214745250261021416 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo fourmolu-0.18.0.0/data/examples/declaration/data/partly-documented-out.hs0000644000000000000000000000021014745250261024521 0ustar0000000000000000data Optimisation = PETransform | -- | partial eval and associated transforms GeneralisedNatHack deriving (Show, Eq, Generic) fourmolu-0.18.0.0/data/examples/declaration/data/deriving-strategies.hs0000644000000000000000000000036514745250261024246 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) fourmolu-0.18.0.0/data/examples/declaration/data/record-multi-const-out.hs0000644000000000000000000000036014745250261024621 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { -- | X fooX :: Int, -- | Y fooY :: Int } | Bar { -- | X barX :: Int, -- | Y barY :: Int } deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/multiline.hs0000644000000000000000000000021114745250261022257 0ustar0000000000000000module Main where -- | Here we have 'Foo'. data Foo = Foo -- ^ One | Bar Int -- ^ Two | Baz -- ^ Three deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-3-four-out.hs0000644000000000000000000000007614745250261026354 0ustar0000000000000000data A = A -- | a number Int Bool fourmolu-0.18.0.0/data/examples/declaration/data/record-singleline-four-out.hs0000644000000000000000000000014514745250261025446 0ustar0000000000000000module Main where -- | Something. data Foo = Foo {fooX :: Int, fooY :: Int} deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/record-multi-const.hs0000644000000000000000000000026514745250261024020 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int -- ^ X , fooY :: Int -- ^ Y } | Bar { barX :: Int -- ^ X , barY :: Int -- ^ Y } deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/existential-multiline-out.hs0000644000000000000000000000034314745250261025421 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 fourmolu-0.18.0.0/data/examples/declaration/data/record-out.hs0000644000000000000000000000053714745250261022353 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) fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-2.hs0000644000000000000000000000057414745250261024600 0ustar0000000000000000-- | Describes what sort of dictionary to generate for type class instances data Evidence -- | An existing named instance = NamedInstance (Qualified Ident) -- | Computed instances | WarnInstance SourceType -- ^ Warn type class with a user-defined warning message | IsSymbolInstance PSString -- ^ The IsSymbol type class for a given Symbol literal deriving (Show, Eq) fourmolu-0.18.0.0/data/examples/declaration/data/type-data-out.hs0000644000000000000000000000026214745250261022760 0ustar0000000000000000type data Universe = Character | Number | Boolean type data Maybe a = Just a | Nothing type data P :: Type -> Type -> Type where MkP :: (a ~ Natural, b ~~ Char) => P a b fourmolu-0.18.0.0/data/examples/declaration/data/existential-unicode-out.hs0000644000000000000000000000013714745250261025046 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo = forall a. Foo data Bar = forall a. Bar fourmolu-0.18.0.0/data/examples/declaration/data/fat-multiline.hs0000644000000000000000000000017114745250261023034 0ustar0000000000000000module Main where -- | Something. data Foo = Foo Int Int -- ^ Foo | Bar Bool Bool -- ^ Bar fourmolu-0.18.0.0/data/examples/declaration/data/invisible-binders.hs0000644000000000000000000000012614745250261023672 0ustar0000000000000000type T :: forall k. k -> forall j. j -> Type data T @k (a :: k) @(j :: Type) (b :: j) fourmolu-0.18.0.0/data/examples/declaration/data/ctype-1-four-out.hs0000644000000000000000000000022414745250261023321 0ustar0000000000000000data {-# CTYPE "header.h" "an-ffi-type-with-along-name" #-} AnFFITypeWithAlongName = AnFFITypeWithAlongName { a :: X , b :: Y } fourmolu-0.18.0.0/data/examples/declaration/data/infix-haddocks-out.hs0000644000000000000000000000126314745250261023765 0ustar0000000000000000{- https://github.com/tweag/ormolu/issues/758 -} data A = -- | Docs for :# A :# A data WithDocs = forall left right. (Show left) => -- | Docs for left arg left -- | Docs for op :*: -- | Docs for right arg right data MixedDocs = forall left right. (Show left) => left -- ^ before :*: -- | after right data DocPartial = Left -- ^ left docs -- on multiple -- lines :*: Right | -- | op Left :*: Right | Left :*: -- | right Right | -- | op Left :*: Right | -- | op Left :*: Right data NoDocs = Left :*: Right fourmolu-0.18.0.0/data/examples/declaration/data/single-constructor-with-haddock-out.hs0000644000000000000000000000035514745250261027303 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 } fourmolu-0.18.0.0/data/examples/declaration/data/unnamed-field-comment-1-four-out.hs0000644000000000000000000000006514745250261026350 0ustar0000000000000000data X = B -- | y !Int C fourmolu-0.18.0.0/data/examples/declaration/data/empty-four-out.hs0000644000000000000000000000005214745250261023174 0ustar0000000000000000{-# LANGUAGE EmptyDataDecls #-} data Foo fourmolu-0.18.0.0/data/examples/declaration/data/invisible-binders-out.hs0000644000000000000000000000012614745250261024477 0ustar0000000000000000type T :: forall k. k -> forall j. j -> Type data T @k (a :: k) @(j :: Type) (b :: j) fourmolu-0.18.0.0/data/examples/declaration/data/record-singleline.hs0000644000000000000000000000014714745250261023672 0ustar0000000000000000module Main where -- | Something. data Foo = Foo { fooX :: Int , fooY :: Int } deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/simple-four-out.hs0000644000000000000000000000014714745250261023334 0ustar0000000000000000module Main where -- | And here we have 'Foo'. data Foo = Foo | Bar Int | Baz deriving (Eq, Show) fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/gadt.hs0000644000000000000000000000021014745250261023571 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-2-out.hs0000644000000000000000000000024314745250261025102 0ustar0000000000000000data IndexWithInfo schema = forall x. IndexWithInfo { checkedIndex :: Index schema x, checkedIndexName :: U.Variable, checkedIndexType :: Type x } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-1-out.hs0000644000000000000000000000022114745250261025075 0ustar0000000000000000-- | Foo. data Foo = Foo { -- | Something foo :: Foo Int Int, -- | Something else bar :: Bar Char Char } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-1-four-out.hs0000644000000000000000000000024214745250261026051 0ustar0000000000000000-- | Foo. data Foo = Foo { foo :: Foo Int Int -- ^ Something , bar :: Bar Char Char -- ^ Something else } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-2.hs0000644000000000000000000000025114745250261024274 0ustar0000000000000000data IndexWithInfo schema = forall x. IndexWithInfo { checkedIndex :: Index schema x , checkedIndexName :: U.Variable , checkedIndexType :: Type x } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/variants-four-out.hs0000644000000000000000000000021314745250261026262 0ustar0000000000000000module Main where -- | Foo. data Foo = -- | Something Foo Int Int | -- | Something else Bar Char Char fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-0-four-out.hs0000644000000000000000000000023614745250261026053 0ustar0000000000000000-- | Foo. data Foo = Foo { foo :: Foo Int Int -- ^ Something , bar :: Bar Char Char -- ^ Something else } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/variants-out.hs0000644000000000000000000000017714745250261025322 0ustar0000000000000000module Main where -- | Foo. data Foo = -- | Something Foo Int Int | -- | Something else Bar Char Char fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-2-four-out.hs0000644000000000000000000000025714745250261026060 0ustar0000000000000000data IndexWithInfo schema = forall x. IndexWithInfo { checkedIndex :: Index schema x , checkedIndexName :: U.Variable , checkedIndexType :: Type x } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-0-out.hs0000644000000000000000000000021714745250261025101 0ustar0000000000000000-- | Foo. data Foo = Foo { -- | Something foo :: Foo Int Int, -- | Something else bar :: Bar Char Char } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/gadt-out.hs0000644000000000000000000000022314745250261024402 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-0.hs0000644000000000000000000000020414745250261024270 0ustar0000000000000000-- | Foo. data Foo = Foo { foo :: Foo Int Int -- ^ Something , bar :: Bar Char Char -- ^ Something else } fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/gadt-four-out.hs0000644000000000000000000000025314745250261025356 0ustar0000000000000000module Main where -- | Foo. data Foo a b where -- | Something Foo :: Foo Int Int -- | Something else Bar :: Foo Char Char fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/variants.hs0000644000000000000000000000017014745250261024506 0ustar0000000000000000module Main where -- | Foo. data Foo = Foo Int Int -- ^ Something | Bar Char Char -- ^ Something else fourmolu-0.18.0.0/data/examples/declaration/data/field-layout/record-1.hs0000644000000000000000000000020614745250261024273 0ustar0000000000000000-- | Foo. data Foo = Foo { foo :: Foo Int Int -- ^ Something , bar :: Bar Char Char -- ^ Something else } fourmolu-0.18.0.0/data/examples/declaration/data/gadt/strictness-four-out.hs0000644000000000000000000000017514745250261025164 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int fourmolu-0.18.0.0/data/examples/declaration/data/gadt/simple.hs0000644000000000000000000000046114745250261022474 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'. fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiple-declaration-four-out.hs0000644000000000000000000000033514745250261027077 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiline-where.hs0000644000000000000000000000051114745250261024311 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) fourmolu-0.18.0.0/data/examples/declaration/data/gadt/unicode.hs0000644000000000000000000000012714745250261022630 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo ∷ Type → Type where Foo ∷ a → Foo a fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiline-where-out.hs0000644000000000000000000000052214745250261025120 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) fourmolu-0.18.0.0/data/examples/declaration/data/gadt/record-four-out.hs0000644000000000000000000000036714745250261024244 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: {fooX :: Int} -> Foo Bar :: { fooY :: Int , fooBar, fooBaz :: Bool , fooFoo , barBar , bazBaz :: Int } -> Foo fourmolu-0.18.0.0/data/examples/declaration/data/gadt/strictness.hs0000644000000000000000000000017114745250261023402 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiline-four-out.hs0000644000000000000000000000065114745250261024764 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/record.hs0000644000000000000000000000034314745250261022460 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: { fooX :: Int } -> Foo Bar :: { fooY :: Int , fooBar, fooBaz :: Bool , fooFoo , barBar , bazBaz :: Int } -> Foo fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiple-declaration.hs0000644000000000000000000000027314745250261025322 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiple-declaration-out.hs0000644000000000000000000000030014745250261026116 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiline-where-four-out.hs0000644000000000000000000000062414745250261026074 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) fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiline-out.hs0000644000000000000000000000060314745250261024010 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/unicode-four-out.hs0000644000000000000000000000012514745250261024404 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo :: Type -> Type where Foo :: a -> Foo a fourmolu-0.18.0.0/data/examples/declaration/data/gadt/unicode-out.hs0000644000000000000000000000012314745250261023431 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} data Foo :: Type -> Type where Foo :: a -> Foo a fourmolu-0.18.0.0/data/examples/declaration/data/gadt/strictness-out.hs0000644000000000000000000000017114745250261024207 0ustar0000000000000000data Foo a where Foo1 :: !Int -> {-# UNPACK #-} !Bool -> Foo Int Foo2 :: {-# UNPACK #-} Maybe Int && Bool -> Foo Int fourmolu-0.18.0.0/data/examples/declaration/data/gadt/simple-out.hs0000644000000000000000000000052014745250261023275 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/multiline.hs0000644000000000000000000000057414745250261023212 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 fourmolu-0.18.0.0/data/examples/declaration/data/gadt/record-out.hs0000644000000000000000000000032314745250261023263 0ustar0000000000000000module Main where -- | Something. data Foo where Foo :: {fooX :: Int} -> Foo Bar :: { fooY :: Int, fooBar, fooBaz :: Bool, fooFoo, barBar, bazBaz :: Int } -> Foo fourmolu-0.18.0.0/data/examples/declaration/data/gadt/simple-four-out.hs0000644000000000000000000000057014745250261024253 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 fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/simple.hs0000644000000000000000000000017714745250261023526 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 = () fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/with-weird-haddock-four-out.hs0000644000000000000000000000010514745250261027460 0ustar0000000000000000type Elims = -- | eliminations ordered left-to-right. [Elim] fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/with-weird-haddock.hs0000644000000000000000000000007614745250261025711 0ustar0000000000000000type Elims = [Elim] -- ^ eliminations ordered left-to-right. fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/with-weird-haddock-out.hs0000644000000000000000000000010114745250261026503 0ustar0000000000000000type Elims = -- | eliminations ordered left-to-right. [Elim] fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/multi-line.hs0000644000000000000000000000041714745250261024311 0ustar0000000000000000import Servant.API type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> "route2" :> ApiRoute2 -- comment here :<|> OmitDocs :> "i" :> ASomething API type A -- foo = B fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/multi-line-four-out.hs0000644000000000000000000000045714745250261026073 0ustar0000000000000000import Servant.API type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> "route2" :> ApiRoute2 -- comment here :<|> OmitDocs :> "i" :> ASomething API type A -- foo = B fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/simple-out.hs0000644000000000000000000000017614745250261024332 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 = () fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/multi-line-out.hs0000644000000000000000000000041514745250261025114 0ustar0000000000000000import Servant.API type Foo a b c = Bar c a b type Foo a b c = Bar c a b type Foo = Bar Baz Quux type API = "route1" :> ApiRoute1 :<|> "route2" :> ApiRoute2 -- comment here :<|> OmitDocs :> "i" :> ASomething API type A -- foo = B fourmolu-0.18.0.0/data/examples/declaration/type-synonyms/simple-four-out.hs0000644000000000000000000000017614745250261025303 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 = () fourmolu-0.18.0.0/data/examples/declaration/class/empty-classes.hs0000644000000000000000000000010514745250261023244 0ustar0000000000000000module Main where -- | Foo! class Foo a where -- | Bar! class Bar a fourmolu-0.18.0.0/data/examples/declaration/class/default-implementations-comments-out.hs0000644000000000000000000000045714745250261027747 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 fourmolu-0.18.0.0/data/examples/declaration/class/poly-kinded-classes-out.hs0000644000000000000000000000015314745250261025135 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a :: k) class Bar ( a :: -- Variable * -- Star ) fourmolu-0.18.0.0/data/examples/declaration/class/type-operators2-out.hs0000644000000000000000000000025514745250261024345 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class a `Pair` b class a `Sum` b class (f `Product` g) a class ( f `Sum` g ) a fourmolu-0.18.0.0/data/examples/declaration/class/newlines-and-haddocks.hs0000644000000000000000000000046214745250261024623 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 fourmolu-0.18.0.0/data/examples/declaration/class/poly-kinded-classes.hs0000644000000000000000000000014514745250261024331 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a::k) class Bar (a -- Variable :: * -- Star ) fourmolu-0.18.0.0/data/examples/declaration/class/newlines-after-where-four-out.hs0000644000000000000000000000012314745250261026264 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a fourmolu-0.18.0.0/data/examples/declaration/class/type-operators3.hs0000644000000000000000000000024014745250261023533 0ustar0000000000000000{-# LANGUAGE TypeFamilies, TypeOperators, NoStarIsType, PolyKinds #-} class PNum x where type (a :: x) * (b :: x) instance PNum Nat where type a * b = () fourmolu-0.18.0.0/data/examples/declaration/class/multi-parameters1-out.hs0000644000000000000000000000031414745250261024636 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-after-where.hs0000644000000000000000000000012114745250261024504 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a fourmolu-0.18.0.0/data/examples/declaration/class/single-parameters-out.hs0000644000000000000000000000053514745250261024711 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-signatures-simple-out.hs0000644000000000000000000000021314745250261026355 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: (Show a) => a -> String foo = show fourmolu-0.18.0.0/data/examples/declaration/class/default-signatures-simple-four-out.hs0000644000000000000000000000022314745250261027327 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: (Show a) => a -> String foo = show fourmolu-0.18.0.0/data/examples/declaration/class/associated-types2-four-out.hs0000644000000000000000000000044414745250261025602 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-and-haddocks-four-out.hs0000644000000000000000000000052414745250261026400 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-signatures-out.hs0000644000000000000000000000050114745250261025066 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 fourmolu-0.18.0.0/data/examples/declaration/class/functional-dependencies-out.hs0000644000000000000000000000051014745250261026046 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-signatures.hs0000644000000000000000000000056414745250261024272 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 fourmolu-0.18.0.0/data/examples/declaration/class/multi-parameters2-out.hs0000644000000000000000000000035114745250261024640 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 fourmolu-0.18.0.0/data/examples/declaration/class/single-parameters.hs0000644000000000000000000000055214745250261024103 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-types2-out.hs0000644000000000000000000000035414745250261024631 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-types1.hs0000644000000000000000000000026214745250261024021 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-implementations-four-out.hs0000644000000000000000000000024014745250261027063 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-type-defaults-four-out.hs0000644000000000000000000000060514745250261027141 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 fourmolu-0.18.0.0/data/examples/declaration/class/type-operators1.hs0000644000000000000000000000033214745250261023533 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-signatures-four-out.hs0000644000000000000000000000056614745250261026052 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 fourmolu-0.18.0.0/data/examples/declaration/class/type-operators3-four-out.hs0000644000000000000000000000032414745250261025314 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 = () fourmolu-0.18.0.0/data/examples/declaration/class/type-operators2-four-out.hs0000644000000000000000000000027514745250261025320 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class a `Pair` b class a `Sum` b class (f `Product` g) a class ( f `Sum` g ) a fourmolu-0.18.0.0/data/examples/declaration/class/type-operators3-out.hs0000644000000000000000000000032014745250261024337 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 = () fourmolu-0.18.0.0/data/examples/declaration/class/multi-parameters1-four-out.hs0000644000000000000000000000034214745250261025610 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 fourmolu-0.18.0.0/data/examples/declaration/class/super-classes-out.hs0000644000000000000000000000022714745250261024056 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 fourmolu-0.18.0.0/data/examples/declaration/class/multi-parameters2-four-out.hs0000644000000000000000000000042514745250261025613 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-types1-out.hs0000644000000000000000000000025314745250261024626 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-signatures-simple.hs0000644000000000000000000000022114745250261025547 0ustar0000000000000000module Main where -- | Something. class Foo a where -- | Foo foo :: a -> String default foo :: Show a => a -> String foo = show fourmolu-0.18.0.0/data/examples/declaration/class/associated-types1-four-out.hs0000644000000000000000000000027514745250261025603 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-types2.hs0000644000000000000000000000040714745250261024023 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-between-methods-four-out.hs0000644000000000000000000000046714745250261027160 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-data2.hs0000644000000000000000000000033714745250261023572 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 fourmolu-0.18.0.0/data/examples/declaration/class/type-operators1-out.hs0000644000000000000000000000033114745250261024337 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-data2-out.hs0000644000000000000000000000031414745250261024372 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 fourmolu-0.18.0.0/data/examples/declaration/class/poly-kinded-classes-four-out.hs0000644000000000000000000000017114745250261026106 0ustar0000000000000000{-# LANGUAGE PolyKinds #-} class Foo (a :: k) class Bar ( a :: -- Variable * -- Star ) fourmolu-0.18.0.0/data/examples/declaration/class/functional-dependencies.hs0000644000000000000000000000050414745250261025244 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-data2-four-out.hs0000644000000000000000000000040014745250261025337 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 fourmolu-0.18.0.0/data/examples/declaration/class/super-classes-four-out.hs0000644000000000000000000000024014745250261025022 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 fourmolu-0.18.0.0/data/examples/declaration/class/super-classes.hs0000644000000000000000000000023314745250261023246 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-and-default-decls.hs0000644000000000000000000000022314745250261025552 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () fourmolu-0.18.0.0/data/examples/declaration/class/single-parameters-four-out.hs0000644000000000000000000000061414745250261025660 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-between-methods.hs0000644000000000000000000000043714745250261025377 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-implementations.hs0000644000000000000000000000024314745250261025310 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-implementations-out.hs0000644000000000000000000000022014745250261026110 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-between-methods-out.hs0000644000000000000000000000044114745250261026177 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-implementations-comments.hs0000644000000000000000000000054314745250261027136 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 fourmolu-0.18.0.0/data/examples/declaration/class/default-implementations-comments-four-out.hs0000644000000000000000000000054714745250261030720 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-data1.hs0000644000000000000000000000027114745250261023566 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-type-defaults.hs0000644000000000000000000000046514745250261025367 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 fourmolu-0.18.0.0/data/examples/declaration/class/multi-parameters1.hs0000644000000000000000000000035214745250261024033 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 fourmolu-0.18.0.0/data/examples/declaration/class/multi-parameters2.hs0000644000000000000000000000052414745250261024035 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 fourmolu-0.18.0.0/data/examples/declaration/class/dependency-super-classes-out.hs0000644000000000000000000000067614745250261026202 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 () fourmolu-0.18.0.0/data/examples/declaration/class/dependency-super-classes.hs0000644000000000000000000000075514745250261025373 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 () fourmolu-0.18.0.0/data/examples/declaration/class/associated-data1-four-out.hs0000644000000000000000000000027514745250261025350 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 fourmolu-0.18.0.0/data/examples/declaration/class/empty-classes-out.hs0000644000000000000000000000010014745250261024044 0ustar0000000000000000module Main where -- | Foo! class Foo a -- | Bar! class Bar a fourmolu-0.18.0.0/data/examples/declaration/class/type-operators1-four-out.hs0000644000000000000000000000036314745250261025315 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 fourmolu-0.18.0.0/data/examples/declaration/class/type-operators2.hs0000644000000000000000000000025514745250261023540 0ustar0000000000000000{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} class a`Pair`b class a `Sum` b class (f`Product`g)a class ( f `Sum` g ) a fourmolu-0.18.0.0/data/examples/declaration/class/newlines-and-haddocks-out.hs0000644000000000000000000000046614745250261025434 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 fourmolu-0.18.0.0/data/examples/declaration/class/newlines-and-default-decls-four-out.hs0000644000000000000000000000024314745250261027332 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () fourmolu-0.18.0.0/data/examples/declaration/class/newlines-and-default-decls-out.hs0000644000000000000000000000022114745250261026355 0ustar0000000000000000class Foo a where foo :: a default foo :: () foo = () bar :: a default bar :: () bar = () qux :: a default qux :: () qux = () fourmolu-0.18.0.0/data/examples/declaration/class/functional-dependencies-four-out.hs0000644000000000000000000000053614745250261027027 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 fourmolu-0.18.0.0/data/examples/declaration/class/associated-type-defaults-out.hs0000644000000000000000000000050314745250261026165 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 fourmolu-0.18.0.0/data/examples/declaration/class/dependency-super-classes-four-out.hs0000644000000000000000000000074314745250261027146 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 () fourmolu-0.18.0.0/data/examples/declaration/class/newlines-after-where-out.hs0000644000000000000000000000011714745250261025316 0ustar0000000000000000class Num a where (+) :: a -> a -> a class Num a where (+) :: a -> a -> a fourmolu-0.18.0.0/data/examples/declaration/class/associated-data1-out.hs0000644000000000000000000000025314745250261024373 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 fourmolu-0.18.0.0/data/examples/declaration/class/empty-classes-four-out.hs0000644000000000000000000000010014745250261025015 0ustar0000000000000000module Main where -- | Foo! class Foo a -- | Bar! class Bar a fourmolu-0.18.0.0/data/examples/declaration/annotation/annotation.hs0000644000000000000000000000041414745250261023675 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 -} fourmolu-0.18.0.0/data/examples/declaration/annotation/annotation-four-out.hs0000644000000000000000000000036314745250261025456 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 -} fourmolu-0.18.0.0/data/examples/declaration/annotation/annotation-out.hs0000644000000000000000000000034314745250261024503 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 -} fourmolu-0.18.0.0/data/examples/declaration/foreign/foreign-export.hs0000644000000000000000000000046614745250261023761 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 ()) fourmolu-0.18.0.0/data/examples/declaration/foreign/foreign-export-out.hs0000644000000000000000000000047114745250261024562 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 ()) fourmolu-0.18.0.0/data/examples/declaration/foreign/foreign-export-four-out.hs0000644000000000000000000000050114745250261025525 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 ()) fourmolu-0.18.0.0/data/examples/declaration/foreign/foreign-import-four-out.hs0000644000000000000000000000127214745250261025524 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 () fourmolu-0.18.0.0/data/examples/declaration/foreign/foreign-import.hs0000644000000000000000000000121214745250261023740 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 () fourmolu-0.18.0.0/data/examples/declaration/foreign/foreign-import-out.hs0000644000000000000000000000122614745250261024552 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 () fourmolu-0.18.0.0/data/examples/declaration/role-annotation/single-line-out.hs0000644000000000000000000000024114745250261025473 0ustar0000000000000000{-# LANGUAGE MagicHash #-} {-# LANGUAGE RoleAnnotations #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ fourmolu-0.18.0.0/data/examples/declaration/role-annotation/single-line.hs0000644000000000000000000000024014745250261024665 0ustar0000000000000000{-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE MagicHash #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ fourmolu-0.18.0.0/data/examples/declaration/role-annotation/multi-line.hs0000644000000000000000000000020014745250261024532 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom fourmolu-0.18.0.0/data/examples/declaration/role-annotation/multi-line-four-out.hs0000644000000000000000000000022614745250261026320 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom fourmolu-0.18.0.0/data/examples/declaration/role-annotation/single-line-four-out.hs0000644000000000000000000000024014745250261026443 0ustar0000000000000000{-# LANGUAGE MagicHash #-} {-# LANGUAGE RoleAnnotations #-} type role Ptr representational type role A nominal nominal type role B _ phantom type role C _ _ fourmolu-0.18.0.0/data/examples/declaration/role-annotation/multi-line-out.hs0000644000000000000000000000016414745250261025350 0ustar0000000000000000type role D phantom nominal type role E _ nominal type role E _ nominal phantom fourmolu-0.18.0.0/data/examples/declaration/default/default-four-out.hs0000644000000000000000000000033414745250261024200 0ustar0000000000000000module MyModule (default Monoid) where default (Int, Foo, Bar) default ( Int , Foo , Bar ) default Num (Int, Float) default IsList ([], Vector) default IsString (Text.Text, Foundation.String, String) fourmolu-0.18.0.0/data/examples/declaration/default/default-out.hs0000644000000000000000000000032714745250261023231 0ustar0000000000000000module MyModule (default Monoid) where default (Int, Foo, Bar) default ( Int, Foo, Bar ) default Num (Int, Float) default IsList ([], Vector) default IsString (Text.Text, Foundation.String, String) fourmolu-0.18.0.0/data/examples/declaration/default/default.hs0000644000000000000000000000037414745250261022426 0ustar0000000000000000module MyModule (default Monoid) where default ( Int , Foo , Bar ) default ( Int , Foo, Bar ) default Num (Int, Float) default IsList ([], Vector) default IsString (Text.Text, Foundation.String, String) fourmolu-0.18.0.0/data/examples/declaration/value/function/primitive-literals-out.hs0000644000000000000000000000016614745250261026750 0ustar0000000000000000{-# LANGUAGE ExtendedLiterals #-} {-# LANGUAGE MagicHash #-} foo = 1# bar = 2## baz = 3#Word32 baz = 0b1010#Int64 fourmolu-0.18.0.0/data/examples/declaration/value/function/do-single-multi-four-out.hs0000644000000000000000000000005514745250261027102 0ustar0000000000000000foo = do ( bar baz ) data/examples/declaration/value/function/operator-hash-without-unboxed-sums-four-out.hs0000644000000000000000000000011414745250261032712 0ustar0000000000000000fourmolu-0.18.0.0module Foo ((#<|)) where (#<|) :: Int -> Int -> Int (#<|) = (+) (+) = (+) fourmolu-0.18.0.0/data/examples/declaration/value/function/type-applications-four-out.hs0000644000000000000000000000056214745250261027541 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 -> "" foo = foo @[k|bar|] fourmolu-0.18.0.0/data/examples/declaration/value/function/simple.hs0000644000000000000000000000002214745250261023576 0ustar0000000000000000bar x = x baz = x fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-functions-four-out.hs0000644000000000000000000000007314745250261030701 0ustar0000000000000000foo x = if x > 2 then bar x else baz x fourmolu-0.18.0.0/data/examples/declaration/value/function/where.hs0000644000000000000000000000034014745250261023422 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/fancy-forall-1.hs0000644000000000000000000000041514745250261025026 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/equality-constraints.hs0000644000000000000000000000006014745250261026511 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined fourmolu-0.18.0.0/data/examples/declaration/value/function/awkward-comment-0.hs0000644000000000000000000000037014745250261025550 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/type-abstractions-four-out.hs0000644000000000000000000000032014745250261027537 0ustar0000000000000000id :: forall a. a -> a id @t x = x :: t f1 :: forall a. a -> forall b. b -> (a, b) f1 @a x @b y = (x :: a, y :: b) f2 = (\ @a x @b y -> (x :: a, y :: b)) :: forall a. a -> forall b. b -> (a, b) fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-sections.hs0000644000000000000000000000015714745250261025776 0ustar0000000000000000foo = (0 +) bar = ( <> "hello" ) baz = ( 1 * 2 + ) ( * 3 ^ 5) quux = (,) <$> foo <$> bar fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-sections-four-out.hs0000644000000000000000000000020514745250261027546 0ustar0000000000000000foo = (0 +) bar = (<> "hello") baz = ( 1 * 2 + ) ( * 3 ^ 5 ) quux = (,) <$> foo <$> bar fourmolu-0.18.0.0/data/examples/declaration/value/function/tuples-out.hs0000644000000000000000000000017714745250261024441 0ustar0000000000000000foo = (1, 2, 3) bar = ( 1, 2, 3 ) handleStuff = ( let foo = foo in foo, let bar = bar in bar ) fourmolu-0.18.0.0/data/examples/declaration/value/function/case-empty-out.hs0000644000000000000000000000015314745250261025166 0ustar0000000000000000absurd x = case x of {} absurd = \case {} absurd x = case x of {} absurd = \case {} foo = case () of {} 1 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-1-four-out.hs0000644000000000000000000000016514745250261027722 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c d e f g """ -- equivalent to s' = "a b c d e\nf g" data/examples/declaration/value/function/parallel-comprehensions-single-line-out.hs0000644000000000000000000000016614745250261032076 0ustar0000000000000000fourmolu-0.18.0.0foo 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] fourmolu-0.18.0.0/data/examples/declaration/value/function/parenthesis-lhs-four-out.hs0000644000000000000000000000017314745250261027203 0ustar0000000000000000(!=!) 2 y = 1 x !=! y = 2 x ?=? [] = 123 (?=?) x (_ : []) = 456 x ?=? _ = f x x where f x 7 = 789 x `f` _ = 101 fourmolu-0.18.0.0/data/examples/declaration/value/function/arg-breakpoints.hs0000644000000000000000000000002514745250261025400 0ustar0000000000000000foo bar = body fourmolu-0.18.0.0/data/examples/declaration/value/function/builtin-syntax.hs0000644000000000000000000000001614745250261025302 0ustar0000000000000000x = return () fourmolu-0.18.0.0/data/examples/declaration/value/function/implicit-params-out.hs0000644000000000000000000000037514745250261026220 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/negation.hs0000644000000000000000000000032114745250261024113 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-2-four-out.hs0000644000000000000000000000011514745250261027703 0ustar0000000000000000x = y ++ f g -- commentA -- commentB -- commentC fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-next-to-keyword-out.hs0000644000000000000000000000022414745250261031203 0ustar0000000000000000foo = if x then -- comment 1 -- comment 2 foo 1 2 3 else -- comment 3 -- comment 4 foo "here" "there" fourmolu-0.18.0.0/data/examples/declaration/value/function/strings-four-out.hs0000644000000000000000000000014314745250261025560 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&barbaz" baz = "foo\ \bar\ \baz" fourmolu-0.18.0.0/data/examples/declaration/value/function/let-single-line-four-out.hs0000644000000000000000000000046114745250261027062 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 data/examples/declaration/value/function/if-with-comment-next-to-keyword-four-out.hs0000644000000000000000000000030214745250261032072 0ustar0000000000000000fourmolu-0.18.0.0foo = if x then -- comment 1 -- comment 2 foo 1 2 3 else -- comment 3 -- comment 4 foo "here" "there" fourmolu-0.18.0.0/data/examples/declaration/value/function/parallel-comprehensions-complex.hs0000644000000000000000000000151214745250261030605 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 ] fourmolu-0.18.0.0/data/examples/declaration/value/function/list-comprehensions.hs0000644000000000000000000000072714745250261026326 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 d <- [ x + 1 | x <- b ] [ c | c <- d ] trans = [ x | x <- xs , then reverse , then reverse ] fourmolu-0.18.0.0/data/examples/declaration/value/function/multi-way-if.hs0000644000000000000000000000026614745250261024643 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/block-arguments-out.hs0000644000000000000000000000052514745250261026217 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-case-out.hs0000644000000000000000000000063714745250261025257 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} foo = bar (\case JKey {} -> True; _ -> False) foo :: Int -> Int foo = \case 5 -> 10 i | i > 5 -> 11 _ -> 12 foo :: Maybe a -> Maybe a -> Maybe a -> Int foo = \cases Nothing Just {} Nothing -> 1; _ _ _ -> 0 foo :: Maybe Int -> Maybe Int -> Int foo = \cases (Just a) (Just a) -> a + a _ _ -> 0 foo :: Bool -> Bool -> Bool foo = \cases True True -> True _ _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/tuples-four-out.hs0000644000000000000000000000021514745250261025403 0ustar0000000000000000foo = (1, 2, 3) bar = ( 1 , 2 , 3 ) handleStuff = ( let foo = foo in foo , let bar = bar in bar ) fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-0-four-out.hs0000644000000000000000000000053314745250261027720 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """Line 1 Line 2 Line 3 """ s_2 = """Line 1 Line 2 Line 3 """ -- equivalent to s' = "Line 1\n Line 2\nLine 3" -- the following are equivalent s = """hello world""" s' = "hello world" s = """ hello world """ -- equivalent to s' = " hello\nworld" fourmolu-0.18.0.0/data/examples/declaration/value/function/newline-single-line-body-four-out.hs0000644000000000000000000000040014745250261030663 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" fourmolu-0.18.0.0/data/examples/declaration/value/function/awkward-comment-1.hs0000644000000000000000000000041214745250261025546 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') fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-6-out.hs0000644000000000000000000000017414745250261026756 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} x = """ This is a literal multiline string: \"\"\" Hello world! \""" """ fourmolu-0.18.0.0/data/examples/declaration/value/function/case-multi-line-guards-four-out.hs0000644000000000000000000000046714745250261030353 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 '*' fourmolu-0.18.0.0/data/examples/declaration/value/function/parenthesis-lhs-out.hs0000644000000000000000000000017314745250261026232 0ustar0000000000000000(!=!) 2 y = 1 x !=! y = 2 x ?=? [] = 123 (?=?) x (_ : []) = 456 x ?=? _ = f x x where f x 7 = 789 x `f` _ = 101 fourmolu-0.18.0.0/data/examples/declaration/value/function/if-multi-line-out.hs0000644000000000000000000000042714745250261025576 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-multi-line2.hs0000644000000000000000000000045314745250261025674 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/implicit-params.hs0000644000000000000000000000041014745250261025401 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-6-out.hs0000644000000000000000000000031314745250261025276 0ustar0000000000000000import Servant.API type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) fourmolu-0.18.0.0/data/examples/declaration/value/function/equality-constraints-out.hs0000644000000000000000000000006014745250261027316 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-functions-do-out.hs0000644000000000000000000000010014745250261030317 0ustar0000000000000000foo x = do y <- quux if x > 2 then bar x else baz y fourmolu-0.18.0.0/data/examples/declaration/value/function/tricky-parens-four-out.hs0000644000000000000000000000006614745250261026666 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) fourmolu-0.18.0.0/data/examples/declaration/value/function/case-multi-line.hs0000644000000000000000000000050414745250261025302 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 () -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/parens-comments-out.hs0000644000000000000000000000003214745250261026226 0ustar0000000000000000test = ( -- a x ) fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-1.hs0000644000000000000000000000030014745250261026120 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/static-pointers-out.hs0000644000000000000000000000032614745250261026251 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 ) data/examples/declaration/value/function/if-with-comment-in-branches-with-functions-out.hs0000644000000000000000000000024414745250261033216 0ustar0000000000000000fourmolu-0.18.0.0foo = if x then -- comment 1 -- comment 2 foo 1 2 3 else -- comment 3 -- comment 4 foo "here" "there" fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-2-four-out.hs0000644000000000000000000000031614745250261027034 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-out.hs0000644000000000000000000000015114745250261025717 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then 10 else 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/type-abstractions.hs0000644000000000000000000000031114745250261025761 0ustar0000000000000000id :: forall a. a -> a id @t x = x :: t f1 :: forall a. a -> forall b. b -> (a, b) f1 @a x @b y = (x :: a, y :: b) f2 = (\ @a x @b y -> (x :: a, y :: b) ) :: forall a. a -> forall b. b -> (a, b) fourmolu-0.18.0.0/data/examples/declaration/value/function/where-out.hs0000644000000000000000000000034014745250261024227 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-case.hs0000644000000000000000000000065414745250261024451 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} foo = bar (\case JKey{} -> True; _ -> False) foo :: Int -> Int foo = \case 5 -> 10 i | i > 5 -> 11 _ -> 12 foo :: Maybe a -> Maybe a -> Maybe a -> Int foo = \cases Nothing Just{} Nothing -> 1; _ _ _ -> 0 foo :: Maybe Int -> Maybe Int -> Int foo = \cases (Just a) (Just a) -> a + a _ _ -> 0 foo :: Bool -> Bool -> Bool foo = \cases True True -> True _ _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-2-four-out.hs0000644000000000000000000000012114745250261026240 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 fourmolu-0.18.0.0/data/examples/declaration/value/function/multi-way-if-four-out.hs0000644000000000000000000000034114745250261026413 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-2.hs0000644000000000000000000000007514745250261024472 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 fourmolu-0.18.0.0/data/examples/declaration/value/function/application-1-out.hs0000644000000000000000000000022314745250261025556 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-1-four-out.hs0000644000000000000000000000052714745250261027037 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l] fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-2-out.hs0000644000000000000000000000014014745250261026743 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c """ -- equivalent to s' = "a\nb\nc" fourmolu-0.18.0.0/data/examples/declaration/value/function/parens-comments-four-out.hs0000644000000000000000000000004014745250261027176 0ustar0000000000000000test = ( -- a x ) fourmolu-0.18.0.0/data/examples/declaration/value/function/guards-four-out.hs0000644000000000000000000000032214745250261025353 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/explicit-type-out.hs0000644000000000000000000000004514745250261025717 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-7-four-out.hs0000644000000000000000000000126214745250261027727 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} printf """ instance Aeson.FromJSON %s where parseJSON = Aeson.withText "%s" $ \\s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType %s where parsePrinterOptType s = case s of %s _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: %s" ] """ fieldTypeName fieldTypeName fieldTypeName ( unlines_ [ printf " \"%s\" -> Right %s" val con | (con, val) <- enumOptions ] ) (renderEnumOptions enumOptions) fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-types-out.hs0000644000000000000000000000030514745250261026262 0ustar0000000000000000foo :: (Monad m, Show a) => a -> m String bar :: ( Monad m, Show a ) => a -> m String multiConstraints :: (Show a) => a -> a -> a -> (Eq a) => (Num a) => a -> a -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-6-four-out.hs0000644000000000000000000000021214745250261027720 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} x = """ This is a literal multiline string: \"\"\" Hello world! \""" """ fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-7-out.hs0000644000000000000000000000004214745250261025276 0ustar0000000000000000foo c = case c of { _ -> c } : [] fourmolu-0.18.0.0/data/examples/declaration/value/function/parallel-comprehensions-single-line.hs0000644000000000000000000000014514745250261031345 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 ] fourmolu-0.18.0.0/data/examples/declaration/value/function/multiple-guards-four-out.hs0000644000000000000000000000032614745250261027210 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/where-nested-four-out.hs0000644000000000000000000000027114745250261026463 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-8.hs0000644000000000000000000000017014745250261026147 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} type Foo = """ yeah yeah""" foo = foo @"""yeah yeah """ fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-above-branches-out.hs0000644000000000000000000000015414745250261031004 0ustar0000000000000000foo = if undefined -- then comment then undefined -- else comment else do undefined fourmolu-0.18.0.0/data/examples/declaration/value/function/application-1.hs0000644000000000000000000000016214745250261024753 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/backticks-lhs-four-out.hs0000644000000000000000000000015714745250261026616 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True fourmolu-0.18.0.0/data/examples/declaration/value/function/parenthesis-lhs.hs0000644000000000000000000000020314745250261025417 0ustar0000000000000000(!=!) 2 y = 1 x !=! y = 2 x ?=? [] = 123 (?=?) x (_:[]) = 456 x ?=? _ = f x x where f x 7 = 789 x `f` _ = 101 fourmolu-0.18.0.0/data/examples/declaration/value/function/strings-out.hs0000644000000000000000000000013714745250261024612 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&barbaz" baz = "foo\ \bar\ \baz" fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-arguments.hs0000644000000000000000000000011114745250261026311 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) (Bar x y) z = x fourmolu-0.18.0.0/data/examples/declaration/value/function/parens-comments.hs0000644000000000000000000000002514745250261025423 0ustar0000000000000000test = ( -- a x) fourmolu-0.18.0.0/data/examples/declaration/value/function/overloaded-labels-four-out.hs0000644000000000000000000000162014745250261027454 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this) (#that) baz = #Foo #"Hello world!" #"\"" #3 #"\n" -- from https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.6.1-alpha3/testsuite/tests/overloadedrecflds/should_run/T11671_run.hs -- unnecessary once https://github.com/tweag/ormolu/issues/821 lands main = traverse_ putStrLn [ #a , #number17 , #do , #type , #Foo , #3 , #"199.4" , #17a23b , #f'a' , #'a' , #' , #''notTHSplice , #"..." , #привет , #こんにちは , #"3" , #":" , #"Foo" , #"The quick brown fox" , #"\"" , (++) #hello #world , (++) #"hello" #"world" , #"hello" # 1 -- equivalent to `(fromLabel @"hello") # 1` , f "hello" #2 -- equivalent to `f ("hello"# :: Addr#) 2` ] fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-functions-do.hs0000644000000000000000000000010014745250261027512 0ustar0000000000000000foo x = do y <- quux if x > 2 then bar x else baz y fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-string-lit.hs0000644000000000000000000000005414745250261026050 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-sums-four-out.hs0000644000000000000000000000052714745250261026526 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 = (# | #) fourmolu-0.18.0.0/data/examples/declaration/value/function/case-multi-line-guards-out.hs0000644000000000000000000000040314745250261027370 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 '*' fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-7-four-out.hs0000644000000000000000000000004214745250261026247 0ustar0000000000000000foo c = case c of { _ -> c } : [] fourmolu-0.18.0.0/data/examples/declaration/value/function/blank-lines-let.hs0000644000000000000000000000007714745250261025300 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-in-branches-out.hs0000644000000000000000000000033514745250261030317 0ustar0000000000000000foo = if x then -- comment 1 -- comment 2 case a of Just b -> _ Nothing -> _ else -- comment 3 -- comment 4 case a of Just b -> _ Nothing -> _ fourmolu-0.18.0.0/data/examples/declaration/value/function/where-nested.hs0000644000000000000000000000030014745250261024676 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 } } fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-2-out.hs0000644000000000000000000000010714745250261025273 0ustar0000000000000000foo n | x || y && z || n ** x || x && n = 42 fourmolu-0.18.0.0/data/examples/declaration/value/function/application-0.hs0000644000000000000000000000011714745250261024752 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 fourmolu-0.18.0.0/data/examples/declaration/value/function/blank-lines-let-out.hs0000644000000000000000000000007614745250261026104 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-2.hs0000644000000000000000000000007614745250261026133 0ustar0000000000000000x = y ++ -- commentA -- commentB f g -- commentC fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-0-four-out.hs0000644000000000000000000000016014745250261027027 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] fourmolu-0.18.0.0/data/examples/declaration/value/function/if-multi-line.hs0000644000000000000000000000042014745250261024762 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-6.hs0000644000000000000000000000017414745250261026151 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} x = """ This is a literal multiline string: \"\"\" Hello world! \""" """ fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-0-four-out.hs0000644000000000000000000000036314745250261027706 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-above-branches.hs0000644000000000000000000000016414745250261030200 0ustar0000000000000000foo = if undefined -- then comment then undefined -- else comment else do undefined fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-hash-with-unboxed-sums-out.hs0000644000000000000000000000016014745250261031271 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-3-four-out.hs0000644000000000000000000000047314745250261027041 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-0-out.hs0000644000000000000000000000050614745250261026747 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """Line 1 Line 2 Line 3 """ s_2 = """Line 1 Line 2 Line 3 """ -- equivalent to s' = "Line 1\n Line 2\nLine 3" -- the following are equivalent s = """hello world""" s' = "hello world" s = """ hello world """ -- equivalent to s' = " hello\nworld" fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-functions.hs0000644000000000000000000000006114745250261027120 0ustar0000000000000000foo x = if x > 2 then bar x else baz x fourmolu-0.18.0.0/data/examples/declaration/value/function/fancy-forall-1-four-out.hs0000644000000000000000000000045114745250261026604 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/static-pointers-four-out.hs0000644000000000000000000000037014745250261027221 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 ) fourmolu-0.18.0.0/data/examples/declaration/value/function/negative-literals-four-out.hs0000644000000000000000000000016614745250261027513 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = -x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 fourmolu-0.18.0.0/data/examples/declaration/value/function/static-pointers.hs0000644000000000000000000000031714745250261025444 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-multi-line1.hs0000644000000000000000000000037514745250261025676 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/quasi-quotes-four-out.hs0000644000000000000000000000025214745250261026530 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] fourmolu-0.18.0.0/data/examples/declaration/value/function/typed-hole.hs0000644000000000000000000000006514745250261024366 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ fourmolu-0.18.0.0/data/examples/declaration/value/function/overloaded-labels-out.hs0000644000000000000000000000147714745250261026515 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this) (#that) baz = #Foo #"Hello world!" #"\"" #3 #"\n" -- from https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.6.1-alpha3/testsuite/tests/overloadedrecflds/should_run/T11671_run.hs -- unnecessary once https://github.com/tweag/ormolu/issues/821 lands main = traverse_ putStrLn [ #a, #number17, #do, #type, #Foo, #3, #"199.4", #17a23b, #f'a', #'a', #', #''notTHSplice, #"...", #привет, #こんにちは, #"3", #":", #"Foo", #"The quick brown fox", #"\"", (++) #hello #world, (++) #"hello" #"world", #"hello" # 1, -- equivalent to `(fromLabel @"hello") # 1` f "hello" #2 -- equivalent to `f ("hello"# :: Addr#) 2` ] fourmolu-0.18.0.0/data/examples/declaration/value/function/parens-out.hs0000644000000000000000000000003014745250261024401 0ustar0000000000000000f = p (do foo; bar) baz fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-2.hs0000644000000000000000000000030214745250261025251 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/negation-out.hs0000644000000000000000000000031614745250261024724 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/newline-single-line-body-out.hs0000644000000000000000000000036214745250261027721 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" fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-sums.hs0000644000000000000000000000036514745250261024750 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 = (# | #) fourmolu-0.18.0.0/data/examples/declaration/value/function/case-multi-line-four-out.hs0000644000000000000000000000056514745250261027067 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 () -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/typed-expressions-four-out.hs0000644000000000000000000000007414745250261027577 0ustar0000000000000000foo x = x :: Int bar x = Just x :: Maybe String fourmolu-0.18.0.0/data/examples/declaration/value/function/fancy-forall-1-out.hs0000644000000000000000000000043314745250261025633 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/let-multi-line-out.hs0000644000000000000000000000061514745250261025763 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-5.hs0000644000000000000000000000005214745250261024470 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux fourmolu-0.18.0.0/data/examples/declaration/value/function/awkward-comment-0-four-out.hs0000644000000000000000000000036714745250261027334 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/splice-four-out.hs0000644000000000000000000000016114745250261025346 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") fourmolu-0.18.0.0/data/examples/declaration/value/function/required-type-arguments-out.hs0000644000000000000000000000050014745250261027715 0ustar0000000000000000vshow :: forall a -> (Show a) => a -> String vshow t x = show (x :: t) s1 = vshow Int 42 s2 = vshow Double 42 a1 = f (type (Int -> Bool)) a2 = f (type ((Read T) => T)) a3 = f (type (forall a. a)) a4 = f (type (forall a. (Read a) => String -> a)) foo = f ( type ( Maybe Int ) ) fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-4.hs0000644000000000000000000000015514745250261024473 0ustar0000000000000000import Control.Arrow foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-tuples-out.hs0000644000000000000000000000016514745250261026100 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1, 2, 3 #) bar = (# 1, 2, 3 #) unit :: (# #) unit = (# #) data/examples/declaration/value/function/if-with-comment-above-branches-four-out.hs0000644000000000000000000000020414745250261031672 0ustar0000000000000000fourmolu-0.18.0.0foo = if undefined -- then comment then undefined -- else comment else do undefined fourmolu-0.18.0.0/data/examples/declaration/value/function/application-2-four-out.hs0000644000000000000000000000056014745250261026534 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/type-applications-and-splice.hs0000644000000000000000000000016114745250261027773 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [| sing @ $(symFQN name) |] fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-string-lit-four-out.hs0000644000000000000000000000005414745250261027626 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# fourmolu-0.18.0.0/data/examples/declaration/value/function/backticks.hs0000644000000000000000000000002414745250261024245 0ustar0000000000000000foo x y = x `bar` y fourmolu-0.18.0.0/data/examples/declaration/value/function/guards-out.hs0000644000000000000000000000032214745250261024402 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/case-multi-line-guards.hs0000644000000000000000000000040114745250261026561 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 '*' fourmolu-0.18.0.0/data/examples/declaration/value/function/splice.hs0000644000000000000000000000016114745250261023570 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") fourmolu-0.18.0.0/data/examples/declaration/value/function/blank-lines-where-four-out.hs0000644000000000000000000000007214745250261027377 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/do-where-four-out.hs0000644000000000000000000000006514745250261025604 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 fourmolu-0.18.0.0/data/examples/declaration/value/function/type-applications-and-splice-four-out.hs0000644000000000000000000000015714745250261031556 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [|sing @ $(symFQN name)|] fourmolu-0.18.0.0/data/examples/declaration/value/function/type-applications.hs0000644000000000000000000000045214745250261025761 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 -> "" foo = foo @[k|bar|] fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-3.hs0000644000000000000000000000052714745250261026150 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c """ -- equivalent to s' = "\na\nb\nc" s1 = """ a b c """ s2 = """ a b c """ -- In the current proposal, these are equivalent to -- the below. If leading newline were removed at the -- beginning, both would result in s1'. s1' = " a\nb\nc" s2' = "a\nb\nc" fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-4-out.hs0000644000000000000000000000026314745250261026753 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b """ -- equivalent to s' = "a\nb\n" s1 = """ line 1 line 2 """ s2 = "line 3" s3 = """ line 4 line 5 """ fourmolu-0.18.0.0/data/examples/declaration/value/function/strings.hs0000644000000000000000000000014614745250261024005 0ustar0000000000000000{-# LANGUAGE MagicHash #-} foo = "foobar" bar = "foo\&bar\ \baz" baz = "foo\ \bar\ \baz" fourmolu-0.18.0.0/data/examples/declaration/value/function/let-single-line-out.hs0000644000000000000000000000046314745250261026113 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/let-nested.hs0000644000000000000000000000004614745250261024357 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] fourmolu-0.18.0.0/data/examples/declaration/value/function/overindentation-four-out.hs0000644000000000000000000000036714745250261027307 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-0-four-out.hs0000644000000000000000000000015114745250261026241 0ustar0000000000000000import Control.Lens.Operators a = b & c .~ d & e %~ f g fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-0.hs0000644000000000000000000000011314745250261024461 0ustar0000000000000000import Control.Lens.Operators a = b & c .~ d & e %~ f g fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-in-branches-four-out.hs0000644000000000000000000000045314745250261031271 0ustar0000000000000000foo = if x then -- comment 1 -- comment 2 case a of Just b -> _ Nothing -> _ else -- comment 3 -- comment 4 case a of Just b -> _ Nothing -> _ fourmolu-0.18.0.0/data/examples/declaration/value/function/let-multi-line-four-out.hs0000644000000000000000000000066014745250261026734 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/overindentation.hs0000644000000000000000000000022314745250261025520 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-arguments-out.hs0000644000000000000000000000012614745250261027124 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) ( Bar x y ) z = x fourmolu-0.18.0.0/data/examples/declaration/value/function/awkward-comment-1-out.hs0000644000000000000000000000041714745250261026360 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') fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-7.hs0000644000000000000000000000120014745250261026141 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} printf """ instance Aeson.FromJSON %s where parseJSON = Aeson.withText "%s" $ \\s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType %s where parsePrinterOptType s = case s of %s _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: %s" ] """ fieldTypeName fieldTypeName fieldTypeName ( unlines_ [ printf " \"%s\" -> Right %s" val con | (con, val) <- enumOptions ] ) (renderEnumOptions enumOptions) fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-case-four-out.hs0000644000000000000000000000065714745250261026232 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} foo = bar (\case JKey{} -> True; _ -> False) foo :: Int -> Int foo = \case 5 -> 10 i | i > 5 -> 11 _ -> 12 foo :: Maybe a -> Maybe a -> Maybe a -> Int foo = \cases Nothing Just{} Nothing -> 1; _ _ _ -> 0 foo :: Maybe Int -> Maybe Int -> Int foo = \cases (Just a) (Just a) -> a + a _ _ -> 0 foo :: Bool -> Bool -> Bool foo = \cases True True -> True _ _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/let-nested-out.hs0000644000000000000000000000004614745250261025164 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] fourmolu-0.18.0.0/data/examples/declaration/value/function/tuple-sections-four-out.hs0000644000000000000000000000011614745250261027045 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = (,,5,6,7,,,) fourmolu-0.18.0.0/data/examples/declaration/value/function/splice-out.hs0000644000000000000000000000016114745250261024375 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} bar = $bar bar' = $(bar "something") baz = $$baz baz' = $$(baz "something") fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-hash-without-unboxed-sums-out.hs0000644000000000000000000000011414745250261032020 0ustar0000000000000000module Foo ((#<|)) where (#<|) :: Int -> Int -> Int (#<|) = (+) (+) = (+) fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-before-do-blocks.hs0000644000000000000000000000020514745250261030432 0ustar0000000000000000foo = if something -- then comment then do stuff stuff -- else comment else do stuff stuff fourmolu-0.18.0.0/data/examples/declaration/value/function/pragmas.hs0000644000000000000000000000051214745250261023743 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" fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-1-out.hs0000644000000000000000000000044714745250261026067 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l] fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-single-line-out.hs0000644000000000000000000000037514745250261026551 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/prefix-four-out.hs0000644000000000000000000000002214745250261025360 0ustar0000000000000000foo x y = (+) x y fourmolu-0.18.0.0/data/examples/declaration/value/function/do-where.hs0000644000000000000000000000006314745250261024024 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-6-four-out.hs0000644000000000000000000000036114745250261026252 0ustar0000000000000000import Servant.API type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-0.hs0000644000000000000000000000013414745250261025252 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] fourmolu-0.18.0.0/data/examples/declaration/value/function/typed-expressions-out.hs0000644000000000000000000000006714745250261026630 0ustar0000000000000000foo x = x :: Int bar x = Just x :: Maybe String fourmolu-0.18.0.0/data/examples/declaration/value/function/let-nested-four-out.hs0000644000000000000000000000004614745250261026135 0ustar0000000000000000_ = _ where _ = [_ | let _ = _] fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-3-out.hs0000644000000000000000000000016214745250261025275 0ustar0000000000000000import Control.Arrow foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-functions-out.hs0000644000000000000000000000006114745250261027725 0ustar0000000000000000foo x = if x > 2 then bar x else baz x fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-1-four-out.hs0000644000000000000000000000035214745250261027705 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arg-breakpoints-four-out.hs0000644000000000000000000000003314745250261027155 0ustar0000000000000000foo bar = body fourmolu-0.18.0.0/data/examples/declaration/value/function/builtin-syntax-four-out.hs0000644000000000000000000000001614745250261027060 0ustar0000000000000000x = return () fourmolu-0.18.0.0/data/examples/declaration/value/function/complex-list-four-out.hs0000644000000000000000000000034514745250261026513 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something , \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar , baz qux ] fourmolu-0.18.0.0/data/examples/declaration/value/function/blank-lines-let-four-out.hs0000644000000000000000000000012614745250261027051 0ustar0000000000000000foo = let x = 10 y = 11 z = 12 in x + y + z fourmolu-0.18.0.0/data/examples/declaration/value/function/blank-lines-where-out.hs0000644000000000000000000000007214745250261026426 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-fixity-defaulting.hs0000644000000000000000000000031314745250261027575 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-6.hs0000644000000000000000000000033214745250261024472 0ustar0000000000000000import Servant.API type PermuteRef = "a" :> ( "b" :> "c" :> End :<|> "c" :> "b" :> End ) :<|> "b" :> ( "a" :> "c" :> End :<|> "c" :> "a" :> End ) data/examples/declaration/value/function/if-with-comment-in-branches-with-functions-four-out.hs0000644000000000000000000000034214745250261034166 0ustar0000000000000000fourmolu-0.18.0.0foo = if x then -- comment 1 -- comment 2 foo 1 2 3 else -- comment 3 -- comment 4 foo "here" "there" fourmolu-0.18.0.0/data/examples/declaration/value/function/fancy-forall-0-out.hs0000644000000000000000000000043114745250261025630 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/typed-hole-four-out.hs0000644000000000000000000000006514745250261026144 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ fourmolu-0.18.0.0/data/examples/declaration/value/function/guards.hs0000644000000000000000000000032214745250261023575 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-8-out.hs0000644000000000000000000000016414745250261026757 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} type Foo = """ yeah yeah""" foo = foo @"""yeah yeah """ fourmolu-0.18.0.0/data/examples/declaration/value/function/quasi-quotes.hs0000644000000000000000000000024514745250261024754 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] fourmolu-0.18.0.0/data/examples/declaration/value/function/required-type-arguments.hs0000644000000000000000000000043514745250261027117 0ustar0000000000000000vshow :: forall a -> Show a => a -> String vshow t x = show (x :: t) s1 = vshow Int 42 s2 = vshow Double 42 a1 = f (type (Int -> Bool)) a2 = f (type (Read T => T)) a3 = f (type (forall a. a)) a4 = f (type (forall a. Read a => String -> a)) foo = f (type (Maybe Int)) fourmolu-0.18.0.0/data/examples/declaration/value/function/pragmas-four-out.hs0000644000000000000000000000055214745250261025525 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" fourmolu-0.18.0.0/data/examples/declaration/value/function/multiple-matches-out.hs0000644000000000000000000000005014745250261026370 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-8-four-out.hs0000644000000000000000000000021014745250261027720 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} type Foo = """ yeah yeah""" foo = foo @"""yeah yeah """ fourmolu-0.18.0.0/data/examples/declaration/value/function/explicit-type-four-out.hs0000644000000000000000000000005314745250261026667 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int fourmolu-0.18.0.0/data/examples/declaration/value/function/required-type-arguments-four-out.hs0000644000000000000000000000051714745250261030676 0ustar0000000000000000vshow :: forall a -> (Show a) => a -> String vshow t x = show (x :: t) s1 = vshow Int 42 s2 = vshow Double 42 a1 = f (type (Int -> Bool)) a2 = f (type ((Read T) => T)) a3 = f (type (forall a. a)) a4 = f (type (forall a. (Read a) => String -> a)) foo = f ( type ( Maybe Int ) ) fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-fixity-defaulting-out.hs0000644000000000000000000000030514745250261030403 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-multi-line1-four-out.hs0000644000000000000000000000044414745250261027451 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/block-arguments.hs0000644000000000000000000000054114745250261025410 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-four-out.hs0000644000000000000000000000015314745250261026672 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then 10 else 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/overindentation-out.hs0000644000000000000000000000026714745250261026335 0ustar0000000000000000reallyincrediblyLongName = f a A { reallyincrediblyLongName = f a A { reallyincrediblyLongName } } fourmolu-0.18.0.0/data/examples/declaration/value/function/let-multi-line.hs0000644000000000000000000000060614745250261025156 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/block-arguments-four-out.hs0000644000000000000000000000060314745250261027165 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-fixity-defaulting-four-out.hs0000644000000000000000000000035114745250261031355 0ustar0000000000000000def1 = (,,) <$> gvar (primitiveGVar "natToHex") `foo` ne <*> con cNothing `foo` tcon tChar def2 = tds1 && lc1 == mempty && gc1 `M.isSubmapOf` gc2 && sh1 == sh2 data/examples/declaration/value/function/if-with-comment-before-do-blocks-four-out.hs0000644000000000000000000000025714745250261032140 0ustar0000000000000000fourmolu-0.18.0.0foo = if something -- then comment then do stuff stuff -- else comment else do stuff stuff fourmolu-0.18.0.0/data/examples/declaration/value/function/quasi-quotes-out.hs0000644000000000000000000000025014745250261025555 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: Value singleline = [yamlQQ|something|] multiline :: Value multiline = [yamlQQ| name: John Doe age: 23 something: foo |] fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-7-out.hs0000644000000000000000000000120014745250261026746 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} printf """ instance Aeson.FromJSON %s where parseJSON = Aeson.withText "%s" $ \\s -> either Aeson.parseFail pure $ parsePrinterOptType (Text.unpack s) instance PrinterOptsFieldType %s where parsePrinterOptType s = case s of %s _ -> Left . unlines $ [ "unknown value: " <> show s , "Valid values are: %s" ] """ fieldTypeName fieldTypeName fieldTypeName ( unlines_ [ printf " \"%s\" -> Right %s" val con | (con, val) <- enumOptions ] ) (renderEnumOptions enumOptions) fourmolu-0.18.0.0/data/examples/declaration/value/function/primitive-literals-four-out.hs0000644000000000000000000000016614745250261027721 0ustar0000000000000000{-# LANGUAGE ExtendedLiterals #-} {-# LANGUAGE MagicHash #-} foo = 1# bar = 2## baz = 3#Word32 baz = 0b1010#Int64 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-1.hs0000644000000000000000000000003414745250261024464 0ustar0000000000000000foo = f . g =<< h . i fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-3-out.hs0000644000000000000000000000043314745250261026064 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/case-single-line-four-out.hs0000644000000000000000000000025414745250261027211 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/tricky-parens-out.hs0000644000000000000000000000006014745250261025707 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) fourmolu-0.18.0.0/data/examples/declaration/value/function/explicit-type.hs0000644000000000000000000000004114745250261025106 0ustar0000000000000000foo = 5 :: Int bar = 5 :: Int fourmolu-0.18.0.0/data/examples/declaration/value/function/multiple-matches.hs0000644000000000000000000000005014745250261025563 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-multi-line1-out.hs0000644000000000000000000000040614745250261026476 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-7.hs0000644000000000000000000000003614745250261024474 0ustar0000000000000000foo c = case c of {_->c} : [] data/examples/declaration/value/function/operator-hash-with-unboxed-sums-four-out.hs0000644000000000000000000000016014745250261032163 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE UnboxedSums #-} module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-hash-without-unboxed-sums.hs0000644000000000000000000000012214745250261031212 0ustar0000000000000000module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-string-lit-out.hs0000644000000000000000000000005414745250261026655 0ustar0000000000000000{-# LANGUAGE MagicHash #-} main = new "p"# fourmolu-0.18.0.0/data/examples/declaration/value/function/parens-four-out.hs0000644000000000000000000000003014745250261025352 0ustar0000000000000000f = p (do foo; bar) baz fourmolu-0.18.0.0/data/examples/declaration/value/function/builtin-syntax-out.hs0000644000000000000000000000001614745250261026107 0ustar0000000000000000x = return () fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-hash-with-unboxed-sums.hs0000644000000000000000000000016014745250261030464 0ustar0000000000000000{-# LANGUAGE UnboxedSums #-} module Foo (( #<| )) where ( #<| ) :: Int -> Int -> Int ( #<| ) = (+) (+) = (+) fourmolu-0.18.0.0/data/examples/declaration/value/function/lexical-negation-out.hs0000644000000000000000000000015314745250261026342 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y fourmolu-0.18.0.0/data/examples/declaration/value/function/parens.hs0000644000000000000000000000003014745250261023574 0ustar0000000000000000f = p (do foo; bar) baz fourmolu-0.18.0.0/data/examples/declaration/value/function/tuple-sections-out.hs0000644000000000000000000000011614745250261026074 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = (,,5,6,7,,,) fourmolu-0.18.0.0/data/examples/declaration/value/function/newline-single-line-body.hs0000644000000000000000000000037014745250261027113 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" fourmolu-0.18.0.0/data/examples/declaration/value/function/awkward-comment-0-out.hs0000644000000000000000000000035314745250261026356 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/list-comprehensions-four-out.hs0000644000000000000000000000105614745250261030100 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 d <- [ x + 1 | x <- b ] [ c | c <- d ] trans = [ x | x <- xs , then reverse , then reverse ] fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-0-out.hs0000644000000000000000000000030714745250261026733 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/application-0-out.hs0000644000000000000000000000014514745250261025560 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 fourmolu-0.18.0.0/data/examples/declaration/value/function/application-2-out.hs0000644000000000000000000000046014745250261025562 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/type-applications-and-splice-out.hs0000644000000000000000000000015714745250261030605 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeApplications #-} staticKey name = [|sing @ $(symFQN name)|] fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-tuples.hs0000644000000000000000000000015414745250261025271 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1,2,3 #) bar = (# 1, 2, 3 #) unit :: (##) unit = (##) fourmolu-0.18.0.0/data/examples/declaration/value/function/backticks-lhs.hs0000644000000000000000000000021614745250261025034 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-single-line.hs0000644000000000000000000000037714745250261025746 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/blank-lines-where.hs0000644000000000000000000000007314745250261025622 0ustar0000000000000000foo = x + y + z where x = 10 y = 11 z = 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/do-single-multi-out.hs0000644000000000000000000000004114745250261026124 0ustar0000000000000000foo = do ( bar baz ) fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-before-do-blocks-out.hs0000644000000000000000000000020514745250261031237 0ustar0000000000000000foo = if something -- then comment then do stuff stuff -- else comment else do stuff stuff fourmolu-0.18.0.0/data/examples/declaration/value/function/required-type-arguments-2-out.hs0000644000000000000000000000052414745250261030062 0ustar0000000000000000{-# LANGUAGE LinearTypes #-} {-# LANGUAGE UnicodeSyntax #-} ex1 = f (forall a. Proxy a) ex2 = f ((ctx) => Int) ex2' = f ((ctx, ctx') => Int) ex3 = f (String -> Bool) long = f ( forall m a. (A a, M m) => String -> Bool %1 -> Maybe Int -> Maybe (String, Int) %1 -> Word %m -> Text ) fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-1-four-out.hs0000644000000000000000000000005214745250261026242 0ustar0000000000000000foo = f . g =<< h . i fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-3-four-out.hs0000644000000000000000000000020414745250261026243 0ustar0000000000000000import Control.Arrow foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc fourmolu-0.18.0.0/data/examples/declaration/value/function/tricky-parens.hs0000644000000000000000000000006014745250261025102 0ustar0000000000000000handleStuff = ( let foo = foo in foo ) fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-3.hs0000644000000000000000000000014614745250261024472 0ustar0000000000000000import Control.Arrow foo = op <> n <+> colon <+> prettySe <+> text "=" <+> prettySe <> text sc fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line.hs0000644000000000000000000000015114745250261025112 0ustar0000000000000000foo :: Int -> Int foo x = if x > 5 then 10 else 12 bar :: Int -> Int bar x = if x > 5 then 10 else 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/typed-expressions.hs0000644000000000000000000000006014745250261026014 0ustar0000000000000000foo x = x::Int bar x = Just x :: Maybe String fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-1-out.hs0000644000000000000000000000004014745250261025266 0ustar0000000000000000foo = f . g =<< h . i fourmolu-0.18.0.0/data/examples/declaration/value/function/where-four-out.hs0000644000000000000000000000034014745250261025200 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-2-four-out.hs0000644000000000000000000000015214745250261027717 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c """ -- equivalent to s' = "a\nb\nc" fourmolu-0.18.0.0/data/examples/declaration/value/function/application-2.hs0000644000000000000000000000044314745250261024756 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-2.hs0000644000000000000000000000015214745250261026141 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c """ -- equivalent to s' = "a\nb\nc" fourmolu-0.18.0.0/data/examples/declaration/value/function/tuple-sections.hs0000644000000000000000000000012714745250261025271 0ustar0000000000000000{-# LANGUAGE TupleSections #-} foo = (,2) bar = (,5,) baz = ( ,,5,6, 7,,, ) fourmolu-0.18.0.0/data/examples/declaration/value/function/negative-literals-out.hs0000644000000000000000000000016614745250261026542 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = -x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-3-four-out.hs0000644000000000000000000000056214745250261027725 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c """ -- equivalent to s' = "\na\nb\nc" s1 = """ a b c """ s2 = """ a b c """ -- In the current proposal, these are equivalent to -- the below. If leading newline were removed at the -- beginning, both would result in s1'. s1' = " a\nb\nc" s2' = "a\nb\nc" fourmolu-0.18.0.0/data/examples/declaration/value/function/backticks-four-out.hs0000644000000000000000000000002414745250261026023 0ustar0000000000000000foo x y = x `bar` y fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-multi-line2-out.hs0000644000000000000000000000046114745250261026500 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/typed-hole-out.hs0000644000000000000000000000006514745250261025173 0ustar0000000000000000foo = 1 `_` 2 bar = 1 `_a` 2 baz = _ `something` _ fourmolu-0.18.0.0/data/examples/declaration/value/function/arithmetic-sequences-four-out.hs0000644000000000000000000000033014745250261030207 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] fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-in-branches.hs0000644000000000000000000000033514745250261027512 0ustar0000000000000000foo = if x then -- comment 1 -- comment 2 case a of Just b -> _ Nothing -> _ else -- comment 3 -- comment 4 case a of Just b -> _ Nothing -> _ fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-5-out.hs0000644000000000000000000000027214745250261026754 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s1 = """ a b c """ s1' = "a\nb\nc" s2 = """ \& a b c """ s2_2 = """ \& a \& b \& c """ s2' = " a\n b\n c" fourmolu-0.18.0.0/data/examples/declaration/value/function/case-empty.hs0000644000000000000000000000014514745250261024362 0ustar0000000000000000absurd x = case x of absurd = \case absurd x = case x of {} absurd = \case {} foo = case () of {} 1 fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-0.hs0000644000000000000000000000031114745250261026121 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-2-out.hs0000644000000000000000000000007714745250261026741 0ustar0000000000000000x = y ++ f g -- commentA -- commentB -- commentC fourmolu-0.18.0.0/data/examples/declaration/value/function/let-single-line.hs0000644000000000000000000000046614745250261025311 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/tuples.hs0000644000000000000000000000017714745250261023634 0ustar0000000000000000foo = ( 1,2,3 ) bar = ( 1, 2, 3 ) handleStuff = ( let foo = foo in foo , let bar = bar in bar ) fourmolu-0.18.0.0/data/examples/declaration/value/function/primitive-literals.hs0000644000000000000000000000014714745250261026142 0ustar0000000000000000{-# LANGUAGE ExtendedLiterals, MagicHash #-} foo = 1# bar = 2## baz = 3#Word32 baz = 0b1010#Int64 fourmolu-0.18.0.0/data/examples/declaration/value/function/if-with-comment-next-to-keyword.hs0000644000000000000000000000023014745250261030373 0ustar0000000000000000foo = if x then -- comment 1 -- comment 2 foo 1 2 3 else -- comment 3 -- comment 4 foo "here" "there" fourmolu-0.18.0.0/data/examples/declaration/value/function/negative-literals.hs0000644000000000000000000000016714745250261025736 0ustar0000000000000000{-# LANGUAGE NegativeLiterals #-} foo = - 1 foo = -1 foo = - x foo = -x pat = \case -1 -> 1 pat = \case - 1 -> 1 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-5-four-out.hs0000644000000000000000000000033014745250261027720 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s1 = """ a b c """ s1' = "a\nb\nc" s2 = """ \& a b c """ s2_2 = """ \& a \& b \& c """ s2' = " a\n b\n c" fourmolu-0.18.0.0/data/examples/declaration/value/function/case-multi-line-out.hs0000644000000000000000000000050314745250261026106 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 () -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/type-applications-out.hs0000644000000000000000000000050414745250261026564 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 -> "" foo = foo @[k|bar|] fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-sections-out.hs0000644000000000000000000000016514745250261026602 0ustar0000000000000000foo = (0 +) bar = (<> "hello") baz = ( 1 * 2 + ) ( * 3 ^ 5 ) quux = (,) <$> foo <$> bar fourmolu-0.18.0.0/data/examples/declaration/value/function/arithmetic-sequences.hs0000644000000000000000000000031314745250261026432 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] fourmolu-0.18.0.0/data/examples/declaration/value/function/pragmas-out.hs0000644000000000000000000000053014745250261024550 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" fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-1.hs0000644000000000000000000000045514745250261025261 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> [ "GlobalSecondaryIndexUpdates" .= l ] fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-0-out.hs0000644000000000000000000000014214745250261026056 0ustar0000000000000000foo = testCase "Foo" testFoo : testCase "Bar" testBar : testCase "Baz" testBaz : [] fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-5-out.hs0000644000000000000000000000006014745250261025274 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux fourmolu-0.18.0.0/data/examples/declaration/value/function/list-comprehensions-out.hs0000644000000000000000000000075414745250261027133 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 d <- [ x + 1 | x <- b ] [ c | c <- d ] trans = [ x | x <- xs, then reverse, then reverse ] fourmolu-0.18.0.0/data/examples/declaration/value/function/required-type-arguments-2-four-out.hs0000644000000000000000000000056714745250261031042 0ustar0000000000000000{-# LANGUAGE LinearTypes #-} {-# LANGUAGE UnicodeSyntax #-} ex1 = f (forall a. Proxy a) ex2 = f ((ctx) => Int) ex2' = f ((ctx, ctx') => Int) ex3 = f (String -> Bool) long = f ( forall m a. (A a, M m) => String -> Bool %1 -> Maybe Int -> Maybe (String, Int) %1 -> Word %m -> Text ) fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-types.hs0000644000000000000000000000027614745250261025464 0ustar0000000000000000foo :: (Monad m, Show a) => a -> m String bar :: (Monad m, Show a) => a -> m String multiConstraints :: Show a => a -> a -> a -> Eq a => Num a => a -> a -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/arithmetic-sequences-out.hs0000644000000000000000000000032714745250261027244 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] fourmolu-0.18.0.0/data/examples/declaration/value/function/prefix-out.hs0000644000000000000000000000002214745250261024407 0ustar0000000000000000foo x y = (+) x y fourmolu-0.18.0.0/data/examples/declaration/value/function/simple-out.hs0000644000000000000000000000002314745250261024404 0ustar0000000000000000bar x = x baz = x fourmolu-0.18.0.0/data/examples/declaration/value/function/complex-list-out.hs0000644000000000000000000000027314745250261025542 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something, \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar, baz qux ] fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-types-four-out.hs0000644000000000000000000000034014745250261027232 0ustar0000000000000000foo :: (Monad m, Show a) => a -> m String bar :: ( Monad m , Show a ) => a -> m String multiConstraints :: (Show a) => a -> a -> a -> (Eq a) => (Num a) => a -> a -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-multi-line2-four-out.hs0000644000000000000000000000051114745250261027445 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/prefix.hs0000644000000000000000000000002214745250261023602 0ustar0000000000000000foo x y = (+) x y fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-3-out.hs0000644000000000000000000000052714745250261026755 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c """ -- equivalent to s' = "\na\nb\nc" s1 = """ a b c """ s2 = """ a b c """ -- In the current proposal, these are equivalent to -- the below. If leading newline were removed at the -- beginning, both would result in s1'. s1' = " a\nb\nc" s2' = "a\nb\nc" fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-4.hs0000644000000000000000000000026414745250261026147 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b """ -- equivalent to s' = "a\nb\n" s1 = """ line 1 line 2 """ s2 = "line 3" s3 = """ line 4 line 5 """ fourmolu-0.18.0.0/data/examples/declaration/value/function/type-abstractions-out.hs0000644000000000000000000000031214745250261026567 0ustar0000000000000000id :: forall a. a -> a id @t x = x :: t f1 :: forall a. a -> forall b. b -> (a, b) f1 @a x @b y = (x :: a, y :: b) f2 = (\ @a x @b y -> (x :: a, y :: b)) :: forall a. a -> forall b. b -> (a, b) fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-sums-out.hs0000644000000000000000000000044714745250261025556 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 = (# | #) fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-2-out.hs0000644000000000000000000000027414745250261026066 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/if-single-line-functions-do-four-out.hs0000644000000000000000000000011414745250261031275 0ustar0000000000000000foo x = do y <- quux if x > 2 then bar x else baz y fourmolu-0.18.0.0/data/examples/declaration/value/function/multiple-guards-out.hs0000644000000000000000000000030014745250261026227 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/lexical-negation-four-out.hs0000644000000000000000000000015314745250261027313 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y fourmolu-0.18.0.0/data/examples/declaration/value/function/fancy-forall-0.hs0000644000000000000000000000041314745250261025023 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do-where-out.hs0000644000000000000000000000006314745250261024631 0ustar0000000000000000f :: Maybe Int f = do return c where c = 0 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-5-four-out.hs0000644000000000000000000000010014745250261026240 0ustar0000000000000000foo = map bar $ [ baz ] ++ quux fourmolu-0.18.0.0/data/examples/declaration/value/function/unboxed-tuples-four-out.hs0000644000000000000000000000020614745250261027045 0ustar0000000000000000{-# LANGUAGE UnboxedTuples #-} foo = (# 1, 2, 3 #) bar = (# 1 , 2 , 3 #) unit :: (# #) unit = (# #) fourmolu-0.18.0.0/data/examples/declaration/value/function/application-1-four-out.hs0000644000000000000000000000031514745250261026531 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-4-four-out.hs0000644000000000000000000000021314745250261026244 0ustar0000000000000000import Control.Arrow foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs fourmolu-0.18.0.0/data/examples/declaration/value/function/required-type-arguments-2.hs0000644000000000000000000000050414745250261027253 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE LinearTypes #-} ex1 = f (forall a. Proxy a) ex2 = f (ctx => Int) ex2' = f ((ctx,ctx') => Int) ex3 = f (String -> Bool) long = f (forall m a. (A a, M m) => String -> Bool %1 -> Maybe Int -> Maybe (String,Int) ⊸ Word %m -> Text ) fourmolu-0.18.0.0/data/examples/declaration/value/function/complex-list.hs0000644000000000000000000000027114745250261024733 0ustar0000000000000000handleStuff = handle [ \ExceptionA -> something , \ExceptionB -> somethingElse ] handleStuff = handle [ foo bar , baz qux ] fourmolu-0.18.0.0/data/examples/declaration/value/function/parallel-comprehensions-complex-out.hs0000644000000000000000000000103414745250261031411 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 ] data/examples/declaration/value/function/parallel-comprehensions-complex-four-out.hs0000644000000000000000000000113414745250261032304 0ustar0000000000000000fourmolu-0.18.0.0baz 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 ] fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-5.hs0000644000000000000000000000030014745250261026137 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s1 = """ a b c """ s1' = "a\nb\nc" s2 = """ \& a b c """ s2_2 = """ \& a \& b \& c """ s2' = " a\n b\n c" fourmolu-0.18.0.0/data/examples/declaration/value/function/overloaded-labels.hs0000644000000000000000000000135414745250261025702 0ustar0000000000000000{-# LANGUAGE OverloadedLabels #-} foo = #field bar = (#this ) ( #that) baz = #Foo #"Hello world!" #"\"" #3 #"\n" -- from https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.6.1-alpha3/testsuite/tests/overloadedrecflds/should_run/T11671_run.hs -- unnecessary once https://github.com/tweag/ormolu/issues/821 lands main = traverse_ putStrLn [ #a , #number17 , #do , #type , #Foo , #3 , #"199.4" , #17a23b , #f'a' , #'a' , #' , #''notTHSplice , #"..." , #привет , #こんにちは , #"3" , #":" , #"Foo" , #"The quick brown fox" , #"\"" , (++) #hello#world , (++) #"hello"#"world" , #"hello"# 1 -- equivalent to `(fromLabel @"hello") # 1` , f "hello"#2 -- equivalent to `f ("hello"# :: Addr#) 2` ] fourmolu-0.18.0.0/data/examples/declaration/value/function/where-nested-out.hs0000644000000000000000000000027114745250261025512 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/backticks-out.hs0000644000000000000000000000002414745250261025052 0ustar0000000000000000foo x y = x `bar` y data/examples/declaration/value/function/if-with-comment-in-branches-with-functions.hs0000644000000000000000000000024414745250261032411 0ustar0000000000000000fourmolu-0.18.0.0foo = if x then -- comment 1 -- comment 2 foo 1 2 3 else -- comment 3 -- comment 4 foo "here" "there" fourmolu-0.18.0.0/data/examples/declaration/value/function/case-single-line.hs0000644000000000000000000000025414745250261025433 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/lambda-single-line-four-out.hs0000644000000000000000000000037714745250261027524 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-1.hs0000644000000000000000000000017614745250261026146 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b\ \ c d e f g """ -- equivalent to s' = "a b c d e\nf g" fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-4-four-out.hs0000644000000000000000000000031314745250261027720 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b """ -- equivalent to s' = "a\nb\n" s1 = """ line 1 line 2 """ s2 = "line 3" s3 = """ line 4 line 5 """ fourmolu-0.18.0.0/data/examples/declaration/value/function/lexical-negation.hs0000644000000000000000000000015314745250261025535 0ustar0000000000000000{-# LANGUAGE LexicalNegation #-} foo = -1 foo = -x weird :: (Int -> Int) -> Int -> Int weird x y = x -y fourmolu-0.18.0.0/data/examples/declaration/value/function/awkward-comment-1-four-out.hs0000644000000000000000000000043714745250261027333 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') fourmolu-0.18.0.0/data/examples/declaration/value/function/multiple-guards.hs0000644000000000000000000000026514745250261025434 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/application-0-four-out.hs0000644000000000000000000000021714745250261026531 0ustar0000000000000000foo = f1 p1 p2 p3 foo' = f2 p1 p2 p3 foo'' = f3 p1 p2 p3 fourmolu-0.18.0.0/data/examples/declaration/value/function/multi-way-if-out.hs0000644000000000000000000000027514745250261025450 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arg-breakpoints-out.hs0000644000000000000000000000002514745250261026205 0ustar0000000000000000foo bar = body fourmolu-0.18.0.0/data/examples/declaration/value/function/case-single-line-out.hs0000644000000000000000000000025414745250261026240 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 data/examples/declaration/value/function/parallel-comprehensions-single-line-four-out.hs0000644000000000000000000000016614745250261033047 0ustar0000000000000000fourmolu-0.18.0.0foo 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] fourmolu-0.18.0.0/data/examples/declaration/value/function/if-multi-line-four-out.hs0000644000000000000000000000053314745250261026545 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiple-matches-four-out.hs0000644000000000000000000000005014745250261027341 0ustar0000000000000000foo :: Int -> Int foo 5 = 10 foo _ = 12 fourmolu-0.18.0.0/data/examples/declaration/value/function/fancy-forall-0-four-out.hs0000644000000000000000000000044714745250261026610 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/case-empty-four-out.hs0000644000000000000000000000015314745250261026137 0ustar0000000000000000absurd x = case x of {} absurd = \case {} absurd x = case x of {} absurd = \case {} foo = case () of {} 1 fourmolu-0.18.0.0/data/examples/declaration/value/function/backticks-lhs-out.hs0000644000000000000000000000015514745250261025643 0ustar0000000000000000x `op1` (Just 0) = True op1 x (Just _) = False op1 x Nothing = undefined op2 1 y = False x `op2` y = True fourmolu-0.18.0.0/data/examples/declaration/value/function/equality-constraints-four-out.hs0000644000000000000000000000006014745250261030267 0ustar0000000000000000foo :: (a ~ b) => a -> b -> Int foo = undefined fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-0-out.hs0000644000000000000000000000012114745250261025265 0ustar0000000000000000import Control.Lens.Operators a = b & c .~ d & e %~ f g fourmolu-0.18.0.0/data/examples/declaration/value/function/operator-comments-1-out.hs0000644000000000000000000000027614745250261026741 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-arguments-four-out.hs0000644000000000000000000000015414745250261030076 0ustar0000000000000000foo :: Int -> Int -> Int -> Int foo (Foo g o) ( Bar x y ) z = x fourmolu-0.18.0.0/data/examples/declaration/value/function/implicit-params-four-out.hs0000644000000000000000000000040614745250261027164 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do-single-multi.hs0000644000000000000000000000003514745250261025322 0ustar0000000000000000foo = do (bar baz) fourmolu-0.18.0.0/data/examples/declaration/value/function/negation-four-out.hs0000644000000000000000000000031614745250261025675 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/list-notation-3.hs0000644000000000000000000000043314745250261025257 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/simple-four-out.hs0000644000000000000000000000002214745250261025354 0ustar0000000000000000bar x = x baz = x fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-0.hs0000644000000000000000000000051314745250261026140 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """Line 1 Line 2 Line 3 """ s_2 = """\ \Line 1 Line 2 Line 3 """ -- equivalent to s' = "Line 1\n Line 2\nLine 3" -- the following are equivalent s = """hello world""" s' = "hello world" s = """ hello world """ -- equivalent to s' = " hello\nworld" fourmolu-0.18.0.0/data/examples/declaration/value/function/multiline-strings-1-out.hs0000644000000000000000000000015514745250261026750 0ustar0000000000000000{-# LANGUAGE MultilineStrings #-} s = """ a b c d e f g """ -- equivalent to s' = "a b c d e\nf g" fourmolu-0.18.0.0/data/examples/declaration/value/function/operators-4-out.hs0000644000000000000000000000017114745250261025276 0ustar0000000000000000import Control.Arrow foo = line <> bindingOf <+> text "=" <+> tPretty <+> colon <+> align <> prettyPs data/examples/declaration/value/function/comprehension/transform-multi-line4-out.hs0000644000000000000000000000036314745250261032070 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} quux' xs ys = [ ( x, y ) | x <- xs, y <- ys, then group by -- First comment ( x + y ) using -- Second comment groupWith -- Third comment ] data/examples/declaration/value/function/comprehension/transform-multi-line2-four-out.hs0000644000000000000000000000034514745250261033037 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} bar' xs ys = [ ( x , y ) | x <- xs , y <- ys , then -- First comment sortWith by ( x + y -- Second comment ) ] data/examples/declaration/value/function/comprehension/transform-single-line-out.hs0000644000000000000000000000046614745250261032137 0ustar0000000000000000fourmolu-0.18.0.0{-# 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] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-single-line.hs0000644000000000000000000000046614745250261031411 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] data/examples/declaration/value/function/comprehension/transform-single-line-four-out.hs0000644000000000000000000000046614745250261033110 0ustar0000000000000000fourmolu-0.18.0.0{-# 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] data/examples/declaration/value/function/comprehension/transform-multi-line3-four-out.hs0000644000000000000000000000030614745250261033035 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} baz' xs ys = [ ( x , y ) | x <- xs , y <- ys , then group using -- First comment permutations -- Second comment ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-multi-line4.hs0000644000000000000000000000031514745250261031337 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 ] data/examples/declaration/value/function/comprehension/transform-multi-line3-out.hs0000644000000000000000000000026714745250261032072 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} baz' xs ys = [ ( x, y ) | x <- xs, y <- ys, then group using -- First comment permutations -- Second comment ] data/examples/declaration/value/function/comprehension/transform-multi-line1-four-out.hs0000644000000000000000000000026514745250261033037 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} foo' xs ys = [ ( x , y ) | x <- xs , y <- ys , then -- First comment reverse -- Second comment ] data/examples/declaration/value/function/comprehension/transform-multi-line2-out.hs0000644000000000000000000000031614745250261032064 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} bar' xs ys = [ ( x, y ) | x <- xs, y <- ys, then -- First comment sortWith by ( x + y -- Second comment ) ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-monad.hs0000644000000000000000000000036214745250261030274 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 ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-monad-four-out.hs0000644000000000000000000000046114745250261032052 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 ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-multi-line1.hs0000644000000000000000000000022114745250261031330 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} foo' xs ys = [ (x, y) | x <- xs, y <- ys, then -- First comment reverse -- Second comment ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-multi-line2.hs0000644000000000000000000000025414745250261031337 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} bar' xs ys = [ (x, y) | x <- xs, y <- ys, then -- First comment sortWith by (x + y) -- Second comment ] data/examples/declaration/value/function/comprehension/transform-multi-line1-out.hs0000644000000000000000000000024614745250261032065 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} foo' xs ys = [ ( x, y ) | x <- xs, y <- ys, then -- First comment reverse -- Second comment ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-multi-line3.hs0000644000000000000000000000024714745250261031342 0ustar0000000000000000{-# LANGUAGE TransformListComp #-} baz' xs ys = [ (x, y) | x <- xs, y <- ys, then group using -- First comment permutations -- Second comment ] fourmolu-0.18.0.0/data/examples/declaration/value/function/comprehension/transform-monad-out.hs0000644000000000000000000000043014745250261031075 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 ] data/examples/declaration/value/function/comprehension/transform-multi-line4-four-out.hs0000644000000000000000000000041414745250261033036 0ustar0000000000000000fourmolu-0.18.0.0{-# LANGUAGE TransformListComp #-} quux' xs ys = [ ( x , y ) | x <- xs , y <- ys , then group by -- First comment ( x + y ) using -- Second comment groupWith -- Third comment ] fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/record-patterns-out.hs0000644000000000000000000000041114745250261027705 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/strictness-four-out.hs0000644000000000000000000000005714745250261027751 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/multiple-guard-statements-out.hs0000644000000000000000000000014714745250261031717 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5, y <- 6 = case x of 5 -> True _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/multiline-case-pattern-out.hs0000644000000000000000000000041014745250261031156 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern.hs0000644000000000000000000000021014745250261027102 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline(n + 1) = n n :: Int (n + 1) = 3 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/as-pattern.hs0000644000000000000000000000010314745250261026040 0ustar0000000000000000main = case [1] of xs@(x:_) -> print (x, xs) xs@[] -> print xs fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/as-pattern-four-out.hs0000644000000000000000000000011114745250261027615 0ustar0000000000000000main = case [1] of xs@(x : _) -> print (x, xs) xs@[] -> print xs fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/view-pattern.hs0000644000000000000000000000033414745250261026415 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/multiline-case-pattern.hs0000644000000000000000000000037214745250261030360 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern.hs0000644000000000000000000000047214745250261027714 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 #) fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/view-pattern-out.hs0000644000000000000000000000031614745250261027222 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/sig-pattern-out.hs0000644000000000000000000000007514745250261027034 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/multiline-guard-statement.hs0000644000000000000000000000012514745250261031072 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern.hs0000644000000000000000000000024614745250261030105 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () data/examples/declaration/value/function/pattern/multiline-case-pattern-four-out.hs0000644000000000000000000000046214745250261032057 0ustar0000000000000000fourmolu-0.18.0.0readerBench 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/many-guards-in-singleline-out.hs0000644000000000000000000000014514745250261031557 0ustar0000000000000000foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/or-patterns.hs0000644000000000000000000000103614745250261026246 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} tasty (Cupcake; Cookie) = True tasty (Liquorice; Raisins) = False f :: (Eq a, Show a) => a -> a -> Bool f a ((== a) -> True; show -> "yes") = True f _ _ = False small (abs -> (0; 1; 2); 3) = True -- -3 is not small small _ = False type Coll a = Either [a] (Set a) pattern None <- (Left []; Right (toList -> [])) case e of 1; 2; 3 -> x 4; (5; 6) -> y sane e = case e of 1 2 3 -> a 4 5;6 -> b 7;8 -> c insane e = case e of A _ _; B _ C -> 3 (D; E (Just _) Nothing) -> 4 F -> 5 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern-out.hs0000644000000000000000000000024514745250261030711 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern-four-out.hs0000644000000000000000000000052714745250261031473 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 #) fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/splice-pattern-four-out.hs0000644000000000000000000000030614745250261030477 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $( x + y ) -> () $( y "something" ) -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/sig-pattern.hs0000644000000000000000000000010114745250261026215 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/many-guards-in-singleline.hs0000644000000000000000000000014514745250261030752 0ustar0000000000000000foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/strictness.hs0000644000000000000000000000005714745250261026173 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/unboxed-sum-pattern-out.hs0000644000000000000000000000050514745250261030516 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 #) fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/view-pattern-four-out.hs0000644000000000000000000000035214745250261030173 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern-four-out.hs0000644000000000000000000000024214745250261030665 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline ( n + 1 ) = n n :: Int (n + 1) = 3 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/multiline-guard-statement-out.hs0000644000000000000000000000014114745250261031675 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False data/examples/declaration/value/function/pattern/famous-cardano-pattern-four-out.hs0000644000000000000000000000031214745250261032035 0ustar0000000000000000fourmolu-0.18.0.0( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ) :<|> ( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api data/examples/declaration/value/function/pattern/many-guards-in-singleline-four-out.hs0000644000000000000000000000014514745250261032451 0ustar0000000000000000fourmolu-0.18.0.0foobar x | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 foobaz | x <- 5 = 5 | x <- 6 = 6 | otherwise = 7 data/examples/declaration/value/function/pattern/multiple-guard-statements-four-out.hs0000644000000000000000000000015614745250261032611 0ustar0000000000000000fourmolu-0.18.0.0foobarbar :: Int -> Bool foobarbar | x <- 5 , y <- 6 = case x of 5 -> True _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/quasi-quotes-pattern-four-out.hs0000644000000000000000000000024714745250261031664 0ustar0000000000000000{-# LANGUAGE QuasiQuotes #-} singleline :: () singleline [yamlQQ|something|] = () multiline :: () multiline = case y of [yamlQQ| name: John Doe age: 23 |] -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/or-patterns-out.hs0000644000000000000000000000104414745250261027052 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} tasty (Cupcake; Cookie) = True tasty (Liquorice; Raisins) = False f :: (Eq a, Show a) => a -> a -> Bool f a ((== a) -> True; show -> "yes") = True f _ _ = False small (abs -> (0; 1; 2); 3) = True -- -3 is not small small _ = False type Coll a = Either [a] (Set a) pattern None <- (Left []; Right (toList -> [])) case e of 1; 2; 3 -> x 4; (5; 6) -> y sane e = case e of 1 2 3 -> a 4 5 6 -> b 7; 8 -> c insane e = case e of A _ _ B _ C -> 3 (D; E (Just _) Nothing) -> 4 F -> 5 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/record-patterns.hs0000644000000000000000000000040114745250261027077 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/pattern-bind.hs0000644000000000000000000000015114745250261026354 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/famous-cardano-pattern-out.hs0000644000000000000000000000026214745250261031147 0ustar0000000000000000( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ) :<|> ( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/splice-pattern-out.hs0000644000000000000000000000027014745250261027526 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $( x + y ) -> () $( y "something" ) -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/pattern-bind-four-out.hs0000644000000000000000000000015614745250261030137 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/n-plus-k-pattern-out.hs0000644000000000000000000000022614745250261027716 0ustar0000000000000000{-# LANGUAGE NPlusKPatterns #-} singleline :: Int singleline (n + 1) = n multiline :: Int multiline ( n + 1 ) = n n :: Int (n + 1) = 3 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/splice-pattern.hs0000644000000000000000000000025214745250261026721 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} singleLine = case () of $x -> () $(y "something") -> () multiline = case () of $(x + y) -> () $(y "something") -> () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/multiple-guard-statements.hs0000644000000000000000000000013114745250261031103 0ustar0000000000000000foobarbar :: Int -> Bool foobarbar | x <- 5, y <- 6 = case x of 5 -> True _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/strictness-out.hs0000644000000000000000000000006014745250261026772 0ustar0000000000000000{-# LANGUAGE BangPatterns #-} !a = () ~b = () fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/sig-pattern-four-out.hs0000644000000000000000000000011114745250261027774 0ustar0000000000000000f = do x :: a <- g f = do (x, y) :: (a, b) <- g fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/pattern-bind-out.hs0000644000000000000000000000015414745250261027164 0ustar0000000000000000foo = bar where Foo bar baz = quux Baz quux = zoo foo = bar where Foo bar baz = quux fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/record-patterns-four-out.hs0000644000000000000000000000042514745250261030663 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/as-pattern-out.hs0000644000000000000000000000010514745250261026647 0ustar0000000000000000main = case [1] of xs@(x : _) -> print (x, xs) xs@[] -> print xs fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/famous-cardano-pattern.hs0000644000000000000000000000024014745250261030336 0ustar0000000000000000( getNodeSettingsR :<|> getNodeInfoR :<|> getNextUpdateR :<|> restartNodeR ):<|>( getUtxoR :<|> getConfirmedProposalsR ) = client nodeV1Api data/examples/declaration/value/function/pattern/multiline-guard-statement-four-out.hs0000644000000000000000000000015114745250261032570 0ustar0000000000000000fourmolu-0.18.0.0foobarbar :: Int -> Bool foobarbar | x <- 5 = case x of 5 -> True _ -> False fourmolu-0.18.0.0/data/examples/declaration/value/function/pattern/or-patterns-four-out.hs0000644000000000000000000000110314745250261030017 0ustar0000000000000000{-# LANGUAGE PatternSynonyms #-} tasty (Cupcake; Cookie) = True tasty (Liquorice; Raisins) = False f :: (Eq a, Show a) => a -> a -> Bool f a ((== a) -> True; show -> "yes") = True f _ _ = False small (abs -> (0; 1; 2); 3) = True -- -3 is not small small _ = False type Coll a = Either [a] (Set a) pattern None <- (Left []; Right (toList -> [])) case e of 1; 2; 3 -> x 4; (5; 6) -> y sane e = case e of 1 2 3 -> a 4 5 6 -> b 7; 8 -> c insane e = case e of A _ _ B _ C -> 3 (D; E (Just _) Nothing) -> 4 F -> 5 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-forms1.hs0000644000000000000000000000044614745250261025621 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) |) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-simple2.hs0000644000000000000000000000050114745250261026355 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/multiline-case.hs0000644000000000000000000000013014745250261026352 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-applications2.hs0000644000000000000000000000035314745250261027157 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-lambdas.hs0000644000000000000000000000026314745250261026012 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo = proc a-> \f b->a- \f g h -> \() -> \( Left (x,y )) -> -- Tuple value f (g (h x)) -< y fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-lambdas-out.hs0000644000000000000000000000026114745250261026615 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-forms1-four-out.hs0000644000000000000000000000070014745250261027370 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 ) |) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-lets-four-out.hs0000644000000000000000000000032714745250261027135 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-cases-four-out.hs0000644000000000000000000000065514745250261027270 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-complex-out.hs0000644000000000000000000000311514745250261027262 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-applications-four-out.hs0000644000000000000000000000054414745250261030655 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/multiline-case-four-out.hs0000644000000000000000000000017014745250261030134 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/recursive-procs-four-out.hs0000644000000000000000000000057614745250261030366 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-complex.hs0000644000000000000000000000271014745250261026455 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-ifs-out.hs0000644000000000000000000000030214745250261025767 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-lets.hs0000644000000000000000000000027414745250261025360 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-simple1.hs0000644000000000000000000000056114745250261026362 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar f = proc a -> do b <- f -< a barbar f g = proc a -> do b <- f -< a returnA -< b barbaz f g = proc (a, b) -> do c <- f -< a d <- g -< b bazbar f = proc a -> do a <- f -< a foo = proc x -> do returnA -< x 1 foo a = proc x -> case Left x of Left x -> returnA -< x a fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-forms2-four-out.hs0000644000000000000000000000171514745250261027400 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-parentheses-out.hs0000644000000000000000000000037214745250261027536 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> (f -< a) bar f g = proc a -> ( ( (f) (g) ) -< ( ( ( ( ( ( g a ) ) ) ) ) ) ) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-simple2-four-out.hs0000644000000000000000000000056614745250261030146 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-forms2.hs0000644000000000000000000000154014745250261025616 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-applications-out.hs0000644000000000000000000000044014745250261027677 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/recursive-procs.hs0000644000000000000000000000033114745250261026575 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-form-do-indent.hs0000644000000000000000000000034114745250261027226 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z foo2 = proc () -> do (proc () -> returnA -< () ) -< () fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/recursive-procs-out.hs0000644000000000000000000000043514745250261027407 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-lets-out.hs0000644000000000000000000000025514745250261026164 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-parentheses-four-out.hs0000644000000000000000000000045014745250261030504 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> (f -< a) bar f g = proc a -> ( ( (f) (g) ) -< ( ( ( ( ( ( g a ) ) ) ) ) ) ) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/multiline-case-out.hs0000644000000000000000000000014214745250261027162 0ustar0000000000000000{-# LANGUAGE Arrows #-} f = proc x -> do x <- case x of X -> x -< y a -< b fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-applications.hs0000644000000000000000000000043114745250261027072 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-applications2-out.hs0000644000000000000000000000035714745250261027770 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-form-do-indent-four-out.hs0000644000000000000000000000045414745250261031011 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z foo2 = proc () -> do ( proc () -> returnA -< () ) -< () fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-ifs.hs0000644000000000000000000000027614745250261025174 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-forms1-out.hs0000644000000000000000000000050414745250261026421 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 ) |) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-lambdas-four-out.hs0000644000000000000000000000031514745250261027566 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-complex-four-out.hs0000644000000000000000000000442314745250261030236 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-cases.hs0000644000000000000000000000065614745250261025513 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-simple1-out.hs0000644000000000000000000000055514745250261027172 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar f = proc a -> do b <- f -< a barbar f g = proc a -> do b <- f -< a returnA -< b barbaz f g = proc (a, b) -> do c <- f -< a d <- g -< b bazbar f = proc a -> do a <- f -< a foo = proc x -> do returnA -< x 1 foo a = proc x -> case Left x of Left x -> returnA -< x a fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-applications2-four-out.hs0000644000000000000000000000037714745250261030743 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-cases-out.hs0000644000000000000000000000054214745250261026312 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-ifs-four-out.hs0000644000000000000000000000040414745250261026743 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-parentheses.hs0000644000000000000000000000024214745250261026725 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo f = proc a -> ( f -< a ) bar f g = proc a -> ( ((f) ( g )) -< ((((( (g a) ))))) ) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-forms2-out.hs0000644000000000000000000000150314745250261026422 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-form-do-indent-out.hs0000644000000000000000000000036214745250261030036 0ustar0000000000000000{-# LANGUAGE Arrows #-} foo x = proc (y, z) -> do (| bar (bindA -< y) |) foo1 x = proc (y, z) -> do (| bar (bindA -< y) |) z foo2 = proc () -> do ( proc () -> returnA -< () ) -< () fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-simple1-four-out.hs0000644000000000000000000000066114745250261030141 0ustar0000000000000000{-# LANGUAGE Arrows #-} bar f = proc a -> do b <- f -< a barbar f g = proc a -> do b <- f -< a returnA -< b barbaz f g = proc (a, b) -> do c <- f -< a d <- g -< b bazbar f = proc a -> do a <- f -< a foo = proc x -> do returnA -< x 1 foo a = proc x -> case Left x of Left x -> returnA -< x a fourmolu-0.18.0.0/data/examples/declaration/value/function/arrow/proc-do-simple2-out.hs0000644000000000000000000000045014745250261027165 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1-four-out.hs0000644000000000000000000000025414745250261031022 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/esqueleto-0.hs0000644000000000000000000000036614745250261025600 0ustar0000000000000000import Database.Esqueleto.Experimental foo = select $ do t <- from $ table @Bar `innerJoin` table @Baz `on` do \(br :& bz) -> whatever where_ $ t ^. BarInt ==. val 3 &&. t ^. BarName `in_` valList ["hello", "world"] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon-four-out.hs0000644000000000000000000000013714745250261030514 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/simple.hs0000644000000000000000000000026414745250261024723 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/comments-four-out.hs0000644000000000000000000000011514745250261027030 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-6-out.hs0000644000000000000000000000016314745250261027120 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/hspec-expectation-out.hs0000644000000000000000000000034414745250261027661 0ustar0000000000000000import Test.Hspec my_tests = do context "my context" $ it "does something" $ property $ \pos xs0 xs1 -> FancyError pos xs0 <> FancyError pos xs1 `shouldBe` (FancyError pos (E.union xs0 xs1) :: PE) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/hspec-expectation-four-out.hs0000644000000000000000000000040214745250261030625 0ustar0000000000000000import Test.Hspec my_tests = do context "my context" $ it "does something" $ property $ \pos xs0 xs1 -> FancyError pos xs0 <> FancyError pos xs1 `shouldBe` (FancyError pos (E.union xs0 xs1) :: PE) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal-out.hs0000644000000000000000000000021214745250261030056 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) == p(b) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-s.hs0000644000000000000000000000010214745250261025610 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/lenses.hs0000644000000000000000000000100114745250261024711 0ustar0000000000000000import Control.Lens lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] foo = a & b .~ 2 & c .~ 3 wreq = let opts = defaults & auth ?~ awsAuth AWSv4 "key" "secret" & header "Accept" .~ ["application/json"] & header "Runscope-Bucket-Auth" .~ ["1example-1111-4yyyy-zzzz-xxxxxxxx"] in getWith opts fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2-four-out.hs0000644000000000000000000000024314745250261031014 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/fractional-precedence-four-out.hs0000644000000000000000000000015114745250261031420 0ustar0000000000000000startFormTok |~| messageTag >~< startMessageTok |~| name >~< p' |~| endMessageTok |~| endFormTok fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/hanging-out.hs0000644000000000000000000000032114745250261025644 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/do-four-out.hs0000644000000000000000000000024314745250261025607 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/tricky-colon-chain-out.hs0000644000000000000000000000011014745250261027722 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2-out.hs0000644000000000000000000000020614745250261030054 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-5.hs0000644000000000000000000000014314745250261026310 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/applicative-out.hs0000644000000000000000000000005714745250261026540 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-4-out.hs0000644000000000000000000000006514745250261027117 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/unicode.hs0000644000000000000000000000006314745250261025055 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/qualified-prelude.hs0000644000000000000000000000044014745250261027027 0ustar0000000000000000module StreamSpec where import qualified Prelude import Prelude (($)) spec :: Spec spec = do describe "Comparing list function to" $ do qit "yieldMany" $ \(mono :: Seq Int) -> yieldMany mono `checkProducer` otoList mono fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-s-out.hs0000644000000000000000000000011014745250261026414 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2.hs0000644000000000000000000000016614745250261027247 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/qualified-prelude-out.hs0000644000000000000000000000037414745250261027642 0ustar0000000000000000module StreamSpec where import Prelude (($)) import qualified Prelude spec :: Spec spec = do describe "Comparing list function to" $ do qit "yieldMany" $ \(mono :: Seq Int) -> yieldMany mono `checkProducer` otoList mono fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar-four-out.hs0000644000000000000000000000024114745250261031030 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2-out.hs0000644000000000000000000000021214745250261030044 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/tricky-colon-chain.hs0000644000000000000000000000012214745250261027120 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal-four-out.hs0000644000000000000000000000014714745250261030673 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1.hs0000644000000000000000000000016514745250261027403 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/hspec-expectation.hs0000644000000000000000000000034414745250261027054 0ustar0000000000000000import Test.Hspec my_tests = do context "my context" $ it "does something" $ property $ \pos xs0 xs1 -> FancyError pos xs0 <> FancyError pos xs1 `shouldBe` (FancyError pos (E.union xs0 xs1) :: PE) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar-four-out.hs0000644000000000000000000000025614745250261031031 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-s-four-out.hs0000644000000000000000000000012614745250261027374 0ustar0000000000000000-- Left chain, 1 operator type r :: Int r = 1 + 2 + 3 + 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/comments.hs0000644000000000000000000000010114745250261025245 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-5-out.hs0000644000000000000000000000015314745250261027116 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1.hs0000644000000000000000000000016114745250261027246 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/qualified-prelude-four-out.hs0000644000000000000000000000043214745250261030606 0ustar0000000000000000module StreamSpec where import Prelude (($)) import qualified Prelude spec :: Spec spec = do describe "Comparing list function to" $ do qit "yieldMany" $ \(mono :: Seq Int) -> yieldMany mono `checkProducer` otoList mono fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-gt.hs0000644000000000000000000000015014745250261025763 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1-four-out.hs0000644000000000000000000000023614745250261031015 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal-four-out.hs0000644000000000000000000000026414745250261031043 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) > p(b) f :: Int f = 1 ^^ 2 ^^ 3 ^^ 4 ++ 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal-out.hs0000644000000000000000000000013114745250261027713 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/hanging-four-out.hs0000644000000000000000000000041114745250261026615 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2.hs0000644000000000000000000000021114745250261027374 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/qualified-ops.hs0000644000000000000000000000035014745250261026170 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.# [] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/comments-out.hs0000644000000000000000000000010114745250261026052 0ustar0000000000000000main = bar $ -- bar baz -- baz bar $ {- foo -} bar fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/esqueleto-0-out.hs0000644000000000000000000000041714745250261026402 0ustar0000000000000000import Database.Esqueleto.Experimental foo = select $ do t <- from $ table @Bar `innerJoin` table @Baz `on` do \(br :& bz) -> whatever where_ $ t ^. BarInt ==. val 3 &&. t ^. BarName `in_` valList ["hello", "world"] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-eq.hs0000644000000000000000000000015014745250261025756 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-3.hs0000644000000000000000000000012614745250261026307 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon-out.hs0000644000000000000000000000012114745250261027534 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-2-out.hs0000644000000000000000000000022614745250261027114 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2-out.hs0000644000000000000000000000020514745250261030041 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-1-four-out.hs0000644000000000000000000000062014745250261030062 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal.hs0000644000000000000000000000017414745250261027265 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) > p(b) f :: Int f = 1 ^^ 2 ^^ 3 ^^ 4 ++ 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/applicative.hs0000644000000000000000000000005714745250261025733 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-gt-four-out.hs0000644000000000000000000000024014745250261027541 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-4.hs0000644000000000000000000000005514745250261026311 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/tricky-colon-chain-four-out.hs0000644000000000000000000000015014745250261030677 0ustar0000000000000000b :: [Int] b = 1 : do 2 : do 3 : do [4] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-6.hs0000644000000000000000000000015314745250261026312 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2-out.hs0000644000000000000000000000030114745250261030201 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-1-out.hs0000644000000000000000000000054214745250261027114 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar-out.hs0000644000000000000000000000012714745250261027705 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1-four-out.hs0000644000000000000000000000024114745250261031023 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar-out.hs0000644000000000000000000000020114745250261030053 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-1.hs0000644000000000000000000000053614745250261026312 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/esqueleto-1-out.hs0000644000000000000000000000032414745250261026400 0ustar0000000000000000import qualified Database.Esqueleto.Experimental as E foo = E.from $ E.table `E.innerJoin` E.table `E.on` ( \(a :& b) -> a E.^. AField E.==. b E.^. BField ) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-colon-do-out.hs0000644000000000000000000000014214745250261027440 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/lenses-four-out.hs0000644000000000000000000000115614745250261026502 0ustar0000000000000000import Control.Lens lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] foo = a & b .~ 2 & c .~ 3 wreq = let opts = defaults & auth ?~ awsAuth AWSv4 "key" "secret" & header "Accept" .~ ["application/json"] & header "Runscope-Bucket-Auth" .~ ["1example-1111-4yyyy-zzzz-xxxxxxxx"] in getWith opts fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/esqueleto-0-four-out.hs0000644000000000000000000000050514745250261027351 0ustar0000000000000000import Database.Esqueleto.Experimental foo = select $ do t <- from $ table @Bar `innerJoin` table @Baz `on` do \(br :& bz) -> whatever where_ $ t ^. BarInt ==. val 3 &&. t ^. BarName `in_` valList ["hello", "world"] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar-out.hs0000644000000000000000000000021214745250261030050 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal.hs0000644000000000000000000000017414745250261027272 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) < p(b) g :: Int g = 1 ++ 2 ++ 3 ++ 4 ^^ 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal-four-out.hs0000644000000000000000000000025414745250261031047 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) < p(b) g :: Int g = 1 ++ 2 ++ 3 ++ 4 ^^ 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/unicode-four-out.hs0000644000000000000000000000006314745250261026633 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-eq-four-out.hs0000644000000000000000000000022414745250261027536 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1-out.hs0000644000000000000000000000021014745250261030041 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2.hs0000644000000000000000000000016614745250261027254 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/unicode-out.hs0000644000000000000000000000006314745250261025662 0ustar0000000000000000main = print ('a' → 'a') where (→) = (,) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-gt-out.hs0000644000000000000000000000017414745250261026576 0ustar0000000000000000-- Left chain, 2 operators with p(a) > p(b) t :: Int t = 1 + 2 + 3 + 4 >> 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/hanging.hs0000644000000000000000000000031514745250261025042 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/do.hs0000644000000000000000000000022614745250261024032 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-lt.hs0000644000000000000000000000014714745250261025776 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-normal-out.hs0000644000000000000000000000022014745250261030062 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) > p(b) f :: Int f = 1 ^^ 2 ^^ 3 ^^ 4 ++ 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/lenses-out.hs0000644000000000000000000000102214745250261025521 0ustar0000000000000000import Control.Lens lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] foo = a & b .~ 2 & c .~ 3 wreq = let opts = defaults & auth ?~ awsAuth AWSv4 "key" "secret" & header "Accept" .~ ["application/json"] & header "Runscope-Bucket-Auth" .~ ["1example-1111-4yyyy-zzzz-xxxxxxxx"] in getWith opts fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-4-four-out.hs0000644000000000000000000000011114745250261030060 0ustar0000000000000000ex2 = f1 $ arg1 $ arg2 $ f2 arg3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1-out.hs0000644000000000000000000000025514745250261030210 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar.hs0000644000000000000000000000011314745250261027073 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2.hs0000644000000000000000000000016714745250261027243 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) == p(:) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal-four-out.hs0000644000000000000000000000025014745250261031031 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) == p(b) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-colon.hs0000644000000000000000000000011314745250261026730 0ustar0000000000000000-- Right chain, : case, 1 operator type b :: Int b = 1 : 2 : 3 : 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-2-four-out.hs0000644000000000000000000000025614745250261031025 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) > p(:) l :: Int l = 1 ^^ 2 ^^ 3 ^^ 4 : 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-6-four-out.hs0000644000000000000000000000023314745250261030067 0ustar0000000000000000ex5 = f1 $ arg1 $ arg2 $ \c -> 3 * c ex7 = f1 $ arg1 $ arg2 $ \c -> 3 * c fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-2-four-out.hs0000644000000000000000000000024614745250261031031 0ustar0000000000000000-- Right chain, : case, 2 operators with p(a) < p(:) m :: Int m = 1 || 2 || 3 || 4 : 5 || 6 || 7 || 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/do-out.hs0000644000000000000000000000022514745250261024636 0ustar0000000000000000main = do stuff `finally` do recover main = do stuff `finally` recover main = do { stuff } `finally` recover foo = do 1 + 2 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-normal-out.hs0000644000000000000000000000021414745250261030072 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) < p(b) g :: Int g = 1 ++ 2 ++ 3 ++ 4 ^^ 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-colon-1-out.hs0000644000000000000000000000020114745250261030046 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) < p(b) j :: Int j = 1 : 2 : 3 : 4 ^^ 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/simple-out.hs0000644000000000000000000000026414745250261025530 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/fractional-precedence-out.hs0000644000000000000000000000014514745250261030452 0ustar0000000000000000startFormTok |~| messageTag >~< startMessageTok |~| name >~< p' |~| endMessageTok |~| endFormTok fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-3-four-out.hs0000644000000000000000000000021614745250261030065 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-2-four-out.hs0000644000000000000000000000030014745250261030056 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/qualified-ops-four-out.hs0000644000000000000000000000046714745250261027757 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.# [] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-lt-dollar.hs0000644000000000000000000000016114745250261027253 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) < p(b) o :: Int o = 1 $ 2 $ 3 $ 4 ++ 5 $ 6 $ 7 $ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-colon-1.hs0000644000000000000000000000016414745250261027244 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) > p(b) i :: Int i = 1 : 2 : 3 : 4 `seq` 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/esqueleto-1-four-out.hs0000644000000000000000000000037114745250261027353 0ustar0000000000000000import qualified Database.Esqueleto.Experimental as E foo = E.from $ E.table `E.innerJoin` E.table `E.on` ( \(a :& b) -> a E.^. AField E.==. b E.^. BField ) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-colon-do.hs0000644000000000000000000000012614745250261026635 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-eq-out.hs0000644000000000000000000000016614745250261026572 0ustar0000000000000000-- Left chain, 2 operators with p(a) == p(b) s :: Int s = 1 + 2 + 3 + 4 - 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/esqueleto-1.hs0000644000000000000000000000031414745250261025572 0ustar0000000000000000import qualified Database.Esqueleto.Experimental as E foo = E.from $ E.table `E.innerJoin` E.table `E.on` ( \(a :& b) -> a E.^. AField E.==. b E.^. BField ) fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-1-four-out.hs0000644000000000000000000000036514745250261031163 0ustar0000000000000000-- Right chain, $ case, 2 operators with p($) == p(b) n :: Int n = 1 $ 2 $ 3 $ 4 `seq` 5 $ 6 $ 7 $ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/qualified-ops-out.hs0000644000000000000000000000037714745250261027006 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.# [] fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-dollar-four-out.hs0000644000000000000000000000015314745250261030655 0ustar0000000000000000-- Right chain, $ case, 1 operator type c :: Int c = 1 $ 2 $ 3 $ 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-lt-out.hs0000644000000000000000000000016714745250261026605 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-s-normal.hs0000644000000000000000000000012314745250261027107 0ustar0000000000000000-- Right chain, normal case, 1 operator type a :: Int a = 1 ++ 2 ++ 3 ++ 4 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1.hs0000644000000000000000000000016214745250261027235 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/fractional-precedence.hs0000644000000000000000000000014514745250261027645 0ustar0000000000000000startFormTok |~| messageTag >~< startMessageTok |~| name >~< p' |~| endMessageTok |~| endFormTok fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-gt-dollar.hs0000644000000000000000000000016614745250261027253 0ustar0000000000000000-- Right chain, $ case, 2 operators with p(a) > p($) q :: Int q = 1 ++ 2 ++ 3 ++ 4 $ 5 ++ 6 ++ 7 ++ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-5-four-out.hs0000644000000000000000000000022314745250261030065 0ustar0000000000000000ex4 = f1 $ arg1 $ arg2 $ do arg3 ex6 = f1 $ arg1 $ arg2 $ do arg3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/applicative-four-out.hs0000644000000000000000000000007514745250261027511 0ustar0000000000000000f = Foo <$> bar <*> baz <*> baz' fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-1-out.hs0000644000000000000000000000020014745250261030033 0ustar0000000000000000-- Right chain, : case, 2 operators with p(:) == p(b) h :: Int h = 1 : 2 : 3 : 4 ++ 5 : 6 : 7 : 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-dollar-2-four-out.hs0000644000000000000000000000041114745250261031154 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-3-out.hs0000644000000000000000000000014614745250261027116 0ustar0000000000000000ex1 = f1 $ arg1 $ arg2 $ arg3 ex3 = f1 $ arg1 $ arg2 $ 1 + 3 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-l-lt-four-out.hs0000644000000000000000000000022714745250261027553 0ustar0000000000000000-- Left chain, 2 operators with p(a) < p(b) u :: Int u = 1 + 2 + 3 + 4 * 5 + 6 + 7 + 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-r-eq-normal.hs0000644000000000000000000000017414745250261027260 0ustar0000000000000000-- Right chain, normal case, 2 operators with p(a) == p(b) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/simple-four-out.hs0000644000000000000000000000026614745250261026503 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/dollar-chains-2.hs0000644000000000000000000000023014745250261026302 0ustar0000000000000000module Main where foo = bar $ do 1 $ quux abc = a1 $ a2 $ do 3 cde = b1 $ b2 $ b3 $ \c -> putStrLn "foo" fourmolu-0.18.0.0/data/examples/declaration/value/function/infix/op-chain-colon-do-four-out.hs0000644000000000000000000000020614745250261030412 0ustar0000000000000000-- chain mixing : and do-blocks d = do 1 : do 2 : do 3 : do 4 data/examples/declaration/value/function/record/hanging-after-equal-update-four-out.hs0000644000000000000000000000021314745250261032363 0ustar0000000000000000fourmolu-0.18.0.0foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/inter-comments-out.hs0000644000000000000000000000014514745250261027342 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/constructors.hs0000644000000000000000000000134314745250261026342 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 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/hanging-after-equal-con-out.hs0000644000000000000000000000015514745250261030773 0ustar0000000000000000foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/constructors-out.hs0000644000000000000000000000116314745250261027147 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 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/inter-comments-four-out.hs0000644000000000000000000000022114745250261030306 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/record-dot-four-out.hs0000644000000000000000000000047714745250261027421 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} fourmolu-0.18.0.0/data/examples/declaration/value/function/record/wildcards-out.hs0000644000000000000000000000024414745250261026352 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo {x, y} bar x y z = Bar { x, y, z, .. } baz = Baz {..} fourmolu-0.18.0.0/data/examples/declaration/value/function/record/updaters-four-out.hs0000644000000000000000000000017014745250261027174 0ustar0000000000000000foo x = x{a = 3} bar x = x { abc = foo , def = Foo{a = 10} } baz x = x{} sym x = x{(+) = 4} fourmolu-0.18.0.0/data/examples/declaration/value/function/record/updaters-out.hs0000644000000000000000000000016214745250261026224 0ustar0000000000000000foo x = x {a = 3} bar x = x { abc = foo, def = Foo {a = 10} } baz x = x {} sym x = x {(+) = 4} fourmolu-0.18.0.0/data/examples/declaration/value/function/record/updaters.hs0000644000000000000000000000015314745250261025417 0ustar0000000000000000foo x = x { a = 3 } bar x = x { abc = foo, def = Foo {a = 10} } baz x = x{ } sym x = x { (+) = 4 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/hanging-after-equal-con.hs0000644000000000000000000000012714745250261030165 0ustar0000000000000000foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/constructors-four-out.hs0000644000000000000000000000132614745250261030121 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 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/record-dot-out.hs0000644000000000000000000000050314745250261026436 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} fourmolu-0.18.0.0/data/examples/declaration/value/function/record/wildcards.hs0000644000000000000000000000023414745250261025544 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo { x, y } bar x y z = Bar { x, y, z, .. } baz = Baz { .. } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/inter-comments.hs0000644000000000000000000000011514745250261026532 0ustar0000000000000000x = Just -- comment A { x } x = Just -- comment a { x } data/examples/declaration/value/function/record/hanging-after-equal-con-four-out.hs0000644000000000000000000000021314745250261031660 0ustar0000000000000000fourmolu-0.18.0.0foo = Foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/hanging-after-equal-update-out.hs0000644000000000000000000000015514745250261031476 0ustar0000000000000000foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/hanging-after-equal-update.hs0000644000000000000000000000012714745250261030670 0ustar0000000000000000foo = foo { foo = -- Blah blah case x of Blah -> 1 Blim -> 2 } fourmolu-0.18.0.0/data/examples/declaration/value/function/record/wildcards-four-out.hs0000644000000000000000000000026514745250261027326 0ustar0000000000000000{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} foo x y = Foo{x, y} bar x y z = Bar { x , y , z , .. } baz = Baz{..} fourmolu-0.18.0.0/data/examples/declaration/value/function/record/record-dot.hs0000644000000000000000000000051314745250261025632 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 } fourmolu-0.18.0.0/data/examples/declaration/value/function/do/operator-and-parens.hs0000644000000000000000000000037514745250261026603 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/do/applications-and-parens.hs0000644000000000000000000000033214745250261027427 0ustar0000000000000000warningFor var place = do guard $ isVariableName var guard . not $ isInArray var place || isGuarded place (if includeGlobals || isLocal var then warningForLocals else warningForGlobals) var place fourmolu-0.18.0.0/data/examples/declaration/value/function/do/operator-and-parens-out.hs0000644000000000000000000000037514745250261027410 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/do/expr-four-out.hs0000644000000000000000000000021314745250261025445 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz fourmolu-0.18.0.0/data/examples/declaration/value/function/do/let.hs0000644000000000000000000000042014745250261023475 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/operator-and-parens-four-out.hs0000644000000000000000000000041714745250261030356 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) fourmolu-0.18.0.0/data/examples/declaration/value/function/do/recursive-do-mdo-out.hs0000644000000000000000000000020514745250261026703 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) fourmolu-0.18.0.0/data/examples/declaration/value/function/do/comment-spacing-four-out.hs0000644000000000000000000000007114745250261027555 0ustar0000000000000000foo = do bar -- foo baz -- foo quux fourmolu-0.18.0.0/data/examples/declaration/value/function/do/recursive-do-mdo.hs0000644000000000000000000000016114745250261026077 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) fourmolu-0.18.0.0/data/examples/declaration/value/function/do/let-out.hs0000644000000000000000000000041214745250261024303 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/applications-and-parens-four-out.hs0000644000000000000000000000040214745250261031203 0ustar0000000000000000warningFor var place = do guard $ isVariableName var guard . not $ isInArray var place || isGuarded place ( if includeGlobals || isLocal var then warningForLocals else warningForGlobals ) var place fourmolu-0.18.0.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain-out.hs0000644000000000000000000000032014745250261027556 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/comment-alignment.hs0000644000000000000000000000022114745250261026326 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux fourmolu-0.18.0.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain-four-out.hs0000644000000000000000000000043014745250261030531 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/expr.hs0000644000000000000000000000015514745250261023674 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz fourmolu-0.18.0.0/data/examples/declaration/value/function/do/hang-rhs-arrow-out.hs0000644000000000000000000000027314745250261026363 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/blocks-four-out.hs0000644000000000000000000000046414745250261025754 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/recursive-do-mdo-four-out.hs0000644000000000000000000000026514745250261027662 0ustar0000000000000000{-# LANGUAGE RecursiveDo #-} baz = mdo bar a a <- foo b <- bar 1 2 3 return (a + b) fourmolu-0.18.0.0/data/examples/declaration/value/function/do/expr-out.hs0000644000000000000000000000016114745250261024476 0ustar0000000000000000quux = something $ do foo case x of 1 -> 10 2 -> 20 bar if something then x else y baz fourmolu-0.18.0.0/data/examples/declaration/value/function/do/comment-alignment-four-out.hs0000644000000000000000000000025714745250261030115 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux fourmolu-0.18.0.0/data/examples/declaration/value/function/do/recursive-do-rec-four-out.hs0000644000000000000000000000037214745250261027653 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/recursive-do-rec-out.hs0000644000000000000000000000033414745250261026700 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/recursive-do-rec.hs0000644000000000000000000000034014745250261026070 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/blocks-out.hs0000644000000000000000000000042714745250261025002 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/comment-alignment-out.hs0000644000000000000000000000022114745250261027133 0ustar0000000000000000main = do case blah of Nothing -> return () Just xs -> do forM_ xs foo bar -- and here it goes unless bobla $ quux fourmolu-0.18.0.0/data/examples/declaration/value/function/do/do-dollar-mixed-chain.hs0000644000000000000000000000032014745250261026751 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/hang-rhs-arrow.hs0000644000000000000000000000027314745250261025556 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/applications-and-parens-out.hs0000644000000000000000000000034414745250261030237 0ustar0000000000000000warningFor var place = do guard $ isVariableName var guard . not $ isInArray var place || isGuarded place ( if includeGlobals || isLocal var then warningForLocals else warningForGlobals ) var place fourmolu-0.18.0.0/data/examples/declaration/value/function/do/comment-spacing.hs0000644000000000000000000000005714745250261026003 0ustar0000000000000000foo = do bar -- foo baz -- foo quux fourmolu-0.18.0.0/data/examples/declaration/value/function/do/let-four-out.hs0000644000000000000000000000044214745250261025257 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/hang-rhs-arrow-four-out.hs0000644000000000000000000000033114745250261027327 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/blocks.hs0000644000000000000000000000051614745250261024174 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 fourmolu-0.18.0.0/data/examples/declaration/value/function/do/comment-spacing-out.hs0000644000000000000000000000005714745250261026610 0ustar0000000000000000foo = do bar -- foo baz -- foo quux fourmolu-0.18.0.0/data/examples/declaration/value/other/line-single-line-out.hs0000644000000000000000000000003114745250261025541 0ustar0000000000000000x :: [Int] x = [1, 2, 3] fourmolu-0.18.0.0/data/examples/declaration/value/other/line-single-line-four-out.hs0000644000000000000000000000003114745250261026512 0ustar0000000000000000x :: [Int] x = [1, 2, 3] fourmolu-0.18.0.0/data/examples/declaration/value/other/line-multi-line-four-out.hs0000644000000000000000000000010014745250261026360 0ustar0000000000000000x :: [Int] x = [ 1 , 2 , somethingSomething 3 ] fourmolu-0.18.0.0/data/examples/declaration/value/other/line-single-line.hs0000644000000000000000000000002714745250261024741 0ustar0000000000000000x :: [Int] x = [1,2,3] fourmolu-0.18.0.0/data/examples/declaration/value/other/comments-get-before-op-four-out.hs0000644000000000000000000000037014745250261027643 0ustar0000000000000000main :: IO () main = do migrateSchema [ migration1 , migration1 , migration3 -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Data ] `finally` Log.close fourmolu-0.18.0.0/data/examples/declaration/value/other/comments-get-before-op-out.hs0000644000000000000000000000034014745250261026667 0ustar0000000000000000main :: IO () main = do migrateSchema [ migration1, migration1, migration3 -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Data ] `finally` Log.close fourmolu-0.18.0.0/data/examples/declaration/value/other/line-multi-line.hs0000644000000000000000000000007014745250261024610 0ustar0000000000000000x :: [Int] x = [ 1 , 2 , somethingSomething 3 ] fourmolu-0.18.0.0/data/examples/declaration/value/other/line-multi-line-out.hs0000644000000000000000000000007214745250261025417 0ustar0000000000000000x :: [Int] x = [ 1, 2, somethingSomething 3 ] fourmolu-0.18.0.0/data/examples/declaration/value/other/comments-get-before-op.hs0000644000000000000000000000037614745250261026073 0ustar0000000000000000main :: IO () main = do migrateSchema [ migration1 , migration1 , migration3 -- When adding migrations here, don't forget to update -- 'schemaVersion' in Galley.Data ] `finally` Log.close fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/bidirectional-out.hs0000644000000000000000000000054414745250261027460 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) data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional-four-out.hs0000644000000000000000000000050614745250261032701 0ustar0000000000000000fourmolu-0.18.0.0{-# 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) fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/unidirectional-out.hs0000644000000000000000000000047114745250261027660 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" fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/unidirectional-four-out.hs0000644000000000000000000000050414745250261030626 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" fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/bidirectional.hs0000644000000000000000000000056414745250261026655 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) fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/unidirectional.hs0000644000000000000000000000046314745250261027054 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" fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional.hs0000644000000000000000000000044314745250261031202 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) fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/bidirectional-four-out.hs0000644000000000000000000000057414745250261030434 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) fourmolu-0.18.0.0/data/examples/declaration/value/pattern-synonyms/explicitely-bidirectional-out.hs0000644000000000000000000000045214745250261032007 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) fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/simple.hs0000644000000000000000000000017414745250261027124 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/injective-four-out.hs0000644000000000000000000000020414745250261031363 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) data/examples/declaration/type-families/closed-type-family/no-annotation-four-out.hs0000644000000000000000000000011414745250261032110 0ustar0000000000000000fourmolu-0.18.0.0type family F a where F Int = Double F Bool = Char F a = String fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/no-annotation.hs0000644000000000000000000000011214745250261030407 0ustar0000000000000000type family F a where F Int = Double F Bool = Char F a = String fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/infix.hs0000644000000000000000000000051314745250261026745 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-forall-out.hs0000644000000000000000000000013214745250261030662 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-comments-out.hs0000644000000000000000000000022114745250261031227 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-comments.hs0000644000000000000000000000022314745250261030424 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/promotion-out.hs0000644000000000000000000000005514745250261030464 0ustar0000000000000000type family Foo a where Foo '( 'x', a) = a data/examples/declaration/type-families/closed-type-family/with-comments-four-out.hs0000644000000000000000000000024314745250261032125 0ustar0000000000000000fourmolu-0.18.0.0type 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/promotion-four-out.hs0000644000000000000000000000005714745250261031437 0ustar0000000000000000type family Foo a where Foo '( 'x', a) = a fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/infix-four-out.hs0000644000000000000000000000052714745250261030530 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-equal-sign-out.hs0000644000000000000000000000006114745250261031451 0ustar0000000000000000type family TF a b = result where TF a b = Int fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/type-arguments-out.hs0000644000000000000000000000020014745250261031412 0ustar0000000000000000type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/multi-line.hs0000644000000000000000000000044714745250261027715 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/injective.hs0000644000000000000000000000020014745250261027601 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) data/examples/declaration/type-families/closed-type-family/type-arguments-four-out.hs0000644000000000000000000000020414745250261032310 0ustar0000000000000000fourmolu-0.18.0.0type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-equal-sign.hs0000644000000000000000000000006114745250261030644 0ustar0000000000000000type family TF a b = result where TF a b = Int fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-forall-four-out.hs0000644000000000000000000000013614745250261031637 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/multi-line-four-out.hs0000644000000000000000000000056414745250261031473 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/infix-out.hs0000644000000000000000000000051314745250261027552 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/with-forall.hs0000644000000000000000000000013214745250261030055 0ustar0000000000000000type family G a b where forall x y. G [x] (Proxy y) = Double forall z. z `G` z = Bool fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/type-arguments.hs0000644000000000000000000000020014745250261030605 0ustar0000000000000000type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/simple-out.hs0000644000000000000000000000016714745250261027733 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/promotion.hs0000644000000000000000000000005514745250261027657 0ustar0000000000000000type family Foo a where Foo '( 'x', a) = a fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/no-annotation-out.hs0000644000000000000000000000010614745250261031217 0ustar0000000000000000type family F a where F Int = Double F Bool = Char F a = String data/examples/declaration/type-families/closed-type-family/with-equal-sign-four-out.hs0000644000000000000000000000006314745250261032345 0ustar0000000000000000fourmolu-0.18.0.0type family TF a b = result where TF a b = Int fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/injective-out.hs0000644000000000000000000000020114745250261030407 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) fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/multi-line-out.hs0000644000000000000000000000046214745250261030517 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 fourmolu-0.18.0.0/data/examples/declaration/type-families/closed-type-family/simple-four-out.hs0000644000000000000000000000017514745250261030703 0ustar0000000000000000module Main where -- | Documentation. type family F a :: * -> * where F Int = Double F Bool = Char F a = String fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/simple.hs0000644000000000000000000000011314745250261025576 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/no-annotation-four-out.hs0000644000000000000000000000007314745250261030654 0ustar0000000000000000module Main where -- | Documentation. data family Array e fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/no-annotation.hs0000644000000000000000000000007414745250261027077 0ustar0000000000000000module Main where -- | Documentation. data family Array e fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/type-arguments-out.hs0000644000000000000000000000017714745250261030110 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/type-arguments-four-out.hs0000644000000000000000000000020114745250261031045 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/type-arguments.hs0000644000000000000000000000017714745250261027303 0ustar0000000000000000type PickType :: forall k. (k -> Type) -> Type data family PickType m data instance PickType @Nat M where Foo :: PickType M fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/simple-out.hs0000644000000000000000000000011214745250261026402 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/no-annotation-out.hs0000644000000000000000000000007314745250261027703 0ustar0000000000000000module Main where -- | Documentation. data family Array e fourmolu-0.18.0.0/data/examples/declaration/type-families/data-family/simple-four-out.hs0000644000000000000000000000011214745250261027353 0ustar0000000000000000module Main where -- | Documentation. data family GMap k :: Type -> Type fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/simple.hs0000644000000000000000000000010314745250261025645 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/injective-four-out.hs0000644000000000000000000000010314745250261030112 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/no-annotation-four-out.hs0000644000000000000000000000011114745250261030715 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/no-annotation.hs0000644000000000000000000000011214745250261027140 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/operator-four-out.hs0000644000000000000000000000004414745250261027771 0ustar0000000000000000type family a ! b type family a . b fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/injective.hs0000644000000000000000000000010314745250261026334 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/operator-out.hs0000644000000000000000000000004514745250261027021 0ustar0000000000000000type family a ! b type family a . b fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/simple-out.hs0000644000000000000000000000010214745250261026451 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/no-annotation-out.hs0000644000000000000000000000011114745250261027744 0ustar0000000000000000module Main where -- | Documentation. type family F a b :: Type -> Type fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/injective-out.hs0000644000000000000000000000010414745250261027142 0ustar0000000000000000type family Id a = r | r -> a type family F a b c = d | d -> a c b fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/operator.hs0000644000000000000000000000004414745250261026213 0ustar0000000000000000type family a ! b type family a . b fourmolu-0.18.0.0/data/examples/declaration/type-families/type-family/simple-four-out.hs0000644000000000000000000000010214745250261027422 0ustar0000000000000000module Main where -- | Documentation. type family Elem c :: Type fourmolu-0.18.0.0/data/examples/declaration/deriving/singleline.hs0000644000000000000000000000054414745250261023315 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 fourmolu-0.18.0.0/data/examples/declaration/deriving/overlapping.hs0000644000000000000000000000035014745250261023505 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo fourmolu-0.18.0.0/data/examples/declaration/deriving/multiline-four-out.hs0000644000000000000000000000043414745250261024742 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 fourmolu-0.18.0.0/data/examples/declaration/deriving/singleline-out.hs0000644000000000000000000000055114745250261024120 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 fourmolu-0.18.0.0/data/examples/declaration/deriving/multiline-out.hs0000644000000000000000000000035014745250261023766 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 fourmolu-0.18.0.0/data/examples/declaration/deriving/overlapping-out.hs0000644000000000000000000000033214745250261024312 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo fourmolu-0.18.0.0/data/examples/declaration/deriving/multiline.hs0000644000000000000000000000041614745250261023164 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 fourmolu-0.18.0.0/data/examples/declaration/deriving/singleline-four-out.hs0000644000000000000000000000054414745250261025073 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 fourmolu-0.18.0.0/data/examples/declaration/deriving/overlapping-four-out.hs0000644000000000000000000000036714745250261025273 0ustar0000000000000000deriving instance {-# OVERLAPPABLE #-} Ord Foo deriving instance {-# OVERLAPPING #-} Num Foo deriving instance {-# OVERLAPS #-} Read Foo deriving instance {-# INCOHERENT #-} Show Foo fourmolu-0.18.0.0/data/examples/other/jsffi.hs0000644000000000000000000000003714745250261017307 0ustar0000000000000000{-# language JavaScriptFFI #-} fourmolu-0.18.0.0/data/examples/other/pragma-no-header-four-out.hs0000644000000000000000000000012514745250261023071 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} fourmolu-0.18.0.0/data/examples/other/necessary-brackets-out.hs0000644000000000000000000000024214745250261022601 0ustar0000000000000000insertEmDash = Text.concat . map \case { x | x == "--" -> "—"; x -> x } . Text.groupBy ((==) `on` Char.isSpace) foo f a b c = f do { a } + f do { b } + f do c fourmolu-0.18.0.0/data/examples/other/comment-after-preceding-haddock-four-out.hs0000644000000000000000000000013414745250261026054 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b fourmolu-0.18.0.0/data/examples/other/comment-trailing-space-out.hs0000644000000000000000000000012314745250261023351 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A fourmolu-0.18.0.0/data/examples/other/pragma-comments-after-four-out.hs0000644000000000000000000000023314745250261024153 0ustar0000000000000000{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} -- TODO: Fix and delete this pragma {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} fourmolu-0.18.0.0/data/examples/other/empty-haddock.hs0000644000000000000000000000013614745250261020737 0ustar0000000000000000-- | module Test ( -- | test, ) where -- | test :: -- | test data T = T {- ^ -} fourmolu-0.18.0.0/data/examples/other/ascii.hs0000644000000000000000000000037614745250261017304 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} fourmolu-0.18.0.0/data/examples/other/merging-comments.hs0000644000000000000000000000043514745250261021463 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 fourmolu-0.18.0.0/data/examples/other/multiline-forall-four-out.hs0000644000000000000000000000154314745250261023246 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) = () #-} fourmolu-0.18.0.0/data/examples/other/comment-inside-construct.hs0000644000000000000000000000023414745250261023142 0ustar0000000000000000xs = [ outer list item, [ inner list first item, inner list second item -- inner list last item commented ], outer list item ] fourmolu-0.18.0.0/data/examples/other/pragma-comments.hs0000644000000000000000000000040214745250261021274 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 fourmolu-0.18.0.0/data/examples/other/invalid-haddock-2.hs0000644000000000000000000000020514745250261021363 0ustar0000000000000000test = undefined where -- | Comment -- 2nd invalid line a = undefined -- | A multiline -- | comment b = b fourmolu-0.18.0.0/data/examples/other/following-comment-last-1.hs0000644000000000000000000000015414745250261022745 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more fourmolu-0.18.0.0/data/examples/other/invalid-haddock-double-trigger.hs0000644000000000000000000000023514745250261024140 0ustar0000000000000000test = foo -- || Invalid haddock, with double trigger -- || second line + bar -- ||Invalid haddock 2, with double trigger -- ||second line + baz fourmolu-0.18.0.0/data/examples/other/haddock-without-module-header-out.hs0000644000000000000000000000005014745250261024615 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar fourmolu-0.18.0.0/data/examples/other/pragma-comments-out.hs0000644000000000000000000000037714745250261022114 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 fourmolu-0.18.0.0/data/examples/other/comment-multiline-after.hs0000644000000000000000000000010314745250261022741 0ustar0000000000000000foo :: Int {- ^ start index -} -> Int {- ^ length -} -> t a -> t a fourmolu-0.18.0.0/data/examples/other/invalid-haddock-2-out.hs0000644000000000000000000000021014745250261022164 0ustar0000000000000000test = undefined where -- \| Comment -- 2nd invalid line a = undefined -- \| A multiline -- \| comment b = b fourmolu-0.18.0.0/data/examples/other/comment-following-preceding-gap-four-out.hs0000644000000000000000000000011514745250261026124 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege fourmolu-0.18.0.0/data/examples/other/pragma-sorting-out.hs0000644000000000000000000000051514745250261021746 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 fourmolu-0.18.0.0/data/examples/other/following-comment-last-3-out.hs0000644000000000000000000000015014745250261023550 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. -- even on second line fourmolu-0.18.0.0/data/examples/other/merging-comments-out.hs0000644000000000000000000000037214745250261022270 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 fourmolu-0.18.0.0/data/examples/other/haddock-without-module-header-four-out.hs0000644000000000000000000000005014745250261025566 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar fourmolu-0.18.0.0/data/examples/other/following-comment-last-2-out.hs0000644000000000000000000000016414745250261023554 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B fourmolu-0.18.0.0/data/examples/other/comment-spacing-four-out.hs0000644000000000000000000000014314745250261023046 0ustar0000000000000000-- | Something. foo :: -- | Foo. Int -> -- | Bar. IO () foo _ = pure () -- comment fourmolu-0.18.0.0/data/examples/other/consequetive-pipe-comments-four-out.hs0000644000000000000000000000007314745250261025254 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 fourmolu-0.18.0.0/data/examples/other/pragma-four-out.hs0000644000000000000000000000053414745250261021235 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 fourmolu-0.18.0.0/data/examples/other/invalid-haddock-weird-four-out.hs0000644000000000000000000000006714745250261024120 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- \|# ${ fourmolu-0.18.0.0/data/examples/other/comment-empty-let-four-out.hs0000644000000000000000000000006014745250261023340 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 fourmolu-0.18.0.0/data/examples/other/comment-glued-together.hs0000644000000000000000000000011514745250261022562 0ustar0000000000000000module Main (main) where {- | Foo. -} -- Bar main :: IO () main = return () fourmolu-0.18.0.0/data/examples/other/empty-haddock-four-out.hs0000644000000000000000000000007614745250261022520 0ustar0000000000000000module Test ( test, ) where test :: test data T = T fourmolu-0.18.0.0/data/examples/other/comment-following-preceding-gap.hs0000644000000000000000000000011514745250261024346 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege fourmolu-0.18.0.0/data/examples/other/empty-forall.hs0000644000000000000000000000035414745250261020623 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 = () #-} fourmolu-0.18.0.0/data/examples/other/pragma-comments-after.hs0000644000000000000000000000023314745250261022375 0ustar0000000000000000{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- TODO: Fix and delete this pragma {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} fourmolu-0.18.0.0/data/examples/other/overly-indented-out.hs0000644000000000000000000000031614745250261022123 0ustar0000000000000000tagCloudField :: -- | Destination key String -> -- | Smallest font size, in percent Double -> -- | Biggest font size, in percent Double -> -- | Input tags Tags -> -- | Context Context a fourmolu-0.18.0.0/data/examples/other/linear-arrows.hs0000644000000000000000000000037514745250261021000 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 fourmolu-0.18.0.0/data/examples/other/empty-forall-four-out.hs0000644000000000000000000000036414745250261022402 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 = () #-} fourmolu-0.18.0.0/data/examples/other/haddock-sections.hs0000644000000000000000000000007714745250261021434 0ustar0000000000000000-- $weird #anchor# -- -- Section 1 -- $normal -- -- Section 2 fourmolu-0.18.0.0/data/examples/other/trailing-whitespace-out.hs0000644000000000000000000000016714745250261022762 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 fourmolu-0.18.0.0/data/examples/other/empty-haddock-out.hs0000644000000000000000000000007414745250261021545 0ustar0000000000000000module Test ( test, ) where test :: test data T = T fourmolu-0.18.0.0/data/examples/other/ascii-four-out.hs0000644000000000000000000000037614745250261021062 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} fourmolu-0.18.0.0/data/examples/other/comment-style-transform.hs0000644000000000000000000000040014745250261023011 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 fourmolu-0.18.0.0/data/examples/other/multiline-comments-reindent.hs0000644000000000000000000000021114745250261023633 0ustar0000000000000000 {- And so here we have a multiline comment. Indeed. -} fourmolu-0.18.0.0/data/examples/other/comment-style-transform-out.hs0000644000000000000000000000043214745250261023623 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 fourmolu-0.18.0.0/data/examples/other/pragma.hs0000644000000000000000000000055014745250261017455 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 fourmolu-0.18.0.0/data/examples/other/comment-following-preceding-gap-out.hs0000644000000000000000000000011514745250261025153 0ustar0000000000000000foo = bar where baz = return (quux) -- Foo -- Bar meme = gege fourmolu-0.18.0.0/data/examples/other/pragma-out.hs0000644000000000000000000000053414745250261020264 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 fourmolu-0.18.0.0/data/examples/other/comment-alignment.hs0000644000000000000000000000014214745250261021621 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> a -- ^ Something -- | Bar. bar :: a fourmolu-0.18.0.0/data/examples/other/invalid-haddock-weird-out.hs0000644000000000000000000000006714745250261023147 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- \|# ${ fourmolu-0.18.0.0/data/examples/other/inline-comment-0-four-out.hs0000644000000000000000000000004014745250261023031 0ustar0000000000000000x = ({-a-} b, c) y = ({-a-} b) fourmolu-0.18.0.0/data/examples/other/pragma-sorting.hs0000644000000000000000000000055114745250261021141 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 fourmolu-0.18.0.0/data/examples/other/comment-glued-together-four-out.hs0000644000000000000000000000011314745250261024336 0ustar0000000000000000module Main (main) where -- | Foo. -- Bar main :: IO () main = return () fourmolu-0.18.0.0/data/examples/other/argument-comment.hs0000644000000000000000000000021314745250261021464 0ustar0000000000000000foo :: Int -- ^ Documentation -> Bool foo _ = True foo :: Foo a => Int -- ^ Foo -> Int foo :: Foo a => Int -- ^ Foo -> Int fourmolu-0.18.0.0/data/examples/other/pragma-comments-after-out.hs0000644000000000000000000000023314745250261023202 0ustar0000000000000000{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ConstraintKinds #-} -- TODO: Fix and delete this pragma {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} fourmolu-0.18.0.0/data/examples/other/invalid-haddock-1.hs0000644000000000000000000000025414745250261021366 0ustar0000000000000000test = undefined where a :: -- ** foo Int -> -- | misplaced -- blablabla Int -- |misplaced -- blablabla a = undefined fourmolu-0.18.0.0/data/examples/other/comment-before-hanging-out.hs0000644000000000000000000000005314745250261023324 0ustar0000000000000000x = Just -- comment do foo bar fourmolu-0.18.0.0/data/examples/other/haddock-sections-four-out.hs0000644000000000000000000000007314745250261023206 0ustar0000000000000000{- $weird #anchor# Section 1 -} {- $normal Section 2 -} fourmolu-0.18.0.0/data/examples/other/comment-empty-let-out.hs0000644000000000000000000000005414745250261022372 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 fourmolu-0.18.0.0/data/examples/other/following-comment-last-1-four-out.hs0000644000000000000000000000015614745250261024525 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more fourmolu-0.18.0.0/data/examples/other/consequetive-pipe-comments.hs0000644000000000000000000000007414745250261023477 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 fourmolu-0.18.0.0/data/examples/other/necessary-brackets-four-out.hs0000644000000000000000000000024214745250261023552 0ustar0000000000000000insertEmDash = Text.concat . map \case { x | x == "--" -> "—"; x -> x } . Text.groupBy ((==) `on` Char.isSpace) foo f a b c = f do { a } + f do { b } + f do c fourmolu-0.18.0.0/data/examples/other/pragma-no-header-out.hs0000644000000000000000000000012514745250261022120 0ustar0000000000000000{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} fourmolu-0.18.0.0/data/examples/other/haddock-sections-out.hs0000644000000000000000000000007714745250261022241 0ustar0000000000000000-- $weird #anchor# -- -- Section 1 -- $normal -- -- Section 2 fourmolu-0.18.0.0/data/examples/other/following-comment-last-0-four-out.hs0000644000000000000000000000012114745250261024514 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. fourmolu-0.18.0.0/data/examples/other/invalid-haddock-double-trigger-out.hs0000644000000000000000000000025714745250261024751 0ustar0000000000000000test = foo -- \|| Invalid haddock, with double trigger -- \|| second line + bar -- \||Invalid haddock 2, with double trigger -- \||second line + baz fourmolu-0.18.0.0/data/examples/other/multiline-comments-reindent-four-out.hs0000644000000000000000000000010314745250261025411 0ustar0000000000000000{- And so here we have a multiline comment. Indeed. -} fourmolu-0.18.0.0/data/examples/other/comment-glued-together-out.hs0000644000000000000000000000011314745250261023365 0ustar0000000000000000module Main (main) where -- | Foo. -- Bar main :: IO () main = return () fourmolu-0.18.0.0/data/examples/other/multiline-comments-reindent-out.hs0000644000000000000000000000010314745250261024440 0ustar0000000000000000{- And so here we have a multiline comment. Indeed. -} fourmolu-0.18.0.0/data/examples/other/multiple-blank-line-comment.hs0000644000000000000000000000012414745250261023510 0ustar0000000000000000module A where a = b [ f {-, -} ] fourmolu-0.18.0.0/data/examples/other/multiple-blank-line-comment-out.hs0000644000000000000000000000013114745250261024313 0ustar0000000000000000module A where a = b [ f {-, -} ] fourmolu-0.18.0.0/data/examples/other/comment-alignment-four-out.hs0000644000000000000000000000016714745250261023406 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> -- | Something a -- | Bar. bar :: a fourmolu-0.18.0.0/data/examples/other/following-comment-last-3.hs0000644000000000000000000000015014745250261022743 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. -- even on second line fourmolu-0.18.0.0/data/examples/other/comment-two-blocks-four-out.hs0000644000000000000000000000020014745250261023500 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in [ "Control" * "Monad" -- Foo -- Bar ] fourmolu-0.18.0.0/data/examples/other/multiline-forall.hs0000644000000000000000000000122714745250261021467 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) = () #-} fourmolu-0.18.0.0/data/examples/other/comment-after-preceding-haddock-out.hs0000644000000000000000000000013414745250261025103 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b fourmolu-0.18.0.0/data/examples/other/following-comment-last-0.hs0000644000000000000000000000012114745250261022736 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. fourmolu-0.18.0.0/data/examples/other/comment-empty-let.hs0000644000000000000000000000005414745250261021565 0ustar0000000000000000foo = let in 10 -- a comment bar = 20 fourmolu-0.18.0.0/data/examples/other/following-comment-last-3-four-out.hs0000644000000000000000000000015014745250261024521 0ustar0000000000000000module Main where -- | Another datatype... data D' {- ^ ...with two docstrings. even on second line -} fourmolu-0.18.0.0/data/examples/other/invalid-haddock-double-trigger-four-out.hs0000644000000000000000000000031114745250261025711 0ustar0000000000000000test = foo -- \|| Invalid haddock, with double trigger -- \|| second line + bar -- \||Invalid haddock 2, with double trigger -- \||second line + baz fourmolu-0.18.0.0/data/examples/other/comment-before-hanging-four-out.hs0000644000000000000000000000006714745250261024302 0ustar0000000000000000x = Just -- comment do foo bar fourmolu-0.18.0.0/data/examples/other/inline-comment-0.hs0000644000000000000000000000003614745250261021260 0ustar0000000000000000x = ({-a-}b, c) y = ({-a-}b) fourmolu-0.18.0.0/data/examples/other/overly-indented.hs0000644000000000000000000000050114745250261021312 0ustar0000000000000000tagCloudField :: String -- ^ Destination key -> Double -- ^ Smallest font size, in percent -> Double -- ^ Biggest font size, in percent -> Tags -- ^ Input tags -> Context a -- ^ Context fourmolu-0.18.0.0/data/examples/other/necessary-brackets.hs0000644000000000000000000000023714745250261022000 0ustar0000000000000000insertEmDash = Text.concat . map \case{ x | x == "--" -> "—"; x -> x } . Text.groupBy ((==) `on` Char.isSpace) foo f a b c = f do {a} + f do {b} + f do {c} fourmolu-0.18.0.0/data/examples/other/comment-multiline-after-four-out.hs0000644000000000000000000000012514745250261024523 0ustar0000000000000000foo :: -- | start index Int -> -- | length Int -> t a -> t a fourmolu-0.18.0.0/data/examples/other/inline-comment-1.hs0000644000000000000000000000054414745250261021265 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 fourmolu-0.18.0.0/data/examples/other/comment-two-blocks-out.hs0000644000000000000000000000016614745250261022542 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in [ "Control" * "Monad" -- Foo -- Bar ] fourmolu-0.18.0.0/data/examples/other/invalid-haddock-1-four-out.hs0000644000000000000000000000026514745250261023146 0ustar0000000000000000test = undefined where a :: -- \** foo Int -> -- \| misplaced -- blablabla Int -- \|misplaced -- blablabla a = undefined fourmolu-0.18.0.0/data/examples/other/invalid-haddock-2-four-out.hs0000644000000000000000000000021014745250261023135 0ustar0000000000000000test = undefined where -- \| Comment -- 2nd invalid line a = undefined -- \| A multiline -- \| comment b = b fourmolu-0.18.0.0/data/examples/other/comment-after-preceding-haddock.hs0000644000000000000000000000013414745250261024276 0ustar0000000000000000module Main where -- | A -- B type D = E -- | This is 'f' -- * Comment f :: a -> b fourmolu-0.18.0.0/data/examples/other/empty-forall-out.hs0000644000000000000000000000035014745250261021424 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 = () #-} fourmolu-0.18.0.0/data/examples/other/comment-before-hanging.hs0000644000000000000000000000005314745250261022517 0ustar0000000000000000x = Just -- comment do foo bar fourmolu-0.18.0.0/data/examples/other/pragma-sorting-four-out.hs0000644000000000000000000000051514745250261022717 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 fourmolu-0.18.0.0/data/examples/other/argument-comment-four-out.hs0000644000000000000000000000025414745250261023247 0ustar0000000000000000foo :: -- | Documentation Int -> Bool foo _ = True foo :: (Foo a) => -- | Foo Int -> Int foo :: (Foo a) => -- | Foo Int -> Int fourmolu-0.18.0.0/data/examples/other/comment-alignment-out.hs0000644000000000000000000000014314745250261022427 0ustar0000000000000000class Foo a where -- | Foo. foo :: Int -> -- | Something a -- | Bar. bar :: a fourmolu-0.18.0.0/data/examples/other/jsffi-out.hs0000644000000000000000000000003714745250261020114 0ustar0000000000000000{-# LANGUAGE JavaScriptFFI #-} fourmolu-0.18.0.0/data/examples/other/multiline-forall-out.hs0000644000000000000000000000134114745250261022271 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) = () #-} fourmolu-0.18.0.0/data/examples/other/pragma-comments-four-out.hs0000644000000000000000000000037714745250261023065 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 fourmolu-0.18.0.0/data/examples/other/following-comment-last-1-out.hs0000644000000000000000000000015414745250261023552 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more fourmolu-0.18.0.0/data/examples/other/comment-spacing.hs0000644000000000000000000000012714745250261021272 0ustar0000000000000000-- |Something. foo :: -- |Foo. Int -> -- |Bar. IO () foo _ = pure () --comment fourmolu-0.18.0.0/data/examples/other/overly-indented-four-out.hs0000644000000000000000000000034214745250261023073 0ustar0000000000000000tagCloudField :: -- | Destination key String -> -- | Smallest font size, in percent Double -> -- | Biggest font size, in percent Double -> -- | Input tags Tags -> -- | Context Context a fourmolu-0.18.0.0/data/examples/other/comment-multiline-after-out.hs0000644000000000000000000000011114745250261023545 0ustar0000000000000000foo :: -- | start index Int -> -- | length Int -> t a -> t a fourmolu-0.18.0.0/data/examples/other/following-comment-last-2-four-out.hs0000644000000000000000000000016614745250261024527 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B fourmolu-0.18.0.0/data/examples/other/consequetive-pipe-comments-out.hs0000644000000000000000000000007314745250261024303 0ustar0000000000000000module Main where -- | Foo. -- | Bar. bar :: Int bar = 5 fourmolu-0.18.0.0/data/examples/other/comment-inside-construct-out.hs0000644000000000000000000000023314745250261023746 0ustar0000000000000000xs = [ outer list item, [ inner list first item, inner list second item -- inner list last item commented ], outer list item ] fourmolu-0.18.0.0/data/examples/other/comment-inside-construct-four-out.hs0000644000000000000000000000026214745250261024721 0ustar0000000000000000xs = [ outer list item , [ inner list first item , inner list second item -- inner list last item commented ] , outer list item ] fourmolu-0.18.0.0/data/examples/other/inline-comment-1-four-out.hs0000644000000000000000000000065214745250261023043 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 fourmolu-0.18.0.0/data/examples/other/invalid-haddock-weird.hs0000644000000000000000000000006514745250261022340 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} foo = foo -- |# ${ fourmolu-0.18.0.0/data/examples/other/trailing-whitespace-four-out.hs0000644000000000000000000000016714745250261023733 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 fourmolu-0.18.0.0/data/examples/other/pragma-no-header.hs0000644000000000000000000000014114745250261021311 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} {-# LANGuagE ViewPatterns #-} {-# language DataKinds, LambdaCase #-} fourmolu-0.18.0.0/data/examples/other/linear-arrows-four-out.hs0000644000000000000000000000042214745250261022547 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 fourmolu-0.18.0.0/data/examples/other/following-comment-last-0-out.hs0000644000000000000000000000012114745250261023543 0ustar0000000000000000module Main where -- | Another datatype... data D' -- ^ ...with two docstrings. fourmolu-0.18.0.0/data/examples/other/haddock-without-module-header.hs0000644000000000000000000000005114745250261024011 0ustar0000000000000000-- | Foo main = main -- | Bar data Bar fourmolu-0.18.0.0/data/examples/other/comment-style-transform-four-out.hs0000644000000000000000000000037614745250261024603 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 fourmolu-0.18.0.0/data/examples/other/comment-two-blocks.hs0000644000000000000000000000017014745250261021730 0ustar0000000000000000newNames :: [(String, String)] newNames = let (*) = flip (,) in ["Control" * "Monad" -- Foo -- Bar ] fourmolu-0.18.0.0/data/examples/other/comment-trailing-space.hs0000644000000000000000000000012314745250261022544 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A fourmolu-0.18.0.0/data/examples/other/ascii-out.hs0000644000000000000000000000037614745250261020111 0ustar0000000000000000{- ----------------------------------- < What about ASCII art in comments? > ----------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -} fourmolu-0.18.0.0/data/examples/other/argument-comment-out.hs0000644000000000000000000000022614745250261022275 0ustar0000000000000000foo :: -- | Documentation Int -> Bool foo _ = True foo :: (Foo a) => -- | Foo Int -> Int foo :: (Foo a) => -- | Foo Int -> Int fourmolu-0.18.0.0/data/examples/other/invalid-haddock-1-out.hs0000644000000000000000000000025314745250261022172 0ustar0000000000000000test = undefined where a :: -- \** foo Int -> -- \| misplaced -- blablabla Int -- \|misplaced -- blablabla a = undefined fourmolu-0.18.0.0/data/examples/other/comment-spacing-out.hs0000644000000000000000000000013314745250261022074 0ustar0000000000000000-- | Something. foo :: -- | Foo. Int -> -- | Bar. IO () foo _ = pure () -- comment fourmolu-0.18.0.0/data/examples/other/linear-arrows-out.hs0000644000000000000000000000040314745250261021575 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 fourmolu-0.18.0.0/data/examples/other/trailing-whitespace.hs0000644000000000000000000000020114745250261022142 0ustar0000000000000000-- Here is a comment with trailing whitespace. foo = 5 {- Block comment with trailing whitespace. Bo. -} bar = 6 fourmolu-0.18.0.0/data/examples/other/multiple-blank-line-comment-four-out.hs0000644000000000000000000000015314745250261025270 0ustar0000000000000000module A where a = b [ f {-, -} ] fourmolu-0.18.0.0/data/examples/other/merging-comments-four-out.hs0000644000000000000000000000041614745250261023240 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 fourmolu-0.18.0.0/data/examples/other/following-comment-last-2.hs0000644000000000000000000000016414745250261022747 0ustar0000000000000000module Main where -- | Another datatype... data D' deriving (Show) -- ^ ...with two docstrings. -- more data B fourmolu-0.18.0.0/data/examples/other/comment-trailing-space-four-out.hs0000644000000000000000000000013514745250261024325 0ustar0000000000000000data T = {- some multi-line comment with empty lines -} A fourmolu-0.18.0.0/data/examples/other/inline-comment-0-out.hs0000644000000000000000000000004014745250261022060 0ustar0000000000000000x = ({-a-} b, c) y = ({-a-} b) fourmolu-0.18.0.0/data/examples/other/inline-comment-1-out.hs0000644000000000000000000000056614745250261022076 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 fourmolu-0.18.0.0/data/examples/other/jsffi-four-out.hs0000644000000000000000000000003714745250261021065 0ustar0000000000000000{-# LANGUAGE JavaScriptFFI #-} fourmolu-0.18.0.0/data/examples/other/disabling/line-pragma-in-disabled-region-four-out.hs0000644000000000000000000000023414745250261027545 0ustar0000000000000000module Foo (foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/preserve-trailing-whitespace-out.hs0000644000000000000000000000007414745250261026544 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/suffix-comment-out.hs0000644000000000000000000000003414745250261023710 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo fourmolu-0.18.0.0/data/examples/other/disabling/single-definition-out.hs0000644000000000000000000000023114745250261024352 0ustar0000000000000000module Foo (foo, bar) where {- ORMOLU_DISABLE -} foo :: Int -> Int foo = (+5) {- ORMOLU_ENABLE -} bar :: Bool -> Bool bar True = True bar False = True fourmolu-0.18.0.0/data/examples/other/disabling/closing-comment-in-disabled-region-four-out.hs0000644000000000000000000000004614745250261030450 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" fourmolu-0.18.0.0/data/examples/other/disabling/line-pragma-in-disabled-region.hs0000644000000000000000000000023414745250261025767 0ustar0000000000000000module Foo(foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/line-pragma-in-disabled-region-out.hs0000644000000000000000000000023414745250261026574 0ustar0000000000000000module Foo (foo) where {- ORMOLU_DISABLE -} foo= {-# LINE 11 "Abc.hs" #-} this . line $ ((is automatically generated) Haskell<>code) {- ORMOLU_ENABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/preserve-empty-lines-four-out.hs0000644000000000000000000000014514745250261026017 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 fourmolu-0.18.0.0/data/examples/other/disabling/preserve-trailing-whitespace.hs0000644000000000000000000000007614745250261025741 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/single-definition-four-out.hs0000644000000000000000000000023114745250261025323 0ustar0000000000000000module Foo (foo, bar) where {- ORMOLU_DISABLE -} foo :: Int -> Int foo = (+5) {- ORMOLU_ENABLE -} bar :: Bool -> Bool bar True = True bar False = True fourmolu-0.18.0.0/data/examples/other/disabling/preserve-trailing-whitespace-four-out.hs0000644000000000000000000000007414745250261027515 0ustar0000000000000000foo = 2 {- ORMOLU_DISABLE -} bar = 3 {- ORMOLU_ENABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/suffix-comment.hs0000644000000000000000000000003414745250261023103 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo fourmolu-0.18.0.0/data/examples/other/disabling/empty-disabled-region.hs0000644000000000000000000000016714745250261024332 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/whole-file.hs0000644000000000000000000000021514745250261022173 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True fourmolu-0.18.0.0/data/examples/other/disabling/preserve-empty-lines.hs0000644000000000000000000000014614745250261024242 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 fourmolu-0.18.0.0/data/examples/other/disabling/whole-file-out.hs0000644000000000000000000000020614745250261023000 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True fourmolu-0.18.0.0/data/examples/other/disabling/normalize-magic-comments-four-out.hs0000644000000000000000000000021114745250261026613 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE -} {-ORMOLU_ENABLE -} bar = baz {- ORMOLU_DISABLE -} baz=foo fourmolu-0.18.0.0/data/examples/other/disabling/whole-file-four-out.hs0000644000000000000000000000020614745250261023751 0ustar0000000000000000{- ORMOLU_DISABLE -} module Foo (foo,bar) where foo :: Int -> Int foo = (+5) bar :: Bool -> Bool bar True = True bar False = True fourmolu-0.18.0.0/data/examples/other/disabling/suffix-comment-four-out.hs0000644000000000000000000000003414745250261024661 0ustar0000000000000000{- ORMOLU_DISABLE -} -- foo fourmolu-0.18.0.0/data/examples/other/disabling/empty-disabled-region-out.hs0000644000000000000000000000016714745250261025137 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/preserve-empty-lines-out.hs0000644000000000000000000000014514745250261025046 0ustar0000000000000000{- ORMOLU_DISABLE -} bar :: Int bar = 2 baz :: Int baz = 3 {- ORMOLU_ENABLE -} foo :: Int foo = 1 fourmolu-0.18.0.0/data/examples/other/disabling/single-definition.hs0000644000000000000000000000023114745250261023545 0ustar0000000000000000module Foo (foo,bar) where {- ORMOLU_DISABLE -} foo :: Int -> Int foo = (+5) {- ORMOLU_ENABLE -} bar :: Bool -> Bool bar True = True bar False = True fourmolu-0.18.0.0/data/examples/other/disabling/empty-disabled-region-four-out.hs0000644000000000000000000000016714745250261026110 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} foo = 0 {- ORMOLU_DISABLE -} {- ORMOLU_ENABLE -} bar = 1 {- ORMOLU_DISABLE -} fourmolu-0.18.0.0/data/examples/other/disabling/closing-comment-in-disabled-region-out.hs0000644000000000000000000000004614745250261027477 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" fourmolu-0.18.0.0/data/examples/other/disabling/closing-comment-in-disabled-region.hs0000644000000000000000000000004614745250261026672 0ustar0000000000000000{- ORMOLU_DISABLE -} a::String a="-}" fourmolu-0.18.0.0/data/examples/other/disabling/normalize-magic-comments-out.hs0000644000000000000000000000021114745250261025642 0ustar0000000000000000{- ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE -} {-ORMOLU_ENABLE -} bar = baz {- ORMOLU_DISABLE -} baz=foo fourmolu-0.18.0.0/data/examples/other/disabling/normalize-magic-comments.hs0000644000000000000000000000022014745250261025035 0ustar0000000000000000 {-ORMOLU_DISABLE -} {- ORMOLU_DISABLE -} foo=bar {- ORMOLU_ENABLE-} {-ORMOLU_ENABLE -} bar=baz {- ORMOLU_DISABLE-} baz=foo fourmolu-0.18.0.0/data/examples/other/cpp/separation-2a-four-out.hs0000644000000000000000000000024014745250261023207 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif fourmolu-0.18.0.0/data/examples/other/cpp/shifted-four-out.hs0000644000000000000000000000121114745250261022167 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 } fourmolu-0.18.0.0/data/examples/other/cpp/separation-1b-four-out.hs0000644000000000000000000000064714745250261023222 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 fourmolu-0.18.0.0/data/examples/other/cpp/shifted.hs0000644000000000000000000000105414745250261020416 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 } fourmolu-0.18.0.0/data/examples/other/cpp/simple-import.hs0000644000000000000000000000040614745250261021571 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 () fourmolu-0.18.0.0/data/examples/other/cpp/separation-0b.hs0000644000000000000000000000030014745250261021425 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 fourmolu-0.18.0.0/data/examples/other/cpp/separation-1b-out.hs0000644000000000000000000000064114745250261022243 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 fourmolu-0.18.0.0/data/examples/other/cpp/lonely-hash-four-out.hs0000644000000000000000000000041014745250261022764 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 () fourmolu-0.18.0.0/data/examples/other/cpp/separation-2b.hs0000644000000000000000000000027414745250261021441 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 fourmolu-0.18.0.0/data/examples/other/cpp/shifted-out.hs0000644000000000000000000000110314745250261021216 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 } fourmolu-0.18.0.0/data/examples/other/cpp/separation-2a.hs0000644000000000000000000000024014745250261021431 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif fourmolu-0.18.0.0/data/examples/other/cpp/separation-2b-out.hs0000644000000000000000000000027414745250261022246 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 fourmolu-0.18.0.0/data/examples/other/cpp/separation-0a.hs0000644000000000000000000000024414745250261021433 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 fourmolu-0.18.0.0/data/examples/other/cpp/separation-0b-four-out.hs0000644000000000000000000000030514745250261023210 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 fourmolu-0.18.0.0/data/examples/other/cpp/lonely-hash.hs0000644000000000000000000000041014745250261021206 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 () fourmolu-0.18.0.0/data/examples/other/cpp/cpp-and-imports-four-out.hs0000644000000000000000000000013314745250261023560 0ustar0000000000000000{-# LANGUAGE CPP #-} module Bug where #ifdef flag constant :: Int constant = 1312 #endif fourmolu-0.18.0.0/data/examples/other/cpp/separation-2a-out.hs0000644000000000000000000000024014745250261022236 0ustar0000000000000000{-# LANGUAGE CPP #-} ffff, ffffffff :: Natural #ifdef HASKELL_ZIP_DEV_MODE ffff = 200 ffffffff = 5000 #else ffff = 0xffff ffffffff = 0xffffffff #endif fourmolu-0.18.0.0/data/examples/other/cpp/separation-1b.hs0000644000000000000000000000064314745250261021440 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 fourmolu-0.18.0.0/data/examples/other/cpp/continuation-out.hs0000644000000000000000000000021014745250261022300 0ustar0000000000000000{-# LANGUAGE CPP #-} foo :: Int foo = 5 #define message_for(a, b) \ printf(#a " and " #b ": We love you!\n") bar :: Int bar = 6 fourmolu-0.18.0.0/data/examples/other/cpp/separation-1a-out.hs0000644000000000000000000000060514745250261022242 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 fourmolu-0.18.0.0/data/examples/other/cpp/cpp-and-imports.hs0000644000000000000000000000013314745250261022002 0ustar0000000000000000{-# LANGUAGE CPP #-} module Bug where #ifdef flag constant :: Int constant = 1312 #endif fourmolu-0.18.0.0/data/examples/other/cpp/separation-1a.hs0000644000000000000000000000060714745250261021437 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 fourmolu-0.18.0.0/data/examples/other/cpp/continuation.hs0000644000000000000000000000021014745250261021473 0ustar0000000000000000{-# LANGUAGE CPP #-} foo :: Int foo = 5 #define message_for(a, b) \ printf(#a " and " #b ": We love you!\n") bar :: Int bar = 6 fourmolu-0.18.0.0/data/examples/other/cpp/simple-import-out.hs0000644000000000000000000000040614745250261022376 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 () fourmolu-0.18.0.0/data/examples/other/cpp/lonely-hash-out.hs0000644000000000000000000000041014745250261022013 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 () fourmolu-0.18.0.0/data/examples/other/cpp/simple-import-four-out.hs0000644000000000000000000000040614745250261023347 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 () fourmolu-0.18.0.0/data/examples/other/cpp/separation-1a-four-out.hs0000644000000000000000000000061314745250261023212 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 fourmolu-0.18.0.0/data/examples/other/cpp/separation-0a-out.hs0000644000000000000000000000024514745250261022241 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 fourmolu-0.18.0.0/data/examples/other/cpp/separation-2b-four-out.hs0000644000000000000000000000027414745250261023217 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 fourmolu-0.18.0.0/data/examples/other/cpp/separation-0b-out.hs0000644000000000000000000000030114745250261022233 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 fourmolu-0.18.0.0/data/examples/other/cpp/continuation-four-out.hs0000644000000000000000000000021014745250261023251 0ustar0000000000000000{-# LANGUAGE CPP #-} foo :: Int foo = 5 #define message_for(a, b) \ printf(#a " and " #b ": We love you!\n") bar :: Int bar = 6 fourmolu-0.18.0.0/data/examples/other/cpp/separation-0a-four-out.hs0000644000000000000000000000025114745250261023207 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 fourmolu-0.18.0.0/data/examples/other/cpp/cpp-and-imports-out.hs0000644000000000000000000000013314745250261022607 0ustar0000000000000000{-# LANGUAGE CPP #-} module Bug where #ifdef flag constant :: Int constant = 1312 #endif fourmolu-0.18.0.0/data/examples/module-header/preceding-comment-with-haddock-out.hs0000644000000000000000000000014414745250261026350 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () fourmolu-0.18.0.0/data/examples/module-header/simple.hs0000644000000000000000000000002214745250261021063 0ustar0000000000000000module Main where fourmolu-0.18.0.0/data/examples/module-header/multiline-empty-comment.hs0000644000000000000000000000005014745250261024371 0ustar0000000000000000module Foo ( -- test ) where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma.hs0000644000000000000000000000010314745250261022504 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where fourmolu-0.18.0.0/data/examples/module-header/empty-haddock.hs0000644000000000000000000000003214745250261022324 0ustar0000000000000000-- | -- module Test where fourmolu-0.18.0.0/data/examples/module-header/singleline.hs0000644000000000000000000000004314745250261021726 0ustar0000000000000000module Foo ( foo, bar, baz ) where fourmolu-0.18.0.0/data/examples/module-header/shebang.hs0000644000000000000000000000013014745250261021201 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" fourmolu-0.18.0.0/data/examples/module-header/multiline-empty-out.hs0000644000000000000000000000003114745250261023535 0ustar0000000000000000module Foo ( ) where fourmolu-0.18.0.0/data/examples/module-header/leading-empty-line.hs0000644000000000000000000000052514745250261023266 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 fourmolu-0.18.0.0/data/examples/module-header/stack-header-0-four-out.hs0000644000000000000000000000013714745250261024047 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-multiline-four-out.hs0000644000000000000000000000014414745250261026267 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah fourmolu-0.18.0.0/data/examples/module-header/multiline2-out.hs0000644000000000000000000000006014745250261022465 0ustar0000000000000000module Foo ( foo, bar, baz, ) where fourmolu-0.18.0.0/data/examples/module-header/shebang-four-out.hs0000644000000000000000000000013014745250261022757 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" fourmolu-0.18.0.0/data/examples/module-header/multiline2.hs0000644000000000000000000000004414745250261021662 0ustar0000000000000000module Foo ( foo, bar, baz) where fourmolu-0.18.0.0/data/examples/module-header/preceding-comment-with-haddock.hs0000644000000000000000000000014414745250261025543 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () fourmolu-0.18.0.0/data/examples/module-header/double-shebangs-four-out.hs0000644000000000000000000000005214745250261024415 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack fourmolu-0.18.0.0/data/examples/module-header/named-section-four-out.hs0000644000000000000000000000021414745250261024101 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo, bar, ) where {- $explanation Here it goes. -} fourmolu-0.18.0.0/data/examples/module-header/double-shebangs.hs0000644000000000000000000000005214745250261022637 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack fourmolu-0.18.0.0/data/examples/module-header/simple-with-comments.hs0000644000000000000000000000005514745250261023665 0ustar0000000000000000-- | Here we go. module Main where -- Wow. fourmolu-0.18.0.0/data/examples/module-header/shebang-with-pragmas-out.hs0000644000000000000000000000011114745250261024406 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () fourmolu-0.18.0.0/data/examples/module-header/double-dot-with-names.hs0000644000000000000000000000032014745250261023703 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 fourmolu-0.18.0.0/data/examples/module-header/named-section.hs0000644000000000000000000000021414745250261022323 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo , bar ) where -- $explanation -- -- Here it goes. fourmolu-0.18.0.0/data/examples/module-header/multiline-empty-comment-four-out.hs0000644000000000000000000000003614745250261026153 0ustar0000000000000000module Foo ( -- test ) where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-out.hs0000644000000000000000000000011314745250261023312 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-list-multiline.hs0000644000000000000000000000020614745250261025461 0ustar0000000000000000module Test {-# DEPRECATED ["This module is deprecated.", "Please use OtherModule instead." ]#-} ( foo , bar , baz ) where fourmolu-0.18.0.0/data/examples/module-header/empty-haddock-four-out.hs0000644000000000000000000000002214745250261024101 0ustar0000000000000000module Test where fourmolu-0.18.0.0/data/examples/module-header/leading-empty-line-four-out.hs0000644000000000000000000000047614745250261025051 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 fourmolu-0.18.0.0/data/examples/module-header/named-section-out.hs0000644000000000000000000000021614745250261023132 0ustar0000000000000000module Magic ( -- * Something -- $explanation -- ** Another level foo, bar, ) where -- $explanation -- -- Here it goes. fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-singleton-list-four-out.hs0000644000000000000000000000010014745250261027230 0ustar0000000000000000module Test {-# WARNING "There's only one line here." #-} where fourmolu-0.18.0.0/data/examples/module-header/double-shebangs-out.hs0000644000000000000000000000005214745250261023444 0ustar0000000000000000#!/usr/bin/env stack #!/usr/bin/env stack fourmolu-0.18.0.0/data/examples/module-header/empty-haddock-out.hs0000644000000000000000000000002214745250261023130 0ustar0000000000000000module Test where fourmolu-0.18.0.0/data/examples/module-header/stack-header-2-four-out.hs0000644000000000000000000000030614745250261024047 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 () fourmolu-0.18.0.0/data/examples/module-header/multiline-empty-four-out.hs0000644000000000000000000000002614745250261024512 0ustar0000000000000000module Foo ( ) where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-multiline-out.hs0000644000000000000000000000014014745250261025312 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah fourmolu-0.18.0.0/data/examples/module-header/multiline-four-out.hs0000644000000000000000000000006014745250261023354 0ustar0000000000000000module Foo ( foo, bar, baz, ) where fourmolu-0.18.0.0/data/examples/module-header/leading-empty-line-out.hs0000644000000000000000000000052514745250261024073 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 fourmolu-0.18.0.0/data/examples/module-header/double-dot-with-names-out.hs0000644000000000000000000000032514745250261024515 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 fourmolu-0.18.0.0/data/examples/module-header/shebang-with-pragmas.hs0000644000000000000000000000011114745250261023601 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () fourmolu-0.18.0.0/data/examples/module-header/stack-header-1-four-out.hs0000644000000000000000000000016414745250261024050 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell fourmolu-0.18.0.0/data/examples/module-header/singleline-out.hs0000644000000000000000000000004114745250261022531 0ustar0000000000000000module Foo (foo, bar, baz) where fourmolu-0.18.0.0/data/examples/module-header/multiline-empty-comment-out.hs0000644000000000000000000000004114745250261025176 0ustar0000000000000000module Foo ( -- test ) where fourmolu-0.18.0.0/data/examples/module-header/simple-with-comments-four-out.hs0000644000000000000000000000005414745250261025442 0ustar0000000000000000-- | Here we go. module Main where -- Wow. fourmolu-0.18.0.0/data/examples/module-header/preceding-comment-with-haddock-four-out.hs0000644000000000000000000000014414745250261027321 0ustar0000000000000000{- Here we go. -} -- | This is the module's Haddock. module Main (main) where main = return () fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-four-out.hs0000644000000000000000000000012514745250261024266 0ustar0000000000000000module Test {-# WARNING "This module is very internal" #-} where fourmolu-0.18.0.0/data/examples/module-header/simple-with-comments-out.hs0000644000000000000000000000005414745250261024471 0ustar0000000000000000-- | Here we go. module Main where -- Wow. fourmolu-0.18.0.0/data/examples/module-header/multiline-out.hs0000644000000000000000000000006014745250261022403 0ustar0000000000000000module Foo ( foo, bar, baz, ) where fourmolu-0.18.0.0/data/examples/module-header/multiline-with-comments.hs0000644000000000000000000000055014745250261024376 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 fourmolu-0.18.0.0/data/examples/module-header/singleline-empty-four-out.hs0000644000000000000000000000006214745250261024641 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where fourmolu-0.18.0.0/data/examples/module-header/empty-out.hs0000644000000000000000000000000014745250261021531 0ustar0000000000000000fourmolu-0.18.0.0/data/examples/module-header/shebang-out.hs0000644000000000000000000000013014745250261022006 0ustar0000000000000000#! /usr/bin/env runhaskell import Prelude main :: IO () main = putStrLn "hello world" fourmolu-0.18.0.0/data/examples/module-header/multiline2-four-out.hs0000644000000000000000000000006014745250261023436 0ustar0000000000000000module Foo ( foo, bar, baz, ) where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-list-multiline-out.hs0000644000000000000000000000023414745250261026267 0ustar0000000000000000module Test {-# DEPRECATED [ "This module is deprecated.", "Please use OtherModule instead." ] #-} ( foo, bar, baz, ) where fourmolu-0.18.0.0/data/examples/module-header/stack-header-1.hs0000644000000000000000000000016114745250261022267 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell fourmolu-0.18.0.0/data/examples/module-header/singleline-empty-out.hs0000644000000000000000000000006214745250261023670 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-list-multiline-four-out.hs0000644000000000000000000000025514745250261027243 0ustar0000000000000000module Test {-# DEPRECATED [ "This module is deprecated." , "Please use OtherModule instead." ] #-} ( foo, bar, baz, ) where fourmolu-0.18.0.0/data/examples/module-header/multiline-empty.hs0000644000000000000000000000004014745250261022730 0ustar0000000000000000module Foo ( ) where fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-multiline.hs0000644000000000000000000000013614745250261024512 0ustar0000000000000000module Test {-# DEPRECATED "This module is unstable" #-} (foo, bar, baz) where import Blah fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-singleton-list.hs0000644000000000000000000000010614745250261025460 0ustar0000000000000000module Test {-# WArnING ["There's only one line here."] #-} where fourmolu-0.18.0.0/data/examples/module-header/simple-out.hs0000644000000000000000000000002214745250261021670 0ustar0000000000000000module Main where fourmolu-0.18.0.0/data/examples/module-header/empty.hs0000644000000000000000000000000014745250261020724 0ustar0000000000000000fourmolu-0.18.0.0/data/examples/module-header/multiline-with-comments-out.hs0000644000000000000000000000054314745250261025205 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 fourmolu-0.18.0.0/data/examples/module-header/shebang-with-pragmas-four-out.hs0000644000000000000000000000011114745250261025357 0ustar0000000000000000#!/usr/bin/env stack {-# LANGUAGE OverloadedStrings #-} main = pure () fourmolu-0.18.0.0/data/examples/module-header/multiline.hs0000644000000000000000000000004414745250261021600 0ustar0000000000000000module Foo ( foo, bar, baz) where fourmolu-0.18.0.0/data/examples/module-header/multiline-with-comments-four-out.hs0000644000000000000000000000054314745250261026156 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 fourmolu-0.18.0.0/data/examples/module-header/singleline-four-out.hs0000644000000000000000000000004114745250261023502 0ustar0000000000000000module Foo (foo, bar, baz) where fourmolu-0.18.0.0/data/examples/module-header/double-dot-with-names-four-out.hs0000644000000000000000000000032514745250261025466 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 fourmolu-0.18.0.0/data/examples/module-header/stack-header-2-out.hs0000644000000000000000000000030614745250261023076 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 () fourmolu-0.18.0.0/data/examples/module-header/stack-header-2.hs0000644000000000000000000000030614745250261022271 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 () fourmolu-0.18.0.0/data/examples/module-header/singleline-empty.hs0000644000000000000000000000006214745250261023063 0ustar0000000000000000-- | This demonstrates a BUG. module Foo () where fourmolu-0.18.0.0/data/examples/module-header/stack-header-0.hs0000644000000000000000000000013414745250261022266 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell fourmolu-0.18.0.0/data/examples/module-header/stack-header-1-out.hs0000644000000000000000000000016414745250261023077 0ustar0000000000000000#!/usr/bin/env stack -- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell fourmolu-0.18.0.0/data/examples/module-header/empty-four-out.hs0000644000000000000000000000000014745250261022502 0ustar0000000000000000fourmolu-0.18.0.0/data/examples/module-header/simple-four-out.hs0000644000000000000000000000002214745250261022641 0ustar0000000000000000module Main where fourmolu-0.18.0.0/data/examples/module-header/stack-header-0-out.hs0000644000000000000000000000013714745250261023076 0ustar0000000000000000-- stack runhaskell {-# LANGUAGE OverloadedStrings #-} main = return () -- stack runhaskell fourmolu-0.18.0.0/data/examples/module-header/warning-pragma-singleton-list-out.hs0000644000000000000000000000010014745250261026257 0ustar0000000000000000module Test {-# WARNING "There's only one line here." #-} where fourmolu-0.18.0.0/data/examples/import/sorted-export-list-four-out.hs0000644000000000000000000000006114745250261023742 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) fourmolu-0.18.0.0/data/examples/import/deprecated-export-single-line.hs0000644000000000000000000000007414745250261024223 0ustar0000000000000000module A ( {-# DEPRECATED "blah" #-} x ) where { x = True } fourmolu-0.18.0.0/data/examples/import/simple.hs0000644000000000000000000000035514745250261017673 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) fourmolu-0.18.0.0/data/examples/import/docstrings-after-exports.hs0000644000000000000000000000042314745250261023356 0ustar0000000000000000module Test ( since1, -- ^ @since 1.0 since2 -- ^ @since 2.0 , since3 -- ^ @since 3.0 , SinceType(..) -- ^ @since 4.0 , SinceClass(..) -- ^ @since 5.0 , Multi(..) -- ^ since 6.0 -- multi -- line ) where fourmolu-0.18.0.0/data/examples/import/sorted-package-imports-out.hs0000644000000000000000000000020214745250261023562 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import D import "a" Ab import "b" Aa import "b" Bb import "c" Ba import "zzzz" Z import "this" Y fourmolu-0.18.0.0/data/examples/import/merging-0.hs0000644000000000000000000000007514745250261020166 0ustar0000000000000000import Foo import Foo (foo) import Foo (bar) import Foo as F fourmolu-0.18.0.0/data/examples/import/sorted-export-list-out.hs0000644000000000000000000000006114745250261022771 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) fourmolu-0.18.0.0/data/examples/import/deprecated-export-multi-line.hs0000644000000000000000000000021014745250261024064 0ustar0000000000000000module X ( {-# DEPRECATE D(D1) "D1 will not be exposed in a version 0.2 and later" #-} D(D1, D2) ) where data D = D1 | D2 fourmolu-0.18.0.0/data/examples/import/merging-1.hs0000644000000000000000000000010514745250261020161 0ustar0000000000000000import "foo" Foo (foo) import "bar" Foo (bar) import "foo" Foo (baz) fourmolu-0.18.0.0/data/examples/import/explicit-imports-with-comments-four-out.hs0000644000000000000000000000014514745250261026265 0ustar0000000000000000import qualified MegaModule as M ( -- (1) -- (2) Either, -- (3) (<<<), (>>>), ) fourmolu-0.18.0.0/data/examples/import/deduplication-bug.hs0000644000000000000000000000031514745250261021775 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(..)) fourmolu-0.18.0.0/data/examples/import/qualified-post-four-out.hs0000644000000000000000000000022714745250261023104 0ustar0000000000000000{-# LANGUAGE ImportQualifiedPost #-} import Data.Text qualified (a, b, c) import Data.Text qualified hiding (a, b, c) import Data.Text qualified as T fourmolu-0.18.0.0/data/examples/import/deprecated-export-single-line-out.hs0000644000000000000000000000006714745250261025032 0ustar0000000000000000module A ({-# DEPRECATED "blah" #-} x) where x = True fourmolu-0.18.0.0/data/examples/import/qualified-post-out.hs0000644000000000000000000000022714745250261022133 0ustar0000000000000000{-# LANGUAGE ImportQualifiedPost #-} import Data.Text qualified (a, b, c) import Data.Text qualified hiding (a, b, c) import Data.Text qualified as T fourmolu-0.18.0.0/data/examples/import/explicit-imports.hs0000644000000000000000000000023614745250261021714 0ustar0000000000000000import qualified MegaModule as M ((>>>), MonadBaseControl, void, MaybeT(..), join, Maybe(Nothing, Just), liftIO, Either, (<<<), Monad(return, (>>=), (>>))) fourmolu-0.18.0.0/data/examples/import/sorted-package-imports-four-out.hs0000644000000000000000000000020314745250261024534 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import D import "a" Ab import "b" Aa import "b" Bb import "c" Ba import "zzzz" Z import "this" Y fourmolu-0.18.0.0/data/examples/import/qualified-prelude.hs0000644000000000000000000000011114745250261021771 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude fourmolu-0.18.0.0/data/examples/import/sorted.hs0000644000000000000000000000003314745250261017673 0ustar0000000000000000import B import A import C fourmolu-0.18.0.0/data/examples/import/deprecated-export-multi-line-four-out.hs0000644000000000000000000000020514745250261025646 0ustar0000000000000000module X ( {-# DEPRECATE D(D1) "D1 will not be exposed in a version 0.2 and later" #-} D (D1, D2), ) where data D = D1 | D2 fourmolu-0.18.0.0/data/examples/import/qualified-prelude-out.hs0000644000000000000000000000011114745250261022576 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude fourmolu-0.18.0.0/data/examples/import/merging-1-out.hs0000644000000000000000000000006314745250261020771 0ustar0000000000000000import "bar" Foo (bar) import "foo" Foo (baz, foo) fourmolu-0.18.0.0/data/examples/import/explicit-imports-with-comments-out.hs0000644000000000000000000000014414745250261025313 0ustar0000000000000000import qualified MegaModule as M ( -- (1) -- (2) Either, -- (3) (<<<), (>>>), ) fourmolu-0.18.0.0/data/examples/import/explicit-imports-four-out.hs0000644000000000000000000000031314745250261023466 0ustar0000000000000000import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad (return, (>>), (>>=)), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) fourmolu-0.18.0.0/data/examples/import/comments-inside-imports-four-out.hs0000644000000000000000000000012214745250261024741 0ustar0000000000000000import -- x Foo import qualified -- x Bar import qualified -- x Baz fourmolu-0.18.0.0/data/examples/import/sorted-four-out.hs0000644000000000000000000000003314745250261021451 0ustar0000000000000000import A import B import C fourmolu-0.18.0.0/data/examples/import/merging-0-four-out.hs0000644000000000000000000000006114745250261021737 0ustar0000000000000000import Foo import Foo (bar, foo) import Foo as F fourmolu-0.18.0.0/data/examples/import/deduplication-bug-out.hs0000644000000000000000000000025014745250261022600 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 (..)) fourmolu-0.18.0.0/data/examples/import/merging-2-four-out.hs0000644000000000000000000000010114745250261021734 0ustar0000000000000000import Foo hiding (bar4, foo2) import qualified Foo (bar3, foo1) fourmolu-0.18.0.0/data/examples/import/nested-explicit-imports-out.hs0000644000000000000000000000020614745250261023776 0ustar0000000000000000import qualified MegaModule as M ( Either, Monad ( return, (>>), (>>=) ), (<<<), (>>>), ) fourmolu-0.18.0.0/data/examples/import/explicit-imports-with-comments.hs0000644000000000000000000000013114745250261024502 0ustar0000000000000000import qualified MegaModule as M ( (>>>) -- (1) , (<<<) -- (2) , Either -- (3) ) fourmolu-0.18.0.0/data/examples/import/qualified-prelude-four-out.hs0000644000000000000000000000011114745250261023547 0ustar0000000000000000module P where import Prelude hiding (id, (.)) import qualified Prelude fourmolu-0.18.0.0/data/examples/import/merging-2-out.hs0000644000000000000000000000010114745250261020763 0ustar0000000000000000import Foo hiding (bar4, foo2) import qualified Foo (bar3, foo1) fourmolu-0.18.0.0/data/examples/import/qualified-post.hs0000644000000000000000000000022714745250261021326 0ustar0000000000000000{-# LANGUAGE ImportQualifiedPost #-} import qualified Data.Text as T import qualified Data.Text (a, c, b) import Data.Text qualified hiding (c, b, a) fourmolu-0.18.0.0/data/examples/import/docstrings-after-exports-out.hs0000644000000000000000000000035714745250261024171 0ustar0000000000000000module Test ( since1, -- ^ @since 1.0 since2, -- ^ @since 2.0 since3, -- ^ @since 3.0 SinceType (..), -- ^ @since 4.0 SinceClass (..), -- ^ @since 5.0 Multi (..), -- ^ since 6.0 -- multi -- line ) where fourmolu-0.18.0.0/data/examples/import/explicit-prelude-four-out.hs0000644000000000000000000000004514745250261023433 0ustar0000000000000000import Aaa import Zzz import Prelude fourmolu-0.18.0.0/data/examples/import/merging-1-four-out.hs0000644000000000000000000000006314745250261021742 0ustar0000000000000000import "bar" Foo (bar) import "foo" Foo (baz, foo) fourmolu-0.18.0.0/data/examples/import/misc.hs0000644000000000000000000000035614745250261017336 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) fourmolu-0.18.0.0/data/examples/import/merging-2.hs0000644000000000000000000000015214745250261020164 0ustar0000000000000000import qualified Foo (foo1) import Foo hiding (foo2) import qualified Foo (bar3) import Foo hiding (bar4) fourmolu-0.18.0.0/data/examples/import/deprecated-export-multi-line-out.hs0000644000000000000000000000020514745250261024675 0ustar0000000000000000module X ( {-# DEPRECATE D(D1) "D1 will not be exposed in a version 0.2 and later" #-} D (D1, D2), ) where data D = D1 | D2 fourmolu-0.18.0.0/data/examples/import/explicit-prelude-out.hs0000644000000000000000000000004514745250261022462 0ustar0000000000000000import Aaa import Zzz import Prelude fourmolu-0.18.0.0/data/examples/import/comments-per-import-four-out.hs0000644000000000000000000000006614745250261024100 0ustar0000000000000000-- (1) import Bar -- (2) import Baz -- (3) import Foo fourmolu-0.18.0.0/data/examples/import/sorted-out.hs0000644000000000000000000000003314745250261020500 0ustar0000000000000000import A import B import C fourmolu-0.18.0.0/data/examples/import/explicit-prelude.hs0000644000000000000000000000004514745250261021655 0ustar0000000000000000import Aaa import Prelude import Zzz fourmolu-0.18.0.0/data/examples/import/merging-0-out.hs0000644000000000000000000000006114745250261020766 0ustar0000000000000000import Foo import Foo (bar, foo) import Foo as F fourmolu-0.18.0.0/data/examples/import/docstrings-after-exports-four-out.hs0000644000000000000000000000036014745250261025134 0ustar0000000000000000module Test ( since1, -- ^ @since 1.0 since2, -- ^ @since 2.0 since3, -- ^ @since 3.0 SinceType (..), -- ^ @since 4.0 SinceClass (..), -- ^ @since 5.0 Multi (..), {- ^ since 6.0 multi line -} ) where fourmolu-0.18.0.0/data/examples/import/deduplication-bug-four-out.hs0000644000000000000000000000025014745250261023551 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 (..)) fourmolu-0.18.0.0/data/examples/import/comments-per-import-out.hs0000644000000000000000000000006614745250261023127 0ustar0000000000000000-- (1) import Bar -- (2) import Baz -- (3) import Foo fourmolu-0.18.0.0/data/examples/import/misc-four-out.hs0000644000000000000000000000021214745250261021103 0ustar0000000000000000import A hiding ( foobarbazqux, ) import Name hiding () import {-# SOURCE #-} safe qualified Module as M hiding (a, b, c, d, e, f) fourmolu-0.18.0.0/data/examples/import/sorted-package-imports.hs0000644000000000000000000000020314745250261022756 0ustar0000000000000000{-# LANGUAGE PackageImports #-} import "b" Aa import "a" Ab import "c" Ba import D import "b" Bb import "this" Y import "zzzz" Z fourmolu-0.18.0.0/data/examples/import/nested-explicit-imports.hs0000644000000000000000000000012714745250261023173 0ustar0000000000000000import qualified MegaModule as M ((>>>), Either, (<<<), Monad( return, (>>=), (>>))) fourmolu-0.18.0.0/data/examples/import/misc-out.hs0000644000000000000000000000020714745250261020136 0ustar0000000000000000import A hiding ( foobarbazqux, ) import {-# SOURCE #-} safe qualified Module as M hiding (a, b, c, d, e, f) import Name hiding () fourmolu-0.18.0.0/data/examples/import/comments-per-import.hs0000644000000000000000000000006614745250261022322 0ustar0000000000000000import Foo -- (1) import Bar -- (2) import Baz -- (3) fourmolu-0.18.0.0/data/examples/import/simple-out.hs0000644000000000000000000000022314745250261020472 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 fourmolu-0.18.0.0/data/examples/import/explicit-imports-out.hs0000644000000000000000000000031214745250261022514 0ustar0000000000000000import qualified MegaModule as M ( Either, Maybe (Just, Nothing), MaybeT (..), Monad (return, (>>), (>>=)), MonadBaseControl, join, liftIO, void, (<<<), (>>>), ) fourmolu-0.18.0.0/data/examples/import/deprecated-export-single-line-four-out.hs0000644000000000000000000000006714745250261026003 0ustar0000000000000000module A ({-# DEPRECATED "blah" #-} x) where x = True fourmolu-0.18.0.0/data/examples/import/nested-explicit-imports-four-out.hs0000644000000000000000000000020714745250261024750 0ustar0000000000000000import qualified MegaModule as M ( Either, Monad ( return, (>>), (>>=) ), (<<<), (>>>), ) fourmolu-0.18.0.0/data/examples/import/comments-inside-imports-out.hs0000644000000000000000000000011114745250261023766 0ustar0000000000000000-- x import qualified -- x Bar import qualified -- x Baz import Foo fourmolu-0.18.0.0/data/examples/import/simple-four-out.hs0000644000000000000000000000022314745250261021443 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 fourmolu-0.18.0.0/data/examples/import/comments-inside-imports.hs0000644000000000000000000000011714745250261023167 0ustar0000000000000000import -- x Foo import -- x qualified Bar import qualified -- x Baz fourmolu-0.18.0.0/data/examples/import/sorted-export-list.hs0000644000000000000000000000006114745250261022164 0ustar0000000000000000import Linear.Vector (Additive (..), (*^), (^*)) fourmolu-0.18.0.0/data/diff-tests/inputs/spaced.hs0000644000000000000000000000012614745250261020077 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 fourmolu-0.18.0.0/data/diff-tests/inputs/main-v2.hs0000644000000000000000000000006714745250261020115 0ustar0000000000000000module Main (main) where main :: IO () main = pure () fourmolu-0.18.0.0/data/diff-tests/inputs/no-trailing-blank-line.hs0000644000000000000000000000002014745250261023066 0ustar0000000000000000data Test = Testfourmolu-0.18.0.0/data/diff-tests/inputs/main-foo.hs0000644000000000000000000000007014745250261020343 0ustar0000000000000000module Main (foo) where main :: IO () main = return () fourmolu-0.18.0.0/data/diff-tests/inputs/applicative-before.hs0000644000000000000000000000035514745250261022405 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] fourmolu-0.18.0.0/data/diff-tests/inputs/main-and-bar.hs0000644000000000000000000000014314745250261021065 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 bar :: Int bar = 6 fourmolu-0.18.0.0/data/diff-tests/inputs/main-and-baz-v2.hs0000644000000000000000000000015014745250261021420 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 + 5 bar :: Int bar = 7 fourmolu-0.18.0.0/data/diff-tests/inputs/main-and-baz.hs0000644000000000000000000000015214745250261021075 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 + 5 bar :: Int bar = 6 fourmolu-0.18.0.0/data/diff-tests/inputs/main-and-foo-v2.hs0000644000000000000000000000011314745250261021426 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 fourmolu-0.18.0.0/data/diff-tests/inputs/with-trailing-blank-line.hs0000644000000000000000000000002114745250261023426 0ustar0000000000000000data Test = Test fourmolu-0.18.0.0/data/diff-tests/inputs/one-line.hs0000644000000000000000000000003114745250261020341 0ustar0000000000000000module Main (main) where fourmolu-0.18.0.0/data/diff-tests/inputs/longer-v2.hs0000644000000000000000000000013414745250261020452 0ustar0000000000000000module Main (foo) where a b c main :: IO () main = return () d e f g foo :: Int foo = 6 fourmolu-0.18.0.0/data/diff-tests/inputs/longer.hs0000644000000000000000000000013514745250261020126 0ustar0000000000000000module Main (main) where a b c main :: IO () main = return () d e f g foo :: Int foo = 5 fourmolu-0.18.0.0/data/diff-tests/inputs/main.hs0000644000000000000000000000007114745250261017563 0ustar0000000000000000module Main (main) where main :: IO () main = return () fourmolu-0.18.0.0/data/diff-tests/inputs/empty.hs0000644000000000000000000000000014745250261017765 0ustar0000000000000000fourmolu-0.18.0.0/data/diff-tests/inputs/spaced-v2.hs0000644000000000000000000000012414745250261020422 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 fourmolu-0.18.0.0/data/diff-tests/inputs/applicative-after.hs0000644000000000000000000000036114745250261022241 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] fourmolu-0.18.0.0/data/diff-tests/inputs/main-and-foo.hs0000644000000000000000000000011514745250261021103 0ustar0000000000000000module Main (main) where main :: IO () main = return () foo :: Int foo = 5 fourmolu-0.18.0.0/data/diff-tests/inputs/main-and-bar-v2.hs0000644000000000000000000000014114745250261021410 0ustar0000000000000000module Main (main) where main :: IO () main = pure () foo :: Int foo = 5 bar :: Int bar = 7 fourmolu-0.18.0.0/data/parse-failures/line-pragma.hs0000644000000000000000000000023014745250261020360 0ustar0000000000000000module Foo (foo,bar,baz) where bar = foo {-# LINE 113 "Abc.hs" #-} foo = (some <$> ( automatically $ generated ))))))))) invalid Haskell code baz = bar fourmolu-0.18.0.0/data/parse-failures/disabling-preserves-error-location.hs0000644000000000000000000000020114745250261025067 0ustar0000000000000000module Main (main) where {- ORMOLU_DISABLE -} foo Int foo Int foo 5 EU>>>> {- ORMOLU_ENABLE -} main :: IO () main = return <<<fourmolu-0.18.0.0/data/cabal-tests/Foo.hs0000644000000000000000000000006514745250261016175 0ustar0000000000000000module Foo where import Data.List qualified as List fourmolu-0.18.0.0/data/cabal-tests/Bar.hs0000644000000000000000000000006514745250261016156 0ustar0000000000000000module Foo where import Data.List qualified as List fourmolu-0.18.0.0/data/diff-tests/outputs/trimming-trailing-both-out-of-margin.txt0000644000000000000000000000021314745250261026314 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 fourmolu-0.18.0.0/data/diff-tests/outputs/no-preceding.txt0000644000000000000000000000015614745250261021623 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ - module Main (foo) where + module Main (main) where main :: IO () main = return () fourmolu-0.18.0.0/data/diff-tests/outputs/no-following.txt0000644000000000000000000000014514745250261021661 0ustar0000000000000000TEST @@ -1,4 +1,4 @@ module Main (main) where main :: IO () - main = return () + main = pure () fourmolu-0.18.0.0/data/diff-tests/outputs/trailing-blank-line.txt0000644000000000000000000000005214745250261023067 0ustar0000000000000000TEST @@ -1,1 +1,2 @@ data Test = Test + fourmolu-0.18.0.0/data/diff-tests/outputs/trimming.txt0000644000000000000000000000011114745250261021066 0ustar0000000000000000TEST @@ -7,2 +7,2 @@ main :: IO () - main = return () + main = pure () fourmolu-0.18.0.0/data/diff-tests/outputs/one-line-added.txt0000644000000000000000000000006014745250261022010 0ustar0000000000000000TEST @@ -1,0 +1,1 @@ + module Main (main) where fourmolu-0.18.0.0/data/diff-tests/outputs/trimming-trailing-both-eof.txt0000644000000000000000000000045614745250261024412 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 fourmolu-0.18.0.0/data/diff-tests/outputs/joined-hunk.txt0000644000000000000000000000024514745250261021463 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 fourmolu-0.18.0.0/data/diff-tests/outputs/simple-hunk.txt0000644000000000000000000000017514745250261021506 0ustar0000000000000000TEST @@ -1,7 +1,7 @@ module Main (main) where main :: IO () - main = return () + main = pure () foo :: Int foo = 5 fourmolu-0.18.0.0/data/diff-tests/outputs/two-hunks.txt0000644000000000000000000000026614745250261021212 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 fourmolu-0.18.0.0/data/diff-tests/outputs/one-line-removed.txt0000644000000000000000000000006014745250261022410 0ustar0000000000000000TEST @@ -1,1 +1,0 @@ - module Main (main) where fourmolu-0.18.0.0/extract-hackage-info/hackage-info.bin0000644000000000000000000364666514745250261021026 0ustar0000000000000000 SABList Data.AbList:/"@ Data.AbneList://"@ AC-Boolean Data.Boolean&&"@||"@ AC-MiniTest Test.AC.Test?/="@?<"@?<="@?="@?>"@?>="@ AC-VectorData.Vector.Class*|@/|@|*@|/@ ADPfusionADP.Fusion.Core%"@...@:|@<<< @|||@~~"@ADP.Fusion.Core.Multi:|@ADP.Fusion.Core.TH**>"@<||"@ADP.Fusion.Core.TH.Backtrack**>"@<||"@ AERN-RealData.Number.ER.Real.Approx*:"@+:"@-:"@/:"@/\"@\/"@%Data.Number.ER.Real.Approx.Elementary**"@**:"@ AERN-RnToRm"Data.Number.ER.RnToRm.UnitDom.Base*^"@+^"@-^"@AFSM Control.AFSM &&&&@****@++++@<<<<?<<<^?>>>>?>>>^?^<<<?^>>>?||||@Control.AFSM.Core &&&&@****@++++@<<<<?<<<^?>>>>?>>>^?^<<<?^>>>?||||@Control.AFSM.SMFunctor>>>="@ Advise-me Bayes.Evidence.=="@.=~"@ Database.Data!"@Domain.Logic.Utils<=>@===@==>@Domain.Logic.Views.&&.@.->.@.<->.@.||.@Domain.Math.Power.Utils=/=@===@Recognize.Data.Attribute"@>"@<||>"@<~>"@==>"@ Recognize.Parsing.Interpretation>*<@>+<@>-<@>/<@>>*<<@>>+<<@>>/<<@>^< @Recognize.Parsing.Parse|>@Recognize.SubExpr.Symbols@<&>@ Util.String//"@AgataTest.Agata.Base$>"@*>"@.>"@>=>"@ Test.AgataTH<++>"@AgdaAgda.Compiler.Backend setTCLens@Agda.Compiler.JS.Pretty$+$@$++$@<+>@Agda.Interaction.JSON #="@.!="@.:"@.:!"@.:!="@.:?"@.:?="@.="@.?= @<=<?"@>=>?@="@Agda.Syntax.Common.Pretty$$@$+$@<+>@<>@@Agda.Syntax.Internal:#@Agda.Syntax.Parser.Alex.&&."@.||."@Agda.Syntax.Parser.LexActionsandThen?Agda.Termination.CallGraph>*<"@Agda.Termination.CallMatrix>*<"@Agda.Termination.Order.*."@Agda.TypeChecking.Monad.Base setTCLens@Agda.TypeChecking.Pretty$$@$+$@<+>@<>@@ Agda.TypeChecking.Primitive.Base-->@.-->@..-->@<#>"@<..>"@<@>"@<@@>"@Agda.TypeChecking.Substitute:#@"Agda.TypeChecking.Substitute.Class++#@Agda.Utils.Applicative?$>"@?*>"@Agda.Utils.Bag!"@Agda.Utils.BoolSet\\"@Agda.Utils.Boolean&&@||@Agda.Utils.FunctiononAgda.Utils.Functor$>@<$>@<&>?<.>"@Agda.Utils.IArray!?"@Agda.Utils.Lens%%=@%=@%==@.=@<&>?^. @Agda.Utils.List!!"@!!!"@Agda.Utils.List1!!"@:|@<|@Agda.Utils.Monad<$@<$!>@<$>@<*!>@<*>@==<<"@Agda.Utils.Semigroup<>@Agda.Utils.SmallSet\\"@Agda.Utils.Tuple-*-@/\@Animas FRP.Animas#"@-->"@-=>"@>--"@>=-"@FRP.Animas.AffineSpace.+^"@.-."@.-^"@FRP.Animas.MergeableRecord~+~"@FRP.Animas.Miscellany#"@FRP.Animas.VectorSpace*^"@^+^"@^-^"@^/"@ AnnotationsAnnotations.MultiRec.Any$?"@Annotations.MultiRec.ErrorAlg&@ArrayRefData.ArrayBZ.IArray!"@//"@Data.ArrayBZ.Internals.IArray!"@//"@Data.SyntaxSugar+="@-="@.<-"@.="@=:"@AspectAGLanguage.Grammars.AspectAG#.@*.@+++"@.# @.#.."@.*@.+.@.+:@.:+.@.:+:@.=@=.@⋈@▹@◃@ Language.Grammars.AspectAG.HList.:@.:.@*Language.Grammars.AspectAG.RecordInstances#.@*.@.# @.*@.=@=.@ AsyncRattusAsyncRattus.Future:>:"@AsyncRattus.Signal:::@AsyncRattus.Strict+++"@:! @:*@ AttoBencodeData.AttoBencode.:"@.="@BASICLanguage.BASIC:="@<"@<="@<>"@=="@>"@>="@^"@BNFCBNFC.PrettyPrint$++$"@<=>"@ BNFC.Utils+++@++++@+-+@+.+@>.> @ BNFC-metaLanguage.LBNF.Compiletime!"@HappyStk"@BiGULGenerics.BiGUL.Lib==>Generics.BiGUL.Lib.HuStudies==>"@BiobaseBiobase.Types.Ring.*."@.+."@.^."@.^^."@ BiobaseTypesBiobase.Types.Index+."@-."@BlammoBlammo.Logging.= @:#@BooleanData.Boolean.Overload&&@/=@<@<=@==@>@>=@||@CCA Control.CCA&&&"@***"@<<<"@>>>"@ CMCompareBioInf.CMCompare<*>"@CTRexData.OpenRecords .!"@.+"@.++"@.-"@.|"@:!="@::<-|"@::="@:<-"@:<-!"@:<-|"@:="@CVCV.ImageMathOp #*"@#+"@#-"@#<"@#>"@-|"@|*"@|+"@|-"@|<"@|>"@ CV.ImageOp#>"@&#&"@<#"@<##"@ CV.Pixelwise<$$>"@<+>"@ Utils.Point>/"@CabalDistribution.Utils.Json.="@Cabal-ide-backendDistribution.Compat.ReadP+++"@<++"@ Cabal-syntaxDistribution.Compat.Lens #%~@#~@%=@%~@&?.=@.~@?=@?~@^# @^. @Distribution.Compat.ParsingDistribution.Compat.Prelude+!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$>@<*@<*>@<+>@<<>>"@<=@<>@<|>@=<<?==@>@>=@>>?>>=?^ @^^ @deepseqdiv@elem@mod@notElem@onquot@rem@seq||@~@Distribution.Compat.Semigroup<>@Distribution.FieldGrammar^^^@ CartesianCartesian.Types:+"@CascadeCascade:>>>"@=>=:"@>=>:"@Cascade.Operators#"@#~"@~#"@Cascade.Product*:"@:*"@CassavaData.Csv.!"@.:"@.="@ChartGraphics.Rendering.Chart.Grid./."@.|."@ChasingBottomsTest.ChasingBottoms.SemanticOrd/=!@/\!@!@>=!@\/!@ CheatSheet CheatSheet##"@ ChristmasTreeText.GRead.Grammar.#."@.*."@ ClassLawsTest.ClassLaws.Core=.="@Test.ClassLaws.TestingDatatypes+++"@ ClassyPreludePrelude.Classy$"@$!"@*"@+"@-"@."@<>"@^"@ Prelude.Math**"@/"@^^"@CleanClean.Applicative*>"@<*"@<*>"@ Clean.Arrow<<<"@>>>"@>>^"@^>>"@|||"@ Clean.Core&"@*"@+"@."@<#>"@<|>"@ Clean.Functor<$"@<$>"@<&>"@ Clean.Lens%~"@.~"@^."@ Clean.Monad=<<"@>>"@>>="@ColorGraphics.Color.Algebra//@Graphics.Color.Model//@Graphics.Color.Space//@Graphics.Color.Space.RGB//@$Graphics.Color.Space.RGB.Alternative//@CommandSystem.Command->->"@->>"@->>>"@<-<-"@<<-"@<<<-"@ConstraintKinds#Control.ConstraintKinds.Applicative<*>"@Control.ConstraintKinds.Functor<$>"@Control.ConstraintKinds.Monad>>"@>>="@ContractDevelopment.Contract&"@=:"@>->"@>>->"@|>"@ CoroutineControl.Monad.Indexed>>"@>>="@Crypto!Codec.Encryption.RSA.NumberTheory/|"@ DBFunctor Etl.Julius:->@:.@:=>@ RTable.Core."@"@"@<=<?DOH%Network.DigitalOcean.Utils.Pagination/?"@DOMData.DOM.WBTypes/\"@DPutilsDP.Backtraced.Core<|@><@|>@DSH Database.DSH!!"@&&"@++"@/="@<"@<="@<|"@=="@>"@>="@>>"@>>="@?"@|>"@||"@ Deadpan-DDPWeb.DDP.Deadpan.Websockets?>>>"@Decimal Data.Decimal*."@ DeepArrowControl.Arrow.DeepArrow->|"@ Data.FunArr$$"@DrHyloLanguage.Pointfree.Syntax:**:"@:*:"@:++:"@:+:"@:->"@:.:"@:/\:"@:\/:"@Language.Pointwise.Syntax:&:"@:@:"@EEConfigEEConfig!"@EVPEVP defaultsTo?Earley Text.EarleyText.Earley.Grammar EdisonAPIData.Edison.Sym!"@++"@/\"@<|"@\/"@\\"@|="@|>"@ EdisonCoreData.Edison.Concrete.FingerTreelcons@Encode Encode.ExPlus<|>"@ Encode.Extend<|>"@ Encode.Mapper<->"@<.>"@|+|"@|-|"@|.|"@|:|"@ PureFP.OrdMap?"@|->"@ PureFP.OrdSet<++>"@<\\>"@PureFP.Parsers.AmbExTrie:&:"@PureFP.Parsers.AmbTrie:&:"@PureFP.Parsers.Parser/>"@<+>"@"@<:>"@EnumMap Data.EnumMap!"@\\"@EuroIT Data.EuroIT$^"@EuterpeaEuterpea.Music/=:"@:+:@:=:@FPrettyText.PrettyPrint.FPretty<$$>"@<$>"@<+>"@"@"@<>"@ FerryCoreDatabase.Ferry.SyntaxTyped.->"@:=>"@ FieldTripGraphics.FieldTrip.Transform*%"@ FileManipSystem.FilePath.Find &&?"@.&.?"@/=?"@/~?"@<=?"@=?"@>?"@||?"@~~?"@System.FilePath.GlobPattern/~"@~~"@FileManipCompatSystem.FilePath.FindCompat &&?"@.&.?"@/=?"@<=?"@=?"@>?"@||?"@ FilePather,System.FilePath.FilePather.FilePathPredicate.!."@.&&."@.||."@ FileSystemSystem.FileSystem.Operators-:"@<-:"@<:"@<<:"@=:"@?:"@System.FileSystem.Utils$$"@<|>"@Fin Data.Fin.List!!"@:.@FiniteCategoriesMath.Categories.FinSet||!||"@Math.Categories.FunctorCategory->$"@->£"@<-@<-"@<-@<="@<=@<-"@<=@<="@=>$"@ Math.Category@"@@?"@ FirstPrelude FirstPrelude!!"@$&&@*"@+"@++@-"@."@/="@<"@<="@=="@>"@>="@>>"@>>="@^"@seq||@Flint2Data.Number.Flint.Quotient//@Folly Folly.Formula/\"@\/"@ForSyDeForSyDe.Shallow.Signal!-"@+-+"@-:"@:-"@ForSyDe.Shallow.Vector:>"@<+>"@<:"@FramesFrames&:@:."@<+>@ Frames.Rec&:@GHood Debug.Observe<<"@GLM GLM.Tokenizer?>"@ GPipe-CoreGraphics.GPipe.Linear!!*@!!/@!*@!*!@!+!@!-!@$**!@*!!@*^@^*@^+^@^-^@^/@GTALibGTA.Core<.>"@>##"@>#>"@>=<"@>=="@>=>"@Gamgine Gamgine.Bool<&&>@<||>@Gamgine.Control?? Gamgine.Gfx<<@<<<@<<<<@GenI Data.FullList!:"@++"@Data.FullList.Internal!:"@++"@NLP.GenI.Builder>-->"@NLP.GenI.General!+!"@NLP.GenI.Pretty<+>"@<>@GeodeticData.Geo.Coord!.!"@|..|"@|.|"@Data.Geo.Position|*|"@GrammarProducts FormalLanguage.GrammarProduct.Op.+"@><"@GrempaData.Parser.Grempa.Grammar<#"@<#>"@<@"@<@>"@HABQT HABQTlib.Data<+> @HARM Arm.ParseLib+++"@ HAppS-DataHAppS.Data.HList.&."@ HAppS-IxSetHAppS.Data.IxSet &&&"@@*"@@+"@@<"@@<="@@="@@>"@@><"@@><="@@>="@@>=<"@@>=<="@|||"@ HAppS-StateHAppS.State.ComponentSystem:+:"@HCard Data.HCard@@"@HDRUtilsGraphics.Image.PixelMap!!"@!/"@!/="@!="@HERAData.Number.Real<."@>."@HGamer3DHGamer3D#"@-:"@-|"@<:"@<|"@HGamer3D-CommonHGamer3D.Common#"@#+"@#:"@#?"@?#"@HJScript HJScript.Ajax<&>"@=:"@ HJScript.Lang#"@#!"@#."@.!=."@.&&."@.*."@.+."@.+=."@.-."@./."@.<."@.<=."@.=."@.==."@.>."@.>=."@.||."@<|>"@?"@HJScript.XMLGenerator:="@HLearn-algebra!HLearn.Algebra.Structures.Modules*."@.*"@/."@#HLearn.Algebra.Structures.Triangles<|"@|>"@HLearn.Algebra.Types.HList:::"@HLearn.Algebra.Types.Indexing!"@#"@HList Data.HList #"@.!."@.*.@.-.@.<++.?.<.@.=.@.==.@.@.@:$$:@:<>:@HCons@Data.HList.CommonMain.==.@HCons@Data.HList.FakePrelude:$$:@:<>:@Data.HList.HListHCons@Data.HList.HListPrelude.*.@Data.HList.Labelable.==.@Data.HList.Record.!."@.*.@.-.@.<++.?.<.@.=.@.@.@HMap Data.HMap!"@\\"@HMockTest.HMock.Rule|->?|=>?HNumericHNum.CSV#"@ HNum.Vector %*%"@%-*-%"@%-+-%"@%---%"@%/%"@.!"@.*"@.*."@.+"@.-"@./"@.:"@.^"@HPDFGraphics.PDF.Expression&&*@/=%@<%@<=%@==%@>%@>=%@||*@HQuQ.Types$*$"@$+$"@$/$"@HSFFIGHSFFIG.FieldAccess-->"@<--"@==>"@HSH HSH.Command-|-"@HSoMHSoM.Examples.IntervalTrainer->>"@.|."@=>>"@HStringTemplateText.StringTemplate|=@HTFTest.Framework.Pretty$$@$+$@<+>@<=>"@HUnitTest.HUnit.Base@=??@??@?=?~:~=??~??~?=? HUnit-DiffTest.HUnit.Diff@==?"@@?=="@ HUnit-PlusTest.HUnitPlus.Base@=??@??@?=?~:~=??~??~?=? HUnit-approxTest.HUnit.Approx@?~?@~??~?~?~~??HaGL Graphics.HaGL$- @.!"@.#@.%@.&@.&&@.*@.+@.-@./@./=@.<@.<<@.<=@.==@.>@.>=@.>>@.@@.^@.^^@.|?.||?HaLeXLanguage.HaLex.DfaMonad<->"@Language.HaLex.Parser<$>"@<*>@<|>@Language.HaLex.Util<->"@HaTeXText.LaTeX.Base<>@Text.LaTeX.Base.Commands%:"@&"@Text.LaTeX.Base.Math !:"@!^"@*:@+-@-+@/=:@<:"@<=:"@=:@>:"@>=:"@^:"@Text.LaTeX.Base.Syntax<>@Text.LaTeX.Packages.AMSMath !:"@!^"@*:@+-@-+@/=:@<:"@<=:"@=:@>:"@>=:"@^:"@Text.LaTeX.Packages.TikZ.Simple->>"@Text.LaTeX.Packages.TikZ.Syntax->-"@->>"@HaXPathHaXPath #"@&&.@/. @//. @/=.@<.@<=.@=.@>.@>=.@|.@||.@HaXPath.Operators #"@&&.@/. @//. @/=.@<.@<=.@=.@>.@>=.@|.@||.@HaXPath.Schematic #"@&&.@/. @//. @/=.@<.@<=.@=.@>.@>=.@||.@HaXPath.Schematic.Operators #"@&&.@/. @//. @/=.@<.@<=.@=.@>.@>=.@||.@HaXmlText.XML.HaXml.Combinators />@:>@@andThen@guards@o@oo@union@when@with@without@|>|@Text.XML.HaXml.Html.Generate!"@?"@Text.XML.HaXml.Schema.Parse|||"@!Text.XML.HaXml.Xtract.Combinators/>"@|"@HackMailHackMail.Data.Path+/+"@:/:"@ HandsomeSoupText.HandsomeSoup!"@HarmTrace-BaseHarmTrace.Base.Chord.PitchClass&/="@&=="@HasChor Choreography~>"@~~>"@Choreography.Choreo~>"@~~>"@HaskRel#Database.HaskRel.Relational.Unicode#"@×"@∅"@∈"@∉"@∋"@∌"@∖"@∣"@∩"@∪"@≔"@⊂"@⊃"@⊆"@⊇"@⊠"@⋈"@⋉"@⋊"@▻"@◅"@Database.HaskRel.Support &="@+-"@><"@><="@>=<"@>=<="@>≤"@±"@≠"@≤"@≥"@≥<"@≥≤"@HaskellForMathsMath.Algebra.Field.Extension/>"@<*>"@<+>"@#Math.Algebra.Group.PermutationGroup *-"@-*"@-*-"@-^"@-^^"@.^"@.^^"@//"@~^ @~^^"@~~^"@Math.Algebra.LinearAlgebra !"@*> @*>> @<*>@<*>>@<+>@<->@<.>@<<*>@<<*>>@<<+>>@<<->>@"Math.Algebra.NonCommutative.NCPoly%%@^-"@Math.Algebras.Commutative%%@Math.Algebras.NonCommutative%%@Math.Algebras.Quaternions<.>"@^-"@Math.Algebras.Structures*."@Math.Algebras.TensorProductdsume@dsumf@te@tf@Math.Algebras.VectorSpace*>@<*@<+>@<->@Math.Combinatorics.Matroid///"@\\\"@'Math.Combinatorics.StronglyRegularGraph+^"@+^^"@Math.Common.ListSet\\"@%Math.CommutativeAlgebra.GroebnerBasis!"@"Math.CommutativeAlgebra.Polynomial%%@*->@Math.Core.Utils^- @(Math.Projects.ChevalleyGroup.Exceptional%^"@%Math.Projects.KnotTheory.LaurentMPoly^^^"@$Math.Projects.MiniquaternionGeometry<*"@Math.Projects.RootSystem+-+"@+|+"@"Math.QuantumAlgebra.TensorCategory>>>"@HipmunkPhysics.Hipmunk.Shape.==."@Hoed Debug.Hoed<<"@==="@Debug.Hoed.Observe<<"@ Debug.NoHoed<<"@Holumbus-SearchengineHolumbus.Data.PrefixTree!"@Holumbus.Data.PrefixTree.Core!"@.++."@HsParrot Language.PIR-->"@.&"@.-"@<-&"@<--"@<:="@<=="@HsPerl5Language.Perl5.!"@.$"@.$!"@.:"@HsYAML Data.YAML.!="@.:"@.:!"@.:?"@.="@Hsmtlib$Hsmtlib.Solvers.Cmd.Parser.CmdResult<#>"@"Hsmtlib.Solvers.Cmd.Parser.Parsers<++>"@<:>"@HyloDPHyloDP.Semiring<+>@<.>@I1MI1M.Analizador+++"@>*>@IFS Graphics.IFS<+>"@"@Graphics.IFS.Geometry<*>"@IOSpec Test.IOSpec:+:@Test.IOSpec.Types:+:@ImperativeHaskell"Control.Monad.Imperative.Internals&"@=:"@"Control.Monad.Imperative.Operators%."@%=:"@/."@==."@~."@ IndexedListData.List.Indexed.Conic:-:"@Data.List.Indexed.Counted:::"@InfixApplicativeControl.Applicative.Infix<^"@^>"@↾"@↿"@ IntervalMapData.IntervalMap.Generic.Lazy!"@\\"@Data.IntervalMap.Generic.Strict!"@\\"@Data.IntervalMap.Lazy!"@\\"@Data.IntervalMap.Strict!"@\\"@Data.IntervalSet\\"@IrcIrc|!"@IsNull Data.IsNull<\>"@JSON-CombinatorText.JSON.Combinator-?"@-??"@-|"@-||"@Text.JSON.JSONPrepend-->>:"@->:"@ JYU-Utils Utils.DynMap=:"@JdhData.Jdh.Json.Generic=:"@ JsonGrammarLanguage.JsonGrammar:-"@ JuicyPixelsCodec.Picture.Metadata:=>"@ JustParseData.JustParse.Combinator<|>"@<||>"@ Kawaii-Parser Parser.Parser<+>@KiCSCurry.Module.Prelude $!"@$!!"@$#"@$##"@&"@:<"@=:<="@=="@==="@>>="@ KleislifyControl.Kleislify->^"@<-^"@<=^"@=>^"@^->"@^<-"@^<="@^=>"@KulittaKulitta.EuterpeaSpecial&&&"@***"@+++"@/=:"@:+:"@:=:"@<+>"@<<<?<<^?>>>?>>^?^<<?^>>?|||"@ Kulitta.PTGG:->"@Kulitta.QuotientSpaces//"@LATS!LinearAlgebra.TypedSpaces.Classes!"@ LinearAlgebra.TypedSpaces.Matrix#"@#>"@<#"@<.>"@ LPFP-coreLPFPCore*^@+++"@<.>@><@^*@^+^@^-^@^/@LPFPCore.Mechanics1D+++"@LPFPCore.SimpleVec*^@<.>@><@^*@^+^@^-^@^/@LParseText.LParse.Prebuilt<<"@LambdaDesignerLambdaDesigner.Op!%"@!*"@!+"@!=="@!^"@<$$>"@ LambdaHack"Game.LambdaHack.Client.AI.Strategy.=>@.|@!Game.LambdaHack.Client.UI.Overlay<+:>@<\:>@!Game.LambdaHack.Common.PointArray!"@//"@Game.LambdaHack.Core.Prelude2!!"@!?"@$$!&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$!>@<$$>@<$>@<*@<*>@<+>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?\\@^ @^^ @blame?div@divUp@elem@mod@notElem@quot@rem@seq showFailure@swith@||@~@LastikSystem.Build.Args-~>"@^^^"@~:"@~?"@~~"@~~>"@~~~>"@System.Build.CompilePaths=>>"@System.Build.Runner !!!"@++>>"@+>>"@->-"@>--"@>->"@>=="@>===>"@>=>=>"@System.Build.Scala.Scalac?"@System.Build.Scala.Scaladoc?"@LogicLogic&&"@<=>"@==>"@^"@||"@LucuNetwork.HTTP.Lucu.Parser<|>"@MFlow MFlow.Forms**>"@++>"@"@<*"@<**"@<*>"@<++"@<+>"@<<<"@<|>"@>:>"@|*>"@|+|"@MFlow.Forms.Blaze.Html<<"@MFlow.Forms.Internals!>"@**>"@<**"@<+>"@MFlow.Forms.WebApi"@MHask MHask.Arrow~<~"@~>~"@MIPNumeric.Optimization.MIP.Base.<=.@.==.@.>=.@MagicHaskeller "Control.Monad.Search.Combinatorial/\"@\/"@MagicHaskeller.Classification/"@/<"@/"@MagicHaskeller.FastRatio%"@:%"@MagicHaskeller.LibExcel<>"@MagicHaskeller.LibTH--#!!"@--#/="@--#<"@--#<="@MagicHaskeller.Minimal~=@MagicHaskeller.PolyDynamicdynApp"@MapData.Map.Class!?"@MapWithCurryTF$#"@MapWith<-^?^->?MeasureData.Measure.ConvertDouble..>"@<.."@Data.Measure.RelativeDouble.*."@./."@MemoTrie Data.MemoTrie:->:@.@"@ MetaObjectMO.Util?<=>?"@?==?"@Modulo Number.Modulo==="@MonatronControl.Monatron.Open<@>"@Monocle Monocle.Core\*"@\."@\=="@MuCheckTest.MuCheck.MuOp*==>*"@==>"@==>*"@~~>"@Test.MuCheck.Utils.Print./."@MultipletCombinerPhysics.MultipletCombiner><"@><^"@>><"@NMap Data.NMap!"@.<.> NanoProlog%Language.Prolog.NanoProlog.NanoProlog:<-:"@NoHoedDebug.Hoed.Pure<<"@ NonEmptyListData.List.NonEmpty.:"@|:"@ NumberTheory NumberTheory.%"@.*"@.+"@.-"@./"@:+"@ Nussinov78BioInf.GAPlike<**"@OGL"Graphics.Rendering.OGL.GL.StateVar$$="@$="@$=!"@$~"@$~!"@OmegaData.Presburger.Omega.Expr *|"@|&&|"@|*|"@|+|"@|-|"@|/=|"@|<=|"@|<|"@|==|"@|>=|"@|>|"@OpenAFPOpenAFP.Prelude.Utils$$@$=@%%=@%:@%=@%?@+=@@=@OpenAFP.Types.Chunk ...@....@.....@..>@<..@<==@<~~@===@==>@~~@~~>@OpenSCADGraphics.OpenSCAD#"@Graphics.OpenSCAD.Unicode∖"@∩"@∪"@⊕"@⊖"@Operads Math.Operad.*."@OrdinalsMath.Ordinals.MultiSet++."@.++."@.:"@^:"@PArrows(Text.ParserCombinators.PArrow.Combinator>>!"@PSQueue Data.PSQueue:->Data.PSQueue.Internal:->PageIOText.PageIO.Parser<$$>"@ParaisoLanguage.Paraiso.OM.Builder"@$Language.Paraiso.OM.Builder.Internal"@Language.Paraiso.Prelude&&"@++"@||"@Parallel-Arrows-DefinitionParrows.Definition..."@|&&&|"@|***|"@Parrows.Skeletons.Topology|>>>|"@PermuteEffectsControl.Permute*."@Piso Data.Piso:-"@PreludePrelude$$$!$>@&?&&@*"@**"@*>"@+"@-"@."@/"@/="@:|"@<"@<$"@<$>@<*"@<*>"@<="@<=<?<>"@<|>"@=<<?=="@>"@>="@>=>?>>"@>>="@^ @^^ @elem@notElem@on||@PrimitiveArrayData.PrimitiveArray.Checked!"@!?"@:.@:>@Data.PrimitiveArray.Class!"@!?"@Data.PrimitiveArray.Index.Class:.@:>@QIOQIO.Heap?"@QIO.Vec<**>"@<++>"@<@@>"@ QIO.VecEq<+>"@<.>"@<@>"@ QuickCheckTest.QuickCheck.&&.?.&.?.||.?=/=@===@==>><"@Test.QuickCheck.Arbitrary><"@QuickCheck-safeTest.QuickCheck.Safe.&&."@.&."@.||."@=/=@==="@==>"@><"@RBTreeData.Tree.RBTree<@RSolve.MapLike!"@RSolve.PropLogic:&&@:&&:@:=>:@:||@:||:@ Ranged-setsData.Ranged.Boundaries/>/@Data.Ranged.RangedSet-!-@-/\-@-<-@-<=-@-?-@-\/-@ RasterificGraphics.Rasterific.Linear^*@^+^@^-^@^/@RattusRattus<##"@<#>"@|##"@|#|"@ Rattus.Arrow&&&"@***"@ Rattus.Stream:::"@ Rattus.Strict+++"@:! @:*@ Rattus.Yampa -->"@-:>"@-=>"@<<^"@>--"@>=-"@>>>?>>^"@^<<"@^>>"@ReadArgsReadArgs:&"@ RefSerializeData.RefSerialize.Parser<|>?RepLibGenerics.RepLib.R:*:"@Generics.RepLib.RepAux:::"@ReplicateEffectsControl.Replicate*!"@*?"@ RxHaskellSignal>>:"@SBenchTest.SBench.STerm<$>"@SSTGSSTG.Core.Execution.Support<*>"@>>="@ SciBaseTypesAlgebra.Structure.Semiringplus@times@⊕@⊗@SciFlowScientific.Workflow~>"@$Scientific.Workflow.Internal.Builder~>"@ SemigroupData.Semigroup.++."@<++>"@ SessionLoggerSystem.Log.SessionLogger>>>="@>>>>="@SetData.Set.Class⊆"@ ShellCheckShellCheck.Prelude!!!"@Shpadoinkle-lensShpadoinkle.Lens%> @<% @Shpadoinkle-routerShpadoinkle.Router:>>@SimpleHSimpleH.Applicative*>"@<*"@<**>"@<*>"@ SimpleH.Arrow>>^"@^>>"@ SimpleH.Core &"@*"@+"@+++"@."@<#>"@<<<"@<|>"@>>>"@SimpleH.Functor:**:"@<$"@<$>"@<&>"@|||"@ SimpleH.Lens %%-"@%%~"@%-"@%~"@-."@.+"@.-"@<.>"@^."@^.."@^?"@^??"@ SimpleH.Monad <*="@<=<"@=-"@=<<"@=~"@>=>"@>>"@>>="@>>>="@>>>>="@SimpleH.Parser<+>"@>*>"@SimpleH.Reactive//"@<*|>"@<|*>"@ SizeCompareData.SizeCompare|<=|"@|<|"@|==|"@|>=|"@|>|"@SmtLibSmtlib.Parsers.CommonParsers<++>"@<:>"@Spock Web.Spock"@ Spock-api Web.Spock.Api"@ Spock-coreWeb.Spock.Core"@StateVar Data.StateVar$=@$=!@$~@$~!@Strafunski-StrategyLib2Data.Generics.Strafunski.StrategyLib.StrategyInfix-+@>>>?>>>-?>>>=?Stream Data.Stream!!"@<:>@Cons@ StrictCheckTest.StrictCheck:*@Test.StrictCheck.Examples.Lists%$"@%*"@Test.StrictCheck.Examples.Map!"@Test.StrictCheck.Shaped%"@ SyntaxMacrosLanguage.Grammars.Grammar<=>"@^="@Language.Grammars.SyntaxMacros+>>"@^|"@TCacheData.TCache.IndexQuery.&&.@.<.@.<=.@.==.@.>.@.>=.@.||.@TLTTest.TLT@/=?@/=-?@<?@<-?@<=?@<=-?@==?@==-?@>?@>-?@>=?@>=-?~:~::~::-Test.TLT.Assertion~:~::~::-Test.TLT.Standard @/=?@/=-?@<?@<-?@<=?@<=-?@==?@==-?@>?@>-?@>=?@>=-?TTTASLanguage.AbstractSyntax.TTTAS2&&&"@***"@>>>"@ TeX-my-mathMath.LaTeX.Internal.Display$<>@>$?Math.LaTeX.Internal.MathExpre*..*@+..+@-\-@-→@.../⊂@<.<@<.≤@<==?<=>?<،>@<⍪>@==>?=÷@=→@=⸪@|◝ @|◞ @|◞◝ @°@±@×@÷"@÷=@،،..،‸"@⁀"@₌₌ @←-@←=@↦@↪@∀:@∃:@∄:@∈@∉@∋@∌@∏ @∑ @∓@∖@∗"@∘@∝@∥@∧@∨@∩@∪@∫ @∼@≃@≅@≈@≠@≡@≤@≤.<@≤.≤@≥@≪@≫@⊂@⊃@⊆@⊇@⊎@⊕@⊗@⋂ @⋃ @⋆"@⍪⍪..⍪␣╰─┬─╯"@◝"@◝⁀"@◞"@◞∏ @◞∑ @◞∫ @◞∮ @◞⋂ @◞⋃ @◞◝ @◞⨄ @☽@☾@⟂@⧵@⨄ @⩵@⩵!@⪡@⪢@⸪@⸪=@Math.LaTeX.Preludeo$<>@%$>@&?&~!?&~:?&~??&~~!?&~~:?*..*@+..+@-\-@-→@.../⊂@<.<@<.≤@<==?<=>?<،>@<⍪>@==>?=÷@=→@=⸪@>$?|->@|◝ @|◞ @|◞◝ @°@±@×@÷"@÷=@،،..،‸"@⁀"@₌₌ @←-@←=@↦@↪@∀:@∃:@∄:@∈@∉@∋@∌@∏ @∑ @∓@∖@∗"@∘@∝@∥@∧@∨@∩@∪@∫ @∼@≃@≅@≈@≠@≡@≤@≤.<@≤.≤@≥@≪@≫@⊂@⊃@⊆@⊇@⊎@⊕@⊗@⋂ @⋃ @⋆"@⍪⍪..⍪␣╰─┬─╯"@◝"@◝⁀"@◞"@◞∏ @◞∑ @◞∫ @◞∮ @◞⋂ @◞⋃ @◞◝ @◞⨄ @☽@☾@⟂@⧵@⨄ @⩵@⩵!@⪡@⪢@⸪@⸪=@ TernaryTreesData.Map.StringMap!"@Data.Map.TernaryMap!"@ TestExplodeTestExplode.TestExplode&-&"@ TicTacToeData.TicTacToe.Board-->"@-?->"@TopTop.Constraint.Equality.==."@Top.Constraint.Polymorphism.::."@!Top.Implementation.TypeGraph.Path:+:"@:|:"@<++>"@Top.Solver.SwitchCombinator|>>|"@Top.Types.Primitive.->."@Top.Types.Qualification.=>."@Top.Types.Substitution@@"@@@@"@|->"@TreeStructures Data.Tree.AVL!!"@Data.Tree.Splay!!"@TrieMap Data.TrieMap!"@\\"@ Data.TrieSet\\"@ TypeComposeControl.Compose$*&&&%"@***#@***%"@*:*"@*::*"@*<~?:$:*:@:->:?:."@<~?~>?~>*?Data.Bijection--->@:<->: @UISFFRP.UISF.AuxFunctions~++"@FRP.UISF.Widget.Construction//"@ UnixutilsSystem.Unix.FilePath<++>"@UrlDispNetwork.UrlDisp|."@|/"@|//"@|?"@|\"@|\\"@UsefulUseful.Dictionary #!"@#!!"@#*-"@#*?"@#+"@#++"@#-"@#?"@#?!"@#??"@#\\"@Useful.General!"@!/"@!="@%"@?"@?!"@??"@ UtilityTMControl.Monad.TM.=<<."@.>>=."@ValveValueKeyvalue Text.ValveVKV.:@^:@Vec Data.Vec.Base:."@VecN Data.VecN:>"@WashNGoWASH.CGI.Style:=:"@:^:"@WASH.HTML.HTMLMonad98##"@WASH.HTML.HTMLMonadBase@@"@WeakSets Data.WeakMap!"@!?"@<|$|>"@\\"@|!|"@|.|"@|?|"@Data.WeakMap.Safe<|$|>"@|!|"@|.|"@|?|"@ Data.WeakSet\\"@|&|"@|*|"@|+|"@|-|"@|^|"@|||"@Data.WeakSet.Safe|&|"@|*|"@|+|"@|-|"@|^|"@|||"@WebrexpText.Webrexp.GraphWalker"@WhebWeb.Wheb"@Web.Wheb.Routes"@ WidgetRattusAsyncRattus.Future:>:"@AsyncRattus.Signal:::@AsyncRattus.Strict+++"@:! @:*@WiredData.Hardware.Internal.+"@><"@Data.Logical.Knot*="@Data.Logical.Let==="@ Lava.Patterns-<-"@->-"@-|-"@.<."@.>."@XSaiga AGParser2*>"@<|>"@Yampa FRP.Yampa -->-:>-=>>-->=-attach @gate @joinE@lMerge@merge@rMerge@tag @FRP.Yampa.Basic-->-:>-=>>-->=-FRP.Yampa.DelaysfbyFRP.Yampa.Eventattach @gate @joinE@lMerge@merge@rMerge@tag @FRP.Yampa.EventSandThen@FRP.Yampa.Task abortWhentimeOut Yampa-core FRP.Yampa#"@-->"@-=>"@>--"@>=-"@FRP.Yampa.Basic-->"@-=>"@>--"@>=-"@FRP.Yampa.Core>>>"@FRP.Yampa.MergeableRecord~+~"@FRP.Yampa.Miscellany#"@Z-Data Z.Data.JSON.! @.:"@.:!"@.:?"@.= @"@Z.Data.JSON.Base.! @.:"@.:!"@.:?"@.= @"@Z.Data.JSON.Converter"@ Z.Data.ParserZ.Data.Parser.Base Z-MessagePackZ.Data.MessagePack.! @.:"@.:!"@.:?"@.= @"@Z.Data.MessagePack.Base.! @.:"@.:!"@.:?"@.= @"@ZipperAGLanguage.Grammars.ZipperAG.$"@.|"@6Language.Grammars.ZipperAG.Examples.HTMLTableFormatter.#."@.$"@.|"@Zora Zora.List$$"@<$*>"@Zwaluw Web.Zwaluw:-"@<>"@ abcBridge Data.ABC.AIG==="@ Data.ABC.GIA==="@abt Abt.Class.Abt$$"@//"@\\"@Abt.Class.HEq1==="@Abt.Types.View:$"@:\"@ accelerateData.Array.Accelerate!"@!!"@$&?&&@*@** @+@++@-@."@/@/=@:.@::.@<@<=@==@>@>->?>=@??|Ix@^ @^^ @div@mod@quot@rem@||@Data.Array.Accelerate.Data.Bits .&.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@"Data.Array.Accelerate.Data.Complex:+@::+@"Data.Array.Accelerate.Data.Functor$>@<$@<$>@!Data.Array.Accelerate.Data.Monoid<>@ Data.Array.Accelerate.Data.Ratio%@$Data.Array.Accelerate.Data.Semigroup<>@accelerate-blas+Data.Array.Accelerate.Numeric.LinearAlgebra#> @<# @<.> @<> @>< @acl2 Language.ACL2<."@<=."@>."@>=."@ acme-cadre Acme.Cadre<&>"@acme-flipping-tables Acme.Error ╯°□°╯"@ acme-functors Acme.Functors~~@Acme.Functors.Classes *>@/=@<$@<*@<*>@<>@==@>>?>>=? acme-hq9plus Acme.HQ9Plus+"@acme-kitchen-sinkControl.Applicative.Acme>$<"@ acme-lolcatAcme.LOLCAT.IO?"@ acme-omitted Acme.Omitted..."@acme-operatorsAcme.Operators.Base2!!"@$"@$>"@%"@&"@&&"@&&&"@*"@**"@***"@*>"@+"@++"@+++"@-"@."@.&."@.|."@/"@/="@:+"@<"@<$"@<$!>"@<$>"@<*"@<**>"@<*>"@<<<"@<<^"@<="@<=<"@<>"@<|>"@=<<"@=="@>"@>="@>=>"@>>"@>>="@>>>"@>>^"@\\"@^"@^<<"@^>>"@^^"@||"@|||"@acme-php Prelude.PHP&&"@<>"@||"@acme-pointful-numbers Acme.Pointful."@active Data.Active->>@|>>"@actsData.Act-->@<--@act@•@ad Numeric.AD:-@Numeric.AD.Double:-@ Numeric.AD.Internal.Tower.Double:!@Numeric.AD.Jet:-@Numeric.AD.Mode*^@^*@^/@adaptive-containersData.Adaptive.List++"@adhoc-fixturesData.Fixtures.Adhoc&:@&>@ adp-multiADP.Multi.Combinators..."@<<<"@>>>"@|||"@~~~"@ aern2-mfunAERN2.Linear.Vector.Type!"@+++"@aern2-mpAERN2.MP.Enclosure+-@AERN2.MP.Float.Operators*.@*^@+.@+^@-.@-^@/.@/^@ aern2-real AERN2.Real??AERN2.Real.Type??aeson Data.Aeson .!="@.:"@.:!"@.:!="@.:?"@.:?="@.= @.?= @"@Data.Aeson.Encoding.Internal>*<@><@Data.Aeson.KeyMap!?"@Data.Aeson.Types .!="@.:"@.:!"@.:!="@.:?"@.:?="@.= @.?= @"@aeson-better-errorsData.Aeson.BetterErrors.!"@<|>@ Data.Aeson.BetterErrors.Internal.!"@<|>@ aeson-commitData.Aeson.Commit.:>"@ aeson-compatData.Aeson.Compat.!="@.:"@.:!"@.:?"@.= @ aeson-decode AesonDecode^? @aeson-derivingData.Aeson.Deriving.Generic&@:=@$Data.Aeson.Deriving.Internal.Generic&@Data.Aeson.Deriving.Known:=@==>@ aeson-filthyData.Aeson.Filthy.:$"@.:~"@.=$"@ aeson-native Data.Aeson.:"@.:?"@.="@Data.Aeson.Types.:"@.:?"@.="@ aeson-pickerData.Aeson.Picker|--@|-?@ aeson-quickData.Aeson.Quick.!"@.%"@.?"@ aeson-utilsData.Aeson.Utils.=?"@aeson-warning-parserData.Aeson.WarningParser..!="@...:"@...:?"@..:"@..:?"@.:"@.:?"@affineAlgebra.Affine.+@.-@.-.@agda-language-serverRender.RichText<+>@ agda2trainOutput:>@:~@\/"@aigData.AIG.Interface==="@Data.AIG.Operations!"@++"@airAir.Data.Monoid+"@Air.Data.Record.SimpleLabel=:"@ Air.Light!!"@-"@."@/"@<"@<->"@>"@^"@air-specAir.Spec==="@airbrakeAirbrake:|"@airship Airship.Route#>"@#>="@"@aivikaSimulation.Aivika.Circuit?>"@ Simulation.Aivika.SystemDynamics./=."@.<."@.<=."@.==."@.>."@.>=."@aivika-transformersSimulation.Aivika.Trans.Circuit?>"@&Simulation.Aivika.Trans.SystemDynamics./=."@.<."@.<=."@.==."@.>."@.>=."@ajhc C.Generate&"@*#"@+#"@=*"@ Doc.DocLike<$>"@<+>"@<>"@ Doc.Pretty<$$>"@"@"@E.Demand:=>"@FrontEnd.Representation:=>"@FrontEnd.Tc.Type:=>"@ Grin.Grin:->"@:>>="@ Util.IntBag!"@Util.Seq<>"@ Util.SetLike\\"@ Util.TrueSet\\"@Util.UnionSolve@<="@@<=@"@@="@@=@"@@>="@@>=@"@alertaAlerta!="@!~"@=."@~."@ alex-tools AlexTools<->"@ AlexToolsBin<->"@algAlgebra*@+@-@/@<>@×@ Data.BitSet.&?¬"@Relation.Binary.Comparison<@>@∸"@≡@≢@≤@≥@algebra Numeric.Additive.Class+"@Numeric.Additive.Group-"@Numeric.Algebra*"@*."@+"@-"@.*"@/"@/~"@<"@<~"@>"@>~"@\\"@^"@~~"@Numeric.Algebra.Class*"@*."@.*"@Numeric.Algebra.Division/"@\\"@^"@Numeric.Decidable.Units^?"@Numeric.Field.Fraction%@ Numeric.Map$@Numeric.Module.Class*."@.*"@Numeric.Order.Class/~"@<"@<~"@>"@>~"@~~"@algebraic-graphs Algebra.Graph===@Algebra.Graph.Example.Todo>*<"@~*~"@Algebra.Graph.Export<+>@Algebra.Graph.Export.Dot:="@Algebra.Graph.Label<+>@<.>@Algebra.Graph.Labelled-<@>-@#Algebra.Graph.Labelled.AdjacencyMap-<@>-@Algebra.Graph.NonEmpty===@algebraic-preludeAlgebraicPrelude**"@^ @^^ @allocated-processorControl.Processor--<"@alloyData.Generics.Alloy.Effect:-*"@Data.Generics.Alloy.Pure:-"@Data.Generics.Alloy.Route:-@"@@->"@altcompositionData.AltComposition%***.*"@%***.**"@%**.*"@%**.**"@%**.***"@%*.*"@%*.**"@%*.***"@%.**"@%.***"@%.****"@&&\@*%*.*"@*%*.**"@*%*.***"@*%.*"@*%.**"@*%.***"@**%.*"@**%.**"@**%.***"@.$ @?."@||\@§"@alternative-extraControl.AlternativeExtra$<"@alternative-ioData.Alternative.IO.Lifted<||>"@altfloatData.Floating.Classes**"@ Data.Poset<"@"@<="@<==>"@>"@>="@amazonkaAmazonka.!@@ amazonka-core Amazonka.Core.!@@Amazonka.Core.Lens.Internal # @%~@.~@<&>?<>~@?~@^. @^.. @^? @Amazonka.Data.Headers.#@.#?@=#@Amazonka.Data.JSON.!="@.:"@.:>"@.:?"@.= @.?>"@Amazonka.Data.Query=:@Amazonka.Data.XML.@@.@?@@=@@@=@Amazonka.Prelude,!!"@$$!&?&&@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$!>@<$>@<&>?<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@ hashWithSaltmod@notElem@quot@rem@seq||@amazonka-s3-encryptionAmazonka.S3.Encryption.Envelope.&"@ amazonka-testTest.Amazonka.Prelude # @%~@.~@<&>?<>~@?~@^. @^.. @^? @ambyAmby.=@ ampersandDatabaseDesign.Ampersand .!."@.*."@.-."@./."@./\."@.:."@.<>."@.==."@.\."@.\/."@.|-."@<==>"@>-"@analyzeAnalyze.Common<&>? annihilatorControl.Annihilator<|<"@>|>"@annotated-wl-pprint!Text.PrettyPrint.Annotated.Leijen<$$>"@<$>"@<+>"@"@"@<>"@ ansi-pretty'Text.PrettyPrint.ANSI.Leijen.AnsiPretty<$$>@<+>@@@ansi-terminal-game Terminal.Game # @%@%.<@%.>@%^>@&?***@===@|||@ansi-wl-pprintText.PrettyPrint.ANSI.Leijen<$$>"@<$>"@<+>"@"@"@<>@anteludeAntelude$$!$>@&&@*@** @*>@+@-@.>"@/@/=@:|@<@<$@<$>@<&>?<*@<*>@<."@<<"@<=@<=<?<>@<|<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @|>||@ Antelude.Bool&&@and@or@xor?||@Antelude.Function.>"@<."@<|seq|> Antelude.List!!"@elem@notElem@Antelude.List.NonEmpty!!"@:|@<|@Antelude.Monad$>@<<"@Antelude.Numeric *@** @+@-@/@div@mod@quot@rem@Antelude.Sequence:<@:<|@:>@:|>@anticivNetwork.Anticiv.Masks#->"@#->>"@#||"@&"@.||"@"Network.Anticiv.Modules.Mafia.Core #<"@#>"@%&"@%&&"@%|"@%|&"@&<"@&>"@<>#"@<>&"@"Network.Anticiv.Modules.Mafia.Data:->"@ antimirovData.Regex.Antimirov.Subtyping<:"@"Data.Regex.Antimirov.SubtypingList<:"@antiope-messagesAntiope.Messages.Via/@//@ antiope-s3Antiope.S3.Syntax"@ antiquoter Language.Haskell.AntiQuoter.Base<<>"@<<>>"@<>>"@ antispliceGame.Antisplice.Action!&&"@!||"@#&&"@#||"@Game.Antisplice.MaskedSkills&->"@&?->"@+&"@+?"@-&?->"@Game.Antisplice.Skills!+"@!+>"@#-"@#->"@#->>"@>!+"@>!+>"@ antlr-haskellLanguage.ANTLR4&&&@ hashWithSaltText.ANTLR.Allstar.Stacks#"@Text.ANTLR.Set\\"@ hashWithSaltany-patData.Pattern.Any∈"@∋"@ aop-prelude AOPPrelude&&@*@+@++@-@."@/@/=@<@<=@==@>@>=@div@mod@||@ ap-normalize ApNormalize&?<$>^@<*>^@ApNormalize.Aps<$>^@<*>^@ ap-reflect Debug.Reflect-$-@-*-@:$"@apecsApecs$=@$~@ Apecs.System$=@$~@apecs-effectfulApecs.Effectful$=@$~@ apecs-stmApecs.STM.Prelude$=@$~@ api-builderNetwork.API.Builder.Routes=."@api-rpc-pegnetPegNet.RPC.Types.Balances.:??"@PegNet.RPC.Types.Issuance.:??"@PegNet.RPC.Types.Rates.:??"@PegNet.RPC.Types.SyncStatus.:??"@PegNet.RPC.Types.Transaction.:??"@ api-tools Data.API.JSON.:."@.::"@Data.API.Utils?!"@?!?"@ Data.Binary.Serialise.CBOR.Extra<$!>@apiaryControl.Monad.Apiary.Filter=!:"@=*:"@=+:"@=:"@=?!:"@=?:"@??"@Data.Apiary.Extension+>"@Data.Apiary.Routing+|"@insert"@Data.Apiary.Routing.Dict:="@apparText.Appar.ByteString*>@<$@<$>@<*@<**>@<*>@<|>@Text.Appar.LazyByteString*>@<$@<$>@<*@<**>@<*>@<|>@Text.Appar.String*>@<$@<$>@<*@<**>@<*>@<|>@appleACons @~>C=:"@Prettyprinter.Ext<#>@ applicableData.Applicable$*"@applicative-logicControl.Applicative.Logic&&"@apply-unordered-monoControl.Apply.Unordered.Mono???!?approx Data.Approx/~@=~@inRange@inTol@ safeInRange@ approximateData.Approximate.Mass&?@^?@|?@arch-hs$Distribution.ArchHs.Internal.Prelude@<|>@\\@arduino-copilotCopilot.Arduino-!!"@#"@$$!&&@*@** @*>@+@++?-@."@.!!"@.&.@.<<."@.>>."@.^.@.|.@/@/="@<"@<$@<$>@<*@<*>@<="@<>@=:?=<<?=="@==>"@>"@>="@>>?>>=?@:"@^"@^^ @elem@notElem@quot@rem@seq||@~@arithmoiMath.NumberTheory.Moduli.Class^% @modulo@Math.NumberTheory.Primes.IntSet\\"@.Math.NumberTheory.Quadratic.EisensteinIntegers:+@,Math.NumberTheory.Quadratic.GaussianIntegers:+@array Data.Array!"@//"@Data.Array.Base!"@!?"@//"@Data.Array.IArray!"@!?"@//"@ array-builderData.Builder.Catenable:<@:>@Data.Builder.Catenable.Bytes:<@:>@Data.Builder.Catenable.Text:<@:>@ array-forthLanguage.ArrayForth.State!"@ arrow-extrasControl.Arrow.Extras$<<?$>>?<<$?>*>>>$?arxSystem.Posix.ARX.CLI.Options<@>@arxivNetwork.Api.Arxiv/*/"@/+/"@/-/"@asanaAsana.Api.Prelude'!!"@$$!&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@asn1-ber-syntaxAsn.Resolve.Category>->"@assert-failureControl.Exception.Assert.Sugarblame?failure? forceEither? showFailure@swith@twith@ assoc-listData.AssocList.List.Eq!"@!?"@assoc-listlikeData.AssocList.ListLike.Eq!"@!?"@atermATerm.SimpPretty<>@atom Language.Atom!"@!."@&&."@.&."@.<<."@.>>."@.|."@/=."@<."@<=."@<=="@==."@>."@>=."@||."@Language.Atom.Expressions!"@!."@&&."@.&."@.<<."@.>>."@.|."@/=."@<."@<=."@==."@>."@>=."@||."@Language.Atom.Language<=="@atpATP.FOL /\@<=>@<~>@=/= @=== @==>@?="@\/@|-@~=@ atp-haskellData.Logic.ATP$$@$+$@.&.@.<=>.@.=>.@.|.@.~.@:&:"@:<=>:"@:=>:"@:|:"@<+>@<==>@<=>@==>@¬@·@→@↔@⇒@⇔@∧@∨@⊃@Data.Logic.ATP.Equate.=.@Data.Logic.ATP.Formulas⊤"@⊥"@Data.Logic.ATP.Lib|->"@|=>"@∅"@Data.Logic.ATP.Lit.~.@¬@Data.Logic.ATP.Pretty<>@Data.Logic.ATP.Prop.&.@.<=>.@.=>.@.|.@:&:"@:<=>:"@:=>:"@:|:"@<==>@<=>@==>@·@→@↔@⇒@⇔@∧@∨@⊃@Data.Logic.ATP.Quantified:!:"@:?:"@∀?∃? attoparsecData.Attoparsec.ByteString Data.Attoparsec.ByteString.Char8.*>"@<*."@Data.Attoparsec.ByteString.LazyData.Attoparsec.CombinatorData.Attoparsec.Internal.Types<>@Data.Attoparsec.Text.*>"@<*."@Data.Attoparsec.Text.Lazy.*>"@<*."@attoparsec-parsecData.Attoparsec.Text.Parsec"@attoparsec-textData.Attoparsec.Text.*>"@<*."@"@ authoringText.Authoring.Label./"@<>"@auto Control.Auto-->?-?>?Control.Auto.Blip&>@<&@mergeL@mergeR@Control.Auto.Blip.InternalmergeL@mergeR@Control.Auto.Interval<|!>@<|?>@compI?Control.Auto.Switch-->?-?>? autodocodec Autodocodec.="@"@"@Autodocodec.Codec.="@"@"@autoprocAutoproc.Classifier%"@.&&."@.||."@aviation-weight-balanceData.Aviation.WB.Arm.ArmRange.->.@avroData.Avro.Encoding.ToAvro.="@awesome-preludeAwesomePrelude$>"@&"@awsAws.Iam.Internal<>@aws-ec2 Aws.Query+++"@aws-sdk-xml-unorderedCloud.AWS.Lib.Parser.Unordered.-"@.<"@.="@axiomGHCJS.HPlay.Cell.=GHCJS.HPlay.View++>@@++@.~@<$@<$!>@<$>@<*@<**>@<*>@<.>@@<=<?<>@<|>@=<<?>=>?>>?>>=?\\@^. @elem@notElem@backpropNumeric.Backprop%~~@.~~ @^^. @^^.."@^^? @^^?! @Numeric.Backprop.Num%~~@.~~ @^^. @^^.."@^^? @^^?! @Numeric.Backprop.Op**."@*."@+."@-."@/."@:&@~."@Prelude.Backprop$>@<$@<$>@Prelude.Backprop.Num$>@<$@<$>@balkon/Data.Text.ParagraphLayout.ParagraphConstruction>|@>|<@|<@|<>|@ballast Ballast.Types-&-"@bamboo Bamboo.Helper^^"@base-Control.Applicative*>@<$@<$>@<*@<**>@<*>@<|>@ Control.Arrow &&&@***@+++@<+>@<<<?<<^?>>>?>>^?^<<?^>>?|||@Control.Category."@<<<?>>>? Control.Monad<$@<$!>@<=<?=<<?>=>?>>?>>=?Control.Monad.Instances<$@>>?>>=? Data.Bits!<<. @!>>. @.&.@.<<. @.>>. @.^.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@ Data.Bool&&@||@ Data.Complex:+@Data.Eq/=@==@ Data.Foldableelem@notElem@ Data.Function$&?."@on Data.Functor$>@<$@<$>@<&>?Data.Functor.ComposeCompose"@Data.Functor.Contravariant$<@>$@>$$<@>$<@ Data.List!!"@!?"@++@\\@elem@notElem@Data.List.NonEmpty!!"@:|@<|@ Data.Monoid<>@Data.Ord<@<=@>@>=@ Data.Ratio%@Data.Semigroup<>@Data.Type.Bool&&@||@Data.Type.Equality:~:@:~~:@==@~@~~@ Data.Type.Ord<@<=@<=?@@>=@>=?@>?@ Data.Typeable:~:@:~~:@GHC.Arr!"@//"@GHC.Base.$$!&&@*#@*##@**##"@*>@+#@+##@++@-#@-##@."@/##@/=@/=#@/=##@:|@<@<#@<##@<$@<*@<**>@<*>@<=@<=#@<=##@<>@<|>@=<<?==@==#@==##@>@>#@>##@>=@>=#@>=##@>>?>>=?seq||@~@~~@GHC.Bits .&.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@GHC.Concparpseq GHC.Conc.Syncparpseq GHC.Desugar>>>"@GHC.Exts*#@*##@**##"@+#@+##@-#@-##@/##@/=#@/=##@<#@<##@<=#@<=##@==#@==##@>#@>##@>=#@>=##@seq~@~~@ GHC.Float** @ GHC.Generics:*:@:+:@:.:@GHC.IO.SubSystem@GHC.List!!"@!?"@++@elem@notElem@GHC.Num*@+@-@GHC.Real %@/@:%"@^ @^%^"@^^ @^^%^^"@div@mod@quot@rem@ GHC.TypeError:$$:@:<>:@ GHC.TypeLits *@+@-@:$$:@:<>:@<=@<=?@Div@Mod@^ @ GHC.TypeNats*@+@-@<=@<=?@Div@Mod@^ @Numeric** @Prelude%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@Text.ParserCombinators.ReadP+++@<++@Text.ParserCombinators.ReadPrec+++"@<++"@Type.Reflection:~:@:~~:@ base-compat Control.Monad.Compat<$@<$!>@<=<?=<<?>=>?>>?>>=?Data.Bits.Compat!<<. @!>>. @.<<. @.>>. @.^.@Data.Function.Compat&?Data.Functor.Compat$>@<$@<&>?Data.List.Compat!?"@Data.List.NonEmpty.Compat!!"@:|@<|@Data.Monoid.Compat<>@Data.Semigroup.Compat<>@Prelude.Compat%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@base-compat-batteriesControl.Monad.Compat<$@<$!>@<=<?=<<?>=>?>>?>>=?Data.List.NonEmpty.Compat!!"@:|@<|@Data.Monoid.Compat<>@Data.Semigroup.Compat<>@Data.Type.Equality.Compat:~:@:~~:@==@~~@ base-prelude BasePreludeN!!"@$$!$<@$>@%@&?&&@&&&@*@** @***@*>@+@++@+++@-@."@.&.@.|.@/@/=@:+@:|@:~:@:~~:@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<+>@<<<?<<^?<=@<=<?<>@<|>@=<<?==@>@>$@>$$<@>$<@>=@>=>?>>?>>=?>>>?>>^?Compose"@\\@^ @^<<?^>>?^^ @div@elem@mod@notElem@onparpseqquot@rem@rotate @rotateL @rotateR @seqshift @shiftL @shiftR @xor@||@|||@BasePrelude.DataTypes:+@:|@BasePrelude.Operators($$!$<@$>@%@&?&&@*@*>@+@-@."@.&.@.|.@/@/=@<@<$@<$>@<&>?<*@<**>@<*>@<=@<=<?<>@<|>@=<<?==@>@>$@>$$<@>$<@>=@>=>?>>?>>=?^ @^^ @||@base-unicode-symbols Control.Applicative.Unicode∅"@⊛@Control.Arrow.Unicode⁂@⋘?⋙?⧻@⫴@Control.Category.Unicode∘"@⋘?⋙?Control.Monad.Unicode=≪?↢?↣?≫?≫=?Data.Bool.Unicode¬"@∧@∨@⊻@⊼@⊽@Data.Eq.Unicode≠@≡@≢@Data.Foldable.Unicode∈@∉@∋@∌@Data.Function.Unicode∘"@Data.List.Unicode ‼"@∆"@∈@∉@∋@∌@∖"@∩@∪@⧺@Data.Monoid.Unicode∅"@⊕@Data.Ord.Unicode≤@≥@≮@≯@Prelude.Unicode¬"@×@÷@‼"@∈@∉@−@∘"@∣@∤@∧@∨@≠@≡@≢@≤@≥@≮@≯@⊥"@⋅@⧺@basement Basement.Bits.&.@.<<. @.>>. @.^.@.|.@rotateL @rotateR @Basement.Compat.Base$$!&&@*>@."@/=@<@<$@<$>@<*@<*>@<=@<>@==@>@>=@>>?>>=?seq||@Basement.Compat.ExtList!!"@Basement.Compat.Semigroup<>@Basement.Imports$$!&&@*>@."@/=@<@<$@<$>@<*@<*>@<=@<>@==@>@>=@>>?>>=?seq||@ Basement.Nat*@+@-@<=@<=?@^ @Basement.Numerical.Additive+@!Basement.Numerical.Multiplicative*@/@^ @Basement.Numerical.Subtractive-@Basement.Types.OffsetSize+."@.==#"@Basement.Types.Word128*"@+"@-"@Basement.Types.Word256*"@+"@-"@ basement-cd Basement.Bits.&.@.<<. @.>>. @.^.@.|.@rotateL @rotateR @Basement.Compat.Base$$!&&@*>@."@/=@<@<$@<$>@<*@<*>@<=@<>@==@>@>=@>>?>>=?seq||@Basement.Compat.ExtList!!"@Basement.Compat.Semigroup<>@Basement.Imports$$!&&@*>@."@/=@<@<$@<$>@<*@<*>@<=@<>@==@>@>=@>>?>>=?seq||@ Basement.Nat*@+@-@<=@<=?@^ @Basement.Numerical.Additive+@!Basement.Numerical.Multiplicative*@/@^ @Basement.Numerical.Subtractive-@Basement.Types.OffsetSize+."@.==#"@Basement.Types.Word128*"@+"@-"@Basement.Types.Word256*"@+"@-"@basenData.BaseN.Internal!!"@@ basex-clientBaseXClient.Utils<$$>"@ basic-prelude BasicPrelude++@ CorePrelude"$$!&&@&&&"@*"@**"@***"@*>"@+"@-"@."@/"@/="@<"@<$"@<$>@<*"@<*>"@<.>@@<="@<>@<|>"@=<<?=="@>"@>="@>=>?>>"@>>="@^ @^^ @on||@bdcsBDCS.DB==?@BDCS.Utils.Monad>>??bddTest.Bdd^?="@beamDatabase.Beam.Backend.Sqlite3++."@Database.Beam.Query&&."@/=."@<."@<=."@==."@>."@>=."@||."@ beam-coreDatabase.Beam.Query&&.@&&?.@**. @/=*.@/=.@/=?.@<*.@<-.@<.@<=*.@<=.@<|>.@==*.@==.@==?.@>*.@>.@>=*.@>=.@between_@div_@inQuery_@in_@like_@mod_@ similarTo_@||.@||?.@Database.Beam.Schema.Tables:*:@ beam-postgresDatabase.Beam.Postgres!."@!~*."@!~."@#>"@#>>"@++."@-&&-"@-&<-"@-&>-"@-*-"@-+-"@--|--"@-.-"@-<<-"@-<@-"@->#"@->$"@->>#"@->>$"@->>-"@-@>"@-@>-"@<@"@<@-"@?"@?&"@?|"@@>"@@@"@~*."@~."@beam-thDatabase.Beam.TH.Internal<+>@<~>@~>@ bearriverFRP.BearRiver.Basic-->-:>-=>>-->=-FRP.BearRiver.DelaysfbyFRP.BearRiver.Eventattach @gate @joinE@lMerge@merge@rMerge@tag @FRP.BearRiver.Task abortWhentimeOut FRP.Yampa!&&&@***@*^"@+++@-->-:>-=><+>@<<<?<<^?>-->=->>>?>>>^"@>>^?^+^@^-^@^/"@^<<?^>>?^>>>"@ abortWhenattach @dot@fbygate @joinE@lMerge@merge@rMerge@tag @timeOut|||@bed-and-breakfastNumeric.Matrix<->"@<|>"@ bench-showBenchShow.Internal.Pretty<+>@bencodeData.BEncode.Parser<|>@ bencoding Data.BEncode.:@.=!@.=?@<$>!@<$>?@<*>!@<*>?@ benri-hspecTest.Hspec.BenriendsJust?endsLeft? endsRight?endsThen? berkeleydbData.BerkeleyDB!"@berp Berp.Base %"@*"@+"@-"@."@/"@<"@<="@=:"@=="@>"@>="@@@"@besoutBezout+:"@betweenData.Function.Between.Lazy<^@@^"@<^@@^>"@<^@^"@<^@^>"@<^@~"@<~@@~"@<~@@~>"@<~@~"@<~@~>"@^@@^"@^@@^>"@^@^"@^@^>"@^@~"@~$$~"@~$~"@~@@^"@~@@^>"@~@@~"@~@@~>"@~@~"@~@~>"@Data.Function.Between.Strict<^@@^"@<^@@^>"@<^@^"@<^@^>"@<^@~"@<~@@~"@<~@@~>"@<~@~"@<~@~>"@^@@^"@^@@^>"@^@^"@^@^>"@^@~"@~$$~"@~$~"@~@@^"@~@@^>"@~@@~"@~@@~>"@~@~"@~@~>"@%Data.Function.Between.Strict.Internal."@ bidirectional Data.IParser.="@ bifunctorControl.Categorical.Bifunctor<***>@<⁂>@ bifunctorsData.Biapplicative*>>@<<$>>@<<*@<<**>>@<<*>>@Data.Bifunctor.Functor:->bimap Data.Bimap!"@!>"@!?"@!?>"@binData.Wrd.&."@.|."@binary-communicatorData.BinaryCom+|"@binary-indexed-treeData.BinaryIndexedTree!"@Data.BinaryIndexedTree.ST!"@binary-parsersData.Binary.Parser binary-treeData.Tree.Binary.Leafy:*:"@ binarydeferData.Binary.Defer<<"@<>"@>>="@bio Bio.Sequence!"@Bio.Sequence.SeqData!"@?"@ biohazardBio.Adna:->"@bang @ Bio.Bam.Rec:*"@Bio.Base:!:@pow @ Bio.PreludeJ!!"@$$!$>@%@&?&&@&&&@*@** @***@*>@+@++@+++@-@."@.&.@.|.@/@/=@:+@:|@:~:@:~~:@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<+>@<<<?<<^?<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>?>>^?\\@^ @^<<?^>>?^^ @div@elem@ hashWithSaltmod@notElem@onparpseqquot@rem@rotate @rotateL @rotateR @seqshift @shiftL @shiftR @xor@||@|||@ Bio.Streaming:>@<|>@Compose"@Bio.Util.Numeric<#>@bioinformatics-toolkitBio.RealWorld.ENCODE&"@|!"@|@"@Bio.Utils.BitVector!"@bishbosh"BishBosh.Evaluation.QuantifiedGame<=>@===@BishBosh.Model.Game/~@=~@ bit-vectorData.Vector.Bit==~"@ bitcoin-hsBitcoin.Crypto.EC.Projective=~=@bitcoin-payment-channelBitcoin.BIP32.DetDerive/:|"@Bitcoin.Internal.Util<>@bitcoin-scriptingLanguage.Bitcoin.Miniscript.:"@bitsetData.BitSet.Dynamic\\"@Data.BitSet.Generic\\"@Data.BitSet.Word\\"@ bitstreamData.Bitstream !!"@append@elem@notElem@∅"@∈@∉@∋@∌@⧺@Data.Bitstream.Generic !!"@append@elem@notElem@∅"@∈@∉@∋@∌@⧺@Data.Bitstream.Lazy !!"@append@elem@notElem@∅"@∈@∉@∋@∌@⧺@bitwiseData.Array.BitArray!"@!!!"@!?"@//"@ bitwise-enum Data.Enum.Set\\"@Data.Enum.Set.Base\\"@ bizzleludePrelude*$$!$>@&&@&&&@&>"@&>="@*@** @***@*>@+@-@."@/@/=@<@<$@<$>@<&>"@<*@<*>@<=@<>@<|>@==@>@>=@>=>@>>?>>=?>>>@^ @^^ @div@elem@mod@onquot@rem@|>?||@ bizzlelude-js Bizzlelude<&>"@|>"@ blank-canvasGraphics.Blank#blasData.Matrix.Class.IMatrix<**>"@<*>"@Data.Matrix.Class.ISolve<\>"@<\\>"@Data.Tensor.Class.ITensor!"@*>"@//"@Data.Vector.Dense<.>"@blaze-html-contribText.Blaze.Extra!#"@!."@ blaze-markup Text.Blaze!"@!?"@Text.Blaze.Internal!"@!?"@ blazeMarkerControl.Monad.FreeMarker $<"@$<<"@&~"@+~"@-~"@<=~"@<~"@=~"@>:"@>=~"@>~"@blazeT Text.BlazeT!"@!?"@Text.BlazeT.Internal!"@!?"@bleBluetooth.Internal.Types"@blubber-serverBlubber.Server.Vector^*^"@^+^"@^-^"@^/^"@ blucontrol Blucontrol!>@Blucontrol.Monad.Control.Concat!>@$Blucontrol.Monad.PrepareValue.Linear:.@:|@==>@bludigonBludigon!>@Bludigon.Control.Concat!>@Bludigon.Gamma.Linear:.@:|@==>@bluefin Bluefin.Eff:&"@ Bluefin.Pipes<-<@<~@>->@>~@~<@~>@bluefin-internalBluefin.Internal:&"@Bluefin.Internal.Pipes<-<@<~@>->@>~@~<@~>@ board-gamesGame.Mastermind.CodeSet#*&@*&@ boardgame Boardgameunless @boltData.PackStream.!="@.:"@.:?"@.="@Database.Bolt.Protocol.Ver1#:"@#:?"@#="@!Database.Bolt.Protocol.Ver1.Types#:"@#:?"@#="@boltzmann-samplersBoltzmann.Data.Oracle#!"@?"@?!"@Boltzmann.Species<.>"@ bookhoundBookhound.ParserCombinators ->>-@<#>@@<:>@@|*"@|+"@|++"@|?"@||*"@||+"@||++"@||?"@ bookkeeper Bookkeeper%:@&?=:@?:@Bookkeeper.Internal%:@=:@?:@ boolean-likeCombinator.Booly<&<"@<^>"@<|<"@>&>@>|>@boolexpr Data.BoolExpr/\"@\/"@boomboxData.Boombox.Boombox>-$"@>->"@@-$"@@->"@@.$"@ boomerangText.Boomerang.Combinators<>@Text.Boomerang.ErrorText.Boomerang.HStack:- @Text.Boomerang.Prim.~"@Text.Boomerang.Strings"@Text.Boomerang.Texts"@boop Control.OOP--> @==> @Control.OOP.Base--> @-->> @==> @>--> @bootsControl.Monad.Factory<<<?<>@>>>? boots-appBoots&? boots-web Boots.Web:.@boundBound=<<<?>>>=? Bound.Class=<<<?>>>=? bound-extras Bound.ScopeT>>>>="@Control.Monad.Module>>==? bound-simple Bound.Simple>>>="@ bounded-arrayData.Array.Bounded!"@//"@box Box.Codensity<$|><*|>@boxesText.PrettyPrint.Boxes/+/"@//"@<+>"@<>"@bpathPath"@ Path.Internal"@ breakpointDebug.Breakpoint.GhcFacade $$"@$+$"@*>@<$>@<*@<*>@<+>"@<.>"@<>"@SynFunasJoinId?asJoinId_maybe?consBag@ idCafInfo? mkCoreApp@ mkCoreApps@mkFunTy@ mkInvisFunTy@mkVisFunTyMany@ setIdArity?setIdCallArity? setIdCbvMarks? setIdCprSig?setIdDemandInfo? setIdDmdSig? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdUnfolding?setInlineActivation?setInlinePragma?snocBag@brick Brick.Forms@@=@ Brick.Typeszoom@Brick.Widgets.Core<+>"@<=>"@bricks Bricks.Term/@@\"@/@\"@|->"@bricks-internalBricks.Internal.Prelude<&>?Bricks.Internal.Seq<|@|>@ bricks-syntaxBricks.Expression.Construction&?<>@brittany9Language.Haskell.Brittany.Internal.Config.Types.Instances.:?="@*Language.Haskell.Brittany.Internal.Prelude.$$!$>@%@&?&&@&&&@*@** @***@*>@+@++@-@."@/@/=@:|@<@<$@<$!>@<$>@<*@<*>@<<<?<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>?^ @div@elem@mod@notElem@quot@rem@seq||@/Language.Haskell.Brittany.Internal.PreludeUtils.>"@<&!>"@<&>@broadcast-chan-testsBroadcastChan.Test@=??@?@?=?bson Data.Bson!?"@:==:=?btc-lsp BtcLsp.Import;$@$!$!!$>@%@%~@&?&&@&&&@*@** @*>@+@++@-@."@... @.~@/@/=@:%"@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=??:Compose"@^ @^%^"@^. @^.. @^? @^^ @^^%^^"@div@ hashWithSaltmod@quot@rem@seqxor@||@BtcLsp.Import.External;$@$!$!!$>@%@%~@&?&&@&&&@*@** @*>@+@++@-@."@... @.~@/@/=@:%"@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=??:Compose"@^ @^%^"@^. @^.. @^? @^^ @^^%^^"@div@ hashWithSaltmod@quot@rem@seqxor@||@BtcLsp.Import.Psql!=.@&&.@+=.@/=.@<.@=.@==.@>.@>=.@?."@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@||.@ BtcLsp.Yesod.Import.NoFoundationP!=.@$$!$!!$$$$+$$++$$+-$=?$=+?$>@%@&&@&&&@*@** @***@*=.@*>@+@++@+=.@-@-=.@."@.:"@.= @.|@/@/<-.@/=@/=.@:#:"@<@<$@<$>@<&&>@<&>?<*@<**>@<*>@<-.@<.@<.>@@<=@<=.@<=<?<>@<|@<|>@<||>@=$@=$$+=$$++=$$+-=$=@=.@=<<?==@==.@>@>.@>=@>=.@>=>?>>?>>=?\\"@^ @^^ @div@ hashWithSaltmod@onquot@rem@seq||@||.@ buchhaltungBuchhaltung.Utils<&>Buchhaltung.ZipEdit2??"@buffer-builderData.BufferBuilder.Json.= @.=# @row @buffon-machinesData.Buffon.Machine/\"@\/"@bugzillaWeb.Bugzilla.Search .&&."@./=."@./=~."@.<."@.<=."@.==."@.=~."@.>."@.>=."@.||."@bugzilla-redhatWeb.RedHatBugzilla.Search .&&.@./=.@./=~."@.<.@.<=.@.==.@.=~."@.>.@.>=.@.||.@ build-env BuildEnv.Path<.>@@ buildableData.Buildable<|"@|>"@buildboxBuildBox.Data.Log<|"@><"@|>"@BuildBox.Pretty%"@%%"@bulletPhysics.Bullet.Raw.C2HS .&.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@ bulletproofsBulletproofs.Utils^+^"@^-^"@busterApp.DebugEventBus<~<"@>~>"@|~|"@ App.EventBus<~<"@>~>"@|~|"@bvData.BitVector!."@#@/=.@<.@<<. @<<<. @<=.@==.@>.@>=.@>>. @>>>. @@."@@:"@@@"@ashr @rol @ror @sge@sgt@shl @shr @sle@slt@ bytebuildData.Bytes.Builder.Boundedappend"@ bytesmithData.Bytes.ParserorElse@Data.Bytes.Parser.Rebindable>>"@>>="@ bytestringData.ByteString!?"@cons@snoc@Data.ByteString.Builder.Prim>$<@>*<@%Data.ByteString.Builder.Prim.Internal>$<@>*<@Data.ByteString.Char8!?"@cons@snoc@Data.ByteString.Lazy!?"@cons@cons'@snoc@Data.ByteString.Lazy.Char8!?"@cons@cons'@snoc@Data.ByteString.Short!?"@cons@snoc@Data.ByteString.Short.Internal!?"@cons@snoc@bytestringparser!Data.ParserCombinators.Attoparsec"@'Data.ParserCombinators.Attoparsec.Char8"@*Data.ParserCombinators.Attoparsec.Internal"@bytestringparser-temporary!Data.ParserCombinators.Attoparsec"@'Data.ParserCombinators.Attoparsec.Char8"@*Data.ParserCombinators.Attoparsec.Internal"@bytestringreadp'Text.ParserCombinators.ReadP.ByteString+++"@<++"@c-dslLanguage.C.DSL.Decl.="@Language.C.DSL.Exp !"@#"@&"@&*"@/=:"@<--"@<:"@<=:"@==:"@>:"@>=:"@ cabal-cache HaskellWorks.CabalCache.Location<.>@@ cabal-debianDebian.Debianize.?="@Debian.Debianize.Prelude!"@.?="@ cabal-fmtCabalFmt.Prelude&?&&&@on cabal-installDistribution.Client.Compat.TarNext@Distribution.Client.Utils.Json.= @Distribution.Deprecated.ReadP+++@<++@cabal-install-solver"Distribution.Solver.Compat.Prelude+!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$>@<*@<*>@<+>@<<>>"@<=@<>@<|>@=<<?==@>@>=@>>?>>=?^ @^^ @deepseqdiv@elem@mod@notElem@onquot@rem@seq||@~@#Distribution.Solver.Modular.Version.&&."@.||."@ cabal-queryDistribution.Query:&"@:|"@cafeteria-prelude Prelude.Basic$"@."@Prelude.List.Partial!!"@Prelude.List.Total++"@Prelude.Number.Float**"@Prelude.Number.Num*"@+"@-"@Prelude.Number.Real/"@^"@^^"@Prelude.Source.Control.Monad=<<"@Prelude.Source.GHC.Base$"@++"@."@>>"@>>="@Prelude.Source.GHC.Classes&&"@/="@<"@<="@=="@>"@>="@||"@Prelude.Source.GHC.Float**"@Prelude.Source.GHC.List!!"@Prelude.Source.GHC.Num*"@+"@-"@Prelude.Source.GHC.Real/"@^"@^^"@Prelude.Source.Prelude$!"@Prelude.Strict$!"@Prelude.TypeClass /="@<"@<="@=<<"@=="@>"@>="@>>"@>>="@ caffegraphNN.Graph>-"@>->"@ cairo-canvasGraphics.Rendering.Cairo.Canvas!@"@cake Cake.Actions++?"@ Cake.Core==>"@cake3Development.Cake3.="@"@System.FilePath.Wrapper.="@"@calamityCalamity.HTTP.Internal.Request=:?"@Calamity.HTTP.Internal.Route//@Calamity.Internal.SnowflakeMap!"@Calamity.Internal.Utils.="@.?="@<.>@<<$>>@<<*>>@calamity-commandsCalamityCommands.Internal.Utils<.>@<<$>>@<<*>>@caldimsLanguage.CalDims.Helpers#&&#"@Language.CalDims.Types#*#"@#+#"@#-#"@#/#"@#==#"@#^#"@#~#"@ calligraphyCalligraphy.Prelude++@elem@notElem@camfortCamfort.Analysis<>@Camfort.Analysis.Logger<>@Camfort.Helpers.Vec!!"@)Camfort.Specification.Stencils.PartialOrd/="@<"@<="@=="@>"@>="@Language.Fortran.Model.Util*.."@..*"@<$$>"@ can-i-hazControl.Monad.Except.CoHas<$@<$!>@<=<?=<<?>=>?>>?>>=?Control.Monad.Reader.Has<$@<$!>@<=<?=<<?>=>?>>?>>=?canonMath.NumberTheory.Canon7 <<<<<^>>>>>"@ <<<<<^^>>>>>"@ <<<<^>>>>"@ <<<<^^>>>>"@<<<^>>>"@<<<^^>>>"@<<^>>"@<<^^>>"@<^"@<^>"@<^^>"@>^"@|<^>|"@|<^^>|"@ ~<<<<^>>>>~"@ ~<<<^>>>~"@~<<^>>~"@~<^>~"@~^~"@ ~|<<<<^>>>>|~"@ ~|<<<^>>>|~"@ ~|<<^>>|~"@~|<^>|~"@~|^|~"@ ~~<<<<^>>>>~~"@ ~~<<<^>>>~~"@ ~~<<^>>~~"@~~<^>~~"@~~^~~"@~~|<<<<^>>>>|~~"@ ~~|<<<^>>>|~~"@ ~~|<<^>>|~~"@ ~~|<^>|~~"@~~|^|~~"@~~~<<<<^>>>>~~~"@ ~~~<<<^>>>~~~"@ ~~~<<^>>~~~"@ ~~~<^>~~~"@~~~^~~~"@~~~|<<<<^>>>>|~~~"@~~~|<<<^>>>|~~~"@ ~~~|<<^>>|~~~"@ ~~~|<^>|~~~"@ ~~~|^|~~~"@~~~~<<<<^>>>>~~~~"@~~~~<<<^>>>~~~~"@ ~~~~<<^>>~~~~"@ ~~~~<^>~~~~"@ ~~~~^~~~~"@~~~~|<<<<^>>>>|~~~~"@~~~~|<<<^>>>|~~~~"@~~~~|<<^>>|~~~~"@ ~~~~|<^>|~~~~"@ ~~~~|^|~~~~"@ ~~~~~^~~~~~"@Math.NumberTheory.Canon.Simple%@<^"@>^"@ capabilityCapability.Accessors:.:"@capatazControl.Concurrent.Capataz&?Control.Concurrent.Capataz.Lens&?^. @cartelCartel&&&"@|||"@ Cartel.Ast&&&"@|||"@ Cartel.Render<+>"@ cas-storeData.CAS.ContentStore:@^@casa-abbreviations-and-acronyms:Data.Aviation.Casa.AbbreviationsAndAcronyms.Render.Spacing<->"@ cascadingData.CSS.Build$="@case-insensitive-matchData.CaseInsensitive.Eq^/="@^=="@Data.CaseInsensitive.Ord^<"@^<="@^>"@^>="@cassavaData.Csv.!"@.:"@.="@cassetteText.Cassette.Prim-->"@<>"@<|>"@casterSystem.Log.Caster$:<:>@System.Log.Caster.Core$:<:>@System.Log.Caster.Monad$:<:>@catalystControl.Category.Cartesian&&&"@|||"@Control.Category.Monoidal***"@+++"@<+>"@ categoriesControl.Category.Cartesian&&&"@|||"@categoryControl.Categorical.Functor<$>@Control.Categorical.Monad<=<?=<=?=>=?>=>?category-extrasControl.Allegory.<=."@Control.Category.Cartesian&&&"@|||"@Control.Comonad.>>"@=>>"@Control.Functor.Zap>$<"@>>$<<"@Control.Monad.HigherOrder=**<<"@>>**="@Control.Monad.Indexed=<<<"@>>>="@Control.Monad.Parameterized=*<<"@>>*"@>>*="@cayley-dicksonMath.CayleyDickson**."@*."@+."@-."@.*"@.+"@.-"@/."@ cdar-mBoundData.CDAR.Dyadic:^ @cefSystem.Log.CEF<>"@cflpCFLP!"@:!"@?"@CFLP.Constraints.Boolean.&&."@.||."@CFLP.Types.Bool==="@CFLP.Types.List^:"@cfn-flipCfnFlip.Prelude%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@ chalkboardGraphics.Chalkboard.Board*>"@<*"@<*>"@chalmers-lava2000Lava.Operators %%"@<#>@<&>@<==@<==>@<=>@<|>@==>@>>=="@|->? Lava.Patterns->-@-|-@charset Data.CharSet\\"@chassisChassis$$>@&?&&&@***@."@/=@:&@:."@:|@<@<$@<$>@<*>@@<<<?<<=?<=@<>@=<<?==@=>=?>@>$<@>=@>=>?>>?>>=?>>>?chattyText.Chatty.Interactor.<$."@.|."@Text.Chatty.Printer.>."@.>>."@Text.Chatty.Scanner.<."@.<<."@ chatty-textText.Chatty.Parser??"@???"@ chatty-utilsData.Chatty.Hetero:-:"@Data.Chatty.ListBuilder>-<"@checkersTest.QuickCheck.Checkers.&.?=-=@Test.QuickCheck.Instances.Tuple>****<"@>***<"@>**<"@>*<"@ chez-graterChez.Grater.Internal.Prelude<|>@chiphunk Chiphunk.Low$=@choraleChorale.Common.* @.** @.*** @<<"@chpControl.Concurrent.CHP.Alt<&>"@<->"@"@Control.Concurrent.CHP.Parallel<|*|>"@<||>"@chp-plusControl.Concurrent.CHP.Arrow*&&&*"@*****"@*<<<*"@*>>>*"@Control.Concurrent.CHP.Connect<=>"@<=>|"@|<=>"@|<=>|"@Control.Concurrent.CHP.Test=*="@chp-specControl.Concurrent.CHPSpec.Alt<->"@"@)Control.Concurrent.CHPSpec.LazySmallCheck><"@\/"@#Control.Concurrent.CHPSpec.Parallel<|*|>"@<||>"@chr-coreCHR.Types.Rule/\@<==>@<=>@<=>>"@<\>@<\>>"@=!@=!!@==>@==>>"@=@@=|@@=?\!@\/@|>@chr-dataCHR.Data.FastSeq:++:"@:+::"@::+:"@CHR.Data.Lens.FCLabels=$:@=$^:@=.@=:@^$=@^*"@^. @^=@CHR.Data.Lens.MicroLens=$:@=$^:@=:@^$=@^*"@^. @^=@CHR.Data.VarMp varmpPlus@|\>"@ chr-pretty CHR.Pretty>#<@>-#-<@>-<@>-|-<@>|<@chronosChronos...@ church-listData.Church.List!!"@\\"@churrosControl.Churro&&&@***@<<<?>>>?Control.Churro.Types>>>>"@circle Circle.Types-&-"@circuit-notationCircuit:->:>!@ citeproc-hsText.CSL.Eval.Names<+>"@Text.CSL.Eval.Output<++>"@Text.CSL.Output.Plain<+>"@<>"@claferLanguage.Clafer.Front.AbsClafer>-"@ Language.Clafer.Generator.Concat+++@'Language.Clafer.Intermediate.TypeSystem+++"@clashCLasH.HardwareTypes!"@++"@+>"@<+"@ clash-libClash.Rewrite.Combinators!->@>-!@>-!->@>->@Data.Text.Prettyprint.Doc.Extra<+>@clash-lib-hedgehogClash.Hedgehog.Core.Monad<|>@ clash-preludeClash.Class.BitPack!"@Clash.Class.BitPack.BitIndex!"@Clash.Class.Exp^"@Clash.Class.HasDomain.Common:$$$:@:++:@:<<>>:@Clash.Explicit.Prelude !!"@++@+>>@:<@:>@<<+@Cons@seqVseqVXClash.Explicit.Prelude.Safe !!"@++@+>>@:<@:>@<<+@Cons@seqVseqVXClash.Explicit.Signal.&&.@./=.@.<.@.<=.@.==.@.>.@.>=.@.||.@Clash.HaskellPrelude!$$!&&@*@** @*>@+@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^^ @div@elem@mod@notElem@quot@rem@seq||@ Clash.Prelude!!"@++@+>>@.&&.@./=.@.<.@.<=.@.==.@.>.@.>=.@.||.@:<@:>@<<+@<^>"@Cons@regMaybe@register@ registerB@seqVseqVXClash.Prelude.Mealy<^>"@Clash.Prelude.Safe !!"@++@+>>@:<@:>@<<+@<^>"@Cons@ registerB@seqVseqVXClash.Promoted.NataddSNat@divSNat@modSNat@mulSNat@powSNat @subSNat@ Clash.Signal .&&.@./=.@.<.@.<=.@.==.@.>.@.>=.@.||.@regMaybe@register@Clash.Signal.Internal .&&.@./=.@.<.@.<=.@.==.@.>.@.>=.@.||.@:-@Clash.Sized.BitVector++#"@+>>.@.<<+@Clash.Sized.Internal.BitVector*#"@+#"@++#"@-#"@Clash.Sized.Internal.Index*#"@+#"@-#"@Clash.Sized.Internal.Signed*#"@+#"@-#"@Clash.Sized.Internal.Unsigned*#"@+#"@-#"@Clash.Sized.Vector !!"@++@+>>@:<@:>@<<+@Cons@seqVseqVXClash.Verification.DSL#|#@|&|@|->?|=>?|||@~>Clash.XExceptiondeepseqX defaultSeqXhwSeqX seqErrorXseqXClash.XException.MaybeXandX@orX@ clash-shake Clash.Shake|>"@classy-effects-base'Control.Effect.Class.Machinery.HFunctor:&:@:+:@:<:@:=:@classy-prelude ClassyPrelude/$$!$!!&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$>@<&&>@<*@<**>@<*>@<.>@@<=@<=<?<>@<|>@<||>@=<<?==@>@>=@>=>?>>?>>=?\\"@^ @^^ @div@ hashWithSaltmod@onquot@rem@seq||@classy-prelude-conduitClassyPrelude.Conduit $$$$+$$++$$+-$=?$=+?.|@=$@=$$+=$$++=$$+-=$=@clayClay#"@$="@&@**"@*="@-:@"@|~"@~="@Clay.BoxbsColor"@ Clay.Color*.@+.@-.@ Clay.Comments commenting@ Clay.Property!"@ Clay.Selector #"@$="@**"@*="@@="@^="@|+"@|="@|>"@|~"@~="@ Clay.Size*@@@*@@+@@@-@@@/@Clay.Stylesheet&@-:@"@||>"@cleffCleff++@:>:>>Cleff.Internal++@Cleff.Internal.Monad:>:>>Cleff.Internal.Rec++@:>clerkClerk+>@|$||*|@|+|@|-|@|/|@|:|@|^| @ clevelandTest.Cleveland?-@/=?@==?@@/=?@@==?Test.Cleveland.Internal.Actions@/=?@==?@@/=?@@==?*Test.Cleveland.Internal.Actions.Assertions@/=?@==?@@/=?@@==?Test.Cleveland.Util?-clif Clif.Algebra*:"@.|. @/> @/\ @<.> @<\ @ Clif.Internal*:"@.: @clist Data.CList:.@closedClosedequals@Closed.Internalequals@ clustering AI.Clustering.Hierarchical.Types!"@cmdargsSystem.Console.CmdArgs.Annotate&=@+=@:=@:=+"@System.Console.CmdArgs.Implicit&="@+=@:=@System.Console.CmdArgs.Quote&=#"@cmdlibSystem.Console.CmdLib%%"@%+"@%:"@%>"@+%"@<%"@<+<"@cmt Cmt.Utility"@ co-log-coreColog.Core.Action &>@*<@<&@<<=?=>>?>$@>$<@>*@>*<@>|<@cobot Bio.Chain!"@//"@cobot-ioBio.Sequence.Functions.Sequence!"@!?"@ Bio.Utils.Map!?!"@Bio.Utils.Vector!?!"@ code-builder Code.Build <++>"@<+>"@<+|"@<->"@><"@><|"@|>+<|"@|><"@|><|"@Code.Build.Haskell.=."@Code.Build.JavaScript.=."@Code.Build.PHP.=."@Code.Build.Ruby.=."@ code-conjureConjure.Engine$$"@$$<"@-$-@-%-"@-&&-@-*-@-++-@-+-@--.."@--..-"@-.-"@-.."@-..-"@-/=-@-:-@-<-@-<=-@-==>--?-"@-|-"@-||-@//"@//-"@:$"@>$$"@>$$<"@ Conjure.Expr$!!"@$$"@$$**"@$$<"@$$|<"@-$-@-%-"@-&&-@-*-@-++-@-+-@--.."@--..-"@-.-"@-.."@-..-"@-/=-@-:-@-<-@-<=-@-==>--?-"@-|-"@-||-@//"@//-"@:$"@>$$"@>$$<"@ Conjure.Utils+++@codecControl.Monad.Codec=."@codeforces-cliCodeforces.Logging<~>"@ codeworld-api CodeWorld&<>@CodeWorld.Reflex&<>@ coerce-utilData.Coerce.Util#."@.#"@coercible-subtypesData.Type.Coercion.SubarrR?prodR@sumR@coercible-utilsCoercibleUtils#."@.#"@CoercibleUtils.Compose#."@.#"@cognimeta-utilsCgm.Control.Combinators./"@.//"@.///"@.////"@Cgm.Control.InFunctor$*"@>$<"@Cgm.Data.Functor<$$>"@Cgm.Data.Monoid◊"@coinbase-exchangeCoinbase.Exchange.Types.Socket.:??"@coincident-root-lociMath.RootLoci.Geometry.Mobius./=."@.<."@.<=."@.==."@.>."@.>=."@ coinor-clpNumeric.COINOR.CLP.*@<=.@==.@>=.@>=<.@ collada-types#Graphics.Formats.Collada.Vector2D3D *."@<>@cross@dot@parv@turn@turnL@turnNL@turnNR@turnR@collect-errorsControl.CollectErrors~!"@Control.CollectErrors.Type~!"@Numeric.CollectErrors~!"@ collectionsData.Collections!"@//"@<|"@><"@\\"@|>"@ Data.Map.AVL!"@\\"@Data.Ranged.Boundaries/>/"@Data.Ranged.RangedSet-!-"@-/\-"@-<-"@-<=-"@-?-"@-\/-"@ Data.Set.AVL\\"@ Data.Set.Enum\\"@ Data.Trie!"@collections-apiData.Collections!"@//"@<|"@><"@\\"@|>"@colorful-monoidsData.Monoid.Colorful<>@Data.Monoid.Colorful.Flat<>@ colorlessColorless.Client.Expr-<"@<.>"@<:"@<:>"@columbiaData.Columbia.CompoundData##."@#."@ comark-parserComark.ParserCombinators@Comark.ParserCombinators.Prim@combinatMath.Combinat.ASCII==="@|||"@Math.Combinat.Permutations!!!"@multiplyPermutation@combinat-compatMath.Combinat.ASCII==="@|||"@Math.Combinat.Permutationsmultiply@combinator-interactiveData.Combinator:$"@ combobufferData.RingBuffer!"@Data.RingBuffer.Class!"@Data.RingBuffer.MapBuffer!"@Data.RingBuffer.SeqBuffer!"@ comfort-arrayData.Array.Comfort.Boxed!"@//"@append@"Data.Array.Comfort.Boxed.Unchecked!"@append@Data.Array.Comfort.Shape::+@Data.Array.Comfort.Storable!"@//"@append@ Data.Array.Comfort.Storable.Dim2&===@&|||@above@beside@#Data.Array.Comfort.Storable.Private!"@//"@%Data.Array.Comfort.Storable.Unchecked!"@//"@append@ comfort-blasNumeric.BLAS.Matrix.RowMajorabove@beside@Numeric.BLAS.Vector+++@-*|@.*|@add@append@sub@|+|@|-|@Numeric.BLAS.Vector.Sliceadd@sub@ comfort-glpk Numeric.GLPK.*"@<=."@==."@>=."@>=<."@ commander-cliOptions.Commander&@+@<+>@ commutativeData.Commutative<~>"@comonadControl.Comonad $>@<$@<$>@<<=?<@@<@>@<@@>@=<=?=>=?=>>?@>@ compaRESTData.OpenApi.Compare.Paths<<<?>>>?Snoc@Data.OpenApi.Compare.Subtree<<<?>>>? compact-mapData.CompactMap!"@compact-sequences!Data.CompactSequence.Deque.Simple:<@cons@snoc@|>@*Data.CompactSequence.Deque.Simple.Internal:<@<|"@cons@snoc@|>@!Data.CompactSequence.Queue.Simple:<@snoc@|>@*Data.CompactSequence.Queue.Simple.Internal:<@snoc@|>@!Data.CompactSequence.Stack.Simple:<@<|@cons@*Data.CompactSequence.Stack.Simple.Internal:<@<|@cons@compact-stringData.CompactString.Internal:*:"@compact-string-fixData.CompactString.Internal:*:"@comparseControl.Monad.Parser.Class?<|>@compdataData.Comp.Annotation:&:@:*: @Data.Comp.Mapping&|->?Data.Comp.Multi.Annotation:&:@Data.Comp.Multi.HFunctor:->:.:@:=>Data.Comp.Multi.Mapping&|->?Data.Comp.Multi.Ops:&:@:*: @:+:@:<:@:=:@Data.Comp.Multi.Projection:*: @:<@Data.Comp.Multi.Sum:+:@:<:@Data.Comp.Multi.Variables&|->? Data.Comp.Ops:&:@:*: @:+:@:<:@:=:@Data.Comp.Projection:<@ Data.Comp.Sum:+:@:<:@:=:@Data.Comp.Thunk#>?#>>?Data.Comp.Variables&|->?compdata-automataData.Comp.Automata&>*<"@|*|"@|->?Data.Comp.MacroAutomata:^:"@ compdata-dags Data.Comp.AG&"@>*<"@|*|"@|->"@Data.Comp.Dag.AG&"@>*<"@|*|"@|->"@Data.Comp.Dag.PAG&"@:*:"@>*<"@|*|"@|->"@ Data.Comp.PAG&"@:*:"@>*<"@|*|"@|->"@compdata-fixplateData.Comp.Fixplate.: @.:. @.:: @.::. @.::: @:+:@:<:@compdata-paramData.Comp.Param.Annotation:&:"@:*:"@ Data.Comp.Param.Multi.Annotation:&:"@:*:"@Data.Comp.Param.Multi.Ops:&:"@:*:"@Data.Comp.Param.Ops:&:"@:*:"@ compensatedNumeric.Compensated*^"@+^"@complex-genericData.Complex.Generic:+"@Data.Complex.Generic.Class*."@.*"@.+@/.@composable-associationsData.ComposableAssociation:<>"@ compose-ltr!Data.Function.Compose.LeftToRight$>"@.>"@<$"@<."@composite-baseComposite.Record:!:@:&@:*:@:^:@ compositionData.Composition.* @.** @.*** @.**** @.***** @.****** @.******* @ .******** @.: @.:. @.:: @.::. @.::: @.:::. @.:::: @.::::. @∘"@composition-extra Control.Monad.Syntax>>==@>>===@>>====@>>=====@>>======@Control.Monad.Syntax.Five=.===<<?==.==<<?===.=<<?====.<<?=====<<?Control.Monad.Syntax.Four=.==<<?==.=<<?===.<<?====<<?Control.Monad.Syntax.Six=.====<<?==.===<<?===.==<<?====.=<<?=====.<<?======<<?Control.Monad.Syntax.Three=.=<<?==.<<?===<<?Control.Monad.Syntax.Two=.<<?==<<?Data.Function.Apply-$ @--$ @---$ @----$ @"Data.Function.Contravariant.Syntax-. @-.* @-.** @-.*** @-.**** @-.***** @-.****** @ -.******* @ -.******** @-.: @-.:. @-.:: @-.::. @-.::: @-.:::. @-.:::: @-.::::. @Data.Function.Flip<----> @<---> @<--> @<-> @Data.Function.Slip<<~> @<<~~> @<<~~~> @<~>> @<~~>> @<~~~>> @Data.Function.Syntax ********. @*******. @******. @*****. @****. @***. @**. @*. @Data.Function.Twist<<<~~>> @<<<~~>>> @<<<~~~>> @ <<<~~~>>> @<<~~>> @<<~~>>> @<<~~~>> @<<~~~>>> @Data.Functor.Syntax3<$$$$$> @<$$$$$~> @ <$$$$$~~> @ <$$$$$~~~> @<$$$$> @<$$$$~> @<$$$$~~> @ <$$$$~~~> @<$$$> @<$$$~> @<$$$~~> @<$$$~~~> @<$$> @<$$~> @<$$~~> @<$$~~~> @<$~> @<$~~> @<$~~~> @<&&&&&>?<&&&&>?<&&&>?<&&>?<*.$> @<.$$$$> @<.$$$> @<.$$> @<.$> @<.*$$$$> @<.*$$$> @<.*$$> @<.*$> @ <.**$$$$> @<.**$$$> @<.**$$> @<.**$> @<~$$$$$> @<~$$$$> @<~$$$> @<~$$> @<~$> @ <~~$$$$$> @<~~$$$$> @<~~$$$> @<~~$$> @<~~$> @ <~~~$$$$$> @ <~~~$$$$> @<~~~$$$> @<~~~$$> @<~~~$> @composition-preludeControl.Composition &?&:+>@-$ @-. @.$@.* @.** @.*** @.**** @.***** @.****** @.@ @.@@ @.@@@ @.@@@@ @.@@@@@ @<&>?<**>@<-=**<?<-=*<?<=**<?<=*<?<=<?<~@~< @>-=**>?>-=*>?>=**>?>=*>?>=>?on~@~ @compound-typesCompoundTypes.Lazy*?+-/?CompoundTypes.Strict*?+-/? compstratData.Comp.Multi.Strategic+>"@>+>"@computational-algebraAlgebra.LinkedMatrix!"@<-->"@<||>"@Algebra.Matrix!"@<-->"@<||>"@Algebra.Prelude.Core%@.*. @Algebra.Ring.Ideal addToIdeal"@Algebra.Ring.Polynomial.Class!*"@*<"@*|<"@>*"@>|*"@divModPolynomial@ divPolynomial@ modPolynomial@Algebra.Scalar.*. @ computationsControl.Computation###"@+:+"@-:-"@Control.Computation.Resourceful>^"@>^^"@^>"@^^>"@ concatenativeControl.Concatenative&&."@&."@**."@*."@.&."@.*."@>>."@>>@"@concurrent-machinesData.Machine.Concurrent<~"@<~<"@>~>@~>"@condControl.Conditional <&&>@<<|<|<||>@??."@?<>@???|>|>>⊲⊳Data.Algebra.Boolean&&@-->?<-->?xor?||@conductive-baseSound.Conductive.MutableMap+@"@-@"@?@"@conduino Data.Conduino&|@.|@|.@conduit Data.Conduit $$$$+$$++$$+-$=?$=+?.|@=$@=$$+=$$++=$$+-=$=@Data.Conduit.Internal$$$$+$$++$$+-$=?$=+?.|@<+<"@=$@=$$+=$$++=$$+-=$=@>+>"@ conduit-findData.Conduit.Find=~"@conduit-resumablesinkData.Conduit.ResumableSink+$$"@++$$"@-++$$"@ conduit-vfsData.Conduit.VFS.Import&"@confererConferer.Config&?Conferer.FromConfig/."@ Conferer.Key/."@Conferer.Key.Internal/."@ config-iniData.Ini.Config.Bidir&?.=.=? config-schemaConfig.Schema.Spec@ configifierData.Configifier:*>"@>>."@ configurationData.Configuration!"@<@>"@configuration-toolsConfiguration.Utils.CommandLine %::@*>@.::@<$@<$>@<*@<**>@<*>@<|>@Configuration.Utils.ConfigFile!..:"@%.:@..:@Configuration.Utils.Internal&?<&>?Configuration.Utils.Operators%@<$<@<*<@>$>@>*>@×@conkinConkin<$>@<*>"@connection-stringData.ConnectionString!"@ connectionsData.Connection<<<?>>>?divide@select@Data.Connection.Cast<<<?>>>?divide@select@Data.Connection.Ratio:%"@ Data.Lattice// @/\@\/@\\ @xor@ Data.Order /~@<~@>~@?~@pcompare@pgt@plt@pmax@pmin@~~@Data.Order.Interval...@Data.Order.Property<=>==>?xor@Data.Order.Syntax /=@<@<=@==@>@>=@compare@ comparing@max@min@constrained-categoriesControl.Applicative.Constrained<**>@<*>@Control.Arrow.Constrained$&&&@***@+++"@<<<?>>>?|||@Control.Category.Constrained$~."@:***:@$Control.Category.Constrained.Prelude%!!"@$$!$~&&@*@** @+@++@-@."@/@/=@:***:@<@<$>@<**>@<*>@<<?<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@0Control.Category.Constrained.Reified.PolyPattern:&&&@:***@:<<<?:>>>?Control.Category.Hask#!!"@$$!&&@*@** @*>@+@++@-@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@Control.Functor.Constrained<$>@Control.Monad.Constrained<<?<=<?=<<?>=>?>>?>>=?constrained-categoryControl.Category.Constrained∘"@Data.Functor.Constrained<$>@constrained-monadsControl.Monad.Constrained *>"@<$"@<$>@<*"@<**>@<*>"@<=<?<|>"@=<<?>=>?>>?>>="@Control.Monad.Constrained.Ap>>?>>="@ Control.Monad.Constrained.IntSet\\"@ constraintData.Constraint\\"@constraint-classesControl.ConstraintClasses!"@!?"@<$>:@<*>:@<|>:@=<<:?>>=:? constraintsData.Constraint&&&"@***"@:-"@:=>"@\\?⊢"@Data.Constraint.Deferrable:~:@:~~:@Data.Constraint.NatDiv@Mod@Data.Constraint.Symbol++@constraints-derivingData.Constraint&&&"@***"@:-"@:=>"@\\?⊢"@ constrictor Constrictor<$!>@fmap'@liftM'@ construct Construct*>@<$@<*@<+>"@<|>@constructive-algebraAlgebra.Matrix!!!"@ Algebra.Structures.ExplicitUnits%|"@~="@Algebra.Structures.Field"@Algebra.Structures.Group<+>"@Algebra.Structures.Module*>"@<*"@Algebra.Structures.Ring<*>"@<+>"@<->"@<^>"@container-classesData.Containers!!"@++"@ containersData.IntMap.Internal!"@!?"@\\"@Data.IntMap.Lazy!"@!?"@\\"@Data.IntMap.Strict!"@!?"@\\"@Data.IntMap.Strict.Internal!"@!?"@\\"@ Data.IntSet\\"@Data.IntSet.Internal\\"@Data.Map.Internal!"@!?"@\\"@ Data.Map.Lazy!"@!?"@\\"@Data.Map.Strict!"@!?"@\\"@Data.Map.Strict.Internal!"@!?"@\\"@ Data.Sequence!?"@:<@:<|@:>@:|>@<|@><@|>@Data.Sequence.Internal!?"@:<@:<|@:>@:|>@<|@><@|>@Data.Sequence.Internal.SortingIQCons @ITQCons @QCons @TQCons @Data.Set\\"@Data.Set.Internal\\"@$Utils.Containers.Internal.StrictPair:*:?containers-unicode-symbolsData.IntMap.Lazy.Unicode ∅"@∆"@∈@∉@∋@∌@∖"@∩@∪@Data.IntMap.Strict.Unicode ∅"@∆"@∈@∉@∋@∌@∖"@∩@∪@Data.IntSet.Unicode∅"@∆"@∈@∉@∋@∌@∖"@∩@∪@⊂@⊃@⊄@⊅@⊆@⊇@⊈@⊉@Data.Map.Lazy.Unicode ∅"@∆"@∈@∉@∋@∌@∖"@∩@∪@Data.Map.Strict.Unicode ∅"@∆"@∈@∉@∋@∌@∖"@∩@∪@Data.Sequence.Unicode∅"@⊲@⊳@⋈@Data.Set.Unicode∅"@∆"@∈@∉@∋@∌@∖"@∩@∪@⊂@⊃@⊄@⊅@⊆@⊇@⊈@⊉@containers-verified Data.IntSet\\"@ contiguousData.Primitive.Contiguous<$"@continueControl.Monad.Continue"@ contra-tracerControl.Tracer>$@contracheck-applicativeControl.Validation.Check :*@?>@?>>@?~>@?~>>@test@test'@test'_@test_@Control.Validation.Class+?+@Control.Validation.Patch:*@ testPatch@ testPatch'@ testPatch'_@ testPatch_@contravariant-extrasContravariant.Extras>*<"@ control-block Control.Block<$>@<$?>@<&>?<&?>?<**>@ control-bool Control.Bool<&&>"@<&=>"@<|=>"@<||>"@control-dotdotdotControl.DotDotDot..."@…"@ control-dsl Control.Dsl<=<"@=<<"@>=>"@>>"@>>="@control-invariantsControl.Invariant!. @##===@Control.Precondition!"@control-monad-freeControl.Monad.Free<$!>@<=<?=<<?>=>?>>"@>>="@cookbook!Cookbook.Ingredients.Lists.Modify?"@ coordinateData.Geodetic.LL<◦>"@copilot-frp-sketchCopilot.FRPSketch.Internals=:?@:"@copilot-language Copilot.Language.Operators.Array!"@!!"@.!!"@=$ @=: @"Copilot.Language.Operators.BitWise.&.@.<<."@.>>."@.^.@.|.@"Copilot.Language.Operators.Boolean&&@==>"@||@Copilot.Language.Operators.Eq/="@=="@#Copilot.Language.Operators.Integral^"@Copilot.Language.Operators.Ord<"@<="@>"@>="@%Copilot.Language.Operators.Projection=$ @=: @!Copilot.Language.Operators.Struct#"@##"@=$ @=: @#Copilot.Language.Operators.Temporal++?Copilot.Language.Prelude$$!*@** @*>@+@-@."@/@<$@<$>@<*@<*>@<>@=<<?>>?>>=?^^ @elem@notElem@quot@rem@seq~@copilot-librariesCopilot.Library.Libraries!!!"@Copilot.Library.Utils!!"@!!!"@copilot-verifier(Copilot.Verifier.Examples.ShouldPass.WCV|*|"@~="@ core-programCore.System.Pretty<+>@core-webserver-warpCore.Webserver.Router"@corneaCornea.Prelude<!!?"@$$!$!!$<@$>@&?&&@&&&@&&^"@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<<<?<=@<=<?<>@<|>@=<<?==@>@>$@>$$<@>$<@>=@>=>?>>?>>=?>>>??:??@Compose"@^ @^^ @div@ hashWithSaltmod@onquot@rem@seqxor@||@||^"@cornelisCornelis.Offsets.+"@.-."@coroutine-objectControl.Monad.Trans.Crtn<==|"@couch-hsDatabase.CouchDB.ViewServer.Map.:"@.:?"@.="@"Database.CouchDB.ViewServer.Reduce.:"@.:?"@.="@cradleCradle&? craftwerkGraphics.Craftwerk.Core.Style<=="@<=>"@==="@==>"@crdtData.Semilatticemerge@crf-chain2-tiersData.CRF.Chain2.Tiers.Array!?"@critbitData.CritBit.Map.Lazy!"@\\"@Data.CritBit.Set\\"@ crjdt-haskell Data.Crjdt&?-<"@.>@=:@crucibleLang.Crucible.CFG.Generator::>"@Lang.Crucible.Syntax .&&@.*"@.+"@.-"@./=@.<@.<=@.==@.>@.>=@.||@ crucible-llvmLang.Crucible.LLVM.Arch.Util|->"@crux Crux.UI.JS~>? crypto-api Crypto.Util.::."@crypto-classicalCrypto.Classical.Util|.|"@cryptolCryptol.TypeCheck.Parseable$$@Cryptol.TypeCheck.Subst!$.$@@"@Cryptol.TypeCheck.TCon:->@Cryptol.TypeCheck.Type=#=@=/="@>==@tFun@Cryptol.TypeCheck.TypePat|%|"@|->|"@|-|"@|/=|"@|/|"@|=|"@|>=|"@|^|"@Cryptol.Utils.PP$$@<+>@<.>@@Cryptol.Utils.Patterns&&&"@<~"@><"@|||"@~>"@~~>"@csound-expression Csound.Base*>@<$@<$>@<**>@<*>@<|>@ Csound.TypesequalsTo@ greaterThan@greaterThanEquals@lessThan@lessThanEquals@ notEqualsTo@csound-expression-typedCsound.Typed.Types.PrimequalsTo@ greaterThan@greaterThanEquals@lessThan@lessThanEquals@ notEqualsTo@ css-selectorsCss3.Selector.Core.#"@.$="@.*="@.+"@..."@.:"@.::"@.="@.>"@.@"@.^="@.|"@.|="@.~"@.~="@:.::"@ css-simpleCss?"@|>"@ Css.Internal?"@|>"@ csv-conduitData.CSV.Conduit.Conversion.!"@.:"@.="@ cubicbezierGeom2D$*@^.^"@Math.BernsteinPoly*~@~*@~+@~-@ curl-aesonNetwork.Curl.Aeson..."@currency-convertData.Currency.Convert<|-|>"@ curry-baseCurry.Base.LLParseComb<$->@<$>@<**>@<*->@<*>@<-*>@<.>@@@<\>@<\\>@<|>@<|?>@opt@Curry.Base.LexCombthenP?thenP_?Curry.Base.Position@>"@Curry.Base.Pretty$++$"@$-$"@curry-frontend Base.Utils++!@curvesGraphics.Curves+++"@++>"@+.+"@<++"@<->"@<>"@><"@Graphics.Curves.Attribute:="@:~"@custom-prelude CustomPrelude.:"@<&>"@<@>"@cybus Cybus.Mat.:@.::@.|@.||@cypherDatabase.Cypher.Lucene.&."@.-."@.<."@.=."@.>."@.|."@dagData.Graph.DAG.Edge.Utils:@->"@:@->$###"@ :@->$$###"@dahditDahdit:<|@:|>@darcs Darcs.Patch.Ident=/^\="@=\^/="@Darcs.Patch.Permutations=/~\="@=\~/="@Darcs.Patch.RepoPatch=/\=@=\/=@Darcs.Patch.V2.Non*>"@*>>"@>*"@>>*"@Darcs.Patch.V3.Core+|"@-|"@Darcs.Patch.Witnesses.Eq=/\=@=\/=@Darcs.Patch.Witnesses.Ordered +<+@+<<+@+>+@+>>+@:/\:?:<:@:>?:>:@:\/:?:||:? Darcs.Prelude$!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^^ @div@elem@mod@notElem@quot@rem@seq||@~@Darcs.UI.Options.Core?@^"@Darcs.Util.IndexedMonad>>"@>>="@Darcs.Util.Parser<|>@Darcs.Util.Printer$$@$+$@<+>@<>@"@ darcs-betaDarcs.Patch.FileName///"@Darcs.Patch.V2.Non*>"@*>>"@>*"@>>*"@Darcs.Witnesses.Eq=/\="@=\/="@Darcs.Witnesses.Ordered +<+"@+>+"@:/\:"@:<"@:<:"@:>"@:>:"@:\/:"@:||:"@Printer$$"@<+>"@<>"@"@ data-accessor Data.Accessor%:?%=?.>"@<."@=:?^. @^:@^=@Data.Accessor.Basic$%.>"@<."@^. @^:@^=@Data.Accessor.MonadState%:?%=?data-accessor-monadLibData.Accessor.MonadLib%:"@%="@data-accessor-monads-fdData.Accessor.Monad.FD.State%:"@%="@data-accessor-monads-tfData.Accessor.Monad.TF.State%:"@%="@data-accessor-mtlData.Accessor.Monad.MTL.State%:?%=?data-accessor-transformersData.Accessor.Monad.Trans.RWS%:?%=?Data.Accessor.Monad.Trans.State%:?%=? data-aviaryData.Aviary.Functional&&&"@***"@*>"@+++"@."@.>>"@<$"@<$>"@<*"@<**>"@<*>"@<<<"@<<^"@<=<"@=<<"@=>>"@>=>"@>>"@>>="@>>>"@>>^"@^<<"@^>>"@|||"@ data-basic Data.Basic&&.@/=.@<.@<=.@==.@>.@>=.@||.@Internal.Data.Basic.Compare&&.@/=.@<.@<=.@==.@>.@>=.@||.@ data-category Data.Category. @Data.Category.CartesianClosed^^^"@Data.Category.Coproduct:+++:"@Data.Category.Enriched.Functor%%"@:<*>:"@Data.Category.Enriched.Limit->>"@Data.Category.Functor%"@:%"@Data.Category.Limit&&&@***@+++@|||@#Data.Category.NaturalTransformation!"@ data-diverseData.Diverse.Many./@/./@\.@append@consMany@snocMany@ snocMany'@Data.Diverse.Many.Internal./@/./@\.@append@consMany@snocMany@ snocMany'@data-diverse-lensData.Diverse.Profunctor.Many makeBesides@ makeBesidesK@thenMake@ thenMakeK@Data.Diverse.Profunctor.Which chooseBetween@chooseBetweenK@ chooseWith@ thenChoose@ thenChooseK@ data-easy Data.Easy@???$??&&??&&\??+??|?@@"@ data-effectsData.Effect.Provider.Implicit.!"@..!"@data-effects-coreControl.Effect<:@<<:@~>@Data.Effect.HFunctor:&:@:+:@:<:@:=:@Data.Effect.HFunctor.HCont~~> @Data.Effect.Key##>@#>@Data.Effect.Tag# @## @data-effects-thData.Effect.TH&?data-emoticonsData.PopCulture.Emoticons1*〃。・・。"@//∇//"@//・//"@^-^*"@^∀^**"@^∇^**"@^◇^"@°-°*"@°-°〃"@°∇°"@°□°"@´∀`"@ ´・~・"@‐°‐"@ ≧∀≦"@ ⋟﹏⋞"@ ⋟~⋞"@ ┬──┬"@ ╥﹏╥"@ ╥~╥"@ ╯°□°"@ ◉・・"@ ●・・"@★ ̄∀ ̄★"@ 〃´∀`"@ 〃∇〃"@ 〃▽〃"@ 〃.."@〃。・・。"@ 〃・〃"@・-・"@・.・"@・∀´"@ ・∀・"@・∇´"@・・"@・・?"@・・??"@ ・・???"@ ・・;"@ ・﹏・"@ ・~・"@ --~"@.."@ ^∀^"@ ^∇^"@ ^~^"@ 。・・。"@  ̄^ ̄"@ data-filepath Data.FilePath"@ data-filter Data.Filter<&&>@<||>@==>"@=?=@ data-flags Data.Flags .*.@.+.@.-.@./~.@.<=.@.>=.@.~.@ containsAll@ containsNone@ containsSome@ data-forced Data.Forced<*>"@>>"@>>="@data-function-meldData.Function.Meld$$"@$*"@*$"@data-hasData.Has:*:? data-indexData.List.Index!!"@ data-intervalData.IntegerInterval/=!@/=?@/=??@!@>=!@>=?@>=??@>?@>??@ Data.Interval/=!@/=?@/=??@!@>=!@>=?@>=??@>?@>??@Data.IntervalMap.Lazy!"@\\"@Data.IntervalMap.Strict!"@\\"@ data-lensControl.Category.Product***"@Data.Lens.Common^!"@^!%=@^!*=@^!+=@^!-=@^!/=@^!=@^$^$!^%%=@^%=@^*=@^+=@^-=@^."@^/=@^=@Data.Lens.Lazy!%%=@!%=@!&&=@!*=@!+=@!-=@!/=@!=@!||=@%%=@%=@&&=@*=@+=@-=@//=@||=@~=@Data.Lens.Partial.Common ^$^%%=@^%=@^*=@^+=@^-=@^."@^/=@^=@Data.Lens.Partial.Lazy %%="@%="@&&=@*=@+=@-=@//=@||=@~="@Data.Lens.Strict!%%=@!%=@!&&=@!*=@!+=@!-=@!/=@!=@!||=@%%=@%=@&&=@*=@+=@-=@//=@||=@~=@ data-lens-fd Data.Lens!%%=@!%=@!&&=@!*=@!+=@!-=@!/=@!=@!||=@%%=@%=@&&=@*=@+=@-=@//=@||=@~=@data-lens-lightData.Lens.Light!%=@!=@%=@^."@~=@ data-namedData.Named.Tree<>"@ data-pprint Data.PPrint=== data-sketches,DataSketches.Quantiles.RelativeErrorQuantile:<"@:<="@data-sketches-coreBDataSketches.Quantiles.RelativeErrorQuantile.Internal.DoubleBuffer!"@FDataSketches.Quantiles.RelativeErrorQuantile.Internal.InequalitySearch:<"@:<="@:>"@:>="@2DataSketches.Quantiles.RelativeErrorQuantile.Types:<"@:<="@ data-store Data.Store .&&"@./="@.:"@.:."@.<"@.<="@.=="@.>"@.>="@.||"@:."@Data.Store.Internal.Type:."@Data.Store.Selection.&&"@./="@.<"@.<="@.=="@.>"@.>="@.||"@ data-tensor Data.Tensor><"@>?<"@?<>"@?><"@ data-timeout Data.Timeout#"@#< @#> @ data-typeData.Type.TList:*:"@data-validationData.Validation"@=::@as@dclabelDCLabel.NanoEDSL./\."@.\/."@<>"@><"@ DCLabel.Safe./\."@.\/."@<>"@><"@ dclabel-eci11DCLabel.NanoEDSL./\."@.\/."@<>"@><"@ DCLabel.Safe./\."@.\/."@<>"@><"@ddc-coreDDC.Type.Exp.GenericmakeTFun"@DDC.Type.Exp.Generic.CompoundsmakeTFun"@~>"@DDC.Type.Exp.Simple$:"@kFun"@tFun"@tImpl"@DDC.Type.Exp.Simple.Compounds$:"@kFun"@tFun"@tImpl"@ddc-source-tetraDDC.Source.Tetra.ExpmakeTFun"@~>"@DDC.Source.Tetra.Exp.CompoundsmakeTFun"@~>"@dead-simple-jsonText.DeadSimpleJSON?"@Text.DeadSimpleJSON.Query?"@debruijn DeBruijn.Env:>@DeBruijn.Internal.Env:>@ debruijn-safe DeBruijn.Env:>@ decidableData.Type.Predicate-->?-->#?-?>?-?>#?Data.Type.Predicate.Logic&&&@<==>?==>?|||@decision-diagramsData.DecisionDiagram.BDD.&&.@.<=>.?.=>.?.||.@Data.DecisionDiagram.ZDD\\"@deep-map Data.Map.Deep @!"@@!|"@@>@@?"@@??"@@??|"@@?|"@@|@\\"@deep-transformationsTransformation$Transformation.Deep<$>@Transformation.Full<$>@Transformation.Rank2<$>@Transformation.Shallow<$>@ deepcontrolDeepControl.Applicative****->"@****-|"@****|"@***-*"@***-*>"@***-*|"@***-->"@***--|"@***->"@***-|"@***|"@**-*"@**-**"@**-**>"@**-**|"@**-*->"@**-*-|"@**-*>"@**-*|"@**--*"@**--*>"@**--*|"@**--->"@**---|"@**-->"@**--|"@**->"@**-|"@**|"@*-*"@*-**"@*-***"@*-***>"@*-***|"@*-**->"@*-**-|"@*-**>"@*-**|"@*-*-*"@*-*-*>"@*-*-*|"@*-*-->"@*-*--|"@*-*->"@*-*-|"@*-*>"@*-*|"@*--*"@*--**"@*--**>"@*--**|"@*--*->"@*--*-|"@*--*>"@*--*|"@*---*"@*---*>"@*---*|"@*---->"@*----|"@*--->"@*---|"@*-->"@*--|"@*->"@*-|"@*>>"@*>>>"@*>>>>"@*>>>>>"@*|"@-*"@-**"@-***"@-****"@-****>"@-****|"@-***->"@-***-|"@-***>"@-***|"@-**-*"@-**-*>"@-**-*|"@-**-->"@-**--|"@-**->"@-**-|"@-**>"@-**|"@-*-*"@-*-**"@-*-**>"@-*-**|"@-*-*->"@-*-*-|"@-*-*>"@-*-*|"@-*--*"@-*--*>"@-*--*|"@-*--->"@-*---|"@-*-->"@-*--|"@-*->"@-*-|"@-*>"@-*|"@--*"@--**"@--***"@--***>"@--***|"@--**->"@--**-|"@--**>"@--**|"@--*-*"@--*-*>"@--*-*|"@--*-->"@--*--|"@--*->"@--*-|"@--*>"@--*|"@---*"@---**"@---**>"@---**|"@---*->"@---*-|"@---*>"@---*|"@----*"@----*>"@----*|"@.*"@.**"@.***"@.****"@.*****"@<$|"@<****-"@<***-"@<***-*"@<***--"@<**-"@<**-*"@<**-**"@<**-*-"@<**--"@<**--*"@<**---"@<*-"@<*-*"@<*-**"@<*-***"@<*-**-"@<*-*-"@<*-*-*"@<*-*--"@<*--"@<*--*"@<*--**"@<*--*-"@<*---"@<*---*"@<*----"@<*|"@<-*"@<-**"@<-***"@<-****"@<-***-"@<-**-"@<-**-*"@<-**--"@<-*-"@<-*-*"@<-*-**"@<-*-*-"@<-*--"@<-*--*"@<-*---"@<--*"@<--**"@<--***"@<--**-"@<--*-"@<--*-*"@<--*--"@<---*"@<---**"@<---*-"@<----*"@<<$|"@<<*"@<<*|"@<<<$|"@<<<*"@<<<*|"@<<<<$|"@<<<<*"@<<<<*|"@<<<<<$|"@<<<<<*"@<<<<<*|"@<|"@|$>"@|$>>"@|$>>>"@|$>>>>"@|$>>>>>"@|*"@|**"@|***"@|****"@|****-"@|***-"@|***-*"@|***--"@|**-"@|**-*"@|**-**"@|**-*-"@|**--"@|**--*"@|**---"@|*-"@|*-*"@|*-**"@|*-***"@|*-**-"@|*-*-"@|*-*-*"@|*-*--"@|*--"@|*--*"@|*--**"@|*--*-"@|*---"@|*---*"@|*----"@|*>"@|*>>"@|*>>>"@|*>>>>"@|*>>>>>"@|-*"@|-**"@|-***"@|-****"@|-***-"@|-**-"@|-**-*"@|-**--"@|-*-"@|-*-*"@|-*-**"@|-*-*-"@|-*--"@|-*--*"@|-*---"@|--*"@|--**"@|--***"@|--**-"@|--*-"@|--*-*"@|--*--"@|---*"@|---**"@|---*-"@|----*"@|>"@DeepControl.Monadx---->="@---->~"@--->-="@--->-~"@--->="@--->>="@--->>~"@--->~"@-->--="@-->--~"@-->-="@-->->="@-->->~"@-->-~"@-->="@-->>-="@-->>-~"@-->>="@-->>>="@-->>>~"@-->>~"@-->~"@-<"@->---="@->---~"@->--="@->-->="@->-->~"@->--~"@->-="@->->-="@->->-~"@->->="@->->>="@->->>~"@->->~"@->-~"@->="@->>--="@->>--~"@->>-="@->>->="@->>->~"@->>-~"@->>="@->>>-="@->>>-~"@->>>="@->>>>="@->>>>~"@->>>~"@->>~"@->~"@<-<"@>-"@>----="@>----~"@>---="@>--->="@>--->~"@>---~"@>--="@>-->-="@>-->-~"@>-->="@>-->>="@>-->>~"@>-->~"@>--~"@>-="@>->"@>->--="@>->--~"@>->-="@>->->="@>->->~"@>->-~"@>->="@>->>-="@>->>-~"@>->>="@>->>>="@>->>>~"@>->>~"@>->~"@>-~"@>>---="@>>---~"@>>--="@>>-->="@>>-->~"@>>--~"@>>-="@>>->-="@>>->-~"@>>->="@>>->>="@>>->>~"@>>->~"@>>-~"@>>=="@>>=>"@>>>--="@>>>--~"@>>>-="@>>>->="@>>>->~"@>>>-~"@>>>="@>>>=>"@>>>>-="@>>>>-~"@>>>>="@>>>>=>"@>>>>>="@>>>>>=>"@>>>>>~"@>>>>~"@>>>~"@>>~"@DeepControl.Monad.Morph5|*****|"@|****|"@|***-*|"@|***|"@|**-**|"@|**-*|"@|**--*|"@|**|"@|*-***|"@|*-**|"@|*-*-*|"@|*-*|"@|*--**|"@|*--*|"@|*---*|"@|*|"@|-****|"@|-***|"@|-**-*|"@|-**|"@|-*-**|"@|-*-*|"@|-*--*|"@|-*|"@|--***|"@|--**|"@|--*-*|"@|--*|"@|---**|"@|---*|"@|----*|"@|<<<<<|"@|<<<<|"@|<<<|"@|<<|"@|<|"@|>=>"@|>>="@|>>=>"@|>>>="@|>>>=>"@|>>>>="@|>>>>>="@|>>>>>|"@|>>>>>~"@|>>>>|"@|>>>>~"@|>>>|"@|>>>~"@|>>|"@|>>~"@|>|"@|>~"@ DeepControl.Monad.Trans.Identity9*****:"@****-:"@****:"@***-*:"@***--:"@***-:"@***:"@**-**:"@**-*-:"@**-*:"@**--*:"@**---:"@**--:"@**-:"@**:"@*-***:"@*-**-:"@*-**:"@*-*-*:"@*-*--:"@*-*-:"@*-*:"@*--**:"@*--*-:"@*--*:"@*---*:"@*----:"@*---:"@*--:"@*-:"@*:"@-****:"@-***-:"@-***:"@-**-*:"@-**--:"@-**-:"@-**:"@-*-**:"@-*-*-:"@-*-*:"@-*--*:"@-*---:"@-*--:"@-*-:"@-*:"@--***:"@--**-:"@--**:"@--*-*:"@--*--:"@--*-:"@--*:"@---**:"@---*-:"@---*:"@----*:"@deeplearning-hsDeepLearning.ConvNet>->"@deepseqControl.DeepSeq$!!<$!!>@deepseqdefinitive-base Algebra.Applicative*>"@<*"@<**>"@<*>"@ Algebra.Arrow>>^"@^>>"@Algebra.Classes<*>"@=>>"@>>="@ Algebra.Core $^"@&"@*"@+"@+++"@-"@."@/"@<#>"@<<<"@<|>"@>>>"@Algebra.Functor:**:"@<$"@<$>"@<&>"@|||"@ Algebra.Lens %%-"@%%~"@%-"@%~"@-."@.+"@.-"@<.>"@^."@^.."@^?"@^??"@Algebra.Monad.Base<*="@<=<"@=<<"@>=>"@>>"@>>>="@>>>>="@Algebra.Monad.Cont>>~"@Algebra.Monad.Error!+"@Algebra.Monad.State=-"@=~"@^>="@Data.Containers#"@#?"@*>>>"@Data.Containers.Sequence++"@definitive-parserLanguage.Parser<*<"@<+>"@>*>"@definitive-reactive Data.Reactive//"@<*|>"@<|*>"@ defun-core DeFun.Core:~>@@"@~>dejafu#Test.DejaFu.Conc.Internal.Threading~="@Test.DejaFu.Refinement->-"@==="@=>="@dense Data.Dense*^@^*@^+^@^-^@^/@Data.Dense.Boxed!"@!?"@//"@Data.Dense.Generic!"@!?"@//"@Data.Dense.Storable!"@!?"@//"@Data.Dense.Unboxed!"@!?"@//"@dep-tDep.EnvCompose"@ Dep.Phases>>"@>>="@Compose"@ dep-t-advice Dep.Advice:*@And@ Dep.IOAdvice:*@And@Dep.ReaderAdvice:*@And@Dep.SimpleAdvice:*@And@dependent-hashmapData.Dependent.HashMap!"@:=>? dependent-mapData.Dependent.Map!"@\\"@Data.Dependent.Map.Internal:*:? dependent-sumData.Dependent.Sum:=>?==>?derivation-treesDerivationTrees!"@<>"@DerivationTrees.CPTS+:"@:-"@==="@deriveData.Derive.DSL.HSE<**@<++>@<+?>@@<^^>@=~="@??~="@Language.Haskell<**@<++>@<+?>@@<^^>@=~="@??~="@Language.Haskell.TH.Helper &&:"@&&::"@++:"@++::"@->:"@.:"@.::"@==:"@>:"@>>:"@>>::"@>>=:"@ derive-gadt"Language.Haskell.Derive.Gadt.Unify.->."@|.|"@deriving-compatData.Deriving.InternalViaData.Deriving.ViaViaderiving-trans!Control.Monad.Trans.Compose.Infix..>?./>?.|>?!Control.Monad.Trans.Compose.Stack:..>?:.|>?derp Text.Derp<|>"@<~>"@==>"@derp-libText.Derp.Combinator<~"@~>"@dhallDhall.Deriving<<<?Dhall.Marshal.Encode>$<@>*<@>|<@dia-baseGraphics.Diagrams*."@.*."@.+."@.-."@<|>"@>-<"@~~"@diagramsGraphics.Rendering.Diagrams##"@//"@<>"@#Graphics.Rendering.Diagrams.Layouts##"@//"@<>"@!Graphics.Rendering.Diagrams.Types*."@.*."@.+."@.-."@diagrams-contrib Diagrams.TwoD.Layout.Constrained=.=?====?=^=?'Diagrams.TwoD.Path.Metafont.Combinators-.@.-@.--.@ diagrams-core Diagrams.Core*."@.>@.>>@:-:@<->"@atop@Diagrams.Core.Names.>@.>>@Diagrams.Core.Points*."@Diagrams.Core.Transform:-:@<->"@Diagrams.Core.Typesatop@ diagrams-lib Diagrams.Angle@@@Diagrams.Combinatorsatop@beneath@Diagrams.Coordinates:&@^&@Diagrams.Locatedat@Diagrams.Names.>@.>>@Diagrams.Points*."@Diagrams.Prelude#%%=@#%%~@#%=@#%~@#=@#~@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&=@&&~@&~?**=@**~@*=@*>@*~@+=@+~@-=@-~@.=@.@=@.@~@.~@//=@//~@:<@:>@:~:@<#%=@<#%~@<#=@<#~@<$@<$>@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<*@<**=@<**~@<*=@<*>@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.~@=@<<<>~@<<>=@<<>~@<=@<>~@$@?=@????~@^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@cons@failing@magnify@snoc@zoom@|>@||=@||~@Diagrams.TrailLike~~"@ Diagrams.TwoD===@|||@Diagrams.TwoD.Combinators===@|||@ Diagrams.Util# @## @dialogDialog<>"@diff-locDiffLoc.Interval:..@ DiffLoc.Shift.+@.-.?"@DiffLoc.Unsafe.-.@difference-monoidData.Monoid.Diff:-:"@Data.Monoid.Diff.Internal:-:"@digestive-functorsText.Digestive.Form.:@Text.Digestive.Form.Internal.:@ dimensionalNumeric.Units.Dimensional *@** @*~@*~~@+@-@/@/~@/~~@^ @^/ @.Numeric.Units.Dimensional.Dimensions.TermLevel*@/@^ @.Numeric.Units.Dimensional.Dimensions.TypeLevel*@/@^ @!Numeric.Units.Dimensional.Dynamic*"@*~"@/"@/~"@^"@$Numeric.Units.Dimensional.FixedPoint *@*~@*~~@+@-@/@/~@/~~@^ @!Numeric.Units.Dimensional.Prelude*!!"@$$!&&@*@** @*>@*~@*~~@+@++@-@."@/@/=@/~@/~~@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^/ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@#Numeric.Units.Dimensional.UnitNames*@/@^ @"Numeric.Units.Dimensional.Variants*@dimensional-tfNumeric.Units.Dimensional.TF *@** @*~@*~~@+@-@/@/~@/~~@^ @^+ @^/ @ dimensionsData.Type.List++@+:@:+@Data.Type.Lits*@+@-@:$$:@:<>:@Div@Mod@^ @Numeric.Dimensions:-"@\\?Numeric.Dimensions.Dim*@+@-@:*@^ @Numeric.Dimensions.Idx:*@Numeric.Tuple.Lazy!*@$*@*!@*$@:!@:$@:*@Numeric.Tuple.Strict!*@$*@*!@*$@:!@:$@:*@Numeric.TypedList:*@ dingo-coreDingo.Selector.+."@.>*."@.>."@.~."@dinoDino.Expression&&@-->?./"@/=@:->?<@<++>"@<."@<=@==@==!@>@>=@||@Dino.Interpretation:×:"@ Dino.Prelude!!"@$$!*@** @*>@+@++@-@."@/@<$@<$>@<*@<*>@<>@=<<?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seqdirectory-treeSystem.Directory.Tree:/"@@dirtreeSystem.DirTree.*"@.*."@.*>"@./"@discoDisco.Effects.State%=@.=@ Disco.Names.-"@Disco.Pretty.DSL$+$"@<+>"@<>"@ Disco.Subst@@"@|->"@ Disco.Types:*:@:+:@:->:@ Disco.Util!"@==>? discokitty Discokitty@@@"@!Discokitty.Examples.LesJustesMain?"@discord-haskellDiscord.Internal.Rest.Prelude/?@Discord.Internal.Types.Prelude.=="@.=?"@ Discord.Types.=="@.=?"@discrete-intervals Data.Interval++?"@+/-@...@/=!"@/=?"@!"@>=!"@>=?"@>?"@||?"@distributed-closureControl.Distributed.Closure/->distributed-process-fsmControl.Distributed.Process.FSM*>"@.|"@<|"@^."@|>"@~>"@~?"@~@"@distributed-process-lifted"Control.Distributed.Process.Lifted.:"@ distributionData.Distribution.CoreandThen@distribution-opensuseOpenSuse.Prelude)!!"@$$!&&@&&^"@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@||^"@ditto Ditto.Core@$dixiDixi.API|: @ djinn-libDjinn.LJTFormula&@:->@<->@|:@dlist Data.DListcons"@snoc"@Data.DList.DNonEmpty:|@cons"@snoc"@dlist-nonemptyData.DList.NonEmptycons"@snoc"@dmcc DMCC.Prelude1$$!$!!$>@&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$>@<&&>@<&>?<*@<**>@<*>@<.>@@<=@<=<?<>@<|@<|>@<||>@=<<?==@>@>=@>=>?>>?>>=?\\"@^ @^^ @div@ hashWithSaltmod@onquot@rem@||@dmenuDMenu.=@ do-notationLanguage.Haskell.DoNotation>>"@>>="@do-notation-dsl Control.Dsl>>"@>>="@Control.Dsl.Do>>"@>>="@ doclayoutText.DocLayout$$@$+$@<+>@ docrecordsData.DocRecord %%~@&:@-."@-/@..~@:|:"@<<$$>>"@<<|>>"@=:@=:="@^^. @^^? @^^?! @ dollaridoos Data.Money $*@$** @$+$@$-$@$/@$/$@$^ @$^^ @*$@domplate Text.Domplate<>"@ dormouse-uriDormouse.Url.Builder&"@"@=:"@? @dotgenText.Dot.->."@doveLanguage.Dove.Syntax&&."@<."@<=."@==."@>."@>=."@||."@dovetailDovetail.FFI.Builder~>dph-lifted-copyData.Array.Parallel!:"@+:+"@Data.Array.Parallel.Lifted$:"@$:^"@Data.Array.Parallel.PArray!:"@+:+"@ Data.Array.Parallel.Prelude.Bool&&"@||"@"Data.Array.Parallel.Prelude.Double *"@**"@+"@-"@/"@/="@<"@<="@=="@>"@>="@!Data.Array.Parallel.Prelude.Float *"@**"@+"@-"@/"@/="@<"@<="@=="@>"@>="@Data.Array.Parallel.Prelude.Int *"@+"@-"@/="@<"@<="@=="@>"@>="@!Data.Array.Parallel.Prelude.Word8 *"@+"@-"@/="@<"@<="@=="@>"@>="@dph-lifted-vsegData.Array.Parallel!:"@+:+"@"Data.Array.Parallel.Lifted.Closure$:"@$:^"@ Data.Array.Parallel.Prelude.Base *"@+"@-"@/="@<"@<="@=="@>"@>="@ Data.Array.Parallel.Prelude.Bool&&"@||"@"Data.Array.Parallel.Prelude.Double *"@**"@+"@-"@/"@/="@<"@<="@=="@>"@>="@Data.Array.Parallel.Prelude.Int *"@+"@-"@/="@<"@<="@=="@>"@>="@!Data.Array.Parallel.Prelude.Word8 *"@+"@-"@/="@<"@<="@=="@>"@>="@Data.Array.Parallel.Prim$:"@dph-parData.Array.Parallel!:"@+:+"@Data.Array.Parallel.Lifted$:"@$:^"@Data.Array.Parallel.PArray!:"@+:+"@Data.Array.Parallel.Prelude&&"@||"@"Data.Array.Parallel.Prelude.Double/"@!Data.Array.Parallel.Prelude.Float/"@dph-prim-interfaceData.Array.Parallel.Unlifted+:+"@ dph-prim-parData.Array.Parallel.Unlifted+:+"@ dph-prim-seqData.Array.Parallel.Unlifted+:+"@.Data.Array.Parallel.Unlifted.Sequential.Vector++"@dph-seqData.Array.Parallel!:"@+:+"@Data.Array.Parallel.Lifted$:"@$:^"@Data.Array.Parallel.PArray!:"@+:+"@Data.Array.Parallel.Prelude&&"@||"@"Data.Array.Parallel.Prelude.Double/"@!Data.Array.Parallel.Prelude.Float/"@dpor Test.DPOR&+&"@Test.DPOR.Schedule:|"@ drClickOnControl.MonadicFRP:|"@<^>"@drinkeryData.Drinkery.Distiller$&@+&@++$ @++&@dsmcDSMC.Util.Vector.*"@.^"@<+>"@<->"@><"@dsp DSP.Basic^! @dsvDSV<<<?<<<-"@>->"@>>>?>>>-"@dualizerCategorical.Dual.Example<^<"@=>>"@>^>"@ducklingDuckling.Types.Document!"@dumb-casCAS.Dumb%$>@&~!?&~:?&~??&~~!?&~~:?:=:@CAS.Dumb.Symbols%$>@&~~!?&~~:?7CAS.Dumb.Symbols.Unicode.MathLatin_RomanGreek.Qualified%$>@;CAS.Dumb.Symbols.Unicode.MathLatin_RomanGreek__BopomofoGaps%$>@ CAS.Dumb.Tree&~!?&~:?&~??:=@:=:@dunaiData.MonadicStreamFunction.Core>>>^"@^>>>"@#Data.MonadicStreamFunction.Parallel&|&"@*|*"@ dunai-core#Data.MonadicStreamFunction.Parallel&|&"@*|*"@Data.MonadicStreamFunction.Util>>>^"@^>>>"@Data.VectorSpace*^"@^*"@^+^"@^-^"@^/"@dvdaDvda:*"@ Dvda.FunGraph:*"@dwarf Data.Dwarf!?"@dwarf-el Data.Dwarf!?"@dynaDyna<@@<@>@|> dyna-brick Dyna.Brick&&*@*^@+:+"@.+^@.-.@.-^@/=*@<*@<+>"@<.>@<=*@<=>"@<@@<@>@=:="@==*@>*@>=*@^*@^+^@^-^@^/@||*@Dyna.Brick.Frp<@@<@>@ dyna-glossDyna.Gloss.Frp<@@<@>@dynamicDynamic!"@ dynamic-cabal!Distribution.Client.Dynamic.Query=<<<"@>>>="@dynamic-pipelineDynamicPipeline .*."@:<+>@:=>@|=>@|=>|@|>=>@|>=>|@|>>@|>>>@DynamicPipeline.Channel|=>@|=>|@|>=>@|>=>|@DynamicPipeline.Flow:<+>@:=>@DynamicPipeline.Stage|>>@|>>>@ dynamic-pp Text.Format"@<$$>"@<$>"@<+>"@"@"@<>"@dynamodb-simpleDatabase.DynamoDB @ @<.>@Database.DynamoDB.Filter&&.@/=.@<.@<=.@==.@>.@>=.@||.@Database.DynamoDB.Update+=.@-=.@=.@ dzen-dhall DzenDhall.AST=>>"@ dzen-utilsSystem.Dzen.Base+++"@+-+"@+/+"@+<+"@+=+"@System.Dzen.Process##"@e11y Observe.Event:/@Observe.Event.Backend:/@Observe.Event.Backend.Data:/@eachEach~! Each.Invoke~! easy-bitcoinNetwork.EasyBitcoin==="@ easy-fileSystem.EasyFile<.>@@ easytensorNumeric.DataFrame.Contraction%*@Numeric.DataFrame.SubSpace.!@Numeric.DataFrame.Type!"@:*@:*:@Numeric.Matrix%*@Numeric.Vector.*.@·@×@easytestEasyTest/==@===@EasyTest.Internal/==@===@edeText.EDE.= @Text.EDE.Filters@:"@Text.EDE.Internal.Filters@:"@Text.EDE.Internal.Types"@ edenmodulesControl.Parallel.Eden#"@$#"@ Control.Parallel.Eden.EdenConcHs#"@$#"@edis Database.Edis>>>?edit Data.Edit<=<?>=>? effect-monadControl.Effect>>"@>>="@Control.Effect.Parameterised>>"@>>="@,Control.Effect.Parameterised.ExtensibleState>>"@>>="@&Control.Effect.Parameterised.SafeFiles>>"@>>="@Control.Effect.Reader:->"@Control.Effect.State:!"@:->"@Control.Effect.Writer:->"@effectful-coreEffectful.Internal.Effect++@Effectful.NonDet<|>@Effectful.Provider.List++@effective-aspects-mzvAOP.Internal.OpenApp#"@effectsControl.Effects.State=:@effinControl.Monad.Effect:+"@:-"@eigen Eigen.Matrix!"@Eigen.SparseMatrix!"@eioEIO>>"@>>="@electrs-clientElectrsClient.Import.External:$@$!$!!$>@%~@&?&&@&&&@*@** @*>@+@++@-@."@... @.~@/@/=@:%"@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=??:Compose"@^ @^%^"@^. @^.. @^? @^^ @^^%^^"@div@ hashWithSaltmod@quot@rem@seqxor@||@elevatorControl.Elevator*++*"@elisionControl.Arrow.Elision &&&"@***"@+++"@//"@/>>"@<>^"@^<<"@^>>"@|||"@ elm-compiler Elm.Utils<|"@|>"@ elm-syntaxLanguage.Elm.Expression++"@<<"@<|"@>>"@|>"@ elynx-toolsELynx.Tools.Equality=~="@ email-headerNetwork.Email.Header.Doc@emdNumeric.EMD.SiftsiftAnd@siftOr@emgm Generics.EMGM:*:"@Generics.EMGM.Representation:*:"@endoData.Monoid.Endo.Fold&$"@<&$>"@entwine Entwine.P!$$!$>@&?&&@*@*>@+@-@."@/=@<@<$@<$>@<*@<**>@<*>@<=@<>@<|>@=<<?==@>@>=@>>?>>=?andA @div@elem@notElem@onorA @||@ enum-text-rioText.Enum.RIO.Fmt+|?+||?|+?|++|?|++||?||+?||++|?||++||? enumeratorData.Enumerator$$"@$="@<==<"@=$"@=$="@==<<"@>==>"@>>=="@Data.Enumerator.Internal$$"@<==<"@==<<"@>==>"@>>=="@enumfunData.EnumFun.Lazy!"@Data.EnumFun.Strict!"@ enummapmapData.EnumMapMap.Lazy:&"@Data.EnumMapMap.Strict:&"@Data.EnumMapSet:&"@enummapsData.EnumMap.Lazy!"@!?"@\\"@Data.EnumMap.Strict!"@!?"@\\"@ Data.EnumSet\\"@ enummapsetData.EnumMap.Lazy!"@\\"@Data.EnumMap.Strict!"@\\"@ Data.EnumSet\\"@ enummapset-thData.EnumMap.Lazy!"@EnumMap?\\"@Data.EnumMap.Strict!"@EnumMap?\\"@ Data.EnumSet\\"@enumsetData.EnumBitSet.&.@.-.@.|.@envparseEnv<=<?<>@>=>?envy System.Envy.!="@.="@epassControl.Concurrent.Mailbox.>"@"@epic Epic.Epic!."@+>"@@@"@epollSystem.Linux.Epoll.Base=~"@eq Data.Eq.Type:=@Data.Eq.Type.Hetero:==@equational-reasoningProof.Equational :-"@:/\:@:=:@:\/:@:~:@=<=@===@=>=@=~=@Because@because@Proof.Propositional/\@\/@ equivalenceData.Equivalence.Monad==="@error-continuationsControl.Monad.Trans.EitherCont?>"@error-or-utilsData.ErrorOr.Validation/=!@!@>=!@ error-utilControl.Error.Operator@@@@@@errorsControl.Error.Util!?"@?:??"@ ersaconcatData.Aviation.Ersa.Concat>.>"@ersatz Ersatz.Bit&&@==>||@Ersatz.Equatable/==@===@===#"@Ersatz.Orderable<=?@<=?#"@=?@>?@Ersatz.Relation!"@ escape-artistText.EscapeArtist/<>/@^$@espialImport.NoFoundationP!=.@$$!$!!$$$$+$$++$$+-$=?$=+?$>@&&@&&&@*@** @***@*=.@*>@+@++@+=.@-@-=.@."@.:"@.= @.|@/@/<-.@/=@/=.@:#:"@<@<$@<$>@<&&>@<&>?<*@<**>@<*>@<-.@<.@<.>@@<=@<=.@<=<?<>@<|@<|>@<||>@=$@=$$+=$$++=$$+-=$=@=.@=<<?==@==.@>@>.@>=@>=.@>=>?>>?>>=?\\"@^ @^^ @deepseqdiv@ hashWithSaltmod@onquot@rem@seq||@||.@ esqueletoDatabase.Esqueleto!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ilike@like@||.@Database.Esqueleto.Experimental(!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@:&@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ crossJoin@crossJoinLateral@ fullOuterJoin@ilike@ innerJoin@innerJoinLateral@leftJoin@leftJoinLateral@like@on"@ rightJoin@||.@)Database.Esqueleto.Experimental.From.Join :&@ crossJoin@crossJoinLateral@ fullOuterJoin@ innerJoin@innerJoinLateral@leftJoin@leftJoinLateral@on"@ rightJoin@$Database.Esqueleto.Internal.Internal!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@:&@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ilike@like@||.@Database.Esqueleto.Legacy!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ilike@like@||.@"Database.Esqueleto.PostgreSQL.JSON #-.@#>.@#>>.@--.@-.@->.@->>.@<@.@?&.@?.@?|.@@>.@||.@esqueleto-compatDatabase.Esqueleto.Compat%"@*.@++.@+.@-.@/.@/<-.@:&@<#"@<&>"@<-.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ crossJoin@crossJoinLateral@ fullOuterJoin@ilike@ innerJoin@innerJoinLateral@leftJoin@leftJoinLateral@like@on"@ rightJoin@#Database.Esqueleto.Compat.Operators !=.@&&.@*=."@+=."@-=."@/=.@<.@<=.@=.@==.@>.@>=.@||.@esqueleto-textsearchDatabase.Esqueleto.TextSearch@@."@&Database.Esqueleto.TextSearch.Language@@."@#Database.Esqueleto.TextSearch.Types:&@:|@essence-of-live-coding LiveCoding&&&@***@+++@:~:@:~~:@<+>@<<<?<<^?>>>?>>>="@>>>=="@>>^?^<<?^>>?|||@LiveCoding.Exceptions>>>="@>>>=="@eternal Control.Eternal.Syntax.Operators<<|"@<|"@|>"@|>>"@euphoriaFRP.Euphoria.Event<$?>@<-*?>@@@<@"@<@>"@<~~>"@evedWeb.Eved.@.<|>"@:<|>@Web.Eved.Internal.<|>"@:<|>@eveffControl.Ev.Eff:*@ event-list!Data.EventList.Relative.MixedBody./@/.@!Data.EventList.Relative.MixedTime./@/.@ event-monadControl.Monad.Event.BasicEvents&"@&-"@?:"@?::"@@:"@ eventloopEventloop.Utility.Vectors|*"@|+|"@|-|"@|/"@ eventsourcingDatabase.CQRS.TabularData:~@"Database.CQRS.TabularData.Internal:~@ eventstoreDatabase.EventStore:|@<>@eventuo11y-dslObserve.Event.DSL≔@Observe.Event.Syntax≔@every-bit-countsGames+>"@PGames+>"@ exact-realData.CReal.Internal *.@.*@.*.@/.@/^@ mulBounded@ mulBoundedL@ plusInteger@shiftL @shiftR @exhWeb.Exhentai.Utils!!"@^..: @^?: @ exhaustiveControl.Exhaustive&:@exotic-list-monadsControl.Monad.List.Exotic<>"@"Control.Monad.List.NonEmpty.Exotic+++"@<>"@ exp-pairs Math.ExpPairs:/:@<.@<=.@>.@>=.@Math.ExpPairs.LinearForm:/:@expandUtils*"@+"@?"@explainable-predicatesTest.Predicates==~"@Test.Predicates.HUnit@?~"@explicit-constraint-lens Lens.Explicit%%~@%~@&?."@.~@^. @Lens.Explicit.Core∘"@explicit-exception)Control.Monad.Exception.Asynchronous.Lazyappend?appendM?bindT?continue? continueM? maybeAbort?simultaneousBind?simultaneousBindM?+Control.Monad.Exception.Asynchronous.Strictappend?appendM?bindT?continue? continueM? maybeAbort?simultaneousBind?simultaneousBindM?#Control.Monad.Exception.Synchronous alternative@ alternativeT@merge@mergeT@explicit-sharingControl.Monad.Sharing.Classes?"@exposed-containers Data.IntMap.Base!"@\\"@Data.IntMap.Lazy!"@\\"@Data.IntMap.Strict!"@\\"@ Data.IntSet\\"@Data.IntSet.Base\\"@ Data.Map.Base!"@\\"@ Data.Map.Lazy!"@\\"@Data.Map.Strict!"@\\"@ Data.Sequence:<"@:>"@<|"@><"@|>"@Data.Set\\"@ Data.Set.Base\\"@Data.StrictPair:*:"@express Data.Express$$"@$$<"@//"@//-"@:$"@>$$"@>$$<"@Data.Express.Basic$$<"@>$$"@>$$<"@Data.Express.Core$$"@:$"@Data.Express.Express -:?->:?->>:?->>>:?->>>>:?->>>>>:?->>>>>>:? ->>>>>>>:? ->>>>>>>>:? ->>>>>>>>>:? ->>>>>>>>>>:? ->>>>>>>>>>>:?->>>>>>>>>>>>:?Data.Express.Fixtures-$-@-%-"@-&&-@-*-@-++-@-+-@--.."@--..-"@-.-"@-.."@-..-"@-/=-@-:-@-<-@-<=-@-==-@-==>--?-"@-|-"@-||-@Data.Express.Map//"@//-"@Data.Express.Utils.List+++@Data.Express.Utils.TH|++|"@|=>|"@Data.Express.Utils.Typeable->::"@ expressionsData.Expression.&.@.->.@./=.@.<-.@.<->.@.|.@Data.Expression.Arithmetic.*."@.+. @.<.@.<=.@.>.@.>=.@.\.@Data.Expression.Equality.=.@Data.Expression.Parser"@!Data.Expression.Utils.Indexed.Sum:+: @expressoExpresso.:"@.="@extended-categoriesCategory."@Category.Product:><:"@Functor:.:"@Monoidal<>"@Product&&&"@***"@extended-containersData.AMT!"@!?"@<|@><@|>@ extensibleData.ExtensibleCompose"@Data.Extensible.Class:>Data.Extensible.Field<@=>?@:>?@=?@==?Data.Extensible.MatchcaseOfData.Extensible.Plain<%@<%|?Data.Extensible.Product++@"@happend@Data.Extensible.Sum<:|?extensible-dataData.Extensible.Product:*="@Data.Extensible.Sum:+?"@extensible-effectsControl.Eff.Extend^$"@^|>"@Control.Eff.Logic.Core!"@>>-"@extensible-skeletonData.Extensible.Effect@!?? extensible-spData.Extensible.Product<&"@extism-manifest Extism.JSON.="@.?"@.??"@ extism-pdkExtism.PDK.MsgPack.="@.?"@extraControl.Monad.Extra&&^"@||^"@Data.List.Extra!?"@Data.List.NonEmpty.Extra!?"@|:@|>@Data.Tuple.Extra&&&@***@Extra!?"@&&&@&&^"@***@|:@|>@||^"@ extra-data-yjData.List.Infinite:|@:~@\\"@index"@ extrapolateTest.Extrapolate+|@:$"@==>>< @\/@\\//@Test.Extrapolate.Core+|@==>>< @\/@\\//@Test.Extrapolate.Expr-&&-@Test.Extrapolate.Generalizable*/=*"@*<*"@*<=*"@*==*"@Test.Extrapolate.TypeBinding==:"@Test.Extrapolate.Utils+++@factoryFactory.Data.Exponential<^ @=~@Factory.Data.Monomial<*>@@<=>@=~@Factory.Data.Polynomial*=@Factory.Data.PrimeFactors>*<@>/<@>^ @Factory.Data.Ring=*=@=+=@=-=@=^ @&Factory.Math.Implementations.Factorial!/!@fadnoFadno.Notation/:"@ Fadno.Note%@@:@|:@fair-predicates Data.Answer/\"@\/"@fake Fake.Cover&>>=?faktoryFaktory.Prelude(!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@fallible Data.Fallible!?=?!?????=?????falsifyTest.Falsify.Predicate.$"@ fast-downward FastDownward?="@ fast-loggerSystem.Log.FastLogger.Internal<>@fastsumData.Sum:<@:<:@fayFay.Compiler.Prelude+!!"@$$!&&@&&&@*@** @***@*>@+@++@+++@-@."@/@/=@<@<$@<$!>@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@notElem@onquot@rem@seq||@|||@fay-base Data.Function<*>"@ Data.Ratio%"@ Data.Text<>"@Prelude !!"@$$!&&@*@** @+@++@-@."@/@/=@<@<=@<=<?=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@fay-hsxHTML:="@fay-simplejson SimpleJSON.<"@.>"@fbFacebook#="@fclabels Data.Label>-@Iso @for@Data.Label.Monadic=.@=:@Data.Label.PointIso @Data.Label.Poly>-@for@feldspar-languageFeldspar.BitVector++"@ Feldspar.Core:+"@Feldspar.Core.Collection!"@Feldspar.Core.Frontend===="@===>"@Feldspar.Core.Frontend.Array|>"@Feldspar.Core.Frontend.Binding$<"@.<"@Feldspar.Core.Frontend.Bits.&."@.<<."@.>>."@.|."@⊕"@Feldspar.Core.Frontend.Complex+."@ Feldspar.Core.Frontend.Condition?"@Feldspar.Core.Frontend.Eq/="@=="@Feldspar.Core.Frontend.Floating**"@Feldspar.Core.Frontend.Integral^"@Feldspar.Core.Frontend.Logic&&"@&&*"@||"@||*"@Feldspar.Core.Frontend.Ord<"@<="@>"@>="@Feldspar.Core.Types:>"@Feldspar.FixedPoint?!"@Feldspar.Lattice/\"@\/"@Feldspar.Matrix***"@.*"@.+"@.-"@Feldspar.Option"@ Feldspar.Repa!:"@++"@..."@:."@Feldspar.Vector.Internal++"@..."@Feldspar.Vector.Push++"@ffeedFriendFeed.Types.Import-=>"@fficxx#FFICXX.Generate.Util.HaskellSrcExtstyapp@tyfun@fft Math.FFT.Basehas@fglData.Graph.Inductive.Graph&"@ Data.Graph.Inductive.Query.Monad>< @fieldsData.Record.Field.Basic.#"@=:"@=~"@Data.Record.Field.Combinators #"@#$"@*#"@<##>"@<#>"@<.#>"@<=:"@<=~"@=*"@Data.Record.Field.Indexable#!"@#!!"@ filemanipSystem.FilePath.Find &&?"@.&.?"@/=?"@/~?"@<=?"@=?"@>?"@||?"@~~?"@System.FilePath.GlobPattern/~"@~~"@filepathSystem.FilePath-<.>@<.>@@System.FilePath.Posix-<.>@<.>@@System.FilePath.Windows-<.>@<.>@@ System.OsPath-<.>"@<.>"@"@System.OsPath.Posix-<.>"@<.>"@"@System.OsPath.Posix.Internal-<.>@<.>@@System.OsPath.Windows-<.>"@<.>"@"@System.OsPath.Windows.Internal-<.>@<.>@@filepath-bytestring System.FilePath.Posix.ByteString-<.>@<.>@@"System.FilePath.Windows.ByteString-<.>@<.>@@ filepatternSystem.FilePattern?=="@ filtrableData.Filtrable<$?>@<*?>@fin-int Data.Fin.Int *!"@*%"@*?"@+!"@+%"@+?"@-!"@-%"@-?"@ find-conduitData.Conduit.Find=~"@ fingertreeData.FingerTree:<@:>@<|@><@|>@fingertree-psqueueData.FingerTree.PSQueue:->"@ fingertree-tfData.FingerTree:<"@:>"@<|"@><"@|>"@finiteFinite #"@#<<"@<<#"@\#"@|/=|"@|<=|"@|<|"@|==|"@|>=|"@|>|"@ finite-tableData.Finite.Table!"@finite-typelits Data.Finiteequals@Data.Finite.Integralequals@finitoAI.Search.FiniteDomain.Int#/=@#<@#<=@#=@#>@#>=@/\@\/@first-class-familiesFcf $&&@***@--><$>@<*>@<=<?=<<?||@Fcf.Combinators$<$>@<*>@<=<?=<<?>>=? Fcf.Data.Bool&&@||@Fcf.Data.Common***@Fcf.Data.Function&? Fcf.Utils-->first-class-instancesFCI==>FCI.Internal.Definitions==>first-class-patternsData.Pattern.Base->>@<|>@Data.Pattern.Base.Tuple<+>"@Data.Pattern.Base.TypeList:++:"@Data.Pattern.Common-->@-?>@/\"@\/"@fitspecTest.FitSpec.Utils***"@..."@ fixed-lengthData.FixedLength!:@ fixed-listData.FixedList:."@ fixed-pointData.Fixed.Binary*!"@*."@/!"@/."@ fixed-vectorData.Vector.Fixed!"@fixerFixer:|"@fixplateData.Generics.Fixplate<$@elem@Data.Generics.Fixplate.Functor:*:@:+:@flacCodec.Audio.FLAC.Metadata=->?flat Flat.Encoder<>@ flatbuffers FlatBuffers.Internal.Compiler.TH~>? flatparseFlatParse.Basic<|>@FlatParse.Basic.Parser<|>@FlatParse.Stateful<|>@FlatParse.Stateful.Parser<|>@ flexible-timeData.FlexibleTime.+"@.-"@flowFlow!>.>"@flow-erControl.Flower.Applicative.Lazy*$>@**$>@*>@<$*@<$**@<*@!Control.Flower.Applicative.Strict*$!>@**$!>@||<|>Control.Flower.Apply.Strict!<?!>!?Control.Flower.Compose.>"@<."@Control.Flower.Functor.Lazy$>@<$@Control.Flower.Functor.Strict$!>@>@$>>=@<<$@=<<$@flpLanguage.Floorplan.Core.Syntax:#"@:+"@:::"@:@"@:||"@Language.Floorplan.ParserHappyStk"@Language.Rust.Data.Position#"@Language.Rust.Parser.NonEmpty<|"@|:"@|>"@Language.Rust.Pretty.Util<##>"@<#>"@<+>"@"@ fluid-idlFluid.Client.Expr-<"@<.>"@<:"@<:>"@fmtFmt+|?+||?|+?|++|?|++||?||+?||++|?||++||?Fmt.Internal.Core+|?+||?|+?|++|?|++||?||+?||++|?||++||?fnWeb.Fn!=>"@//"@/?"@==>"@fn-extraWeb.Fn.Extra.Heist&="@fontconfig-pure!Graphics.Text.Font.Choose.LangSet\\"@for-freeControl.ForFree:<"@ foreign-var Foreign.Var$="@$=!"@$~"@$~!"@ formatting Formatting%"@%+"@%. @<%+>"@Formatting.Internal%"@%+"@%. @<%+>"@Formatting.Internal.Raw<>@forsyde-shallowForSyDe.Shallow.Core.Signal!-@+-+@-:@:-@ForSyDe.Shallow.Core.Vector:>@<+>@<:@ fortran-srcLanguage.Fortran.AST:|@Language.Fortran.AST.AListaCons@Language.Fortran.PrettyPrint@@ foscam-sortData.Foscam.Sort.FilenamePath/<>/"@ foundation Foundation$$!&&@*@*>@+@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @onseq||@Foundation.Bits .&.@.<<."@.>>."@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@Foundation.Check===@Foundation.Collection!"@Foundation.Conduit.|@Foundation.Numerical*@+@-@/@^ @Foundation.Parser<|>@Foundation.VFS"@Foundation.VFS.Path"@fourmoluOrmolu.Terminal.QualifiedDo>>"@fp-ieeeNumeric.Floating.IEEE*@+@-@/@ genericAdd@ genericDiv@ genericMul@ genericSub@fpipe Control.FPipe$>"@.>"@<$"@<."@frameFrame-.-"@ Frame.GUI+>"@<+"@ Frame.Model-.-"@Frame.Utilities?"@??"@ Frame.View-.-"@fraxlControl.Monad.Fraxl|:|@Control.Monad.Trans.Fraxl|:|@ freckle-appFreckle.App.Prelude*$$!&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$$>@<$>@<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@Freckle.App.Test5$$!&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$$>@<$>@<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seqshouldBe? shouldContain? shouldEndWith?shouldMatchList? shouldNotBe?shouldNotContain?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith?||@~@ freckle-envFreckle.App.Env<=<?<>@>=>?freckle-preludeFreckle.App.Prelude*$$!&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$$>@<$>@<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@freeControl.Alternative.FreeAp@Control.Comonad.Cofree:<@Control.Comonad.Trans.Cofree:<@ free-alacarte Free.AlaCarte:+: @free-categoriesControl.Category.Free."@:<<@:>>@free-operationalControl.Alternative.Operational:<**>"@Control.Applicative.Operational:<**>"@ Control.Monad.Operational.Simple:>>="@Control.Monad.Trans.Operational:>>="@Control.MonadPlus.Operational:>>="@free-vector-spacesData.VectorSpace.Free *^@.+^@.-.@<.>@^*^"@^+^@^-^@^/!@^/^@free-vl Control.Monad.Free.VanLaarhovenE.:."@freeludeFreelude.Impl.Classes *>"@."@<$"@<$>@<*"@<**>@<*>"@<<<"@=<<?>>"@>>="@>>>"@Freelude.Impl.ExoFunctor$$!freer Data.FTCQueue><"@|>"@Data.Open.Union<$"@ freer-effects Data.FTCQueue><"@|>"@ freer-indexedControl.XApplicative*>:@<**>:@<*:@<*>:@Control.XMonad<$!>:@<=<:?=<<:?>=>:?>>:?>>=:?Control.XMonad.Do>>?>>=?freer-par-monadControl.Monad.Freer.Par=<<<@>>>=@Control.Monad.Freer.Par.Funable$$"@ Control.Monad.Freer.Par.Sequence<| @>< @|> @ freer-simpleControl.Monad.Freer~> Data.FTCQueue><"@|>"@Data.OpenUnion:++:@Data.OpenUnion.Internal:++:@ freesoundSound.Freesound.Search&"@fresco-binding Fresco.Entity#:"@fresnel Fresnel.Fold^? @Fresnel.Getter^. @Fresnel.Review# @Fresnel.Setter %~@**~@*~@+~@-~@.~@/~@^^~@^~@fresnel-fused-effectsFresnel.Effect%=@*=@+=@-=@.=@//=@<~@?=@fridayVision.Histogram!"@Vision.Image.Class!"@!?"@Vision.Primitive.Shape:.@frisbyText.Parsers.Frisby##@##>@*>@->>@//?//>?<$@<$>@<*@<**>@<*>@<++>@<<-@<>@<|>@frontText.Blaze.Front!"@!?"@Text.Blaze.Front.Internal!"@!?"@ frp-arduino Arduino.DSL=:~>"@frpnowControl.FRPNow.BehaviorEnd.:"@Control.FRPNow.EvStream<@@>"@Control.FRPNow.Lib<@>"@Control.FRPNow.Time*^"@^+^"@^-^"@^/"@fs-apiSystem.FS.API.Types<.>@@fst FST.RRegTypes<*>"@<.>"@ FST.RegTypes:&:"@:.:"@:|:"@<&>"@<->"@<|>"@|>"@fudgets AllFudgets-*- @-+- @-==- @=.>"@>#+<"@>#==<"@>*<@>+#<"@>+<@>..=<@>.=<@>=..<@>=.<@>==#<"@>==<@>=^<@>=^^<@>^=<@>^^=<@ifC?thenC?ConnectF:&:"@>&<"@Fudgets -*- @-+- @-==- @=.>"@>#+<"@>#==<"@>*<@>+<@>==<@>=^<@>=^^<@>^=<@>^^=<@ full-sessionsControl.Concurrent.FullSession>>>"@>>>="@funcmp FMP.Picture #&"@.&.?.--.?.-.?...?....?|-|@|=|@|||@||||@ FMP.Types ** @.*@./="@.<"@.<="@.=@.=="@<*<+funcons-valuesFuncons.Operations=/="@==="@functional-arrowControl.Arrow.Let<<<&"@Control.Arrow.Monad=<<<"@>>>="@ functor-applyData.Bifunctor.Apply.>>"@<<$>>"@<<."@<<..>>"@<<.>>"@Data.Functor.Alt"@Data.Functor.Apply$>"@.>"@<$"@<$>"@<."@<..>"@<.>"@Data.Functor.Bind $>"@-<-"@-<<"@->-"@.>"@<$"@<$>"@<."@<..>"@<.>"@>>-"@functor-combinatorsControl.Monad.Freer.Church:>>="@Control.Natural.IsoF<~>~>Data.Functor.Combinator!$!@!*!@!+!@:*:@:+:@<~>ComposeT"@~>!Data.Functor.Contravariant.Divise<:>"@Data.HBifunctor.Associative!$!@!*!@!+!@Data.HFunctor.Route:<$>:@:>$<:@ functor-comboFunctorCombo.Functor:*:"@:*:!"@<~"@~>"@FunctorCombo.Pair:#"@FunctorCombo.Strict:*!"@FunctorCombo.StrictMemo!"@ functor-infixData.Functor.Infix(<$$$$$$$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$$>@<$$$$$$$$$$$$$>@<$$$$$$$$$$$$>@ <$$$$$$$$$$$>@ <$$$$$$$$$$>@ <$$$$$$$$$>@ <$$$$$$$$>@ <$$$$$$$>@<$$$$$$>@<$$$$$>@<$$$$>@<$$$>@<$$>@<$>@<&&&&&&&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&&>?<&&&&&&&&&&&&&>?<&&&&&&&&&&&&>? <&&&&&&&&&&&>? <&&&&&&&&&&>? <&&&&&&&&&>? <&&&&&&&&>? <&&&&&&&>?<&&&&&&>?<&&&&&>?<&&&&>?<&&&>?<&&>?<&>? functor-monadFFunctor.FCompose⊚@functor-monadicData.Functor.Monadic$>"@.>"@<$<"@<$=<"@>$>"@>=$>"@|>"@functor-productsData.Type.Functor.Product:&@:&|@Data.Type.Functor.XProduct::&@ functor-utilsData.Functor.Utils$|@."@.: @.:. @.:: @.::. @<$|>@<<$>>@<<*>>@<<<$>>>@<<<*>>>@ <<<<$>>>>@ <<<<*>>>>@ <<<<<$>>>>>@ <<<<<*>>>>>@<|$>@Compose"@|$@∘"@∘∘ @ ∘∘∘ @ ∘∘∘∘ @∘∘∘∘∘ @functorsData.Functor.Syntax&"@."@.:"@.::"@funflowControl.Funflow.ContentStore:@^@fungll-combinatorsGLL.ParserCombinators**>@**>>>@<$$@<$$$>@<$$>@<**@<**>@<**>>@<**>>>@<::=@<::=>@<:=@<:=>@<<**>@<<<**@<<<**>@<\\>@<||>@funpatLanguage.FunPat.Interface~>"@Language.FunPat.Match.=."@:=:"@ fused-effectsControl.Algebra:+:@~<~?Control.Algebra.Handler~<~?Control.Effect.Choose<|>@Control.Effect.NonDet<|>@Control.Effect.Sum:+:@fused-effects-lensControl.Effect.Lens%=@*=@+=@-=@.=@//=@<~@?=@fused-effects-opticsControl.Effect.Optics%=@.=@<~"@?=@fused-effects-squealControl.Effect.Squeal$!"@!+@!-@!-!@#-.@&?*:"@+!@.!"@.#> @.#>> @.&"@.&&@.-.@.-> @.->> @./=@.<@.<=@.==@.>@.>=@.?"@.?&"@.?|"@.|"@.||@:*@:::@:=>@:>>@<->"@<@"@>>>?@>"@@@"@fusionFusion>->"@futharkFuthark.Analysis.HORep.SOAC:<"@:>"@<|"@|>"@Futhark.Analysis.PrimExp.&&.@.&."@.<.@.<<."@.<=.@.==.@.>.@.>=.@.>>."@.^."@.|."@.||.@~*~@~+~@~-~@~/~@~==~@Futhark.CodeGen.ImpCode:>>:"@Futhark.CodeGen.ImpGen<--@<~~@Futhark.Util.Pretty"@ fuzzcheckTest.FuzzCheck?>"@fuzzysetData.FuzzySet.Simple>+<@Data.FuzzySet.Utils<$$$> @<$$> @fwglFWGL.Graphics.Generic*~>"@-="@:="@:~>"@~~"@~~>"@FWGL.Graphics.Types:="@:~>"@ FWGL.Shader!"@#"@$"@&&"@*"@+"@-"@."@/"@:-"@<"@<="@=="@>"@>="@^"@||"@FWGL.Shader.Language.Functions!"@#"@&&"@*"@+"@-"@/"@/="@<"@<="@=="@>"@>="@^"@||"@FWGL.Shader.Shader:-"@ g4ip-proverG4ipProver.Proposition/\@<==?<=>==>?\/@ galois-fieldData.Field.Galois*^@gaspAlgebra.Category."@∘"@⊗"@▵"@▿"@Algebra.Classes!*^"@*@** @*<@*^@+@-@/@=.=^ @^+ @^/ @^? @div@mod@quot@rem@Algebra.Linear<+>"@·"@×"@⊙"@Algebra.Morphism.Ratio%"@:%"@gcodehsData.GCode.Generate<#>"@Data.GCode.Types&"@gdp Data.Refined$:"@..."@...>"@...?"@:::???Logic.Propositional &&@-->?/\@And@Implies?Or@\/@||@∧@∨@Theory.Equality==@==."@gedcomData.Gedcom.Internal.Common<&>?gelatin-shadersGelatin.Shaders.TypeLevel:&"@general-preludePrelude.General$!"@*"@+"@-"@/"@ generic-dataGeneric.Data.Internal.CompatDiv@"Generic.Data.Internal.Microsurgery%~@Generic.Data.Microsurgery%~@generic-data-surgeryGeneric.Data.Surgery:>>?Generic.Data.Surgery.Internal:>>?generic-deepseqControl.DeepSeq$!!"@generic-derivingGenerics.Deriving.Semigroupgsappend@ gsappend'@gsappenddefault@generic-functor!Generic.Functor.Internal.Implicit:+?Generic.Functor.Multimap:+?generic-labelsData.Generic.Labels:=? Data.Label:=? generic-lensData.Generics.Internal.VL.~@^. @generic-lens-coreData.GenericLens.Internal??"@'Data.Generics.Internal.Families.Collect\\@$Data.Generics.Product.Internal.HList:>@(Data.Generics.Product.Internal.Positions.@=.@>.@>=.@between@in'@like@orderBy?||.@Database.GP.GenericPersistence &&.@:|@<.@<=.@<>.@=.@>.@>=.@between@in'@like@orderBy?||.@"Database.GP.GenericPersistenceSafe &&.@<.@<=.@<>.@=.@>.@>=.@between@in'@like@orderBy?||.@Database.GP.Query &&.@:|@<.@<=.@<>.@=.@>.@>=.@between@in'@like@orderBy?||.@Database.GP.SqlGenerator &&.@:|@<.@<=.@<>.@=.@>.@>=.@between@in'@like@orderBy?||.@generic-randomGeneric.Random%?:+?<+?Generic.Random.Internal.Generic%?%."@:+?<+?generics-mrsopGenerics.MRSOP.Base.Metadata:@:@Generics.MRSOP.Base.NP:*@Generics.MRSOP.Util&&&@***@<.> @ generics-sop Generics.SOP-.->?:*@:.:@And@Compose"@genericserialize$Data.Generics.Serialization.Standard=>>"@>>$"@genvalidity-propertyTest.Validity.Property.Utils<==>"@===>"@genvalidity-sydtest Test.Syd.Validity.Property.Utils<==>"@===>"@geo-ukData.Geo.OSGM02Tab!"@geomancy Geomancy *^"@.+^@.-.@.-^@^*"@^+^@^-^@^/"@dot@ Geomancy.Mat4!*"@Geomancy.Point.+^@.-.@.-^@Geomancy.Quaternion^*"@^/"@Geomancy.Swizzle.@"@Geomancy.Transform!."@ Geomancy.Vec2^*"@^/"@ Geomancy.Vec3^*"@^/"@ Geomancy.Vec4^*"@^/"@Geomancy.Vector*^"@^*"@^+^@^-^@^/"@dot@gf GF.Support+++@++++@+++++@+++-"@++-@GF.Text.Pretty$$@$+$@<+>@<>@ PGF.Haskell!"@!$"@!*"@+++@ghc" GHC.Cmm.Graph<*>"@GHC.CoreApp@mkApps@mkCoApps@mkTyApps@ mkVarApps@ GHC.Core.Make mkCoreApp@ mkCoreApps@GHC.Core.Map.Expr>.>?|>?|>>?GHC.Core.TyCo.RepmkFunTy@ mkInvisFunTy@mkVisFunTyMany@ GHC.Core.TypemkFunTy@ mkInvisFunTy@mkVisFunTyMany@ GHC.Data.BagconsBag@snocBag@GHC.Data.Graph.Inductive.Graph&"@GHC.Data.List.Infinite!!"@++@GHC.Data.MaybeorElse@GHC.Data.OrdListappOL@consOL@snocOL@GHC.Data.TrieMap>.>?|>?|>>?GHC.Data.Word64Map.Internal!"@!?"@\\"@GHC.Data.Word64Map.Lazy!"@!?"@\\"@GHC.Data.Word64Map.Strict!"@!?"@\\"@"GHC.Data.Word64Map.Strict.Internal!"@!?"@\\"@GHC.Data.Word64Set\\"@GHC.Data.Word64Set.Internal\\"@GHC.HsToCore.Monad*>"@<$>"@<*"@<*>"@ GHC.JS.Make.! @.!=.@.!==.@.&&. @.<.@.<<."@.<=.@.==.@.===.@.>.@.>=.@.>>."@.>>>."@.^ @.|."@.||. @|=@||=@ GHC.JS.Ppr$$$"@<+?>"@ GHC.PluginsasJoinId?asJoinId_maybe? idCafInfo?mkFunTy@ mkInvisFunTy@mkVisFunTyMany@ setIdArity?setIdCallArity? setIdCbvMarks? setIdCprSig?setIdDemandInfo? setIdDmdSig? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdUnfolding?setInlineActivation?setInlinePragma?GHC.Prelude.Basic!!"@$"@$!"@&&"@*"@**"@*>"@+"@++"@-"@."@.&."@.|."@/"@/="@<"@<$"@<$>"@<*"@<*>"@<="@=<<"@=="@>"@>="@>>"@>>="@^"@^^"@||"@GHC.Tc.Gen.ExprSynFunGHC.Tc.Types.Evidence<.>"@GHC.Tc.Utils.TcTypeSynFun mkInvisFunTy@mkVisFunTyMany@ GHC.Types.IdasJoinId?asJoinId_maybe? idCafInfo? setIdArity?setIdCallArity? setIdCbvMarks? setIdCprSig?setIdDemandInfo? setIdDmdSig? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdUnfolding?setInlineActivation?setInlinePragma?GHC.Types.Id.Info setArityInfo? setCafInfo? setCprSigInfo? setDemandInfo? setDmdSigInfo?setInlinePragInfo? setLFInfo? setOccInfo?setOneShotInfo? setRuleInfo?setUnfoldingInfo?(GHC.Utils.Containers.Internal.StrictPair:*:?GHC.Utils.Misc<&&>@<||>@GHC.Utils.Monad*>"@<$>"@<*"@<*>"@GHC.Utils.Outputable$$"@$+$"@<+>"@<>"@ GHC.Utils.Ppr$$@$+$@<+>@<>@GHC.Wasm.ControlFlow<>"@ ghc-bignumGHC.Num.Primitives&&#@||#@ghc-corroborateGHC.Corroborate$$"@<+>"@<>"@thenCmp"@GhcApi.GhcPlugins($$"@$+$"@<&&>@<+>"@<>"@<||>@App@asJoinId?asJoinId_maybe? idCafInfo?mkApps@mkCoApps@ mkCoreApp@ mkCoreApps@ mkInvisFunTy@mkTyApps@ mkVarApps@ mkVisFunTy@ setArityInfo? setCafInfo? setDemandInfo? setIdArity?setIdCallArity?setIdDemandInfo? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdStrictness?setIdUnfolding?setInlineActivation?setInlinePragInfo?setInlinePragma?setLevityInfoWithType?setNeverLevPoly? setOccInfo?setOneShotInfo? setRuleInfo?setStrictnessInfo?setUnfoldingInfo?thenCmp"@ ghc-dump-utilGhcDump.Pretty<$$>"@ ghc-internal%GHC.Internal.Arr!"@//"@GHC.Internal.Base.$$!&&@*#@*##@**##"@*>@+#@+##@++@-#@-##@."@/##@/=@/=#@/=##@:|@<@<#@<##@<$@<*@<**>@<*>@<=@<=#@<=##@<>@<|>@=<<?==@==#@==##@>@>#@>##@>=@>=#@>=##@>>?>>=?seq||@~@~~@GHC.Internal.Bits .&.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@GHC.Internal.Conc.SyncparpseqGHC.Internal.Control.Arrow &&&@***@+++@<+>@<<<?<<^?>>>?>>^?^<<?^>>?|||@GHC.Internal.Control.Category."@<<<?>>>?GHC.Internal.Control.Monad<$@<$!>@<=<?=<<?>=>?>>?>>=?GHC.Internal.Data.Bits!<<. @!>>. @.&.@.<<. @.>>. @.^.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@GHC.Internal.Data.Bool&&@||@GHC.Internal.Data.Eq/=@==@GHC.Internal.Data.Foldableelem@notElem@GHC.Internal.Data.Function$&?."@onGHC.Internal.Data.Functor$>@<$@<$>@<&>?GHC.Internal.Data.Functor.Utils#."@GHC.Internal.Data.List!!"@!?"@++@\\@elem@notElem@GHC.Internal.Data.Monoid<>@GHC.Internal.Data.OldList!!"@!?"@++@\\@elem@notElem@GHC.Internal.Data.Ord<@<=@>@>=@GHC.Internal.Data.Type.Bool&&@||@GHC.Internal.Data.Type.Equality:~:@:~~:@==@~@~~@GHC.Internal.Data.Type.Ord<@<=@<=?@@>=@>=?@>?@GHC.Internal.Data.Typeable:~:@:~~:@GHC.Internal.Desugar>>>"@GHC.Internal.Exts*#@*##@**##"@+#@+##@-#@-##@/##@/=#@/=##@<#@<##@<=#@<=##@==#@==##@>#@>##@>=#@>=##@seq~@~~@GHC.Internal.Float** @GHC.Internal.Generics:*:@:+:@:.:@GHC.Internal.IO.SubSystem@GHC.Internal.List!!"@!?"@++@elem@notElem@GHC.Internal.Num*@+@-@GHC.Internal.Numeric** @GHC.Internal.Real %@/@:%"@^ @^%^"@^^ @^^%^^"@div@mod@quot@rem@)GHC.Internal.Text.ParserCombinators.ReadP+++@<++@,GHC.Internal.Text.ParserCombinators.ReadPrec+++"@<++"@GHC.Internal.Type.Reflection:~:@:~~:@GHC.Internal.TypeError:$$:@:<>:@GHC.Internal.TypeLits *@+@-@:$$:@:<>:@<=@<=?@Div@Mod@^ @GHC.Internal.TypeNats*@+@-@<=@<=?@Div@Mod@^ @ ghc-justdoit GHC.JustDoIt…"@GHC.LJT==>"@ghc-lib GHC.Cmm.Graph<*>"@GHC.Data.Graph.Inductive.Graph&"@GHC.HsToCore.Monad*>@<$>@<*@<*>@ GHC.PluginsasJoinId?asJoinId_maybe? idCafInfo?mkFunTy@ mkInvisFunTy@mkVisFunTyMany@ setIdArity?setIdCallArity? setIdCbvMarks? setIdCprSig?setIdDemandInfo? setIdDmdSig? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdUnfolding?setInlineActivation?setInlinePragma?GHC.Tc.Gen.ExprSynFunGHC.Wasm.ControlFlow<>"@ghc-lib-parserGHC.CoreApp@mkApps@mkCoApps@mkTyApps@ mkVarApps@ GHC.Core.Make mkCoreApp@ mkCoreApps@GHC.Core.Map.Expr>.>?|>?|>>?GHC.Core.TyCo.RepmkFunTy@ mkInvisFunTy@mkVisFunTyMany@ GHC.Core.TypemkFunTy@ mkInvisFunTy@mkVisFunTyMany@ GHC.Data.BagconsBag@snocBag@GHC.Data.List.Infinite!!"@++@GHC.Data.MaybeorElse@GHC.Data.OrdListappOL@consOL@snocOL@GHC.Data.TrieMap>.>?|>?|>>?GHC.Data.Word64Map.Internal!"@!?"@\\"@GHC.Data.Word64Map.Lazy!"@!?"@\\"@GHC.Data.Word64Map.Strict!"@!?"@\\"@"GHC.Data.Word64Map.Strict.Internal!"@!?"@\\"@GHC.Data.Word64Set\\"@GHC.Data.Word64Set.Internal\\"@ GHC.JS.Make.! @.!=.@.!==.@.&&. @.<.@.<<."@.<=.@.==.@.===.@.>.@.>=.@.>>."@.>>>."@.^ @.|."@.||. @|=@||=@ GHC.JS.Ppr$$$"@<+?>"@GHC.Prelude.Basic+!!"@$$!&&@*@** @*>@+@++@-@."@.&.@.|.@/@/=@<@<$@<$>@<*@<*>@<=@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@rotate @rotateL @rotateR @seqshift @xor@||@~@GHC.Tc.Types.Evidence<.>"@GHC.Tc.Utils.TcTypeSynFun mkInvisFunTy@mkVisFunTyMany@ GHC.Types.IdasJoinId?asJoinId_maybe? idCafInfo? setIdArity?setIdCallArity? setIdCbvMarks? setIdCprSig?setIdDemandInfo? setIdDmdSig? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdUnfolding?setInlineActivation?setInlinePragma?GHC.Types.Id.Info setArityInfo? setCafInfo? setCprSigInfo? setDemandInfo? setDmdSigInfo?setInlinePragInfo? setLFInfo? setOccInfo?setOneShotInfo? setRuleInfo?setUnfoldingInfo?(GHC.Utils.Containers.Internal.StrictPair:*:?GHC.Utils.Misc<&&>@<||>@GHC.Utils.Monad*>@<$>@<*@<*>@GHC.Utils.Outputable$$"@$+$"@<+>"@<>"@ GHC.Utils.Ppr$$@$+$@<+>@<>@Language.Haskell.TH.PprLib$$@$+$@<+>@<>@ghc-mod GhcMod.Error modifyError'GhcMod.Options.DocUtils$$@$$$"@<$$>@<=> @<||>@GhcMod.Options.Help\\@ GhcMod.Pretty<+>:@ghc-prim GHC.Classes&&@/=@<@<=@==@>@>=@||@GHC.Prim*#@*##@**##"@+#@+##@-#@-##@/##@/=#@/=##@<#@<##@<=#@<=##@==#@==##@>#@>##@>=#@>=##@seqGHC.PrimopWrappers*#"@*##"@**##"@+#"@+##"@-#"@-##"@/##"@/=#"@/=##"@<#"@<##"@<=#"@<=##"@==#"@==##"@>#"@>##"@>=#"@>=##"@ GHC.Types~@~~@ ghc-proofs GHC.Proof=/====ghc-source-genGHC.SourceGen.Binds<--?GHC.SourceGen.Expr@::@"@GHC.SourceGen.Overloaded@@@GHC.SourceGen.Type-->==> ghc-tags-core GhcTags.Tag"@ghc-tcplugin-apiGHC.TcPlugin.API:-:@:|:@mkVisFunTyMany@GHC.TcPlugin.API.Internal:-:@:|:@ghc-typelits-extraGHC.TypeLits.ExtraDiv@Mod@ghc-typelits-presburgerGHC.TypeLits.Presburger.Types :&&@:*@:+@:-@:/=@:<@:<=@:==@:>@:>=@:||@ ghci-diagrams DrawDiagrams*."@.*."@.+."@.-."@<|>"@>-<"@ ghci-hexcalc Data.GHex .%@.&@.++@./@.<< @.>> @.@.^@.|@ghcideDevelopment.IDE<+>@<>@%Development.IDE.GHC.Compat.Outputable$$"@<+>"@Development.IDE.GHC.Compat.UtilorElse@ ghcjs-base Data.JSStringcons@#Data.JSString.Internal.Fusion.Types:*:"@JavaScript.Array!"@JavaScript.JSON.Types.Instances.!="@.:"@.:?"@.="@JavaScript.JSON.Types.Internal!"@^!"@ghcjs-base-stub Data.JSStringcons@JavaScript.Array!"@ ghcjs-hplayGHCJS.HPlay.Cell.=GHCJS.HPlay.View++>@@*>@<$@<$>@<*@<**>@<*>@<+>@<:>@<|>@<~>@!Text.Gigaparsec.Errors.CombinatorText.Gigaparsec.Expr+<@>+@gingerText.Ginger.GVal~!"@~:@~> @ gingersnapGingersnap.Core.!"@.!?"@git-remote-ipfs$Network.IPFS.Git.RemoteHelper.Format%"@githubGitHub.Data.Content.=?"@GitHub.Internal.Prelude+!!"@$$!&&@*@** @*>@+@++@-@."@.!="@.:"@.:?"@.= @/@/=@<@<$@<$>@<&>?<*@<*>@<=@<>@<|>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@ hashWithSaltmod@notElem@quot@rem@seq||@github-app-tokenGitHub.App.Token.Prelude%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@ github-dataGitHub.Data.Content.=?"@ github-rest GitHub.REST.:"@:=?GitHub.REST.KeyValue:=?glambdaLanguage.Glambda.Util$$"@glazierGlazier.Command.Exec orMaybeExec@glibSystem.Glib.Attributes::=::~:=:=>:~:~>glircClient.State.Window:-"@gllGLL.Combinators.BinaryInterface**>@**>>>@<$$@<$$>@<**@<**>@<**>>@<**>>>@<::=@<::=>@<:=@<:=>@<<**>@<<<**@<<<**>@<||>@GLL.Combinators.Interface**>@**>>>@<$$@<$$>@<**@<**>@<**>>@<**>>>@<::=@<::=>@<:=@<:=>@<<**>@<<<**@<<<**>@<||>@ glob-posixSystem.Directory.Glob<>@global Data.Global=::"@gloss$Graphics.Gloss.Data.Point.Arithmetic*@+@-@ gltf-codecCodec.GlTF.Prelude.!="@.:"@.:?"@glualintGLua.AG.PrettyPrint<->@ goal-core Goal.Core'$$!!&&&@*@** @***@*>@+@+++@-@."@.!"@.:"@.="@<$@<$!!>@<$!>@<$>@<*@<**>@<*>@<<<?<<^?<=@<=<?<=?@<|>@=<<?>=>?>>?>>=?>>>?>>^?Div@^ @^<<?^>>?on|||@ goal-geometryGoal.Geometry.Manifold#@Goal.Geometry.Map>$>"@>.>"@Goal.Geometry.Map.Linear<$<"@<*@<.<"@>$+>"@>$<"@>+>"@>.+>"@>.<"@Goal.Geometry.Vector#*@.>@/>@<.>@goal-probabilityGoal.Probability.Conditional*<$< @*<.< @>$>* @>.>* @ gofer-prelude Prelude.Gofer!!"@$"@&&"@*"@+"@++"@-"@."@/"@/="@<"@<="@=="@>"@>="@\\"@^"@||"@gogolNetwork.Google!"@Network.Google.Auth.Scope!"@ gogol-coreNetwork.Google.Data.JSON.!="@.:"@.:?"@.= @Network.Google.Prelude,!!"@# @$$!&&@*@** @*>@+@++@-@."@.!="@.:"@.:?"@.= @/@/=@:<|>@:>@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^. @^^ @div@elem@ hashWithSaltmod@notElem@quot@rem@||@ google-driveNetwork.Google.Drive.Search?!="@?&&"@?<"@?<="@?="@?>"@?>="@?||"@ google-searchLanguage.Google.Search.Simple/\"@\/"@ gore-and-ashControl.Wire.Core&&&!"@***!"@Control.Wire.Event&>"@<&"@Control.Wire.Switch-->"@>--"@gpsGeo.Computations/\"@\/"@grab Control.Grab/"@graknGrakn-:"@.:"@<:"@grammar-combinators+Text.GrammarCombinators.Base.ProductionRule $>>"@$>>*"@$|>>"@$|>>*"@*>>>"@<|||"@>>>"@>>>*"@>|||"@|||"@grammatical-parsers Text.Grampa<<|>@grapefruit-frpFRP.Grapefruit.Signal#>@<#@<#>@sfApp@*FRP.Grapefruit.Signal.Incremental.Sequence<|"@><"@|>"@grapefruit-records Data.Record:&"@:="@Data.Record.Contextapp grapefruit-uiGraphics.UI.Grapefruit.Comp<<|"@>>|"@|<<"@|>>"@Graphics.UI.Grapefruit.Itemwith@graph-rewritingGraphRewriting.Pattern<|>@%GraphRewriting.Pattern.InteractionNet:-:"@GraphRewriting.Rule>>>"@ graph-traceGraph.Trace.Internal.GhcFacade$$"@$+$"@*>@<$>@<*@<*>@<+>"@<.>"@<>"@consBag@ mkCoreApp@ mkCoreApps@mkFunTy@ mkInvisFunTy@mkInvisFunTyMany@ mkVisFunTy@mkVisFunTyMany@snocBag@ graph-utilsData.Graph.EasyGrapher:=>"@graphics-drawingcombinatorsGraphics.DrawingCombinators%%"@graphiteData.Graph.Types-->"@<->"@ graphql-api GraphQL.API:> @GraphQL.Internal.API:> @GraphQL.Internal.Resolver:<> @GraphQL.Resolver:<> @graphql-clientData.GraphQL.Bootstrap.= @graphtedPrelude.Graphted *>@<$@<$>"@<*@<**>@<*>@<+>"@<|>"@=<<?>>?>>=?graphvizData.GraphViz.Parsing *>@<$@<$>@<*@<**>@<*>@<|>@apply@discard@Data.GraphViz.Printing<$$>@<++>@<+>@@@beside@Data.GraphViz.Types.Graph&@Data.GraphViz.Types.Monadic-->"@<->"@graqlGraql-:"@.:"@<:"@greskell Data.Greskell$.&.?-:@.:"@<$.><*.>=:"@Data.Greskell.Extra<=:>"@<=?>"@Data.Greskell.GTraversal$.&.?<$.><*.>Data.Greskell.GTraversal.Gen$.&.?<$.><*.>Data.Greskell.Graph-:@=:"@ greskell-coreData.Greskell.GraphSON.:"@gridMath.Geometry.GridMap!"@grids Data.Grid//"@Data.Grid.Internal.Errors:$$:@:<>:@?!?Data.Grid.Internal.Grid//"@grisette Grisette.Core #"@.#"@.&&@./=@.<@.<=@.==@.>@.>=@.||@/Grisette.Experimental.Qualified.ParallelUnionDo>>"@>>="@*Grisette.Internal.Core.Data.Class.Function#"@+Grisette.Internal.Core.Data.Class.LogicalOp.&&@.||@,Grisette.Internal.Core.Data.Class.PlainUnion.#"@'Grisette.Internal.Core.Data.Class.SymEq./=@.==@(Grisette.Internal.Core.Data.Class.SymOrd.<@.<=@.>@.>=@$Grisette.Internal.SymPrim.GeneralFun-->$Grisette.Internal.SymPrim.Prim.Model::="@'Grisette.Internal.SymPrim.SymGeneralFun-->-~>'Grisette.Internal.SymPrim.SymTabularFun=~>$Grisette.Internal.SymPrim.TabularFun=-> Grisette.Lib.Control.Applicative.*>@.<$@.<$>@.<*@.<**>@.<*>@.<|>@Grisette.Lib.Control.Monad.<$@.<$!>@.<=<?.=<<?.>=>?.>>?.>>=?Grisette.Lib.Data.Functor.$>@.<$@.<$>@.<&>?Grisette.Lib.Data.List.!?"@.\\"@Grisette.SymPrim-->-~>::="@=->=~>Grisette.Unified./="@.<"@.<="@.=="@.>"@.>="@,Grisette.Unified.Internal.Class.UnifiedSymEq./="@.=="@-Grisette.Unified.Internal.Class.UnifiedSymOrd.<"@.<="@.>"@.>="@(Grisette.Unified.Lib.Control.Applicative.*>@.<$@.<$>@.<*@.<**>@.<*>@.<|>@"Grisette.Unified.Lib.Control.Monad.<$@.<$!>@.<=<?.=<<?.>=>?.>>?.>>=?!Grisette.Unified.Lib.Data.Functor.$>@.<$@.<$>@.<&>? groundhogDatabase.Groundhog &&.@/=.@<.@<=.@=.@==.@>.@>=.@||.@~>@Database.Groundhog.Core~>@Database.Groundhog.Expression &&.@/=.@<.@<=.@=.@==.@>.@>=.@||.@Database.Groundhog.Generic.Sql<>@groundhog-postgresql#Database.Groundhog.Postgresql.Array!"@!:"@<@"@@>"@&Database.Groundhog.Postgresql.Geometry#"@##"@&&"@&<"@&<|"@&>"@*.@+.@-.@/.@<->"@<<"@<<|"@<@"@<^"@>>"@>^"@?#"@?-"@?-|"@?|"@?||"@@>"@|&>"@|>>"@~="@$Database.Groundhog.Postgresql.HStore->."@<@"@?&"@?|"@@>"@ group-theory Data.Group><@~~@Data.Group.Additive+@-@×@Data.Group.Multiplicative*@/@^ @Data.Group.Permutation$--$groups Data.Group~~@guarded-rewritingGenerics.Instant.Rewriting+->"@//"@h-booruHBooru.Parsers.FieldParsers<:+>"@h-raylibRaylib.Util.Math /*/"@/+/"@/-/"@|*"@|*|"@|+"@|+|"@|-"@|-|"@|.|"@|/"@|/|"@hBDD Data.Boolean-->"@/\"@<--"@<->"@\/"@hMPCRuntime .*"@.+"@.-"@./"@.<"@.<="@.=="@.>"@.^"@hPDBBio.PDB*|"@|*"@Bio.PDB.Structure*|"@|*"@Bio.PDB.Structure.List!"@++"@Bio.PDB.Structure.Vector*|"@|*"@hScraperHScraper.Query>=>"@|>>"@~=~"@ hSimpleDBNetwork.AWS.SimpleDB:="@hTensorNumeric.LinearAlgebra.Array!"@!>"@.*@~> @ Numeric.LinearAlgebra.Array.Util!"@!>"@|*|@~> @Numeric.LinearAlgebra.Exterior/\@\/@!Numeric.LinearAlgebra.Multivector-|@/\@\/@habloPretty.$"@hackage-securityHackage.Security.TUF.FileMap!"@Hackage.Security.Trusted<$$>"@Hackage.Security.Util.Path<.>"@"@hactorsControl.Concurrent.Actor!"@!>"@"@ hadoop-rpcData.Hadoop.HdfsPath"@hafarNumeric.AffineForm.*"@.+"@#Numeric.AffineForm.ExplicitRounding*/"@*\"@+/"@+\"@-/"@-\"@haiji Text.Haiji:->@hailsHails.Data.Hson-:"@=:"@Hails.PolicyModule.DSL<=="@==>"@hakaru Language.Hakaru.CodeGen.AST.!=."@.&&."@.*."@.*=."@.+."@.+=."@.-."@.->."@..."@./."@.<."@.<=."@.=."@.==."@.>."@.>=."@.||."@Language.Hakaru.Parser.AST:*@Et@PEt@'Language.Hakaru.Runtime.LogFloatPrelude!"@**"@Language.Hakaru.Runtime.Prelude!"@Language.Hakaru.Syntax.AST:$@:*@Language.Hakaru.Syntax.DatumEt@PEt@Language.Hakaru.Syntax.IClassesCons1@Language.Hakaru.Syntax.Prelude!"@&&@*@** @*>@+@-@/@/=@<@<$>@<*@<*>@<=@<|>"@==@>@>=@>>?>>=?^ @^^ @app"@thRootOf"@||@Language.Hakaru.Syntax.SArgs:*@Language.Hakaru.Types.CoercionCCons@Language.Hakaru.Types.DataKind:->:@Language.Hakaru.Types.SingSEt@SFunSPlus@hakka Hakka.Actor!"@hakoText.Hako.Html<++>"@hakyllHakyll.Core.Identifier.Pattern.&&.@.||.@ hakyllbarsHakyllbars.Common.&&.@.||.@<&>?@<=<?<|>@>=>?Hakyllbars.Source.Utilhalide-haskellLanguage.Halide!"@eq@gt@gte@lt@lte@neq@hamsqlDatabase.HamSql.Internal.Utils<->"@<>@<\>"@Database.YamSql.Internal.SqlId//"@<.>"@hamtmap Data.HamtMap!"@hamusicMusic.Analysis.PF!"@-|-"@><"@ hanabi-dealer Game.Hanabi|||"@haphviz Text.Dot.Gen-->"@.:"@=:"@happstack-foundationHappstack.Foundation:="@happstack-ixsetHappstack.Data.IxSet &&&"@@*"@@+"@@<"@@<="@@="@@>"@@><"@@><="@@>="@@>=<"@@>=<="@|||"@happstack-stateHappstack.State.ComponentSystem:+:"@happstack-utilHappstack.Util.Common.^"@ happy-metaText.Happy.QuoteHappyStk"@haqueryHaquery-.haquil Data.Qubit*^@*^^@^*@^*^@^^*@harg Options.Harg:*@:+@:->@Options.Harg.Het.HList:+@:->@Options.Harg.Het.Prod:*@harp Harp.Match+++"@harpyHarpy.CodeGenMonad@@"@hasData.Has&"@.>"@^-"@^."@^:"@^="@hasbolt Database.Bolt=:"@Database.Bolt.Lazy=:"@hasbolt-extrasDatabase.Bolt.Extras:&&@:==@:||@Database.Bolt.Extras.DSL #"@-:?.#"@.:"@:!-:@:!->:@:&&:@:-!:?:<-!:?:||:@<-:?Database.Bolt.Extras.DSL.Typed!-:@!->:@-:?.&@<-:?=:"@Database.Bolt.Extras.Graph#"@hascasCQL#@ hascat-libHascat.Toolkit//"@hashable Data.Hashable hashWithSalthashable-accelerate#Data.Array.Accelerate.Data.Hashable hashWithSalthashmap Data.HashMap!"@\\"@ Data.HashSet\\"@ hashmap-ioData.IOHashMap!"@!?"@Data.IOHashMap.STM!"@!?"@hashring Data.HashRing!"@hask Hask.Category!"@$"@."@\\"@Hask.Iso#"@ haskell-adminAdminwith"@haskell-admin-core Admin.Components.ComponentsClasswith"@haskell-bitmex-rest BitMEX.Core-&-"@ haskell-ciHaskellCI.OptionsGrammar^^^@HaskellCI.Prelude.!!"@$$!&?&&@*@** @*>@+@++@-@."@.~@/@/=@/\@:|@<@<$@<$>@<&>?<*@<*>@<=@<>@<|>@=<<?==@>@>=@>>?>>=?\/@^ @^. @^^ @div@elem@mod@notElem@onquot@rem@seq||@~@HaskellCI.Travis.Yaml^^^"@HaskellCI.YamlSyntax~>"@ haskell-conll Data.TagLabel:+:@haskell-course-preludes Prelude.OldIO."@ Prelude.Week0&&"@*"@*."@+"@+."@-"@-."@."@/="@/=."@<"@<."@<="@<=."@<>"@=="@==."@>"@>."@>="@>=."@>>"@||"@haskell-generateLanguage.Haskell.Generate.Monad<>$"@$Language.Haskell.Generate.PreludeDef<>."@ haskell-giData.GI.CodeGen.ModulePath/."@haskell-gi-base Data.GI.Base:=:=>:~:~>Data.GI.Base.Attributes:=:=>:~:~>Data.GI.Base.ShortPrelude$++@."@/=@:=:=>:~:~><$>@=<<?==@>=>?>>?>>=?~@haskell-neo4j-clientDatabase.Neo4j|:"@Database.Neo4j.Types<>"@|:"@haskell-src-extsLanguage.Haskell.Exts.SrcLoc<**@<++>@<+?>@@<^^>@Language.Haskell.Exts.Syntax=~="@haskell-src-meta&Language.Haskell.Meta.Syntax.Translate.->."@Language.Haskell.Meta.Utils|$||->|"@|.|"@haskell-src-meta-mwottonLanguage.Haskell.Meta.QQ.SKI:$"@&Language.Haskell.Meta.Syntax.Translate.->."@Language.Haskell.Meta.Utils|$|"@|->|"@|.|"@haskell-tools-ast-trf3Language.Haskell.Tools.AnnTrf.SourceTemplateHelpers<>"@"haskell-tools-builtin-refactoringsALanguage.Haskell.Tools.Refactor.Builtin.ExtensionOrganizer.ExtMap:&&:"@:||:"@ haskell2010 Control.Monad<=<"@=<<"@>=>"@>>"@>>="@ Data.Array!"@//"@ Data.Bits.&."@.|."@ Data.Complex:+"@ Data.List!!"@++"@\\"@ Data.Ratio%"@Prelude!!"@$"@$!"@&&"@*"@**"@+"@++"@-"@."@/"@/="@<"@<="@=<<"@=="@>"@>="@>>"@>>="@^"@^^"@||"@ haskell2020Control.Applicative*>@<*@<**>@<*>@<|>@ Control.Monad<=<?=<<?>=>?>>?>>=? Data.Array!"@//"@ Data.Bits .&.@.|.@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@ Data.Complex:+@ Data.List!!"@++@\\@elem@notElem@ Data.Ratio%@Prelude !!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<*@<*>@<=@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@||@ haskell98Array!"@//"@Complex:+"@List!!"@++"@\\"@Monad=<<"@>>"@>>="@Prelude!!"@$"@$!"@&&"@*"@**"@+"@++"@-"@."@/"@/="@<"@<="@=<<"@=="@>"@>="@>>"@>>="@^"@^^"@||"@Ratio%"@haskell98librariesArray!"@//"@Complex:+"@List!!"@++"@\\"@Monad=<<"@>>"@>>="@Ratio%"@ haskelldbDatabase.HaskellDB!"@!."@#"@.%."@.&&."@.*."@.++."@.+."@.-."@./."@.<."@.<=."@.<>."@.==."@.>."@.>=."@.||."@<<"@<<-"@Database.HaskellDB.DBLayout#"@Database.HaskellDB.Database!."@Database.HaskellDB.HDBRec!"@#"@.=."@Database.HaskellDB.Query.%."@.&&."@.*."@.++."@.+."@.-."@./."@.<."@.<=."@.<>."@.==."@.>."@.>=."@.||."@<<"@<<-"@ haskellishLanguage.Haskellish<*!>"@"@"@ haskelzincInterfaces.MZAST !."@#/.@#|.@$$"@%"@=.?@@@where_@|:@Interfaces.MZBuiltIns!=.@*. @++. @+.@-.@->.@...@/. @/\.@<-.@<->.@<.@<=.@=.=@>.@>=.@\/.@haskgameGraphics.UI.HaskGame.Vector2***"@ haskhol-coreHaskHOL.Core.Lib#<<"@<#<"@<#>"@"@\\"@ hasklepiasHasklepias.Reexports!>$&&@*>@++@."@.>"@<@@<*@<*>@<."@<=@<|==@>@>=@>>?>>=?|>||@ haskoin-coreHaskoin.Crypto.Keys.Extended++/"@haskoin-store-dataHaskoin.Store.WebCommon<++>"@<+>"@<:>"@haskoonFactis.Haskoon.WebHsp:="@haskore Haskore.Basic.Duration%+"@Haskore.Basic.Tempo=/="@"Haskore.Interface.CSound.Orchestra&&*"@/=*"@<*"@<=*"@==*"@>*"@>=*"@||*"@ Haskore.Music+:+"@/=:"@=:="@Haskore.Music.GeneralMIDI+:+"@=:="@Haskore.Music.Rhythmic+:+"@=:="@Haskore.Music.Standard+:+"@=:="@Medium+:+"@=:="@Medium.Plain.Binary:+:"@:=:"@haskore-vintageHaskore.Basics/=:"@:+:"@:=:"@=:="@hasktorch-codegenCodeGen.Prelude$!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@<|>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@||@hasktorch-indef$Torch.Indef.Dynamic.Tensor.Math.Blas<.>"@)Torch.Indef.Dynamic.Tensor.Math.Pointwise^*^"@^+^"@^-^"@^/^"@Torch.Indef.Static.Tensor!!"@#Torch.Indef.Static.Tensor.Math.Blas!*"@!*!"@<.>"@'Torch.Indef.Static.Tensor.Math.Pairwise*^"@+^"@-^"@/^"@^*@^+@^-@^/@(Torch.Indef.Static.Tensor.Math.Pointwise^*^"@^+^"@^-^"@^/^"@Torch.Indef.Types.:@ haskus-binaryHaskus.Binary.Bits.&."@.|."@Haskus.Binary.Bits.Bitwise.&."@.|."@Haskus.Number.BitNat.*."@.+."@.-."@./."@.<<."@.>>."@Haskus.Number.Int+#@-#@<#@<=#@==#@>#@>=#@Haskus.Number.NaturalRange.++."@ haskus-utilsHaskus.Utils.Flow <.<"@<=<?<|<||<|||>.>"@>=>?|>||>|||>Haskus.Utils.HArray>~:~>"@Haskus.Utils.MultiState>:>"@>~:>"@Haskus.Utils.STM.TMap!"@haskus-utils-compatHaskus.Utils.Text%"@%. @cons@haskus-utils-dataHaskus.Utils.HListHCons@Haskus.Utils.InfList:>"@Haskus.Utils.List++@\\@elem@notElem@haskus-utils-typesHaskus.Utils.Types.Error:$$:@:<>:@Haskus.Utils.Types.Nat*@+@-@<=@<=?@Div@Mod@^ @haskus-utils-variantHaskus.Utils.ContFlow>%:>>-:>>:%:>>:-:>>::>>:>Haskus.Utils.Variant.Syntax>>"@>>="@hasmtlibLanguage.Hasmtlib.Boolean&&@<==<==>@==>xor@||@Language.Hasmtlib.Type.Expr /==@<=?@<=?#"@=?@>?@Language.Hasmtlib.Type.Relation!"@!?"@ hasql-simple Hasql.Simple->."@->?"@hasqlator-mysqlDatabase.MySQL.Hasqlator &&.@*.@++.@+.@-.@/.@/=.@<.@<=.@=.@>.@>=.@||.@Database.MySQL.Hasqlator.Typed &&.@/=.@:=<.@<=.@=.@>.@>=.@@@"@||.@ hasqly-mysqlDatabase.Hasqly.+"@.-"@.>"@haste-compiler Haste.App<.>"@Haste.App.Concurrent!"@"@ Haste.Object#"@Haste.Serialize.:"@.:?"@ haste-perchHaste.App.Perch!"@ Haste.Perch!"@hat Hat.Array!!"@!//"@*!"@*//"@+!"@+//"@ Hat.Complex+:+"@:+"@Hat.Control.Monad !<=<"@!=<<"@!>=>"@!>>"@!>>="@*=<<"@*>=>"@+=<<"@+>=>"@|>>"@|>>="@ Hat.Data.List!!!"@!++"@!\\"@*!!"@*++"@+!!"@+++"@Hat.List!!!"@!++"@!\\"@*!!"@*++"@+!!"@+++"@ Hat.Monad!=<<"@!>>"@!>>="@*=<<"@+=<<"@|>>"@|>>="@ Hat.Prelude$!!!"@!$"@!$!"@!&&"@!++"@!."@!/"@!=<<"@!>>"@!>>="@!^"@!^^"@!||"@*!!"@*$"@*$!"@*&&"@*++"@*."@*=<<"@*^"@*^^"@*||"@+!!"@+$"@+$!"@+&&"@+++"@+."@+=<<"@+^"@+^^"@+||"@|/"@|>>"@|>>="@Hat.PreludeBasicx!!!"@!$"@!$!"@!%"@!&&"@!++"@!."@!/"@!=<<"@!>>"@!>>="@!^"@!^^"@!||"@*!!"@*$"@*$!"@*%"@*&&"@*++"@*."@*=<<"@*^"@*^^"@*||"@+!!"@+#!##=%=#!#$=^^=="@+#!&!=%=#!&$=#&=="@+#!^$=%=#!^&=$*=="@+##!^=%=##!>=%+=="@+##&&=%=##&+=&^=="@+##@%=%=##@*=*@=="@+#$$*=%=#$$^=+>=="@+#$^#=%=#$^*=#&=="@+#%$$=%=#%$+=$*=="@+#&#=*=#&#=%+-"@+#>#=*=#>#=%>**"@+#^*=*=#^*=%*/"@+$"@+$!"@+%"@+%#>*=%^=%#>*=%@=="@+%$$%=*=%$$%=&%<="@+%$$&=*=%$$&=&%<"@+%$$@=*=%$$@=*#*"@+%$$^=*=%$$^=*&+"@+%$%@=*=%$%@=&$/"@+%$^=*=%$^=$@>>"@+%+!=%=%+!=#^=="@+&#^=%=&#>=$&=="@+&&"@+&@$=*=&@$=&><="@+&^@=*=&^@=&>=="@+*!+=*#=*!+=*$=="@+*$!=*=*$#=%#>>="@+*$@=*#=*$@=*$=="@+*&+=&=*&+=$$>>="@+**&=$#=**&=$$=="@+*+*=%=*+*=$&=="@+*++=%=*++=$&/="@+*+>=%=*+>=$&<"@+*^!=%=*^!=$&<="@+*^#=%=*^#=$&>="@+*^$=%=*^$=$&>"@+*^*=$=*^*=$^+"@+*^+=$=*^+=$@-"@+*^^=$=*^^=$@*"@++$%=%=+$%=$@=="@++$&=%=+$&=$@/="@++$>=%=+$>=$@>="@++$@=%=+$@=$@<="@++$^=%=+$^=$@<"@++%!=%=+%!=$@>"@++%%=$=+%%=%!+"@++%&=$=+%&=%!-"@++%*=$=+%*=%!*"@+++"@ ++>=*=+>=%+/="@++>@=%=+>@=$+/"@++@!=%=+@!=$+<="@++@#=%=+@#=$+>="@++@$=%=+@$=$+>"@++@*=$=+@*=$@+"@++@+=$=+@+=$@-"@++@^=$=+@^=$@*"@++^*=%=+^*=$+=="@++^+=%=+^+=$+/="@++^>=%=+^>=$+<"@+."@+:%"@+=<<"@+>!%=*=>!%=%>>>="@+>#+=%=>#+=%>=="@+>%#=%=>%#=**=="@+>&^=%=>&^=^#=="@+>+*=%=>++=**=="@+>@^=%=>@@=++=="@ +@+=*=@+=&#<="@ +@>=*=@>=&#>"@+@@%=%=@@*=$+=="@ +@@=*=@@=&#>="@ +@^=*=@^=&#<"@+^"@ +^!=*=^!=%+=="@+^*%=%=^*%=$^=="@+^*&=%=^*&=$^/="@+^*>=%=^*>=$^>="@+^*@=%=^*@=$^<="@+^*^=%=^*^=$^<"@+^+!=%=^+!=$^>"@+^+%=$=^+%=$>+"@+^+&=$=^+&=$>-"@+^+*=$=^+*=$>*"@+^^"@+^^+=%=^^+=$^/"@+||"@:%"@|/"@|>>"@|>>="@ Hat.Ratio!%"@*%"@+%"@haxl Haxl.CorepAnd@pOr@Haxl.Core.Monad:<$>"@:>>="@Haxl.Core.ParallelpAnd@pOr@ Haxl.Prelude/!!"@$$!&&@*@** @*>@+@++@-@."@.&&@.++"@./=@.<@.<=@.==@.>@.>=@.||@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@pAnd@pOr@quot@rem@seq||@hbayesBayes.BayesianNetwork.!."@.&."@.==."@.|."@~~"@Bayes.Continuous=:"@ Bayes.Factor=:"@Bayes.InfluenceDiagram=:"@~~"@hbf HBF.Types<&>"@ hcg-minus Data.CG.Minus~="@hcomSystem.Win32.Com#?## System.Win32.Com.HDirect.HDirect.+.@hcube HCube.Utility<*"@|**|"@|*|"@~>"@~|"@hdfSound.DF.Uniform.Faust~."@~:"@~:>"@~<:"@~~"@hdiffData.HDiff.Patch.Merge//"@Languages.RTree:>:"@hdirectGetOpt-="@-=="@-==="@-===="@-?"@PP$$"@$+$"@<+>"@<>"@Utils#"@hdmenu Core.Util@<>@ heart-coreHeart.Core.Prelude'!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@:<|@:|>@<@<$@<$>@<*@<*>@<=@<>@<|>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@ hashWithSaltmod@notElem@quot@rem@||@hedgehogHedgehog/==@===@Hedgehog.Internal.Gen:.@Hedgehog.Internal.Prelude%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@Hedgehog.Internal.Property/==@===@hedgehog-classesHedgehog.Classesheq@heq1@heq2@hneq@hneq2@ hedgehog-fnHedgehog.Function.Internal:->@hedgehog-servantHedgehog.Servant:*:@heftia Control.Effect.ExtensibleChurch!@!!@:!@:!!@Control.Effect.ExtensibleFastA!@!!@:!@:!!@Control.Effect.ExtensibleFinal!@!!@:!@:!!@Control.Effect.ExtensibleFinalA!@!!@:!@:!!@Control.Effect.ExtensibleTree!@!!@:!@:!!@Control.Effect.ExtensibleTreeA!@!!@:!@:!!@Control.Effect.Hefty$@$$@ Data.Free.Sum+@Data.Hefty.Extensible<<|@<|@Data.Hefty.Union|+@|+:@heggData.Equality.Graph.Lens%~@.~@^. @Data.Equality.Saturation:=@:|@!Data.Equality.Saturation.Rewrites:=@:|@Data.Equality.Utils.IntToIntMap!"@Data.Equality.Utils.SizedList|:"@heidiHeidi!:"@heliumHelium.Main.CompileUtils===>"@1Helium.StaticAnalysis.Inferencers.KindInferencing<==>"@1Helium.StaticAnalysis.Inferencers.TypeInferencing|^|"@'Helium.StaticAnalysis.Messages.Messages<:>"@>:>"@3Helium.StaticAnalysis.Miscellaneous.TypeConstraints !::!"@!:::!"@!<=!"@!<==!"@.::."@.:::."@.<=."@.<==."@.==."@.===."@Helium.Utils.Texts:->"@helmFRP.Helm.Signal<~"@~~"@ her-lexerLanguage.Haskell.Her.Parsley<*^"@hercules-ci-agentHercules.Effect=:"@hercules-ci-cnix-exprHercules.CNix.Expr.Context=:"@Hercules.CNix.Expr.Schema#."@#?"@#?!"@#??"@$?"@->.?->??.$"@::.::?>>$."@>>$?"@>>."@>>?"@|!"@hermitHERMIT.Dictionary.Reasoning$$"@$$$"@-->"@/\"@==="@==>"@\/"@HERMIT.External.&"@.+"@.||"@ HERMIT.Kure<$>"@<*>"@heshHesh !>"@!>>"@&>"@&>>"@.="@/>"@/>>"@"@ Hesh.Process !>"@!>>"@&>"@&>>"@.="@/>"@/>>"@"@ hetero-dictData.Hetero.Dict:="@Data.Hetero.DynDict:="@Data.Hetero.KVList:="@hevm EVM.Types.&&@./=@.<@.<=@.==@.>@.>=@.||@ hexpat-lensText.XML.Expat.Lens.Generic./"@Text.XML.Expat.Lens.Unqualified./"@hexpat-streamparserText.XML.Expat.StreamParser<|>@hextraHextra.Applicative<.>"@<::>@<:>@<<>>@Hextra.Conditional$?"@Hextra.Function.<"@.>"@<."@<.-"@>."@Hextra.Integral\*"@\+"@\-"@ Hextra.List!!?"@ Hextra.Num<->"@heyting-algebrasAlgebra.Boolean==>@Algebra.Heyting.BoolRing<+>@<.>"@Algebra.Heyting.CounterExample===@hformat Text.Format~% @~~@ hgeometricAlgebra.Geometric.Clip/\"@<+>"@\/"@\\"@ hgeometry Data.Geometry*^@.+^@.-.@.-^@^*@^+^@^-^@^/@Data.Geometry.Transformation|.|"@Data.Geometry.Vector*^@.+^@.-.@.-^@^*@^+^@^-^@^/@hgeometry-combinatorialData.Ext:+? Data.LSeq:<@:<<@:<|@:>@:|>@<|@><@|>@ hgeometry-ipe Ipe.IpeOut!"@hgrepLanguage.Haskell.HGrep.Prelude$$!$>@&?&&@*>"@."@/="@<"@<$"@<$>@<*"@<**>@<*>"@<="@<>@<|>"@=="@>"@>="@>>"@>>="@on||@ hi3status Hi3Status%%"@hiedbHieDb:.@ HieDb.Compat<+>"@ higherorderData.Bool.Higher??"@highjson Data.HighJson.->"@.="@.=?"@:& @:+:@:|:@@->"@ highlighterText.Highlighter.Types:."@ highlighter2Text.Highlighter.Types:."@highs-lpNumeric.HiGHS.LP.*@<=.@==.@>=.@>=<.@hindley-milnerLanguage.HM.Theta<@>"@hintLanguage.Haskell.Interpreter:="@hinterLanguage.Haskell.Interpreter:="@ hinze-streamsData.Stream.Hinze.Idiom<>"@Data.Stream.Hinze.NumExt/"@^"@Data.Stream.Hinze.Stream**"@//"@<:"@<<"@\/"@hipGraphics.Image|*|"@Graphics.Image.ColorSpace+:@:+@Graphics.Image.Interface|*|"@ Graphics.Image.Processing.Binary!&&!@!/=!@!!@!>=!@!||!@.&&.@./=.@.<.@.<=.@.==.@.>.@.>=.@.||.@!Graphics.Image.Processing.Complex!+!@hipeData.Geometry.Ipe.IGC<|"@hist-pl-transliterNLP.HistPL.Transliter#>"@.|"@.|."@>#>"@>+>"@histogram-fillData.Histogram.Bin.Bin2D><"@Data.Histogram.Fill-<<@<<-@<<-$@<<-|@<"@<+>"@<.>"@<>"@>>>"@ hjugement Majority.RanknCk@hjugement-protocolVoting.Protocol.Arithmetic*@+@-@/@^ @Voting.Protocol.Utilso2"@ hkd-recordsData.HKD.Records:>@:~>@hlatexLanguage.LaTeX!$!$?$?★"@Language.LaTeX.Builder!$!$?$?★"@"Language.LaTeX.Builder.MonoidUtils<&&>"@<>@<||>"@⊕@Language.LaTeX.Printer$$"@$$$"@Language.LaTeX.Slicer^$hledgerHledger.Cli.Script!!"@$>@*>@++@-<.>@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<.>@@<=@<=<?<|>@=<<?>@>=@>=>?>>?>>=?@=??@??@?=?@@"@\\@elem@notElem@ hledger-libHledger.Data.Amount@@"@ hledger-webHledger.Web.Import9!!"@!=.@$$!&&@*@** @*=.@*>@+@++@+=.@-@-=.@."@.:"@.= @/@/<-.@/=@/=.@:#:"@<@<$@<$!>@<$>@<*@<*>@<-.@<.@<=@<=.@<=<?<>@=.@=<<?==@==.@>@>.@>=@>=.@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@||.@~@hlist Data.HList:.@hls-cabal-pluginIde.Plugin.Cabal.Parse:|@ hls-graphDevelopment.IDE.Graph.Classes/=@==@ hashWithSalthls-plugin-apiIde.Plugin.Properties&?hls-test-utilsTest.Hls.:!?"@.=?"@hlyMusic.LilyPond.Light.Annotation&"@&#"@Music.LilyPond.Light.Notation#"@##"@##@"@#@"@hmatrixNumeric.LinearAlgebra!#> @#> @<# @<.> @<> @<\>@Numeric.LinearAlgebra.Data !"@./.@===@><"@?"@??"@|>"@|||@¿"@Numeric.LinearAlgebra.Devel#|//apply?applyRaw?Numeric.LinearAlgebra.HMatrix<·> @¦@——@Numeric.LinearAlgebra.Static #@#> @&@<.> @<> @<\>"@<·> @===@|||@hmatrix-backprop%Numeric.LinearAlgebra.Static.Backprop#@#> @&@<.> @<> @<·> @===@|||@ hmatrix-glpkNumeric.LinearProgramming#@:&:"@:<=:"@:==:"@:>=:"@ hmatrix-nlopt Numeric.NLOPT:|@hmatrix-staticData.Packed.Static.Matrix><"@@@>"@Data.Packed.Static.Vector@>"@'Numeric.LinearAlgebra.Static.Algorithms<->"@<.>"@<>"@<\>"@<|>"@hmemdb Data.HMemDb:&&:"@:&:"@:*:"@:+:"@ hmm-lapackMath.HiddenMarkovModel.Patternappend@hmpfrData.Number.MPFR.InternalshiftL @hmtMusic.Theory.Time.Bel1990.R~>"@Music.Theory.Time.KeyKit.Parser>>~"@Music.Theory.Tuning.Wilson^."@Music.Theory.Xenakis.Sieve∩@∪@⋄@hmt-baseMusic.Theory.Function.: @.:: @.::: @.:::: @.::::: @hnetcdfData.NetCDF.Metadata# @hnixNix.Effects.Basic"@Nix.ExeccallFunc?Nix.Expr.Shorthands$!=@$&&@$*@$+@$++@$-@$->?$/@$//@$<@$<=@$=@$==@$>@$>=@$||@==>?@."@@.<|>"@@@ @ Nix.Frames:~:@:~~:@Nix.LintlintApp? Nix.Prelude<!!?"@$$!$!!$<@$>@&?&&@&&&@&&^"@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<<<?<=@<=<?<>@<|>@=<<?==@>@>$@>$$<@>$<@>=@>=>?>>?>>=?>>>??:??@Compose"@^ @^^ @div@ hashWithSaltmod@onquot@rem@seqxor@||@||^"@ Nix.Type.Type:~>? Nix.Utils@hnnAI.HNN.FF.Network-->"@ ho-rewritingData.Rewriting.Rules$$"@$-"@-$"@-$-"@===>"@hobbitsData.Binding.Hobbits:++:@:>"@Data.Binding.Hobbits.NameMap!"@\\"@Data.Binding.Hobbits.NameSet\\"@Data.Type.RList:++:@:>"@ hoist-errorControl.Monad.Error.Hoist @<%!?> @<%?> @ @Control.Monad.Fail.Hoist @<#> @<%!#> @<%#> @holmes Data.Holmes.$"@.%.@.&&@.*@.*.@.+@.-@./@./.@./=@.<@.<=@.==@.>@.>=@.>>="@.||@<<-"@Data.Propagator.$"@.%.@.&&@.*@.*.@.+@.-@./@./.@./=@.<@.<=@.==@.>@.>=@.>>="@.||@ homeomorphicData.Homeomorphic<<|"@Data.Homeomorphic.Internal<<|"@hommageSound.Hommage.Envelope"@Sound.Hommage.Notation-=-"@->-"@:+:"@:=:"@Sound.Hommage.Parameter:$"@:="@:>>"@:?"@<>"@><"@Sound.Hommage.Signal:><:"@Sound.Hommage.Sound.=>"@<*>"@<+>"@==>"@ homotupleData.Tuple.Homotuple<$>"@<*>"@<>@>>="@hoodDebug.Hood.Observe<<"@hood-offDebug.Hood.Observe<<"@hood2Debug.Hood.Observe<<"@hoodle-builderText.Hoodle.Builder<>@Text.Hoodle.Builder.V0_1_1<>@Text.Hoodle.Builder.V0_2_2<>@Text.Hoodle.Builder.V0_3<>@ hoodle-core Hoodle.Util# hoodle-render#Graphics.Hoodle.Render.Type.HitTest:-"@hooplCompiler.Hoopl<*>@|*><*|@hoppy-generatorForeign.Hoppy.Generator.Spec~:hopsHOPS.GF.Series!^!"@.*"@./"@?@^!"@o@horaData.Time.Hora.Future-"@hoscSound.Osc.Text>>~"@hpack Hpack.Yaml.:"@.:?"@hpathHPath"@hpath-filepathSystem.Posix.FilePath<.>"@"@ hplaygroundHaste.HPlay.Cell.="@Haste.HPlay.View**>"@++>"@"@<<"@<<<"@hpp Hpp.StringSig:.@ Hpp.Types%=@.=@hpqtypesData.Monoid.Utils<+>@"Database.PostgreSQL.PQTypes.Format:*:"@Database.PostgreSQL.PQTypes.SQL@hpsGraphics.PS.PS>+>?Graphics.PS.Path+++"@hpythonLanguage.Python.DSL(&?.!=?.%@.%=.&@.&=.*@.** @.**=.*=.+@.+=.-@.-=./@.//@.//=./=.:.<?.<<@.<<=.<=?.=.==?.>?.>=?.>>@.>>=.@@.@=.^@.^=.|@.|=/>"@in_?isNot_?is_?notIn_? hreq-core Data.Hlist:.@Hreq.Core.API.Internal:=?:>@Hreq.Core.API.MediaType//"@hs-fltkGraphics.UI.FLTK.Widget+|+"@::="@::=>"@:="@:=>"@ hs-functorsControl.Comonad<<=?=<=?=>=?=>>?Control.Semigroupoid."@Data.Functor.Contravariant>$"@>$<"@Data.Profunctor&&&@***@+++@<<^?>>^?^<<?^>>?|||@hs-ixData.Functor.Indexed *>@<*@<**>@<*>@<<=?<=<?=<<?=<=?=>=?=>>?>=>?>>=?hs-java JVM.Common!"@hs-opentelemetry-apiOpenTelemetry.Resource.="@.=?"@%hs-opentelemetry-instrumentation-auto!AutoInstrument.Internal.GhcFacade)$$"@$+$"@<&&>@<+>"@<>"@<||>@App@asJoinId?asJoinId_maybe? idCafInfo?mkApps@mkCoApps@ mkCoreApp@ mkCoreApps@mkFunTy@ mkInvisFunTy@mkTyApps@ mkVarApps@mkVisFunTyMany@ setArityInfo? setCafInfo? setCprSigInfo? setDemandInfo? setDmdSigInfo? setIdArity?setIdCallArity? setIdCbvMarks? setIdCprSig?setIdDemandInfo? setIdDmdSig? setIdOccInfo?setIdOneShotInfo?setIdSpecialisation?setIdUnfolding?setInlineActivation?setInlinePragInfo?setInlinePragma? setOccInfo?setOneShotInfo? setRuleInfo?setUnfoldingInfo? hs-pattransAnalysis<+>"@ Discovery:@"@??Transformations$< @<=>"@>$ @>$<@~~"@Types.@"@.@@"@ hs-pkg-configData.PkgConfig<.>"@"@~/="@~<"@~<="@~="@~>"@~>="@hs-profunctorsData.Profunctor<<^?>>^?^<<?^>>? hs-twitterWeb.Twitter.Types.Import-=>"@ hs-watchman%System.Directory.Watchman.BSER.Parser.:"@$System.Directory.Watchman.Expression.&&@.||@ hsSqlite3Database.Sqlite3:."@hsc3Sound.Sc3.Common.Math.Operator/=**"@<**"@<=**"@==**"@>**"@>=**"@ Sound.Sc3.Common.Monad.Operators *.@+.@-.@.*@.*.@.+@.+.@.-@.-.@./@./.@/.@Sound.Sc3.Ugen.Util.<<."@.>>."@ hsc3-lang#Sound.SC3.Lang.Collection.Extension*."@+."@-."@/."@Sound.SC3.Lang.Core.:"@.::"@.:::"@.::::"@.:::::"@Sound.SC3.Lang.Pattern.P.Event<|"@ hscassandraDatabase.Cassandra=:"@=|"@hscimWeb.Scim.Test.Util"@hsdevControl.Apply.Util&"@HsDev.Database.SQLite:.@:=@HsDev.Tools.AutoFix.+."@.-."@~~@HsDev.Tools.Ghc.Prelude!!"@++@\\@elem@notElem@ HsDev.Util.::"@.::?"@.::?!"@hsgnutlsNetwork.GnuTLS.Attributes::="@::~"@:="@:=>"@:~"@:~>"@ hsgnutls-yjNetwork.GnuTLS.Attributes::="@::~"@:="@:=>"@:~"@:~>"@hsgsomData.Datamining.Clustering.Gsom*."@.*"@<+>"@<->"@%Data.Datamining.Clustering.Gsom.Input*."@.*"@<+>"@<->"@hslua-packagingHsLua.Packaging.Function### @#? @<#> @=#> @=?> @since @ hslua-typing HsLua.Typing#|#"@hspHSP.XMLGenerator:="@<:"@<<:"@<<@"@<@"@hsparqlDatabase.HSparql.QueryGenerator*."@+."@.!=.@.&&.@.*.@.+.@.-.@..|..@./.@.//.@.:."@.<.@.<=.@.==.@.>.@.>=.@.|.@.||.@?."@hspec-attoparsecTest.Hspec.Attoparsec~>"@~?>"@Test.Hspec.Attoparsec.Source~>"@~?>"@hspec-expectationsTest.Hspec.Expectations shouldBe? shouldContain? shouldEndWith?shouldMatchList? shouldNotBe?shouldNotContain?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith? shouldThrow?hspec-expectations-jsonTest.Hspec.Expectations.Json shouldBeJson?shouldBeUnorderedJson?shouldMatchJson?shouldMatchOrderedJson?hspec-expectations-liftedTest.Hspec.Expectations.Lifted shouldBe? shouldContain? shouldEndWith?shouldMatchList? shouldNotBe?shouldNotContain?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith?hspec-expectations-pretty-diffTest.Hspec.Expectations.Pretty shouldBe? shouldContain? shouldEndWith?shouldMatchList? shouldNotBe?shouldNotContain?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith? shouldThrow?hspec-multicheckTest.Hspec.Multicheck==> hspec-serverTest.Hspec.Server.Core@=="@@>="@ hspec-waiTest.Hspec.Wai<:>"@Test.Hspec.Wai.Matcher<:>"@Test.Hspec.Wai.QuickCheck==>hsprayMath.Algebra.Hspray%/%@%//%@%:%@*^@+>@.^@/>@/^@<+@^**^ @^*^@^+^@^-^@^/^@ hsshellscript HsShellScript -&>-@-&>>-@-<-@->-@->>-@-|-@-|=@=>-@=>>-@=|-@=|=@ hsverilogHsVerilog.Simulation<=="@HsVerilog.Verilog.DSL.:"@><"@hsxHSX.XMLGenerator:="@<<:"@<<@"@ hsx-xhtml HSX.Layout<>"@^^"@htlset Data.HtsSet:+"@html Text.Html!"@+++"@<<"@html-parse-utilText.HTML.Parser.Util~/="@~=="@ htoml-parseData.Toml.Parse.!=@.:@.:?@"@htree Data.HTree:::@HCons@HNode@HNodeL@TyNode@TyNodeL@Data.HTree.Families++@Data.HTree.LabeledHNodeL@TyNodeL@Data.HTree.List:::@HCons@hconcat@Data.HTree.TreeHNode@TyNode@htsMusic.Typesetting.Literal&"@&."@htssets Data.HtsCSet:+@ Data.HtsSet:+@http-directoryNetwork.HTTP.Directory+/+@ http-kinderNetwork.HTTP.Kinder.MediaType/."@/?"@ http-mediaNetwork.HTTP.Media/."@//"@/:"@/?"@Network.HTTP.Media.MediaType/."@//"@/:"@/?"@ http-ponyNetwork.HTTP.Pony.Helper-http-pony-serve-wai"Network.HTTP.Pony.Serve.Wai.Helper- http-queryNetwork.HTTP.Query+/+@huffHuff/\@\/@hum Hum.Utils? @humble-prelude HumblePrelude$$!&&@*@** @*>@+@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>=?^ @^^ @div@elem@mod@quot@rem@||@HumblePrelude.Extras&?<&>?<|>@ hunit-dejafuTest.HUnit.DejaFu->-"@==="@=>="@hunt-searchengineHunt.Common.BasicTypes<>"@ Hunt.Utility.::"@.:::"@.=="@.=?"@.\."@huzzyHuzzy.Base.Sets?&&"@?||"@Huzzy.Base.Systems=*>"@=|>"@Huzzy.TypeOne.Sets?&&"@?||"@Huzzy.TypeOne.Systems=*>"@=|>"@Huzzy.TypeTwo.Interval.Sets?&&"@?||"@Huzzy.TypeTwo.Interval.Systems=*>"@=|>"@Huzzy.TypeTwo.ZSlices.Sets?&&"@?||"@Huzzy.TypeTwo.ZSlices.Systems=*>"@=|>"@hvect Data.HVect!!"@:&:@<++>@hw-aesonHaskellWorks.Data.Aeson.!=@.?=@hw-bitsHaskellWorks.Data.Bits.BitWise.&.@.<. @.>. @.?."@.^.@.|.@ hw-fingertreeHaskellWorks.Data.FingerTree:<@:>@<|@><@|>@hw-fingertree-strict#HaskellWorks.Data.FingerTree.Strict:<@:>@<|@><@|>@ hw-hedgehogHaskellWorks.Hedgehog/=="@?=="@hw-ip+HaskellWorks.Data.Network.Ip.Internal.Appar#<*>#@ hw-mqueryHaskellWorks.Data.MQuery/^."@/^.."@>>^.?>>^..? hw-parserHaskellWorks.Data.Parser"@hw-primHaskellWorks.Data.AtIndex!!!"@HaskellWorks.Data.Ops<|@><@|>@HaskellWorks.Data.Product:*:"@ hw-rankselect#HaskellWorks.Data.RankSelect.BitSeq<|@><@|>@,HaskellWorks.Data.RankSelect.Internal.BitSeq#<|"@|>#"@hw-uriHaskellWorks.Data.Uri.Location-<.>@<.>@@hw-xmlHaskellWorks.Data.Xml.Decode/>"@/>>"@"@"@<@>"@?>"@@>"@~>"@hx Haskell.X.Ops->>"@<$>"@=>>"@|>"@Haskell.X.Prelude-!!"@$"@$!"@&&"@&&&"@*"@**"@***"@*>"@+"@++"@+++"@-"@->>"@."@/"@/="@<"@<$"@<$>"@<*"@<**>"@<*>"@<+>"@<<<"@<<^"@<="@<=<"@<>"@<|>"@=<<"@=="@>"@>="@>=>"@>>"@>>="@>>>"@>>^"@^"@^<<"@^>>"@^^"@||"@|||"@hxtControl.Arrow.ArrowIf:->"@Control.Arrow.ArrowList$<@$<$@$<<@$<<<@$<<<<@>. @>>. @Control.Arrow.ArrowTree//>@/>@>"@..>"@.>"@.>>"@/>"@:->"@<.>"@>:>>:@->@@"@Hydra.Dsl.Grammars>:Hydra.Dsl.Lib.Strings++"@Hydra.Dsl.Terms$$"@<.>"@>:@@"@Hydra.Dsl.Types$$"@--><=>"@>:@@"@Hydra.Inference.AlgorithmW@@"@Hydra.Inference.AltInference===>:@@"@hydrogen-cli-argsHydrogen.CliArgs!"@?"@~:"@~="@~?"@hydrogen-parsingHydrogen.Parsing<+<"@>+>"@hydrogen-preludeHydrogen.Prelude!"@$$"@$$$"@$$$$"@$$$$$"@.&"@.^"@.|"@<$$$$$>"@<$$$$>"@<$$$>"@<$$>"@=~"@=~~"@?"@|>"@hydrogen-prelude-parsecHydrogen.Prelude.Parsec<++>"@<:>"@ hydrogen-utilHydrogen.Util.CliArgs~:"@Hydrogen.Util.Parsec<+<"@>+>"@hylolib Data.EnumMap!"@ HyLo.Formula :&: @:-->:@:/=:"@:<-->:@:<:"@:<=:"@:=:"@:>:"@:>=:"@:|: @ HyLo.Model??"@|/="@|="@hypergeomatrixMath.HypergeoMatrix+:"@ hypertypesHyper#*##>:*:@Hyper.Class.Morph#?>"@Hyper.Class.Nodes#*##> Hyper.Recurse##>>#**##>>hypherDatabase.Neo4j|:"@hz3Z3.Opts+?"@ide-backend-commonIdeSession.Strict.List++"@\\"@IdeSession.Strict.Map!"@\\"@ideasIdeas.Common.Classes!->"@<&&>"@<-!"@<->"@<||>"@Ideas.Common.Environment?"@Ideas.Common.Id# @@>"@Ideas.Common.Library!->"@!~>@# @$<"@&&&"@***"@+++"@.%.@.*.@./.@.@.@.|.@:~>"@<&&>"@<+>"@<-!"@<->"@<<<?<||>"@>>>??"@@>"@|>@|||"@Ideas.Common.Predicate<&&>"@<||>"@Ideas.Common.Rewriting:~>"@"Ideas.Common.Rewriting.RewriteRule:~>"@#Ideas.Common.Rewriting.Substitution@+@@@@@|->@Ideas.Common.Strategy!~>@.%.@.*.@./.@.@.@.|.@|>@Ideas.Common.Strategy.Choice./."@.|."@|->@|>"@!Ideas.Common.Strategy.Combinators!~>@.%.@.*.@./.@.@.@.|.@|>@Ideas.Common.Strategy.Derived!*>"@<%>"@<@>"@Ideas.Common.Strategy.Legacy<%>@<*>@<@>@<|>@>|>@Ideas.Common.Strategy.Sequence.*."@~>"@"Ideas.Common.Strategy.StrategyTree.=.?Ideas.Common.Traversal.Utils>=>?>|<Ideas.Common.View$<"@&&&"@***"@+++"@<+>"@<<<?>>>?|||"@Ideas.Encoding.Encoder//"@@#Ideas.Service.FeedbackScript.Syntax:<>:"@Ideas.Service.Types.->@Ideas.Text.HTML<#>"@Ideas.Text.XML.=."@:="@Ideas.Text.XML.Document:="@Ideas.Utils.Parsing*>@<$@<$>@<*@<**>@<*>@<..>@Ideas.Utils.Uniplate|*"@|-"@||*"@ideas-math-types Domain.Algebra.Boolean<&&>"@<||>"@><"@Domain.Algebra.Field|*|@|+|@|-|@|/|@Domain.Algebra.Group<>@<>-@Domain.Algebra.Law:==:?Domain.Algebra.SmartGroup.&&.@.*.@.+.@.-.@./.@.||.@Domain.Logic.Formula:&&:@:->:@:<->:@:||:@Domain.Logic.Views.&&.@.->.@.<->.@.||.@Domain.Math.Data.OrList<>@Domain.Math.Data.Relation ./=.?.<.?.<=.?.==.?.>.?.>=.?.~=.?:<:?:<=:?:==:?:>:?:>=:?Domain.Math.Expr.Data:*:"@:+:"@:-:"@:/:"@Domain.Math.Expr.Symbols^ @Domain.Math.Expr.Views.*.@.+.@.-.@./.@.^. @ identiconGraphics.Identicon:+ @ identifiersData.Identifiers.Hashable!"@Data.Identifiers.ListLike!"@ idiomaticGeneric.Applicative.IdiomComp@ieeeData.AEq==="@~=="@ieee754Data.AEq==="@~=="@ifIf?"@?>"@ihaskellIHaskellPreludeB$$!%@&&@*@*#@*##@**##"@*>@+@+#@+##@++@-@-#@-##@."@/@/##@/=@/=#@/=##@:%"@:|@<@<#@<##@<$@<$!>@<$>@<*@<**>@<*>@<=@<=#@<=##@<=<?<>@=<<?==@==#@==##@>@>#@>##@>=@>=#@>=##@>=>?>>?>>=?\\@^ @^%^"@^^ @^^%^^"@div@elem@mod@notElem@onquot@rem@seq||@~~@ihaskell-widgets$IHaskell.Display.Widgets.Interactive:&@ imagemagick+Graphics.ImageMagick.MagickCore.Types.MBits^&^"@^|^"@imbib TypedBibData??"@imm Imm.Pretty<++>"@<+>@<>@imperative-edslLanguage.Embedded.CExp #!"@#!=@#%"@#&&"@#<@#<=@#==@#>@#>=@#||"@??Language.Embedded.Imperative:+:"@implImpl$$"@:->implicitGraphics.Implicit.Canon=^="@Graphics.Implicit.Definitions⋯*"@⋯/"@)Graphics.Implicit.ExtOpenScad.Definitions:$"@:="@ implicit-hieHie.Cabal.Parser@implicit-params Data.Implicit$$"@$~"@~$"@imprint Data.Imprint<:>@improveLanguage.ImProve&&."@*."@-->"@-|"@/."@/=."@<."@<=."@<=="@==."@==>"@>."@>=."@||."@in-other-wordsControl.Effect.Alt<|>@Control.Effect.Internal.Utils#."@.# @ incipit-base Incipit.Base1$$!$>@&?&&@&&&@*@*>@+@++@-@."@/=@:$$:@:<>:@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<<?<=@<=<?<=?@<>@<|>@=<<?==@>@>$@>$<@>=@>=>?>>?>>=?>>>?Compose"@Div@Mod@^ @^^ @onseqxor@||@Incipit.Foldableelem@Incipit.Fractional/"@Incipit.TypeError%@<>@ incipit-core IncipitCore++@incremental-computingData.Incremental$$"@Data.Incremental.Tuple&&&"@incremental-parserControl.Applicative.Monoid+<*>@><@"Text.ParserCombinators.Incremental+<*>@<<|>@<||>@><@2Text.ParserCombinators.Incremental.LeftBiasedLocal+<*>@<<|>@<||>@><@,Text.ParserCombinators.Incremental.Symmetric+<*>@<<|>@<||>@><@incremental-sat-solverData.Boolean.SatSolver:&&:"@:||:"@indentsText.Parsec.Indent<*/>"@<+/>"@<-/>"@"@ index-coreControl.IMonad.Core?>??>=?Control.IMonad.Do>>?>>=?Control.IMonad.Restrict!>?!>=?"@<.>"@=!>?indexedControl.Monad.Indexed=<<<?>>>=?Data.Functor.Indexed*>>@<<$>>@<<*@<<*>>@indexed-containers Data.NList<++>@<:>@indexed-profunctorsData.Profunctor.Indexed#."@.# @ indexed-state$Control.Monad.State.Profunctor.Class$.$@-<<<?<*.*>@<|.|>@>>>-?&Control.Monad.State.Profunctor.IxState$.$@-<<<?<*.*>@<|.|>@>>>-?indexed-transformersControl.Monad.Trans.Indexed&?Control.Monad.Trans.Indexed.Do>>"@>>="@indices Data.Index:."@indigoIndigo^!! @!: @!@ @!~ @# @#! @##"@#->"@#: @#=#@ @#~ @$@$!$!!$>@%@%>?&@&&@&&&@&&="@*@** @*="@*>@+@++@++@ @+: @+="@+@ @-@-: @-="@-@ @."@... @.:@.~@/@/->//->/=@:%"@:&@:->?:-| @::->"@:=:>:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<<< @<<<="@<=@<=<?<>@<|>@=:=<<?==@>@>=@>=>?>>?>>=?>>> @>>>="@?: @?@ @Compose"@^@^%^"@^.. @^="@^^ @^^%^^"@ hashWithSaltonquot@rem@seq||@||="@~>"@Indigo.Backend.Prelude:$@$!$!!$>@%~@&?&&@&&&@*@** @*>@+@++@-@."@... @.~@/@/=@:%"@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>=??:Compose"@^ @^%^"@^. @^.. @^? @^^ @^^%^^"@div@ hashWithSaltmod@onquot@rem@seqxor@||@Indigo.Common.State##"@<$>@>>"@Indigo.Frontend.Expr!!! @!: @!@ @!~ @#! @#: @#@ @#~ @%@&&@*@+@++@ @+: @+@ @-@-: @-@ @.:@/@/=@<@<<< @<=@<>@==@>@>=@>>> @?: @?@ @^@||@Indigo.Frontend.Language #=&&="@*="@+="@-="@//-><<<="@=:>>>="@^="@||="@Indigo.Lorentz # @#->"@%>?&@/->:&@:->?:-| @::->"@:=:>~>"@Indigo.Prelude&$@$!$!!$>@&?&&&@** @*>@++@."@... @.~@:%"@:|@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<=<?<|>@=<<?>=>?>>?>>=?Compose"@^%^"@^.. @^^ @^^%^^"@ hashWithSaltonquot@rem@seq inf-backpropControl.CatBifunctor***"@Debug.LoggingBackprop*"@+"@ InfBackprop*"@**"@***"@+"@-"@/"@Prelude.InfBackprop*"@**"@+"@-"@/"@ inferno-typesInferno.Types.Type.->@Inferno.Types.VersionControl&<"@ inferno-vcInferno.VersionControl.Types&<"@ infinite-listData.List.Infinite!!"@.......:<@\\"@inflist Data.InfList!!!"@+++"@:::"@influxdbDatabase.InfluxDB%"@Database.InfluxDB.Format%"@inilist Data.Ini.List+>"@<+"@inject-functionControl.InjFun-<"@-<|"@>-"@>-|"@|->"@||->"@inline-rData.Vector.SEXP!"@!?"@++@//"@elem@notElem@Foreign.R.Constraints:∈?H.Prelude.Interactive==="@Language.R.HExp==="@ input-parsersText.Parser.Deterministic<<|>@inspection-testingTest.Inspection=/-"@=/="@=/~"@==-"@==="@==~"@instant-genericsGenerics.Instant.Base:*:"@intcodeIntcode!"@>>>"@Intcode.Machine!"@ intelli-monadIntelliMonad.Tools.Utils<||>"@intensional-datatysIntensional.Types:=>"@ interlude-l Interlude# @#%%=@#%%~@#%=@#%~@#=@#~@$$!$!!$>@%@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&@&&=@&&^@&&~@&~?*@** @**=@**~@*=@*>@*~@+@++@+=@+~@-@-=@-~@."@.&.@..."@.=@.>"@.@=@.@~@.|.@.~@/@//=@//~@/=@:%"@:*:@:+@:+:@:.:@:|@:~:@<@<#%=@<#%~@<#=@<#~@<$@<$!>@<$>@<%=@<%@=@<%@~@<%~@<&&=@<&&>@<&&~@<&>?<*@<**=@<**>@<**~@<*=@<*>@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>"@<.~@>@<<%=@<<%@=@<<%@~@<<%~@<<&&=@<<&&~@<<**=@<<**~@<<*=@<<*>>"@<<*~@<<+=@<<+~@<<-=@<<-~@<<.=@<<.~@<=@<<<>~@<<>=@<<>~@<@<>=@<>~@@<||=@<||>@<||~@<~@=<<?==@>@>=@>=>?>>?>>=??=@????~@^ @^# @^%^"@^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^ @^^%^^"@^^=@^^~@^~@div@elem@ hashWithSaltmod@notElem@onquot@rem@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@|>@||@||=@||^@||~@internData.Interned.IntSet\\"@interval Data.Interval..<"@..<..@..<<..@..<="@..<=..@..>..@..>=..@..>>..@<.."@<..<@<..<=@<=.."@<=..<@<=..<=@interval-algebraIntervalAlgebra.Core<|>"@!IntervalAlgebra.IntervalUtilities.+."@><"@interval-functorData.Functor.Interval...@interval-patterns Data.Calendar!"@!?"@ Data.Interval +/-"@..."@:<->:@:<-|:@:<>:@:<|:@:|->:@:|-|:@:|>:@:||:@\\"@Data.Interval.Borel\-"@\="@Data.Interval.Layers\-"@\="@ intervalsNumeric.Interval+/-@...@/=!"@/=?"@!"@>=!"@>=?"@>?"@Numeric.Interval.Internal+/-@...@/=!"@/=?"@!"@>=!"@>=?"@>?"@Numeric.Interval.Kaucher ...@/=!"@/=?"@!"@>=!"@>=?"@>?"@Numeric.Interval.NonEmpty ...@/=!"@/=?"@!"@>=!"@>=?"@>?"@"Numeric.Interval.NonEmpty.Internal ...@/=!"@/=?"@!"@>=!"@>=?"@>?"@intrinsic-superclasses&Language.Haskell.TH.Instances.Internal <$!>@<&>"@<=<?<>@=<<?>=>?>>"@>>="@notElem@,Language.Haskell.TH.Instances.Internal.Utils<&>"@introIntro=$$!$<@$>@&?&&@&&^"@*@** @*>@+@-@."@.&.@.: @.|.@/@/=@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<<?<=@<=<?<>@<>^@<|>@=<<?==@>@>$@>$$<@>$<@>=@>=>?>>=?>>>??:?^ @^^ @div@elem@ hashWithSaltmod@notElem@onquot@rem@rotate @rotateL @rotateR @shift @xor@||@||^"@ inventoryMatchSigs.Matching.Env/\"@ invertibleControl.Invertible.BiArrow<->@<<^^?>>^^?^^<<?^^>>?Control.Invertible.Functor<$>@Control.Invertible.Monoidal$<@*<@:<->:@>$@>$<@>*@>*<@>*<<@>*<<<@>*<<<<@>>*<@>>*<<@>>>*<@>>>>*<@>|@>|<@|<@Data.Invertible.Bijection:<->:@<->@Data.Invertible.Function."@Data.Invertible.Monad=<<->>=@"Data.Invertible.PartialIsomorphism<$>"@Data.Invertible.Prelude."@<$>@<->@invertible-grammarData.InvertibleGrammar:-@Data.InvertibleGrammar.Base:-@invertible-syntaxText.Syntax.Classes<*>"@<|>"@Text.Syntax.Combinators*>"@<*"@<+>"@ io-choiceControl.Exception.IOChoice||>@!Control.Exception.IOChoice.Lifted||>@ io-machineIOMcn>>>"@ipfsNetwork.IPFS.Prelude5$$!$!!$>@%~@&&@&&&@*@** @***@*>@+@++@-@."@.~@/@/=@:|@<@<$@<$!>@<$>@<&>?<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>??~@^ @^. @^.. @^? @^^ @div@elem@mod@notElem@onquot@rem@seq||@iprouteData.IP>:>"@ irc-fun-colorNetwork.IRC.Fun.Color.Style#>"@<#"@irc-fun-messagesNetwork.Irc.Messages.Maskmatches@irealData.Number.IReal+-"@-+-"@!"@?"@??"@!Data.Number.IReal.IRealOperations+-"@-+-"@!"@?"@??"@Data.Number.IReal.Rounded+-"@-+-"@!"@?"@??"@isobmff%Data.ByteString.IsoBaseFileFormat.Box$:@:+@:.@:<>?:|@+Data.ByteString.IsoBaseFileFormat.ReExportsi###?######? #########? ############?###############?##################?#####################?########################?###########################?##############################?!#################################?$####################################?'#######################################?*##########################################?-#############################################?0################################################?3###################################################?6######################################################?9#########################################################?<############################################################??###############################################################?B##################################################################?E#####################################################################?H########################################################################?&&@*@+@-@-*@-*-@--*@-/-?.&.@.+.@.+:@.|.@:#@:$$:@:+.@:+:@:+?@:+^@:<>:@:=@:=.@:>>=:?:>>>:?:>>>^:?:^+@:^>>>:?:~@:~:@:~?@:~~:@<$$-->@<$$>@<++>@<+>@<:$$-->@<:$$>@<:>@<=@<=?@<>@<||>@==@?::@: @@:: @Div@Mod@^ @^^@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@||@~~~@~~~~~~@ ~~~~~~~~~@ ~~~~~~~~~~~~@~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@9~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@E~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@Data.Kind.Extra:#@:>>=:?:>>>:?:>>>^:?:^>>>:?:~:@Data.Type.BitRecords.Assert?::Data.Type.BitRecords.Core.+.@.+:@:+.@:+:@:+?@:+^@:=@:=.@:^+@:~@:~?@@: @@:: @^^@Data.Type.BitRecords.Structure//@<>@isobmff-builder%Data.ByteString.IsoBaseFileFormat.Box$:@:+"@isotopeIsotope|*|"@|+|"@|-|"@iterIOData.IterIO.Inum.|"@.|$"@|$"@|."@Data.IterIO.Parse $>"@*>"@<$"@<$>"@<*"@<**>"@<*>"@<++>"@<:>"@"@<|>"@>$>"@\/"@iterateeData.Iteratee.Iteratee$="@<><"@=$"@><>"@>>>"@ iteratee-mtlData.Iteratee.Iteratee>>>"@ival Data.Interval:–:"@ivorIvor.TT>+>"@>->"@>=>"@>|>"@ivory Ivory.Language!"@#!"@#."@#>"@.%"@.&"@.&&@./"@.="@.^"@.|"@.||@/=?@:->"@<=?@=?@>?@?"@~>"@Ivory.Language.Array!"@Ivory.Language.BitData.Array#!"@Ivory.Language.BitData.BitData#."@#>"@Ivory.Language.Bits.&"@.^"@.|"@Ivory.Language.IBool .&&@.||@/=?@<=?@=?@>?@?"@Ivory.Language.IIntegral.%"@./"@Ivory.Language.Init.="@Ivory.Language.Proc:->"@Ivory.Language.Struct~>"@%Ivory.Language.Syntax.Concrete.ParserHappyStk"@ ivory-optsIvory.Opts.Overflow<+>"@ ivory-stdlibIvory.Stdlib.Control==>"@Ivory.Stdlib.Operators%="@%=!"@+="@~>*"@ix!Control.Categorical.Monad.Indexed<=<?=<=?=>=?>=>?ixmonadControl.Effect>>"@>>="@Control.Effect.Helpers.Mapping:->"@Control.Effect.Reader:->"@Control.Effect.State:!"@:->"@ixset Data.IxSet &&&@@*"@@+"@@<"@@<="@@="@@>"@@><"@@><="@@>="@@>=<"@@>=<="@|||@ ixset-typedData.IxSet.Typed &&&@@*"@@+"@@<"@@<="@@="@@>"@@><"@@><="@@>="@@>=<"@@>=<="@|||@ixshaderGraphics.IxShader&&&"@+=@-=@.:@.=?Graphics.IxShader.IxShader>>"@>>="@Graphics.IxShader.Ops.Mult.*@Graphics.IxShader.Qualifiers *@**"@+@-@/@/=@<@<=@==@>@>=@jallaNumeric.Jalla.CVector|.*"@|.+"@|.-"@|./"@||*"@||+"@||-"@Numeric.Jalla.Indexable!"@Numeric.Jalla.Matrix ##"@##!"@##+"@##-"@#.*"@#.+"@#.-"@#./"@#|"@|#"@ java-bridge Foreign.Java-->"@::="@javelin Data.Series<-|@select?to"@|->@Data.Series.Generic<-|@select?to"@|->@Data.Series.Unboxed<-|@select?to"@|->@jbiSystem.JBI.Commands.Tool.&&.@.||.@ jet-streamJet&?<&>?jmacro$Language.Javascript.JMacro.TypeCheck<:"@<<:>"@=.="@Language.Javascript.JMacro.Util !="@$"@$$"@&&@."@<@<>"@=:@=="@join Join.Join.=."@joinlist Data.JoinList++"@:<"@:>"@joint#Control.Joint.Abilities.Transformer:>@Control.Joint.Core:.?:=~>Control.Joint.Operators$>>="@<$$$$>"@<$$$>"@<$$>"@<****>"@<***>"@<**>"@>>=$"@jordanJordan>$@ js-good-parts Language.JavaScript.NonEmptyList<:>"@jsaddle Data.JSStringcons@#Data.JSString.Internal.Fusion.Types:*:@JavaScript.Array!"@Language.Javascript.JSaddle!"@!!"@#@##@<#?<##?"Language.Javascript.JSaddle.Object!"@!!"@#@##@<#?<##?jscLanguage.Javascript.JSC.Object!"@!!"@#"@<#"@jsmwLanguage.JSMW.Arith=/="@==="@Language.JSMW.Cond-->"@Language.JSMW.Monad:="@json-altData.Aeson.AutoType.Alternative:|:@alt@json-rpc-clientNetwork.JsonRpc.Client:::"@json-rpc-serverNetwork.JsonRpc.Server:+:"@ json-schemaData.JSON.Schema.Combinators<+>@<|>@ json-streamData.JsonStream.Parser.!@.:@.:?@.|@json2 Data.JSON2+="@.="@Data.JSON2.Query<+>"@>>>"@ jsonlogicJsonLogic.IO.Operation!"@!!"@!="@!=="@%"@*"@+"@-"@/"@<"@<="@=="@==="@>"@>="@JsonLogic.Pure.Operation!"@!!"@!="@!=="@%"@*"@+"@-"@/"@<"@<="@=="@==="@>"@>="@jspathText.JSONb.Path:=>"@judgeLogic.Judge.Prover.Tableau:="@jukebox Jukebox.Form.=."@.=>."@/\"@:=: @:@:"@\/"@|+|"@|=>"@ Jukebox.Name:::"@Jukebox.TPTP.ParsecJukebox.Toolbox=>>?=>>=?Jukebox.UnionFind:>"@=:="@justified-containersData.Map.Justified!"@ jvm-binaryLanguage.JVM.Type<:>"@kangarooText.PrettyPrint.JoinPrint<+>"@<>"@ kansas-lavaLanguage.KansasLava.Protocols$$@stackF@stackP@|$|@Language.KansasLava.Types&@:>"@Language.KansasLava.Utils .!."@.&&.@./=."@.<.@.<=.@.==.@.>.@.>=.@.^.@.||.@karabiner-configKarabiner.Config!>@?"@?!@??"@??!"@|+|@|->@karpsSpark.Core.Column/-"@//"@Spark.Core.Functions.+"@.-"@./"@@@"@#Spark.Core.Internal.ArithmeticsImpl.+"@.-"@./"@Spark.Core.Internal.CanRename@@"@Spark.Core.Internal.Projections/-"@//"@Spark.Core.Internal.Utilities<&>"@<>@kawaiiNetwork.Wai.Serve.Middleware<#>@keera-hails-reactivelensesData.ReactiveLens<$$$>"@keera-hails-reactivevaluesControl.GFunctor<$$> @Data.ReactiveValue&.&"@<:="@<^>"@=:="@=:>"@kerryKerry.Internal.Prelude(!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<**>@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@||@Kerry.Internal.Serial.=?"@keuringsdienstKeuringsdienst*||*@|??| @|?| @keyed Data.Keyed!"@!?"@ Data.MKeyed!!"@!!?"@ keyed-valsKeyedVals.Handle.Typed//@keyed-vals-hspec-testsTest.KeyedVals.Hspec:|@ keylayoutsKeyboard:!"@:?"@keysData.Key!"@<#$>@keystoreData.KeyStore.Types.AesonCompat.!="@.:"@.:!"@.:?"@.= @"@kibroKibro<<$"@ kind-applyData.PolyKinded:&&:@Data.PolyKinded.Atom:&:@:=>>:@Data.PolyKinded.Functor:^:@ kind-generics Generics.Kind:*:@:+:@ kind-integer KindInteger%^ @Div@DivRem@Rem@^ @^@#@$$$ @ kind-rational KindRational%@%%@%@#@$$$@:%@:%@#@$$$@kindly-functors Kindly.Class~> kleene-listData.List.Kleene.Internal*<>+"@+<>*"@:*@:+@:-@Data.List.Kleene.Plus!!"@:+@:-@Data.List.Kleene.Star!!"@:*@:-@kmonadKMonad.Parsing<|>@KMonad.Prelude.Imports# @#%%=@#%%~@#%=@#%~@#=@#~@$$!$!!$>@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&@&&&@&&=@&&~@&~?*@** @***@**=@**~@*=@*>@*~@+@++@+=@+~@-@-=@-~@."@..."@.=@.>"@.@=@.@~@.~@/@//=@//~@/=@:<@:>@:|@:~:@<@<#%=@<#%~@<#=@<#~@<$@<$!>@<$>@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<*@<**=@<**~@<*=@<*>@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>"@<.~@=@<<<>~@<<>=@<<>~@<@<>=@<>~@@<||=@<||~@<~@=<<?==@>@>$@>=@>=>?>>?>>=?>>>??=@????~@^ @^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^ @^^=@^^~@^~@cons@deepseqdiv@elem@failing@magnify@mod@notElem@onquot@rem@seqsnoc@zoom@|>@||@||=@||~@kmp-dfaAlgorithms.DFA.KMP==!"@kneadData.Array.Knead.Expression &&*@.&.*@.|.*@/=*@<*@<=*@==*@>*@>=*@xor@||*@Data.Array.Knead.Shape.Cubic#:.@:.@Data.Array.Knead.Symbolic!"@Data.Array.Knead.Symbolic.Fold$:.@Data.Array.Knead.Symbolic.Slice$:.@compose? knit-haskell(Knit.Report.Input.Visualization.Diagrams# @## @#%%=@#%%~@#%=@#%~@#."@#=@#~@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&=@&&~@&~?**=@**~@*."@*=@*>@*^@*~@+=@+~@-=@->>@-~@.#"@.+^@.-.@.-^@.=@.>@.>>@.@=@.@~@.~@//=@//~@:&@:-:@:<@:>@:~:@<#%=@<#%~@<#=@<#~@<$@<$>@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<*@<**=@<**~@<*=@<*>@<*~@<+=@<+~@<-=@<->"@<-~@<."@<.=@<.~@=@<<<>~@<<>=@<<>~@<@<>=@<>~@$@?=@????~@@@@^# @^&@^*@^+^@^-^@^. @^.. @^/@^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@at@atop@beneath@cons@failing@magnify@snoc@zoom@|>@|>>"@||=@|||@||~@~~"@knots Knots.Free#"@$!!!"@.#"@ Knots.Prelude:%"@ Knots.Util.*"@krapshSpark.Core.Column//"@Spark.Core.ColumnFunctions.+"@Spark.Core.Functions@@"@Spark.Core.Internal.Utilities<&>"@<>@@@"@krpc Remote.KRPC==>"@==>@"@kubernetes-client-coreKubernetes.OpenAPI.Core-&-@kuifjeLanguage.Kuifje.Distribution>>="@Language.Kuifje.Semantics==>"@=>>"@kure#Language.KURE.Combinators.Transform>+>"@Language.KURE.MonadCatch<+@Language.KURE.Path@@"@ labeled-treeData.LabeledTree::>"@labelsLabels:="@Labels.Internal:="@ lagrangianNumeric.AD.Lagrangian<=>"@ lambda-cubeLambdaCube.STLC.AstExtLCApp@ExtLCArr@LCApp@LCArr@ LCNeutApp@LambdaCube.SystemF.AstExtLCApp@ExtLCArr@ ExtLCTApp@LCApp@LCArr@ LCNeutApp@ LCNeutTApp@LCTApp@LambdaCube.SystemFw.Ast ExtLCApp@ExtLCArr@ ExtLCKArr@ ExtLCTApp@ ExtLCTTApp@LCApp@LCArr@LCKArr@ LCNeutApp@ LCNeutTApp@LCTApp@LCTTApp@LambdaCube.SystemFw_.Ast ExtLCApp@ExtLCArr@ ExtLCKArr@ ExtLCTTApp@LCApp@LCArr@LCKArr@ LCNeutApp@LCTTApp@lambda-placeholdersLanguage.LambdaPlaceholders.$."@.@."@ lambdabotLambdabot.Main:=>"@lambdabot-coreLambdabot.Main:=>?==>?lambdabot-utilsLambdabot.Util<$>"@<+>"@<.>"@"@<>"@lambdacube-compilerLambdaCube.Compiler.Core:~>?App@app_@#LambdaCube.Compiler.DesugaredSourceSAppH@SAppV@LambdaCube.Compiler.Pretty<$$>"@<+>"@"@DApp@LambdaCube.Compiler.Utils<&>"@lambdacube-edslLambdaCube.Language@#"@@%"@@&"@@&&"@@*"@@*."@@+"@@-"@@."@@.*"@@.*."@@/"@@/="@@<"@@<<"@@<="@@=="@@>"@@>="@@>>"@@^"@@|"@@||"@LambdaCube.Language.Type:+:"@:."@lambdacube-engine%Graphics.LambdaCube.Loader.ParserUtil<$="@<*="@ lambdacube-gl LambdaCube.GL@:"@@="@LambdaCube.GL.Input@="@ lambdacube-irLambdaCube.PipelineSchemaUtil@:"@ lambdasoundLambdaSound.Sound>>>@|->@ lame-testerTester.DialectandAlso@butAlso@ excludingTo@ runningTo@ language-bashLanguage.Bash.Pretty$+$"@$++$"@<++>"@language-bluespec+Language.Bluespec.Classic.AST.Builtin.Typesfn@language-boogieLanguage.Boogie.Intervals//"@<:"@Language.Boogie.Util|!=|"@|%|"@|&|"@|*|"@|+|"@|-|"@|/|"@|<=>|"@|<=|"@|<|"@|=>|"@|=|"@|>=|"@|>|"@|||"@language-c-inlineLanguage.C.Inline.ObjC-->"@<:"@==>"@language-c-quoteLanguage.C.Parser.ParserHappyStk"@rcons@Language.C.Smart+=@===@language-c99-simpleLanguage.C99.Simple.Expr!.!"@.!="@.%"@.%="@.&"@.&&"@.&="@.*"@.*="@.+"@.++"@.+="@.-"@.--"@.-="@./"@./="@.<"@.<<"@.<<="@.<="@.="@.=="@.>"@.>="@.>>"@.>>="@.^"@.^="@.|"@.|="@.||"@.~"@ language-cssLanguage.Css.Build !@.="@/#@/-@/.@/:@/>@<:>|="@~="@language-eiffelLanguage.Eiffel.PrettyPrint$?$"@"@language-puppetXPrelude<$$>"@<+>"@"@<>@ language-rustLanguage.Rust.Data.Position#"@ language-shLanguage.Sh.Syntax :&&:"@:<"@:<&"@:<<"@:<<-"@:<>"@:="@:>"@:>&"@:>>"@:>|"@:||:"@laopLAoP.Dist.Internal??"@LAoP.Matrix.Internal-|-@./@.|@===@><@|||@LAoP.Matrix.Nat-|-@./@.|@===@><@|||@LAoP.Matrix.Type-|-@./@.|@===@><@|||@ LAoP.Relation-|-@===@><@|||@LAoP.Relation.Internal-|-@===@><@|||@ LAoP.Utils."@LAoP.Utils.Internal."@lapack Numeric.LAPACK.Format##Numeric.LAPACK.Matrix#!"@##*#@##/#@#*#@#*##@#*\@#*|@#+#@#-#@#/\@#\##@#\|@-*#@-/#@.*#@===@\*#@\\#@add@sub@|*-@|||@Numeric.LAPACK.Matrix.Arrayadd@sub@Numeric.LAPACK.Matrix.Diagonal%%%@Numeric.LAPACK.Matrix.Hermitian*%%%#@Numeric.LAPACK.Matrix.Square|=|@!Numeric.LAPACK.Matrix.Superscript#^ @Numeric.LAPACK.Matrix.Symmetric#%%%#@ Numeric.LAPACK.Matrix.Triangular#%%%@%%%#@Numeric.LAPACK.Output/+/"@<+>"@Numeric.LAPACK.Vector+++@-*|@.*|@add@append@sub@|+|@|-|@ large-anonData.Record.Anon-.->?:.:@Compose"@Data.Record.Anon.Overloading>>>?|||@large-genericsData.Record.Generic-.->?:.:@ large-recordsData.Record.Overloading>>>?|||@ lasercutter Lasercutter<&&>"@<*?@<|>@<||>"@latticesAlgebra.Heyting<=>@==>@Algebra.Heyting.Free:/\:@:=>:@:\/:@Algebra.Heyting.Free.Expr:/\:@:=>:@:\/:@Algebra.Lattice/\@\/@Algebra.Lattice.Free:/\:@:\/:@Algebra.Lattice.Unicode∧@∨@⟹@⟺@lawless-concurrent-machinesData.Machine.Concurrent<~<"@>~>@lawz Test.Logic<==>?==> layouting Data.Layout<+>@@@@@lazify Data.Lazify$~"@Data.Lazify.Generic$~"@Data.Lazify.Generic.Internal$~"@Data.Lazify.Internal$~"@ lazy-hashData.LazyHash.Class#"@<#>@lazy-hash-cacheData.LazyHash.Cache<#>@Data.LazyHash.Cache.Int<#>@ lazy-searchControl.Search&&&@==>|||@ Data.Coolean!&&"@!=>"@!||"@&&&@==>|||@lazyboyLazyboy.Prelude&&"@/="@<"@=="@>"@||"@lazysmallcheckTest.LazySmallCheck==>"@><"@\/"@ lazysplinesNumeric.LazySplines#"@ extendWhen? extrapForward? satisfying? splitWhen? trimSmart? trimmingTo?lcaData.LCA.Online~=@Data.LCA.Online.Monoidal~=@Data.LCA.Online.Naive~=@ ld-intervalsLuminescentDreams.Data.Interval<..<@<..<=@<=..<@<=..<=@ ldap-client Ldap.Client::="@:<="@:="@:=*"@:>="@:~="@Ldap.Client.Search::="@:<="@:="@:=*"@:>="@:~="@ldap-client-og Ldap.Client::="@:<="@:="@:=*"@:>="@:~="@Ldap.Client.Search::="@:<="@:="@:=*"@:>="@:~="@ lean-peanoNumeric.Peano.Typelevel*@+@-@ leancheckTest.LeanCheck+|@==>>< @\/@\\//@Test.LeanCheck.Core+|@==>>< @\/@\\//@Test.LeanCheck.Error!==!@+|@==>>< @?==?@\/@\\//@$Test.LeanCheck.Function.ListsOfPairs-->>"@Test.LeanCheck.Utils.Operators $=@&&&@&&&&@&&&&&@=$@===@====@==>=|@|=@|||@||||@ Test.LeanCheck.Utils.TypeBinding-:?-:>?->:?->:>?->>:?->>:>?->>>:?->>>:>?->>>>:?->>>>:>?->>>>>:?->>>>>:>?->>>>>>:? ->>>>>>:>? ->>>>>>>:? ->>>>>>>:>? ->>>>>>>>:? ->>>>>>>>:>? ->>>>>>>>>:? ->>>>>>>>>:>? ->>>>>>>>>>:? ->>>>>>>>>>:>? ->>>>>>>>>>>:?->>>>>>>>>>>:>?->>>>>>>>>>>>:?>-"@ leanpub-wreq Leanpub.Wreq:=@ learn-physics Physics.Learn *^@.+^@.-.@.-^@<.>@><@^*@^+^@^-^@^/@Physics.Learn.CarrotVec*^@<.>@><@^*@^+^@^-^@^/@Physics.Learn.CommonVec><@Physics.Learn.Ket<>@Physics.Learn.QuantumMat#>"@<#"@<>"@Physics.Learn.SimpleVec*^@<.>@><@^*@^+^@^-^@^/@Physics.Learn.StateSpace.+^@.-.@.-^@leksahIDE.Core.Types?>>="@lensControl.Lens.Combinators :~:@<<<>:=@<<<>:~@<<<|=@<<<|~@<<|>=@<<|>~@>$@cons@failing@magnify@snoc@zoom@Control.Lens.Cons:<@:>@<<<|=@<<<|~@<<|=@<<|>=@<<|>~@<<|~@<|@<|=@<|>=@<|>~@<|~@cons@snoc@|>@|>=@|>~@Control.Lens.Equality:~:@Control.Lens.Fold^.. @^? @^?! @^@.. @^@? @^@?! @Control.Lens.Getter>$@^. @^@. @Control.Lens.Indexed.>"@<."@<.>"@Control.Lens.LensL#%%=@#%%~@#%=@#%~@#=@#~@%%=@%%@=@%%@~@%%~@&?&~?<#%=@<#%~@<#=@<#~@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<**=@<**~@<*=@<*~@<+=@<+~@<-=@<-~@:=@<<<>:~@<<<>=@<<<>~@<<>:=@<<>:~@<<>=@<<>~@<"@.@=@.@~@.~@//=@//~@<#%=@<#%~@<#=@<#~@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<**=@<**~@<*=@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>"@<.~@:=@<<<>:~@<<<>=@<<<>~@<<<|=@<<<|~@<<>:=@<<>:~@<<>=@<<>~@<=@<<|>~@<<||=@<<||~@<<|~@<<~@<>:=@<>:~@<>=@<>~@=@<|>~@<||=@<||~@<|~@<~@?=@????~@^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@|>@|>=@|>~@||=@||~@Control.Lens.Plated..."@Control.Lens.Review# @Control.Lens.Setter%%=@%@=@%@~@%~@&&=@&&~@**=@**~@*=@*~@+=@+~@-=@-~@.=@.@=@.@~@.~@//=@//~@<.=@<.~@<>:=@<>:~@<>=@<>~@=@<.>~@=@~@<<.>=@<<.>~@<=@<~@<<<.>=@<<<.>~@<<=@<<~@ lens-actionControl.Lens.Action^! @^!! @^!? @^@! @^@!! @^@!? @ lens-errorsControl.Lens.Error%%&~ @%&~ @.&~ @^&. @^&.. @^&? @ lens-family Lens.Family2 %~@&?&&~@*~@+~@-~@.~@//~@<>~@^. @^.. @^? @||~@Lens.Family2.State.Lazy%!=@%%=@%=@&&!=@&&=@*!=@*=@+!=@+=@-!=@-=@.=@//!=@//=@<>!=@<>=@<~@||!=@||=@Lens.Family2.State.Strict%!=@%%=@%=@&&!=@&&=@*!=@*=@+!=@+=@-!=@-=@.=@//!=@//=@<>!=@<>=@<~@||!=@||=@lens-family-core Lens.Family %~@&?&&~@*~@+~@-~@.~@//~@<>~@^. @^.. @^? @||~@Lens.Family.State.Lazy%!=@%%=@%=@&&!=@&&=@*!=@*=@+!=@+=@-!=@-=@.=@//!=@//=@<>!=@<>=@<~@||!=@||=@Lens.Family.State.Strict%!=@%%=@%=@&&!=@&&=@*!=@*=@+!=@+=@-!=@-=@.=@//!=@//=@<>!=@<>=@<~@||!=@||=@lens-filesystemControl.Lens.FileSystem@ lens-labels Lens.Labels%~@&?."@.~@^. @Lens.Labels.Prism# @lens-typelevelData.Type.Lens %%~"@%.~"@%^."@%^.."@%^?"@%^?!"@%~@.@"@.~@^. @^.. @^? @^?! @ lens-utilsControl.Lens.Utils# @#%%=@#%%~@#%=@#%~@#=@#~@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&=@&&~@&~?**=@**~@*=@*~@+=@+~@-=@-~@..."@.=@.>"@.@=@.@~@.~@//=@//~@:<@:>@<#%=@<#%~@<#=@<#~@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<**=@<**~@<*=@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>"@<.~@=@<<<>~@<<>=@<<>~@<=@<>~@$@?=@????~@^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@cons@failing@magnify@snoc@zoom@|>@||=@||~@lenses Data.Lenses$%$=less-arbitraryTest.LessArbitrary$$$?"@<$$$>"@lgtkLGtk***"@."@libcspm Util.Monad$$"@libffi-dynamicForeign.DynamicconsDyn@Foreign.WrapperconsWrap@libgraphData.Graph.Libgraph-->"@ libjenkinsJenkins.Rest.Method-&-@-/-@-=-@-?-? libjwt-typedLibjwt.PrivateClaims->>@.!"@.:@:<@ liblawless Boomerang∘"@Machine↢@↣@⇜"@⇝"@⧻@⫴@Path<++>@<.>@@libmpd Network.MPD%?"@/=?"@/~?"@=?"@~?"@libolegControl.ExtensibleDS:@"@ Control.Poly2:*:"@ Data.Class1+$"@ Data.Class2*$$"@+$$"@ Lambda.CCG/"@\\"@Language.DefinitionTree:*:"@:+:"@ Language.TDPE-->"@Language.TEval.EvalN:+"@Language.TEval.EvalTaglessF+:"@Language.TEval.EvalTaglessI:+"@Language.TEval.TEvalNC:+"@:>"@Language.TEval.TEvalNR:+"@:>"@Language.TEval.TInfLetI:+"@:>"@Language.TEval.TInfLetP:+"@:>"@Language.TEval.TInfT:+"@:>"@Language.TEval.TInfTEnv:+"@:>"@Language.TEval.TInfTM:+"@:>"@>>="@System.IterateeM==<<"@>."@>>=="@Text.PrintScan:^"@Text.PrintScanF^"@Text.TotalPrintF^"@lieLie.LieAlgebra<|>"@|*|"@|+|"@|.|"@LieExample.SU3|-|"@|||"@lifted-protoludeProtolude.Lifted$!&?ligdGenerics.LIGD.Base:*:"@limaLima.Converter&??~@limpNumeric.Limp.Program.Constraint:!@:&&@:<@:<=@:==@:>@:>=@Numeric.Limp.Program.Linear*.@.*@.+.@.-.@lin-alg"Numeric.LinearAlgebra.Matrix.Class.+."@.-."@Numeric.LinearAlgebra.Vector*>"@<%>"@<*>"@<+>"@<->"@<.>"@"@lindaNumeric.Matrix@@>"@linear Linear.Affine#."@.#"@.+^@.-.@.-^@Linear.Covector$* Linear.Matrix!!*@!!/@!*@!*!@!+!@!-!@*!@*!!@Linear.Plucker><@ Linear.Vector*^@^*@^+^@^-^@^/@linear-accelerate#Data.Array.Accelerate.Linear.Matrix!!*@!!/@!*@!*!@!+!@!-!@*!@*!!@$Data.Array.Accelerate.Linear.Plucker><@'Data.Array.Accelerate.Linear.Projection$$$$$$#Data.Array.Accelerate.Linear.Vector *^@+^@-^@/^@^*@^+@^+^@^-@^-^@^/@ linear-baseControl.Functor.Linear<$@<$>@<&>?<*>@>>?>>=?Control.Optics.Linear.Iso.>"@Control.Optics.Linear.Lens.>"@Control.Optics.Linear.Prism.>"@Control.Optics.Linear.Traversal.>"@"Data.Array.Mutable.Unlifted.LinearlseqData.Bool.Linear&&@||@Data.Functor.Linear<$@<$>@<*>@Data.List.Linear++@Data.Monoid.Linear<>@Data.Num.Linear*@+@-@Data.Ord.Linear/=@<@<=@==@>@>=@compare@Data.Profunctor.Linear***@Data.Replicator.Linear<*>@Data.Unrestricted.Linearlseq Data.V.Linear<*>@Prelude.Linear$$!&?** @."@/@<*@^ @^^ @div@lseqmod@quot@rem@seqStreaming.Linear:>@Streaming.Prelude.Linear:>@elem@linear-genericsGenerics.Linear:*:@:+:@:.:@linear-grammarLinear.Grammar.*."@.+."@.<=."@.==."@.=>."@ linear-maps Data.IdMap!"@Data.IdMap.Static!"@:."@ Data.LinkMap!"@Data.Sequence.IdMap:<"@:>"@<|"@><"@|>"@Data.Sequence.IdMap2:<"@:>"@<|"@><"@|>"@linear-programming Numeric.LinearProgramming.Common.*@<=.@==.@>=.@>=<.@ linear-smcControl.Category.Constrained . @//×"@∘ @⊗@▵"@▵!"@▿"@▿!"@Control.Category.Linear!:"@ linear-vect Linear.Class &!"@&*"@&+"@&-"@&."@&^"@*&"@*."@.*"@.*."@linearmap-categoryMath.LinearMap.Category -+$>-+|>@.<@.⊗@<$|<.>^@>+<@\$|$||&>?·@⊕@⊗@#Math.LinearMap.Category.Derivatives*∂@.∂@/∂@*Math.LinearMap.Category.Instances.Deriving.+^@.+~^@.-.@.-~!@.-~.@.-~^@Math.LinearMap.Coercion-+$=> linkedhashmapData.LinkedHashMap.IntMap!"@Data.LinkedHashMap.Seq!"@linnetLinnet//@:+:"@|+|@~>~>>Linnet.Endpoint//@|+|@~>~>>Linnet.Internal.Coproduct:+:"@Linnet.Internal.HList:::@lioLIO canFlowTo@glb@lub@ speaksFor@ LIO.DCLabel%%@/\@\/@ LIO.Label canFlowTo@glb@lub@ speaksFor@liquid-fixpointLanguage.Fixpoint.Misc<<="@=>>"@#Language.Fixpoint.Types.Refinements&.&"@|.|"@Language.Fixpoint.Utils.Builder<+>"@ Text.PrettyPrint.HughesPJ.Compat$$@$+$@<+>@<->@liquid-prelude"Language.Haskell.Liquid.Equational***@==.@?@eq@Language.Haskell.Liquid.Prelude==> @(Language.Haskell.Liquid.ProofCombinators&&&"@***@=<=@==!@==.@===@=>=@?@Language.Haskell.Liquid.RTick<*>@@@<\>@<\\>@=//<@=/<@=<<@=\<@=\\<@>//=@>/=@>>=@>\=@>\\=@)Language.Haskell.Liquid.RTick.Combinators&&&@***?.<==@.>==@<.@<=.@<=>.@<=>?@<=?@.@==>?@==?@>.@>=.@>=?@>?@>~>.@>~>?@?@?<==@?>==@ liquidhaskell GHC.Internal.Float_LHAssumptions** @GHC.Real_LHAssumptions/@div@mod@quot@rem@liquidhaskell-boot&Language.Haskell.Liquid.Constraint.Env+++="@+="@-="@?="@Language.Haskell.Liquid.Misc!?"@.&&."@.||."@<->"@&Language.Haskell.Liquid.Types.Equality=*="@Liquid.GHC.API $$"@$+$"@<+>"@App@mkApps@ mkCoreApps@mkFunTy@mkTyApps@ setCafInfo? setOccInfo? list-extrasPrelude.Listless$$!&&@*@** @+@-@."@/@/=@<@<$@<=@=<<?==@>@>=@>>?>>=?^ @^^ @div@mod@quot@rem@seq||@list-transformerList.Transformer<|>@ list-tupleData.Tuple.List!!"@!!!"@ list-zipperData.ListZipper ##>@$$>@%%>@&&>@*>>@.>>@<##@<$$@<$~@<%%@<&&@<<*@<<.@listsafeData.List.Safe!!"@ little-earley Little.Earley:|:?|:?Little.Earley.Internal.Core::>"@Little.Earley.Internal.Tree.:|:"@:|:?><"@|:?live-sequencerBool&&@||@Function$."@Midi+:+@=:=@llrbtreeData.Set.BUSplay==="@Data.Set.Splay==="@llvm LLVM.Core&"@LLVM.Util.Arithmetic%&&"@%||"@?"@??"@llvm-dslLLVM.DSL.Expression &&*@.&.*@.|.*@/=*@<*@<=*@==*@>*@>=*@xor@||*@LLVM.DSL.Parameter$#LLVM.DSL.Render.Run*->@LLVM.DSL.Value %&&@%/=@%<@%<=@%==@%>@%>=@%||@???llvm-general-pureLLVM.General.AST.Instruction:="@llvm-general-quoteLLVM.General.Quote.AST:="@ llvm-hs-pureLLVM.AST.Instruction:="@ LLVM.Prelude%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@mod@quot@rem@seq||@llvm-ht LLVM.Core$+"@&"@LLVM.Util.Arithmetic %&&"@%/="@%<"@%<="@%=="@%>"@%>="@%||"@?"@??"@ llvm-partyLLVM.AST.Instruction:="@ LLVM.Prelude&!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@mod@quot@rem@seq||@~@ llvm-pretty Text.LLVM-:"@:>=:"@llvm-tfLLVM.Util.Arithmetic %&&@%/=@%<@%<=@%==@%>@%>=@%||@??? lmdb-simpleDatabase.LMDB.Simple.View!"@!?"@loc Data.Loc.Area+"@-"@Data.Loc.Internal.Prelude$$>@&?&&@*>@."@/@/=@:|@<@<$@<$>@<&>"@<*@<*>@<<<?<=@<>@==@>@>=@>>?>>=?>>>?div@elem@on||@ Data.Loc.Span+"@-"@ local-searchControl.Search.Local<:"@=:="@>:"@Control.Search.Local.Eager!!!"@ located-baseData.List.Located!!"@log-baseLog.= @logfloatData.Number.LogFloatpow @Data.Number.PartialOrdeq@ge@gt@le@lt@maxPO@minPO@ne@loggerSystem.Log.Format<:>"@ logic-TPTPCodec.TPTP.Base.!=.@.&.@.<=.@.<=>.@.<~>.@.=.@.=>.@.|.@.~&.@.~."@.~|.@:!=:"@:&:"@:<=:"@:<=>:"@:<~>:"@:=:"@:=>:"@:|:"@:~&:"@:~:"@:~|:"@ logic-classes Data.Boolean:&&:"@:||:"@Data.Boolean.SatSolver:&&:"@:||:"@Data.Logic.Classes.Combine.&."@.<=."@.<=>."@.<~>."@.=>."@.|."@.~&."@.~|."@:&:"@:<=>:"@:=>:"@:|:"@:~:"@<=>"@==>"@⇒"@⇔"@∧"@∨"@Data.Logic.Classes.Constants⊨"@⊭"@Data.Logic.Classes.Equals.!=."@.=."@≡"@≢"@Data.Logic.Classes.FirstOrder!"@?"@∀"@∃"@Data.Logic.Classes.Negate.~."@¬"@Data.Logic.Harrison.Lib|->"@|=>"@∅"@Data.Logic.Types.Harrison.Equal:=:"@logictControl.Monad.Logic.Class>>-?logict-sequenceControl.Monad.Logic.Sequence:<@%Control.Monad.Logic.Sequence.Internal:<@lolCrypto.Lol.Factored\\?Crypto.Lol.Prelude"!!"@$$!%@&&@*@** @*>@+@++@-@."@/@/=@<@<$@<=@=<<?==@>@>=@>>?>>=?^"@^- @^/ @^? @div@elem@mod@notElem@quot@rem@||@Crypto.Lol.Tests=~="@Crypto.Lol.Types.FiniteField^^"@Crypto.Lol.Utils.ShowType**"@lol-appsCrypto.Lol.Applications.SymmBGV+@longboiLongboi++@longshotCrypto.Longshot.Internal<%>"@lorentzLorentz5!"@# @#->"@$$:"@%!@%%!@%>?&?&-@&?-@-$@-$?@."@/->/=.@:&@:->?:-| @::->"@:::@:=:><-$>@<.@<=.@<>@==.@>->@>.@>=.@>>"@?::@|%!|@|&|@|*|@|+|@|-|@|.|.|?|/=|@|:|?|<<| @|<=|@|<|@|==|@|>=|@|>>| @|>|@|@||^|@|||?~@~>"@ Lorentz.ADT/->:&@:= Lorentz.Base# @%>?&@:->?Lorentz.ContractRegistry?::"@!Lorentz.CustomArith.RationalArith%!@%%!@Lorentz.Entrypoints:>Lorentz.Entrypoints.Core:>Lorentz.Entrypoints.Doc#->"@ Lorentz.Expr$:"@|%!|@|&|@|*|@|+|@|-|@|.|.|?|/=|@|:|?|<<| @|<=|@|<|@|==|@|>=|@|>>| @|>|@|@||^|@|||?Lorentz.Prelude!"@$@&?."@<>@~@Lorentz.Rebound/=.@<.@<=.@==.@>.@>=.@>>"@Lorentz.ReferencedByName:=Lorentz.Run.Simple&-@&?-@-$@-$?@:::@<-$>@Lorentz.StoreClass:-| @::->"@~>"@Lorentz.StoreClass.Extra. @Lorentz.ViewBase>->@?::@ Lorentz.Zip##"@:::@ lp-diagramsGraphics.Diagrams.Core<==@===@=~="@>==@Graphics.Diagrams.Object# @.<."@:%>"@Graphics.Diagrams.Point.=.@Graphics.Diagrams.Types*-@lsql-csvLsql.Csv.Core.Symbols-->"@==>"@ltkGraphics.UI.Editor.Parameters<<<-"@ lucid-extrasLucid.Bootstrap3$:luiGraphics.UI.LUI.Accessor<^"@^."@^:"@^>"@ lumberjack Lumberjack|# luminanceGraphics.Luminance.Buffer@!"@@?"@Graphics.Luminance.Core.Tuple:."@!Graphics.Luminance.Shader.Program.="@<>"@maamFP.Prelude.Core%#"@#!"@*$"@*∘"@*⋅"@+"@-"@/"@<×>"@<⋅>"@>>"@>>="@^"@^$"@^*$"@^*∘"@^*⋅"@^∘"@^⋅"@×"@↦"@∈"@∘"@∘∘"@∧"@∨"@≟"@≤"@≥"@≫"@≫="@≫=*"@⋚"@⌿"@♯$"@♯⋅"@⧺"@FP.Prelude.DSL◇$"@◇⇨"@◇⋅"@◇⋅|"@FP.Prelude.Effects<|>"@<⊓>"@<⊔>"@<⧺>"@FP.Prelude.Lattice><"@⊑"@⊑⊒"@⊒"@⊓"@⊔"@⊟"@FP.Prelude.Lib=≫"@FP.Prelude.Morphism⌾"@macMAC.FlexibleLb<<*>>"@machinesData.Machine.Pipe+>>@>+>@>>~@>~> @Data.Machine.Process<~"@~>"@ magicbane Magicbane!?"@.!="@.:"@.:!"@.:?"@.="@:<|>"@?: Magicbane.App:<|>"@magma Data.Magma<>"@magmas Data.Group//"@<<@<>@\\"@ Data.Magma<<@mainland-prettyText.PrettyPrint.Mainland<+/>@<+>@@@<|>@managed-functions Managed.Agent!"@!?"@manateeManatee.Action.Basic==>"@manatee-anythingManatee.Plugin.Anything.Main<=>"@ manatee-coreManatee.Toolkit.General.Basic<<"@Manatee.Toolkit.General.Functor<<<="@<<=<"@=>>>"@>=>>"@Manatee.Toolkit.General.List?!"@Manatee.Toolkit.General.Maybe>?>="@>?>=>"@?>="@?>=>"@Manatee.Toolkit.General.Misc=~^"@mangopay Web.MangoPay?+"@ manifoldsData.Function.Differentiable?->@?<@?>@?|:@Data.Manifold.FibreBundle:@.@Data.Manifold.PseudoAffine.+~^@.-~!@.-~.@.-~^@.−.@Data.Manifold.Shade:±@|±|@✠@Data.Manifold.TreeCover:±@|±|@Data.Manifold.WithBoundary!-|"@.+^|"@.--!"@.--."@.-|"@|+^"@manifolds-coreMath.Manifold.Core.PseudoAffine.+~^@.-~!@.-~.@.-~^@ map-classesControl.Class.Impl.Map!"@Control.Class.Map!"@ map-syntaxData.Map.Syntax#!###? mapalgebraGeography.MapAlgebra:.@markdown-unlitText.Markdown.Unlit:&:@:|:@ marked-prettyText.PrettyPrint.MarkedHughesPJ$$"@$+$"@<+>"@<>"@markovData.MarkovAlgo:->"@:->."@markov-chain-usage-model MarkovChain.*@.-@./@^*@markov-processesData.Distribution"@markov-realization Markov.Extra>*<@marxup MarXup.Math$$$"@=:?^^^"@MarXup.PrettyPrint<$$$>@<$$>@<+>@@@massivData.Massiv.Array!@!>@!?@!?>@...@..:@@@@??@??>@Data.Massiv.Array.Numeric!*!@!+!@!-!@!.!"@!/!@!><"@!><"@.><."@.^ @.^^ @/.@><."@divA@modA@quotA@remA@Data.Massiv.Core.Index:.@:>@Data.Massiv.Vector!@!?@...@..:@ massiv-testTest.Massiv.Utils.&&.?.||.?:~:@:~~:@<$@<$!>@<=<?=/=@=<<?===@==>><"@>=>?>>?>>=?deepseqshouldBe? shouldContain? shouldEndWith?shouldMatchList? shouldNotBe?shouldNotContain?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith? shouldThrow?matcha Matcha.Path:/ @:/*"@ math-extrasMath.Extras.Double/~="@~="@ math-gradsMath.Grads.Algo.Interaction/~="@~="@Math.Grads.Graph!."@!>"@?."@?>"@math-programmingMath.Programming*.@.*@.+.@.-.@./@.<=@.<=.@.==@.==.@.>=@.>=.@<=.@==.@>=.@Math.Programming.Dsl .<=@.<=.@.==@.==.@.>=@.>=.@<=.@==.@>=.@Math.Programming.LinExpr*.@.*@.+.@.-.@./@mathflow MathFlow.Core%*"@<+>@<--"@ matplotlibGraphics.Matplotlib#@##@%@@@@Graphics.Matplotlib.Internal#@##@%@@@@matrices Data.Matrix!"@Data.Matrix.Class!"@Data.Matrix.Generic!"@Data.Matrix.Sparse.Generic!"@Data.Matrix.Storable!"@Data.Matrix.Symmetric.Generic!"@Data.Matrix.Unboxed!"@matrix Data.Matrix!"@<->"@<|>"@matrix-market-pureData.MatrixMarket:+"@ matrix-staticData.Matrix.Static!"@!."@.*"@<->"@<|>"@^*"@ matterhornMatterhorn.Config.Schema"@Matterhorn.Prelude&?<|>@^. @^? @mattermost-apiNetwork.Mattermost.Util~="@maxentNumeric.MaxEnt.=."@maxent-learner-hw!Text.PhonotacticLearner.Util.Ring⊕"@⊖"@⊗"@⊙"@maybenchTest.Maybench.Command<@>"@Test.Maybench.Utils<++>"@<|"@|>"@mcmcMcmc@~@Mcmc.Monitor.Parameter>$<@Mcmc.Monitor.ParameterBatch>$<@ Mcmc.Proposal@~@ median-streamData.MedianStream+>"@<+"@ megaparsecText.MegaparsecmelfData.Elf~:"@ membershipType.Membership:>Type.Membership.HListHCons@Type.Membership.Internal:>HCons@memdbDatabase.Immutable!"@memorable-bitsData.Memorable.-"@.|"@Data.Memorable.Internal.-"@.|"@menshen Data.Menshen=~"@?@?:@merge Data.Merge*>@.!"@.?@<*@<*>@<|>@ metamorphicAlib/\"@><"@Graph\\"@methodControl.Method.Internal:*?metric Data.Metric<->"@Data.Metric.Class<->"@mezzoMezzo$++@Mezzo.Render.MIDI><"@Mezzo.Render.Transform+++"@><"@ mezzolens Mezzolens.~"@^."@^.."@^?"@Mezzolens.State.Lazy %%="@%="@&&="@*="@+="@-="@.="@//="@<>="@<~"@||="@Mezzolens.State.Strict %%="@%="@&&="@*="@+="@-="@.="@//="@<>="@<~"@||="@mfsolve Math.MFSolve=&=?===?mgeneric Data.MGeneric:**:"@:*:"@:++:"@:@:"@ microaesonData.Aeson.Micro.!="@.:"@.:!"@.:?"@.= @microformats2-parserData.Microformats2.Parser.Util# @#%%=@#%%~@#%=@#%~@#=@#~@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&=@&&~@&~?**=@**~@*=@*~@+=@+~@-=@-~@.!="@..."@./"@.:"@.:!"@.:?"@.="@.>"@.@=@.@~@.~@//=@//~@:<@:>@<#%=@<#%~@<#=@<#~@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<**=@<**~@<*=@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>"@<.~@=@<<<>~@<<>=@<<>~@<=@<>~@$"@?=@????~@^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@cons@failing@snoc@|>@||=@||~@ microgrooveData.Microgroove!"@ microlens Lens.Micro%~@&?+~@-~@.~@<%~@<&>?<<%~@<<.~@<>~@?~@^. @^.. @^? @^?! @failing@Lens.Micro.Internal#."@.# @ microlens-mtlLens.Micro.Mtl%=@&~?*=@+=@-=@.=@//=@<%=@<.=@<<%=@<<.=@?<.=@<<%=@<<%~@<<.=@<<.~@<>~@@minioperationalControl.Monad.Operational.Mini:>>="@$Control.Monad.Trans.Operational.Mini:>>="@minitypeset-opengl'Graphics.Rendering.MiniTypeset.Document<#>"@<->"@<|>"@ miniutterNLP.Miniutter.English<+>@minlen Data.MinLenmlcons@miosSAT.Mios.Util.BoolExp-!-"@-&&&-"@-&-"@-=-"@->-"@-|-"@-|||-"@mismi-pP$$!$>@&?&&@*@*>@+@-@."@/=@<@<$@<$>@<*@<**>@<*>@<=@<>@<|>@=<<?==@>@>=@>>?>>=?elem@on||@mismi-s3 Mismi.S3.Data//"@Mismi.S3.Internal+/"@ mismi-s3-coreMismi.S3.Core.Data//"@miso Miso.Effect#>"@<#"@ Miso.Util=:"@mit-3qvpPyAi6mH Mit.Prelude.!!"@$$!$>@&?&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<&>"@<*@<*>@<<<?<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@ mix-arrowsControl.Arrow.Mix.Category~>>="@Control.Arrow.Mix.Utilities->>"@mixed-types-num MixedTypesNumPrelude%@Numeric.MixedTypes.AddSub+@-@Numeric.MixedTypes.Bool&&@||@Numeric.MixedTypes.Div/@Numeric.MixedTypes.Eq!/=!@!==!@/=@==@?==?@Numeric.MixedTypes.Literals!!"@Numeric.MixedTypes.Mul*@Numeric.MixedTypes.Ord !!@!>=!@<@<=@>@>=@?<=?@?=?@?>?@Numeric.MixedTypes.Power^ @^^ @ Numeric.MixedTypes.PreludeHiding$$!*>@++@."@<$@<$>@<*@<*>@<>@=<<?>>?>>=?elem@notElem@seqNumeric.OrdGenericBool&&@/=@<@<=@==@>@>=@||@ml-wLanguage.ML.TypeCheck:>:"@mmorphControl.Monad.Morph<|<@=<|@>|>@|>=@Control.Monad.Trans.ComposeComposeT"@mockazoData.Component.Mock:~:@mockcatTest.MockCat.AssociationList!?"@Test.MockCat.Cons:> @Test.MockCat.Param|> @modData.Mod^% @ Data.Mod.Word^% @modelicaparser Language.Modelica.Parser.Utility~*"@~+"@moeText.HTML.Moe2.DSL.Kawaii~>"@Text.HTML.Moe2.DSL.Markdown !"@#"@##"@###"@####"@#####"@######"@*"@***"@<>"@>>"@Text.HTML.Moe2.Element!"@Text.HTML.Moe2.Utils/"@moffy Control.Moffyat@break@first @indexBy@until@Control.Moffy.Handlebefore@beforeSt@merge@mergeSt@Control.Moffy.Internal.Sig.Type:|@Control.Moffy.NoThreadIdapp@at@break@first @iapp@indexBy@until@ monad-idealsControl.Comonad.Coideal&&&&"@Control.Monad.Coproduct||||"@Control.Monad.Ideal idealBind?Control.Monad.Isolated impureBind?monad-logger-aesonControl.Monad.Logger.Aeson.= @:#@#Control.Monad.Logger.Aeson.Internal:#@monad-logger-prefixControl.Monad.Logger.Prefix prefixLogs@ monad-lrsMath.LinearRecursive.Monad*>"@<*"@<+-"@<+>"@<->"@<:-"@ monad-paramControl.Monad.Parameterized=<<"@>>"@>>="@monad-resumption#Control.Monad.Resumption.Connectors<||>"@!Control.Monad.Resumption.Reactive<~>"@monad-skeletonControl.Monad.Skeleton:>>=?Control.Monad.Skeleton.Internal|>"@ monad-stateControl.Monad.Record$:"@$::"@<$:"@<->"@<:"@<::"@<:<"@<<:"@<<::"@<=:"@=:"@=::"@>$$>"@>$<"@>$>"@monad-statevarControl.Monad.StateVar$="@$=!"@$~"@$~!"@ monad-unifyControl.Monad.Unify$?"@=:="@=?="@ monad-var MonadVar.Lens.!"@./ @monadLib-composeMonadLib.Compose<<<"@>>>"@ monadfibreControl.Monad.Fibre<&&>"@<||>"@ monadic-bangMonadicBang.Internal:<-"@MonadicBang.Internal.Utils??"@ monadiccp Control.CP.FD.Interface!"@@!!"@@%@@&&@@*@@+@@++@@-@@.."@@/@@/=@@:@@<@@<=@@=@@>@@>=@@?@@??@@||@Control.CP.SearchTree/\@\/"@Control.Mixin.Mixin<@>@Control.Search.Combinator.And<&>"@Control.Search.Combinator.Or<|>"@Control.Search.Generator $/="@$<"@$<="@$=="@$>"@$>="@<@>"@@$"@@++@"@@."@@>"@@>>>@"@Control.Search.GeneratorInfo@@"@Control.Search.Language$/="@$<"@$<="@$=="@$>"@$>="@&&&"@<=="@>>>"@@->"@@<"@@<="@@=="@@=>"@@>"@@>="@|||"@Control.Search.Stat#/"@#<"@#<="@#="@#>"@#>="@Data.Expr.Data<<>>@Data.Expr.Sugar!"@@!!"@@%@@&&@@*@@+@@++@@-@@.."@@/@@/="@@:@@<@@<=@@="@@>@@>=@@?@@??@@||@ monadplusControl.Monad.Plus<$@<$!>@<=<?=<<?>=>?>>?>>=?monky Monky.Utility sdivBound@ sdivUBound@mono-traversable Data.NonNull<|@monoid Data.Monoids<>@ monoid-extrasData.Monoid.Cut:||:@Data.Monoid.MList*:@:::@Data.Monoid.Split:|@monoid-insertleftData.InsertLeft%@?%^? monoid-ownsData.Monoid.Owns+"@monoid-subclassesData.Monoid.Monus<\>@Data.Semigroup.Cancellative@monoidal-containersData.IntMap.Monoidal!"@\\"@Data.IntMap.Monoidal.Strict!"@\\"@Data.Map.Monoidal!"@!?"@\\"@Data.Map.Monoidal.Strict!"@!?"@\\"@monoidal-functorsControl.Category.Cartesian/\"@\/"@Control.Category.Tensor#"@#Data.Bifunctor.Monoidal.Specialized&&&@&|@***@+++@|&@|||@Data.Functor.Monoidal|&|@|*|@|+|@|?|"@ monoidplusData.Monoid.Plus|*|"@|+|"@|-|"@|/|"@monoidsData.Group.Sugar-"@.\."@/"@^^"@Data.Monoid.Sugar*"@+"@^"@monomerMonomer.Core.Combinators styleActive@styleActiveSet@ styleBasic@ styleBasicSet@ styleDisabled@styleDisabledSet@ styleFocus@styleFocusHover@styleFocusHoverSet@ styleFocusSet@ styleHover@ styleHoverSet@Monomer.Core.StyleUtil nodeEnabled@ nodeFocusable@nodeKey@ nodeVisible@monopati!System.Monopati.Posix.Combinators <-^>"@<.^>"@"@"@"@"@"@<^>"@<^^>"@<~^>"@monusData.Monoid.Monus-@monus-weighted-searchControl.Monad.Heap:<@Control.Monad.Heap.List:-@ Data.Monus|-|@,MonusWeightedSearch.Internal.CoerceOperators#."@.#"@<#$>@moo Moo.GeneticAlgorithm.Constraints .<"@.<."@.<="@.<=."@.==."@.>."@.>=."@<."@<=."@more-containers Data.Multimap!"@ Data.Multiset!"@more-extensible-effects Data.FTCQueue><"@|>"@morley Morley.Michelson.Optimizer.Utils:# @ Morley.Michelson.TypeCheck.Types-:&@:/ @::&@:::"@Morley.Michelson.Typed//-> @:# @:-"@AnnsCons@ AnnsTyCons@Seq @!Morley.Michelson.Typed.AnnotationAnnsCons@ AnnsTyCons@Morley.Michelson.Typed.Haskell//-> @(Morley.Michelson.Typed.Haskell.Instr.Sum//-> @Morley.Michelson.Typed.Instr:# @Seq @Morley.Michelson.Typed.Scope:-"@Morley.Util.Binary##:#:Morley.Util.Named!"@<:!>@<:?>@Morley.Util.SizedList::<@:<@append@Morley.Util.SizedList.Types::<@:<@Morley.Util.Type++@==@Morley.Util.TypeLits:$$:@:<>:@Morley.Util.Typeable:~:@ morley-clientMorley.Util.BatchingsubmitThenParse?morley-prelude Fmt.Buildable++|?+|?|+?|++?|++^? Fmt.Operators<$$>@<$>@<+>@@@Morley.Prelude.Boolean&&@||@Prelude;$$!$!!$>@%~@&?&&&@*@** @*>@+@++@-@."@... @.~@/@/=@:%"@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=??:Compose"@^ @^%^"@^. @^.. @^? @^^ @^^%^^"@deepseqdiv@ hashWithSaltmod@onquot@rem@seqxor@~@morley-upgradeable,Lorentz.Contracts.Upgradeable.EntrypointWise/==>Lorentz.UStore.Migration.Blocks$:@<-->@morpheus-graphql-client%Data.Morpheus.Client.CodeGen.Internal.:"@.:?"@.= @morpheus-graphql-code-gen-utilsData.Morpheus.CodeGen.Printer.<>"@morpheus-graphql-coreData.Morpheus.Internal.Ext<:>"@Data.Morpheus.Internal.Utils<:>"@ morphismsControl.Morphism!@#"@$&?."@.^."@?@morphisms-functors Control.Functor.Contravariant$<"@>$"@>$<"@Control.Functor.Covariant$>"@<$"@<$>"@%Control.Functor.Covariant.Alternative<+>"@%Control.Functor.Covariant.Applicative*>"@<*"@<*>"@.Control.Functor.Covariant.Composition.Bindable<=<"@=<<"@>=>"@>>="@2Control.Functor.Covariant.Composition.Distributive>>-"@0Control.Functor.Covariant.Composition.Extendable<<="@=<="@=>="@=>>"@1Control.Functor.Covariant.Composition.Traversable->>"@Control.Functor.Invariant<$<"@>$>"@Data.Functor.Product:&:"@morphisms-objectsControl.Object.Chain<"@<="@>"@>="@Control.Object.Semigroup<>"@Control.Object.Semilattice/\"@\/"@Control.Object.Semiring><"@Control.Object.Setoid&&@/="@=="@||"@ mosaico-libGraphics.Mosaico.Diagrama:-:"@:|:"@motoMoto*@motor Motor.FSM!+@!-@!-->@:=@>>>"@Motor.FSM.Sugar!+@!-@!-->@:=@mpeffControl.Mp.Eff:*@ mpolynomialsMath.Algebra.MultiPol*^@^**^ @^*^@^+^@^-^@mpppcText.PrettyPrint.MPPPC.OneDim<$$>"@<$>"@<+>"@"@"@<>"@Text.PrettyPrint.MPPPC.TwoDim/+/"@//"@<+>"@<>"@mpreludeMPrelude$$>@&?&&@*@+@."@/=@<@<$@<$>@<&>?<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>>?>>=?||@mps MPS.Light-"@."@/"@<"@<->"@>"@^"@msMath.MetricSpace<->"@msh Language.MSH.!"@.$"@<:"@>:"@ mtl-unleashedControl.Lens.States%="@.="@<.="@<>~"@++>"@>:>"@mu-rpcMu.Named:|:@ Mu.Server:<&>:@:<|>:@:<||>:@:|:@ mu-schema Mu.Schema:*@:->"@Mu.Schema.Class:->"@Mu.Schema.Definition:->"@Mu.Schema.Interpretation:*@multext-east-msdData.MultextEastMsd=~="@multi-containers Data.Multimap!"@Data.Multimap.Internal!"@Data.Multimap.Set!"@Data.Multimap.Set.Internal!"@Data.Multimap.Table!"@!?"@Data.Multimap.Table.Internal!"@!?"@multicurryableMulticurryable:*@ multilinearMultilinear.Class $$|@$|"@/\ @<<<|@<<|@\/ @|==|?|>>@|>>>@Multilinear.Generic.MultiCore!"@*."@+."@-."@.*"@.+"@.-"@Multilinear.Generic.Sequential!"@*."@+."@-."@.*"@.+"@.-"@Multilinear.Index!=!@multimap Data.MultiMap!"@ Data.SetMap!"@ multipass Data.Pass:&"@:*"@:+"@:-"@@#"@@@"@@@@"@Data.Pass.Calc:&"@Data.Pass.Eval@@"@Data.Pass.Eval.Naive@@@"@ Data.Pass.L:*"@:+"@@#"@Data.Pass.Thrist:-"@multirecGenerics.MultiRec.Base:*:@:+:@:>:@Generics.MultiRec.Fold&@:->"@Generics.MultiRec.FoldAlg&@Generics.MultiRec.FoldAlgK&@Generics.MultiRec.FoldK&@:->"@Generics.MultiRec.TEq:=:@multisetData.IntMultiSet\\"@ Data.MultiSet\\"@ multiset-combMath.Combinatorics.Multiset+:"@ multistateData.HList.HList:+:@ multivariantControl.Invertible.BiArrow.Free:-"@Test.Multivariant.Classes<***>"@<+++>"@~>"@ multiwalkControl.MultiWalk.>"@:.: @:?: @?>"@Control.MultiWalk.Contains:.: @:?: @murderLanguage.Grammars.Murder+>>"@^="@^|"@music-diatonicMusic.Diatonic.Note$#"@ music-pitchMusic.Pitch.Common.Semitones/:="@=:="@ music-scoreData.Functor.Rep.Lens!"@Music.Score.Part"@Music.Time.Juxtapose<|"@|>"@Music.Time.Transform*|"@|*"@|/"@Music.Time.Types<-<"@<->"@>->"@mustache Text.Mustache~= @~> @Text.Mustache.Types~= @~> @↝ @⥱ @mutable Data.Mutable:!>@Data.Mutable.Instances:!>@Data.Mutable.PartscompMP"@mvcMVC<>@ mysql-haskellData.Binary.Parser mysql-pureData.Binary.Parser myxine-clientMyxine##@@@@mzvControl.Monad.Mask:&:"@ n-ary-functor NAryFunctor-#-"@namedNamed!"@Named.Internal!"@ named-recordsData.NamedRecord:+"@:="@ named-sopData.NamedSOP.Type%++"@:->@SCons@namelistText.Namelist.Types:*"@:="@nano-erlControl.Concurrent.NanoErl!"@ nanoparsecData.Nanoparsec.*>"@<*."@"@nanospec Test.HspecshouldBe? shouldReturn?naturalNatural!!"@!!!"@natural-arithmeticArithmetic.Nat<=?"@"@Web.Routes.Nested.Match"@ net-spiderNetSpider.Interval<..<@<..<=@<=..<@<=..<=@NetSpider.Query<..<@<..<=@<=..<@<=..<=@netcoreFrenetic.NetCore<%>"@<&&>"@<+>"@<||>"@==>"@Frenetic.NetCore.Short<%>"@<&&>"@<+>"@<||>"@==>"@ netlib-carrayNumeric.Netlib.CArray.Utility^!"@netlib-comfort-array#Numeric.Netlib.ComfortArray.Utility^!"@netriumContract %&&@%*@%+@%-@%/@%<@%<=@%==@%>@%>=@%||@ Observable %&&@%*@%+@%-@%/@%<@%<=@%==@%>@%>=@%||@netspecNetwork.NetSpec.:"@Network.NetSpec.ByteString!"@Network.NetSpec.Json!"@Network.NetSpec.Text!"@ nettle-frpNettle.FRPControl.AFRP #"@*^"@-->"@-=>"@>--"@>=-"@^+^"@^-^"@^/"@Nettle.FRPControl.NettleSF<+>"@==>"@!Nettle.FRPControl.PacketPredicate<&>"@<|>"@|-"@!Nettle.FRPControl.SwitchInterface<+>"@ nettle-netkitNettle.Netkit.LabUtil#"@<-->"@@@"@nettle-openflowNettle.IPv4.IPAddress//"@netwireControl.Wire.Core&&&!"@***!"@Control.Wire.Event&>@<&@Control.Wire.Switch-->?>--?network-api-supportNetwork.Api.Support<>@Network.Api.Support.Request<>@ network-houseNet.Bits.!."@Net.PacketParsing#"@#!"@<#"@network-transport-testsNetwork.Transport.Tests.Traced>>"@>>="@neuralData.MyPrelude&"@.~"@<.>"@"@<>"@^."@Data.Utils.Matrix!!!"@!!?"@<%%>"@Data.Utils.Vector!"@!?"@<%>"@<+>"@<->"@neural-network-baseData.NeuralNetwork:++"@neural-network-blashs!Data.NeuralNetwork.Backend.BLASHS<<+"@<<="@niagraData.Niagra.DSL.="@?"@Data.Niagra.Selector!"@#"@.+."@.>."@.~."@<::>"@<:>"@<||>"@|$=|"@|*=|"@|=|"@|^=|"@||=|"@|~=|"@ nice-htmlText.Html.Nice:$"@:-"@:="@Text.Html.Nice.FreeMonad:-"@:="@Text.Html.Nice.Internal:$"@:-"@:="@Text.Html.Nice.Writer! @nix-eval Language.Eval$$ @Language.Eval.Internal$$ @nixpkgs-update OurPrelude&?<&>?<>@<|>@>>>?noether Lemmata.Applicative<<*>>"@ Lemmata.Base$! Lemmata.Bool&&^@<&&>@<||>@||^@Lemmata.Functor$>@<$"@<$>@<<$>>@ Lemmata.Monad<$!>@<=<?=<<?>=>?>>"@>>="@Lemmata.Semiring<.>"@Noether.Algebra.Linear.API%<"@%<~"@>%"@~>%"@Noether.Algebra.Single.API&&@*@+@-@/@||@Noether.Equality=="@nomLanguage.Nominal.Abs:@>Language.Nominal.Binder:@@!@>?@@"@@@!"@@@."@Language.Nominal.Equivar$$!Language.Nominal.Examples.SystemF:->"@@."@@:"@'Language.Nominal.Examples.UntypedLambda:@"@Language.Nominal.SMonad+<<"@>>+"@Language.Nominal.Utilities.: @ non-empty Data.NonEmpty!:@append@ appendLeft@ appendRight@Data.NonEmpty.Classappend@cons@ Data.Optional?:@non-empty-zipperData.List.NonEmptyZipper|:"@ non-negativeNumeric.NonNegative.Class-|"@add@nonempty-alternative Data.NonEmpty:<:"@:>:"@nonempty-containersData.IntMap.NonEmpty!"@!?"@\\"@Data.IntSet.NonEmpty\\"@Data.Map.NonEmpty!"@!?"@\\"@Data.Sequence.NonEmpty !?"@:<||@:||>@<|@><@><|@NESeq@|>@|><@Data.Sequence.NonEmpty.Internal:<||@:||>@<|@><@NESeq@|><@Data.Set.NonEmpty\\"@nonempty-vectorData.Vector.NonEmpty!"@!?"@++"@//"@nonempty-wrapper Data.NonEmpty<|@|>@nonempty-wrapper-textData.Text.Lazy.NonEmptycons@Data.Text.NonEmptycons@ nonemptymapData.Map.NonEmpty!?"@nonfreeData.Monoid.Nonfree◇"@ nonlinearNonlinear.Matrix!!*@!!/@!*@!*!@*!@*!!@Nonlinear.Vector*^@^*@^/@noodleLanguage.Noodle.Parsing.Generic<|>"@ not-in-base NIB.Pointfree &&*"@..%"@..%.."@...%"@...@"@..@"@>>*"@^.."@^..."@||*"@ nri-preludeBasics&&@*@+@++@-@/@//@/=@<@<<"@<=@<|==@>@>=@>>"@^ @|>||@ NriPrelude<*>@>>=?nsisDevelopment.NSIS %&&@%/=@%<@%<=@%==@%>@%>=@%||@&@?@@=?nspaceData.Semilattice/\"@nuhaMath.Nuha.Base!"@!!"@|!"@|!!"@||!"@||!!"@|||!"@|||!!"@Math.Nuha.Numeric*|@+|@-|@/|@|*@|** @|*|@|+@|+|@|-@|-|@|.|@|/@|^ @numberData.Number.Peano//"@numbered-semigroupsData.Semigroup.Numbered==="@|||"@──"@━━"@│"@┃"@██"@■"@numbersData.Number.Vectorspace*>"@<+>"@numeric-domainsNumeric.Domain<..<"@<..<="@<=..<"@<=..<="@numeric-preludeAlgebra.Additive+@-@<*>.+@<*>.-@<*>.-$@Algebra.Algebraic^/ @Algebra.DimensionTerm%*%@%/%@Algebra.DivisibleSpace@ Algebra.Field/@^- @Algebra.IntegralDomaindiv@mod@Algebra.Latticedn@up@Algebra.Module*>@<*>.*>"@Algebra.Monoid<*>"@Algebra.NonNegative-|@add@Algebra.RealIntegralquot@rem@Algebra.RightModule<*@ Algebra.Ring*@^ @Algebra.Transcendental** @^? @Algebra.Vector*>@<+>@eq@MathObj.LaurentPolynomial!"@MathObj.Permutation.CycleList*>"@Number.Complex+:@-:"@Number.DimensionTerm&*&@&/&@*&@ Number.Peano&&~@Number.Quaternion+::@ Number.Ratio%@:%"@Number.ResidueClass.Check/:@Cons@Number.ResidueClass.Maybe/:@Cons@NumericPrelude#!!"@$$!%@&&@*@** @*>@+@++@-@."@/@/=@<@<$@<=@=<<?==@>@>=@>>?>>=?^ @^- @^/ @^? @div@elem@mod@notElem@quot@rem@seq||@NumericPrelude.Base!!"@$$!&&@++@."@/=@<@<$@<=@=<<?==@>@>=@>>?>>=?elem@notElem@seq||@NumericPrelude.List.Checked!!"@NumericPrelude.List.Generic!!"@NumericPrelude.Numeric%@*@** @*>@+@-@/@^ @^- @^/ @^? @div@mod@quot@rem@ numeric-questFraction//"@:-:"@ QuantumVector *>@+>@:*"@:+>"@:<+"@:<|"@:|>"@<*@<+@<>@<|@><@|>@Tensor#"@##"@<*>@<<*>>@ numeric-toolsNumeric.Classes.Indexing!"@ numerical&Control.NumericalApplicative.Backwards<**>"@Numerical.Array.Shape:*@numhask NumHask*@**"@*|@+@+:@+|@-@-|@/@/\@/|"@:%"@@++@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?elem@notElem@onseq||@~@numhask-preludeNumHask.Prelude4$$!!$>@%@&?&&@&&^@*>@++@."@.&.@.|.@/=@:*:@:+:@:.:@:|@:~:@<@<$@<$!>@<$>@<&&>@<&>?<*@<**>@<*>@<=@<=<?<>@<|>@<||>@=<<?==@>@>=@>=>?>>?>>=?elem@ hashWithSaltnotElem@onrotate @rotateL @rotateR @shift @shiftL @shiftR @xor@||@||^@ numhask-space NumHask.Space+/-@...@>.<@|.@|.|@|<|@|>|@NumHask.Space.Point<.>@numtypeNumeric.NumType*@+@-@/@ numtype-dkNumeric.NumType.DK.Integers*@+@-@/@^ @ numtype-tfNumeric.NumType.TF*"@+"@-"@/"@nurbs Linear.NURBS≃"@≄"@⊕"@ nvfetcherNvFetcher.PackageSet%~@&?.~@?~@^. @nvim-hsNeovim+:@Neovim.Classes+:@<+>@nyx-gamePlay.Engine.Utils.:"@o-clock Time.Rational%@::%"@>=%@Time.Timestamp*:*@+:+@-%-@-:-@/:/@oalg-abgOAlg.AbelianGroup.Euclid//@ oalg-baseOAlg.Category.Applicative$OAlg.Category.Definition$."@:>:@OAlg.Category.Path:."@OAlg.Data.Boolean.Definition&&@<~>?||@~>?OAlg.Data.Equal/=@==@OAlg.Data.Number%@>-@ OAlg.Data.Ord<<=@OAlg.Data.Reducible>>>=?OAlg.Data.Singular<==>"@OAlg.Data.Statement.Definition ./=.@.==.@:&&@:<=>?:<=>::=>?:?>@:||@|~>?OAlg.Entity.FinList**"@++@:|@<++>@|:@OAlg.Entity.Natural*@**@+@++@OAlg.Entity.Product.Definition:*@:^"@OAlg.Entity.Sequence.Definition<&@?"@??"@OAlg.Entity.Sum.Definition:!"@:+@ OAlg.Preludeseq"OAlg.Structure.Additive.Definition+@-@OAlg.Structure.Exponential^"@(OAlg.Structure.Multiplicative.Definition*@OAlg.Structure.Operational*>"@<*@"OAlg.Structure.Oriented.Definition:>@OAlg.Structure.Ring.Definition/@#OAlg.Structure.Vectorial.Definition! @@obddOBDD.Operation&&@==>||@ objectiveControl.Object.Instance.-@..-@?-"@Control.Object.Object@!="@@-@@<<@?@>>@?@>>^?@||@"@@~?^>>@? observableControl.Observable*:~*"@*:~."@.:~*"@.:~."@observable-sharing Data.Ref.Map!"@ ocaml-export OCaml.Export:<|>@:>@OCaml.Internal.Common<$+$>"@@oeis2Math.OEIS.Internal+."@+.+"@.+"@oiData.OI.Combinator|/|"@|:|"@|><|"@|>|"@ Data.OI.IFun|->|"@|::|"@|<>|"@Data.OI.Internal##"@=:"@??"@okapiOkapi.Function"@ombraGraphics.Rendering.Ombra.Shader~<"@~<*"@(Graphics.Rendering.Ombra.Shader.Language!"@*."@.*"@.*."@^|"@^|^"@Graphics.Rendering.Ombra.Vector*."@.*"@.*."@^|"@^|^"@onamaText.HTML.Onama@:"@@="@ one-linerGenerics.OneLiner.Internal.:"@ oneormoreData.OneOrMore.Operators++"@ oo-prototypesData.Prototype.->"@op Control.Op-<$<?.>?<$<?<.?<<?<<<?<<^?<=<?<|?=$<?=*<?=<$<?=<<?>$=?>$>?>$>-?>$>=?>*=?>=>?>>?>>=?>>>?>>^?^<<?^>>?|>?opaleye$Opaleye.Internal.HaskellDB.PrimQuery:#>"@:#>>"@:&"@:&&"@:&<"@:&>"@:*"@:+"@:-"@:->"@:->>"@:-|-"@:/"@:<"@:<<"@:<="@:<>"@:<@"@:="@:=="@:>"@:>="@:>>"@:?"@:?&"@:?|"@:@>"@:^"@:|"@:||"@:~"@Opaleye.Internal.Helpers.: @.:. @.:: @.::. @Opaleye.Internal.Operators.&&@.==@.||@Opaleye.Operators*@+@-@.#> @.#>> @.&&@.&<@.&>@.++"@.-> @.->> @.-|-@./=@./==@.<@.<<@.<=@.<@@.==@.===@.>@.>=@.>>@.?@.?&@.?|@.@>@.||@/@opaleye-sqliteOpaleye.SQLite.Internal.Helpers.: @.:. @.:: @.::. @Opaleye.SQLite.Operators .&&@.++"@./=@.<@.<=@.==@.>@.>=@.||@opaleye-textsearchOpaleye.TextSearch@@@Opaleye.TextSearch.Operators@@@ open-pandocText.Pandoc.Shared>>~"@ open-unionData.OpenUnion@>@Data.OpenUnion.Internal@!>@@>@openapi-petstoreOpenAPIPetstore.Core-&-@openapi3Data.OpenApi.Internal.Utils<+>"@opencvOpenCV.TypeLevel:::"@openglesGraphics.OpenGLES.Core$="@&="@ opentracing OpenTracing:&@<+>@OpenTracing.Propagation:&@<+>@ opt-env-conf OptEnvConf<$>@<*>@<|>@OptEnvConf.Parser*>@<$@<*@<*>@<|>@ optics-coreData.Maybe.Optics%?"@Optics.AffineFoldafailing@Optics.Cons.Core:<@:>@<|@cons@snoc@|>@ Optics.Foldfailing@summing@Optics.Indexed.Core%"@%>"@<%"@<%>"@Optics.Internal.Optic%"@%%"@%&"@Optics.Internal.Utils#."@.# @Optics.IxAffineFold iafailing@ Optics.IxFoldifailing@isumming@Optics.IxTraversaliadjoin@Optics.Operators !~@# @%!~@%~@.~@?!~@?~@^. @^.. @^? @Optics.Operators.Unsafe^?! @ Optics.Optic%"@%%"@%&"@&?<&>?Optics.Traversaladjoin@ optics-extra Optics.Cons:<@:>@<|@cons@snoc@|>@Optics.Indexed%>"@<%"@<%>"@Optics.State.Operators %%=@%=@.=@<%=@<.=@<<%=@<<.=@<>"@<>"@Options.Applicative.Help.Pretty.$."@<+>@"@<>@Options.Applicative.Internal"@optparse-genericOptions.Generic::: optstreamOptions.OptStream.Classes#->@#>@-#>@<#@<##->@<##>@<#-@<#->@<#>@<$?>@<&?>?<-#@<-##>@<-#>@<-|>@<|->@orcOrc.Combinators"@ Orc.Monad<+>"@order-statisticsStatistics.Order@!"@@#"@@@"@ordered Data.Poset"@<==>"@ordered-containersData.Map.Ordered /\|"@<>|@<|@>|@\\"@|/\"@|<@|<>@|>@Data.Map.Ordered.Strict /\|"@<>|@<|@>|@\\"@|/\"@|<@|<>@|>@Data.Set.Ordered /\|"@<>|@<|@>|@\\"@|/\"@|<@|<>@|>@ordering-duplicatesData.Ord.Ordering.===."@ordersData.PartialOrder.:"@ordrea FRP.Ordrea<@"@<@>"@ org-parserOrg.Walk.>"@?>"@orgstat OrgStat.Util??~"@ormoluOrmolu.Terminal.QualifiedDo>>"@orville-postgresqlOrville.PostgreSQL .&& @./="@.:="@.<"@.<-"@."@.>="@.|| @#Orville.PostgreSQL.Expr.WhereClause.&& @.|| @+Orville.PostgreSQL.Marshall.FieldDefinition ./="@.:="@.<"@.<-"@."@.>="@Orville.PostgreSQL.Plan.Syntax>>="@ory-hydra-client ORYHydra.Core-&-@ os-stringSystem.OsString!?"@%System.OsString.Data.ByteString.Short!?"@cons@snoc@,System.OsString.Data.ByteString.Short.Word16!?"@cons@snoc@System.OsString.Internal!?"@System.OsString.Posix!?"@System.OsString.Windows!?"@osetData.Set.Ordered<>|@<|@>|@\\"@|<@|<>@|>@Data.Set.Ordered.Classes<>|@<|@>|@\\"@|<@|<>@|>@Data.Set.Ordered.OSet<>|@<|@>|@\\"@|<@|<>@|>@ overloaded Overloaded%%"@cons@Overloaded.Categories%%"@Overloaded.Listscons@Overloaded.Lists.Bidicons@overtureOverture!>"@.>"@"@ pa-preludePossehlAnalyticsPrelude&?&>>?:|@<&>?<|>@>$<@>&<@>>>? packstreamData.PackStream=:"@Data.PackStream.Internal.Type=:"@ pact-time Pact.Time*^"@.+^@.-.@.-^@^+.@^+^@^-^@Pact.Time.Internal*^"@.+^@.-.@.-^@^+.@^+^@^-^@ pads-haskellLanguage.Pads.PadsParser<++>"@<||>"@=@=@Language.Pads.PadsPrinter+++"@ palindromes,Data.Algorithms.Palindromes.PalindromesUtils=:="@pandocText.Pandoc.Parsing<+?>@<|>?pandoc-citeprocText.CSL.Eval.Names<++>"@<+>"@ pandoc-typesText.Pandoc.Builder<>@pandoczText.Pandoc.Z.Util.~~@pandora$Pandora.Core.Functor.: @:. @:::@::|.:@::|:.@::|::@:=:=>:=><"@<:=<< @<<<@<<<<@<<<<<@<<<<<<@<<<<<<<@<<<<<<<<@ <<<<<<<<<?>"@>> @>>>@>>>>@>>>>>@>>>>>>@>>>>>>>@>>>>>>>>@ >>>>>>>>>?~>Pandora.Core.Interpreted -#=@-#=$>"@-=:"@<$=#-"@<~ @<~~@<~~~@<~~~~@<~~~~~@<~~~~~~@<~~~~~~~@ <~~~~~~~~?=#-@&Pandora.Paradigm.Algebraic.Exponential%"@&?.:..@"Pandora.Paradigm.Algebraic.Functor8-* @-*-*-@-+ @--*@--+"@---*@---+"@----*@----+"@-----*@-----+"@------*@------+"@-------*@-------+"@ --------*? --------+"@<-*-@<-*-*-@<-*--@<-*---@<-*----@<-*-----@ <-*------? <-*-------"@ <-*--------"@<-+-@<-|-<-|-@<-|->-|-@<-||-@<-||--@<-||---@<-||----@ <-||-----? <-||------"@ <-||-------"@ <-||--------"@<-|||-"@<-|||--"@<-|||---"@ <-|||----"@ <-|||-----"@ <-|||------"@ <-|||-------"@ <-|||--------"@<<-/-"@>-|-<-|-@>-|->-|-@>-||-@>-||--@>-||---@>-||----@ >-||-----? >-||------"@ >-||-------"@ >-||--------"@"Pandora.Paradigm.Algebraic.Product:*:@<:*:>@Pandora.Paradigm.Algebraic.Sum:+:@9Pandora.Paradigm.Controlflow.Effect.Transformer.Comonadic:<@7Pandora.Paradigm.Controlflow.Effect.Transformer.Monadic:> @'Pandora.Paradigm.Controlflow.Observable*:~*"@*:~."@.:~*"@.:~."@%Pandora.Paradigm.Controlflow.Pipeline=*="@Pandora.Paradigm.Inventory=<>"@~<>"@&Pandora.Paradigm.Inventory.Some.Optics#=@@>>>"@@>>>@'Pandora.Paradigm.Primary.Functor.Tagged:#Pandora.Paradigm.Schemes.TT<::<@<::>@>::<@>::>@Pandora.Paradigm.Schemes.TU<:.<@<:.>@>:.<@>:.>@Pandora.Paradigm.Schemes.TUT<:<.>:<@<:<.>:>@<:>.<:<@<:>.<:>@>:<.>:<@>:<.>:>@>:>.<:<@>:>.<:>@Pandora.Paradigm.Schemes.T_U<:.:<@<:.:>@>:.:<@>:.:>@Pandora.Paradigm.Schemes.UT<.:<@<.:>@>.:<@>.:>@Pandora.Pattern.Category -------->?------->@------>@----->@---->@--->@-->@<--@<---@<----@<-----@<------@<-------@ <--------?Pandora.Pattern.Functor.Adjoint --------|?-------|@------|@-----|@----|@---|@--|@-| @|- @|--@|---@|----@|-----@|------@|-------@ |--------? Pandora.Pattern.Functor.Bindable=<<@==<<@===<<@====<<@=====<<@======<<@ =======<<?%Pandora.Pattern.Functor.Contravariant >$$<"@>$<"@>-|-@>-|--@>-|---@>-|----@>-|-----@ >-|------? >-|-------"@ >-|--------"@>-|-|-@!Pandora.Pattern.Functor.Covariant<$$$>"@<$$>"@<$>"@<-|-@<-|--@<-|---@<-|----@<-|-----@ <-|------? <-|-------"@ <-|--------"@<-|-|-@<-|-|--@<-|-|---@ <-|-|----? <-|-|-----"@ <-|-|------"@ <-|-|-------"@<-|-|-|-@$Pandora.Pattern.Functor.Distributive -------<<?------<<@-----<<@----<<@---<<@--<<@-<<@"Pandora.Pattern.Functor.Extendable<<=@<<==@<<===@<<====@<<=====@<<======@ <<=======? <<========"@!Pandora.Pattern.Functor.Invariant@#Pandora.Pattern.Functor.Traversable<-/-@<-/--@<-/---@<-/----@<-/-----@ <-/------? <-/-------"@<-/-/-@Pandora.Pattern.Object.Chain<"@<= @<=>@>"@>= @Pandora.Pattern.Object.Group-"@Pandora.Pattern.Object.Ringoid*"@ Pandora.Pattern.Object.Semigroup+"@"Pandora.Pattern.Object.Semilattice/\"@\/"@Pandora.Pattern.Object.Setoid!= @== @?= @Pandora.Pattern.Semigroupoid."@%Pandora.Pattern.Transformer.Hoistable/|\@pansitePansite%%>>? pantry-tmpPantry.Internal.AesonExtended .!="@..!="@...:"@...:?"@..:"@..:?"@.:"@.:!"@.:?"@.= @"@papa-base-export$Papa.Base.Export.Control.Applicative*>"@<$@<$>@<*"@<**>@<*>"@<|>"@!Papa.Base.Export.Control.Category."@Papa.Base.Export.Control.Monad<$!>@>>"@>>="@Papa.Base.Export.Data.Bool&&@||@Papa.Base.Export.Data.Eq/="@=="@Papa.Base.Export.Data.FoldablenotElem@Papa.Base.Export.Data.Function$&?onPapa.Base.Export.Data.Functor$>@<$"@<$>@Papa.Base.Export.Data.List\\@elem@notElem@#Papa.Base.Export.Data.List.NonEmpty:|"@Papa.Base.Export.Data.Ord<"@<="@>"@>="@Papa.Base.Export.Data.Ratio%@Papa.Base.Export.Data.Semigroup<>"@Papa.Base.Export.Prelude$&&@*@** @+@-@/@/=@<@<$@<$>@<*>@<=@==@>@>=@^ @^^ @elem@mod@notElem@quot@rem@||@papa-base-implementPapa.Base.Implement.Data.List++"@papa-bifunctors-exportPapa.Bifunctors.Export*>>"@<<$>>@<<*"@<<**>>@<<*>>"@ papa-includePapa.Include.Data.Functor.Apply*>"@<*"@>>"@Papa.Include.Data.Functor.Bind=<<"@>>="@Papa.Include.Data.List++"@:|"@Papa.Include.Data.Semigroupoid."@papa-lens-implementPapa.Lens.Implement.Data.List!!"@papa-prelude-lensPapa.Prelude.Lens.Data.List!!"@papa-prelude-semigroupoids-Papa.Prelude.Semigroupoids.Data.Functor.Apply*>"@<*"@>>"@,Papa.Prelude.Semigroupoids.Data.Functor.Bind=<<"@>>="@,Papa.Prelude.Semigroupoids.Data.Semigroupoid."@papa-prelude-semigroups!Papa.Prelude.Semigroups.Data.List++"@:|"@papa-semigroupoids-exportPapa.Semigroupoids.Export-<-?-<<?->-?.>"@.>>"@"@<."@<..>@<.>"@<<$>>@<<."@<<..>>@<<.>>"@>>-"@papillon Text.Papillon<$>@<*>@Text.Papillon.Core<$>@<*>@parallelControl.ParallelparpseqControl.Parallel.Strategies $|"@$||"@-|"@-||"@.|"@.||"@>|"@>||"@dot"@usingusingIO Control.Sequsing parameterized!Parameterized.Control.Applicative&*>@&<*@&<*>@&<|>@Parameterized.Control.Monad&<=<?&=<<?&>=>?&>>?&>>=?Parameterized.Data.Semigroup&<>@parameterized-dataData.Param.FSVec!"@++@+>@<+@parameterized-utilsData.Parameterized.BoolRepr%&&@%||@:~:@Data.Parameterized.Classes:~:@ hashWithSaltData.Parameterized.Context!"@!^"@:>"@<++>"@Data.Parameterized.Ctx::>"@Data.Parameterized.List!!"@:<@Data.Parameterized.NatRepr*@+@-@:~:@<=@Data.Parameterized.Peano:~:@ parcom-libText.Parcom.Core"@<|>"@paripari Text.PariPari@Text.PariPari.Internal.Class@<|>@"Text.PariPari.Internal.Combinators<|>@ parquet-hs Parquet.Utils@parsec Text.Parsec<|>?Text.Parsec.Perm<$$>@<$?>@<|?>?<||>?Text.Parsec.Prim<|>?"Text.ParserCombinators.Parsec.Perm<$$>@<$?>@<|?>?<||>?"Text.ParserCombinators.Parsec.Prim<|>? parsec-classText.Parsec.Class<|>? parsec-free Text.Parsec<|>?Text.Parsec.Perm<$$>@<$?>@<|?>?<||>?Text.Parsec.Prim<|>? parsec-utilsText.Parsec.Utils$:"@+:"@-:"@.:"@<:"@=:"@parsec1"Text.ParserCombinators.Parsec.Prim*>@<$@<$>@<*@<*>@<|>@parsec2"Text.ParserCombinators.Parsec.Perm<$$>"@<$?>"@<|?>"@<||>"@"Text.ParserCombinators.Parsec.Prim"@<|>"@parsec3 Text.Parsec"@<|>"@Text.Parsec.Perm<$$>"@<$?>"@<|?>"@<||>"@Text.Parsec.Prim"@<|>"@parsekText.ParserCombinators.Class<<|>@@&Text.ParserCombinators.Parsek.Position *>@<$@<$>@<*@<**>@<*>@<<|>@@<|>@parser-combinatorsControl.Applicative.Combinators<|>@Control.Monad.Combinators<|>@ parser241Parser.ProductRule&"@--->"@-->"@>>>"@|/"@|>"@!Parser.ProductRule.Internal.Maker&"@--->"@-->"@>>>"@|/"@|>"@parsersText.Parser.CombinatorsText.Parser.Permutation<$$>@<$?>@<|?>?<||>? parsestarData.STAR.Path->//"@./"@/<>"@ parsimony Parsimony*>"@<$"@<$>"@<*"@<*>"@"@<|>"@parsleyParsley>*<"@Parsley.Alternative<+>@<|>@Parsley.Applicative $>@*>@<$@<$>@<&>@<*@<**>@<*>@<:>@<~@<~>@>>?~>@Parsley.InputExtras:>"@Parsley.Precedence+<@>+@Parsley.Selective@>?>@>??>@||=? parsley-coreParsley.Internal*>"@<*"@<*>"@<|>"@>*<"@)Parsley.Internal.Backend.Machine.InputRep:>"@Parsley.Internal.Common.Indexed/\"@:*:"@:<"@\/"@|>"@Parsley.Internal.Common.Utils>*<"@ Parsley.Internal.Core.InputTypes:>"@ Parsley.Internal.Core.Primitives*>"@<*"@<*>"@<|>"@partial-isomorphisms Control.Isomorphism.Partial.Prim***"@<$>@|||"@ partial-lensData.Lens.Partial.Common^%="@^/="@^="@Data.Lens.Partial.Lazy%%="@%="@//="@~="@ partial-orderData.PartialOrd/="@<"@<="@=="@>"@>="@partial-records Data.Partial?"@partial-semigroupData.PartialSemigroup<>?@Data.PartialSemigroup.Generics<>?@passageLanguage.Passage//"@pastaPasta.!.&"@.="@.|"@//"@:|"@ pasta-curves PastaCurves*@+@-@patatPatat.PrettyPrint<$$>@<+>@patch Data.Patch~~"@patch-combinators Data.Patch-::"@>->"@path OsPath.Posix-<.>@<.>@@OsPath.Windows-<.>@<.>@@ Path.Posix-<.>@<.>@@ Path.Windows-<.>@<.>@@ path-extra Path.Extended<#> @<&>@ path-like Path.Like/>"@ path-sing Path.Sing"@ path-tagged Path.Tagged@ path-utils Path.Utils"@paths System.Path-<.>@<.>@@System.Path.Lens<.>~@~@pathtype System.Path<++>@<.>@@System.Path.Generic<++>@<.>@@pattern-matcherLanguage.Pattern.Compiler:="@ pattern-trieData.Trie.Pattern|>@ pcre-heavyText.Regex.PCRE.Heavy=~"@≈"@ pcre-lessText.Regex.Less<<"@=~"@pcre-light-extraText.Regex.PCRE.Light.Extra=~"@ peano-infNumber.Peano.Inf-|"@pedersen-commitment PrimeField|*|"@|+|"@pencilPencil.Content<<|"@<|"@<||"@pennyPenny.Lincoln.Equivalent==~"@ penny-libPenny.Lincoln.Equivalent==~"@percent-formatText.PercentFormat%"@%%"@%%%"@%%%%"@%%%%%"@%%%%%%"@+%"@-%"@-%%"@-%%%"@-%%%%"@-%%%%%"@-%%%%%%"@/%"@Text.PercentFormat.Quotient%@perdureDatabase.Perdure.Persistent&."@>."@|."@perf Perf.Types$|"@|$|"@|+|"@permuteText.ParserCombinators.Perm<$$>"@<$?>"@<|?>"@<||>"@persistData.Persist.Internal:!:@persistable-recordDatabase.Record.FromSql<&>@Database.Record.Persistable<&>"@Database.Record.ToSql<&>@ persistentDatabase.Persist!=.@*=.@+=.@-=.@/<-.@/=.@<-.@<.@<=.@=.@==.@>.@>=.@||.@persistent-documentationDatabase.Persist.Documentation#"@--^"@'Database.Persist.Documentation.Internal#"@--^"@persistent-event-source%Database.Esqueleto.Monad.Experimental(!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@:&@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ crossJoin@crossJoinLateral@ fullOuterJoin@ilike@ innerJoin@innerJoinLateral@leftJoin@leftJoinLateral@like@on"@ rightJoin@||.@Database.Esqueleto.Monad.Legacy!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ilike@like@||.@persistent-eventsource%Database.Esqueleto.Monad.Experimental(!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@:&@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ crossJoin@crossJoinLateral@ fullOuterJoin@ilike@ innerJoin@innerJoinLateral@leftJoin@leftJoinLateral@like@on"@ rightJoin@||.@Database.Esqueleto.Monad.Legacy!=.@%"@&&.@*.@*=.@++.@+.@+=.@-.@-=.@/.@/=.@<#"@<&>"@<.@<=.@=.@==.@>.@>=.@?."@ CrossJoin@ FullOuterJoin@ InnerJoin@ LeftOuterJoin@RightOuterJoin@^."@ilike@like@||.@persistent-iprouteDatabase.Persist.IP<.<."@<:<."@<:<="@>.>."@>:>."@>:>="@persistent-migrationDatabase.Persist.Migration:="@~>"@Database.Persist.Migration.Core:="@~>"@persistent-mongoDBDatabase.Persist.MongoDB&->.@&~>.@->.@=:=~.@?&->.@?&~>.@addToSet@ anyBsonEq@anyEq@inList@ nestAnyEq@ nestBsonEq@nestEq@nestGe@nestIn@nestLe@nestNe@ nestNotIn@nestSet@ninList@pull@pullAll@push@~>.@persistent-mtlDatabase.Persist.Sql.Shim!=.@*=.@+=.@-=.@/<-.@/=.@<-.@<.@<=.@=.@==.@>.@>=.@||.@persistent-postgresql Database.Persist.Postgresql.JSON<@.@?&.@?.@?|.@@>.@persistent-testInit==@?>=>?@/=?@==?@=??@?=?persistent-vectorData.Vector.Persistent//"@pfile PFile.Path@pgDatabase.PostgreSQL.Simple:."@ Database.PostgreSQL.Simple.Types:."@pg-store#Database.PostgreSQL.Store.RowParser<*>$@>>$?>>=$? pgp-wordlist&Data.Text.PgpWordlist.Internal.AltList:<>@phaser Codec.Phaser$#$@?>#>?>>#@Codec.Phaser.Common$#$@<#>@Codec.Phaser.Core$#$@?>#>?>>#@#phonetic-languages-phonetics-basicsPhladiprelio.General.Base~="@physicsPhysics.Units.Arithmetic*<@/<@>*<@>+<@>-<@>/@>/<@ picoparsecData.Picoparsec"@Data.Picoparsec.Combinator"@pierPier.Core.Artifact/>@ pier-corePier.Core.Artifact/>@pinboard Pinboard.Util"@pinchPinch.:"@.:?"@.="@?="@Pinch.Internal.Pinchable.:"@.:?"@.="@?="@pinchotPinchot Pinchot.Rulespinned-warningsInternal.GhcFacade $$"@$+$"@*>@<$>@<*@<*>@<+>"@<.>"@<>"@consBag@ mkCoreApp@ mkCoreApps@snocBag@pipedPiped.|"@|."@ Piped.Compose.|"@|."@pipelineControl.Pipeline=*="@pipesPipes<-<@<~@>->@>~@~<@~>@ Pipes.Core+>>@//<@//>@//@<+<@<<+@<\\@<~< @>+>@>>~@>\\@>~> @\<\@\>\@~<<@ pipes-async Pipes.Async>&>@ pipes-coreControl.Pipe.Combinators$$"@Control.Pipe.Common<+<"@>+>"@Control.Pipe.Monoidal***"@ pipes-extras Pipes.Extras+++"@ pipes-files Pipes.Files=~"@pipes-ioPipes.IOStream>->+"@pipes-protolude Pipes.Monad<$!>@<=<?=<<?>=>?>>"@>>="@ pipes-shell Pipes.Shell>?>"@pisigmaLanguage.PiSigma.Syntax-*-"@->-"@:.."@plailudePlailude!?"@.:"@.:."@~+~"@planet-mitchell. Applicative*>"@<*"@<*>"@<|>"@Array//"@ Array.Partial!"@Bits.&."@.&.~@.|."@.|.~@Bool&&@||@ ByteStringsnoc@ByteString.Latin1cons@snoc@ByteString.Lazycons@cons'@snoc@Category."@<<<?>>>?Comonad<<=?<@"@<@>"@<@@>@=<=?=>=?=>>?@>"@ Contravariant$<@>$"@>$$<@>$<@Equality/="@=="@Eval$!$!!<$!!>@dot"@usingFile-<.>@<.>@@FoldablenotElem@Function$$!&?onFunctor $>@-<<?.>"@.>>"@"@<$"@<$>@<&>?<."@<.>"@<<."@<<.>>"@>>-"@Graph.Inductive&"@ Json.Decode.!="@.:"@.:!"@.:?"@ Json.Encode.= @List++@\\@ List.Buildercons"@snoc"@ List.Partial!!"@List1:|"@ List1.Partial!!"@Logic>>-?Mitchell.Prelude($$!$>@%~@&?&&@*"@**"@*>"@+"@++@-"@."@.~@/"@/="@<"@<$"@<$>@<&>?<*"@<*>"@<<<?<="@<=<?<>"@<|>"@=<<?=="@>"@>="@>=>?>>="@>>>?^ @^. @^? @^^ @notElem@||@Monad <$!>@<=<?<|<@=<<?=<|@>=>?>>="@>|>@|>=@ Num.Floating**"@Num.Fractional/"@^^ @Num.Num*"@+"@-"@^ @ Num.Ratio%@ Optic.Fold^.. @^? @Optic.Fold.Unsafe^?! @ Optic.Getting^. @ Optic.Prism:<@:>@<|@cons@snoc@|>@ Optic.Setter %~@&&~@**~@*~@+~@-~@.~@//~@^^~@^~@||~@Ord<"@<="@>"@>="@ ParallelismparpseqReadermagnify@Regex=~@ Semigroup<>"@ Semilattice/\"@\/"@Signal addSignal"@ deleteSignal"@Statezoom@Textcons@planet-mitchell-testTestshouldBe? shouldReturn? shouldSatisfy?planktonPlankton.Additive+"@-"@-~"@~-"@Plankton.Basis.*."@.+."@.-."@./."@Plankton.Field**"@^^"@Plankton.Magma⊕"@Plankton.Metric≈@Plankton.Module *."@+."@-."@.*"@.+"@.-"@./"@/."@<.>"@><"@Plankton.Multiplicative*"@/"@/~"@~/"@platPlat=:"@ plot-light/Graphics.Rendering.Plot.Light.Internal.Geometry ##"@#>"@-."@.*"@<.>"@<\>"@^+^"@^-^"@~="@plotsPlots&=@&~~? Plots.Util&=@&~~?pluginsSystem.Plugins.Utils<+>"@<.>@@<>@plumbersControl.Plumbers6$&"@$&&"@$&&&"@$&&*"@$&&<"@$&&>"@$&&^"@$&*"@$&*&"@$&**"@$&*<"@$&*>"@$&*^"@$&<"@$&<&"@$&<*"@$&<<"@$&<>"@$&<^"@$&>"@$&>&"@$&>*"@$&><"@$&>>"@$&>^"@$&^"@$&^&"@$&^*"@$&^<"@$&^>"@$&^^"@$*"@$*&"@$*&&"@$*&*"@$*&<"@$*&>"@$*&^"@$**"@$**&"@$***"@$**<"@$**>"@$**^"@$*<"@$*<&"@$*<*"@$*<<"@$*<>"@$*<^"@$*>"@$*>&"@$*>*"@$*><"@$*>>"@$*>^"@$*^"@$*^&"@$*^*"@$*^<"@$*^>"@$*^^"@$<"@$<&"@$<&&"@$<&*"@$<&<"@$<&>"@$<&^"@$<*"@$<*&"@$<**"@$<*<"@$<*>"@$<*^"@$<<"@$<<&"@$<<*"@$<<<"@$<<>"@$<<^"@$<>"@$<>&"@$<>*"@$<><"@$<>>"@$<>^"@$<^"@$<^&"@$<^*"@$<^<"@$<^>"@$<^^"@$>"@$>&"@$>&&"@$>&*"@$>&<"@$>&>"@$>&^"@$>*"@$>*&"@$>**"@$>*<"@$>*>"@$>*^"@$><"@$><&"@$><*"@$><<"@$><>"@$><^"@$>>"@$>>&"@$>>*"@$>><"@$>>>"@$>>^"@$>^"@$>^&"@$>^*"@$>^<"@$>^>"@$>^^"@$^"@$^&"@$^&&"@$^&*"@$^&<"@$^&>"@$^&^"@$^*"@$^*&"@$^**"@$^*<"@$^*>"@$^*^"@$^<"@$^<&"@$^<*"@$^<<"@$^<>"@$^<^"@$^>"@$^>&"@$^>*"@$^><"@$^>>"@$^>^"@$^^"@$^^&"@$^^*"@$^^<"@$^^>"@$^^^"@*&"@*&&"@*&&&"@*&&*"@*&&<"@*&&>"@*&&^"@*&*"@*&*&"@*&**"@*&*<"@*&*>"@*&*^"@*&<"@*&<&"@*&<*"@*&<<"@*&<>"@*&<^"@*&>"@*&>&"@*&>*"@*&><"@*&>>"@*&>^"@*&^"@*&^&"@*&^*"@*&^<"@*&^>"@*&^^"@**"@**&"@**&&"@**&*"@**&<"@**&>"@**&^"@***"@***&"@****"@***<"@***>"@***^"@**<"@**<&"@**<*"@**<<"@**<>"@**<^"@**>"@**>&"@**>*"@**><"@**>>"@**>^"@**^"@**^&"@**^*"@**^<"@**^>"@**^^"@*<"@*<&"@*<&&"@*<&*"@*<&<"@*<&>"@*<&^"@*<*"@*<*&"@*<**"@*<*<"@*<*>"@*<*^"@*<<"@*<<&"@*<<*"@*<<<"@*<<>"@*<<^"@*<>"@*<>&"@*<>*"@*<><"@*<>>"@*<>^"@*<^"@*<^&"@*<^*"@*<^<"@*<^>"@*<^^"@*>"@*>&"@*>&&"@*>&*"@*>&<"@*>&>"@*>&^"@*>*"@*>*&"@*>**"@*>*<"@*>*>"@*>*^"@*><"@*><&"@*><*"@*><<"@*><>"@*><^"@*>>"@*>>&"@*>>*"@*>><"@*>>>"@*>>^"@*>^"@*>^&"@*>^*"@*>^<"@*>^>"@*>^^"@*^"@*^&"@*^&&"@*^&*"@*^&<"@*^&>"@*^&^"@*^*"@*^*&"@*^**"@*^*<"@*^*>"@*^*^"@*^<"@*^<&"@*^<*"@*^<<"@*^<>"@*^<^"@*^>"@*^>&"@*^>*"@*^><"@*^>>"@*^>^"@*^^"@*^^&"@*^^*"@*^^<"@*^^>"@*^^^"@Control.Plumbers.Monadm<<"@<<&"@<<&&"@<<&&&"@<<&&*"@<<&&<"@<<&&>"@<<&&^"@<<&*"@<<&*&"@<<&**"@<<&*<"@<<&*>"@<<&*^"@<<&<"@<<&<&"@<<&<*"@<<&<<"@<<&<>"@<<&<^"@<<&>"@<<&>&"@<<&>*"@<<&><"@<<&>>"@<<&>^"@<<&^"@<<&^&"@<<&^*"@<<&^<"@<<&^>"@<<&^^"@<<*"@<<*&"@<<*&&"@<<*&*"@<<*&<"@<<*&>"@<<*&^"@<<**"@<<**&"@<<***"@<<**<"@<<**>"@<<**^"@<<*<"@<<*<&"@<<*<*"@<<*<<"@<<*<>"@<<*<^"@<<*>"@<<*>&"@<<*>*"@<<*><"@<<*>>"@<<*>^"@<<*^"@<<*^&"@<<*^*"@<<*^<"@<<*^>"@<<*^^"@<<<"@<<<&"@<<<&&"@<<<&*"@<<<&<"@<<<&>"@<<<&^"@<<<*"@<<<*&"@<<<**"@<<<*<"@<<<*>"@<<<*^"@<<<<"@<<<<&"@<<<<*"@<<<<<"@<<<<>"@<<<<^"@<<<>"@<<<>&"@<<<>*"@<<<><"@<<<>>"@<<<>^"@<<<^"@<<<^&"@<<<^*"@<<<^<"@<<<^>"@<<<^^"@<<>"@<<>&"@<<>&&"@<<>&*"@<<>&<"@<<>&>"@<<>&^"@<<>*"@<<>*&"@<<>**"@<<>*<"@<<>*>"@<<>*^"@<<><"@<<><&"@<<><*"@<<><<"@<<><>"@<<><^"@<<>>"@<<>>&"@<<>>*"@<<>><"@<<>>>"@<<>>^"@<<>^"@<<>^&"@<<>^*"@<<>^<"@<<>^>"@<<>^^"@<<^"@<<^&"@<<^&&"@<<^&*"@<<^&<"@<<^&>"@<<^&^"@<<^*"@<<^*&"@<<^**"@<<^*<"@<<^*>"@<<^*^"@<<^<"@<<^<&"@<<^<*"@<<^<<"@<<^<>"@<<^<^"@<<^>"@<<^>&"@<<^>*"@<<^><"@<<^>>"@<<^>^"@<<^^"@<<^^&"@<<^^*"@<<^^<"@<<^^>"@<<^^^"@<=&"@<=&&"@<=&&&"@<=&&*"@<=&&<"@<=&&>"@<=&&^"@<=&*"@<=&*&"@<=&**"@<=&*<"@<=&*>"@<=&*^"@<=&<"@<=&<&"@<=&<*"@<=&<<"@<=&<>"@<=&<^"@<=&>"@<=&>&"@<=&>*"@<=&><"@<=&>>"@<=&>^"@<=&^"@<=&^&"@<=&^*"@<=&^<"@<=&^>"@<=&^^"@<=*"@<=*&"@<=*&&"@<=*&*"@<=*&<"@<=*&>"@<=*&^"@<=**"@<=**&"@<=***"@<=**<"@<=**>"@<=**^"@<=*<"@<=*<&"@<=*<*"@<=*<<"@<=*<>"@<=*<^"@<=*>"@<=*>&"@<=*>*"@<=*><"@<=*>>"@<=*>^"@<=*^"@<=*^&"@<=*^*"@<=*^<"@<=*^>"@<=*^^"@<=<"@<=<&"@<=<&&"@<=<&*"@<=<&<"@<=<&>"@<=<&^"@<=<*"@<=<*&"@<=<**"@<=<*<"@<=<*>"@<=<*^"@<=<<"@<=<<&"@<=<<*"@<=<<<"@<=<<>"@<=<<^"@<=<>"@<=<>&"@<=<>*"@<=<><"@<=<>>"@<=<>^"@<=<^"@<=<^&"@<=<^*"@<=<^<"@<=<^>"@<=<^^"@<=>"@<=>&"@<=>&&"@<=>&*"@<=>&<"@<=>&>"@<=>&^"@<=>*"@<=>*&"@<=>**"@<=>*<"@<=>*>"@<=>*^"@<=><"@<=><&"@<=><*"@<=><<"@<=><>"@<=><^"@<=>>"@<=>>&"@<=>>*"@<=>><"@<=>>>"@<=>>^"@<=>^"@<=>^&"@<=>^*"@<=>^<"@<=>^>"@<=>^^"@<=^"@<=^&"@<=^&&"@<=^&*"@<=^&<"@<=^&>"@<=^&^"@<=^*"@<=^*&"@<=^**"@<=^*<"@<=^*>"@<=^*^"@<=^<"@<=^<&"@<=^<*"@<=^<<"@<=^<>"@<=^<^"@<=^>"@<=^>&"@<=^>*"@<=^><"@<=^>>"@<=^>^"@<=^^"@<=^^&"@<=^^*"@<=^^<"@<=^^>"@<=^^^"@>=&"@>=&&"@>=&&&"@>=&&*"@>=&&<"@>=&&>"@>=&&^"@>=&*"@>=&*&"@>=&**"@>=&*<"@>=&*>"@>=&*^"@>=&<"@>=&<&"@>=&<*"@>=&<<"@>=&<>"@>=&<^"@>=&>"@>=&>&"@>=&>*"@>=&><"@>=&>>"@>=&>^"@>=&^"@>=&^&"@>=&^*"@>=&^<"@>=&^>"@>=&^^"@>=*"@>=*&"@>=*&&"@>=*&*"@>=*&<"@>=*&>"@>=*&^"@>=**"@>=**&"@>=***"@>=**<"@>=**>"@>=**^"@>=*<"@>=*<&"@>=*<*"@>=*<<"@>=*<>"@>=*<^"@>=*>"@>=*>&"@>=*>*"@>=*><"@>=*>>"@>=*>^"@>=*^"@>=*^&"@>=*^*"@>=*^<"@>=*^>"@>=*^^"@>=<"@>=<&"@>=<&&"@>=<&*"@>=<&<"@>=<&>"@>=<&^"@>=<*"@>=<*&"@>=<**"@>=<*<"@>=<*>"@>=<*^"@>=<<"@>=<<&"@>=<<*"@>=<<<"@>=<<>"@>=<<^"@>=<>"@>=<>&"@>=<>*"@>=<><"@>=<>>"@>=<>^"@>=<^"@>=<^&"@>=<^*"@>=<^<"@>=<^>"@>=<^^"@>=>"@>=>&"@>=>&&"@>=>&*"@>=>&<"@>=>&>"@>=>&^"@>=>*"@>=>*&"@>=>**"@>=>*<"@>=>*>"@>=>*^"@>=><"@>=><&"@>=><*"@>=><<"@>=><>"@>=><^"@>=>>"@>=>>&"@>=>>*"@>=>><"@>=>>>"@>=>>^"@>=>^"@>=>^&"@>=>^*"@>=>^<"@>=>^>"@>=>^^"@>=^"@>=^&"@>=^&&"@>=^&*"@>=^&<"@>=^&>"@>=^&^"@>=^*"@>=^*&"@>=^**"@>=^*<"@>=^*>"@>=^*^"@>=^<"@>=^<&"@>=^<*"@>=^<<"@>=^<>"@>=^<^"@>=^>"@>=^>&"@>=^>*"@>=^><"@>=^>>"@>=^>^"@>=^^"@>=^^&"@>=^^*"@>=^^<"@>=^^>"@>=^^^"@>>&"@>>&&"@>>&&&"@>>&&*"@>>&&<"@>>&&>"@>>&&^"@>>&*"@>>&*&"@>>&**"@>>&*<"@>>&*>"@>>&*^"@>>&<"@>>&<&"@>>&<*"@>>&<<"@>>&<>"@>>&<^"@>>&>"@>>&>&"@>>&>*"@>>&><"@>>&>>"@>>&>^"@>>&^"@>>&^&"@>>&^*"@>>&^<"@>>&^>"@>>&^^"@>>*"@>>*&"@>>*&&"@>>*&*"@>>*&<"@>>*&>"@>>*&^"@>>**"@>>**&"@>>***"@>>**<"@>>**>"@>>**^"@>>*<"@>>*<&"@>>*<*"@>>*<<"@>>*<>"@>>*<^"@>>*>"@>>*>&"@>>*>*"@>>*><"@>>*>>"@>>*>^"@>>*^"@>>*^&"@>>*^*"@>>*^<"@>>*^>"@>>*^^"@>><"@>><&"@>><&&"@>><&*"@>><&<"@>><&>"@>><&^"@>><*"@>><*&"@>><**"@>><*<"@>><*>"@>><*^"@>><<"@>><<&"@>><<*"@>><<<"@>><<>"@>><<^"@>><>"@>><>&"@>><>*"@>><><"@>><>>"@>><>^"@>><^"@>><^&"@>><^*"@>><^<"@>><^>"@>><^^"@>>>"@>>>&"@>>>&&"@>>>&*"@>>>&<"@>>>&>"@>>>&^"@>>>*"@>>>*&"@>>>**"@>>>*<"@>>>*>"@>>>*^"@>>><"@>>><&"@>>><*"@>>><<"@>>><>"@>>><^"@>>>>"@>>>>&"@>>>>*"@>>>><"@>>>>>"@>>>>^"@>>>^"@>>>^&"@>>>^*"@>>>^<"@>>>^>"@>>>^^"@>>^"@>>^&"@>>^&&"@>>^&*"@>>^&<"@>>^&>"@>>^&^"@>>^*"@>>^*&"@>>^**"@>>^*<"@>>^*>"@>>^*^"@>>^<"@>>^<&"@>>^<*"@>>^<<"@>>^<>"@>>^<^"@>>^>"@>>^>&"@>>^>*"@>>^><"@>>^>>"@>>^>^"@>>^^"@>>^^&"@>>^^*"@>>^^<"@>>^^>"@>>^^^"@pnmCodec.PNM.Parse++"@podenvPodenv.Prelude%~@.~@@?~"@^. @pointedalternativeControl.Alternative.Pointed"@<|!>"@ pointless-funData.Function.Pointless!~>@$::?.!"@.: @.^"@~>@pointless-haskellGenerics.Pointless.Bifctrable:*!|"@:+!|"@:@!|"@Generics.Pointless.Combinators!"@-|-"@/\"@<>"@><"@?"@??"@\/"@Generics.Pointless.Fctrable:*!:"@:+!:"@:@!:"@#Generics.Pointless.MonadCombinators-||-"@/|\"@<<="@>|<"@pointless-lenses%Generics.Pointless.Lenses.Combinators!/\<"@!<"@!\/<"@#\/<"@-|-<"@.<"@.\/<"@/\!<"@><<"@?<"@\/!<"@\/$<"@\/.<"@\/<"@polarData.Complex.Polar:<"@polar-configfilePolar.ConfigFile|$|@|%|@|=|@polyData.Poly.Laurent^-"@Data.Poly.Multi.Laurent^-"@Data.Poly.Sparse.Laurent^-"@ poly-controlControl.Applicative.Poly<<*>>"@Control.Monad.Poly>>>="@Control.Monad.Shuffle$>>="@poly-rec Data.GenRec#"@.*.@.=.@Data.GenRec.RecInstances.Record##@.**.@.==.@polyglot Utils.Functor<<$>>@ Utils.String+++"@polynomials-bernsteinAlgebra.Polynomials.Bernstein?"@ polyparse #Text.ParserCombinators.HuttonMeijer+++@*Text.ParserCombinators.HuttonMeijerWallace+++@ Text.ParserCombinators.Poly.Baseapply@discard@Text.ParserCombinators.Poly.LexonFail@"Text.ParserCombinators.Poly.ParseronFail@!Text.ParserCombinators.Poly.PlainonFail@!Text.ParserCombinators.Poly.StateonFail@%Text.ParserCombinators.Poly.StateLazyapply@discard@'Text.ParserCombinators.Poly.StateParseronFail@polysemyPolysemy.Internal.TH.Common:->?polysemy-opticsOptics.Polysemy,!~@# @%"@%!~@%%"@%%=@%&"@%=@%>"@%?"@%~@&?.=@.~@:<@:>@<%"@<%=@<%>"@<&>?<.=@<<%=@<<.=@<@ polysemy-path Polysemy.Path@ polysemy-req Polysemy.Req/:@/~@=:@polysemy-resumePolysemy.Resume!!"@!>"@!>>"@"@!>>"@?>@?>@>?@-@@>@@~@~@?~@>?Polysemy.Several:::@polysoupText.XML.PolySoup.Combine//>@/>@@<^@<^>@>/>@>^>@^>@pontarius-xmppNetwork.Xmpp.Internal+++"@<~"@popkeyPopKey!"@porpoise Web.Porpoise."@portray-diff-hunitData.Portray.Diff.HUnit@-?"@@?-"@portray-diff-quickcheckData.Portray.Diff.QuickCheck=-=@portsControl.Concurrent.Ports<-$"@<--"@<->"@<=="@Control.Concurrent.Processes>|"@Control.Concurrent.SVars<<"@Control.Concurrent.ThreadUtils&"@&>"@<&>"@posData.Pos*!@+!@posableGenerics.POSable.Representation++@ posix-pathsSystem.Posix.FilePath<.>"@"@postgresql-queryDatabase.PostgreSQL.Query:.@postgresql-simpleDatabase.PostgreSQL.Simple:.@ Database.PostgreSQL.Simple.Types:.@postgresql-simple-namedPgNamed=?? postgresql-txDatabase.PostgreSQL.Tx.HEnvCons@postgresql-tx-query.Database.PostgreSQL.Tx.Query.Internal.Reexport:.@postgresql-tx-squeal/Database.PostgreSQL.Tx.Squeal.Internal.Reexport5!"@!+@!-@!-!@#-.@&?&<"@&>"@*. @*: @+!@-|-"@.!"@.#> @.#>> @.&"@.&&@.*@.-.@.-> @.->> @./=@.<@.<=@.<@"@.==@.>@.>=@.?"@.?&"@.?|"@.|"@.||@:*@:::@:=>@:>>@<->"@<..<@<..<=@<<@"@<=..<@<=..<=@<@"@>>>?@&&"@@*"@@+"@@-"@@>"@@>."@@>>"@@@"@postgresql-typedDatabase.PostgreSQL.Typed.Range<@"@@>"@@>."@postieNetwork.Mail.Postie>->@powerpcLanguage.PowerPC.RTL &&."@/=."@<."@<=."@<=="@==."@>."@>=."@||."@pqueueData.PQueue.Max!!"@Data.PQueue.Min!!"@:<@Data.PQueue.Prio.Min:<@ pqueue-mtlData.Queue.Class:->"@pragludePraglude# @#%%=@#%%~@#%=@#%~@#=@#~@$%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&&"@&&=@&&~@&~?***"@**=@**~@*=@*~@+++"@+=@+~@-=@-~@."@..."@.=@.>"@.@=@.@~@.~@//=@//~@<"@<#%=@<#%~@<#=@<#~@<$"@<$!>@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<**=@<**~@<*=@<*~@<+=@<+>"@<+~@<-=@<-~@<."@<.=@<.>"@<.~@@<<%=@<<%@=@<<%@~@<<%~@<<&&=@<<&&~@<<**=@<<**~@<<*=@<<*~@<<+=@<<+~@<<-=@<<-~@<<.=@<<.~@<=@<<<>~@<<>=@<<>~@<<^?<<^=@<<^^=@<<^^~@<<^~@<<||=@<<||~@<<~@<="@<=<?<>"@<>=@<>~@"@<||=@<||~@<~@=<<?>"@>$"@>="@>=>?>>"@>>="@>>>?>>^??=@????~@^# @^. @^.. @^<<?^=@^>>?^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@cons@failing@notElem@onsnoc@|>@||=@|||"@||~@~>"@preamblePreamble!!"@# @#%%=@#%%~@#%=@#%~@#=@#~@$$!%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&@&&&@&&=@&&~@&~?*"@**"@***@**=@**~@*=@*>"@*~@+"@++@+=@+~@-"@-.-"@-/-"@-:-"@-=@-|-"@-~@."@..."@.= @.>"@.@=@.@~@.~@/"@//=@//~@/="@:<@:>@<"@<#%=@<#%~@<#=@<#~@<$"@<$!>@<$>@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<*"@<**=@<**~@<*=@<*>"@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>@<.~@@<<%=@<<%@=@<<%@~@<<%~@<<&&=@<<&&~@<<**=@<<**~@<<*=@<<*~@<<+=@<<+~@<<-=@<<-~@<<.=@<<.~@<=@<<<>~@<<>=@<<>~@<@<>=@<>~@@<||=@<||~@<~@=."@=<<?=="@>"@>$"@>="@>=>?>>"@>>="@?=@????~@\\@^ @^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^ @^^=@^^~@^~@cons@failing@notElem@onsnoc@|>@||@||=@||~@precisPrecis.Utils.PPShowS<+>"@<>"@ precursorPrecursor.Algebra.Eq/="@=="@Precursor.Algebra.Ord<"@<="@>"@>="@Precursor.Algebra.Ring-"@Precursor.Algebra.Semigroup<>"@Precursor.Algebra.Semiring*"@+"@Precursor.Coerce#."@Precursor.Control.Alternative<|>"@Precursor.Control.Applicative*>"@<*"@<**>@<*>"@Precursor.Control.Category &&&"@***"@+++"@."@<+>"@<<<?<<^?>>>?>>^?^<<?^>>?|||"@Precursor.Control.Functor$>@<$"@<$>@<&>?<-<?>->?Precursor.Control.Monad<$!>@<=<?=<<?>=>?>>"@>>="@Precursor.Data.Bool&&@||@Precursor.Function$&?.: @onPrecursor.Numeric.Integral%"@//"@Precursor.Structure.Foldable!!"@notElem@ pred-trieData.Trie.Pred.Interface./"@Data.Trie.Pred.Interface.Types./"@ predicateData.Predicate.&&."@.->."@.||."@predicate-classData.Predicate.Class&&"@||"@predicate-transformersPredicateTransformers? @also@ otherHand@predicate-typed Predicate.Core $&?&&@&&~@<..>@<<?>>?>>>?||@||~@~>?Predicate.Data.Bits.&.@.^.@.|.@Predicate.Data.Either+++@|||@Predicate.Data.Enum...@Predicate.Data.Lifted$$$&?*>@<$@<$>@<&>?<*@<*>?<:>@<|>@>>=?>|?>|>?|>?Predicate.Data.List++@+:@:+@Predicate.Data.Monoid<>@Predicate.Data.Numeric% @*@** @+@-@-% @/@^ @Predicate.Data.Ordering/=@/=~@<@<=@<=~@<~@==@==!@===~@==~@>@>=@>=~@>~@Predicate.Data.Tuple&&&@&*@***@|+@Predicate.Misc%%"@%&"@<%>@~>?Predicate.Util:#@prednote Prednote.Core&&&"@|||"@pregame Pregame.Base$!prelatePrelate.Prelude%~@&?+~@-~@.~@<%~@<&>?<<%~@<<.~@<>~@?~@^. @^.. @^? @^?! @failing@prelude-compat Data.List2010!!"@++@\\@ Prelude2010!!"@$$!&&@*@** @+@++@-@."@/@/=@<@<=@=<<?==@>@>=@>>?>>=?^ @^^ @div@mod@quot@rem@||@ prelude-edsl Prelude.EDSL$"@*"@**"@*>"@+"@-"@."@/"@<$"@<$>"@<*"@<*>"@>>"@>>="@prelude-extrasPrelude.Extras /=#@/=##@<#@<##@<=#@<=##@==#"@==##"@>#@>##@>=#@>=##@prelude-generalizePrelude.Generalize!!"@!!!"@$"@++"@.:"@.::"@.:::"@<>>="@>>=="@>>=\/"@>>=|\/"@>>=||"@>>=|||"@?"@\\"@prelude-safeenumPrelude.SafeEnumprecedes@succeeds@ preludeplus PreludePlus#!!"@$$!&&@*"@**"@*>"@+"@++@-"@."@/"@/="@:|"@<"@<$"@<$!>@<$>@<*"@<*>"@<="@<=<?<>"@=<<?=="@>"@>="@>=>?>>"@>>="@\\@^ @^^ @notElem@||@PreludePlus.Unicode=≪?÷@٪@—"@↤@↤∘@↦@∈@∉@∖@∘"@∧@∨@∩@∪@≠@≡@≤@≥@≫?≫=?⌥"@⧺@⩀@preql Preql.Imports$>@*>@:~:@:~~:@<$@<$!>@<$>@<&>?<*@<**>@<*>@<=<?<|>@=<<?>=>?>>?>>=?elem@notElem@ presburgerData.Integer.SAT :&&"@:*"@:+"@:-"@:/="@:<"@:<="@:=="@:>"@:>="@:||"@prettify Text.Pretty<+>"@<->"@"@"@prettyText.PrettyPrint$$@$+$@<+>@<>@Text.PrettyPrint.Annotated$$@$+$@<+>@<>@#Text.PrettyPrint.Annotated.HughesPJ$$@$+$@<+>@<>@Text.PrettyPrint.HughesPJ$$@$+$@<+>@<>@pretty-compactText.PrettyPrint.Compact$$"@<$$>"@<+>"@"@"@Text.PrettyPrint.Compact.Core$$"@ pretty-simple#Text.Pretty.Simple.Internal.Printer:.."@ pretty-typesData.Type.Pretty<$$-->@<$$>@<++>@<+>@<:$$-->@<:$$>@<:>@<||>@prettyFunctionComposing Control.PFC°"@ prettyprinter Prettyprinter<+>@<>@Prettyprinter.Internal<+>@prettyprinter-combinatorsPrettyprinter.Combinators##@-->:->(prettyprinter-compat-annotated-wl-pprint!Text.PrettyPrint.Annotated.Leijen<$$>"@<$>"@<+>@"@"@<>@#prettyprinter-compat-ansi-wl-pprintText.PrettyPrint.ANSI.Leijen<$$>"@<$>"@<+>"@"@"@<>@prettyprinter-compat-wl-pprintText.PrettyPrint.Leijen<$$>"@<$>"@<+>"@"@"@<>@ prim-uniqData.Unique.Tag:~:@primalControl.Prim.Evalseq Data.Prim#."@.#"@ Foreign.Prim*#@*##@**##"@+#@+##@-#@-##@/##@/=#@/=##@<#@<##@<=#@<=##@==#@==##@>#@>##@>=#@>=##@seqprimitive-addrData.Primitive.Addr minusAddr@plusAddr@remAddr@primitive-containersData.Set.Lifted\\"@Data.Set.Unboxed\\"@primus Primus.Error.@ @ Primus.Num1.*@.+@.-@Primus.TypeLevel++@ pringletonsData.Singletons.Map!"@\\"@ printcessPrintcess.PrettyPrinting+>@.=@\>@ afterEach@ beforeEach@ betweenEach@~>@ printf-safeText.Printf.Safe%@<%>"@prizmData.Prizm.Color<~>"@Data.Prizm.Types<$$$>"@<***>"@prob-fxEnv:="@<:>@ probability Numeric.Probability.Distribution//%>>=???=<<????Numeric.Probability.Percentage////*"@Numeric.Probability.Simulation~*. @~.@~..@ processing"Graphics.Web.Processing.Core.Types #&&"@#/="@#<"@#<="@#=="@#>"@#>="@#||"@+.+"@procex Procex.Quick?|>?prodapi Prod.Tracer>$@product-isomorphic$Data.Functor.ProductIsomorphic.Class|$|@|*|@|||@product-profunctorsData.Profunctor.Product***!"@***$"@****"@+++!"@profunctor-arrowsData.Profunctor.Arrow$$$&&&@***@+++@|||@profunctor-miscData.Profunctor.Arrow$$$&&&@***@+++@|||@Data.Profunctor.Misc+@@@@@profunctor-monadProfunctor.Monad=.@Profunctor.Monad.Cofunctor=.@=:@Profunctor.Monad.Core:-"@Profunctor.Monad.Monad*>@<$>@<*@<*>@>>?>>=?Profunctor.Monad.Profunctor=.@profunctor-opticsData.Profunctor.Optic.Carrier.#."@ Data.Profunctor.Optic.Combinator&?&&&&@****@++++@<<*>>@||||@Data.Profunctor.Optic.Fold^.. @^? @failing@Data.Profunctor.Optic.Setter..=@..~@.=@.~@<>=@<>~@Data.Profunctor.Optic.Traversal&&&&@****@++++@<<*>>@||||@Data.Profunctor.Optic.View^. @Data.Profunctor.Optic.Zoomzoom@ profunctorsData.Profunctor:->Data.Profunctor.Types:->Data.Profunctor.Unsafe#."@.# @progress-reportingControl.Monad.Progress>>>? project-m36ProjectM36.Shortcuts !!"@#: @#::@#:=@&&&@><"@?="@@@"@@~@|||@prolensProlens%~@.~@^. @prologLanguage.Prolog+++"@prologueProloguec!!"@$$!$>@$|@%~@&?&&@&&.@*@** @*>@+@-@."@.: @.:. @.:: @.::. @.~@/@/=@:$$:@:<>:@:|@:~:@<@<$@<$>@<$>=@<$|>@<$|>=@<&>?<*@<**>@<*>@<<?<<$>>@<<$>>=@<<*>>@<<<$>>>@<<<$>>>=@<<<*>>>@ <<<<$>>>>@ <<<<$>>>>=@ <<<<*>>>>@ <<<<<$>>>>>@ <<<<<$>>>>>=@ <<<<<*>>>>>@<<=?<=@<=<?<=<<?<=<<<?<=<<<<?<>@<@@<@>@<@@>@<|$>@<|$>=@<|>@=<<?=<<&?=<=?==@=>=?=>>?>@>=@>=>?>>?>>$>>=?>>=>?>>>=>?>>>>=>?>>~"@@>@Compose"@^ @^. @^? @^^ @div@elem@mod@notElem@onquot@rem@|$@||@||.@∘"@∘∘ @ ∘∘∘ @ ∘∘∘∘ @∘∘∘∘∘ @Prologue.Control.Monad<<?<=<?<=<<?<=<<<?<=<<<<?=<<?=<<&?>=>?>>?>>$>>=?>>=>?>>>=>?>>>>=>?>>~"@Prologue.Data.Basic &&@&&.@/=@<@<=@==@>@>=@||@||.@Prologue.Data.Foldableelem@Prologue.Data.Num *@** @+@-@/@^ @^^ @div@mod@quot@rem@Prologue.Data.Traversable<$>=@<$|>=@<<$>>=@<<<$>>>=@ <<<<$>>>>=@ <<<<<$>>>>>=@<|$>=@prolude Prolude.Aeson.!="@.:"@.:?"@.= @ Prolude.Core"$&?&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@quot@rem@seq||@Prolude.Esqueleto !=.@&&.@:&@<.@<=.@=.@==.@>.@>=.@?."@^."@||.@ Prolude.Lens.~@Prolude.MongoDB!<-:"@!=:"@<-:"@<:"@<=:"@=:>:"@>=:"@Prolude.Servant:<|>@:>@promises Data.Promise!="@proof-combinatorsLiquidHaskell.ProofCombinators***@==.@==?@?@ prop-unitPropUnit/==@===@ propellerData.Propagator.HeteroKCons@VCons@ propellor Propellor!?&?<>@Propellor.PropAccum!?&?&^?Propellor.Property==>?Propellor.Property.Ccache:+"@Propellor.Property.Debootstrap:+"@Propellor.Property.Firewall:-Propellor.Property.Versioned--> @<|>@Propellor.Types"@Propellor.Types.Container-<-"@->-"@Propellor.Types.MetaTypes&&@Propellor.Utilities<&&>@<||>@propertyTest.Property.Util<==>?==>prosidyProsidy.Types.Series:<:@:<<:@:>:@:>>:@prosidycProsidy.Compile.Core<|>@Prosidy.Compile.DSL&>@&>>? proto-lensData.ProtoLens.Encoding.Bytes"@Data.ProtoLens.Encoding.Parser"@Data.ProtoLens.Prism# @proto-lens-jsonpbData.ProtoLens.JSONPB.:"@.="@Data.ProtoLens.JSONPB.Class.:"@.="@ proto3-suiteProto3.Suite.JSONPB.:"@.="@Proto3.Suite.JSONPB.Class.:"@.="@protocolControl.Protocol->:@protocol-buffersText.ProtocolBuffers.Header<=<? protolude Protolude4$$!$!!%@&?&&@*@** @*>@+@++@-@."@.&.@.|.@/@:*:@:+:@:.:@:|@:~:@<@<*@<**>@<*>@<=@<|>@==@>@>=@^ @^%^"@^^ @^^%^^"@deepseqdiv@elem@ hashWithSaltmod@notElem@onquot@rem@rotate @rotateL @rotateR @seqshift @shiftL @shiftR @xor@||@Protolude.Applicative<<*>>@Protolude.Base$!%@*@** @+@++@-@/@^ @^%^"@^^ @^^%^^"@div@mod@quot@rem@seqProtolude.Bool&&^@<&&>@<||>@||^@Protolude.Functor$>@<$@<$>@<&>?<<$>>@Protolude.Monad<$!>@<=<?=<<?>=>?>>?>>=?Protolude.Partial!!"@Protolude.Semiring<.>"@proton Data.Profunctor.Arrow &&&"@***"@+++"@<+>"@<<^"@>>^"@^<<"@^>>"@|||"@Examples.Flowers>--@Proton # @%%~@%~@&?.~@<+>"@>-@?.@^. @^.."@^?"@Proton.Algebraic>-@?.@ Proton.Fold<+>"@^.."@^?"@ Proton.Getter^. @ Proton.Review# @ Proton.Setter%~@.~@Proton.Traversal%%~@ provenienceControl.Provenience<%%>@<%>@<%?>@@<:>@<^>@Language.Parser.Ptera.Syntax:*@<::>@<:>@<^>@(Language.Parser.Ptera.Syntax.SafeGrammar<:>@<^>@ ptera-coreLanguage.Parser.Ptera.Prelude&!!"@$!&?&&@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@ptera-thLanguage.Parser.Ptera.TH:*@<::>@<:>@<^>@Language.Parser.Ptera.TH.Syntax:*@<::>@<:>@<^>@ptrdiffForeign.Ptr.Diff.*@ pugs-hsregex RRegex.Syntax!~~"@=~"@=~~"@purebred-emailData.IMF.Syntax<<>>"@purenixPureNix.Prelude)!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<**>@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@ purescriptLanguage.PureScript-:>@Language.PureScript.Environment-:>@purescript-astLanguage.PureScript.Environment-:>@purescript-bridge"Language.PureScript.Bridge.Builder<|>@^==@ putlensesGenerics.Putlenses.Language-|-<"@.<"@.\/<"@><<"@><<<"@\/.<"@\/<"@ puzzle-draw Draw.Grid.--."@pvectorData.Vector.Persistent!"@!?"@//"@:|>@><"@|>"@Data.Vector.Persistent.Internal!"@!<<. @!>>. @!?"@//"@:|>@><"@|>"@.Data.Vector.Persistent.Internal.CoercibleUtils#."@.#"@q4c12-twofingerQ4C12.TwoFinger.Internal<*.>@<.*>@qc-oi-testgeneratorTest.OITestGenerator=!="@===>"@Test.OITestGenerator.Axiom=!="@===>"@qchasOperations.QuantumOperations*"@<*>"@|>"@|><|"@QC!"@!#> @#> @:+"@<# @<.> @<> @<\>@===@><"@?"@??"@|||@¿"@qlinearQLinear.Operations*~@+~@~*~@~+@~+~@~-~@quaalude Essentials$$>@&?*>@."@/=@<@<$@<$>@<&>?<*@<**>@<*>@<<<?<=@<=<?<>@=<<?==@>@>=@>=>?>>=?>>>?quackData.Uri.Quack.="@quantfinQuant.VectorOps *."@+."@-."@.*"@.*."@.+"@.+."@.-"@.-."@./"@./."@/."@ queryparserDatabase.Sql.Position?<>@ queuelikeData.Queue.Class:->"@ quibble-coreDatabase.Quibble&?.&&./="@.=="@.||?quick-generatorTesting.QuickGenerator.++"@.|"@?*"@??*"@quickcheck-assertionsTest.QuickCheck.Assertions/=?"@<=?"@=?"@>?"@?/="@?<"@?<="@?=="@?>"@?>="@?~=="@~==?"@quickcheck-dynamic%Test.QuickCheck.DynamicLogic.Internal|||"@Test.QuickCheck.StateModel:=@:==@quickcheck-higherorderTest.QuickCheck.HigherOrder:->?:=:@:==>@=?@+Test.QuickCheck.HigherOrder.Internal.TestEq=?@-Test.QuickCheck.HigherOrder.Internal.Testable:=:@:==>@quickcheck-propertiesTest.QuickCheck.Property.Common.&&."@.==."@.||."@$quickcheck-state-machine-distributed StateMachine!"@?"@quickcheck-with-counterexamplesTest.QuickCheck.Counterexamples:&:@=/=@===@==>><"@ quickpullQuickpull.EqShow==="@Quickpull.Formatting<+>"@ quickspec QuickSpec:-"@=~=@QuickSpec.Internal.Term:$:"@QuickSpec.Internal.Typeapply"@quipperQuipper.&&.@./=.@.==.@ controlled@Quipper.Generic.&&.@./=.@.==.@ Quipper.Monad controlled@ quipper-coreQuipper.&&.@./=.@.==.@ controlled@Quipper.Generic.&&.@./=.@.==.@ Quipper.Monad controlled@quiverControl.Quiver+>->>"@+>>->"@>&>"@>->>"@>->>+"@>>->"@>>->+"@Control.Quiver.SP>:>"@>>!"@>>?"@ radix-tree Data.Radix1Tree.Word8.Key.Unsafe:/"@raftData.Tuple.Util$$"@ Math.Monad *?"@+?"@-?"@/?"@?*"@?*?"@?+"@?+?"@?-"@?-?"@?/"@?/?"@ral Data.RAList!"@!?"@Data.RAList.NonEmpty!"@!?"@ Data.RAVec!"@Data.RAVec.NonEmpty!"@Data.RAVec.Tree!"@Data.RAVec.Tree.DF!"@ralist Data.RAList!!"@++@:|@Cons@cons@elem@notElem@Data.RAList.Co!!"@++@:.@:|@Cons@RCons@cons@elem@rallodRallod==>"@ramus Ramus.Signal<~@~>@~~@range Data.Range*=*"@*=+"@+=*"@+=+"@ Data.Ranges*=*"@*=+"@+=*"@+=+"@range-set-listData.RangeSet.IntMap\\"@Data.RangeSet.List\\"@Data.RangeSet.Map\\"@ ranged-listData.List.Length+++@++.@++.+@++..@:+@:.@Data.List.Range +++@++.@++.+@++..@.:++@.:..@:+@:++@:.@:..@ rank2classesRank2$<$>@<*>@~> ratio-int Data.RatioInt%"@ raven-haskellSystem.Log.Raven.Interfaces.=:"@ raw-feldsparFeldspar:+@<$@<$!>@<=<?=<<?>=>?>>?>>=?Feldspar.Data.Array:>@Feldspar.Data.Vector++"@...@Feldspar.Frontend!"@&&@.&.@.<<. @.>>. @.|.@/=@<@<=@==@>@>=@??shiftL @shiftR @xor@||@⊕"@ rawfilepathData.ByteString.RawFilePath!?"@cons@snoc@ RawFilePath setStderr@setStdin@ setStdout@RawFilePath.Process setStderr@setStdin@ setStdout@razData.Raz.Core.Sequence!?"@Data.Raz.Sequence.Internal:<"@<|"@><"@?!"@|>"@rdioh Rdioh.Util<+>"@rds-data-codecsData.RdsData.Internal.Aeson.=! @.=? @ react-fluxReact.Flux.Internal&="@React.Flux.PropertiesAndEvents$="@&="@@="@ react-haskellReact.Rebindable>>"@reactive-baconReactive.Bacon.Core==>"@>>=!"@Reactive.Bacon.EventStream===>"@reactive-bananaReactive.Banana.Combinators<@@<@>@@>@reactive-banana-automationReactive.Banana.Automation=:"@reactive-banana-bunch!Reactive.Banana.Bunch.Combinators<@>@reactive-banana-wxReactive.Banana.WX:=="@ reader-soupControl.Monad.ReaderSoup:&@=: @reasonable-lensControl.Lens.Getter^."@Control.Lens.Setter %="@%~"@&"@*="@*~"@+="@+~"@-="@-~"@.="@.~"@//="@/~"@rebaseRebase.Preludew!!"@!<<. @!>>. @#."@$$!$!!$<@$>@%@&?&&@&&&@*@** @***@*>@+@++@+++@-@-<-?-<<?->-?."@.# @.&.@.<<. @.>@.>>@.>>. @.^.@.|.@/@/=@:+@:->:|@:~:@:~~:@<@@<$@<$!!>@<$!>@<$>@<&&>"@<&>?<*@<**>@<*.>@<*>@<*?@<+>@<.@<.*>@<..>@<.>@<<$>>@<<.@<<..>>@<<.>>@<<<?<<=?<<^?<=@<=<?<>@<@@<@>@<@@>@<|>@<||>"@=<<?=<=?==@=>=?=>>?>@>$@>$$<@>$<@>=@>=>?>>?>>-?>>=?>>>?>>^?@>@Compose"@\\@^ @^<<?^>>?^^ @deepseqdiv@elem@ hashWithSaltmod@notElem@onparpseqquot@rem@rotate @rotateL @rotateR @seqshift @shiftL @shiftR @xor@||@|||@~@~~@rec-defData.Recursive.Bool&&"@||"@Data.Recursive.DualBool&&"@||"@rec-smallarrayData.Rec.SmallArray++@/++/"@/~/"@:++:@:~:@<#>@~>records Data.Record:&"@:="@Data.Record.Combinators!!!"@///"@<<*>>"@\\\"@recursion-schemes-ix Data.IComonad~~>@Data.IFunction~~>@ Data.IFunctor~~>@Data.IFunctor.Foldable::<@~~>@Data.IFunctor.ICofree::<@ Data.IMonad~~>@ redis-respData.Redis.Command:|"@ redis-schemaDatabase.Redis.Schema:*:@:.@:/@ referencesControl.Reference.Combinators&@&+&@&|&@Control.Reference.Operators !-@!=@!|@!~@.-@.=@.~@^.@^?@refinedRefined&&@||@refined-containers Data.HashMap.Refined!"@Data.HashMap.Strict.Refined!"@Data.HashSet.Refined:->?Data.IntMap.Refined!"@Data.IntMap.Strict.Refined!"@Data.IntSet.Refined:->?Data.Map.Refined!"@Data.Map.Strict.Refined!"@Data.Set.Refined:->?refined1Refined&&@||@refineryRefinery.Tactic<%>@<@>"@reflex Reflex.Class<@@<@>@Reflex.DynamicHCons@reflex-dom-coreReflex.Dom.Class=:@Reflex.Dom.Widget.Input&?.~@ reflex-gi-gtk Reflex.GI.Gtk:==:==>:~~:~~>Reflex.GI.Gtk.Output:==:==>:~~:~~> reflex-sdl2 Reflex.SDL2!!*@!!/@!*@!*!@!+!@!-!@#."@$*$=@$=!@$~@$~!@*!@*!!@*^@.#"@.+^@.-.@.-^@^*@^+^@^-^@^/@reflex-transformers Reflex.Monad:>>"@>->"@reformControl.Applicative.Indexed*>>@<<$>>@<<*@<<**>>"@<<*>>@Text.Reform.Core++>@<++@reg-alloc-graph-colorRegAlloc.Nodes∈"@RegAlloc.UGraph!"@∈"@RegAlloc.UGraph.Private!"@regexText.RE.Replace!$"@!$$"@!$$?"@!$?"@ Text.RE.TDFA*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.TDFA.ByteString*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.TDFA.ByteString.Lazy*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.TDFA.Sequence*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.TDFA.String*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.TDFA.Text*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.TDFA.Text.Lazy*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@regex-applicativeText.Regex.Applicative=~@regex-applicative-textText.Regex.Applicative.Text=~"@regex-doText.Regex.Do.Match.Latin~*"@~?"@Text.Regex.Do.Match.Utf8~*"@~?"@Text.Regex.Do.Replace.Template<"@>"@Text.Regex.Do.Split-/"@/"@/-"@ regex-pcreText.Regex.PCRE=~"@=~~"@Text.Regex.PCRE.Wrap=~"@=~~"@regex-pcre-builtinText.Regex.PCRE=~"@=~~"@Text.Regex.PCRE.Wrap=~"@=~~"@ regex-posixText.Regex.Posix=~"@=~~"@Text.Regex.Posix.Wrap=~"@=~~"@ regex-tdfaData.IntMap.CharMap2!"@\\"@Data.IntMap.EnumMap2!"@\\"@Data.IntSet.EnumSet2\\"@Text.Regex.TDFA=~"@=~~"@ regex-tdfa-rcData.IntMap.CharMap2!"@\\"@Data.IntMap.EnumMap2!"@\\"@Data.IntSet.EnumSet2\\"@Text.Regex.TDFA=~"@=~~"@regex-with-pcre Text.RE.PCRE*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.PCRE.ByteString*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.PCRE.ByteString.Lazy*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.PCRE.Sequence*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.PCRE.String*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.PCRE.Text*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@Text.RE.PCRE.Text.Lazy*=~"@*=~/"@=~"@=~~"@?=~"@?=~/"@ regexcharRegExChar.ExtendedRegExChar+~@/~@=~@RegExChar.RegExOptsChar=~@regexdot RegExDot.BracketExpressionMember=~@RegExDot.ConsumptionProfile<>@|+|@ RegExDot.DSL #->#:@#->#?:@#->:@#->?:@#:@*:@*?:@+:@+?:@-:@<~>@?:@??:@RegExDot.RegEx+~@.*"@.*?"@/~@=~@RegExDot.Repeatable^#@^#->@^#->#@^#->#?@^#->?@registryData.Registry.Registry+:@<+@<+>@<:@registry-hedgehogTest.Tasty.Hedgehogx/=="@==="@registry-options$Data.Registry.Options.DisplayHelpBox<:>"@regression-simpleMath.Regression.Simple.LinAlgadd@mult@regularGenerics.Regular.Base:*:"@Generics.Regular.Functions.Fold&"@rel8Rel8$*@$+@$?@&&.@/=.@/=:@/=?@<.@<:@<=.@<=:@<=?@<>.@:@==.@==:@==?@>.@>:@>=.@>=:@>=?@>?@over?||.@Rel8.Expr.Text!~@!~*@++.@~*@~.@ Rel8.Tabulatethrough?relacion Data.Relacion<$|"@<|"@|$>"@|>"@relation Data.Relation<-<"@>->"@Data.Relation.Ops<$|"@<|"@|$>"@|>"@relational-query Database.Relational<-#@over @Database.Relational.Arrow:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@#Database.Relational.Monad.Aggregateover @)Database.Relational.Monad.Trans.Assigning<-#@Database.Relational.Pi<.> @ @ @Database.Relational.Pi.Unsafe<.> @ @ @Database.Relational.Projectable! @!?? @.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@in'@like@like'@ likeMaybe@ likeMaybe'@or'@Database.Relational.Sequence$$"@$$!"@Database.Relational.Setexcept@except'@ exceptAll@ exceptAll'@full @full' @inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @on' @right @right' @union@union'@unionAll@ unionAll'@relational-record!Database.Relational.Documentation&! @.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><??! @?!? @?+?@and'@except@full @in'@inner @ intersect @left @left' @like@like'@on' @or'@over @right @union@union'@|$|"@|*|"@relational-record-examples!Database.Relational.Query.SQLite3:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@relational-schemasDatabase.Custom.IBMDB2:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@Database.Custom.MySQL:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@Database.Custom.Oracle:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@Database.Custom.PostgreSQL:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@Database.Custom.SQLServer:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@Database.Custom.SQLite3:! @!?? @$$"@$$!"@.*.@.+.@.-.@./.@.<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<-#@<.> @ @ @><?? @?! @?!? @?*?@?+?@?-?@?/?@?? @?||?@and'@except@except'@ exceptAll@ exceptAll'@full @full' @in'@inner @inner' @ intersect @ intersect' @ intersectAll @ intersectAll' @left @left' @like@like'@ likeMaybe@ likeMaybe'@on' @or'@over @right @right' @union@union'@unionAll@ unionAll'@reludeRelude.Applicative*>@<*@<**>@<*>@<|>@ Relude.Base $!/=@<@<=@==@>@>=@seq~@Relude.Bool.Guard&&^"@||^"@Relude.Bool.Reexport&&@||@Relude.Container.Reexport hashWithSaltRelude.DeepSeq$!!deepseqRelude.Extra.Lens%~@.~@^. @Relude.Extra.Map!?"@Relude.Extra.Newtype#."@Relude.Extra.Type++@Relude.Function$&?&&&@."@<<<?>>>?onRelude.Functor.Fmap<&>?<<$>>@??@Relude.Functor.Reexport$<@$>@<$@<$>@>$@>$$<@>$<@Compose"@ Relude.List!!?"@Relude.List.NonEmpty:|@Relude.List.Reexport++@Relude.Monad.Maybe?:Relude.Monad.Reexport<$!>@<=<?=<<?>=>?>>?>>=? Relude.Monoid<>@Relude.Numeric *@** @+@-@/@^ @^^ @div@mod@quot@rem@xor@ Relude.Unsafe!!"@repaData.Array.Repa!"@*^@++"@+^@-^@/^@Data.Array.Repa.Index:.@$Data.Array.Repa.Operators.IndexSpace++"@!Data.Array.Repa.Operators.Mapping*^@+^@-^@/^@Data.Array.Repa.ShapedeepSeq repa-arrayData.Repa.Array!"@Data.Repa.Array.Auto!"@Data.Repa.Array.Generic!"@Data.Repa.Array.Generic.Index:."@ repa-convertData.Repa.Convert.Formats:*:"@ repa-scalarData.Repa.Scalar.Product:*:"@repr Prelude.Repr^"@^^"@ Text.Repr"@ reprojectData.Reproject@@@reqNetwork.HTTP.Req/:@/~@=:@rereRERE>>>=@\/@ RERE.Type>>>=@\/@ rerefinedRerefined.Predicates.Operators.!"@.!&@.!=@.!|@.&&@.->@./=@.<@.<->@.<=@.==@.>@.>=@.||@rerouteWeb.Routing.Combinators"@Web.Routing.SafeRouting"@resolv Network.DNS:.:@respondWeb.Respond.Path"@ rest-coreRest.Api------/"@-----/ @----/@---/@--/@-/@ Rest.Error>|<@mapE @ rest-rewriteArith<#"@DSL#*"@#+"@#-"@.+?<~>~>Set/\"@\/"@ rethinkdbDatabase.RethinkDB!"@!?"@# @&&@*@+@-@/@/=@<@<=@==@>@>=@||@Database.RethinkDB.Datum.:"@.:?"@.="@Database.RethinkDB.Functions!"@!?"@# @&&@*@+@-@/@/=@<@<=@==@>@>=@||@Database.RethinkDB.ReQL?:="@rethinkdb-client-driverDatabase.RethinkDB.:"@.:?"@.="@rethinkdb-wereHamsterDatabase.RethinkDB!"@!!"@#"@&&"@*"@+"@++"@-"@."@/"@/="@:="@<"@<="@=="@=~"@>"@>="@\\"@||"@Database.RethinkDB.Functions!"@!!"@#"@&&"@*"@+"@++"@-"@."@/"@/="@<"@<="@=="@=~"@>"@>="@\\"@||"@Database.RethinkDB.ReQL:="@retrie Retrie.SYB:~:@:~~:@retroclash-libRetroClash.CPU.:=@RetroClash.Utils!!."@.!!"@.!!."@./=@.<@.<=@.<|@.<|.@.<|>.@.==@.>@.>=@.|>.@/=.@<=.@==.@|>.@ reverse-applyControl.Apply.Reverse&"@&!"@<&>"@ rewriting Generics.Regular.Rewriting.Rules:~>"@rhine FRP.Rhine&&&&@&-&@***@****"@*-*@*^"@+++@++++"@+@+@-->?<+>@<-<@<<<?<<^?>--@>--^"@>->@>>-^@>>>?>>>^"@>>^?@>-^"@@>>^"@@@@^+^@^-->"@^->>?^->@"@^-^@^/"@^<<?^>>?^>>>"@^>>@"@dot@|@|@|||@||||"@FRP.Rhine.ClSF.Util<-<@>->@"FRP.Rhine.Reactimation.Combinators +@+@-->?>--@@>-^"@@>>^"@@@@^->@"@^>>@"@|@|@FRP.Rhine.ResamplingBuffer.Util&-&@*-*@>>-^@^->>?FRP.Rhine.SN.Combinators****"@++++"@>--^"@>>>^"@^-->"@^>>>"@||||"@riakNetwork.Riak.CRDT.Types-/@:|@ mapUpdate@ribbitDatabase.Ribbit:>@And @As"@Equals"@From@Gt"@Gte"@LeftJoin @Lt"@Lte"@ NotEquals"@On@Or@Where@ribosomeRibosome@ringsData.Semifield/@\\@^^ @Data.Semimodule*.@.*@./@.\@/.@\.@ lscaleDef@ rscaleDef@Data.Semimodule.Combinator !#@!*@!*!@#!@#.@*!@*.@.#@.#.@.*@.*.@inner@Data.Semimodule.Free !#@!#!@!*@!*!@#!@*!@comult@runCov@runVec@ Data.Semiring*@**@+@++?-@<<@^ @rioRIO%~@.~@^. @^.. @^? @RIO.ByteStringcons@snoc@RIO.ByteString.Lazycons@cons'@snoc@ RIO.FilePath-<.>@<.>@@RIO.HashMap.Partial!"@RIO.Lensfailing@RIO.List++@\\@elem@notElem@RIO.List.Partial!!"@RIO.Map!?"@\\"@RIO.Map.Partial!"@ RIO.NonEmpty:|@<|@RIO.NonEmpty.Partial!!"@ RIO.Prelude/$$!$!!$>@&?&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<&>?<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@RIO.Prelude.Types:|@RIO.Seq!?"@:<@:<|@:>@:|>@<|@><@|>@RIO.Set\\"@RIO.Textcons@ RIO.Text.Lazycons@ RIO.Vector!?"@++@elem@notElem@RIO.Vector.Boxed!?"@++@elem@notElem@RIO.Vector.Boxed.Partial!"@//"@RIO.Vector.Partial!"@//"@RIO.Vector.Storable!?"@++@elem@notElem@RIO.Vector.Storable.Partial!"@//"@RIO.Vector.Unboxed!?"@++@elem@notElem@RIO.Vector.Unboxed.Partial!"@//"@rio-prettyprintRIO.PrettyPrint<+>"@ Text.PrettyPrint.Leijen.Extended<+>"@ risk-weaverRiskWeaver.Cmd.BDD!!!"@riversData.Rivers.Idiom<>"@Data.Rivers.Streams<<|"@<||"@|!|"@|~|"@rleData.RLE++"@:><@rmonadControl.RMonad<=<"@=<<"@>=>"@>>"@>>="@ron RON.Prelude'!!"@$$>@%@&?&&@*@*>@+@++@-@."@/@/=@:|@<@<$@<$>@<&>?<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=??:^ @^^ @elem@mod@on||@RON.Semilattice≼"@ropeData.Rope.Annotated:*:"@Data.Rope.Annotation.Product:*:"@rope-utf16-splayData.SplayTree<|@|>@ rose-treesData.Tree.Rose@->"@roundedNumeric.Rounded !*!@!+!@!-!@!/!@!/=!@!!@!>=!@.*.@.+.@.-.@Numeric.Rounded.Interval+/-@..."@/=!"@/=?"@!"@>=!"@>=?"@>?"@ rounded-hw'Numeric.Rounded.Hardware.Interval.Classdisjoint@ equalAsSet@interior@precedes@ strictLess@strictPrecedes@subset@ weaklyLess@ roundtrip Control.Isomorphism.Partial.Prim***"@<$>@|||"@Text.Roundtrip.Classes<*>@<|>@<||>@Text.Roundtrip.Combinators*>@<*@<+>@route-planningData.Geo.Route.Comment"@Data.Geo.Route.Description<~>"@Data.Geo.Route.Elevation<^>"@Data.Geo.Route.Name<.>"@Data.Geo.Route.Symbol<@>"@Data.Geo.Route.Track--|"@-|"@..|"@.|"@|--|"@|-|"@|..|"@|.|"@Data.Geo.Route.TrackHeader<..>"@<..^"@Data.Geo.Route.Waypoint-.-"@.<.>"@<%>"@<.?>"@~<.>"@ row-typesData.Row .!@.+@.-@.//@.==@.\@.\/@.\\@:+@:==@≈@Data.Row.Dictionaries:-"@\\?Data.Row.Internal .!@.+@.-@.//@.==@.\@.\/@.\\@:->"@≈@Data.Row.Records .!@.$@.+@.-@.//@.==@.\@:+@:==@≈@Data.Row.Variants.!@.+@.-@.==@.\@.\/@.\\@≈@rowdyRowdy//@/:@ rowdy-yesod Rowdy.Yesod! @/! @//@/:@rp-tree Data.RPTree.*"@^+^"@^-^"@rpmSystem.Rpm.Combinators.&&."@./=."@.<."@.<=."@.==."@.>."@.>=."@.||."@ rrb-vectorData.RRBVector!"@!?"@<|@><@|>@ rsagl-frpRSAGL.FRP.Message<<*>>"@rstreamRStream!!"@!?"@++@elem@notElem@rtcm Data.RTCM3<<>>"@ rtorrent-rpcNetwork.RTorrent.Action<+>"@!Network.RTorrent.Action.Internals<+>"@Network.RTorrent.Command:*:"@"Network.RTorrent.Command.Internals:*:"@Network.RTorrent.CommandList:*:"@<+>"@ruffFractal.RUFF.Types.Complex:+"@Fractal.RUFF.Types.Ratio%"@%!"@:%"@ruin Data.Ruin<@@rmap@rmapA@rsplat@rsplatA@Data.Ruin.Core<@@ Data.Ruin.RrmapAR@rmapR@rsplatAR@rsplatR@s-cargotData.SCargot.Repr.Basic:::@ safe-json Data.SafeJSON.:$"@.:$!"@.:$?"@.=$"@Data.SafeJSON.Test<=??>=?? safe-lazy-ioSystem.IO.Lazy.Input.Extra!>>="@=<<"@Text.Printf.Safe.Core:%"@:-"@:<>"@ safe-tensor Math.Tensor.*@.+@.-"@.°@Math.Tensor.Safe&*@&+@&-@safepath Data.Path-<.>"@<.>"@"@Data.Path.Internal-<.>"@<.>"@"@ sai-shape-sybSAI.Data.Generics.Shape.SYB~~"@salakSalak.?:@.?=@:|:@saltineCrypto.Saltine.Internal.Util!&&!"@!||!"@salviaNetwork.Salvia.Interface&"@salvia-protocolNetwork.Protocol.Uri/+"@Network.Protocol.Uri.Path/+"@sandwichTest.Sandwich.Internal:>"@Test.Sandwich.Misc:>"@sandwich-slack'Test.Sandwich.Formatters.Slack.Internal??@sarifData.Aeson.Optional.!="@.:"@.:!"@.:?"@.= @.=? @"@ sat-simpleControl.Monad.SAT-->"@/\@<->"@\/@satchmo Satchmo.Array!"@Satchmo.Boolean&&"@||"@Satchmo.Map.Data!"@Satchmo.Relation.Data!"@satyrosSatyros.QFIDL.Expressible::<=?"@::<>?"@::=?"@::>?"@sayable Text.Sayable&!@&!$*@&!*@&!:*@&!??&%?&*?&+?&+*?&+??&-?&:*@&<?&<*?&>"@sbv Data.SBV#@.&&@./=@./==@.<@.<+>@.<=@.<=>?.==@.===@.=>?.>@.>=@.^ @.||@.~&@.~|@===@Data.SBV.Control|->?Data.SBV.Internals #@.&&@./=@./==@.<+>@.<=>?.==@.===@.=>?.||@.~&@.~|@ Data.SBV.List!!"@++@.:@Data.SBV.Rational.%@ Data.SBV.Set\\"@Data.SBV.String!!"@++@.:@Data.SBV.Tools.Overflow*!@+!@-!@/!@Data.SBV.Trans#@.&&@./=@./==@.<@.<+>@.<=@.<=>?.==@.===@.=>?.>@.>=@.^ @.||@.~&@.~|@===@Data.SBV.Trans.Control|->?Data.SBV.Tuple^. @scalpelText.HTML.Scalpel//@@:"@@=@@=~@atDepth@ scalpel-coreText.HTML.Scalpel.Core//@@:"@@=@@=~@atDepth@scanf Text.Scanf%"@:+"@Text.Scanf.Internal%"@:+"@scc#Control.Concurrent.SCC.Configurable&&"@..."@>&"@>->"@>|"@||"@Control.Concurrent.SCC.Parallel&&"@..."@>&"@>->"@>|"@||"@!Control.Concurrent.SCC.Sequential&&"@..."@>&"@>->"@>|"@||"@ scenegraphGraphics.SceneGraph.Basic<+>@<->"@"@scheduleData.Rsv.RMMap!"@schemasSchemas.Internal<.> @scholdocText.Pandoc.Pretty$$"@$+$"@<+>"@<>"@scholdoc-citeprocText.CSL.Eval.Names<++>"@<+>"@scholdoc-typesText.Pandoc.Builder<>"@ sci-ratio Data.SciRatio.^"@^!"@^^!"@science-constants-dimensional%Science.Constants.Dimensional.Private~~ scyther-proofText.PrettyPrint.Class$$"@$-$"@$--$"@<->"@<>"@sdl2SDL$=@$=!@$~@$~!@sdp SDP.Comparing<=>@ SDP.Estimate./=@./=.@.<@.<.@.<=@.<=.@.==@.==.@.>@.>.@.>=@.>=.@/=.@<.@<.=>@<=.@<=.>@<==>@==.@>.@>=.@ SDP.Finite:&"@ SDP.Linear!^"@++@:<@:>@except @filter @ SDP.LinearM!#>@SDP.Map!"@!?"@*$"@.!"@.$"@//"@SDP.MapM!>@!?>@*?"@.?"@>!@ SDP.Ratio:%@SDP.SafePrelude +?"@...<=<<"@>>=<<"@>>=>"@???+ @?- @?:"@?^?SDP.Set/?\"@/\"@\+/"@\/"@\?/"@\\"@\^/"@ SDP.Shaped!!"@ SDP.Unboxed!#"@!>#"@sdp-io Data.FilePath:.@:..@:/@://@seakaleDatabase.Seakale.Store&&.@/=#@/=.@/=~@<#@<.@<=#@<=.@<=~@<~@=."@==#@==.@==~@>#@>.@>=#@>=.@>=~@>~@||.@Database.Seakale.Types<:>@<:|@seakale-postgresqlDatabase.Seakale.PostgreSQL<:>@<:|@seldaDatabase.Selda!"@$=@&&=@*=@+=@-=@.&&@./=@.<@.<$>@.<=@.==@.>@.>=@.||@:*:?:+?:-:=@<>@?"@from@isIn@like@suchThat@||=@Database.Selda.Nullable ?!"@?*@?+@?-@?/@?/=@?<@?<=@?==@?>@?>=@ selda-jsonDatabase.Selda.JSON~> @selda-postgresqlDatabase.Selda.PostgreSQLauth@on@ selectiveControl.Selective<&&>"@<*?@<||>"@Control.Selective.Multi~>@seleniumTest.Selenium.Interactive$$"@Test.Selenium.Pretty<&>"@<:>"@<=>"@"@semi-isoControl.Category.Structures***"@+++"@/+/"@Control.SIArrow#<<"@#>>"@*/"@/$/"@/$~"@/*"@/*/"@/?/"@<<#"@<<^"@>>#"@>>^"@^<<"@^>>"@semibounded-latticesAlgebra.SemiBoundedLattice-->"@//\"@/\\"@\\\"@semigroupoid-extrasData.Semifunctor#"@ semigroupoidsData.Bifunctor.Apply.>>@<<$>>@<<.@<<..>>@<<.>>@Data.Functor.Alt@Data.Functor.Apply $>@.>@<$@<$>@<*.>@<.@<.*>@<..>@<.>@Data.Functor.Bind $>@-<-?-<<?->-?.>@<$@<$>@<.@<..>@<.>@>>-?Data.Functor.Bind.Class .>@.>>@<*.>@<.@<.*>@<.>@<<.@<<.>>@>>-?Semigroupoids.Do*>"@<*"@<*>"@>>"@>>="@semigroupoids-doSemigroupoids.Do<*>"@>>"@>>="@semigroupoids-syntaxData.Functor.Apply.Syntax>>"@Data.Functor.Bind.Syntax>>="@ semilatticesData.Semilattice.Join\/@Data.Semilattice.Meet/\@ semiring-num Data.Semiring<+>@<.>@semiring-simple Data.Semiring<+>"@<.>"@ semiringsData.Euclideandivide@quot@rem@ Data.Field/@divide@ Data.Semiring*@+@-@^ @minus@plus@times@ semver-range Data.SemVerAnd@Eq@Geq@Gt@Leq@Lt@Or@matches@ separatedData.Separated+-"@+:"@-+"@-:"@<++>"@seqlocBio.SeqLoc.ShiftedVector!?"@//"@seqnData.Seqn.Internal.MSeq!"@!?"@Data.Seqn.Internal.MTree<<>@<>>@Data.Seqn.Internal.Seq!"@!?"@Data.Seqn.Internal.Util#."@Data.Seqn.MSeq!"@!?"@ Data.Seqn.Seq!"@!?"@sequence Data.Sequence.FastQueue.Internal:>@Data.Sequence.Queue.Internal:*"@Data.SequenceClass:<"@:>"@<|@><@|>@ sequent-coreLanguage.SequentCore.Syntax=~="@ serokell-utilSerokell.Util.Lens%%=@%?=@ serpentine Serpentine:&"@servServ.Api:>"@serv-waiServ.Wai.Prelude&"@ Serv.Wai.Rec++"@:&"@<+>"@=:"@servant Servant.API:-:<|>@:>@Servant.API.Alternative:<|>@Servant.API.Generic:-Servant.API.Sub:>@servant-benchmarkServant.Benchmark:>:"@:|:@Servant.Benchmark.Generator:>:"@:|:@servant-checked-exceptions-core)Servant.Checked.Exceptions.Internal.Prism<>~@ servant-cliServant.CLI.Internal.PStruct##:>@#:>@$:>@%:>@?:>@branch@note@servant-client-coreServant.Client.Core.HasClient//?/:@Servant.Client.Core.Reexport//?/:@ servant-jsServant.JS.Internal:<|>@:>@ servant-namedServant.API.Named:="@servant-quickcheckServant.QuickCheck<%>@&Servant.QuickCheck.Internal.Predicates<%>@servant-serverServant.Server.++"@:.@Servant.Server.Internal.Context.++"@:.@ servant-snapServant.Server.Internal.Context:.@ servant-util'Servant.Util.Combinators.ErrorResponses$@/Servant.Util.Combinators.Filtering.Construction ?/?/<?/<=?/=?/>?/>=?/~"@ textContains textIContains textILiketextLikeServant.Util.Common.HList.*.@HCons@Servant.Util.Common.PolyKinds&&@==@||@servant-validateServant.Validate.Internal:<@sessionsControl.Concurrent.Session.="@=~="@~>"@~|||~"@~||~"@~|~"@&Control.Concurrent.Session.Base.SMonad~>>"@~>>="@'Control.Concurrent.Session.Interleaving"@"@Control.Concurrent.Session.Pid=~="@~|||~"@"Control.Concurrent.Session.Runtime~||~"@&Control.Concurrent.Session.SessionType~>"@~|~"@+Control.Concurrent.Session.SessionTypeMonad.="@~|~"@ Control.Concurrent.Session.Types=~="@ sessiontypesControl.SessionTypes:!>"@:*:"@:?>"@<&?<&>@Control.SessionTypes.Indexed<*>"@>>"@>>="@!Control.SessionTypes.MonadSession<&?<&>@Control.SessionTypes.Types:!>"@:*:"@:?>"@ set-coverMath.SetCover.Bit.&.@.|.@ set-monadData.Set.Monad\\"@set-of Data.Set.Of+@set-with Data.SetWith\\"@setoid Data.Setoid=~=@\\@∪"@setops Data.SetOps∅"@∩"@∪"@setsData.Set.Class\\"@Data.Set.Ordered.Many\\"@Data.Set.Ordered.Many.With\\"@Data.Set.Ordered.Unique.Finite\\"@Data.Set.Ordered.Unique.With\\"@Data.Set.Unordered.Many\\"@Data.Set.Unordered.Unique\\"@ sexp-grammarLanguage.Sexp.Located:<"@Compose"@Language.SexpGrammar.:@.:?@:-@<<<?>>>? sexpressoData.SExpresso.SExpr:::@ shady-gen Shady.Complex:+"@Shady.Language.Exp/=^"@:^"@<+>"@==^"@Shady.Language.GLSL=:"@=::"@Shady.Language.Glom:*"@Shady.Language.Type#"@:*:"@:->:"@=--="@=-="@=:="@==="@ Shady.Misc>+>"@ Shady.Vec:<"@<+>"@Text.PrettyPrint.Leijen.DocExpr$$"@shady-graphicsShady.ITransform*:"@shakeDevelopment.Shake%>?&%>?&?>?@?=="@?>?|%>?~>?Development.Shake.Classes/=@==@ hashWithSaltDevelopment.Shake.FilePath-<.>@<.>@@shake-language-c'Development.Shake.Language.C.BuildFlags>>>="@ shake-pathDevelopment.Shake.Path$%>"@$&%>"@ shake-plus Development.Shake.Plus.FileRules%>"@|%>"@shake-plus-extended)Development.Shake.Plus.Extended.FileRules%^>"@/%>"@/|%>"@|%^>"@shakersDevelopment.Shakers8!!"@$$!%>?&%>?&&@&&&@&*>?&?>?*"@**"@***@**>?*>?*>>?+"@++@-"@."@/"@/="@<"@<$"@<$!>@<$>@<*"@<*>"@<->"@<.>@@@<:>"@<="@<=<?<=>"@<>@<|>@=<<?=="@>"@>="@>=>?>>"@>>="@?=="@?>??>>?\\@^ @^^ @notElem@on|%>?|*>?||@~>?shanaSystem.Shana.Utils-"@."@<"@<|>"@>"@^"@she ShePrelude:$#$#$#:"@ shell-conduitData.Conduit.Shell$|Data.Conduit.Shell.Process$| shell-monadControl.Monad.Shell &"@-&&-"@-|-"@-||-"@<&"@>&"@|<"@|>"@|>>"@shellishShellish#"@<$$>"@<$>"@<.>"@"@ shellmate Control.Shell<$!>@<=<?=<<?>=>?>>?>>=?|>@shellmetShellmet$?@$^@$|@shellyShelly-|-"@<$>@<.>"@"@ Shelly.Lifted-|-"@<$>@<.>"@"@ Shelly.Pipe-|-"@<$>@<.>"@"@shhShh&!>"@&>"@<<<"@<|?>>>"@|!>?|>? Shh.Internal&!>"@&>"@<<<"@<|?>>>"@|!>?|>?shikensuShikensu.Utilities!~>"@~>"@shineGraphics.Shine.Picture<>@ shivers-cfgCommon↦"@ short-vecData.Vec.Short!"@++@Data.Vec.Short.Explicit!"@++@Data.Vec.Short.Internal!"@++@shortbytestringData.ByteString.Short!?"@cons@snoc@Data.ByteString.Short.Word16!?"@cons@snoc@ shortcircuitControl.Shortcircuit&&"@??"@||"@show-combinatorsText.Show.Combinators&|?.=. @@|@ appendFields?showApp@shpiderNetwork.Shpider.Pairs=:"@shwiftyShwifty&@ si-timers Control.Monad.Class.MonadTime.SIaddTime"@sibe Numeric.Sibe:-"@sieve Data.Sieve++?"@siffletGraphics.UI.Sifflet.LittleGtk::="@::~"@:="@:=>"@:~"@:~>"@ sifflet-libGraphics.UI.Sifflet.LittleGtk::="@::~"@:="@:=>"@:~"@:~>"@signableData.Signable.Import:$$!"@$!!$>@%@%~"@&?&&@&&&@*@** @*>@+@++@-@."@..."@.~"@/@/=@:%"@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>"@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=??:"@Compose"@^ @^%^"@^."@^.."@^?"@^^ @^^%^^"@div@mod@onquot@rem@xor@||@ silkscreen Silkscreen<+>@@ simple-actorsControl.Concurrent.Actors<->"@<.|>"@simple-affine-spaceData.AffineSpace.+^@.-.@.-^@Data.VectorSpace*^"@^+^@^-^@^/"@dot@ simple-cmd SimpleCmd+-+@simple-cmd-args SimpleCmdArgs<|>@simple-conduitConduit.Simple$$$=?=$@=$=@Conduit.Simple.Compat$$$=?=$@=$=@ simple-cssSimpleCss.Tricks.Layouts^-"@^|"@simple-enumerationData.Enumeration<+>"@><"@Data.Enumeration.Invertible<+>"@><"@ simple-loggerControl.Logger.Simple<>@ simple-money Data.Money^*"@^+^"@^-^"@^/"@ simple-nixNix.Expr=$="@ simple-pascalLanguage.Pascal.Types#"@ simple-pipe Data.Pipe++++"@=$="@=@="@||||"@simple-reflectDebug.SimpleReflect.Vars@@"@⊕@⊗@ simple-rope Data.Rope.<"@<>"@>."@ simple-ui Simple.UI.All.=@^. @ simple-units Units.Simple.*@.+@.-@./@ simple-vec3 Data.Vec3.* @.^"@<+>@<->@>< @Data.Vec3.Class.* @.^"@<+>@<->@>< @ simplelru Data.Cache<|"@|>"@Data.LRUCache.IO-|>"@<|-"@ simplepreludePrelude !!"@$"@$!"@&&"@++"@."@=<<"@>>"@>>="@||"@ simplexmqSimplex.Messaging.Util<$$>@<$?>@simplistic-genericsGenerics.Simplistic:***:@:**:@:*:@:+:@:.:@Generics.Simplistic.Util&&&@***@:*:@<.> @sindre Sindre.KeyVal<$$>@<$?>@<|?>?<||>? singleraehSingleraeh.Natural%*@%+@%-@ singlethongs Singlethongs:~:@singleton-dictData.Type.Dict!?"@%:!?"@ singletonsData.Singletons@@"@@@@#@$"@@@@#@$$"@@@@#@$$$"@~>~>@#@$~>@#@$$~>@#@$$$Data.Singletons.Decide%~@:~:@Data.Singletons.Sigma:%&:@:&:@singletons-baseControl.Applicative.Singletons#%*>@%<$@%<$>@%<*@%<**>@%<*>@%<|>@*>@*>@#@$@*>@#@$$@*>@#@$$$@<$@<$>@<$>@#@$@<$>@#@$$@ <$>@#@$$$@<$@#@$@<$@#@$$@<$@#@$$$@<*@<**>@<**>@#@$@ <**>@#@$$@ <**>@#@$$$@<*>@<*>@#@$@<*>@#@$$@ <*>@#@$$$@<*@#@$@<*@#@$$@<*@#@$$$@<|>@<|>@#@$@<|>@#@$$@ <|>@#@$$$@Control.Monad.Singletons%<$!>@%<=<?%=<<?%>=>?%>>?%>>=?<$!>@<$!>@#@$@ <$!>@#@$$@ <$!>@#@$$$@<=<?<=<@#@$?<=<@#@$$? <=<@#@$$$?=<<?=<<@#@$?=<<@#@$$? =<<@#@$$$?>=>?>=>@#@$?>=>@#@$$? >=>@#@$$$?>>?>>=?>>=@#@$?>>=@#@$$? >>=@#@$$$?>>@#@$?>>@#@$$?>>@#@$$$?Data.Bool.Singletons %&&@%||@&&@&&@#@$@&&@#@$$@&&@#@$$$@||@||@#@$@||@#@$$@||@#@$$$@Data.Eq.Singletons %/=@%==@/=@/=@#@$@/=@#@$$@/=@#@$$$@==@==@#@$@==@#@$$@==@#@$$$@Data.Function.Singletons$$@#@$$@#@$$$@#@$$$%$%&?%."@&?&@#@$?&@#@$$?&@#@$$$?."@.@#@$"@.@#@$$"@.@#@$$$"@.@#@$$$$"@OnOnSym0OnSym1OnSym2OnSym3OnSym4sOnData.Functor.Compose.Singletons ComposeSym0"@ ComposeSym1"@SCompose"@Data.Functor.Singletons$>@$>@#@$@$>@#@$$@$>@#@$$$@%$>@%<$@%<$>@%<&>?<$@<$>@<$>@#@$@<$>@#@$$@ <$>@#@$$$@<$@#@$@<$@#@$$@<$@#@$$$@<&>?<&>@#@$?<&>@#@$$? <&>@#@$$$?Data.List.NonEmpty.Singletons%!!"@%<|"@:%|@:|@#@$@:|@#@$$@:|@#@$$$@Data.List.Singletons!!"@!!@#@$"@!!@#@$$"@!!@#@$$$"@%!!"@%++@%\\@++@++@#@$@++@#@$$@++@#@$$$@:@#@$@:@#@$$@:@#@$$$@SCons@\\@\\@#@$@\\@#@$$@\\@#@$$$@Data.Ord.Singletons%<@%<=@%>@%>=@<@<=@<=@#@$@<=@#@$$@<=@#@$$$@<@#@$@<@#@$$@<@#@$$$@>@>=@>=@#@$@>=@#@$$@>=@#@$$$@>@#@$@>@#@$$@>@#@$$$@Data.Semigroup.Singletons%<>@<>@<>@#@$@<>@#@$$@<>@#@$$$@Data.Singletons.Base.TH7%&&@%*>@%."@%/=@%<@%<$@%<*@%<*>@%<=@%<>@%==@%>@%>=@%~"@&&@&&@#@$@&&@#@$$@&&@#@$$$@*>@."@.@#@$"@.@#@$$"@.@#@$$$"@.@#@$$$$"@/=@:@#@$@:@#@$$@:@#@$$$@:~:@<@<$@<$@#@$@<$@#@$$@<$@#@$$$@<*@<*>@<*>@#@$@<*>@#@$$@ <*>@#@$$$@<=@<>@<>@#@$@<>@#@$$@<>@#@$$$@==@==@#@$@==@#@$$@==@#@$$$@>@>=@>@#@$@>@#@$$@>@#@$$$@@@"@SCons@Data.Singletons.Base.TypeError :$$:@:$$:@#@$@ :$$:@#@$$@ :$$:@#@$$$@:%$$:@:%<>:@:<>:@:<>:@#@$@ :<>:@#@$$@ :<>:@#@$$$@GHC.TypeLits.Singletons%<=?@%^ @<=?@<=?@#@$@<=?@#@$$@ <=?@#@$$$@Div@DivSym0@DivSym1@DivSym2@Mod@ModSym0@ModSym1@ModSym2@Quot@QuotSym0@QuotSym1@QuotSym2@Rem@RemSym0@RemSym1@RemSym2@^ @^@#@$ @^@#@$$ @^@#@$$$ @sDiv@sMod@sQuot@sRem@Prelude.Singletons!!"@!!@#@$"@!!@#@$$"@!!@#@$$$"@$$!$!@#@$$!@#@$$$!@#@$$$$@#@$$@#@$$$@#@$$$%!!"@%$%$!%&&@%*@%*>@%+@%++@%-@%."@%/=@%<@%<$@%<$>@%<*@%<*>@%<=@%<>@%=<<?%==@%>@%>=@%>>?%>>=?%||@&&@&&@#@$@&&@#@$$@&&@#@$$$@*@*>@*>@#@$@*>@#@$$@*>@#@$$$@*@#@$@*@#@$$@*@#@$$$@+@++@++@#@$@++@#@$$@++@#@$$$@+@#@$@+@#@$$@+@#@$$$@-@-@#@$@-@#@$$@-@#@$$$@."@.@#@$"@.@#@$$"@.@#@$$$"@.@#@$$$$"@/=@/=@#@$@/=@#@$$@/=@#@$$$@:@#@$@:@#@$$@:@#@$$$@<@<$@<$>@<$>@#@$@<$>@#@$$@ <$>@#@$$$@<$@#@$@<$@#@$$@<$@#@$$$@<*@<*>@<*>@#@$@<*>@#@$$@ <*>@#@$$$@<*@#@$@<*@#@$$@<*@#@$$$@<=@<=@#@$@<=@#@$$@<=@#@$$$@<>@<>@#@$@<>@#@$$@<>@#@$$$@<@#@$@<@#@$$@<@#@$$$@=<<?=<<@#@$?=<<@#@$$? =<<@#@$$$?==@==@#@$@==@#@$$@==@#@$$$@>@>=@>=@#@$@>=@#@$$@>=@#@$$$@>>?>>=?>>=@#@$?>>=@#@$$? >>=@#@$$$?>>@#@$?>>@#@$$?>>@#@$$$?>@#@$@>@#@$$@>@#@$$$@@@"@SCons@SeqSeqSym0SeqSym1SeqSym2sSeq||@||@#@$@||@#@$$@||@#@$$$@singletons-defaultData.Default.Singletons:%"@ singletons-thData.Singletons.TH%~"@:~:@@@"@singular-factoryMath.Singular.Factory.GFTables>>>@Math.Singular.Factory.Parser<||>@sitepipeSitePipe# @#%%=@#%%~@#%=@#%~@#=@#~@%%=@%%@=@%%@~@%%~@%=@%@=@%@~@%~@&?&&=@&&~@&~?**=@**~@*=@*~@+=@+~@-<.>@-=@-~@.!="@..."@.:"@.:!"@.:?"@.= @.>"@.@=@.@~@.~@//=@//~@:<@:>@:~:@<#%=@<#%~@<#=@<#~@<%=@<%@=@<%@~@<%~@<&&=@<&&~@<&>?<**=@<**~@<*=@<*~@<+=@<+~@<-=@<-~@<."@<.=@<.>@<.~@@<<%=@<<%@=@<<%@~@<<%~@<<&&=@<<&&~@<<**=@<<**~@<<*=@<<*~@<<+=@<<+~@<<-=@<<-~@<<.=@<<.~@<=@<<<>~@<<>=@<<>~@<=@<>~@"@$@?=@????~@^# @^. @^.. @^=@^? @^?! @^@. @^@.. @^@? @^@?! @^^=@^^~@^~@cons@failing@magnify@snoc@zoom@|>@||=@||~@ size-basedControl.Enumerable.Count!!*"@@sized Data.Sized !!"@%!!"@++@:-@:-::@:<@:>@<|@|>@ sized-grid SizedGridCompose"@SizedGrid.Coord:|@ sized-vectorData.Vector.Sized!!"@%!!"@ sized-wrapper Data.Sized<<>>@sized-wrapper-textData.Text.Lazy.Sizedcons@Data.Text.Sizedcons@ skeletal-setData.SkeletalSet=~=@\\@∪"@ skeletest SkeletestshouldBe? shouldNotBe?shouldNotSatisfy? shouldSatisfy?Skeletest.AssertionsshouldBe? shouldNotBe?shouldNotSatisfy? shouldSatisfy?Skeletest.Internal.Predicate&&"@<<<?===@>>>?||"@Skeletest.Predicate&&"@<<<?===@>>>?||"@sketch-frp-copilotSketch.FRP.Copilot.Types=:?@:"@ skew-listData.SkewList.Lazy!"@!?"@Data.SkewList.Lazy.Internal!"@!?"@Data.SkewList.Strict!"@!?"@Data.SkewList.Strict.Internal!"@!?"@skulk Skulk.Deep<$$>@>=>=?>>==?>>>=? slack-webWeb.Slack.Experimental.Blocks<+>"@small-bytearray-builderData.ByteArray.Builder.Boundedappend"@ smallcapsText.SmallCaps.Config&&&"@|||"@ smallcheckTest.SmallCheck==>Test.SmallCheck.Series<~>@>< @>>-?\/@smcdelSMCDEL.Internal.Help!"@!="@SMCDEL.Language|="@SMCDEL.Symbolic.S5$$"@smtLibSMTLib1.<."@.>."@=/="@==="@ SMTLib2.Core=/="@==="@==>"@smtlib2Language.SMTLib2.#."@.&.@.*.@.+.@.-.@./.@./=.@.:.@.<.@.<=.@.==.@.=>.@.>.@.>=.@.|.@div'@mod'@rem'@$Language.SMTLib2.Internals.Interface.#."@.&.@.*.@.+.@.-.@./.@./=.@.:.@.<.@.<=.@.==.@.=>.@.>.@.>=.@.|.@div'@mod'@rem'@snap-appData.Monoid.Operator++"@Text.Blaze.Extra!#"@!."@ snap-coreSnap.Internal.Parsing snap-extrasSnap.Extras.CoreUtils-/-"@snap-predicatesData.Predicate:&:"@:*:"@:|:"@:||:"@snaplet-postgresql-simpleSnap.Snaplet.PostgresqlSimple:.@snaplet-sqlite-simpleSnap.Snaplet.SqliteSimple:."@ snowchecked Data.Snowchecked.Internal.Import.&.@.|.@shiftL @shiftR @solgaSolga:<|>"@sop-coreData.SOP-.->?:*@:.:@And@Compose"@Data.SOP.BasicFunctors:.:@Data.SOP.Classes-.->?Data.SOP.ConstraintAnd@Compose"@ Data.SOP.NP:*@ souffle-dslLanguage.Souffle.DSL .!=?.%"@.<?.<=?.=?.>?.>=?.^"@\/"@|-sousit Data.SouSiT$$"@$="@=$"@=$="@=+="@=+|="@Data.SouSiT.Sink=||="@Data.SouSiT.Source$$"@=+="@=+|="@Data.SouSiT.Transform$="@=$"@=$="@sparse-lin-alg Math.LinearAlgebra.Sparse.Matrix#"@//"@<|"@|>"@·×"@×"@×·"@ Math.LinearAlgebra.Sparse.Vector!"@·"@sparse-linear-algebraData.Sparse.Common><"@Data.Sparse.SpMatrix#~#"@#~#^"@#~^#"@-=-"@-||-"@@@!"@Numeric.LinearAlgebra.Class ##"@##^"@#>"@#^#"@*.@.*"@./@<#"@<.>"@<\>"@@@"@^+^"@^-^"@Numeric.LinearAlgebra.Sparse##"@##^"@#>"@#^#"@#~#"@#~#^"@#~^#"@-=-"@-||-"@.*@./@<#"@<.>"@<\>"@><"@ sparse-tensor Math.Tensor&&&+@&&&>@&&.+@&&.>@&*@&+@&-@&. @&.&+@&.&>@&..+@&..>@+>@.&&+@.&&>@.&.+@.&.>@..&+@..&>@...+@...>@ sparsebitData.SparseBIT*."@.&"@.&."@.**"@.|"@.|."@=:="@ sparsecheck SparseCheck&"@***"@-+-"@:-"@:->"@:|:"@=/="@==="@?"@\/"@|<=|"@|<|"@|>=|"@|>|"@spatial-rotationsMath.Rotations.Class°@spawnControl.Concurrent.Spawn|*|"@speMath.Spe.*."@.+."@.^"@<*."@<^"@><"@speciesMath.Combinatorics.Species:*:"@><"@@@"@ Math.Combinatorics.Species.Class><"@@@"@%Math.Combinatorics.Species.Structures:*:"@ speculateTest.Speculate.Reason|==|@|>@Test.Speculate.Reason.Order>|@|>@|>|@Test.Speculate.Utils!"@***"@+++@+-"@..:"@.:"@thn @ speechmaticsSpeechmatics.JSON.PeekJob.:??"@Speechmatics.JSON.PostJob.:??"@spice FRP.Spice^*"@^*>"@^+"@^+>"@^-"@^->"@^."@^.>"@spineGenerics.Spine.Base:&:"@:<>:"@:>"@spirosPrelude.NotSpiros<@>@Prelude.SpirosmappendGeneric@sappendGeneric@Prelude.Spiros.Classes!*@** @*>@+@-@.&.@.|.@/@/=@<$@<*@<*>@<=@<>@<|>@==@>$@>=@>>?>>=?div@elem@ hashWithSaltmod@quot@rem@rotate @rotateL @rotateR @shift @shiftL @shiftR @xor@Prelude.Spiros.Reexports1!!"@$$!&?&&@&&&@*@** @***@*>@+@++@+++@-@."@/@/=@:|@<$@<$>@<*@<**>@<*>@<<<?<=@<=<?<>@<|>@=<<?==@>$@>=@>=>?>>?>>=?>>>?\\@^ @^^ @div@elem@ hashWithSaltmod@notElem@onquot@rem@||@|||@Prelude.Spiros.Utilities$>"@-:?<"@<&>@>"@ greaterThan@lessThan@ratio@spirv-reflect-typesData.SpirV.Reflect.Enums.Common.&&."@spirv-reflect-yamlData.SpirV.Reflect.Yaml.Parsers.?"@splayData.Splay.Sequence<|"@|>"@ splaytreeData.SplayTree<|"@><"@|>"@ sprinklesWeb.Sprinkles.Prelude&!!"@$$!&&@*"@**"@*>"@+"@++"@-"@-<.>@."@/"@/="@<"@<$"@<$!>@<$>@<*"@<**>@<*>"@<.>@@<="@<=<?<>"@<|>"@=<<?=="@>"@>="@>=>?>>"@>>="@^ @^^ @notElem@||@Web.Sprinkles.Rule<|+>"@sqelSqel*>@:>@>@ Sqel.Data.Dd:>@ Sqel.Kind++@ Sqel.Type*>@>@ sql-simpleDatabase.Sql.Simple+:+"@:."@Database.Sql.Simple.Internal+:+"@:."@ sql-wordsLanguage.SQL.Keyword.Concat .<.@.<=.@.<>.@.=.@.>.@.>=.@.||.@<++>@<.>"@and@in'@or@|*|? sqlite-simpleDatabase.SQLite.Simple:.@:=@Database.SQLite.Simple.Types:.@squaresControl.Arrow.Square***"@+++"@>>>"@Control.Comonad.Square<=<"@Control.Monad.Square>=>"@ Data.Square===@|||@squeal-postgresql Squeal.PostgreSQL.Definition>>>?Squeal.PostgreSQL.Expression&?<@@@&&"@@>@'Squeal.PostgreSQL.Expression.Comparison./=@.<@.<=@.==@.>@.>=@!Squeal.PostgreSQL.Expression.Json #-.@.#> @.#>> @.-.@.-> @.->> @.?"@.?&"@.?|"@"Squeal.PostgreSQL.Expression.Logic.&&@.||@"Squeal.PostgreSQL.Expression.Range&<"@&>"@-|-"@.<@"@<..<@<..<=@<<@"@<=..<@<=..<=@@*"@@+"@@-"@@>."@@>>"@'Squeal.PostgreSQL.Expression.TextSearch.!"@.&"@.|"@<->"@@@"@!Squeal.PostgreSQL.Expression.Time!+@!-@!-!@+!@Squeal.PostgreSQL.Render<+>@ Squeal.PostgreSQL.Session.Encode#. @*. @.#@.*@Squeal.PostgreSQL.Type.Alias!"@:::@Squeal.PostgreSQL.Type.List*: @:*@:>>@Squeal.PostgreSQL.Type.Schema:=>@squeal-postgresql-ltreeSqueal.PostgreSQL.LTree%<@@%?@%@@%@>@%~@&?@&@@&~@<@%@?%@?&@?<@@?@@?@>@?~@@%@@&@@>%@~%@~&@srclocData.Loc<-->@srcspan@srtreeData.SRTree.Recursion:<"@ssspAws.SSSP-/-"@stack Stack.Prelude/$"@$!"@$!!"@$>"@%~@&"@&&"@&&&"@*"@**"@***"@*>"@+"@++"@-"@."@.|@.~@/"@/="@:|"@<"@<$"@<$!>"@<$>"@<&>"@<*"@<*>"@<+>"@<="@<=<"@<>"@<|>"@=<<"@=="@>"@>="@>=>"@>>"@>>="@>>>"@^"@^. @^.. @^? @^^"@||"@ stack-prismData.StackPrism:-"@Data.StackPrism.Generic:-"@Data.StackPrism.TH:-"@stackctlStackctl.Config.RequiredVersion=~"@Stackctl.Prelude9$$!$!!$>@%~@&?&&@&&&@*@** @***@*>@+@++@-@."@.= @.~@/@/=@:#@:|@<@<$@<$!>@<$>@<&>?<*@<*>@<.>@@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>?^ @^. @^.. @^? @^^ @div@elem@mod@notElem@onquot@rem@seq||@ staged-ggStaged.GHC.Generics:**:@:++:@:@@:@Staged.GHC.Generics.Types:**:@:++:@:@@:@stan Stan.NameMeta baseNameFrom @ghcInternalNameFrom @ghcPrimNameFrom @ textNameFrom @unorderedNameFrom @Stan.Pattern.Edsl&&&@?"@|||@Stan.Pattern.Type|->@|::@ state-recordData.Record.StateFields//"@ stateful-mtlControl.Monad.Trans.Operations>>=?"@ statisticsStatistics.Types±"@statistics-dirichlet Math.Statistics.Dirichlet.Matrix!"@!!!"@!Math.Statistics.Dirichlet.Mixture!!!"@statistics-skinnyStatistics.Types±"@status-notifier-itemStatusNotifier.Util<..>@<<$>>@>>=/"@stdio Std.Data.JSON.:"@.:!"@.:?"@"@Std.Data.JSON.Base.:"@.:!"@.:?"@"@Std.Data.ParserStd.Data.Parser.Base steeloverseer Sos.Utils<|||>@ step-functionData.Function.Step!"@"Data.Function.Step.Discrete.Closed!"@ Data.Function.Step.Discrete.Open!"@stepwiseControl.Monad.Stepwise.Examples<<|>"@stgi Data.Stack:<"@<>>"@stitchStitch.= @?@Stitch.Combinators-:@.= @?@ stm-conduitData.Conduit.Async$$&$=&?=$&@=$=&@Data.Conduit.TMChan<=>"@>=<@stomplNetwork.Mom.Stompl.Frame<|"@>|<"@|>"@storablevectorData.StorableVector.Lazyappend@ Data.StorableVector.Lazy.Patternappend@Data.StorableVector.Lazy.Typedappend@ stream-fusionControl.Monad.Stream<=<"@=<<"@>=>"@>>"@>>="@Data.List.Stream!!"@++"@\\"@ streamingData.Functor.Of:>@ Streaming:>@<>@<|>@Compose"@Streaming.Prelude:>@streamly&Streamly.Internal.Data.Stream.IsStream!!"@.:@ahead@async@cons@consM@parallel@serial@wAsync@wSerial@|$|$.|&?|&.?|:@$Streamly.Internal.Data.Stream.Serialcons@consM@wSerial@Streamly.Prelude!!"@.:@ahead@async@cons@consM@parallel@serial@wAsync@wSerial@|$|$.|&?|&.?|:@ streamly-coreStreamly.Data.Streamcons@consM@Streamly.Data.StreamKappend@cons@consM@ interleave@Streamly.Internal.BaseCompat#."@Streamly.Internal.Data.Stream!!"@cons@consM@Streamly.Internal.Data.StreamK!!"@.:@append@cons@consM@ interleave@ interleaveFst@ interleaveMin@Streamly.Internal.Data.Unfoldbind?streamsData.Stream.Future:<@Data.Stream.Future.Skew:<@<|@Data.Stream.Infinite!!"@:>@&Data.Stream.Infinite.Functional.Zipper!!"@:~<|"@Data.Stream.Infinite.Skew!!"@<|@strictData.Strict.Tuple:!:@ strict-baseData.Strict.List:!"@Data.Strict.List.NonEmpty:|"@Data.Strict.Tuple:!:"@strict-base-typesData.Tuple.Strict:!:@strict-containers+Data.Strict.ContainersUtils.Autogen.Prelude%!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@~@.Data.Strict.ContainersUtils.Autogen.StrictPair:*:?$Data.Strict.HashMap.Autogen.Internal!"@!?"@+Data.Strict.HashMap.Autogen.Internal.Strict!"@!?"@"Data.Strict.HashMap.Autogen.Strict!"@!?"@#Data.Strict.IntMap.Autogen.Internal!"@!?"@\\"@!Data.Strict.IntMap.Autogen.Strict!"@!?"@\\"@*Data.Strict.IntMap.Autogen.Strict.Internal!"@!?"@\\"@ Data.Strict.Map.Autogen.Internal!"@!?"@\\"@Data.Strict.Map.Autogen.Strict!"@!?"@\\"@'Data.Strict.Map.Autogen.Strict.Internal!"@!?"@\\"@Data.Strict.Sequence.Autogen!?"@:<@:<|@:>@:|>@<|@><@|>@%Data.Strict.Sequence.Autogen.Internal!?"@:<@:<|@:>@:|>@<|@><@|>@-Data.Strict.Sequence.Autogen.Internal.SortingIQCons @ITQCons @QCons @TQCons @Data.Strict.Vector.Autogen!"@!?"@++@//"@elem@notElem@ strict-dataData.StrictList+!+@:!"@\!\"@Data.StrictVector!"@!?"@ strict-typesData.Strict.Forced"@Data.Strict.HashMap!"@ string-classData.String.Class altCons"@ altUncons"@append"@cons"@cons2"@cons3"@cons4"@uncons"@uncons2"@uncons3"@uncons4"@string-combinatorsData.String.Combinators$$"@<+>"@<>"@string-conversionsData.String.Conversions<>@string-variantsData.StringVariants<=@<>|"@ Data.StringVariants.NonEmptyText<=@<>|"@stringtable-atomStringTable.AtomMap!"@\\"@StringTable.AtomSet\\"@ stripe-coreWeb.Stripe.StripeRequest-&-"@Web.Stripe.Util"@ stripe-testsWeb.Stripe.Test.Prelude$-&-"@."@/=@==@>>"@>>="@ stripe-wreq Stripe.Wreq:=@ strong-path StrongPath"@ strongweakStrongweak.Strengthen.Generic.>"@structs Data.Struct#"@Data.Struct.Internal#"@structural-inductionInduction.Structural:~"@structured-cliSystem.Console.StructuredCLI>+"@structured-mongoDB!Database.MongoDB.Structured.Query .!"@.&&"@.*"@./="@.<"@.<="@.=="@.>"@.>="@.||"@subG Data.SubG%@?%^? subcategoriesControl.Subcategory.Alternative@%Control.Subcategory.Alternative.Class@Control.Subcategory.Applicative.>"@<."@<.>@%Control.Subcategory.Applicative.Class.>"@<."@<.>@Control.Subcategory.Bind-<<?>>-?Control.Subcategory.Functor<$:@<$:>@$Control.Subcategory.RebindableSyntax*@+@-@/=@==@>>"@>>="@subhaskSubHask++"@SubHask.Algebra%!"@!?"@&&"@*"@**"@*."@*.."@*="@+"@+."@+="@-"@-="@.*"@.*."@.*.="@.*="@.+"@.+="@..*.."@./"@./."@./.="@./="@/"@/="@<"@<="@<>"@=="@==>"@>"@><"@>="@^"@^^"@||"@SubHask.Category$"@$!"@$$"@."@<<<"@>>>"@ SubHask.Monad<*>"@<=<"@=<<"@>=>"@>>"@>>="@subnetNetwork.Subnet.Binary.&&."@.+."@.-."@.||."@subzeroControl.Applicative.SubZero<-$>"@<-|>"@ summoner-tuiSummoner.Tui.GroupBorder|>@sunroof-compilerLanguage.Sunroof!"@#"@$$"@:="@Language.Sunroof.Selector!"@Language.Sunroof.Types#"@$$"@:="@super-user-sparkSuperUserSpark.Utils&&&"@<$$>"@<**>"@ supermonad Control.Super.Monad*>"@<$"@<*"@<*>"@>>"@>>="@Control.Super.Monad.Alternative<|>"@Control.Super.Monad.Constrained*>"@<$"@<*"@<*>"@>>"@>>="@+Control.Super.Monad.Constrained.Alternative<|>"@)Control.Super.Monad.Constrained.Functions<$!>@<$>@<**>"@<=<?=<<?>=>?'Control.Super.Monad.Constrained.Functor<$"@'Control.Super.Monad.Constrained.Prelude=<<?Control.Super.Monad.Functions<$@<$!>@<$>@<**>"@<=<?=<<?>=>?Control.Super.Monad.Prelude=<<?'Control.Super.Monad.PreludeWithoutMonad!!"@$$!&&@*"@**"@+"@++@-"@."@/"@/="@<"@<$"@<$>@<="@=="@>"@>="@^ @^^ @notElem@||@ superrecord SuperRecord&@&.@&: @&:- @++:"@:& @:=@ supply-chain SupplyChain>+"@>-"@>->"@SupplyChain.JobAndVendor>+"@>-"@SupplyChain.Vendor>->"@supply-chain-coreSupplyChain.Core.Connect>+@>-@>->@suspendControl.Concurrent.Suspend.+."@!Control.Concurrent.Suspend.Lifted.+."@svData.Sv.:@@=:"@==<<?>$@>>==?sv-coreData.Sv.Decode.Core.:@==<<?>>==?Data.Sv.Encode.Core<"@?>>"@ svg-builder Graphics.Svg<>@Graphics.Svg.Attributes->>@<<-@svg-builder-fork Graphics.Svg<>@Graphics.Svg.Attributes->>@<<-@ svg-iconsSvgIcons.Core.Utils.:@swagger-petstoreOpenAPIPetstore.Core-&-"@swagger2Data.Swagger.Internal.Utils<+>"@syb-with-class"Data.Generics.SYB.WithClass.Basics:~:@:~~:@sydtestTest.Syd shouldBe? shouldContain? shouldEndWith? shouldNotBe?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith? shouldThrow?Test.Syd.Expectation shouldBe? shouldContain? shouldEndWith? shouldNotBe?shouldNotReturn?shouldNotSatisfy? shouldReturn? shouldSatisfy?shouldStartWith? shouldThrow? sydtest-wai Test.Syd.Wai<:>"@Test.Syd.Wai.Matcher<:>"@symSym.Internal.CLongArrayat"@unsafeAt"@Sym.Perm.Constructions/+/@\-\@symantic"Language.Symantic.Compiling.Module:="@ Language.Symantic.Compiling.ReadCtxTyS@ Language.Symantic.Compiling.TermCtxTeS@app"Language.Symantic.Interpreting.DupDup@Language.Symantic.Typing.KindKiFun@Language.Symantic.Typing.List++@Language.Symantic.Typing.Type #@#>#~@:$:@"@:~:@:~~:@TypesS@tyApp"@tyQual?~>!Language.Symantic.Typing.VariableVarS@ symantic-baseSymantic.Syntaxes.Classes$."@.>@.@"@:!:@<%>@<&>@<*&>@<+&>@<+>@<->@<.@<.>@<>@@<|>@==@concat@equal@Symantic.Syntaxes.DataConcat@Cons@Symantic.Syntaxes.Reify--> @ symantic-cliSymantic.CLI.API:!:@@<.>@@alt@helpsymantic-documentSymantic.Document.Lang<+>@@symantic-grammar%Language.Symantic.Grammar.ContextFree&>@<&@Language.Symantic.Grammar.EBNFebnf_arg@!Language.Symantic.Grammar.Regular.*>@<*.@<+>@ Language.Symantic.Grammar.Source setSource@ symantic-httpSymantic.HTTP.API:!:@@<.>@@ symantic-lib !Language.Symantic.Lib.Alternative<|>@!Language.Symantic.Lib.Applicative*>@<*@<*>@Language.Symantic.Lib.Bool&&@xor@||@Language.Symantic.Lib.Eq/=@==@Language.Symantic.Lib.Foldableelem@Language.Symantic.Lib.Functioncomp"@Language.Symantic.Lib.Functor<$@<$>@Language.Symantic.Lib.Integraldiv@mod@quot@rem@Language.Symantic.Lib.List list_cons@Language.Symantic.Lib.Monad>=>?>>=?Language.Symantic.Lib.Num*@+@-@Language.Symantic.Lib.Ord<@<=@>@>=@Language.Symantic.Lib.Semigroup<>"@symantic-parserParsers.Utils.Attoparsec<+>"@<:>"@<~>"@>?>"@ symantic-xmlSymantic.XML.RelaxNG.Language*:*"@:*"@:-:@:::"@:|:@ symparsecSymparsec.Parser.Common:$$:"@:<>:"@@@"@~>Symparsec.Parser.Or:<|>:@Symparsec.Parser.Then:<*>:@Symparsec.Parser.Then.VoidLeft:*>:@Symparsec.Parser.Then.VoidRight:<*:@Symparsec.Parsers:*>:@:<*:@:<*>:@:<|>:@ syntacticLanguage.Syntactic.Syntax:$?:+:"@:->"@Language.Syntactic.Traversal:*"@ synthesizer Sound.Signal++"@Sound.Signal.StrictBlock++"@Synthesizer.ApplicativeUtility$#"@$:"@$::"@$^"@.:"@.^"@Synthesizer.Dimensional.Arrow&&&"@***"@<<<"@<<^"@>>>"@>>^"@^<<"@^>>"@&Synthesizer.Dimensional.Causal.Process $/-"@$/:"@&&&"@***"@<<<"@<<^"@>>>"@>>^"@^<<"@^>>"@Synthesizer.Dimensional.Process$#"@$:"@$::"@$^"@.:"@.^"@-Synthesizer.Dimensional.RateAmplitude.Control#|"@#|-"@#|="@-|#"@=|#"@|#"@,Synthesizer.Dimensional.RateAmplitude.Signal$&"@$-"@&*>^"@&*^"@Synthesizer.Generic.Control#|"@#|-"@#|="@-|#"@=|#"@|#"@Synthesizer.Interpolation.Class+.*"@Synthesizer.Piecewise#|"@#|-"@#|="@-|#"@=|#"@|#"@Synthesizer.Plain.Control#|"@#|-"@#|="@-|#"@=|#"@|#"@%Synthesizer.SampleRateContext.Control#|"@#|-"@#|="@-|#"@=|#"@|#"@"Synthesizer.SampleRateContext.Rate$#"@$:"@$::"@$^"@.:"@.^"@$Synthesizer.SampleRateContext.Signal$-"@synthesizer-coreSynthesizer.ApplicativeUtility$#$:$::$^.:"@.^"@Synthesizer.Causal.Class$*$<$>Synthesizer.Interpolation.Class+.*@Synthesizer.Piecewise#|@#|-@#|=@-|#@=|#@|#@Synthesizer.State.Signalappend@Synthesizer.Storable.Signalappend@synthesizer-dimensionalSynthesizer.Dimensional.Arrow$/-$/:apply"@&Synthesizer.Dimensional.Causal.Process $/-$/:&&&@***@<<<?<<^?>>>?>>^?^<<?^>>?apply"@applyFst"@Synthesizer.Dimensional.Process$#$:$::$^.:"@.^"@+Synthesizer.Dimensional.RateAmplitude.Piece#|@#|-@#|=@-|#@=|#@|#@Synthesizer.Dimensional.Signal$&"@$-&*>^@&*^@Synthesizer.Dimensional.Wave&*~@synthesizer-llvm"Synthesizer.LLVM.Causal.Functional$&&|&@&Synthesizer.LLVM.Causal.FunctionalPlug$&&|&@Synthesizer.LLVM.Causal.Process$*$*#$<$<#$>$>#Synthesizer.LLVM.Complex+:@Synthesizer.LLVM.Server.Common$+$++$/"@Synthesizer.LLVM.Value %&&"@%/="@%<"@%<="@%=="@%>"@%>="@%||"@?"@??"@ system-extra System.Docker:--"@system-filepathFilesystem.Path<.>"@"@t-regexData.MultiGenerics:**:"@Data.Regex.Generics#"@<.>"@<<-"@<||>"@^*"@Data.Regex.MultiGenerics!"@<.>"@<<-"@<||>"@?"@^*"@Data.Regex.MultiRules->>"@->>>"@Data.Regex.Rules->>"@->>>"@tabular Text.Tabular+----+"@+.+"@+====+"@^..^"@^|^"@^||^"@taffybarSystem.Taffybar.Util<||>@<|||>@??@ tag-streamText.HTML.TagStream.Parser||."@ tagged-listData.List.Tagged:."@tagsoupText.HTML.TagSoup~/="@~=="@tagstream-conduitText.HTML.TagStream.ByteString||."@Text.HTML.TagStream.Text||."@talashTalash.Chunked!"@tamarin-prover-termTerm.Builtin.Convenience#"@*:"@tamarin-prover-theoryTheory.Model.Formula.&&."@.<=>."@.==>."@.||."@tamarin-prover-utilsExtension.Data.Label=:"@Text.PrettyPrint.Class$$"@$-$"@$--$"@<->"@<>"@tamper Text.Tamper!"@tapioca Data.Tapioca:|"@<->@<:>@tarCodec.Archive.TarNext@tar-bytestringCodec.Archive.TarNext@targetTest.Target.Util:::"@taskellTaskell.Data.Seq<#>"@ tasty-bddTest.Tasty.Bdd@?/="@@?=@^?/="@^?="@ tasty-dejafuTest.Tasty.DejaFu->-"@==="@=>="@ tasty-hsluaTest.Tasty.HsLua=:@?:@ tasty-hunitTest.Tasty.HUnit@=??@??@?=?tasty-hunit-compatTest.Tasty.HUnit@=??@??@?=?tasty-inspection-testingTest.Tasty.Inspection==-"@==="@==~"@tasty-quickcheckTest.Tasty.QuickCheck.&&.?.&.?.||.?=/=@===@==>><"@tasty-smallcheckTest.Tasty.SmallCheck==>taxData.Tax<>"@tdocText.TDoc.Core!"@+++@<<@teamsData.Teams.Graph.$."@.|."@telegram-bot-simpleTelegram.Bot.Simple.Eff<#"@template-haskellLanguage.Haskell.TH.CodeDo>>"@>>="@Language.Haskell.TH.PprLib$$@$+$@<+>@<>@temporal-mediaTemporal.Class*|"@+:+"@+|"@=:="@Temporal.Media=:/"@temporal-music-notationTemporal.Music.Score!"@*|"@+:+"@+|"@=:/"@=:="@tenData.Ten:*:@:+:@:.:@Data.Ten.Applicative*>!@<*!@<*>!@Data.Ten.Functor<$!@<$>!@Data.Ten.Sigma:**@ten-lens Data.Ten.Lens!=@!=?@ten-unordered-containersData.Ten.HashMap:**@tensor Data.Tensor!"@Data.Tensor.LinearAlgebra*."@.*."@.+."@⊗"@Data.TypeAlgebra<*>"@<+>"@ Data.TypeList!!"@.|."@<++>"@Data.TypeList.MultiIndex:|:"@ tensor-safeTensorSafe.Network:~>@:~~@tensors Data.Tensor!"@terminfoSystem.Console.Terminfo.Base<#>@termonadTermonad.Prelude)!!"@$$!$>@&?&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@~@terrahsTerraHS.Algebras.Base.Category$*$"@teslaTesla.Car.Command.= @test-funTest.Fun:+@:->?Test.Fun.Internal.Generic:+@>*>"@>->"@Test.Fun.Internal.Pretty%?:.?~%?Test.Fun.Internal.Types:->?test-invariantTest.Invariant&>"@<=>"@"@"@"@<~~"@@~>"@testcontainersTestContainers&?TestContainers.Docker&?TestContainers.Tasty&?testpackTest.QuickCheck.Tools@=?"@@?="@text Data.Textcons@Data.Text.Internalmul@mul32@mul64@$Data.Text.Internal.Builder.Functions<>@Data.Text.Internal.Fusion.Types:*:@Data.Text.Lazycons@text-and-plots Text.DocL/:"@Text.DocL.Javascript/:"@text-builder-linearData.Text.Builder.Linear.Buffer#<|@$$<|@$<|@%<|@&<|@.<|@<|@<|#@><@|>@|>#@|>$@|>$$@|>%@|>&@|>.@|>…@…<|@Data.Text.Builder.Linear.Core><@text-containersData.TextArray.Unboxed!?"@Data.TextMap.Unboxed.Lazy!?"@Data.TextSet.Unboxed!?"@ text-ldapText.LDAP.Dataelem'@inBounds@ inSBounds@notElem'@ text-position Data.Position<++>"@ text-printer Text.Printer<+>@<->@<>@ text-regionData.Text.Region.Types.+."@.-."@ text-shortData.Text.Short!?"@ text-utf8 Data.Textcons@Data.Text.Internalmul@mul32@mul64@$Data.Text.Internal.Builder.Functions<>@Data.Text.Internal.Fusion.Types:*:"@Data.Text.Lazycons@text1Data.Text1.Text1+:@.:@.<>@<>.@textPlotTextPlot.+"@.-"@.|"@tfpType.Data.Num.Decimal.Number:<"@:>"@th-alphaLanguage.Haskell.TH.Alpha@=@th-buildLanguage.Haskell.TH.Build-->"@.::"@\->"@th-casAlgebra.CAS.Type:*:"@:+:"@:-:"@:/:"@:^:"@ th-desugar Language.Haskell.TH.Desugar.OMap\\"@'Language.Haskell.TH.Desugar.OMap.Strict\\"@ Language.Haskell.TH.Desugar.OSet\\"@ themoviedb$Network.API.TheMovieDB.Internal.Date.::"@ theoremquestTheoremQuest.Logic:->"@=."@thespianControl.Concurrent.Actor▷"@◁"@thihAssump:>:"@Pred:=>"@<:>"@Subst+->"@@@"@threepenny-editorsGraphics.UI.Threepenny.Editors*-@*|@-*@-*-@|*@|*|@%Graphics.UI.Threepenny.Editors.Layout:-*-"@:|*|"@$Graphics.UI.Threepenny.Editors.Types*-@*|@-*@-*-@|*@|*|@threepenny-guiGraphics.UI.Threepenny.Core # @#+ @#. @*>@<$@<$>@<*@<**>@<*>@<@@<@>@<|>@Reactive.Threepenny<@@<@>@tickleData.Tickle.Get!!-"@!+"@!-"@.>>"@<<."@ tictactoe3dGame.TicTacToe3D.Vector3!"@//"@tidalSound.Tidal.Core'#"@%|"@**|"@*|"@++|"@+|"@-|"@/|"@<|"@<~"@>|"@|%"@|%|"@|*"@|**"@|**|"@|*|"@|+"@|++"@|++|"@|+|"@|-"@|-|"@|/"@|/|"@|<"@|<|"@|>"@|>|"@||%"@||*"@||**"@||+"@||++"@||-"@||/"@||<"@||>"@~>"@Sound.Tidal.Pattern*>@<*@<<*@Sound.Tidal.Utils!!!"@time-recurrenceData.Time.Recurrence.AndThen>==>"@tinylogSystem.Logger.Message+++@.=@~~@tip-haskell-frontendTip.&&."@.||."@=/="@==="@==>"@ Tip.Prelude$"@&&"@*"@+"@++"@-"@."@/="@<"@<="@=="@>"@>="@^"@||"@tip-libTip.Core//"@/\"@=/="@==="@===>"@==>"@\/"@Tip.Haskell.Repr:::"@ Tip.Pretty$\"@Tip.Pretty.Isabelle$-$"@ Tip.Types:=>:"@:@:"@ titlecaseData.Text.Titlecase.Internal<#>"@ tlex-core#Language.Lexer.Tlex.Machine.Pattern:^:"@:|:"@Language.Lexer.Tlex.Prelude&!!"@$!&?&&@*@** @*>@+@++@-@."@/@/=@:|@<@<$@<$>@<*@<*>@<=@<>@=<<?==@>@>=@>>?>>=?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@tmp-procSystem.TmpProc.Docker&:@&:&@HCons@both@System.TmpProc.TypeLevel&:@&:&@HCons@both@tmp-proc-postgresSystem.TmpProc.Docker.PostgresHCons@tmp-proc-rabbitmqSystem.TmpProc.Docker.RabbitMQHCons@tmp-proc-redisSystem.TmpProc.Docker.RedisHCons@tmp-proc-zipkinSystem.TmpProc.Docker.ZipkinHCons@tnetTNET.:"@.="@todosTodos.Formatters<++>"@ toml-parser Toml.Schema.="@Toml.Schema.ToValue.="@toml-reader-parse TOML.Parse.!=@.:@.:?@"@tomland Toml.Codec.Di.=@Toml.Codec.Types@Toml.Parser.CoreToml.Type.Edsl=:"@ Toml.Type.Key<|"@tonaludeTonalude/$$!$!!$>@&?&&@&&&@*@** @***@*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<&>?<*@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?>>>?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@ tonaparser TonaParser.||"@topNetwork.Top.Pipes>->@topaz Topaz.Rec<:@ Topaz.Types++@tophatTophat>>>?totalLens.Family.Complete&?&&&@Lens.Family.Total&? total-map Data.TotalMap!"@tower Tower.Algebra*"@**"@*."@+"@+."@-"@-."@.*"@.*."@.+"@.+."@.-"@.-."@./"@./."@/"@/."@"@><"@^"@⊕"@toxcoreNetwork.Tox.Time+"@-"@ toysolver ToySolver.Arith.Cooper.|."@ToySolver.Arith.Cooper.Base.|."@ToySolver.Arith.DifferenceLogic:-@:<=@ToySolver.Arith.Simplex.<.@.<=.@.==.@.>.@.>=.@&ToySolver.Data.AlgebraicNumber.Complex:+@ToySolver.Data.Boolean.&&.@.<=>.?.=>.?.||.@ToySolver.Data.FOL.Arith:*:"@:+:"@:/:"@ToySolver.Data.OrdRel./=.@.<.@.<=.@.==.@.>.@.>=.@ToySolver.Data.Polynomialdiv@mod@tpdb TPDB.Pretty$$"@<+>"@<>@TPDB.Xml&|?traced Debug.Traced%&&"@%/="@%<"@%<="@%=="@%>"@%>="@%||"@tractionTraction.Prelude%$$>@&?&&@*@*>@+@-@."@/@/=@<@<$@<$!>@<$>@<*@<**>@<*>@<=@<=<?<>@<|>@=<<?==@>@>=@>=>?>>?>>=?^ @div@elem@mod@notElem@quot@rem@||@traildbSystem.TrailDB:."@^."@transformations&Generics.MultiRec.Transformations.Path<.>"@transformers-composeControl.Monad.Compose.Class<<<"@>>>"@ transientTransient.Base**>@<**@<***@Transient.Internals!>"@**>@<**@<***@<|"@Transient.Parse|-"@translatable-intsetData.IntSet.Translatable\\"@ translateText.Language.Internals-"@."@trasa Trasa.Core.&@./@treemapData.TreeMap.Strict<|"@\\"@Data.TreeMap.Strict.Zipperaxis_at@ axis_filter@treeseqData.TreeSeq.Strict.Zipperaxis_at@ axis_filter@axis_filter_current@ trek-lens Trek.Lens%>@focusing@trialTrial:-@::-@alt@ triangulation'Graphics.Triangulation.GJPTriangulation+<"@trifectaText.Trifecta.Rendering.#"@:@"@:^"@:~"@tropicalData.Semiring.Tropical.*."@.+."@./."@.^."@tropical-geometryGeometry.ConvexHull2>*<"@Polynomial.Prelude!*"@truthyData.Bool.Class&&*"@||*"@tsweb TsWeb.Db.Beam&&.@&&?.@**. @/=*.@/=.@/=?."@<*.@<-.@<.@<=*.@<=.@<|>.@==*.@==.@==?."@>*.@>.@>=*.@>=.@between_@div_@in_@like_@mod_@ similarTo_@||.@||?.@tubesTubes-<"@>-"@><"@|>"@~>"@ Tubes.Core-<"@>-"@><"@|>"@~>"@ tuple-appendData.Tuple.Append+++@++>@<++@Data.Tuple.Append.Class+++@++>@<++@ tuple-morphData.Tuple.Morph.Append++@"@turtleTurtle &?*>@<$>@<&>?<*@<*>@<.>@@<=<?<>@<|>@>=>? Turtle.Format%"@Turtle.Prelude.&&.@.||.@turtle-optionsTurtle.Options.Parsers<:>"@Turtle.Options.Timecode<+>"@twee Twee.Array!"@Twee.Constraints&&&"@|||"@ Twee.Rule:=:"@twee-lib Twee.Base<<"@Twee.Constraints&&&"@|||"@ Twee.Equation:=:"@ Twee.Pretty$$@$+$@<#>@<+>@ Twee.Term<<"@twentefpFPPrac.Prelude!!"@twentefp-numberFPPrac!!"@ twentysevenData.Tuple.Extra|:|"@Data.Vector.Storable.Allocated!"@Rubik.Cube.Coord!$"@!."@ Rubik.Misc<&>"@<>^"@??"@ Rubik.Solver>$<"@|*|"@|.|"@twilioTwilio.Internal.Parser<&>"@twine Text.Twine=:"@twitchTwitch|# @|% @|+ @|- @|> @twitter-conduit$Web.Twitter.Conduit.Request.Internal:="@tyData.Ty=:="@ type-alignedData.TASequence:<"@:>"@<|"@><"@|>"@type-combinators Data.Type.Boolean.&&@.==@.?@.^^@.||@<==>?==>?Data.Type.Conjunction.&.@Data.Type.Disjunction>+<@>|<@ Data.Type.Nat.*@.+@.^ @Data.Type.Product::<@:>@>:@>::@Data.Type.Product.Env.\\"@Data.Type.Product.Lifted:>>@>>:@Data.Type.Vector*:@+:@.++@:+@Type.Class.Higher<#"@<##"@<###"@<=#"@<=##"@<=###"@=###=@=##=@=#=@>#"@>##"@>###"@>--->?>-->?>->?>=#"@>=##"@>=###"@>>-?>>--?>>---?>>=-?>>=--?>>=---?>>=~?>>~?Type.Class.Witness////?//?+=?=@=??=@\\"@ type-compare Kinds.Ord /=@/=?"@<@<=@<=?@@>=@>=?@>?@type-eqType.Eq|>"@Type.Eq.Higher|$|"@|.|"@||$||"@||.||"@ Type.Eq.Poly|$|"@|.|"@ type-equalityData.Type.Equality.Hetero:~~:@ type-errors Type.Errors:$$:@:<>:@type-errors-prettyType.Errors.Pretty%@<>@•@⊕@ type-flipData.Type.Flip<$%>@<*%>@=<<%?>>=%?type-functions Data.TypeFun:->"@type-indexed-queuesData.Queue.Binomial:-"@TypeLevel.Singletons*.@+.@-.@<=.@^. @ type-levelData.TypeLevel.Bool&&"@||"@Data.TypeLevel.Num.Ops *"@+"@-"@<"@<="@=="@>"@>="@^"@Data.TypeLevel.Num.Reps:*"@type-level-bstType.BST!"@!?"@.:."@<$*>"@<$*?>"@|>"@type-level-kv-list Data.KVList&."@&.?"@&.??"@&=?&=>?:=@type-level-sets Data.Type.Map:->@type-level-showTypeLevelShow.Doc:$$:"@:<>:"@ type-level-tfData.TypeLevel.Num.Ops*"@+"@-"@<"@<="@>"@>="@^"@Data.TypeLevel.Num.Reps:*"@type-map Data.TypeMap.Dynamic<:"@Data.TypeMap.Dynamic.Alt<:"@Data.TypeMap.Internal.Dynamic<:"@!Data.TypeMap.Internal.Dynamic.Alt<:"@Data.TypeMap.Internal.List<|@cons@snoc@|>@Data.TypeMap.Internal.Map<|@cons@snoc@|>@Data.TypeMap.Internal.Vector<|@cons@snoc@|>@Data.TypeMap.List<|@cons@snoc@|>@Data.TypeMap.Map<|@cons@snoc@|>@Data.TypeMap.Vector<|@cons@snoc@|>@ type-naturalData.Type.Natural%*@%+@%-@%-."@%<=?@%=?@%>?@%^ @%~@*@+@-@-.@<@<=@<=?@@>=@>=?@>?@Div@Mod@^ @sDiv@sMod@Data.Type.Natural.Lemma.Order %-."@%=?@%>?@-.@<@@>=@>=?@>?@Data.Type.Ordinal@+"@ type-of-html Html.Type#@&@:#:"@:&:@:="@:>@:@"@:|:@type-operatorsControl.Type.Operator$@$$@&?<+>"@<=>"@<^@^>@type-rigData.TypeRig.Productable***>@<***@<***>@Data.TypeRig.Summable<+++>@type-setData.OneOfThem>-@>--@Data.OneOrMore>-@Data.OneOrMoreApp>-"@ Data.Type.Set:+:@:-@Data.Type.SetApp:$:@type-settheory Type.Function:***:"@Type.Set:×:"@ type-specTest.TypeSpec.Group-/-?Test.TypeSpec.Internal.Apply~>Test.TypeSpecCrazy3###?######? #########? ############?###############?##################?#####################?########################?###########################?##############################?!#################################?$####################################?'#######################################?*##########################################?-#############################################?0################################################?3###################################################?6######################################################?9#########################################################?<############################################################??###############################################################?B##################################################################?E#####################################################################?H########################################################################?-*@-*-@--*@~~~@~~~~~~@ ~~~~~~~~~@ ~~~~~~~~~~~~@~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~~~~~~@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@6~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@9~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@B~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@E~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@ type-unary TypeUnary.Vec<+>?typecheck-plugin-nat-simpleData.Log.+.@typed-duration Data.Duration#"@typed-encoding#Data.TypedEncoding.Common.Types.Enc-:-@ typed-fsm Data.IFunctor>>"@>>="@~> typed-session Data.IFunctor>>"@>>="@~>typed-session-state-algorithmTypedSession.State.Type:>@ typed-timeData.Time.Format.Typed:<>@ typedflowTypedFlow.Layers.Core#"@TypedFlow.Layers.RNN.++."@.--."@.-."@ TypedFlow.TF+@·"@∙@⊕@⊘@⊙@⊝@TypedFlow.Types:&"@<--"@ typelevelType.Applicative<*>@ Type.Bool&&@ Type.Error:$$:@:<>:@Type.Error_old:$$:@:<>:@ Type.Functor<$>@ Type.Monoid<>@Type.Operators$?$$&?typelevel-tensorData.Tensor.TypeLevel!"@:~"@typelits-witnessesGHC.TypeLits.Compare%<=?"@GHC.TypeLits.Witnesses%*"@%+"@%-"@%<=?"@%^"@typenums Data.TypeLits*@+@-@/@/=@/=?@:$$:@:%"@:<>:@<@<=@<=?@==@==?@>@>=@Div@Mod@Quot@Rem@^ @ Data.TypeNums*@+@-@/@/=@/=?@:%"@<@<=@<=?@==@==?@>@>=@Div@Mod@Quot@Rem@^ @!Data.TypeNums.Arithmetic.InternalDiv@Mod@Quot@Rem@Data.TypeNums.Rats:%"@ typerboleCalculi.Lambda.Cube.HigherOrder/$ @Calculi.Lambda.Cube.Polymorphic\-/@≣@+Calculi.Lambda.Cube.Polymorphic.Unification\<@⊑@Calculi.Lambda.Cube.SimpleType/->@====@Control.Typecheckable<><>"@typical Data.Typical:#:"@typistTypist.TextShow#="@ typograffiti Typograffiti$$"@Typograffiti.Rich$$"@ typson-coreTypson.JsonTree<<$>@<<*>@Typson.Pathing:->@typst Typst.Types:|:"@tyro Data.Tyro%%> @>%>"@uhc-utilUHC.Util.CHR.Rule/\@<==>@<=>@<=>>"@<\>@<\>>"@=!@=!!@==>@==>>"@=@@=|@@=?\!@\/@|>@UHC.Util.ScopeVarMp varmpPlus@|\>"@UHC.Util.Utils$?UHC.Util.VarLookup|+>"@unboxed-containersData.Set.Unboxed\\"@unboxing-vectorData.Vector.Unboxing!"@!?"@++"@//"@ uncertainNumeric.Uncertain+/-@:+/-@ uni-events Events.Events+>?>>>@>>>=@Events.GuardedEvents|>@ uni-graphsGraphs.GraphConfigure$$$$$$$$?uni-htkHTk.Canvasitems.CanvasTag&#&@^#@|#|@HTk.Toolkit.SimpleForm// @\\"@uni-utilUtil.Computation#@$$ Util.Debug@:"@@@:"@ Util.DeepSeq$!!deepSequnicode-preludePrelude.Unicode¬"@×"@÷"@⇔"@∅"@∈"@∉"@∧"@∨"@≠"@≡"@≢"@≤"@≥"@≮"@≯"@⊥"@⋅"@◦"@unicode-symbols Control.Applicative.Unicode∅"@⊛"@Control.Category.Unicode∘"@Data.IntMap.Unicode∅"@∈"@∉"@∩"@∪"@Data.IntSet.Unicode ∅"@∈"@∉"@∩"@∪"@⊂"@⊃"@⊄"@⊅"@⊆"@⊇"@⊈"@⊉"@Data.Map.Unicode∅"@∈"@∉"@∩"@∪"@Data.Monoid.Unicode∅"@⊕"@Data.Sequence.Unicode∅"@⊲"@⊳"@⋈"@Data.Set.Unicode ∅"@∈"@∉"@∩"@∪"@⊂"@⊃"@⊄"@⊅"@⊆"@⊇"@⊈"@⊉"@Prelude.Unicode¬"@÷"@∈"@∉"@∘"@∧"@∨"@≡"@≢"@≤"@≥"@≮"@≯"@⊥"@⋅"@unicode-tricksData.Char.Combining*^ @*^! @unification-fdControl.Unification<:=@=:=@===@=~=@equals@equiv@subsumes@unify@Control.Unification.Ranked=:=@===@=~=@equals@equiv@unify@uniform-cmdLineArgsUniform.CmdLineArgs<*>@<>@uniform-fileioUniform.FileStrings<.>"@"@Uniform.Filenames<.>"@"@ uniform-json Uniform.Json.= @ uniform-pairData.UniformPair:#"@ uniform-shake Uniform.Shake$--<.>"@$-<.>"@%>?|%>?Uniform.Shake.Path$%>"@$&%>"@uniform-stringsUniform.Strings<#>"@<+>"@<->"@<:>"@<|>"@Uniform.Strings.Infix<#>"@<+>"@<->"@<.>"@"@<:>"@<|>"@ union-mapData.UnionIntMap!"@\\"@ Data.UnionMap!"@\\"@ unipatterns UniPatterns||>"@uniplateData.Generics.PlateDirect|*"@|+"@|-"@||*"@||+"@Data.Generics.PlateTypeable|+"@|-"@Data.Generics.Uniplate.Direct|*"@|+"@|-"@||*"@||+"@Data.Generics.Uniplate.Typeable|+"@|-"@ unique-logicUniqueLogic.ST.Expression=!=@=:=unique-logic-tfUniqueLogic.ST.TF.Expression=!=@=:=uniquely-represented-setsData.Tree.Braun!"@!?"@unitsData.Metrology(#@#*@#+@#-@$=@%@%*@%/@%^ @*|@*~@/|@:*@:/@:@"@:^ @@*@@+@@-@@/@@@+@@@-@@~@qApprox@qNapprox@showIn?|*@|*|@|+|@|-|@|/@|/=|@|/|@|<=|@|<|@|==|@|>=|@|>|@|^ @|^^ @Data.Metrology.Internal $=@*~@@*@@+@@-@@/@@@+@@@-@@~@Data.Metrology.Linear*^|@^#@^%"@showInV?|*^|@|.+^|"@|.-.|"@|.-^|"@|.|@|^*@|^*|@|^+^|@|^-^|@|^/@|^/|@Data.Metrology.Poly#@#*@#+@#-@%@%*@%/@%^ @*|@/|@:*@:/@:@"@:^ @qApprox@qNapprox@showIn?|*@|*|@|+|@|-|@|/@|/=|@|/|@|<=|@|<|@|==|@|>=|@|>|@|^ @|^^ @Data.Metrology.Vector(#@#*@#+@#-@%@%*@%.@%/@%^ @*|@.#@/|@:*@:/@:@"@:^ @qApprox@qNapprox@showIn?|*@|*^|@|*|@|+|@|-|@|.+^|@|.-.|@|.-^|@|.|@|/@|/=|@|/|@|<=|@|<|@|==|@|>=|@|>|@|^ @|^*|@|^/|@|^^ @Data.Metrology.Z#*@#+@#-@ unittyped UnitTyped .$."@.*."@.+."@.-."@./."@.<."@.<=."@.==."@.>."@.>=."@~."@UnitTyped.NoPrelude *"@+"@-"@."@/"@<"@<="@=="@>"@>="@ universe-baseData.Universe.Helpers+*+"@+++"@<+*+>"@universe-reverse-instancesData.Universe.Instances.Eq/=@==@Data.Universe.Instances.Ord<@<=@>@>=@ universum Universum%~@.~@^. @^.. @^? @Universum.Applicative*>@<*@<**>@<*>@<|>@Universum.Base$!*@** @+@-@/@/=@:%"@<@<=@==@>@>=@^ @^%^"@^^ @^^%^^"@div@mod@quot@rem@seqxor@~@Universum.Bool.Reexport&&@||@Universum.Container.Reexport hashWithSaltUniversum.DeepSeq$!!deepseqUniversum.Function$&?."@onUniversum.Functor.Fmap<<$>>@Universum.Functor.Reexport$>@&&&@<$@<$>@<&>?Compose"@Universum.List.Reexport++@:|@Universum.Monad.Maybe?:Universum.Monad.Reexport<$!>@<=<?=<<?>=>?>>?>>=?Universum.Monoid<>@Universum.TypeOps$@Universum.Unsafe!!"@Universum.VarArg... @unixSystem.Posix.Signals addSignal"@ deleteSignal"@ unlifted-listData.List.Unlifted."@unm-hipData.Image.Arithmetic*."@+."@-."@.*"@.+"@.-"@./"@/."@Data.Image.Binary ./="@./=."@.<"@.<."@.=="@.==."@.>"@.>."@/=."@<."@==."@>."@unordered-containersData.HashMap.Internal!"@!?"@Data.HashMap.Internal.Strict!"@!?"@Data.HashMap.Lazy!"@!?"@Data.HashMap.Strict!"@!?"@unordered-intmapData.Unordered.IntMap!"@ unpack-funcsControl.Monad.Unpack$~"@unpacked-containers Map.Internal!"@!?"@\\"@Map.Lazy!"@!?"@\\"@ Map.Strict!"@!?"@\\"@Map.Strict.Internal!"@!?"@\\"@Set\\"@ Set.Internal\\"@unparse-attoparsecData.Attoparsec.Unparse"@"Data.Attoparsec.Unparse.Profunctor"@unusedCommon<>@ uom-pluginData.UnitsOfMeasure*:@+:@-:@/:@^: @Data.UnitsOfMeasure.Internal*:@+:@-:@/:@:/"@^: @~~@urldisp-happstackHappstack.UrlDisp|."@|/"@|//"@|?"@|\"@|\\"@ urlencodedData.URLEncoded%!?%&@%= @%=? @%?@utilUtil!!?"@&"@&=&@*=*@<&&>@<|@<||>@<₪>@onnonnn|>@₪∈@∉@∘"@∘∘"@ Util.Bits.&¬"@ util-logictUtil.Monad.Logic.Class<~>@>< @\/@ utility-htControl.Monad.HT<=<? Data.Bits.HT.<<.@.>>.@ Data.Bool.HT?:?implies? Data.Maybe.HT?->@Data.Monoid.HT<>@ Text.Read.HT.>"@uu-cco CCO.Parsing"@ CCO.Printing>#<"@>-<"@>//<"@>^<"@>|<"@uu-interleavedControl.Applicative.Interleaved<<||>@<>@<||>@ uu-parsinglibText.ParserCombinators.UU.Core<<|>@@opt@'Text.ParserCombinators.UU.Demo.Examples<++>"@!Text.ParserCombinators.UU.Derived<$$>"@<..>"@<.>"@@uu-tcParseLib.Abstract.Core<$>@<*>@<<|>@<|>@>>=?ParseLib.Abstract.Derived*>@<$@<*@ParseLib.Parallel.Core<$>@<*>@<<|>@<|>@>>=?ParseLib.Parallel.Derived*>@<$@<*@ParseLib.Simple.Core<$>@<*>@<<|>@<|>@>>=?ParseLib.Simple.Derived*>@<$@<*@ uu-tc-errorParseLib.Abstract.Core<$>@<*>@<<|>@<|>@>>=?ParseLib.Abstract.Derived*>@<$@<*@ParseLib.Simple.Core<$>@<*>@<<|>@<|>@>>=?ParseLib.Simple.Derived*>@<$@<*@uuagc-diagramsUU.UUAGC.Diagrams# @uulib UU.PPrint<$$>@<$>@<+>@@@<>@UU.Parsing.Derived<$$>"@<**>@<+>@<..>@@@opt@UU.Parsing.Interface*>@<$@<$>@<*@<*>@<|>@UU.Parsing.Merge<||>"@UU.Parsing.Perms~$~"@~*~"@UU.Pretty.Basic>-<@>//<?>>$<>>$<<>>-<<@>>//<<?>>|<<@>|<@ UU.Pretty.Ext>#<@>-<<@>>#<<@>>-<@>>^<<?>>|<@>^<?>|<<@UU.Util.PermTree<$$>"@<$?>"@<|?>"@<||>"@uusiDistribution.Uusi.Lens<&>?Distribution.Uusi.Utils<||>?uvectorData.Array.Vector:*:"@vacuum GHC.Vacuum.Q!"@!="@.="@validaValida-?>@@Valida.Combinators@ valida-baseValida-?>@@Valida.Combinators@validate-inputData.Validator<=<?>=>?validity Data.Validity<>@varData.Tuple.ITuple:*"@:|"@variable-precision$Numeric.VariablePrecision.Algorithms=~="@Numeric.VariablePrecision.Float-@?"@#Numeric.VariablePrecision.Precision.@"@.@~"@)Numeric.VariablePrecision.Precision.Reify.@$"@variadicControl.Variadic...*>"@...>>="@<$>..."@<*..."@=<<..."@Control.Variadic.VarargsCons@variantData.Variant.ContFlow>%:>>-:>>:%:>>:-:>>::>>:>Data.Variant.Syntax>>"@>>="@varyingControl.Varying.Core<<<?>>>?vecData.Vec.DataFamily.SpineStrict!"@++@:::@ Data.Vec.Lazy!"@++@:::@Data.Vec.Lazy.Inline!"@++@:::@ Data.Vec.Pull!"@vectData.Vect.Double.Base &!"@&*"@&+"@&-"@&."@&^"@*&"@*."@.*"@.*."@Data.Vect.Float.Base &!"@&*"@&+"@&-"@&."@&^"@*&"@*."@.*"@.*."@ vect-floatingData.Vect.Floating.Base &!"@&*"@&+"@&-"@&."@&^"@*&"@*."@.*"@.*."@vector Data.Vector!"@!?"@++@//"@elem@notElem@Data.Vector.Fusion.Bundle!!"@!?"@++@elem@notElem@!Data.Vector.Fusion.Bundle.Monadic!!"@!?"@++@elem@notElem@Data.Vector.Generic!"@!?"@++@//"@elem@notElem@Data.Vector.Primitive!"@!?"@++@//"@elem@notElem@Data.Vector.Storable!"@!?"@++@//"@elem@notElem@Data.Vector.Unboxed!"@!?"@++@//"@elem@notElem@vector-circularData.Vector.Circular++"@Data.Vector.Circular.Generic++"@ vector-endianData.Vector.Endian!"@!?"@vector-functorlazyData.Vector.FunctorLazy!"@!?"@++"@//"@vector-hashtablesData.Vector.Hashtables.Internal!"@!."@!.~"@!~"@<~"@<~~"@vector-heterogenousData.Vector.Heterogenous.HList:::"@ vector-sizedData.Vector.Generic.Sized++"@//"@:<@elem@notElem@Data.Vector.Primitive.Sized++"@//"@elem@notElem@Data.Vector.Sized++"@//"@:<@elem@notElem@Data.Vector.Storable.Sized++"@//"@elem@notElem@Data.Vector.Unboxed.Sized++"@//"@elem@notElem@ vector-spaceData.AdditiveGroup^+^@^-^@Data.AffineSpace.+^@.-.@.-^@Data.LinearMap*.*"@:-*?Data.Maclaurin<$>>@>-<D"@Data.VectorSpace*^@<.>@^*@^/@vector-space-pointsData.AffineSpace.Point*."@ vector-staticData.Vector.Generic.Static!"@++"@Data.Vector.Static!"@++"@Data.Vector.Storable.Static!"@++"@Data.Vector.Unboxed.Static!"@++"@ vector-streamData.Stream.Monadic!!"@!?"@++@elem@notElem@ vector-textData.Container.Vector!"@!!"@ Data.Text32!"@!?"@++@//"@elem@notElem@verifiable-expressionsLanguage.Expression^>>=?Language.Expression.Example^+"@^=="@Language.Expression.Prop*&&@*->?*<->?*||@Language.Expression.Scope^>>>="@Language.Expression.Util..."@Language.While.Syntax.Sugar .&&@.< @.<= @.=.?.=="@.> @.>= @.||@\\^^^@verilogLanguage.Verilog.DSL<>"@ verismithVerismith.ResultVerismith.Tool.InternalversetVerset6$$!$<@$>@&?&&@&&^"@*@** @*>@+@-@."@/@/=@:|@<@<$@<$!>@<$>@<&>?<*@<**>@<*>@<<$>>@<<<?<=@<=<?<>@<|>@=<<?==@>@>$@>$$<@>$<@>=@>=>?>>?>>=?>>>??:?^ @^^ @div@elem@mod@notElem@onquot@rem@seq||@||^"@ vertexenumGeometry.VertexEnum.<=@.<=.@.>=@.>=.@vformat Text.Format:=@vgrepControl.Lens.Compat %=@%~@&?&~?*=@+=@+~@-=@-~@.=@.~@//=@<%=@<%~@<&>?<.=@<<%=@<<%~@<<.=@<<.~@<>~@:"@:>:"@:>=:"@Language.VHDL.Ppr$++$"@<++>"@views Data.View<<<"@>>>"@vinyl Data.Vinyl::&@Data.Vinyl.ARec.Internalarcons?Data.Vinyl.Core:&@<+>@<<$>> @<<&>>"@<<*>> @Data.Vinyl.Derived<<$$>>"@=: @=:="@Data.Vinyl.Functor:."@Data.Vinyl.Notation:&@<+>@<<$>> @<<&>>"@<<*>> @Data.Vinyl.Recursive<+>"@<<$>>"@<<&>>"@<<*>>"@Data.Vinyl.XRec::&@ vinyl-plusData.Vinyl.Types:&"@ vinyl-utilsData.Vinyl.Utils.Operator/$$/"@/$/"@\$$\"@\$\"@\&&\"@\||\"@ vinyl-vectors+Data.Vector.Vinyl.Default.Empty.Monomorphic!"@!?"@++"@//"@vitrea Combinators%~ @.? @.~ @>- @?. @^. @vividVivid.ByteBeat&&&"@<<<"@>>>"@|||"@Vivid.NoPluginsNoGlobalState&? AddParams"@Vivid.SynthDef?"@Vivid.SynthDef.TypesafeArgs AddParams"@Vivid.UGens.Algebraic~*@~** @~+@~-@~/@ voicebaseJson.ProgressTypes.:??"@Json.SubmitMediaTypes.:??"@Json.TranscriptTypes.:??"@vp-treeData.VPTree.TestData.+."@vt-utilsVtUtils.Prelude!"@$$!&&@*@+@-@."@.&.@.= @.|.@/@/=@<@<$>@<*>@<=@<>@<|>?==@>@>=@>>?>>=?div@mod@||@vtyGraphics.Vty.Image<->@<|>@vty-uiGraphics.Vty.Widgets.Box<++>"@<-->"@Graphics.Vty.Widgets.Core<~"@<~~"@Graphics.Vty.Widgets.Padding+++"@Graphics.Vty.Widgets.Table.|."@vulkanVulkan.CStruct.Extends:&@::&@ vulkan-apiGraphics.Vulkan.Marshal.Create&*? vulkan-utilsVulkan.Utils.Misc.&&."@wahsp Web.Audio.|.@.||. @wai-app-file-cgiNetwork.Wai.Application.Classic<.>"@"@<\>"@wai-middleware-preprocessor#Network.Wai.Middleware.Preprocessor<|>"@>->"@wai-middleware-staticNetwork.Wai.Middleware.Static<|>@>->@wai-middleware-static-caching%Network.Wai.Middleware.Static.Caching<|>"@>->"@wai-predicatesData.Predicate#"@.&.@.|.@:::@|||@Network.Wai.Predicate.Utility&?wai-request-specNetwork.Wai.RequestSpec"@Network.Wai.RequestSpec.Parser"@ wai-routeNetwork.Wai.Route.&.@./@:::@=~="@waitfreeControl.Concurrent.Waitfree-*-"@wakame Wakame.Row:*@ wallpaper Complextra.*^@wasmLanguage.Wasm.Builder.=@ waterfall-cadWaterfall.Booleans.Operators~-~"@~/\~"@~\/~"@ web-inv-routeWeb.Route.Invertible!:??Web.Route.Invertible.Common:?? RouteAction? web-routingNetwork.Routing+|"@Network.Routing.Dict:="@web-viewWeb.View.Style-.@ web3-ethereum+Network.Ethereum.Contract.Event.MultiFilter:&@:?@ web3-solidityData.Solidity.Event.Internal:<webcrankWebcrank.Internal.DecisionCore<%%="@webcrank-dispatchWebcrank.Dispatch"@==>"@ webdriverTest.WebDriver.Commands@<==>@Test.WebDriver.JSON!:"@.:??"@webdriver-snoyTest.WebDriver.Commands"@<==>"@Test.WebDriver.Commands.Wait<&&>"@<||>"@Test.WebDriver.JSON!:"@ webgear-coreWebGear.Core.Handler<-<?>->?weekdazeWeekDaze.Colour.RGB>+<@9WeekDaze.ExecutionConfiguration.TimetableBreederFecundity>*<@weighted-regexp Text.RegExp=~"@welford-online-mean-variance+Statistics.Sample.WelfordOnlineMeanVariancedivide@ divideInt@minus@multiply@plus@what4Test.Verification==>What4.Protocol.SMTLib2.Syntax./"@What4.Protocol.SMTWriter.&&@./=@.<@.<=@.==@.>@.>=@.||@What4.Utils.Complex:+@whim Whim.Util+:"@-:"@ wikimusic-ssrWikiMusic.SSR.Language|##| @ wild-bindWildBind.Bindingas@run@winery Codec.WineryextractConstructor?extractConstructorBy?with Data.With:&:"@ witherable Witherable<$?>@<&?>?witness)Data.Type.Witness.General.TestHetEquality:~~:@"Data.Type.Witness.Specific.Natural*@+@-@<=@Div@Mod@^ @wizardWizardWizardT"@wizardsSystem.Console.Wizard:+:"@System.Console.Wizard.Internal:+:"@ wl-pprintText.PrettyPrint.Leijen<$$>@<$>@<+>@@@<>@wl-pprint-annotatedText.PrettyPrint.Annotated.WL<##>@<#>@<+>@@@<>@wl-pprint-extrasText.PrettyPrint.Free<+>"@"@"@<>"@Text.PrettyPrint.Free.Internal<+>"@"@"@<>"@wl-pprint-textText.PrettyPrint.Leijen.Text<$$>@<$>@<++>@<+>@@@beside@$Text.PrettyPrint.Leijen.Text.Monadic<$$>@<$>@<++>@<+>@@@beside@wootData.Woot.WString!?"@word8set Data.Word8Set\\"@wordpass Text.WordPass|||"@ world-peaceData.WorldPeace.Internal.Prism<>~@ worldturtleGraphics.WorldTurtle>!>@>/>@wreq Network.Wreq:=@Network.Wreq.Types:=@wreq-patchable Network.Wreq:=@Network.Wreq.Types:=@wreq-sb Network.Wreq:="@Network.Wreq.Types:="@ wumpus-basicWumpus.Basic.Utils.JoinList:<"@:>"@$Wumpus.Basic.Utils.ParserCombinators"@ wumpus-coreWumpus.Core.Geometry*#"@wumpus-drawingWumpus.Drawing.Paths.Base:<<"@:>>"@$Wumpus.Drawing.Text.Base.DocTextZero<+>"@wxGraphics.UI.WX.Attributes::="@::~"@:="@:~"@Graphics.UI.WX.Types#@.+.@.-.@wxcoreGraphics.UI.WXCore.Types#@.+.@.-.@xformatText.XFormat.Read%"@:%:"@Text.XFormat.Show%"@:%:"@<>"@xhtmlText.XHtml.Frameset! @+++@<<@Text.XHtml.Strict! @+++@<<@Text.XHtml.Table<->@@Text.XHtml.Transitional! @+++@<<@ xilinx-lavaLava->-"@>->"@>=>"@>|>"@xlsxCodec.Xlsx.Writer.Internal.="@.=?"@ xlsx-tabularCodec.Xlsx.Util.Tabular.Imports &?.:"@.= @.~@<$>@<*>@?~@^. @^? @ xml-conduitText.XML.Cursor $.//?$/?$//?$|?&.//?&/?&//?&|?>=>?Text.XML.Cursor.Generic $.//?$/?$//?$|?&.//?&/?&//?&|?>=>?xml-conduit-decodeText.XML.Decode.HCursor$/?$//?%/?%//?&/?&//?***"@|||"@xml-conduit-selectorsText.XML.Selectors<||>@Text.XML.Selectors.Types<||>@xml-conduit-writerText.XML.Writer!:"@xml-enumeratorText.XML.Cursor $.//"@$/"@$//"@$|"@&.//"@&/"@&//"@&|"@>=>"@Text.XML.Cursor.Generic $.//"@$/"@$//"@$|"@&.//"@&/"@&//"@&|"@>=>"@xml-indexed-cursorText.XML.Cursor.Indexed $.//?$/?$//?$|?&.//?&/?&//?&|?>=>? xml-isogenData.THGen.XML!@!%@&@*@+@=:=?@?%@xml-lens Text.XML.Lens..."@ xml-opticsText.XML.Optics./"@.//"@ xml-picklersData.XML.Pickle<#>"@<++>"@"@"@"@xmlgenText.XML.Generator<#>@<>@xmonadXMonad.|.@ XMonad.Layout|||@XMonad.ManageHook--><&&>@<+>"@<||>@=?"@xmonad-bluetilebranchXMonad.|."@ XMonad.Layout|||"@XMonad.ManageHook-->"@<&&>"@<+>"@<||>"@=?"@xmonad-contribXMonad.Actions.CycleWS:&:"@:|:"@XMonad.Actions.RepeatActionrememberActions@XMonad.Actions.Search!>@XMonad.Actions.TopicSpace>*>"@XMonad.Config.Prime/!!"@$$!&&@*@** @*>@+@++@-@-->."@.|.@/@/=@<@<$@<$>@<&&>@<*@<*>@<+>"@<=@<>@<||>@=+=-=."@=:"@=<<?==@=?"@>@>=@>>"@>>=?^ @^^ @div@elem@notElem@quot@rem@seq||@|||@~@XMonad.Hooks.ManageHelpers $?"@-->>-?>-?>>/=?"@@++@+~@.:"@:|@:~@<&>?\\@elem@notElem@XMonad.Prompt.Input?+?XMonad.Util.Dzen>=>?XMonad.Util.EZConfigadditionalKeys@additionalKeysP@additionalMouseBindings@ remapKeysP@ removeKeys@ removeKeysP@removeMouseBindings@XMonad.Util.Loggers.|"@XMonad.Util.NamedActions^++^"@XMonad.Util.PureX&>?&&>@>-$@>->@>||>@XMonad.Util.WindowPropertiesAnd"@Or @xmonad-contrib-bluetilebranch XMonad.Actions.Search!>"@XMonad.Actions.TopicSpace>*>"@XMonad.Hooks.ManageHelpers-->>"@-?>"@-?>>"@/=?"@=>"@XMonad.Util.Loggers<$>"@XMonad.Util.NamedActions^++^"@ xmonad-extrasXMonad.Util.WindowPropertiesRE~?"@xournal-builderText.Xournal.Builder<>"@xournal-render#Graphics.Xournal.Render.Type.Hitted:-"@xsactIndexed??"@yak Network.Yak<:>@Network.Yak.Types<:>@yall Data.Yall.Iso$-"@-$"@Data.Yall.Lens^$"@^>>="@|||"@yamYam:.@yam-app Yam.Import<>@yaml Data.Yaml.!="@.:"@.:?"@.= @Data.Yaml.Builder.="@Data.Yaml.Parser.:"@ Data.Yaml.TH.!="@.:"@.:?"@.= @ yaml-streamly Data.Yaml.!="@.:"@.:?"@.= @Data.Yaml.Builder.="@Data.Yaml.Parser.:"@ Data.Yaml.TH.!="@.:"@.:?"@.= @yamlparse-applicativeYamlParse.Applicative"@"@YamlParse.Applicative.Parser"@"@yaopSystem.Console.YAOP=:"@yapData.YAP.Algebra*"@/"@Data.YAP.Complex:+"@Data.YAP.Ratio%"@ Prelude.YAP^"@^^"@yarlData.Records.Yarl.LinkedList:>@ yarn-lockData.MultiKeyedMap!"@yarn2nixNix.Expr.Additions!!. @$$=@yaya Yaya.Pattern:!:@yeamerPresentation.Yeamer #% @$<>@======@→│@ →│←@ →│→@ ↘──@ ↘──↖@ ↘──↘@ ──↖@│←@Presentation.Yeamer.Mathsd%$>"@&?&~!"@&~:"@&~?"@&~~!"@&~~:"@*..*"@+..+"@-\-"@-→"@..."@/⊂"@<.<"@<.≤"@<=="@<=>"@<،>"@==>"@=→"@=⸪"@>$"@|->"@|◝"@|◞"@|◞◝"@°"@±"@×"@،"@،..،"@⁀"@₌₌"@←-"@←="@↦"@↪"@∀:"@∃:"@∄:"@∈"@∉"@∋"@∌"@∏"@∑"@∓"@∖"@∗"@∘"@∝"@∥"@∧"@∨"@∩"@∪"@∫"@∼"@≃"@≅"@≈"@≠"@≡"@≤"@≤.<"@≤.≤"@≥"@≪"@≫"@⊂"@⊃"@⊆"@⊇"@⊎"@⊕"@⊗"@⋂"@⋃"@⋆"@␣"@◝"@◝⁀"@◞"@◞∏"@◞∑"@◞∫"@◞∮"@◞⋂"@◞⋃"@◞◝"@◞⨄"@⟂"@⧵"@⨄"@⩵"@⩵!"@⪡"@⪢"@⸪"@⸪="@6Presentation.Yeamer.Maths.Unicode.MathLatin_RomanGreekx#% @$<>"@%$>"@&?&~!"@&~:"@&~?"@&~~!"@&~~:"@*..*"@+..+"@-\-"@-→"@..."@/⊂"@<.<"@<.≤"@<=="@<=>"@<>@<،>"@==="@======@==>"@=→"@=⸪"@>$"@|->"@|||"@|◝"@|◞"@|◞◝"@°"@±"@×"@،"@،..،"@⁀"@₌₌"@←-"@←="@→│@ →│←@ →│→@ ↘──@ ↘──↖@ ↘──↘@↦"@↪"@∀:"@∃:"@∄:"@∈"@∉"@∋"@∌"@∏"@∑"@∓"@∖"@∗"@∘"@∝"@∥"@∧"@∨"@∩"@∪"@∫"@∼"@≃"@≅"@≈"@≠"@≡"@≤"@≤.<"@≤.≤"@≥"@≪"@≫"@⊂"@⊃"@⊆"@⊇"@⊎"@⊕"@⊗"@⋂"@⋃"@⋆"@␣"@──"@ ──↖@━━"@│"@│←@┃"@██"@■"@◝"@◝⁀"@◞"@◞∏"@◞∑"@◞∫"@◞∮"@◞⋂"@◞⋃"@◞◝"@◞⨄"@⟂"@⧵"@⨄"@⩵"@⩵!"@⪡"@⪢"@⸪"@⸪="@yesod-auth-oauth2Yesod.Auth.OAuth2.Prelude.:"@.:?"@.= @<>@ yesod-coreYesod.Core.Handler:#:"@Yesod.Core.Json.:"@.= @yesod-paginatorYesod.Paginator.Prelude'!!"@$$!&&@*@** @*>@+@++@-@."@/@/=@<@<$@<$!>@<$>@<*@<*>@<=@<=<?<>@=<<?==@>@>=@>=>?>>?>>=?^ @^^ @div@elem@mod@notElem@quot@rem@seq||@ yggdrasilYggdrasil.HList+++"@yhccoreYhc.Core.Internal.HughesPJ$$"@$+$"@<+>"@<>"@yi Yi.Interact<||@||>"@Yi.Keymap.Keys>>!?>>=!??*>>?*>>!?>>?>>! Yi.Snippets&@&>"@yi-core Yi.Interact<||@||>"@Yi.Keymap.Keys<||@>>!?>>=!??*>>?*>>!?>>?>>!||>"@ yi-language Yi.Lexer.Alex+~"@~-"@Yi.Regex=~"@Yi.Utils+~"@-~"@~-"@yicesMath.SMT.Yices.Syntax :*:"@:+:"@:-:"@:/:"@:/="@:<"@:<="@:="@:=>"@:>"@:>="@yjtoolsControl.Applicative.Tools<.>"@Data.Bool.Tools&&&"@|||"@yoko Data.YokoRaw.|."@.||"@:*:"@||."@|||"@ york-lavaLava.Bit:->"@<#>"@<&>"@<=>"@<|>"@><"@ Lava.JList:+:"@ Lava.Prelude=/="@==="@?"@|<=|"@|<|"@|>=|"@|>|"@ Lava.Vector+>"@<+"@<++>"@Recipe!"@-->"@<=="@|>"@yu-coreYu.Core.Model.Internal=@yu-utilsYu.Utils.Handler<#>@<%>@yuiGrid Text.CxML!"@+++"@/-"@^#"@^%"@^."@^^."@z3Z3.Opts+?"@ zeolite-langBase.CompilerError!!>??Base.Mergeable<&&>@<||>@zephyr-copilotCopilot.Zephyr-!!"@#"@$$!&&@*@** @*>@+@++?-@."@.!!"@.&.@.<<."@.>>."@.^.@.|.@/@/="@<"@<$@<$>@<*@<*>@<="@<>@=:?=<<?=="@==>"@>"@>="@>>?>>=?@:"@^"@^^ @elem@notElem@quot@rem@seq||@~@ zettelkast Data.Path./"@zio ZIO.Trans<$@<$!>@<=<?=<<?>=>?>>?>>=?zipeditSystem.Console.ZipEdit??"@zippersControl.Zipper:> @:>> @:@"@Control.Zipper.Internal:> @:>> @:@"@zreNetwork.ZRE.Lib==>"@zsyntax$Zsyntax.Labelled.Rule.BipoleRelation:::"@fourmolu-0.18.0.0/fixity-tests/test-2-input.hs0000644000000000000000000000044714745250261017272 0ustar0000000000000000import Foo 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 fourmolu-0.18.0.0/fixity-tests/test-0-ugly-expected.hs0000644000000000000000000000047114745250261020705 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a :> "ProvisionedThroughput" .= updateProvisionedThroughput a :> case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l] fourmolu-0.18.0.0/fixity-tests/test-1-with-fixity-info-weird-overwrite-expected.hs0000644000000000000000000000032114745250261026272 0ustar0000000000000000lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] fourmolu-0.18.0.0/fixity-tests/test-1-no-extra-info-expected.hs0000644000000000000000000000037714745250261022421 0ustar0000000000000000lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] fourmolu-0.18.0.0/fixity-tests/test-0-with-fixity-info-expected.hs0000644000000000000000000000045114745250261023141 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a :> "ProvisionedThroughput" .= updateProvisionedThroughput a :> case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l] fourmolu-0.18.0.0/fixity-tests/test-1-with-fixity-info-expected.hs0000644000000000000000000000034714745250261023146 0ustar0000000000000000lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] fourmolu-0.18.0.0/fixity-tests/test-1-input.hs0000644000000000000000000000032014745250261017257 0ustar0000000000000000lenses = Just $ M.fromList $ "type" .= ("user.connection" :: Text) # "connection" .= uc # "user" .= case name of Just n -> Just $ object ["name" .= n] Nothing -> Nothing # [] fourmolu-0.18.0.0/fixity-tests/test-2-with-reexports-expected.hs0000644000000000000000000000044114745250261022730 0ustar0000000000000000import Foo 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 fourmolu-0.18.0.0/fixity-tests/test-0-input.hs0000644000000000000000000000045714745250261017271 0ustar0000000000000000instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a :> "ProvisionedThroughput" .= updateProvisionedThroughput a :> case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> [ "GlobalSecondaryIndexUpdates" .= l ] fourmolu-0.18.0.0/fixity-tests/test-2-no-extra-info-expected.hs0000644000000000000000000000050714745250261022415 0ustar0000000000000000import Foo 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 fourmolu-0.18.0.0/region-tests/src.hs0000644000000000000000000000044114745250261015547 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Foo ( foo, bar, baz) where import Control.Category foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 >>> zeze + 2 >>> nona fourmolu-0.18.0.0/region-tests/expected-result-all.hs0000644000000000000000000000043414745250261020645 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Foo ( foo, bar, baz, ) where import Control.Category foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 >>> zeze + 2 >>> nona fourmolu-0.18.0.0/region-tests/expected-result-11-14.hs0000644000000000000000000000041714745250261020541 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Foo ( foo, bar, baz) where import Control.Category foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 >>> zeze + 2 >>> nona fourmolu-0.18.0.0/region-tests/expected-result-19-23.hs0000644000000000000000000000044414745250261020551 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Foo ( foo, bar, baz) where import Control.Category foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 >>> zeze + 2 >>> nona fourmolu-0.18.0.0/region-tests/expected-result-8-9.hs0000644000000000000000000000043714745250261020415 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Foo ( foo, bar, baz) where import Control.Category foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 >>> zeze + 2 >>> nona fourmolu-0.18.0.0/region-tests/expected-result-8-10.hs0000644000000000000000000000043714745250261020465 0ustar0000000000000000{-# LANGUAGE LambdaCase #-} module Foo ( foo, bar, baz) where import Control.Category foo :: Int foo = 5 bar :: Int -> Int bar = \case 0 -> foo x -> x - foo baz :: Int -> Int baz = gege where gege = 1 >>> zeze + 2 >>> nona fourmolu-0.18.0.0/fourmolu.yaml0000644000000000000000000000121614745250261014536 0ustar0000000000000000# ----- DO NOT EDIT: This file is autogenerated ----- # # Options should imitate Ormolu's style indentation: 2 column-limit: none function-arrows: trailing comma-style: trailing import-export-style: trailing import-grouping: legacy indent-wheres: true record-brace-space: true newlines-between-decls: 1 haddock-style: single-line haddock-style-module: null let-style: inline in-style: right-align single-constraint-parens: always single-deriving-parens: always sort-constraints: false sort-derived-classes: false sort-deriving-clauses: false trailing-section-operators: true unicode: never respectful: false fixities: [] reexports: [] local-modules: [] fourmolu-0.18.0.0/CHANGELOG.md0000644000000000000000000012473614745250261013630 0ustar0000000000000000## Fourmolu 0.18.0.0 * Fix AST check with sort-constraints in data constructor ([#451](https://github.com/fourmolu/fourmolu/issues/451) ### Upstream changes: #### Ormolu 0.8.0.0 * Format multiple files in parallel. [Issue 1128](https://github.com/tweag/ormolu/issues/1128). * Fractional precedences are now allowed in `.ormolu` files for more precise control over formatting of complex operator chains. [Issue 1106](https://github.com/tweag/ormolu/issues/1106). * Correctly format type applications of `QuasiQuotes`. [Issue 1134](https://github.com/tweag/ormolu/issues/1134). * Correctly format multi-line parentheses in arrow `do` blocks. [Issue 1144](https://github.com/tweag/ormolu/issues/1144). * Switched to `ghc-lib-parser-9.12`, with the following new syntactic features: * GHC proposal [#522](https://github.com/ghc-proposals/ghc-proposals/blob/c9401f037cb22d1661931b2ec621925101052997/proposals/0522-or-patterns.rst): `OrPatterns` (enabled by default) * GHC proposal [#569](https://github.com/ghc-proposals/ghc-proposals/blob/c9401f037cb22d1661931b2ec621925101052997/proposals/0569-multiline-strings.rst): `MultilineStrings` (disabled by default) * GHC proposal [#409](https://github.com/ghc-proposals/ghc-proposals/blob/f79438cf8dbfcd90187f7af3a380515ffe45dbdc/proposals/0409-exportable-named-default.rst): `NamedDefaults` (enabled by default) * GHC proposal [#281](https://github.com/ghc-proposals/ghc-proposals/blob/c9401f037cb22d1661931b2ec621925101052997/proposals/0281-visible-forall.rst): accept more types in terms: `forall` quantifications, constraint arrows `=>`, type arrows `->` (enabled by default) * Part of GHC proposal [#425](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0425-decl-invis-binders.rst): wildcard binders (enabled by default) * Correctly format non-promoted type-level tuples with `NoListTuplePuns`. [Issue 1146](https://github.com/tweag/ormolu/issues/1146). * Updated to `Cabal-syntax-3.14`. [Issue 1152](https://github.com/tweag/ormolu/issues/1152). ## Fourmolu 0.17.0.0 * Add new `import-grouping` option to group imports with grouping rules specified in configuration ([#403](https://github.com/fourmolu/fourmolu/pull/403)) * Add new `sort-constraints` option to sort constraints alphabetically ([#433](https://github.com/fourmolu/fourmolu/pull/433)) * Add new `sort-derived-classes` option to sort classes in deriving clauses ([#434](https://github.com/fourmolu/fourmolu/pull/434)) * Add new `sort-derived-clauses` option to sort classes deriving clauses ([#434](https://github.com/fourmolu/fourmolu/pull/434)) * Add new `trailing-section-operators` option to disable trailing "section" operators (those that are `infixr 0`, such as `$`) ([#444](https://github.com/fourmolu/fourmolu/pull/444)) * Fix issue where `single-constraint-parens: never` would drop parentheses around implicit parameters ([#446](https://github.com/fourmolu/fourmolu/issues/446)) * Fix indentation for parenthesized expressions that start off the indentation column ([#428](https://github.com/fourmolu/fourmolu/issues/428)) * Allow multiline comments in indented contexts ([#65](https://github.com/fourmolu/fourmolu/issues/65)) ## Fourmolu 0.16.2.0 ### Upstream changes: #### Ormolu 0.7.7.0 * Use single-line layout for parens around single-line content. [Issue 1120](https://github.com/tweag/ormolu/issues/1120). * Allow function arguments to be on the same line even if the full type (with constraints and foralls) are on multiple lines. [PR 1125](https://github.com/tweag/ormolu/pull/1125). ## Fourmolu 0.16.1.0 ### Upstream changes: #### Ormolu 0.7.6.0 * Fix Haddock comments on infix constructors [Issue 758](https://github.com/tweag/ormolu/issues/758). * Don't require a trailing newline in `.ormolu` files. [Issue 1122](https://github.com/tweag/ormolu/issues/1122). * Remove unnecessary indentation from list comprehensions. [Issue 966](https://github.com/tweag/ormolu/issues/966). ## Fourmolu 0.16.0.0 * Allow specifying path to configuration file with `--config` ([#396](https://github.com/fourmolu/fourmolu/issues/396)) ### Upstream changes: #### Ormolu 0.7.5.0 * Switched to `ghc-lib-parser-9.10`, with the following new syntactic features/behaviors: * GHC proposal [#575](https://github.com/ghc-proposals/ghc-proposals/blob/10290a668608d608c3f6c6010be265cf7a02e1fc/proposals/0575-deprecated-instances.rst): deprecated instances. * GHC proposal [#281](https://github.com/ghc-proposals/ghc-proposals/blob/10290a668608d608c3f6c6010be265cf7a02e1fc/proposals/0281-visible-forall.rst): visible forall in types of terms. Enabled by `RequiredTypeArguments` (enabled by default). * `LinearTypes`: `let` and `where` bindings can now be linear, in particular have multiplicity annotations. * Using `forall` as an identifier is now a parse error. * GHC proposal [#65](https://github.com/ghc-proposals/ghc-proposals/blob/10290a668608d608c3f6c6010be265cf7a02e1fc/proposals/0065-type-infix.rst): namespacing fixity declarations for type names and WARNING/DEPRECATED pragmas. * `TypeAbstractions` now supports `@`-binders in lambdas and function equations. * Support for the `GHC2024` language. * Updated to `Cabal-syntax-3.12`. ## Fourmolu 0.15.0.0 * Add `single-deriving-parens` configuration option to determine if `deriving` clauses of a single type should be parenthesized ([#386](https://github.com/fourmolu/fourmolu/pull/386)) * Fix the order in which the configurations are applied ([#390](https://github.com/fourmolu/fourmolu/issues/390)) ### Upstream changes: #### Ormolu 0.7.4.0 * Don't error when the `JavaScriptFFI` language pragma is present. [Issue 1087](https://github.com/tweag/ormolu/issues/1087). * Improve comment placement in if-then-else blocks. [Issue 998](https://github.com/tweag/ormolu/issues/998). * Now command line options for fixity overrides and module re-exports overwrite information from `.ormolu` files. [Issue 1030](https://github.com/tweag/ormolu/issues/1030). * Respect newlines in data declarations in more cases. [Issue 1077](https://github.com/tweag/ormolu/issues/1077) and [issue 947](https://github.com/tweag/ormolu/issues/947). * The `-d / --debug` command line option now makes Ormolu print out debug information regarding operator fixity inference. [Issue 1060](https://github.com/tweag/ormolu/issues/1060). ## Fourmolu 0.14.1.0 * Fix `single-constraint-parens: never` for nested quantified constraints ([#374](https://github.com/fourmolu/fourmolu/issues/374)) * Fix `column-limit` with `BlockArguments` ([#377](https://github.com/fourmolu/fourmolu/issues/377)) * Fixed an issue where re-exporting a module with Haddock comments + `import-exports=leading` was indented too far ([#381](https://github.com/fourmolu/fourmolu/issues/381)) ### Upstream changes: #### Ormolu 0.7.3.0 * Switched to `ghc-lib-parser-9.8`, with the following new syntactic features: * `ExtendedLiterals`: `123#Int8` is a literal of type `Int8#`. (disabled by default) * `TypeAbstractions`: `@k`-binders in data type declarations (enabled by default) * GHC proposal [#134](https://github.com/ghc-proposals/ghc-proposals/blob/0b652bd70258e354dfe4a05940182007596f8bf7/proposals/0134-deprecating-exports-proposal.rst): deprecating/warning about exports * GHC proposal [#541](https://github.com/ghc-proposals/ghc-proposals/blob/0b652bd70258e354dfe4a05940182007596f8bf7/proposals/0541-warning-pragmas-with-categories.rst): warning categories ## Fourmolu 0.14.0.0 * Provide `resolvePrinterOpts` instead of `fillMissingPrinterOpts` * Format configuration better in `--debug` output ### Upstream changes: #### Ormolu 0.7.2.0 * Preserve necessary braces for final function arguments. [Issue 1044](https://github.com/tweag/ormolu/issues/1044). * Put `"this"` `PackageImports` at the end. [Issue 1048](https://github.com/tweag/ormolu/issues/1048). * Format parenthesized operators starting with a `#` correctly in the presence of `UnboxedSums`. [Issue 1062](https://github.com/tweag/ormolu/issues/1062). * Fix false positives in AST diffing related to empty Haddock comments in data declarations. [Issue 1065](https://github.com/tweag/ormolu/issues/1065). ## Fourmolu 0.13.1.0 * Fix `single-constraint-parens: never` with `QuantifiedConstraints` ([#340](https://github.com/fourmolu/fourmolu/issues/340)) * Fix issue with single documented export + `import-export-style: leading` ([#341](https://github.com/fourmolu/fourmolu/issues/341)) * Fix reexports configuration not allowing repeated modules ([#336](https://github.com/fourmolu/fourmolu/issues/336)) ## Fourmolu 0.13.0.0 * Automatically ignore files in Cabal/Stack directories when recursively finding files to format. ### Upstream changes: #### Ormolu 0.7.1.0 * Include `base` fixity information when formatting a Haskell file that's not mentioned in an existing cabal file. [Issue 1032](https://github.com/tweag/ormolu/issues/1032) * Update `displayException` for `OrmoluException` to pretty print the exception. [PR 1031](https://github.com/tweag/ormolu/pull/1031). * Ormolu is now aware of more common module re-exports by default. * Support explicit mention of target package name in module re-exports. Even if the exported package is not specified as a direct dependency of the component being formatted it will still be taken into account correctly. [Issue 1037](https://github.com/tweag/ormolu/issues/1037). * Ormolu no longer fails when CPP directly follows the import section (a regression introduced in 0.7.0.0). [Issue 1040](https://github.com/tweag/ormolu/issues/1040). #### Ormolu 0.7.0.0 * Inference of operator fixity information is now more precise and takes into account the import section of the module being formatted. [Issue 892](https://github.com/tweag/ormolu/issues/892) and [issue 929](https://github.com/tweag/ormolu/issues/929). * Ormolu can now be made aware of module re-exports through ~~either special declarations in `.ormolu` files~~ the `reexports` configuration option (see the readme for a description of the syntax), or on the command line with the `--reexport`/`-r` option. [Issue 1017](https://github.com/tweag/ormolu/issues/1017). * ~~Ormolu now looks for `.ormolu` files independently of `.cabal` files. This means that it is now possible to have one `.ormolu` file for multiple Cabal packages. [Issue 1019](https://github.com/tweag/ormolu/issues/1019).~~ * Consistently format `do` blocks/`case`s/`MultiWayIf`s with 4 spaces if and only if they occur as the applicand. [Issue 1002](https://github.com/tweag/ormolu/issues/1002) and [issue 730](https://github.com/tweag/ormolu/issues/730). * Support the (deprecated) `DatatypeContexts` extension to avoid surprises. [Issue 1012](https://github.com/tweag/ormolu/issues/1012). * Don't let comments escape from empty export lists. [Issue 906](https://github.com/tweag/ormolu/issues/906). * Format `\cases` with multiple patterns across multiple lines correctly. [Issue 1025](https://github.com/tweag/ormolu/issues/1025). ## Fourmolu 0.12.0.0 * Add `single-constraint-parens` option for controlling parenthesis around constraints in type signatures. See [issue 288](https://github.com/fourmolu/fourmolu/pull/304) * Add `column-limit` option to try to insert line breaks when lines exceed a certain length. May break idempotence in some particularly painful cases. See [issue 71](https://github.com/fourmolu/fourmolu/pull/305) * Add a new CLI flag `--print-defaults` which makes fourmolu print default options to stdout. This can be used to generate default config which can be further tweaked by user `fourmolu --print-defaults > fourmolu.yaml`. See [issue 307](https://github.com/fourmolu/fourmolu/pull/308) ### Upstream changes: #### Ormolu 0.6.0.1 * Fix false positives in AST diffing related to `UnicodeSyntax`. [PR 1009](https://github.com/tweag/ormolu/pull/1009). #### Ormolu 0.6.0.0 * Haddocks attached to arguments of a data constructor are now formatted in the pipe style (rather than the caret style), consistent with everything else. As a consequence, now Ormolu's output will be deemed invalid by the Haddock shipped with GHC <9.0. [Issue 844](https://github.com/tweag/ormolu/issues/844) and [issue 828](https://github.com/tweag/ormolu/issues/828). * Insert space before char literals in ticked promoted constructs when necessary. [Issue 1000](https://github.com/tweag/ormolu/issues/1000). * Switched to `ghc-lib-parser-9.6`: * Extended `OverloadedLabels`: `#Foo`, `#3`, `#"Hello there"`. Also, it is now disabled by default, as it causes e.g. `a#b` to be parsed differently. * New extension: `TypeData`, enabled by default. * Parse errors now include error codes, cf. https://errors.haskell.org. * Updated to `Cabal-syntax-3.10`. * Now whenever Ormolu fails to parse a `.cabal` file it also explains why. [PR 999](https://github.com/tweag/ormolu/pull/999). ## Fourmolu 0.11.0.0 * Added the `no-space` value for the `in-style` option. See [issue 291](https://github.com/fourmolu/fourmolu/291) ### Upstream changes: #### 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.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). ## Fourmolu 0.10.1.0 * Fix bug where using `{-` in a single-line comment would wrongfully escape it ([#265](https://github.com/fourmolu/fourmolu/issues/265)) * Fix idempotence bug with indented multiline comments ([#273](https://github.com/fourmolu/fourmolu/issues/273)) ## Fourmolu 0.10.0.0 New options: * New `leading-args` option to `function-arrows` configuration that allows leading arrows only for function arguments ([#233](https://github.com/fourmolu/fourmolu/issues/233)) * Add `haddock-style-module` option ([#135](https://github.com/fourmolu/fourmolu/pull/135)) Improvements of existing options: * Add unicode formatting for quasiquotes and arrow brackets ([#261](https://github.com/fourmolu/fourmolu/pull/261)) Bug fixes: * Fix bug with `let-style` changing single-line let-in blocks in `do` blocks to multiline. * Don't consider the first space after `--` part of the comment ([#255](https://github.com/fourmolu/fourmolu/pull/255)) ### Upstream changes: #### 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`. ## Fourmolu 0.9.0.0 New configuration options: * Add `let-style` and `in-style` configuration options ([#229](https://github.com/fourmolu/fourmolu/pull/229)). The default is set to `let-style: auto` and `in-style: right-align`, which should not reformat already formatted files _(with some exceptions depending on comment placement)_, but allows users to format with `newline` without additional configuration. * Add `unicode` configuration ([#206](https://github.com/fourmolu/fourmolu/pull/206)) Bug fixes: * Fix some edge cases with function arrows ([#247](https://github.com/fourmolu/fourmolu/pull/247)) * Fix formatting of module header + export lists when `WARNING` or `DEPRECATED` pragma is present ([#244](https://github.com/fourmolu/fourmolu/pull/244)) * Fixed a bug where an extra space was inserted before promoted types (e.g. `foo @'True`) ([#211](https://github.com/fourmolu/fourmolu/pull/211)) * When `--respectful` is enabled, a `where` keyword on the line after the export list will not be moved up to the end of the previous line. ([#167](https://github.com/fourmolu/fourmolu/issues/167)) ## Fourmolu 0.8.2.0 * Add `multi-line-compact` option to `haddock-style` that will output `{-|` for multiline haddocks instead of `{- |` ([#130](https://github.com/fourmolu/fourmolu/pull/130)) * Add `function-arrows` configuration option to style arrow placement in type signatures ([#209](https://github.com/fourmolu/fourmolu/pull/209)) ## Fourmolu 0.8.1.0 * Add `emptyConfig` ([#221](https://github.com/fourmolu/fourmolu/pull/221)) * Fixed CLI options not overriding config file options, broken in 0.7.0.0 ([#225](https://github.com/fourmolu/fourmolu/pull/225)) ## Fourmolu 0.8.0.0 * Consolidate `import-export-comma-style` and `diff-friendly-import-export` into a new option `import-export-style` ([#201](https://github.com/fourmolu/fourmolu/pull/207)) * Accept folders as input ([#213](https://github.com/fourmolu/fourmolu/issues/213)) ### Upstream changes: #### 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). ## Fourmolu 0.7.0.1 * Fix bad copy/paste where parsing errors for `haddock-style` would mention `CommaStyle` * Include relevant test files in sdist bundle ## Fourmolu 0.7.0.0 * Add `--quiet` flag to make the output quieter * Removed `--cabal-default-extensions` flag; the behavior is now enabled by default * Add `fixities` configuration to `fourmolu.yaml` * See the notes in the Ormolu changelog below, except instead of providing fixity information in a `.ormolu` file, it should be in a `fixities` config option in `fourmolu.yaml`, e.g. ```yaml fixities: - 'infixr 8 .=' - 'infixr 5 #' ``` * Fixed issue with `import-export-comma-style` for multiline import/export elements ([#187](https://github.com/fourmolu/fourmolu/pull/187)) * Multiline haddock comments with consecutive empty newlines will no longer report an "AST differs" error ([#172](https://github.com/fourmolu/fourmolu/issues/172)) ### Upstream changes: #### 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). ## Fourmolu 0.6.0.0 * Fixed regression in 0.5.0.0 with multiline tuples ([#162](https://github.com/fourmolu/fourmolu/pull/162)) * Fixed regression in 0.5.0.0 with multiline record types ([#160](https://github.com/fourmolu/fourmolu/pull/160)) * Fixed regression in 0.5.0.0 with indentation after a list comprehension ([#149](https://github.com/fourmolu/fourmolu/pull/149)) * Add `import-export-comma-style` configuration to allow leading commas in module import/export lists ## Fourmolu 0.5.0.0 * Fixed issue with leading commas in guards ([#123](https://github.com/fourmolu/fourmolu/pull/123)) * Use trailing haddocks for record fields when using leading commas ([#124](https://github.com/fourmolu/fourmolu/pull/124)) ### Upstream changes: #### 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). ## Fourmolu 0.4.0.0 * Write "Loaded config from" message to `stderr` instead of `stdout` ([#42](https://github.com/fourmolu/fourmolu/pull/42)) * Fixed issue with multiline haddocks in indented contexts ([#64](https://github.com/fourmolu/fourmolu/pull/64)) * Avoid renaming magic comments ([#90](https://github.com/fourmolu/fourmolu/pull/90)) ### Upstream changes: #### 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). ## Fourmolu 0.3.0.0 * New config option `newlines-between-decls`, to choose the number of blank lines between top-level declarations. * Minor CLI improvements. In particular, the set of valid values for each option is communicated more consistently. ## Fourmolu 0.2.0.0 * More consistent indentation. Previously, with indentation set to n, some constructs such as nested lists and tuples would use an ugly mix of n-space and 2-space indentation. * New configuration options (see README or Hackage docs for details): * `comma-style` * `record-brace-space` * `indent-wheres` * `diff-friendly-import-export` * `respectful` * `haddock-style` ### Upstream changes: #### 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). ## Fourmolu 0.1.1.0 ### Upstream changes: #### 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). ## Fourmolu 0.1.0.0 * Allow configuration of indentation size via `fourmolu.yaml` config files. * An operator on a new line is no longer indented when its left operand is a do-block. This prevents the AST from potentially changing when indenting by more than two spaces. ### Upstream changes: #### 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. ## Fourmolu 0.0.6.0 * The project was fourked to provide four space indent. ## 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. fourmolu-0.18.0.0/README.md0000644000000000000000000002753114745250261013271 0ustar0000000000000000# Fourmolu [![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/fourmolu.svg?style=flat)](https://hackage.haskell.org/package/fourmolu) [![CI](https://github.com/fourmolu/fourmolu/actions/workflows/ci.yml/badge.svg)](https://github.com/fourmolu/fourmolu/actions/workflows/ci.yml) * [Configuration](#configuration) * [Installation](#installation) * [Building from source](#building-from-source) * [Usage](#usage) * [Web app](#web-app) * [Editor integration](#editor-integration) * [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) * [Troubleshooting](#troubleshooting) * [Operators are being formatted weirdly!](#operators-are-being-formatted-weirdly) * [Limitations](#limitations) * [Breaking changes policy](#breaking-changes-policy) * [Contributing](#contributing) * [License](#license) Fourmolu is a formatter for Haskell source code. It is a fork of [Ormolu](https://github.com/tweag/ormolu), with upstream improvements continually merged. We share all bar one of Ormolu's goals: * Using GHC's own parser to avoid parsing problems caused by [`haskell-src-exts`](https://hackage.haskell.org/package/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. * That 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. * ~~Implementing one “true” formatting style which admits no configuration.~~ We allow configuration of various parameters, via CLI options or config files. We encourage any contributions which add further flexibility. ## Configuration See https://fourmolu.github.io/config/ ## Installation To install the latest release from Hackage, simply install with Cabal or Stack: ```console $ cabal install fourmolu $ stack install fourmolu ``` ## Building from source ```console $ cabal build -fdev $ stack build --flag fourmolu:dev ``` The `dev` flag may be omitted in your local workflow as you work, but CI may not pass if you only build without the `dev` flag. ## Usage The following will print the formatted output to the standard output. ```console $ fourmolu Module.hs ``` Add `-i` (or `--mode inplace`) to replace the contents of the input file with the formatted output. ```console $ fourmolu -i Module.hs ``` Specify a directory to recursively process all of its `.hs` files: ```console $ fourmolu -i src ``` Or find all files in a project with `git ls-files`: ```bash $ fourmolu --mode inplace $(git ls-files '*.hs') # Or to avoid hitting command line length limits and enable parallelism (12-way here): $ git ls-files -z '*.hs' | xargs -P 12 -0 fourmolu --mode inplace ``` To check if files are already formatted (useful on CI): ```console $ fourmolu --mode check src ``` #### :zap: Beware git's `core.autocrlf` on Windows :zap: Fourmolu's output always uses LF line endings. In particular, `fourmolu --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`. ### Web app See https://fourmolu.github.io/ to try Fourmolu in your browser. This is re-deployed on every new commit to `main`, so will use the latest version of Fourmolu, potentially including unreleased changes. ### Editor integration Fourmolu can be integrated with your editor via the [Haskell Language Server](https://haskell-language-server.readthedocs.io/en/latest/index.html). Just set `haskell.formattingProvider` to `fourmolu` ([instructions](https://haskell-language-server.readthedocs.io/en/latest/configuration.html#language-specific-server-options)). ### GitHub actions [`run-fourmolu`][https://github.com/haskell-actions/run-fourmolu] is the recommended way to ensure that a project is formatted with Fourmolu. ### Language extensions, dependencies, and fixities Fourmolu automatically locates the Cabal file that corresponds to a given source code file. Cabal files are used to extract both default extensions and dependencies. Default extensions directly affect behavior of the GHC parser, while dependencies are used to figure out fixities of operators that appear in the source code. Fixities can also be overridden via the `fixities` configuration option in `fourmolu.yaml`. When the input comes from stdin, one can pass `--stdin-input-file` which will give Fourmolu the location that should be used as the starting point for searching for `.cabal` files. Here is an example of the `fixities` configuration: ```yaml fixities: - infixr 9 . - infixr 5 ++ - infixl 4 <$ - infixl 1 >>, >>= - infixr 1 =<< - infixr 0 $, $! - infixl 4 <*>, <*, *>, <**> - infixr 3 >~< - infixr 3.3 |~| - infixr 3.7 <~> ``` It uses exactly the same syntax as usual Haskell fixity declarations to make it easier for Haskellers to edit and maintain. Since Ormolu 0.7.8.0 fractional precedences are supported for more precise control over formatting of complex operator chains. `fourmolu.yaml` can also contain instructions about module re-exports that Fourmolu should be aware of. This might be desirable because at the moment Fourmolu cannot know about all possible module re-exports in the ecosystem and only few of them are actually important when it comes to fixity deduction. In 99% of cases the user won't have to do anything, especially since most common re-exports are already programmed into Fourmolu. (You are welcome to open PRs to make Fourmolu aware of more re-exports by default.) However, when the fixity of an operator is not inferred correctly, making Fourmolu aware of a re-export may come in handy. Here is an example: ```yaml reexports: - module Control.Lens exports Control.Lens.At - module Control.Lens exports "lens" Control.Lens.Lens ``` Explicit package names are allowed in re-export declarations (see the example above). Finally, all of the above-mentioned parameters can be controlled from the command line: * Language extensions can be specified with the `-o` or `--ghc-opt` flag. * Dependencies can be specified with the `-p` or `--package` flag. * Fixities can be specified with the `-f` or `--fixity` flag. * Re-exports can be specified with the `-r` or `--reexport` flag. Searching for `.cabal` files can be disabled by passing `--no-cabal`. ### Magic comments Fourmolu understands two magic comments: ```haskell {- FOURMOLU_DISABLE -} ``` and ```haskell {- FOURMOLU_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 `{- FOURMOLU_DISABLE -}` at the very top. Note that for Fourmolu to work the fragments where Fourmolu 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. `{- ORMOLU_DISABLE -}` and `{- ORMOLU_ENABLE -}`, respectively, can be used to the same effect, and the two styles of magic comments can be mixed. ### Regions One can ask Fourmolu 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. Note that the selected region needs to be parseable Haskell code on its own. ### 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) 400 | Failed to load Fourmolu configuration file ### Using as a library The `fourmolu` 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.10.2.0. Rely on other modules at your own risk. ## Troubleshooting ### Operators are being formatted weirdly! This can happen when Ormolu doesn't know or can't determine the fixity of an operator. * If this is a custom operator, see the instructions in the [Language extensions, dependencies, and fixities](#language-extensions-dependencies-and-fixities) section to specify the correct fixities in a `fourmolu.yaml` file. * If this is a third-party operator (e.g. from `base` or some other package from Hackage), Ormolu probably doesn't recognize that the operator is the same as the third-party one. Some reasons this might be the case: * You might have a custom Prelude that re-exports things from Prelude * You might have `-XNoImplicitPrelude` turned on If any of these are true, make sure to specify the reexports correctly in a `fourmolu.yaml` file. You can see how Ormolu decides the fixity of operators if you use `--debug`. ## 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](https://github.com/tweag/ormolu/blob/master/DESIGN.md#cpp) section in the design notes for a discussion of the dangers. * Various minor idempotence issues, most of them are related to comments or column limits. ## Breaking changes policy Fourmolu is still in a relatively early stage of development, but it is in wide enough use that stability is a desirable property. Fourmolu aims to uphold the following principles: 1. It will always be possible to replicate Ormolu's formatting with a suitable `fourmolu.yaml` 1. Breaking changes will be avoided where possible, but may still occur in the following circumstances: * Fourmolu inherits a breaking change from Ormolu * The change reverts a prior breaking change, which caused a regression * Other exceptional situations, on a case-by-case basis ## Contributing If there are any options you'd like to see, let us know. If it's not too complicated to implement (and especially if you implement it yourself!) then we'll probably add it. See `DEVELOPER.md` for documentation. ## License See [LICENSE.md](LICENSE.md). Copyright © 2018–2020 Tweag I/O, 2020-present Matt Parsons ## Acknowledgements The vast majority of work here has been done by the Ormolu developers, and thus they deserve almost all of the credit. This project is simply intended as a haven for those of us who admire their work, but can't quite get on board with some of their decisions when it comes down to the details. fourmolu-0.18.0.0/LICENSE.md0000644000000000000000000000270214745250261013407 0ustar0000000000000000Copyright © 2018–2020 Tweag I/O, 2020-present Matt Parsons 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. fourmolu-0.18.0.0/fourmolu.cabal0000644000000000000000000001412014745250261014634 0ustar0000000000000000cabal-version: 2.4 name: fourmolu version: 0.18.0.0 license: BSD-3-Clause license-file: LICENSE.md maintainer: Matt Parsons George Thomas Brandon Chinn tested-with: ghc ==9.8.4 ghc ==9.10.1 ghc ==9.12.1 homepage: https://github.com/fourmolu/fourmolu bug-reports: https://github.com/fourmolu/fourmolu/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/**/*.cabal data/**/*.hs data/**/*.txt extract-hackage-info/hackage-info.bin -- needed for integration tests fixity-tests/*.hs region-tests/*.hs fourmolu.yaml extra-doc-files: CHANGELOG.md README.md source-repository head type: git location: https://github.com/fourmolu/fourmolu.git flag dev description: Turn on development settings. default: False manual: True library exposed-modules: Ormolu Ormolu.Config Ormolu.Diff.ParseResult Ormolu.Diff.Text Ormolu.Exception Ormolu.Fixity Ormolu.Fixity.Imports Ormolu.Fixity.Internal Ormolu.Fixity.Parser Ormolu.Fixity.Printer 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.OpTree Ormolu.Printer.Meat.Declaration.RoleAnnotation Ormolu.Printer.Meat.Declaration.Rule Ormolu.Printer.Meat.Declaration.Signature Ormolu.Printer.Meat.Declaration.Splice Ormolu.Printer.Meat.Declaration.StringLiteral Ormolu.Printer.Meat.Declaration.Type Ormolu.Printer.Meat.Declaration.TypeFamily Ormolu.Printer.Meat.Declaration.Value 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.Printer.SpanStream Ormolu.Processing.Common Ormolu.Processing.Cpp Ormolu.Processing.Preprocess Ormolu.Terminal Ormolu.Terminal.QualifiedDo Ormolu.Utils Ormolu.Utils.Cabal Ormolu.Utils.Fixity Ormolu.Utils.IO hs-source-dirs: src other-modules: GHC.DynFlags default-language: GHC2021 build-depends: Cabal-syntax >=3.14 && <3.15, Diff >=0.4 && <2, MemoTrie >=0.6 && <0.7, ansi-terminal >=0.10 && <1.2, array >=0.5 && <0.6, base >=4.14 && <5, binary >=0.8 && <0.9, bytestring >=0.2 && <0.13, choice >=0.2.4.1 && <0.3, containers >=0.5 && <0.8, directory ^>=1.3, file-embed >=0.0.15 && <0.1, filepath >=1.2 && <1.6, ghc-lib-parser >=9.12 && <9.13, megaparsec >=9, mtl >=2 && <3, syb >=0.7 && <0.8, text >=2.1 && <3, -- specific to fourmolu exposed-modules: Ormolu.Imports.Grouping Ormolu.Utils.Glob Paths_fourmolu other-modules: Ormolu.Config.Gen Ormolu.Config.Types autogen-modules: Paths_fourmolu build-depends: aeson >=1.0 && <3.0, scientific >=0.3.2 && <1, if flag(dev) ghc-options: -Wall -Werror -Wredundant-constraints -Wpartial-fields -Wunused-packages else ghc-options: -O2 -Wall executable fourmolu main-is: Main.hs hs-source-dirs: app other-modules: Paths_fourmolu autogen-modules: Paths_fourmolu default-language: GHC2021 build-depends: Cabal-syntax >=3.14 && <3.15, base >=4.12 && <5, containers >=0.5 && <0.8, directory ^>=1.3, filepath >=1.2 && <1.6, ghc-lib-parser >=9.12 && <9.13, optparse-applicative >=0.14 && <0.19, text >=2.1 && <3, th-env >=0.1.1 && <0.2, unliftio >=0.2.10 && <0.3, -- specific to fourmolu build-depends: directory >=1.3.3 && <1.4, fourmolu, optparse-applicative >=0.17, terminal-size >=0.1 && <0.4, yaml >=0.11.6.0 && <1, -- We use parallelism so we need a threaded runtime to get any -- benefit. ghc-options: -threaded -rtsopts -with-rtsopts=-N if flag(dev) ghc-options: -Wall -Werror -Wredundant-constraints -Wpartial-fields -Wunused-packages -Wwarn=unused-packages else ghc-options: -O2 -Wall test-suite tests type: exitcode-stdio-1.0 main-is: Spec.hs build-tool-depends: hspec-discover:hspec-discover >=2 && <3 hs-source-dirs: tests other-modules: Ormolu.CabalInfoSpec Ormolu.Diff.TextSpec Ormolu.Fixity.ParserSpec Ormolu.Fixity.PrinterSpec Ormolu.FixitySpec Ormolu.OpTreeSpec Ormolu.Parser.OptionsSpec Ormolu.Parser.ParseFailureSpec Ormolu.Parser.PragmaSpec Ormolu.PrinterSpec default-language: GHC2021 build-depends: Cabal-syntax >=3.14 && <3.15, QuickCheck >=2.14, base >=4.14 && <5, choice >=0.2.4.1 && <0.3, containers >=0.5 && <0.8, directory ^>=1.3, filepath >=1.2 && <1.6, ghc-lib-parser >=9.12 && <9.13, hspec >=2 && <3, hspec-megaparsec >=2.2, megaparsec >=9, path >=0.6 && <0.10, path-io >=1.4.2 && <2, temporary ^>=1.3, text >=2.1 && <3, -- specific to fourmolu tests other-modules: Ormolu.Config.PrinterOptsSpec Ormolu.ConfigSpec Ormolu.Integration.CLIOptionsSpec Ormolu.Integration.CLISpec Ormolu.Integration.FixitySpec Ormolu.Integration.RegionSpec Ormolu.Integration.Utils Ormolu.Utils.GlobSpec build-depends: Diff >=1 && <2, bytestring, fourmolu, pretty >=1.0 && <2.0, process >=1.6 && <2.0, yaml, build-tool-depends: fourmolu:fourmolu if flag(dev) ghc-options: -Wall -Werror -Wredundant-constraints -Wpartial-fields -Wunused-packages else ghc-options: -O2 -Wall