diff --git a/README.md b/README.md index ebac89f4..44746c34 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ https://github.com/purescript-lua/purescript-lua/discussions/categories/ideas - [x] Lua code bundling: emits either a Lua module (a file that returns a table with functions) or an application (a file that executes itself). - [x] FFI with Lua. - [x] Dead Code Elimination (DCE). -- [x] Code inlining. +- [x] Code inlining, tunable with graduated `@inline` directives + (`always`/`never`/`arity=N`, per-field accessors, and a project-wide + `--directives` file). - [x] [Package Set](https://github.com/purescript-lua/purescript-lua-package-sets) for PureScript/Lua libs. - [x] All core libs added to the package set. - [x] First-class [Spago](https://github.com/purescript/spago) backend: `spago build`, `spago run`, and `spago test` target Lua via `pslua`. @@ -116,9 +118,10 @@ This will build and install executable `pslua.exe` C:\cabal\bin\pslua --help pslua - a PureScript backend for Lua -Usage: pslua.exe [--foreign-path FOREIGN-PATH] [--ps-output PS-PATH] - [--lua-output-file LUA-OUT-FILE] [--output-lua-ast] - [--output-ir] [--lint-ir] [-e|--entry ENTRY] [--run ENTRY] +Usage: pslua [--foreign-path FOREIGN-PATH] [--ps-output PS-PATH] + [--lua-output-file LUA-OUT-FILE] [--directives DIRECTIVES-FILE] + [--output-lua-ast] [--output-ir] [--lint-ir] [--max-locals N] + [--max-upvalues N] [-e|--entry ENTRY] [--run ENTRY] Compile PureScript's CoreFn to Lua @@ -131,12 +134,26 @@ Available options: --lua-output-file LUA-OUT-FILE Path to write compiled Lua file to. Default: main.lua + --directives DIRECTIVES-FILE + Path to a file with project-wide inlining directives, + one per line: . + - accessor: .label or ...label + - mode: default | never | always | arity=N + Example: Data.Lens.over arity=2 + A local module-header pragma overrides the file; + the file overrides @inline export pragmas. --output-lua-ast Output Lua AST. Default: false --output-ir Output IR. Default: false --lint-ir Check IR invariants after every optimizer pass (debug). Default: false + --max-locals N Target Lua VM's hard limit on local variables + per function (LUAI_MAXVARS). + Default: 200 (Lua 5.1) + --max-upvalues N Target Lua VM's hard limit on upvalues + per function (LUAI_MAXUPVALUES). + Default: 60 (Lua 5.1) -e,--entry ENTRY Where to start compilation. Could be one of the following formats: - Application format: . @@ -151,3 +168,43 @@ Available options: Example: Acme.App.main -h,--help Show this help text ``` + +## Inlining directives + +The optimizer's inlining decisions can be tuned per binding with `@inline` +directives. A directive names a target, optionally an accessor selecting one +field of a record the binding is (or returns), and a mode: + +``` +@inline [export] name[.label|...label] (default | never | always | arity=N) +``` + +- `always` / `never` force or forbid inlining the target. +- `arity=N` inlines the target only at call sites applying at least N + arguments — a partial application stays a shared reference. This is the + switch that starts an abstraction-elimination cascade: the pasted body + meets beta reduction and the case-of-known-constructor folds, so wrappers + like `runOp (Op f) x` collapse to `f x` at every saturated site. +- `.label` targets one field of a dictionary-record binding, `...label` one + field of the record a binding returns when applied (`f(x).label`) — a + policy for a single method rather than the whole record. +- `default` explicitly resets the target to the built-in heuristics, masking + any weaker directive. + +Directives come from three sources, most specific first: + +1. **Module-header pragmas** — comment lines above `module` in the defining + module, naming its own bindings: `-- @inline myBinding arity=2`. +2. **A project directives file** (`--directives inline.txt`) — one directive + per line with fully-qualified names and no `@inline` prefix + (`Data.Lens.over arity=2`); `--` comments and blank lines are allowed. + Entries that match nothing in the build are ignored, so a shared file can + cover optional dependencies. +3. **Exported pragmas** — `-- @inline export myBinding always` in the + defining module travels with the library as its author's recommendation. + +A local pragma beats the file, and the file beats an exported pragma, per +target. Foreign bindings accept only whole-binding `always`/`never`/`default` +(their implementation is opaque to the optimizer). Note that `spago run` +re-invokes the backend without build-phase flags, so `--directives` (like all +build flags) applies to `spago build` output, not to the `--run` re-link. diff --git a/changelog.d/20260712_154500_unisay_graduated_inline_directives.md b/changelog.d/20260712_154500_unisay_graduated_inline_directives.md new file mode 100644 index 00000000..abad64b9 --- /dev/null +++ b/changelog.d/20260712_154500_unisay_graduated_inline_directives.md @@ -0,0 +1,31 @@ +### Added + +- Graduated `@inline` directives (#232). The pragma grammar grows from binary + `always`/`never` to `[export] name[.label|...label] + (default|never|always|arity=N)`: `arity=N` inlines a binding only at call + sites applying at least N arguments (bypassing the size budget) and pins it + as a shared reference elsewhere; the accessor forms attach a policy to one + dictionary field (`.label`) or to a field of the record a binding returns + (`...label`) instead of the whole record; `default` explicitly resets a + target to the built-in heuristics. A new `--directives ` option + supplies fully-qualified directives project-wide, layered by specificity: a + local module-header pragma beats the file, which beats `@inline export` + pragmas shipped by the defining module, which beat the heuristics. Unmatched + file entries are ignored, so a shared file can cover optional dependencies. + +- Constructor-eliminating reads now fold through a saturated application of a + *reference* to a top-level constructor binding (`(Op f).value0` resolves to + `f` without pasting the constructor), and projections sink through `let` + bindings to meet the record they select from. Together these let a + directive-driven paste collapse through the beta/case-of-known-constructor + cascade; as a side effect the existing specialize pass folds deeper (the + `LongReaderBind`/`LongWriterBind` goldens shrink, with unchanged runtime + output). + +### Fixed + +- An `@inline` annotation on a binding whose right-hand side is a bare + application, variable reference, or record update was silently dropped + during translation, so pragmas like `@inline foo never` had no effect on + point-free definitions. The annotation now lands on the binding root for + those shapes too. diff --git a/exe/Cli.hs b/exe/Cli.hs index 23034bd6..ddf27434 100644 --- a/exe/Cli.hs +++ b/exe/Cli.hs @@ -46,6 +46,7 @@ data Args = Args { foreignPath ∷ Tagged "foreign" (SomeBase Dir) , psOutputPath ∷ Tagged "output" (SomeBase Dir) , luaOutputFile ∷ Tagged "output-lua" (SomeBase File) + , directivesFile ∷ Maybe (Tagged "directives" (SomeBase File)) , outputIR ∷ Maybe ExtraOutput , outputLuaAst ∷ Maybe ExtraOutput , lintIR ∷ Tagged "lint-ir" Bool @@ -96,6 +97,26 @@ options = do <> bold "Default: main.lua" ] + directivesFile ← + optional . option (eitherReader (bimap displayException Tagged . parseSomeFile)) $ + fold + [ metavar "DIRECTIVES-FILE" + , long "directives" + , helpDoc . Just $ + vsep + [ "Path to a file with project-wide inlining directives," + <> softbreak + <> "one per line:" + <+> magenta ". " + , "- accessor:" <+> magenta ".label" <+> "or" <+> magenta "...label" + , "- mode:" <+> magenta "default | never | always | arity=N" + , green $ indent 2 "Example: Data.Lens.over arity=2" + , "A local module-header pragma overrides the file;" + <> softbreak + <> "the file overrides @inline export pragmas." + ] + ] + outputLuaAst ← flag Nothing (Just OutputLuaAst) . fold $ [ long "output-lua-ast" diff --git a/exe/Main.hs b/exe/Main.hs index fb13cf9d..ebed1d11 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -8,6 +8,7 @@ import Data.Text qualified as Text import Language.PureScript.Backend (CompilationResult (..)) import Language.PureScript.Backend qualified as Backend import Language.PureScript.Backend.IR qualified as IR +import Language.PureScript.Backend.IR.Inliner qualified as Inliner import Language.PureScript.Backend.IR.Pass ( PassCheckFailure , renderPassCheckFailure @@ -24,6 +25,7 @@ import Path (Abs, Dir, Path, SomeBase (..), replaceExtension, toFilePath) import Path.IO qualified as Path import Prettyprinter (defaultLayoutOptions, layoutPretty) import Prettyprinter.Render.Text (renderIO) +import Text.Megaparsec qualified as Megaparsec import Text.Pretty.Simple (pHPrint) main ∷ IO () @@ -31,6 +33,7 @@ main = Utf8.withUtf8 do Cli.Args { foreignPath , luaOutputFile + , directivesFile , outputIR , outputLuaAst , lintIR @@ -47,6 +50,19 @@ main = Utf8.withUtf8 do Path.Abs a → pure a Path.Rel r → Path.makeAbsolute r + directives ← case directivesFile of + Nothing → pure mempty + Just (Tagged someFile) → do + path ← + case someFile of + Path.Abs a → pure a + Path.Rel r → Path.makeAbsolute r + contents ← decodeUtf8 <$> readFileBS (toFilePath path) + let parser = Inliner.directivesFileParser <* Megaparsec.eof + case Megaparsec.parse parser (toFilePath path) contents of + Left errorBundle → die $ Megaparsec.errorBundlePretty errorBundle + Right parsed → pure parsed + -- `--run` overrides `--entry`: Spago's run phase invokes the backend a second -- time as `pslua --run ` (without the build-phase args), so the entry -- to compile comes from `--run` when present. @@ -58,7 +74,13 @@ main = Utf8.withUtf8 do -- Stay silent in run mode so the program's own stdout isn't polluted (the -- output may be piped); Spago already logs the run/build phases itself. when (isNothing runEntry) $ putTextLn "PS Lua: compiling ..." - Backend.compileModules psOutputPath foreignDir lintIR luaLimits entry + Backend.compileModules + psOutputPath + foreignDir + lintIR + luaLimits + directives + entry & handleModuleNotFoundError & handleModuleDecodingError & handleCoreFnError diff --git a/lib/Language/PureScript/Backend.hs b/lib/Language/PureScript/Backend.hs index 8d723f61..d81bc097 100644 --- a/lib/Language/PureScript/Backend.hs +++ b/lib/Language/PureScript/Backend.hs @@ -5,6 +5,7 @@ import Control.Monad.Oops qualified as Oops import Data.Map qualified as Map import Data.Tagged (Tagged (..), untag) import Language.PureScript.Backend.IR qualified as IR +import Language.PureScript.Backend.IR.Inliner qualified as Inliner import Language.PureScript.Backend.IR.Linker qualified as Linker import Language.PureScript.Backend.IR.Optimizer ( optimizedUberModule @@ -40,14 +41,15 @@ compileModules → Tagged "foreign" (Path Abs Dir) → Tagged "lint-ir" Bool → LuaLimits + → Inliner.Directives → AppOrModule → ExceptT (Variant e) IO CompilationResult -compileModules outputDir foreignDir lintIR limits appOrModule = do +compileModules outputDir foreignDir lintIR limits directives appOrModule = do let entryModuleName = entryPointModule appOrModule cfnModules ← CoreFn.readModuleRecursively outputDir entryModuleName let dataDecls = IR.collectDataDeclarations cfnModules irResults ← forM (Map.toList cfnModules) \(_psModuleName, cfnModule) → - Oops.hoistEither $ IR.mkModule cfnModule dataDecls + Oops.hoistEither $ IR.mkModule directives cfnModule dataDecls let (needsRuntimeLazys, irModules) = unzip irResults let linkedModule = Linker.makeUberModule (linkerMode appOrModule) irModules -- Lift the allowlisted foreign exports to IR primops before optimizing, so diff --git a/lib/Language/PureScript/Backend/IR.hs b/lib/Language/PureScript/Backend/IR.hs index 5804e44a..02aecc9d 100644 --- a/lib/Language/PureScript/Backend/IR.hs +++ b/lib/Language/PureScript/Backend/IR.hs @@ -10,6 +10,7 @@ import Data.IntCast (intCast) import Data.List.NonEmpty ((<|)) import Data.List.NonEmpty qualified as NE import Data.Map.Lazy qualified as Map +import Data.Set qualified as Set import Data.Tagged (Tagged (Tagged)) import Data.Text qualified as Text import Data.Traversable (for) @@ -35,7 +36,9 @@ import Prelude hiding (identity, show) data Context = Context { annotations - ∷ Map Name Annotation + ∷ Map Inliner.Target (Maybe Annotation) + , headerTargets + ∷ Set Inliner.Target , contextModule ∷ Cfn.Module Cfn.Ann , contextDataTypes @@ -66,15 +69,19 @@ instance MonadWriter Any RepM where {- Note [Inliner annotations must all be consumed] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The @Map Name Annotation@ in the translation 'Context' is a linear resource. -'parseAnnotations' fills it from the module's @\@inline@ pragmas, keyed by the -binding name each pragma names; 'useAnnotation' removes an entry as it attaches -the annotation to that binding; 'runRepM' then checks the map is empty and -errors with 'UnusedAnnotations' if anything is left over. +The @Map Target (Maybe Annotation)@ in the translation 'Context' is a linear +resource. 'mkModule' fills it with the resolved directives targeting this +module, keyed by the target each directive names; 'useAnnotation' / +'useAccessorAnnotations' remove entries as they attach annotations to +bindings; 'runRepM' then checks that no module-header target is left over +and errors with 'UnusedAnnotations' otherwise. The leftover check is how a misspelled or misplaced pragma is reported: an -@\@inline@ whose name matches no top-level binding is never drained, so it -surfaces as an error instead of being silently ignored. See also +@\@inline@ whose target matches no top-level binding is never drained, so it +surfaces as an error instead of being silently ignored. Targets that came +only from the @--directives@ file are exempt ('headerTargets' records which +targets appeared in the module header): a project-wide or shipped directives +file legitimately names bindings absent from the current build. See also Note [Inline annotations and inlining heuristics]. -} runRepM @@ -83,21 +90,26 @@ runRepM → Either CoreFnError (Tagged "needsRuntimeLazy" Bool, a) runRepM ctx (RepM m) = do (a, ctx') ← runStateT m ctx - let remainingAnnotations = annotations ctx' + let remainingAnnotations = + Map.restrictKeys (annotations ctx') (headerTargets ctx') unless (Map.null remainingAnnotations) do Left . CoreFnError (Cfn.moduleName (contextModule ctx)) $ UnusedAnnotations remainingAnnotations pure (Tagged . getAny $ needsRuntimeLazy ctx', a) mkModule - ∷ Cfn.Module Cfn.Ann + ∷ Inliner.Directives + → Cfn.Module Cfn.Ann → Map (ModuleName, TyName) (AlgebraicType, Map CtorName [FieldName]) → Either CoreFnError (Tagged "needsRuntimeLazy" Bool, Module) -mkModule cfnModule contextDataTypes = do - annotations ← parseAnnotations cfnModule +mkModule directives cfnModule contextDataTypes = do + (localModes, exportModes) ← parseAnnotations cfnModule + let fileModes = + Map.findWithDefault mempty (Cfn.moduleName cfnModule) directives runRepM Context - { annotations + { annotations = Inliner.resolveModes localModes fileModes exportModes + , headerTargets = Map.keysSet localModes <> Map.keysSet exportModes , contextModule = cfnModule , contextDataTypes , lastGeneratedNameIndex = 0 @@ -120,15 +132,31 @@ mkModule cfnModule contextDataTypes = do , moduleForeigns } --- See Note [Inliner annotations must all be consumed] -parseAnnotations ∷ Cfn.Module Cfn.Ann → Either CoreFnError (Map Name Annotation) +{- | Parse the module-header pragmas, split by scope: local directives +(the highest-precedence source) and @export@-scoped ones (the lowest). +-} +parseAnnotations + ∷ Cfn.Module Cfn.Ann + → Either + CoreFnError + (Map Inliner.Target Inliner.Mode, Map Inliner.Target Inliner.Mode) parseAnnotations currentModule = Cfn.moduleComments currentModule & foldMapM \case LineComment line → pure <$> parsePragmaLine line BlockComment block → traverse parsePragmaLine (lines block) - & fmap (Map.fromList . catMaybes) + & fmap (splitByScope . catMaybes) where + splitByScope + ∷ [Inliner.Pragma] + → (Map Inliner.Target Inliner.Mode, Map Inliner.Target Inliner.Mode) + splitByScope pragmas = + ( Map.fromList + [(t, m) | Inliner.Pragma Inliner.LocalScope t m ← pragmas] + , Map.fromList + [(t, m) | Inliner.Pragma Inliner.ExportScope t m ← pragmas] + ) + parsePragmaLine ∷ Text → Either CoreFnError (Maybe Inliner.Pragma) parsePragmaLine ln = do let parser = optional (Inliner.pragmaParser <* Megaparsec.eof) @@ -137,14 +165,27 @@ parseAnnotations currentModule = (CoreFnError (Cfn.moduleName currentModule) . AnnotationParsingError) -- See Note [Inliner annotations must all be consumed] -useAnnotation ∷ Name → RepM (Maybe Annotation) -useAnnotation name = do +useAnnotation ∷ Inliner.Target → RepM (Maybe Annotation) +useAnnotation target = do ctx ← get - let (ann, annotations') = + let (resolved, annotations') = -- delete the annotation from the map returning the value - Map.updateLookupWithKey (\_ _ → Nothing) name (annotations ctx) + Map.updateLookupWithKey (\_ _ → Nothing) target (annotations ctx) put $ ctx {annotations = annotations'} - pure ann + pure $ join resolved + +{- | Drain every accessor-form directive targeting the given binding name. +See Note [Inliner annotations must all be consumed]. +-} +useAccessorAnnotations ∷ Name → RepM [(Inliner.Accessor, Maybe Annotation)] +useAccessorAnnotations name = do + ctx ← get + let (matching, rest) = + Map.partitionWithKey + (\(n, accessor) _ → n == name && isJust accessor) + (annotations ctx) + put $ ctx {annotations = rest} + pure [(accessor, ann) | ((_, Just accessor), ann) ← Map.toList matching] mkImports ∷ RepM [ModuleName] mkImports = do @@ -168,10 +209,26 @@ mkReExports = mkForeigns ∷ RepM [(Ann, Name)] mkForeigns = do idents ← gets (contextModule >>> Cfn.moduleForeign) + strictTargets ← gets headerTargets forM idents \ident → do let name = identToName ident - ann ← useAnnotation name - pure (ann, name) + ann ← useAnnotation (name, Nothing) + -- A foreign value's implementation is opaque to the IR: an arity + -- policy has no body to paste and an accessor no field to select. + -- Both are errors in a module-header pragma; from the directives + -- file they are ignored like every other entry that does not apply + -- to this build (see Note [Inliner annotations must all be consumed]). + resolved ← case ann of + Just (Inliner.Arity _) + | (name, Nothing) `Set.member` strictTargets → + throwContextualError $ UnsupportedForeignAnnotation name + | otherwise → pure Nothing + other → pure other + accessors ← useAccessorAnnotations name + for_ accessors \(accessor, _resolved) → + when ((name, Just accessor) `Set.member` strictTargets) do + throwContextualError $ UnsupportedForeignAnnotation name + pure (resolved, name) collectDataDeclarations ∷ Map ModuleName (Cfn.Module Cfn.Ann) @@ -218,9 +275,10 @@ mkBinding ∷ Cfn.Bind Cfn.Ann → RepM Binding mkBinding = \case Cfn.NonRec _ann ident cfnExpr → do let name = identToName ident - ann ← useAnnotation name + ann ← useAnnotation (name, Nothing) expr ← makeExprAnnotated ann cfnExpr - pure $ Standalone (noAnn, name, expr) + annotated ← attachAccessorAnnotations name expr + pure $ Standalone (noAnn, name, annotated) Cfn.Rec bindingGroup → do modname ← gets $ contextModule >>> Cfn.moduleName bindings ← writer $ applyLazinessTransform modname bindingGroup @@ -230,6 +288,61 @@ mkBinding = \case RecursiveGroup <$> for bs \((_ann, ident), expr) → (noAnn,identToName ident,) <$> makeExpr expr +{- | Attach every accessor-form directive targeting this binding to the ann +slot of the object-literal field it selects. A directive whose accessor does +not match the binding's shape is an error when it came from the module +header, and is silently dropped when it came only from the @--directives@ +file (see Note [Inliner annotations must all be consumed]). +-} +attachAccessorAnnotations ∷ Name → Exp → RepM Exp +attachAccessorAnnotations name expr = do + accessors ← useAccessorAnnotations name + strictTargets ← gets headerTargets + foldlM (attachOne strictTargets) expr accessors + where + attachOne + ∷ Set Inliner.Target + → Exp + → (Inliner.Accessor, Maybe Annotation) + → RepM Exp + attachOne strictTargets e (accessor, resolved) = + case attachFieldAnn accessor resolved e of + Just annotated → pure annotated + Nothing + | (name, Just accessor) `Set.member` strictTargets → + throwContextualError $ AnnotationAccessorMismatch name accessor + | otherwise → pure e + +{- | Stamp an annotation onto the object-literal field an accessor selects, +walking down through lambda parameters and let bodies. A 'Inliner.Field' +accessor requires the object literal outside any lambda (a plain dictionary +record); an 'Inliner.AppliedField' accessor requires it under at least one +lambda (a record constructed by application). 'Nothing' when the binding +does not have the required shape. +-} +attachFieldAnn ∷ Inliner.Accessor → Ann → Exp → Maybe Exp +attachFieldAnn accessor resolved = go 0 + where + (depthOk, label) = case accessor of + Inliner.Field l → ((== 0), l) + Inliner.AppliedField l → ((>= 1), l) + + go ∷ Int → Exp → Maybe Exp + go depth = \case + AbsN a params body → + AbsN a params <$> go (depth + length params) body + Let a binds body → + Let a binds <$> go depth body + LiteralObject a props + | depthOk depth + , any ((== label) . fst) props → + Just . LiteralObject a $ + props <&> \(prop, value) → + if prop == label + then (prop, setAnn resolved value) + else (prop, value) + _ → Nothing + makeExpr ∷ CfnExp → RepM Exp makeExpr = makeExprAnnotated Nothing @@ -243,19 +356,25 @@ makeExprAnnotated ann cfnExpr = Cfn.Accessor _ann str expr → mkAccessor ann str expr Cfn.ObjectUpdate _ann expr patches → - mkObjectUpdate expr patches + annotate <$> mkObjectUpdate expr patches Cfn.Abs _ann ident expr → mkAbstraction ann ident expr Cfn.App _ann abstr arg → - mkApplication abstr arg + annotate <$> mkApplication abstr arg Cfn.Var _ann qualifiedIdent → - mkRef qualifiedIdent + annotate <$> mkRef qualifiedIdent Cfn.Case _ann exprs alternatives → case NE.nonEmpty alternatives of Just as → mkCase ann exprs as Nothing → throwContextualError $ EmptyCase cfnExpr Cfn.Let _ann binds exprs → mkLet ann binds exprs + where + -- These builders take no annotation of their own; stamp the root so a + -- directive on an application-, reference-, or update-rooted binding + -- is not lost. + annotate ∷ Exp → Exp + annotate = maybe id (const $ setAnn ann) ann mkLiteral ∷ Ann → Cfn.Literal CfnExp → RepM Exp mkLiteral ann = \case @@ -853,7 +972,9 @@ data CoreFnErrorReason TyName | UnicodeDecodeError UnicodeException | AnnotationParsingError (Megaparsec.ParseErrorBundle Text Void) - | UnusedAnnotations (Map Name Annotation) + | UnusedAnnotations (Map Inliner.Target (Maybe Annotation)) + | AnnotationAccessorMismatch Name Inliner.Accessor + | UnsupportedForeignAnnotation Name instance Show CoreFnErrorReason where show = \case @@ -888,3 +1009,11 @@ instance Show CoreFnErrorReason where "Annotation parsing error: " <> Megaparsec.errorBundlePretty bundle UnusedAnnotations anns → "Unused annotations: " <> toString (pShow anns) + AnnotationAccessorMismatch name accessor → + "An @inline directive for " + <> toString (nameToText name <> Inliner.printAccessor accessor) + <> " does not match the shape of the binding" + UnsupportedForeignAnnotation name → + "Unsupported @inline directive for foreign binding " + <> toString (nameToText name) + <> ": a foreign value supports only always/never/default" diff --git a/lib/Language/PureScript/Backend/IR/Inliner.hs b/lib/Language/PureScript/Backend/IR/Inliner.hs index 7f043eb3..71e07442 100644 --- a/lib/Language/PureScript/Backend/IR/Inliner.hs +++ b/lib/Language/PureScript/Backend/IR/Inliner.hs @@ -1,38 +1,87 @@ module Language.PureScript.Backend.IR.Inliner where -import Language.PureScript.Backend.IR.Names (Name, nameParser) +import Data.Char (isAlphaNum, isUpper) +import Data.Map qualified as Map +import Data.Text qualified as Text +import Language.PureScript.Backend.IR.Names + ( ModuleName + , Name + , PropName (..) + , moduleNameFromString + , nameParser + , nameToText + , runModuleName + ) import Text.Megaparsec qualified as Megaparsec import Text.Megaparsec.Char qualified as MC import Text.Megaparsec.Char.Lexer qualified as ML -type Pragma = (Name, Annotation) - {- Note [Inline annotations and inlining heuristics] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -An @\@inline always@ / @\@inline never@ pragma in a module comment -travels to the optimizer's inlining decision through several stages: - - 1. 'pragmaParser' parses one pragma comment into a 'Pragma' (the bound 'Name' - and an 'Annotation'). - 2. 'Language.PureScript.Backend.IR.parseAnnotations' collects them into a - @Map Name Annotation@ in the translation context, and 'useAnnotation' - moves each into the annotated binding's 'Ann' as the binding is - translated (see Note [Inliner annotations must all be consumed]). +An inlining directive names a target and a mode: + + @\@inline [export] name accessor? mode@ (module-header pragma) + @Some.Module.name accessor? mode@ (a @--directives@ file line) + + accessor ::= ".label" | "...label" + mode ::= default | never | always | arity=N (N > 0) + +The bare target names a whole binding. @.label@ names one field of a +dictionary-record binding, @...label@ one field of the record a binding +returns when applied (@f(x).label@) — a policy for one method instead of +the whole record. Directives come from three explicit sources, layered by +specificity (most specific wins, per target): + + 1. a local module-header pragma (no @export@) in the defining module; + 2. the project-wide @--directives@ file; + 3. an @\@inline export@ module-header pragma — a default the library + author ships with the module, overridable by the consumer's file. + +'resolveModes' performs exactly this layering; a winning @default@ still +masks the lower tiers and resolves to no annotation — the built-in +heuristics. Module-header pragmas name own-module bindings only and are +validated strictly (a target matching nothing is an error); file entries +are fully qualified and best-effort (a shared file may cover modules +absent from the build). In a whole-program optimizer @export@ needs no +transitivity machinery: the resolved annotation rides the binding into +the uber-module, so it is simply the weakest explicit tier. + +The resolved winner travels to the optimizer's decision through several +stages: + + 1. 'pragmaParser' / 'directivesFileParser' parse the sources; + 'Language.PureScript.Backend.IR.parseAnnotations' collects the + header pragmas by scope, and 'Language.PureScript.Backend.IR.mkModule' + resolves them against the file slice into a + @Map Target (Maybe Annotation)@ in the translation context. + 2. 'Language.PureScript.Backend.IR.useAnnotation' moves a whole-binding + winner into the binding root's 'Ann' as the binding is translated; + an accessor winner is stamped on the ann slot of the object-literal + field it selects (see Note [Inliner annotations must all be consumed]). 3. From there the 'Annotation' rides along as the expression's @ann@. - 4. The optimizer reads it back: @Just Always@ (via - 'Language.PureScript.Backend.IR.Optimizer.isInlinableExpr') forces - inlining. For @Just Never@, 'optimizedUberModule' collects the annotated - binding names once up front (so the veto survives later rewrites that drop - the annotation off a binding's root) and refuses to inline them. @Nothing@ - leaves the ref / small-literal / single-use heuristic to decide. - -A pragma on a foreign name is drained into 'moduleForeigns' and reaches the -linker, which binds each foreign name to an 'ObjectProp' accessor annotated -with that pragma, defaulting to 'Inline.Always' so the wrapper around the FFI -object is inlined away unless a pragma says otherwise (see -Note [Foreign bindings structure emitted by the Linker]). @never@ keeps the -accessor as a shared binding — the way to declare sharing intent for an FFI -value. + 4. 'Language.PureScript.Backend.IR.Optimizer.collectInlinePolicy' reads + every annotation back once, from the pristine uber-module — later + rewrites may strip an annotation off its node, so decisions key off + names — and the optimizer consults the resulting policy: + + * @Just Always@ on a root forces inlining ('isInlinableExpr'); + * @Never@ names are never pasted ('withBinding', the call-site + rules, and the uncurry split all veto them); + * @Arity n@ names are pasted exactly at call sites applying at + least n arguments ('inlineSaturatedCall'), bypassing the size + budget, and are vetoed everywhere else; + * field policies gate the projection rules + ('resolveDictionaryProp', 'inlineAnnotatedProjection'). + +A whole-binding pragma on a foreign name (@always@/@never@/@default@ only — +there is no body to paste at an arity, nor a field to select) is drained +into 'moduleForeigns' and reaches the linker, which binds each foreign name +to an 'ObjectProp' accessor annotated with that pragma, defaulting to +'Always' so the wrapper around the FFI object is inlined away unless a +pragma says otherwise (see Note [Foreign bindings structure emitted by the +Linker]). @never@ keeps the accessor as a shared binding — the way to +declare sharing intent for an FFI value; an explicit @default@ resolves to +the same built-in 'Always'. The 'ForeignImport' expression itself — the table of a foreign module's exports — is the one shape the optimizer refuses to inline even when it is @@ -44,18 +93,177 @@ every site is supposed to share one. The table stays hoisted as a single binding and the always-inlined 'ObjectProp' wrappers turn into field reads off it. -} -data Annotation = Always | Never + +-------------------------------------------------------------------------------- +-- Directive language ---------------------------------------------------------- + +-- | An inlining policy that rides on an expression's 'Ann' slot. +data Annotation = Always | Never | Arity Natural + deriving stock (Show, Eq, Ord) + +{- | A parsed directive mode. 'ModeDefault' (the written @default@) resolves +to no annotation — it exists so a higher-precedence source can mask a +lower-precedence directive back to the built-in heuristics; it never rides +on an 'Ann' slot. +-} +data Mode = ModeDefault | ModeAnnotation Annotation + deriving stock (Show, Eq, Ord) + +{- | The accessor part of a directive target: @.label@ names a field of a +dictionary record binding, @...label@ names a field projected out of the +result of applying the binding (@f(x).label@). +-} +data Accessor = Field PropName | AppliedField PropName + deriving stock (Show, Eq, Ord) + +-- | Render an accessor the way directives spell it. +printAccessor ∷ Accessor → Text +printAccessor = \case + Field label → "." <> renderPropName label + AppliedField label → "..." <> renderPropName label + +-- | What a directive applies to: a binding, or a field selected out of it. +type Target = (Name, Maybe Accessor) + +{- | Precedence tier of a module-header pragma: a plain (local) directive +beats the project directives file, which beats an @export@-scoped directive. +-} +data Scope = LocalScope | ExportScope + deriving stock (Show, Eq, Ord) + +-- | One parsed @\@inline@ module-header pragma. +data Pragma = Pragma + { pragmaScope ∷ Scope + , pragmaTarget ∷ Target + , pragmaMode ∷ Mode + } deriving stock (Show, Eq, Ord) +-- | The parsed contents of a @--directives@ file, grouped by module. +type Directives = Map ModuleName (Map Target Mode) + +{- | Resolve the three explicit directive sources for a module's targets into +the annotations to attach, layered by precedence: a local module-header +directive beats the project directives file, which beats an @export@-scoped +header directive. A winning 'ModeDefault' still occupies its key — masking +the lower tiers — and attaches 'Nothing' (the built-in heuristics). +-} +resolveModes + ∷ Map Target Mode + -- ^ module-header pragmas, local scope (highest precedence) + → Map Target Mode + -- ^ the @--directives@ file slice for this module + → Map Target Mode + -- ^ module-header pragmas, export scope (lowest explicit tier) + → Map Target (Maybe Annotation) +resolveModes localModes fileModes exportModes = + Map.unions [localModes, fileModes, exportModes] <&> \case + ModeDefault → Nothing + ModeAnnotation ann → Just ann + +-------------------------------------------------------------------------------- +-- Parsers ---------------------------------------------------------------------- + type Parser = Megaparsec.Parsec Void Text pragmaParser ∷ Parser Pragma pragmaParser = do symbol "@inline" - (,) <$> (nameParser <* sc) <*> annotationParser + -- @export@ is itself a valid binding name: when no target and mode + -- follow the word, backtrack and read it as the target instead. + Megaparsec.try (directiveParser ExportScope (symbol "export")) + <|> directiveParser LocalScope pass + +directiveParser ∷ Scope → Parser () → Parser Pragma +directiveParser scope prefix = do + prefix + pragmaTarget ← targetParser + pragmaMode ← modeParser + pure Pragma {pragmaScope = scope, pragmaTarget, pragmaMode} + +targetParser ∷ Parser Target +targetParser = do + name ← nameParser + accessor ← optional accessorParser + sc + pure (name, accessor) + +accessorParser ∷ Parser Accessor +accessorParser = + (AppliedField <$> (Megaparsec.chunk "..." *> propNameParser)) + <|> (Field <$> (MC.char '.' *> propNameParser)) + where + propNameParser = PropName . nameToText <$> nameParser + +modeParser ∷ Parser Mode +modeParser = + (ModeDefault <$ symbol "default") + <|> (ModeAnnotation <$> annotationParser) annotationParser ∷ Parser Annotation -annotationParser = (Always <$ symbol "always") <|> (Never <$ symbol "never") +annotationParser = + (Always <$ symbol "always") + <|> (Never <$ symbol "never") + <|> (Arity <$> arityParser) + +arityParser ∷ Parser Natural +arityParser = do + symbol "arity" + symbol "=" + arity ← ML.lexeme sc ML.decimal + when (arity == 0) $ fail "arity must be at least 1" + pure arity + +{- | The contents of a @--directives@ file: one directive per line in the +module-header pragma syntax, except that the target is fully qualified +(@Some.Module.binding@) and no scope prefix is accepted — the file is +already a global source. Blank lines and @--@ line comments are allowed. +Naming the same target twice is an error. +-} +directivesFileParser ∷ Parser Directives +directivesFileParser = do + scn + entries ← Megaparsec.many (entryParser <* scn) + foldlM insertEntry Map.empty entries + where + entryParser ∷ Parser (ModuleName, Target, Mode) + entryParser = do + modname ← qualifierParser + (target, mode) ← (,) <$> targetParser <*> modeParser + pure (modname, target, mode) + + insertEntry + ∷ Directives → (ModuleName, Target, Mode) → Parser Directives + insertEntry directives (modname, target@(name, accessor), mode) = do + let known = Map.findWithDefault Map.empty modname directives + when (Map.member target known) do + fail . toString $ + "duplicate directive for " + <> runModuleName modname + <> "." + <> nameToText name + <> maybe "" printAccessor accessor + pure $ Map.insert modname (Map.insert target mode known) directives + + -- Vertical space and @--@ line comments between directives. + scn ∷ Parser () + scn = ML.space MC.space1 (ML.skipLineComment "--") empty + +{- | The dotted module prefix of a fully-qualified target: one or more +uppercase-led, dot-terminated segments. The lowercase-led segment after +them is the binding name and is left unconsumed. +-} +qualifierParser ∷ Parser ModuleName +qualifierParser = do + segments ← Megaparsec.some (Megaparsec.try segmentParser) + pure . moduleNameFromString $ Text.intercalate "." segments + where + segmentParser ∷ Parser Text + segmentParser = do + initial ← Megaparsec.satisfy isUpper + rest ← Megaparsec.takeWhileP (Just "module name char") isAlphaNum + void $ MC.char '.' + pure $ Text.cons initial rest symbol ∷ Text → Parser () symbol = void . ML.symbol sc diff --git a/lib/Language/PureScript/Backend/IR/Optimizer.hs b/lib/Language/PureScript/Backend/IR/Optimizer.hs index e142b7c9..1772c374 100644 --- a/lib/Language/PureScript/Backend/IR/Optimizer.hs +++ b/lib/Language/PureScript/Backend/IR/Optimizer.hs @@ -8,6 +8,7 @@ import Data.List.NonEmpty qualified as NE import Data.Map qualified as Map import Data.Set qualified as Set import Data.Text qualified as Text +import GHC.Generics (Generically (..)) import Language.PureScript.Backend.IR.DCE (eliminateDeadCode) import Language.PureScript.Backend.IR.FlattenDeepBinds (flattenDeepBindsM) import Language.PureScript.Backend.IR.FloatIn (floatIn) @@ -18,8 +19,8 @@ import Language.PureScript.Backend.IR.Names ( FieldName , Name (..) , PropName - , QName - , Qualified (Local) + , QName (..) + , Qualified (Imported, Local) , qualifiedQName , renderFieldName , renderPropName @@ -76,7 +77,7 @@ import Language.PureScript.Backend.IR.Uniquify (uniquifyNames) optimizedUberModule ∷ UberModule → UberModule optimizedUberModule uber = - runSupply (runSteps (optimizerPipeline (neverInlineNames uber)) uber) + runSupply (runSteps (optimizerPipeline (collectInlinePolicy uber)) uber) {- | 'optimizedUberModule' with every pass's contract checked by the linter, failing with the name of the offending pass. Used by the test @@ -84,15 +85,16 @@ suite always, and by the CLI behind the @--lint-ir@ flag. -} optimizedUberModuleChecked ∷ UberModule → Either PassCheckFailure UberModule optimizedUberModuleChecked uber = - runSupply (runStepsChecked (optimizerPipeline (neverInlineNames uber)) uber) + runSupply + (runStepsChecked (optimizerPipeline (collectInlinePolicy uber)) uber) -{- | The IR optimization pipeline. The argument is the set of @inline never@ -bindings, collected once from the pristine module before any pass runs: -later rewrites may strip the annotation off a binding's root, so the veto -keys off the name (see Note [Inline annotations and inlining heuristics]). +{- | The IR optimization pipeline. The argument is the inlining policy +collected once from the pristine module before any pass runs: later +rewrites may strip annotations, so every directive keys off a name (see +Note [Inline annotations and inlining heuristics]). -} -optimizerPipeline ∷ Set QName → [Step] -optimizerPipeline neverNames = +optimizerPipeline ∷ InlinePolicy → [Step] +optimizerPipeline policy = [ -- The entry pass (issue #139): establishes the global-uniqueness -- condition (GUC = 'UniqueBinders') that every -- following pass requires and preserves. @@ -161,7 +163,7 @@ optimizerPipeline neverNames = optimizePass = Pass { passName = "optimize" - , passRun = optimizeModule SkipCallSites neverNames + , passRun = optimizeModule SkipCallSites policy , passRequires = guc , passEnsures = guc } @@ -172,7 +174,7 @@ optimizerPipeline neverNames = specializePass = Pass { passName = "specialize" - , passRun = optimizeModule InlineCallSites neverNames + , passRun = optimizeModule InlineCallSites policy , passRequires = guc , passEnsures = guc } @@ -187,7 +189,7 @@ optimizerPipeline neverNames = uncurryPass = Pass { passName = "uncurry" - , passRun = pure . uncurryWorkerWrapper neverNames + , passRun = pure . uncurryWorkerWrapper (uncurryVeto policy) , passRequires = guc , passEnsures = guc } @@ -239,26 +241,73 @@ mergeForeignsIntoBindings uberModule@UberModule {..} = map Standalone uberModuleForeigns <> uberModuleBindings } -{- | The top-level bindings annotated @inline never@, collected once from the -pristine module. Later rewrites can drop the annotation off a binding's root -expression (e.g. constant folding replaces it with a fresh node), so the veto -must key off the name rather than re-reading the annotation after optimization. +{- | Every inlining directive of the module, keyed by binding name. +Collected once from the pristine module: later rewrites can drop an +annotation off its node (e.g. constant folding replaces a binding's root +with a fresh one), so decisions key off names rather than re-reading +annotations after optimization. See Note [Inline annotations and inlining heuristics]. -} -neverInlineNames ∷ UberModule → Set QName -neverInlineNames UberModule {uberModuleBindings, uberModuleForeigns} = - Set.fromList $ - [ qname - | Standalone (qname, expr) ← uberModuleBindings - , getAnn expr == Just Never - ] +data InlinePolicy = InlinePolicy + { policyNever ∷ Set QName + -- ^ never pasted anywhere + , policyArity ∷ Map QName Natural + -- ^ pasted exactly at call sites applying at least N arguments + , policyFields ∷ Map QName (Map PropName Annotation) + -- ^ @.label@ policies: fields of a dictionary record binding + , policyAppliedFields ∷ Map QName (Map PropName Annotation) + -- ^ @...label@ policies: fields of a record a binding returns + } + deriving stock (Generic, Show) + deriving (Semigroup, Monoid) via (Generically InlinePolicy) + +collectInlinePolicy ∷ UberModule → InlinePolicy +collectInlinePolicy UberModule {uberModuleBindings, uberModuleForeigns} = + foldMap fromBinding $ + [(qname, expr) | Standalone (qname, expr) ← uberModuleBindings] -- Foreign accessors merge into the bindings mid-pipeline - -- ('mergeForeignsIntoBindings'), after this set is collected, so + -- ('mergeForeignsIntoBindings'), after the policy is collected, so -- their annotations are read here. - <> [ qname - | (qname, expr) ← uberModuleForeigns - , getAnn expr == Just Never - ] + <> uberModuleForeigns + where + fromBinding ∷ (QName, Exp) → InlinePolicy + fromBinding (qname, expr) = rootPolicy <> fieldsPolicy + where + rootPolicy = case getAnn expr of + Just Never → mempty {policyNever = Set.singleton qname} + Just (Arity n) → mempty {policyArity = Map.singleton qname n} + _ → mempty + + fieldsPolicy = case objectFields expr of + Just (depth, props) + | anns ← + Map.fromList + [(prop, a) | (prop, value) ← props, Just a ← [getAnn value]] + , not (Map.null anns) → + if depth == 0 + then mempty {policyFields = Map.singleton qname anns} + else mempty {policyAppliedFields = Map.singleton qname anns} + _ → mempty + + -- The object literal a binding evaluates or returns, along with the + -- number of lambda parameters peeled on the way to it — the shape + -- accessor annotations are attached to at translation. + objectFields ∷ Exp → Maybe (Int, [(PropName, Exp)]) + objectFields = go 0 + where + go ∷ Int → Exp → Maybe (Int, [(PropName, Exp)]) + go depth = \case + AbsN _ params body → go (depth + length params) body + Let _ _ body → go depth body + LiteralObject _ props → Just (depth, props) + _ → Nothing + +{- | Names the uncurry pass may not split: rewriting their call sites to +@$w@ worker calls would hide those sites from the name-keyed policies. +-} +uncurryVeto ∷ InlinePolicy → Set QName +uncurryVeto InlinePolicy {policyNever, policyArity, policyAppliedFields} = + policyNever <> Map.keysSet policyArity <> Map.keysSet policyAppliedFields -- | Free-reference counts keyed by the referenced qualified name. type FreeRefs = Map (Qualified Name) Natural @@ -300,10 +349,10 @@ references changed earlier in the same run (issue #143). -} optimizeModule ∷ CallSiteInlining - → Set QName + → InlinePolicy → UberModule → SupplyM (UberModule, WasRewritten) -optimizeModule inlining neverNames UberModule {..} = runWriterT do +optimizeModule inlining policy UberModule {..} = runWriterT do -- See Note [Incremental free-reference counting] let initialCounts = Map.unionsWith (+) (countFreeRefs . snd <$> uberModuleExports) @@ -333,9 +382,17 @@ optimizeModule inlining neverNames UberModule {..} = runWriterT do Map.fromList [ (qualifiedQName qname, expr) | Standalone (qname, expr) ← uberModuleBindings - , qname `Set.notMember` neverNames + , qname `Set.notMember` policyNever policy ] + -- An @inline never@ name may not be pasted at all; an @inline arity=N@ + -- name is pasted only at qualifying call sites — pasting the whole + -- binding would reach under-applied sites too. + vetoedWholeBinding ∷ QName → Bool + vetoedWholeBinding qname = + qname `Set.member` policyNever policy + || qname `Map.member` policyArity policy + -- Whether 'withBinding' may drop a whole top-level binding by inlining it -- into its use sites. Off exactly when call-site inlining is on, because the -- two are unsound together: 'inlineEnv' is a snapshot taken before this run @@ -358,7 +415,7 @@ optimizeModule inlining neverNames UberModule {..} = runWriterT do -- the module, so a converged module reports 'Unmodified'. optimizeExp ∷ Exp → WriterT WasRewritten SupplyM Exp optimizeExp e = do - (e', rewritten) ← lift (optimizedExpressionM inlineEnv e) + (e', rewritten) ← lift (optimizedExpressionM policy inlineEnv e) e' <$ tell rewritten -- See Note [Incremental free-reference counting] @@ -378,7 +435,7 @@ optimizeModule inlining neverNames UberModule {..} = runWriterT do occurrences = Map.findWithDefault 0 qn counts isUsedOnce = occurrences == 1 if mayInlineWholeBinding - && qname `Set.notMember` neverNames + && not (vetoedWholeBinding qname) && not (isForeignImport expr) && (isInlinableExpr expr || isUsedOnce) then do @@ -529,18 +586,22 @@ its own supply and no inlining environment. Production code uses 'optimizedExpressionM' so all passes share one supply. -} optimizedExpression ∷ Exp → Exp -optimizedExpression = runSupply . fmap fst . optimizedExpressionM mempty +optimizedExpression = runSupply . fmap fst . optimizedExpressionM mempty mempty -optimizedExpressionM ∷ InlineEnv → Exp → SupplyM (Exp, WasRewritten) -optimizedExpressionM env = +optimizedExpressionM + ∷ InlinePolicy → InlineEnv → Exp → SupplyM (Exp, WasRewritten) +optimizedExpressionM policy env = -- See Note [Eta reduction is unsound] rewriteExpBottomUpM ( constantFolding `thenRewrite` reduceObjectProp + `thenRewrite` sinkProjectionIntoLet `thenRewrite` reduceKnownConstructor + `thenRewrite` reduceKnownCtorRefRead env `thenRewrite` propagateKnownCtorThroughLet env - `thenRewrite` resolveDictionaryProp env - `thenRewrite` inlineSaturatedCall env + `thenRewrite` resolveDictionaryProp policy env + `thenRewrite` inlineAnnotatedProjection policy env + `thenRewrite` inlineSaturatedCall policy env `thenRewrite` betaReduce `thenRewrite` removeUnreachableThenBranch `thenRewrite` removeUnreachableElseBranch @@ -707,6 +768,22 @@ reduceObjectProp = Nothing → ObjectProp ann obj prop _ → Nothing +{- | @(let … in body).label ===> let … in body.label@ + +Bindings evaluate first either way, so the move is behaviour-preserving +under strict evaluation, and the label is static, so nothing can be +captured. Pasting a record constructor into a projected application site +(see 'inlineAnnotatedProjection') leaves exactly this shape behind once +'betaReduce' let-binds a non-trivial argument; sinking the projection +lets 'reduceObjectProp' finish the resolution. +-} +sinkProjectionIntoLet ∷ Applicative m ⇒ RewriteRuleM m Ann +sinkProjectionIntoLet = + pure . \case + ObjectProp ann (Let letAnn binds body) prop → + Just $ Let letAnn binds (ObjectProp ann body prop) + _ → Nothing + {- | Case-of-known-constructor for algebraic types (issue #177), the 'reduceObjectProp' twin for data constructors: @@ -974,10 +1051,61 @@ propagateKnownCtorThroughLet env = \case Ref daAnn (Local f) other → over subexpressions go other - fieldIndex ∷ [FieldName] → PropName → Maybe Natural - fieldIndex fields prop = - fromIntegral - <$> List.findIndex ((renderPropName prop ==) . renderFieldName) fields +{- | The position of a record-projection label among a constructor's +declared fields (@value0@, @value1@, …). +-} +fieldIndex ∷ [FieldName] → PropName → Maybe Natural +fieldIndex fields prop = + fromIntegral + <$> List.findIndex ((renderPropName prop ==) . renderFieldName) fields + +{- | The through-a-reference companion of 'reduceKnownConstructor' — the +relationship 'resolveDictionaryProp' bears to 'reduceObjectProp'. A +user-written @Op f@ compiles to a saturated application of a /reference/ +to the @Op@ worker binding, which 'inlineSaturatedCall' deliberately +leaves in place (its 'Ctor' RHS is not a lambda). A constructor-eliminating +read over that spine — the shape a directive-driven paste exposes — +would otherwise stall right before the fold: 'reduceKnownConstructor' +needs an in-place 'Ctor' head and 'propagateKnownCtorThroughLet' needs +the read behind a 'Let' binder. The reference is resolved through the +environment only for its declared fields and tag — no 'Ctor' node is +pasted — and discarded sibling arguments are dropped with the licence +'reduceKnownConstructor' spells out. The folded value takes the read +node's own annotation, not the argument's, for the reason spelled out +on 'reduceObjectProp'. +-} +reduceKnownCtorRefRead ∷ Applicative m ⇒ InlineEnv → RewriteRuleM m Ann +reduceKnownCtorRefRead env = + pure . \case + ObjectProp ann spine prop + | Just (_algTy, fields, args, _tag) ← saturatedCtorRefApp env spine + , Just i ← fieldIndex fields prop + , Just arg ← args !!? fromIntegral i → + Just (setAnn ann arg) + DataArgumentByIndex ann i spine + | Just (_algTy, _fields, args, _tag) ← saturatedCtorRefApp env spine + , Just arg ← args !!? fromIntegral i → + Just (setAnn ann arg) + -- Tag reads fold for sum types only, as in 'reduceKnownConstructor'. + ReflectCtor ann spine + | Just (SumType, _fields, _args, tag) ← saturatedCtorRefApp env spine → + Just (LiteralString ann tag) + _ → Nothing + +{- | A non-empty, saturated application spine whose head references a +top-level constructor binding, resolved through the inline environment. +The returned tag and field list come from the constructor's declaration; +the arguments come from the spine. +-} +saturatedCtorRefApp + ∷ InlineEnv → Exp → Maybe (AlgebraicType, [FieldName], [Exp], Text) +saturatedCtorRefApp env expr = case unwindApp expr of + (Ref _ ctorRef, args@(_ : _)) + | Just (Ctor _ algTy modName tyName ctorName fields) ← + Map.lookup ctorRef env + , length args == length fields → + Just (algTy, fields, args, ctorId modName tyName ctorName) + _ → Nothing {- | Resolve a method projection off a known top-level dictionary (issue #180). When @dict@ is a reference to a top-level 'LiteralObject' binding, @@ -999,17 +1127,100 @@ It declines a method that names its own dictionary (a superclass or recursive dictionary), which pasting would dangle or unfold forever, and one larger than 'inlineSizeBudget'. The result takes the projection's own annotation, never the method's, for the reason 'reduceObjectProp' spells out. + +A @.label@ directive on the field replaces the budget: @never@ declines +outright, @always@ resolves regardless of size, and @arity=N@ defers to +'inlineAnnotatedProjection', which requires the projection to be applied. +The veto is best-effort rather than airtight: a dictionary referenced +exactly once is pasted whole by the use-once path in 'optimizeModule', and +'reduceObjectProp' then folds the projection without consulting any policy — +harmless, since sharing is moot at a single use site. -} -resolveDictionaryProp ∷ InlineEnv → RewriteRuleM SupplyM Ann -resolveDictionaryProp env = \case +resolveDictionaryProp ∷ InlinePolicy → InlineEnv → RewriteRuleM SupplyM Ann +resolveDictionaryProp policy env = \case ObjectProp ann (Ref _ dictName) prop | Just (LiteralObject _ props) ← Map.lookup dictName env , Just method ← List.lookup prop props , countFreeRef dictName method == 0 - , expSize method <= inlineSizeBudget → + , maybe + (expSize method <= inlineSizeBudget) + (== Always) + (fieldPolicy policy dictName prop) → Just . setAnn ann <$> freshenBinders method _ → pure Nothing +-- | The @.label@ directive covering a projection of a top-level binding. +fieldPolicy ∷ InlinePolicy → Qualified Name → PropName → Maybe Annotation +fieldPolicy policy name prop = + refQName name + >>= (`Map.lookup` policyFields policy) + >>= Map.lookup prop + +{- | The @...label@ directive covering a projection out of an application +of a top-level binding. +-} +appliedFieldPolicy + ∷ InlinePolicy → Qualified Name → PropName → Maybe Annotation +appliedFieldPolicy policy name prop = + refQName name + >>= (`Map.lookup` policyAppliedFields policy) + >>= Map.lookup prop + +{- | Resolve a projection under an accessor-form directive (the +@.label@ / @...label@ forms): + + * @.label arity=N@ — @(dict.label) a₁ … aₖ@, @k ≥ N@: the method is read + out of the dictionary literal in the environment and pasted at the + head of the spine, exactly as 'resolveDictionaryProp' would paste it, + but only at a qualifying application. + * @...label always@ — @(f x…).label@: the record constructor @f@ is + pasted under the projection; 'betaReduce', 'sinkProjectionIntoLet' + and 'reduceObjectProp' then collapse the projection to the selected + field. + * @...label arity=N@ — @((f x…).label) a₁ … aₖ@, @k ≥ N@: the same + paste, gated on the arguments applied to the projection result. + +Like the arity path of 'inlineSaturatedCall', an explicit directive +bypasses the size budget; the self-reference and 'pasteableRoot' guards +stay, and every pasted copy drops its annotations' claim to the binding +('setAnn' 'Nothing'). +-} +inlineAnnotatedProjection ∷ InlinePolicy → InlineEnv → RewriteRuleM SupplyM Ann +inlineAnnotatedProjection policy env expr = case expr of + ObjectProp ann inner label + | (Ref _ fname, innerArgs@(_ : _)) ← unwindApp inner + , Just Always ← appliedFieldPolicy policy fname label → + pasteCtor ann fname innerArgs label + (unwindApp → (ObjectProp ann inner label, args@(_ : _))) → + case inner of + Ref _ dictName + | Just (Arity n) ← fieldPolicy policy dictName label + , fromIntegral (length args) >= n + , Just (LiteralObject _ props) ← Map.lookup dictName env + , Just method ← List.lookup label props + , countFreeRef dictName method == 0 → + Just . rebuildSpine args . setAnn Nothing + <$> freshenBinders method + (unwindApp → (Ref _ fname, innerArgs@(_ : _))) + | Just (Arity n) ← appliedFieldPolicy policy fname label + , fromIntegral (length args) >= n → do + pasted ← pasteCtor ann fname innerArgs label + pure $ rebuildSpine args <$> pasted + _ → pure Nothing + _ → pure Nothing + where + pasteCtor + ∷ Ann → Qualified Name → [Exp] → PropName → SupplyM (Maybe Exp) + pasteCtor ann fname innerArgs label = + case Map.lookup fname env of + Just rhs + | countFreeRef fname rhs == 0 + , pasteableRoot rhs → do + rhs' ← freshenBinders rhs + pure . Just $ + ObjectProp ann (rebuildSpine innerArgs (setAnn Nothing rhs')) label + _ → pure Nothing + {- | Inline a top-level lambda binding into a saturated call site (issue #180). When the head of an application spine references a top-level binding whose RHS is a lambda, and the spine supplies at least the arguments the @@ -1027,21 +1238,64 @@ The rule declines a self-referential RHS, which cannot arise for a Standalone binding under GUC but must not be unfolded on the non-GUC input the rewrite also runs on (Note [Eta reduction is unsound] is the reason the environment holds no recursive-group members either). + +A binding under an @inline arity=N@ directive takes a different gate: the +site qualifies by argument count alone — at least N arguments applied — and +the explicit directive bypasses the size budget and the manifest-lambda +requirement (pasting a non-lambda value duplicates work, which is exactly +what the user signed for; in a pure language it is behaviour-preserving). +Below N arguments nothing pastes, not even the default guards: the +directive pins the binding as a shared reference at partial sites. -} -inlineSaturatedCall ∷ InlineEnv → RewriteRuleM SupplyM Ann -inlineSaturatedCall env expr = case unwindApp expr of +inlineSaturatedCall ∷ InlinePolicy → InlineEnv → RewriteRuleM SupplyM Ann +inlineSaturatedCall policy env expr = case unwindApp expr of (Ref _ fname, args) | not (null args) - , Just rhs ← Map.lookup fname env - , AbsN _ params _ ← rhs - , length args >= length params - , countFreeRef fname rhs == 0 - , expSize rhs <= inlineSizeBudget → - Just . rebuildSpine args <$> freshenBinders rhs + , Just rhs ← Map.lookup fname env → + case directedArity fname of + Just arity + | fromIntegral (length args) >= arity + , countFreeRef fname rhs == 0 + , not (isForeignImport rhs) + , pasteableRoot rhs → + -- The pasted copy is no longer the directed binding, so + -- it does not keep the directive annotation. + Just . rebuildSpine args . setAnn Nothing + <$> freshenBinders rhs + Just _underApplied → pure Nothing + Nothing + | AbsN _ params _ ← rhs + , length args >= length params + , countFreeRef fname rhs == 0 + , expSize rhs <= inlineSizeBudget → + Just . rebuildSpine args <$> freshenBinders rhs + _ → pure Nothing _ → pure Nothing where - rebuildSpine ∷ [Exp] → Exp → Exp - rebuildSpine args head' = foldl' (\f a → AppN Nothing f (a :| [])) head' args + directedArity ∷ Qualified Name → Maybe Natural + directedArity fname = refQName fname >>= (`Map.lookup` policyArity policy) + +-- | Re-apply the arguments 'unwindApp' peeled, as a unary spine. +rebuildSpine ∷ [Exp] → Exp → Exp +rebuildSpine args head' = foldl' (\f a → AppN Nothing f (a :| [])) head' args + +{- | 'inlineSaturatedCall' rebuilds the application spine as a unary chain, +so pasting an n-ary lambda root would produce an under-applied redex the +'WellApplied' lint rejects and exact-arity 'betaReduce' never repairs. Only +unary chains and non-lambda roots may be pasted. Directive-marked names are +excluded from the uncurry split ('uncurryVeto'), so their roots stay +translation-produced unary chains and this guard does not fire in practice. +-} +pasteableRoot ∷ Exp → Bool +pasteableRoot = \case + AbsN _ (_ :| (_ : _)) _ → False + _ → True + +-- | The 'QName' a reference resolves to, when it names a top-level binding. +refQName ∷ Qualified Name → Maybe QName +refQName = \case + Imported modname name → Just (QName modname name) + Local _ → Nothing {- Note [Beta reduction and local inlining share an inlining guard] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1371,8 +1625,7 @@ isInlinableExpr expr = hasInlineAnnotation = getAnn >>> \case Just Always → True - Just Never → False - Nothing → False + _ → False -- The Deref tier. The explicit disjuncts above are subsumed for the -- shapes they share (a Ref, a short scalar), but kept: they also admit diff --git a/test/Language/PureScript/Backend/IR/Inliner/Spec.hs b/test/Language/PureScript/Backend/IR/Inliner/Spec.hs index 9fffadf2..006be1b1 100644 --- a/test/Language/PureScript/Backend/IR/Inliner/Spec.hs +++ b/test/Language/PureScript/Backend/IR/Inliner/Spec.hs @@ -1,34 +1,182 @@ module Language.PureScript.Backend.IR.Inliner.Spec where +import Data.Map qualified as Map import Hedgehog (MonadTest, failure, footnote, (===)) import Language.PureScript.Backend.IR.Inliner - ( Annotation (Always, Never) - , Pragma + ( Accessor (AppliedField, Field) + , Annotation (Always, Arity, Never) + , Directives + , Mode (ModeAnnotation, ModeDefault) + , Pragma (Pragma) + , Scope (ExportScope, LocalScope) ) import Language.PureScript.Backend.IR.Inliner qualified as Inliner -import Language.PureScript.Backend.IR.Names (Name (..)) +import Language.PureScript.Backend.IR.Names + ( Name (..) + , PropName (..) + , moduleNameFromString + ) import Test.Hspec (Spec, describe) import Test.Hspec.Hedgehog.Extended (test) import Text.Megaparsec qualified as Megaparsec spec ∷ Spec spec = describe "IR Inliner" do - describe "parses annotations" do + describe "parses pragmas" do test "@inline foo always" do - ann ← parseAnn "@inline foo always " - ann === (Name "foo", Always) + pragma ← parsePragma "@inline foo always " + pragma === Pragma LocalScope (Name "foo", Nothing) (ModeAnnotation Always) test "@inline foo never" do - ann ← parseAnn "@inline foo never " - ann === (Name "foo", Never) + pragma ← parsePragma "@inline foo never " + pragma === Pragma LocalScope (Name "foo", Nothing) (ModeAnnotation Never) + test "@inline foo default" do + pragma ← parsePragma "@inline foo default" + pragma === Pragma LocalScope (Name "foo", Nothing) ModeDefault + test "@inline foo arity=2" do + pragma ← parsePragma "@inline foo arity=2" + pragma + === Pragma LocalScope (Name "foo", Nothing) (ModeAnnotation (Arity 2)) + test "rejects arity=0" do + rejectPragma "@inline foo arity=0" + test "@inline export foo arity=1" do + pragma ← parsePragma "@inline export foo arity=1" + pragma + === Pragma ExportScope (Name "foo", Nothing) (ModeAnnotation (Arity 1)) + test "@inline export always names a binding called export" do + pragma ← parsePragma "@inline export always" + pragma + === Pragma LocalScope (Name "export", Nothing) (ModeAnnotation Always) + test "@inline foo.bind never" do + pragma ← parsePragma "@inline foo.bind never" + pragma + === Pragma + LocalScope + (Name "foo", Just (Field (PropName "bind"))) + (ModeAnnotation Never) + test "@inline foo...dimap always" do + pragma ← parsePragma "@inline foo...dimap always" + pragma + === Pragma + LocalScope + (Name "foo", Just (AppliedField (PropName "dimap"))) + (ModeAnnotation Always) + test "@inline export foo.bind default" do + pragma ← parsePragma "@inline export foo.bind default" + pragma + === Pragma + ExportScope + (Name "foo", Just (Field (PropName "bind"))) + ModeDefault + + describe "parses a directives file" do + test "directives with comments and blank lines" do + directives ← + parseDirectives . unlines $ + [ "-- inline policy for the lens stack" + , "" + , "Data.Lens.over arity=2" + , "Data.Lens.view always" + , "Data.Profunctor.profunctorFn.dimap never" + , "Data.Functor.functorArray...map default" + ] + directives + === Map.fromList + [ + ( moduleNameFromString "Data.Lens" + , Map.fromList + [ ((Name "over", Nothing), ModeAnnotation (Arity 2)) + , ((Name "view", Nothing), ModeAnnotation Always) + ] + ) + , + ( moduleNameFromString "Data.Profunctor" + , Map.fromList + [ + ( (Name "profunctorFn", Just (Field (PropName "dimap"))) + , ModeAnnotation Never + ) + ] + ) + , + ( moduleNameFromString "Data.Functor" + , Map.fromList + [ + ( (Name "functorArray", Just (AppliedField (PropName "map"))) + , ModeDefault + ) + ] + ) + ] + test "rejects an unqualified target" do + rejectDirectives "over always\n" + test "rejects export scope" do + rejectDirectives "export Data.Lens.over always\n" + test "rejects duplicate targets" do + rejectDirectives "Data.Lens.over always\nData.Lens.over never\n" + + describe "resolves directive precedence" do + test "a local directive beats the directives file" do + Inliner.resolveModes + (one (target, ModeAnnotation Never)) + (one (target, ModeAnnotation Always)) + mempty + === one (target, Just Never) + test "the directives file beats an exported directive" do + Inliner.resolveModes + mempty + (one (target, ModeAnnotation Never)) + (one (target, ModeAnnotation Always)) + === one (target, Just Never) + test "an exported directive beats the built-in heuristics" do + Inliner.resolveModes + mempty + mempty + (one (target, ModeAnnotation (Arity 3))) + === one (target, Just (Arity 3)) + test "an explicit default masks lower tiers" do + Inliner.resolveModes + (one (target, ModeDefault)) + (one (target, ModeAnnotation Never)) + mempty + === one (target, Nothing) + test "disjoint targets union across sources" do + let other = (Name "bar", Nothing) ∷ Inliner.Target + Inliner.resolveModes + (one (target, ModeAnnotation Always)) + mempty + (one (other, ModeAnnotation Never)) + === Map.fromList [(target, Just Always), (other, Just Never)] -------------------------------------------------------------------------------- -- Helpers --------------------------------------------------------------------- -parseAnn ∷ MonadTest m ⇒ Text → m Pragma -parseAnn src = do - let parser = Inliner.pragmaParser <* Megaparsec.eof - case Megaparsec.parse parser "" src of +target ∷ Inliner.Target +target = (Name "foo", Nothing) + +parsePragma ∷ MonadTest m ⇒ Text → m Pragma +parsePragma = parseWith Inliner.pragmaParser + +parseDirectives ∷ MonadTest m ⇒ Text → m Directives +parseDirectives = parseWith Inliner.directivesFileParser + +rejectPragma ∷ MonadTest m ⇒ Text → m () +rejectPragma = rejectWith Inliner.pragmaParser + +rejectDirectives ∷ MonadTest m ⇒ Text → m () +rejectDirectives = rejectWith Inliner.directivesFileParser + +parseWith ∷ MonadTest m ⇒ Inliner.Parser a → Text → m a +parseWith parser src = + case Megaparsec.parse (parser <* Megaparsec.eof) "" src of Left eb → do footnote $ Megaparsec.errorBundlePretty eb failure - Right ann → pure ann + Right a → pure a + +rejectWith ∷ (MonadTest m, Show a) ⇒ Inliner.Parser a → Text → m () +rejectWith parser src = + case Megaparsec.parse (parser <* Megaparsec.eof) "" src of + Left _ → pass + Right a → do + footnote $ "unexpectedly parsed: " <> show a + failure diff --git a/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs b/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs index 1eb40af0..84d4b75c 100644 --- a/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs +++ b/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs @@ -6,7 +6,9 @@ import Hedgehog (PropertyT, annotateShow, diff, forAll, (===)) import Hedgehog.Gen qualified as Gen import Hedgehog.Range qualified as Range import Language.PureScript.Backend.IR.Gen qualified as Gen -import Language.PureScript.Backend.IR.Inliner (Annotation (Always, Never)) +import Language.PureScript.Backend.IR.Inliner + ( Annotation (Always, Arity, Never) + ) import Language.PureScript.Backend.IR.Linker (LinkMode (..)) import Language.PureScript.Backend.IR.Linker qualified as Linker import Language.PureScript.Backend.IR.Linter @@ -30,6 +32,7 @@ import Language.PureScript.Backend.IR.Optimizer , optimizedExpression , optimizedUberModule , optimizedUberModuleChecked + , sinkProjectionIntoLet ) import Language.PureScript.Backend.IR.Supply (runSupply) import Language.PureScript.Backend.IR.Types @@ -1245,6 +1248,367 @@ spec = describe "IR Optimizer" do ) es → expectationFailure ("unexpected exports: " <> show es) + describe "honours @inline arity=N directives (issue #232)" do + let mainModule = moduleNameFromString "Main" + extern = moduleNameFromString "Extern" + g = refImported extern (Name "g") + fName = QName mainModule (Name "f") + fRef = refImported mainModule (Name "f") + -- λa. λb. g a b — non-foldable, curried. + fDef = + abstraction (paramNamed (Name "a")) $ + abstraction (paramNamed (Name "b")) $ + application + (application g (refLocal (Name "a"))) + (refLocal (Name "b")) + applied2 x y = + application (application fRef (literalInt x)) (literalInt y) + checked = either (fail . show) pure . optimizedUberModuleChecked + namesOf uber = + [ name + | Standalone (QName _ (Name name), _) ← + Linker.uberModuleBindings uber + ] + + it "inlines at sites applied to N arguments" do + -- Two saturated sites (so the use-once path cannot claim the + -- binding): both collapse to direct g calls and f is collected. + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (fName, setAnn (Just (Arity 2)) fDef)] + , uberModuleExports = + [(Name "main1", applied2 1 2), (Name "main2", applied2 3 4)] + } + namesOf optimized `shouldBe` [] + Linker.uberModuleExports optimized + `shouldBe` [ + ( Name "main1" + , application (application g (literalInt 1)) (literalInt 2) + ) + , + ( Name "main2" + , application (application g (literalInt 3)) (literalInt 4) + ) + ] + + it "keeps the binding a reference at an under-applied site" do + -- One single-argument site: below the directed arity nothing may + -- paste — not even the use-once whole-binding path. + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (fName, setAnn (Just (Arity 2)) fDef)] + , uberModuleExports = + [(Name "main", application fRef (literalInt 1))] + } + namesOf optimized `shouldBe` ["f"] + Linker.uberModuleExports optimized + `shouldBe` [(Name "main", application fRef (literalInt 1))] + + it "inlines at a site applied to more than N arguments" do + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (fName, setAnn (Just (Arity 1)) fDef)] + , uberModuleExports = + [(Name "main1", applied2 1 2), (Name "main2", applied2 3 4)] + } + namesOf optimized `shouldBe` [] + Linker.uberModuleExports optimized + `shouldBe` [ + ( Name "main1" + , application (application g (literalInt 1)) (literalInt 2) + ) + , + ( Name "main2" + , application (application g (literalInt 3)) (literalInt 4) + ) + ] + + it "bypasses the size budget at a directed site" do + -- λa. a + 1 + 2 + … — far over 'inlineSizeBudget', so only the + -- directive can paste it. After the paste, constant folding + -- collapses each export to a literal. + let bigDef = + abstraction (paramNamed (Name "a")) $ + foldl' + (\acc i → primBinOp PrimAdd acc (literalInt i)) + (refLocal (Name "a")) + [1 .. 40] + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (fName, setAnn (Just (Arity 1)) bigDef)] + , uberModuleExports = + [ (Name "main1", application fRef (literalInt 0)) + , (Name "main2", application fRef (literalInt 100)) + ] + } + namesOf optimized `shouldBe` [] + Linker.uberModuleExports optimized + `shouldBe` [ (Name "main1", literalInt 820) + , (Name "main2", literalInt 920) + ] + + it "pastes a non-lambda definition at a directed site" do + -- h = g 1 — a partial application, not a manifest lambda. The + -- directive pastes it anyway; duplicated work is the user's call. + let hName = QName mainModule (Name "h") + hRef = refImported mainModule (Name "h") + hDef = application g (literalInt 1) + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (hName, setAnn (Just (Arity 1)) hDef)] + , uberModuleExports = + [ (Name "main1", application hRef (literalInt 2)) + , (Name "main2", application hRef (literalInt 3)) + ] + } + namesOf optimized `shouldBe` [] + Linker.uberModuleExports optimized + `shouldBe` [ + ( Name "main1" + , application (application g (literalInt 1)) (literalInt 2) + ) + , + ( Name "main2" + , application (application g (literalInt 1)) (literalInt 3) + ) + ] + + it "keeps an arity-marked binding out of the uncurry split" do + -- Directed arity above every site's argument count: no site + -- pastes, and the split must not steal the name's call sites + -- either — no worker may appear. + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (fName, setAnn (Just (Arity 3)) fDef)] + , uberModuleExports = + [(Name "main1", applied2 1 2), (Name "main2", applied2 3 4)] + } + namesOf optimized `shouldBe` ["f"] + Linker.uberModuleExports optimized + `shouldBe` [(Name "main1", applied2 1 2), (Name "main2", applied2 3 4)] + + describe "honours accessor-form directives (issue #232)" do + let mainModule = moduleNameFromString "Main" + extern = moduleNameFromString "Extern" + g = refImported extern (Name "g") + m = PropName "m" + pad = PropName "pad" + checked = either (fail . show) pure . optimizedUberModuleChecked + namesOf uber = + [ name + | Standalone (QName _ (Name name), _) ← + Linker.uberModuleBindings uber + ] + addChain ∷ Exp → [Integer] → Exp + addChain = foldl' \acc i → primBinOp PrimAdd acc (literalInt i) + dictName = QName mainModule (Name "dict") + dictRef = refImported mainModule (Name "dict") + fName = QName mainModule (Name "f") + fRef = refImported mainModule (Name "f") + -- λd. {m: λx. d + x + 1 + … + 38, pad: d} — a dictionary + -- constructor whose size is far over 'inlineSizeBudget', so only + -- a directive can paste it. The field annotation goes on `m`. + bigCtor fieldAnn = + abstraction (paramNamed (Name "d")) $ + literalObject + [ + ( m + , setAnn fieldAnn . abstraction (paramNamed (Name "x")) $ + addChain + ( primBinOp + PrimAdd + (refLocal (Name "d")) + (refLocal (Name "x")) + ) + [1 .. 38] + ) + , (pad, refLocal (Name "d")) + ] + + test "sinks a projection into a let" do + let obj = + literalObject [(m, literalInt 2), (pad, refLocal (Name "x"))] + bound = application g (literalInt 1) + runIdentity (sinkProjectionIntoLet (objectProp (let1 (Name "x") bound obj) m)) + === Just (let1 (Name "x") bound (objectProp obj m)) + + it ".label never keeps the method behind the dictionary" do + -- Without the veto the small method resolves at both sites and + -- the dictionary is collected. + let dictDef = + literalObject + [ + ( m + , setAnn (Just Never) . abstraction (paramNamed (Name "x")) $ + application g (refLocal (Name "x")) + ) + ] + site x = application (objectProp dictRef m) (literalInt x) + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = [Standalone (dictName, dictDef)] + , uberModuleExports = + [(Name "main1", site 1), (Name "main2", site 2)] + } + namesOf optimized `shouldBe` ["dict"] + Linker.uberModuleExports optimized + `shouldBe` [(Name "main1", site 1), (Name "main2", site 2)] + + it ".label always resolves an over-budget method" do + let dictDef = + literalObject + [ + ( m + , setAnn (Just Always) . abstraction (paramNamed (Name "x")) $ + addChain (refLocal (Name "x")) [1 .. 40] + ) + ] + site x = application (objectProp dictRef m) (literalInt x) + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = [Standalone (dictName, dictDef)] + , uberModuleExports = + [(Name "main1", site 0), (Name "main2", site 100)] + } + namesOf optimized `shouldBe` [] + Linker.uberModuleExports optimized + `shouldBe` [ (Name "main1", literalInt 820) + , (Name "main2", literalInt 920) + ] + + it ".label arity=1 resolves only applied projections" do + let dictDef = + literalObject + [ + ( m + , setAnn (Just (Arity 1)) + . abstraction (paramNamed (Name "x")) + $ application g (refLocal (Name "x")) + ) + ] + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = [Standalone (dictName, dictDef)] + , uberModuleExports = + [ (Name "main1", application (objectProp dictRef m) (literalInt 7)) + , (Name "main2", objectProp dictRef m) + ] + } + namesOf optimized `shouldBe` ["dict"] + Linker.uberModuleExports optimized + `shouldBe` [ (Name "main1", application g (literalInt 7)) + , (Name "main2", objectProp dictRef m) + ] + + it "...label always resolves a field after application" do + let siteM = + application + (objectProp (application fRef (literalInt 3)) m) + (literalInt 4) + sitePad = objectProp (application fRef (literalInt 5)) pad + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = [Standalone (fName, bigCtor (Just Always))] + , uberModuleExports = + [(Name "main1", siteM), (Name "main2", sitePad)] + } + namesOf optimized `shouldBe` ["f"] + Linker.uberModuleExports optimized + `shouldBe` [ (Name "main1", literalInt 748) + , (Name "main2", sitePad) + ] + + it "...label arity=1 resolves only applied projections" do + let siteApplied = + application + (objectProp (application fRef (literalInt 3)) m) + (literalInt 4) + siteBare = objectProp (application fRef (literalInt 3)) m + optimized ← + checked + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = + [Standalone (fName, bigCtor (Just (Arity 1)))] + , uberModuleExports = + [(Name "main1", siteApplied), (Name "main2", siteBare)] + } + namesOf optimized `shouldBe` ["f"] + Linker.uberModuleExports optimized + `shouldBe` [ (Name "main1", literalInt 748) + , (Name "main2", siteBare) + ] + + describe "folds constructor reads through a reference (issue #232)" do + it "folds a field read over an applied constructor reference" do + -- A user-written `Op f` compiles to a reference to the Op worker; + -- a multi-use worker stays a binding, so the projection must fold + -- through the reference or the cascade stalls at (Op(f)).value0. + let mainModule = moduleNameFromString "Main" + extern = moduleNameFromString "Extern" + g = refImported extern (Name "g") + opName = QName mainModule (Name "Op") + opDef = + ctor + ProductType + mainModule + (TyName "Op") + (CtorName "Op") + [FieldName "value0"] + opRef = refImported mainModule (Name "Op") + wrap n = + abstraction (paramNamed (Name "x")) $ + application (application g (literalInt n)) (refLocal (Name "x")) + site n x = + application + (objectProp (application opRef (wrap n)) (PropName "value0")) + (literalInt x) + optimized ← + either (fail . show) pure . optimizedUberModuleChecked $ + Linker.UberModule + { uberModuleForeigns = [] + , uberModuleBindings = [Standalone (opName, opDef)] + , uberModuleExports = + [(Name "main1", site 1 7), (Name "main2", site 2 9)] + } + Linker.uberModuleBindings optimized `shouldBe` [] + Linker.uberModuleExports optimized + `shouldBe` [ + ( Name "main1" + , application (application g (literalInt 1)) (literalInt 7) + ) + , + ( Name "main2" + , application (application g (literalInt 2)) (literalInt 9) + ) + ] + describe "keeps foreign module tables hoisted (issue #175)" do -- A foreign module's value table must stay a single shared binding: -- its export values (some of which are Lua table constructors with diff --git a/test/Language/PureScript/Backend/IR/Spec.hs b/test/Language/PureScript/Backend/IR/Spec.hs index c1d7e4f4..2596a7cf 100644 --- a/test/Language/PureScript/Backend/IR/Spec.hs +++ b/test/Language/PureScript/Backend/IR/Spec.hs @@ -2,6 +2,7 @@ module Language.PureScript.Backend.IR.Spec where +import Data.List qualified as List import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Language.PureScript.Backend.IR @@ -9,8 +10,13 @@ import Language.PureScript.Backend.IR , RepM , collectDataDeclarations , mkCase + , mkModule , runRepM ) +import Language.PureScript.Backend.IR.Inliner + ( Annotation (Always, Arity, Never) + ) +import Language.PureScript.Backend.IR.Inliner qualified as Inliner import Language.PureScript.Backend.IR.Names ( CtorName (..) , Name (..) @@ -18,13 +24,174 @@ import Language.PureScript.Backend.IR.Names , TyName (..) ) import Language.PureScript.Backend.IR.Types +import Language.PureScript.Comments (Comment (LineComment)) import Language.PureScript.CoreFn qualified as Cfn import Language.PureScript.Names qualified as PS import Language.PureScript.PSString qualified as PS -import Test.Hspec (Spec, describe, it, shouldBe) +import Test.Hspec + ( Expectation + , Spec + , describe + , expectationFailure + , it + , shouldBe + , shouldSatisfy + ) spec ∷ Spec spec = describe "IR representation" do + describe "module translation attaches inline directives" do + it "annotates an application-rooted binding" do + irModule ← + translateModule + ["@inline foo always"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnApp (cfnImportedRef "bar") (cfnInt 1))] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just Always) + it "annotates a variable-rooted binding" do + irModule ← + translateModule + ["@inline foo never"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just Never) + + it "annotates a binding with an arity directive" do + irModule ← + translateModule + ["@inline foo arity=2"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just (Arity 2)) + + it "an explicit default attaches no annotation" do + irModule ← + translateModule + ["@inline foo default"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just Nothing + + it "attaches a field directive to a dictionary record field" do + irModule ← + translateModule + ["@inline dict.method never"] + [ Cfn.NonRec ann (PS.Ident "dict") $ + cfnObject [("method", cfnInt 1), ("other", cfnInt 2)] + ] + fieldAnn (Name "dict") (PropName "method") irModule + `shouldBe` Just (Just Never) + fieldAnn (Name "dict") (PropName "other") irModule + `shouldBe` Just Nothing + + it "attaches an applied-field directive under a lambda" do + irModule ← + translateModule + ["@inline mk...method always"] + [ Cfn.NonRec ann (PS.Ident "mk") $ + Cfn.Abs ann (PS.Ident "x") $ + cfnObject [("method", cfnInt 1)] + ] + fieldAnn (Name "mk") (PropName "method") irModule + `shouldBe` Just (Just Always) + + it "rejects a field directive on a lambda binding" do + translate + mempty + ["@inline mk.method never"] + [ Cfn.NonRec ann (PS.Ident "mk") $ + Cfn.Abs ann (PS.Ident "x") $ + cfnObject [("method", cfnInt 1)] + ] + [] + `shouldFailWith` "does not match the shape" + + it "rejects an accessor directive naming a missing field" do + translate + mempty + ["@inline dict.ghost never"] + [ Cfn.NonRec ann (PS.Ident "dict") $ + cfnObject [("method", cfnInt 1)] + ] + [] + `shouldFailWith` "does not match the shape" + + it "rejects a header directive naming a missing binding" do + translate + mempty + ["@inline ghost always"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnInt 1)] + [] + `shouldFailWith` "Unused annotations" + + it "silently ignores unmatched directives-file entries" do + irModule ← + translateModuleWith + ( directivesFor + [ ((Name "ghost", Nothing), Inliner.ModeAnnotation Always) + , + ( (Name "foo", Just (Inliner.Field (PropName "nope"))) + , Inliner.ModeAnnotation Never + ) + ] + ) + [] + [Cfn.NonRec ann (PS.Ident "foo") (cfnInt 1)] + bindingRootAnn (Name "foo") irModule `shouldBe` Just Nothing + + it "applies a directives-file entry to its binding" do + irModule ← + translateModuleWith + (directivesFor [((Name "foo", Nothing), Inliner.ModeAnnotation Never)]) + [] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just Never) + + it "a local header directive beats the directives file" do + irModule ← + translateModuleWith + (directivesFor [((Name "foo", Nothing), Inliner.ModeAnnotation Never)]) + ["@inline foo always"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just Always) + + it "the directives file beats an exported header directive" do + irModule ← + translateModuleWith + (directivesFor [((Name "foo", Nothing), Inliner.ModeAnnotation Always)]) + ["@inline export foo arity=1"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just Always) + + it "an exported header directive applies when nothing overrides it" do + irModule ← + translateModule + ["@inline export foo arity=1"] + [Cfn.NonRec ann (PS.Ident "foo") (cfnImportedRef "bar")] + bindingRootAnn (Name "foo") irModule `shouldBe` Just (Just (Arity 1)) + + it "accepts always and never on a foreign binding" do + irModule ← + translateForeign + ["@inline ffi never"] + [PS.Ident "ffi"] + moduleForeigns irModule `shouldBe` [(Just Never, Name "ffi")] + + it "rejects arity on a foreign binding" do + translate mempty ["@inline ffi arity=1"] [] [PS.Ident "ffi"] + `shouldFailWith` "foreign" + + it "ignores a directives-file arity on a foreign binding" do + irModule ← + translateWith + ( directivesFor + [((Name "ffi", Nothing), Inliner.ModeAnnotation (Arity 1))] + ) + [] + [] + [PS.Ident "ffi"] + moduleForeigns irModule `shouldBe` [(Nothing, Name "ffi")] + + it "rejects an accessor directive on a foreign binding" do + translate mempty ["@inline ffi.method never"] [] [PS.Ident "ffi"] + `shouldFailWith` "foreign" + describe "case expressions" do describe "singular" do it "null binder" do @@ -531,10 +698,90 @@ runRepresentM rm = , lastGeneratedNameIndex = 0 , needsRuntimeLazy = Any False , annotations = mempty + , headerTargets = mempty } rm ) +translateModule ∷ MonadFail m ⇒ [Text] → [Cfn.Bind Cfn.Ann] → m Module +translateModule = translateModuleWith mempty + +translateModuleWith + ∷ MonadFail m + ⇒ Inliner.Directives + → [Text] + → [Cfn.Bind Cfn.Ann] + → m Module +translateModuleWith directives commentLines bindings = + translateWith directives commentLines bindings [] + +translateForeign ∷ MonadFail m ⇒ [Text] → [PS.Ident] → m Module +translateForeign commentLines = translateWith mempty commentLines [] + +translateWith + ∷ MonadFail m + ⇒ Inliner.Directives + → [Text] + → [Cfn.Bind Cfn.Ann] + → [PS.Ident] + → m Module +translateWith directives commentLines bindings foreigns = + either fail pure $ translate directives commentLines bindings foreigns + +translate + ∷ Inliner.Directives + → [Text] + → [Cfn.Bind Cfn.Ann] + → [PS.Ident] + → Either String Module +translate directives commentLines bindings foreigns = + bimap show snd $ + mkModule + directives + cfnModule + { Cfn.moduleComments = LineComment <$> commentLines + , Cfn.moduleBindings = bindings + , Cfn.moduleForeign = foreigns + } + mempty + +directivesFor ∷ [(Inliner.Target, Inliner.Mode)] → Inliner.Directives +directivesFor entries = + one (PS.ModuleName "M", Map.fromList entries) + +shouldFailWith ∷ HasCallStack ⇒ Either String Module → String → Expectation +shouldFailWith result needle = case result of + Left err → err `shouldSatisfy` (needle `List.isInfixOf`) + Right _ → expectationFailure "translation unexpectedly succeeded" + +{- | The root annotation of a standalone module binding, or 'Nothing' +when no binding of this name exists. +-} +bindingRootAnn ∷ Name → Module → Maybe Ann +bindingRootAnn name Module {moduleBindings} = + listToMaybe + [getAnn expr | Standalone (_ann, n, expr) ← moduleBindings, n == name] + +{- | The annotation of an object-literal field inside a standalone module +binding, found at any lambda/let depth; 'Nothing' when no such field +exists. +-} +fieldAnn ∷ Name → PropName → Module → Maybe Ann +fieldAnn name label irModule = do + root ← + listToMaybe + [ expr + | Standalone (_ann, n, expr) ← moduleBindings irModule + , n == name + ] + go root + where + go = \case + AbsN _a _params body → go body + Let _a _binds body → go body + LiteralObject _a props → getAnn <$> List.lookup label props + _ → Nothing + -------------------------------------------------------------------------------- -- Fixture --------------------------------------------------------------------- @@ -563,6 +810,9 @@ cfnLocalIdent = PS.Qualified (PS.BySourcePos (PS.SourcePos 0 0)) . PS.Ident cfnRef ∷ Text → Cfn.Expr Cfn.Ann cfnRef = Cfn.Var ann . cfnLocalIdent +cfnImportedRef ∷ Text → Cfn.Expr Cfn.Ann +cfnImportedRef = Cfn.Var ann . cfnQualifyModule . PS.Ident + cfnBool ∷ Bool → Cfn.Expr Cfn.Ann cfnBool b = Cfn.Literal ann (Cfn.BooleanLiteral b) diff --git a/test/Language/PureScript/Backend/Lua/Golden/Spec.hs b/test/Language/PureScript/Backend/Lua/Golden/Spec.hs index 56727897..5147a4f1 100644 --- a/test/Language/PureScript/Backend/Lua/Golden/Spec.hs +++ b/test/Language/PureScript/Backend/Lua/Golden/Spec.hs @@ -11,6 +11,7 @@ import Data.Tagged (Tagged (..)) import Data.Text qualified as Text import Language.PureScript.Backend.IR qualified as IR import Language.PureScript.Backend.IR.FlattenDeepBinds (flattenDeepBinds) +import Language.PureScript.Backend.IR.Inliner qualified as Inliner import Language.PureScript.Backend.IR.Linker (LinkMode (..)) import Language.PureScript.Backend.IR.Linker qualified as IR import Language.PureScript.Backend.IR.Linker qualified as Linker @@ -35,6 +36,7 @@ import Path , filename , mkRelDir , parent + , parseRelDir , reldir , toFilePath , () @@ -71,6 +73,7 @@ import Test.Hspec import Test.Hspec.Extra (annotatingWith) import Test.Hspec.Golden (acceptableGolden, defaultGolden) import Test.Lua (luacParse) +import Text.Megaparsec qualified as Megaparsec import Text.Pretty.Simple ( OutputOptions (..) , defaultOutputOptionsNoColor @@ -287,10 +290,17 @@ compileCorefn outputDir uberModuleName = do & Oops.runOops & liftIO + -- An optional committed directives.txt next to the golden files + -- exercises the --directives input end-to-end. + directives ← case unTagged outputDir of + Abs root → readDirectivesFixture root uberModuleName + Rel root → readDirectivesFixture root uberModuleName + let dataDecls = IR.collectDataDeclarations cfnModules modules ← forM (toList cfnModules) $ - either (fail . show) (pure . snd) . (`IR.mkModule` dataDecls) + either (fail . show) (pure . snd) . \cfnModule → + IR.mkModule directives cfnModule dataDecls let uberModule = Linker.makeUberModule (LinkAsModule uberModuleName) modules -- Lift the allowlisted foreign exports to IR primops (issue #178) exactly -- as Backend.compileModules does, so the .ir goldens reflect the same @@ -306,6 +316,26 @@ compileCorefn outputDir uberModuleName = do -- the whole pipeline. either (fail . show) pure (optimizedUberModuleChecked liftedModule) +{- | Read the optional @directives.txt@ fixture sitting next to a golden +module's golden files. +-} +readDirectivesFixture + ∷ (MonadIO m, MonadFail m) + ⇒ Path b Dir + → PS.ModuleName + → m Inliner.Directives +readDirectivesFixture root moduleName = do + moduleDir ← liftIO . parseRelDir . toString $ PS.runModuleName moduleName + let fixture = root moduleDir $(mkRelFile "directives.txt") + exists ← doesFileExist fixture + if not exists + then pure mempty + else do + contents ← decodeUtf8 <$> readFileBS (toFilePath fixture) + let parser = Inliner.directivesFileParser <* Megaparsec.eof + either (fail . Megaparsec.errorBundlePretty) pure $ + Megaparsec.parse parser (toFilePath fixture) contents + compileIr ∷ (MonadIO m, MonadMask m) ⇒ AppOrModule diff --git a/test/ps/output/Golden.DirectiveAccessor.Test/corefn.json b/test/ps/output/Golden.DirectiveAccessor.Test/corefn.json new file mode 100644 index 00000000..4e481753 --- /dev/null +++ b/test/ps/output/Golden.DirectiveAccessor.Test/corefn.json @@ -0,0 +1 @@ +{"builtWith":"0.15.16","comments":[{"LineComment":" @inline ops.mul never"},{"LineComment":" @inline mkOps...add always"}],"decls":[{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[19,21],"start":[19,20]}},"type":"Var","value":{"identifier":"add","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[19,23],"start":[19,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"add"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[20,21],"start":[20,20]}},"type":"Var","value":{"identifier":"mul","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[20,23],"start":[20,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"mul"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[36,21],"start":[36,20]}},"type":"Var","value":{"identifier":"sub","moduleName":["Data","Ring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"ringInt","moduleName":["Data","Ring"]}},"type":"App"},"identifier":"sub"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[43,27],"start":[43,3]}},"type":"Var","value":{"identifier":"discard","moduleName":["Control","Bind"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[43,27],"start":[43,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discardUnit","moduleName":["Control","Bind"]}},"type":"App"},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[43,27],"start":[43,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"bindEffect","moduleName":["Effect"]}},"type":"App"},"identifier":"discard"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[43,12],"start":[43,8]}},"type":"Var","value":{"identifier":"show","moduleName":["Data","Show"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[43,26],"start":[43,8]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"showInt","moduleName":["Data","Show"]}},"type":"App"},"identifier":"show"},{"annotation":{"meta":null,"sourceSpan":{"end":[17,11],"start":[17,1]}},"bindType":"NonRec","expression":{"annotation":{"meta":null,"sourceSpan":{"end":[21,4],"start":[19,3]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["add",{"annotation":{"meta":null,"sourceSpan":{"end":[19,23],"start":[19,10]}},"argument":"a","body":{"annotation":{"meta":null,"sourceSpan":{"end":[19,23],"start":[19,10]}},"argument":"b","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[19,23],"start":[19,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[19,19],"start":[19,18]}},"type":"Var","value":{"identifier":"a","sourcePos":[19,11]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[19,23],"start":[19,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[19,23],"start":[19,22]}},"type":"Var","value":{"identifier":"b","sourcePos":[19,13]}},"type":"App"},"type":"Abs"},"type":"Abs"}],["mul",{"annotation":{"meta":null,"sourceSpan":{"end":[20,23],"start":[20,10]}},"argument":"a","body":{"annotation":{"meta":null,"sourceSpan":{"end":[20,23],"start":[20,10]}},"argument":"b","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"mul","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[20,23],"start":[20,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[20,19],"start":[20,18]}},"type":"Var","value":{"identifier":"a","sourcePos":[20,11]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[20,23],"start":[20,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[20,23],"start":[20,22]}},"type":"Var","value":{"identifier":"b","sourcePos":[20,13]}},"type":"App"},"type":"Abs"},"type":"Abs"}]]}},"identifier":"ops"},{"annotation":{"meta":null,"sourceSpan":{"end":[33,21],"start":[33,1]}},"bindType":"NonRec","expression":{"annotation":{"meta":null,"sourceSpan":{"end":[33,21],"start":[33,1]}},"argument":"n","body":{"annotation":{"meta":null,"sourceSpan":{"end":[39,4],"start":[35,3]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["add",{"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,10]}},"argument":"a","body":{"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,10]}},"argument":"b","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,19],"start":[35,18]}},"type":"Var","value":{"identifier":"a","sourcePos":[35,11]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,23],"start":[35,22]}},"type":"Var","value":{"identifier":"b","sourcePos":[35,13]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,27],"start":[35,26]}},"type":"Var","value":{"identifier":"n","sourcePos":[34,1]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,32],"start":[35,30]}},"type":"Literal","value":{"literalType":"IntLiteral","value":10}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,37],"start":[35,35]}},"type":"Literal","value":{"literalType":"IntLiteral","value":20}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,42],"start":[35,40]}},"type":"Literal","value":{"literalType":"IntLiteral","value":30}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,47],"start":[35,45]}},"type":"Literal","value":{"literalType":"IntLiteral","value":40}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,52],"start":[35,50]}},"type":"Literal","value":{"literalType":"IntLiteral","value":50}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[35,57],"start":[35,55]}},"type":"Literal","value":{"literalType":"IntLiteral","value":60}},"type":"App"},"type":"Abs"},"type":"Abs"}],["sub",{"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,10]}},"argument":"a","body":{"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,10]}},"argument":"b","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"sub","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,19],"start":[36,18]}},"type":"Var","value":{"identifier":"a","sourcePos":[36,11]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,23],"start":[36,22]}},"type":"Var","value":{"identifier":"b","sourcePos":[36,13]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,27],"start":[36,26]}},"type":"Var","value":{"identifier":"n","sourcePos":[34,1]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,32],"start":[36,30]}},"type":"Literal","value":{"literalType":"IntLiteral","value":10}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,37],"start":[36,35]}},"type":"Literal","value":{"literalType":"IntLiteral","value":20}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,42],"start":[36,40]}},"type":"Literal","value":{"literalType":"IntLiteral","value":30}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,47],"start":[36,45]}},"type":"Literal","value":{"literalType":"IntLiteral","value":40}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,52],"start":[36,50]}},"type":"Literal","value":{"literalType":"IntLiteral","value":50}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[36,57],"start":[36,55]}},"type":"Literal","value":{"literalType":"IntLiteral","value":60}},"type":"App"},"type":"Abs"},"type":"Abs"}],["mul",{"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,10]}},"argument":"a","body":{"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,10]}},"argument":"b","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"mul","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,19],"start":[37,18]}},"type":"Var","value":{"identifier":"a","sourcePos":[37,11]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,23],"start":[37,22]}},"type":"Var","value":{"identifier":"b","sourcePos":[37,13]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,27],"start":[37,26]}},"type":"Var","value":{"identifier":"n","sourcePos":[34,1]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,32],"start":[37,30]}},"type":"Literal","value":{"literalType":"IntLiteral","value":10}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,37],"start":[37,35]}},"type":"Literal","value":{"literalType":"IntLiteral","value":20}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,42],"start":[37,40]}},"type":"Literal","value":{"literalType":"IntLiteral","value":30}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,47],"start":[37,45]}},"type":"Literal","value":{"literalType":"IntLiteral","value":40}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,52],"start":[37,50]}},"type":"Literal","value":{"literalType":"IntLiteral","value":50}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,18]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,57],"start":[37,55]}},"type":"Literal","value":{"literalType":"IntLiteral","value":60}},"type":"App"},"type":"Abs"},"type":"Abs"}],["divide",{"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,13]}},"argument":"a","body":{"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,13]}},"argument":"b","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"mul","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,22],"start":[38,21]}},"type":"Var","value":{"identifier":"a","sourcePos":[38,14]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,26],"start":[38,25]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"mul","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,30],"start":[38,29]}},"type":"Var","value":{"identifier":"b","sourcePos":[38,16]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,34],"start":[38,33]}},"type":"Literal","value":{"literalType":"IntLiteral","value":3}},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,38],"start":[38,37]}},"type":"Var","value":{"identifier":"n","sourcePos":[34,1]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,43],"start":[38,41]}},"type":"Literal","value":{"literalType":"IntLiteral","value":10}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,48],"start":[38,46]}},"type":"Literal","value":{"literalType":"IntLiteral","value":20}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,53],"start":[38,51]}},"type":"Literal","value":{"literalType":"IntLiteral","value":30}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,58],"start":[38,56]}},"type":"Literal","value":{"literalType":"IntLiteral","value":40}},"type":"App"},"type":"Abs"},"type":"Abs"}]]}},"type":"Abs"},"identifier":"mkOps"},{"annotation":{"meta":null,"sourceSpan":{"end":[41,20],"start":[41,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[43,27],"start":[43,3]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[43,6],"start":[43,3]}},"type":"Var","value":{"identifier":"log","moduleName":["Effect","Console"]}},"annotation":{"meta":null,"sourceSpan":{"end":[43,27],"start":[43,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"show","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[43,26],"start":[43,8]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[43,21],"start":[43,14]}},"expression":{"annotation":{"meta":null,"sourceSpan":{"end":[43,17],"start":[43,14]}},"type":"Var","value":{"identifier":"ops","moduleName":["Golden","DirectiveAccessor","Test"]}},"fieldName":"mul","type":"Accessor"},"annotation":{"meta":null,"sourceSpan":{"end":[43,23],"start":[43,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[43,23],"start":[43,22]}},"type":"Literal","value":{"literalType":"IntLiteral","value":6}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[43,25],"start":[43,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[43,25],"start":[43,24]}},"type":"Literal","value":{"literalType":"IntLiteral","value":7}},"type":"App"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[43,27],"start":[43,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[43,27],"start":[43,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[44,27],"start":[44,3]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[44,6],"start":[44,3]}},"type":"Var","value":{"identifier":"log","moduleName":["Effect","Console"]}},"annotation":{"meta":null,"sourceSpan":{"end":[44,27],"start":[44,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"show","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[44,26],"start":[44,8]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[44,21],"start":[44,14]}},"expression":{"annotation":{"meta":null,"sourceSpan":{"end":[44,17],"start":[44,14]}},"type":"Var","value":{"identifier":"ops","moduleName":["Golden","DirectiveAccessor","Test"]}},"fieldName":"mul","type":"Accessor"},"annotation":{"meta":null,"sourceSpan":{"end":[44,23],"start":[44,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[44,23],"start":[44,22]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[44,25],"start":[44,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[44,25],"start":[44,24]}},"type":"Literal","value":{"literalType":"IntLiteral","value":3}},"type":"App"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[44,27],"start":[44,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[44,27],"start":[44,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[45,35],"start":[45,3]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[45,6],"start":[45,3]}},"type":"Var","value":{"identifier":"log","moduleName":["Effect","Console"]}},"annotation":{"meta":null,"sourceSpan":{"end":[45,35],"start":[45,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"show","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[45,34],"start":[45,8]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[45,27],"start":[45,14]}},"expression":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[45,20],"start":[45,15]}},"type":"Var","value":{"identifier":"mkOps","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[45,22],"start":[45,15]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[45,22],"start":[45,21]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}},"type":"App"},"fieldName":"add","type":"Accessor"},"annotation":{"meta":null,"sourceSpan":{"end":[45,30],"start":[45,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[45,30],"start":[45,28]}},"type":"Literal","value":{"literalType":"IntLiteral","value":20}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[45,33],"start":[45,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[45,33],"start":[45,31]}},"type":"Literal","value":{"literalType":"IntLiteral","value":21}},"type":"App"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[45,35],"start":[45,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[45,35],"start":[45,3]}},"argument":"$__unused","body":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[46,6],"start":[46,3]}},"type":"Var","value":{"identifier":"log","moduleName":["Effect","Console"]}},"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[46,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"show","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[46,32],"start":[46,8]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[46,27],"start":[46,14]}},"expression":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[46,20],"start":[46,15]}},"type":"Var","value":{"identifier":"mkOps","moduleName":["Golden","DirectiveAccessor","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[46,22],"start":[46,15]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[46,22],"start":[46,21]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"fieldName":"mul","type":"Accessor"},"annotation":{"meta":null,"sourceSpan":{"end":[46,29],"start":[46,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[46,29],"start":[46,28]}},"type":"Literal","value":{"literalType":"IntLiteral","value":3}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[46,31],"start":[46,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[46,31],"start":[46,30]}},"type":"Literal","value":{"literalType":"IntLiteral","value":4}},"type":"App"},"type":"App"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"identifier":"main"}],"exports":["ops","mkOps","main"],"foreign":[],"imports":[{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Control","Bind"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Data","Ring"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Data","Semiring"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Data","Show"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Effect"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Effect","Console"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Golden","DirectiveAccessor","Test"]},{"annotation":{"meta":null,"sourceSpan":{"end":[5,15],"start":[5,1]}},"moduleName":["Prelude"]},{"annotation":{"meta":null,"sourceSpan":{"end":[46,33],"start":[3,1]}},"moduleName":["Prim"]}],"moduleName":["Golden","DirectiveAccessor","Test"],"modulePath":"src/Golden/DirectiveAccessor/Test.purs","reExports":{},"sourceSpan":{"end":[46,33],"start":[3,1]}} \ No newline at end of file diff --git a/test/ps/output/Golden.DirectiveAccessor.Test/eval/.gitignore b/test/ps/output/Golden.DirectiveAccessor.Test/eval/.gitignore new file mode 100644 index 00000000..d2dc29bb --- /dev/null +++ b/test/ps/output/Golden.DirectiveAccessor.Test/eval/.gitignore @@ -0,0 +1 @@ +actual.txt diff --git a/test/ps/output/Golden.DirectiveAccessor.Test/eval/golden.txt b/test/ps/output/Golden.DirectiveAccessor.Test/eval/golden.txt new file mode 100644 index 00000000..d8975a99 --- /dev/null +++ b/test/ps/output/Golden.DirectiveAccessor.Test/eval/golden.txt @@ -0,0 +1,4 @@ +42 +6 +252 +224 diff --git a/test/ps/output/Golden.DirectiveAccessor.Test/golden.ir b/test/ps/output/Golden.DirectiveAccessor.Test/golden.ir new file mode 100644 index 00000000..d09bdb2c --- /dev/null +++ b/test/ps/output/Golden.DirectiveAccessor.Test/golden.ir @@ -0,0 +1,299 @@ +UberModule + { uberModuleBindings = + [ Standalone + ( QName + { qnameModuleName = ModuleName "Data.Show", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Data.Show" ) ".spago/p/prelude/26c058c2a053cf4dd7240f0d822ec096c0fecbe1/src/Data/Show.purs" + [ ( Nothing, Name "showIntImpl" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Effect.Console" ) ".spago/p/console/f82835a0b873aafe6bd7b14dd30cc150553d4ab9/src/Effect/Console.purs" + [ ( Nothing, Name "log" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectiveAccessor.Test", qnameName = Name "ops" + }, LiteralObject Nothing + [ + ( PropName "add", AbsN Nothing + ( ParamNamed Nothing ( Name "a" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "b" ) :| [] ) + ( PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "a" ) ) ) + ( Ref Nothing ( Local ( Name "b" ) ) ) + ) + ) + ), + ( PropName "mul", AbsN ( Just Never ) + ( ParamNamed Nothing ( Name "a0" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "b0" ) :| [] ) + ( PrimBinOp Nothing PrimMul + ( Ref Nothing ( Local ( Name "a0" ) ) ) + ( Ref Nothing ( Local ( Name "b0" ) ) ) + ) + ) + ) + ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectiveAccessor.Test", qnameName = Name "mkOps" + }, AbsN Nothing + ( ParamNamed Nothing ( Name "n" ) :| [] ) + ( LiteralObject Nothing + [ + ( PropName "add", AbsN ( Just Always ) + ( ParamNamed Nothing ( Name "a" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "b" ) :| [] ) + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "a" ) ) ) + ( Ref Nothing ( Local ( Name "b" ) ) ) + ) + ( Ref Nothing ( Local ( Name "n" ) ) ) + ) + ( LiteralInt Nothing 10 ) + ) + ( LiteralInt Nothing 20 ) + ) + ( LiteralInt Nothing 30 ) + ) + ( LiteralInt Nothing 40 ) + ) + ( LiteralInt Nothing 50 ) + ) + ( LiteralInt Nothing 60 ) + ) + ) + ), + ( PropName "sub", AbsN Nothing + ( ParamNamed Nothing ( Name "a0" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "b0" ) :| [] ) + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimSub + ( Ref Nothing ( Local ( Name "a0" ) ) ) + ( Ref Nothing ( Local ( Name "b0" ) ) ) + ) + ( Ref Nothing ( Local ( Name "n" ) ) ) + ) + ( LiteralInt Nothing 10 ) + ) + ( LiteralInt Nothing 20 ) + ) + ( LiteralInt Nothing 30 ) + ) + ( LiteralInt Nothing 40 ) + ) + ( LiteralInt Nothing 50 ) + ) + ( LiteralInt Nothing 60 ) + ) + ) + ), + ( PropName "mul", AbsN Nothing + ( ParamNamed Nothing ( Name "a1" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "b1" ) :| [] ) + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimMul + ( Ref Nothing ( Local ( Name "a1" ) ) ) + ( Ref Nothing ( Local ( Name "b1" ) ) ) + ) + ( Ref Nothing ( Local ( Name "n" ) ) ) + ) + ( LiteralInt Nothing 10 ) + ) + ( LiteralInt Nothing 20 ) + ) + ( LiteralInt Nothing 30 ) + ) + ( LiteralInt Nothing 40 ) + ) + ( LiteralInt Nothing 50 ) + ) + ( LiteralInt Nothing 60 ) + ) + ) + ), + ( PropName "divide", AbsN Nothing + ( ParamNamed Nothing ( Name "a2" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "b2" ) :| [] ) + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimAdd + ( PrimBinOp Nothing PrimMul + ( Ref Nothing ( Local ( Name "a2" ) ) ) + ( LiteralInt Nothing 2 ) + ) + ( PrimBinOp Nothing PrimMul + ( Ref Nothing ( Local ( Name "b2" ) ) ) + ( LiteralInt Nothing 3 ) + ) + ) + ( Ref Nothing ( Local ( Name "n" ) ) ) + ) + ( LiteralInt Nothing 10 ) + ) + ( LiteralInt Nothing 20 ) + ) + ( LiteralInt Nothing 30 ) + ) + ( LiteralInt Nothing 40 ) + ) + ) + ) + ] + ) + ) + ], uberModuleForeigns = [], uberModuleExports = + [ + ( Name "ops", Ref Nothing + ( Imported ( ModuleName "Golden.DirectiveAccessor.Test" ) ( Name "ops" ) ) + ), + ( Name "mkOps", Ref Nothing + ( Imported ( ModuleName "Golden.DirectiveAccessor.Test" ) ( Name "mkOps" ) ) + ), + ( Name "main", AbsN Nothing + ( ParamUnused Nothing :| [] ) + ( Let Nothing + ( Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ) + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( AppN Nothing + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.DirectiveAccessor.Test" ) ( Name "ops" ) ) + ) + ( PropName "mul" ) + ) + ( LiteralInt Nothing 6 :| [] ) + ) + ( LiteralInt Nothing 7 :| [] ) :| [] + ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) :| + [ Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ) + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( AppN Nothing + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Golden.DirectiveAccessor.Test" ) + ( Name "ops" ) + ) + ) + ( PropName "mul" ) + ) + ( LiteralInt Nothing 2 :| [] ) + ) + ( LiteralInt Nothing 3 :| [] ) :| [] + ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ) + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( LiteralInt Nothing 252 :| [] ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) + ] + ) + ( AppN Nothing + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ) + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( AppN Nothing + ( AppN Nothing + ( ObjectProp Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Golden.DirectiveAccessor.Test" ) + ( Name "mkOps" ) + ) + ) + ( LiteralInt Nothing 2 :| [] ) + ) + ( PropName "mul" ) + ) + ( LiteralInt Nothing 3 :| [] ) + ) + ( LiteralInt Nothing 4 :| [] ) :| [] + ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) + ) + ) + ] + } \ No newline at end of file diff --git a/test/ps/output/Golden.DirectiveAccessor.Test/golden.lua b/test/ps/output/Golden.DirectiveAccessor.Test/golden.lua new file mode 100644 index 00000000..06a876f5 --- /dev/null +++ b/test/ps/output/Golden.DirectiveAccessor.Test/golden.lua @@ -0,0 +1,30 @@ +local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } +local Effect_Console_foreign = { + log = function(s) return function() print(s) end end +} +local Golden_DirectiveAccessor_Test_ops = { + add = function(a) return function(b) return a + b end end, + mul = function(a0) return function(b0) return a0 * b0 end end +} +local Golden_DirectiveAccessor_Test_mkOps = function(n) + return { + add = function(a) + return function(b) return a + b + n + 10 + 20 + 30 + 40 + 50 + 60 end + end, + sub = function(a0) + return function(b0) return a0 - b0 + n + 10 + 20 + 30 + 40 + 50 + 60 end + end, + mul = function(a1) + return function(b1) return a1 * b1 + n + 10 + 20 + 30 + 40 + 50 + 60 end + end, + divide = function(a2) + return function(b2) return a2 * 2 + b2 * 3 + n + 10 + 20 + 30 + 40 end + end + } +end +return (function() + local _ = Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(Golden_DirectiveAccessor_Test_ops.mul(6)(7)))() + local _ = Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(Golden_DirectiveAccessor_Test_ops.mul(2)(3)))() + local _ = Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(252))() + return Effect_Console_foreign.log(Data_Show_foreign.showIntImpl((Golden_DirectiveAccessor_Test_mkOps(2)).mul(3)(4)))() +end)() diff --git a/test/ps/output/Golden.DirectiveArity.Test/corefn.json b/test/ps/output/Golden.DirectiveArity.Test/corefn.json new file mode 100644 index 00000000..5e247a4e --- /dev/null +++ b/test/ps/output/Golden.DirectiveArity.Test/corefn.json @@ -0,0 +1 @@ +{"builtWith":"0.15.16","comments":[{"LineComment":" @inline runOp arity=1"}],"decls":[{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[20,12],"start":[20,8]}},"type":"Var","value":{"identifier":"show","moduleName":["Data","Show"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[20,36],"start":[20,8]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"showInt","moduleName":["Data","Show"]}},"type":"App"},"identifier":"show"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[20,28],"start":[20,27]}},"type":"Var","value":{"identifier":"add","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[20,31],"start":[20,24]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"add"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[21,28],"start":[21,27]}},"type":"Var","value":{"identifier":"mul","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[21,31],"start":[21,24]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"mul"},{"annotation":{"meta":null,"sourceSpan":{"end":[9,26],"start":[9,1]}},"bindType":"NonRec","expression":{"annotation":{"meta":null,"sourceSpan":{"end":[9,26],"start":[9,1]}},"constructorName":"Op","fieldNames":["value0"],"type":"Constructor","typeName":"Op"},"identifier":"Op"},{"annotation":{"meta":null,"sourceSpan":{"end":[15,26],"start":[15,1]}},"bindType":"NonRec","expression":{"annotation":{"meta":null,"sourceSpan":{"end":[15,26],"start":[15,1]}},"argument":"op","body":{"annotation":{"meta":null,"sourceSpan":{"end":[15,26],"start":[15,1]}},"argument":"x","body":{"annotation":{"meta":null,"sourceSpan":{"end":[16,36],"start":[16,14]}},"caseAlternatives":[{"binders":[{"annotation":{"meta":{"constructorType":"ProductType","identifiers":["value0"],"metaType":"IsConstructor"},"sourceSpan":{"end":[16,29],"start":[16,25]}},"binderType":"ConstructorBinder","binders":[{"annotation":{"meta":null,"sourceSpan":{"end":[16,29],"start":[16,28]}},"binderType":"VarBinder","identifier":"f"}],"constructorName":{"identifier":"Op","moduleName":["Golden","DirectiveArity","Test"]},"typeName":{"identifier":"Op","moduleName":["Golden","DirectiveArity","Test"]}}],"expression":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[16,34],"start":[16,33]}},"type":"Var","value":{"identifier":"f","sourcePos":[16,28]}},"annotation":{"meta":null,"sourceSpan":{"end":[16,36],"start":[16,33]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[16,36],"start":[16,35]}},"type":"Var","value":{"identifier":"x","sourcePos":[16,1]}},"type":"App"},"isGuarded":false}],"caseExpressions":[{"annotation":{"meta":null,"sourceSpan":{"end":[16,21],"start":[16,19]}},"type":"Var","value":{"identifier":"op","sourcePos":[16,1]}}],"type":"Case"},"type":"Abs"},"type":"Abs"},"identifier":"runOp"},{"annotation":{"meta":null,"sourceSpan":{"end":[18,20],"start":[18,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[20,37],"start":[20,3]}},"type":"Var","value":{"identifier":"discard","moduleName":["Control","Bind"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[20,37],"start":[20,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discardUnit","moduleName":["Control","Bind"]}},"type":"App"},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[20,37],"start":[20,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"bindEffect","moduleName":["Effect"]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[20,37],"start":[20,3]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[20,6],"start":[20,3]}},"type":"Var","value":{"identifier":"log","moduleName":["Effect","Console"]}},"annotation":{"meta":null,"sourceSpan":{"end":[20,37],"start":[20,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"show","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[20,36],"start":[20,8]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[20,19],"start":[20,14]}},"type":"Var","value":{"identifier":"runOp","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[20,32],"start":[20,14]}},"argument":{"abstraction":{"annotation":{"meta":{"constructorType":"ProductType","identifiers":["value0"],"metaType":"IsConstructor"},"sourceSpan":{"end":[20,23],"start":[20,21]}},"type":"Var","value":{"identifier":"Op","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[20,31],"start":[20,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[20,31],"start":[20,24]}},"argument":"v","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[20,31],"start":[20,24]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"v","sourcePos":[0,0]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[20,31],"start":[20,24]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[20,30],"start":[20,29]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}},"type":"App"},"type":"Abs"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[20,35],"start":[20,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[20,35],"start":[20,33]}},"type":"Literal","value":{"literalType":"IntLiteral","value":41}},"type":"App"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[20,37],"start":[20,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[20,37],"start":[20,3]}},"argument":"$__unused","body":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[21,6],"start":[21,3]}},"type":"Var","value":{"identifier":"log","moduleName":["Effect","Console"]}},"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[21,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"show","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[21,36],"start":[21,8]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[21,19],"start":[21,14]}},"type":"Var","value":{"identifier":"runOp","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[21,32],"start":[21,14]}},"argument":{"abstraction":{"annotation":{"meta":{"constructorType":"ProductType","identifiers":["value0"],"metaType":"IsConstructor"},"sourceSpan":{"end":[21,23],"start":[21,21]}},"type":"Var","value":{"identifier":"Op","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[21,31],"start":[21,21]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[21,31],"start":[21,24]}},"argument":"v","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"mul","moduleName":["Golden","DirectiveArity","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[21,31],"start":[21,24]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"v","sourcePos":[0,0]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[21,31],"start":[21,24]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[21,30],"start":[21,29]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"type":"Abs"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[21,35],"start":[21,14]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[21,35],"start":[21,33]}},"type":"Literal","value":{"literalType":"IntLiteral","value":21}},"type":"App"},"type":"App"},"type":"App"},"type":"Abs"},"type":"App"},"identifier":"main"}],"exports":["Op","runOp","main"],"foreign":[],"imports":[{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Control","Bind"]},{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Data","Semiring"]},{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Data","Show"]},{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Effect"]},{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Effect","Console"]},{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Golden","DirectiveArity","Test"]},{"annotation":{"meta":null,"sourceSpan":{"end":[4,15],"start":[4,1]}},"moduleName":["Prelude"]},{"annotation":{"meta":null,"sourceSpan":{"end":[21,37],"start":[2,1]}},"moduleName":["Prim"]}],"moduleName":["Golden","DirectiveArity","Test"],"modulePath":"src/Golden/DirectiveArity/Test.purs","reExports":{},"sourceSpan":{"end":[21,37],"start":[2,1]}} \ No newline at end of file diff --git a/test/ps/output/Golden.DirectiveArity.Test/eval/.gitignore b/test/ps/output/Golden.DirectiveArity.Test/eval/.gitignore new file mode 100644 index 00000000..d2dc29bb --- /dev/null +++ b/test/ps/output/Golden.DirectiveArity.Test/eval/.gitignore @@ -0,0 +1 @@ +actual.txt diff --git a/test/ps/output/Golden.DirectiveArity.Test/eval/golden.txt b/test/ps/output/Golden.DirectiveArity.Test/eval/golden.txt new file mode 100644 index 00000000..daaac9e3 --- /dev/null +++ b/test/ps/output/Golden.DirectiveArity.Test/eval/golden.txt @@ -0,0 +1,2 @@ +42 +42 diff --git a/test/ps/output/Golden.DirectiveArity.Test/golden.ir b/test/ps/output/Golden.DirectiveArity.Test/golden.ir new file mode 100644 index 00000000..ef89b426 --- /dev/null +++ b/test/ps/output/Golden.DirectiveArity.Test/golden.ir @@ -0,0 +1,85 @@ +UberModule + { uberModuleBindings = + [ Standalone + ( QName + { qnameModuleName = ModuleName "Data.Show", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Data.Show" ) ".spago/p/prelude/26c058c2a053cf4dd7240f0d822ec096c0fecbe1/src/Data/Show.purs" + [ ( Nothing, Name "showIntImpl" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Effect.Console" ) ".spago/p/console/f82835a0b873aafe6bd7b14dd30cc150553d4ab9/src/Effect/Console.purs" + [ ( Nothing, Name "log" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectiveArity.Test", qnameName = Name "Op" + }, Ctor Nothing ProductType + ( ModuleName "Golden.DirectiveArity.Test" ) + ( TyName "Op" ) + ( CtorName "Op" ) + [ FieldName "value0" ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectiveArity.Test", qnameName = Name "runOp" + }, AbsN + ( Just ( Arity 1 ) ) + ( ParamNamed Nothing ( Name "op" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "x" ) :| [] ) + ( AppN Nothing + ( ObjectProp Nothing ( Ref Nothing ( Local ( Name "op" ) ) ) ( PropName "value0" ) ) + ( Ref Nothing ( Local ( Name "x" ) ) :| [] ) + ) + ) + ) + ], uberModuleForeigns = [], uberModuleExports = + [ + ( Name "Op", Ref Nothing + ( Imported ( ModuleName "Golden.DirectiveArity.Test" ) ( Name "Op" ) ) + ), + ( Name "runOp", Ref Nothing + ( Imported ( ModuleName "Golden.DirectiveArity.Test" ) ( Name "runOp" ) ) + ), + ( Name "main", AbsN Nothing + ( ParamUnused Nothing :| [] ) + ( Let Nothing + ( Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ) + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( LiteralInt Nothing 42 :| [] ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) :| [] + ) + ( AppN Nothing + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ) + ( AppN Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( LiteralInt Nothing 42 :| [] ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) + ) + ) + ] + } \ No newline at end of file diff --git a/test/ps/output/Golden.DirectiveArity.Test/golden.lua b/test/ps/output/Golden.DirectiveArity.Test/golden.lua new file mode 100644 index 00000000..1b667380 --- /dev/null +++ b/test/ps/output/Golden.DirectiveArity.Test/golden.lua @@ -0,0 +1,15 @@ +local M = {} +local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } +local Effect_Console_foreign = { + log = function(s) return function() print(s) end end +} +M.Golden_DirectiveArity_Test_Op = function(value0) + return { value0 = value0 } +end +M.Golden_DirectiveArity_Test_runOp = function(op) + return function(x) return op.value0(x) end +end +return (function() + local _ = Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(42))() + return Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(42))() +end)() diff --git a/test/ps/output/Golden.DirectivesFile.M1/corefn.json b/test/ps/output/Golden.DirectivesFile.M1/corefn.json new file mode 100644 index 00000000..15e06648 --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.M1/corefn.json @@ -0,0 +1 @@ +{"builtWith":"0.15.16","comments":[{"LineComment":" @inline export incr never"},{"LineComment":" @inline keep never"}],"decls":[{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[17,13],"start":[17,12]}},"type":"Var","value":{"identifier":"add","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[17,15],"start":[17,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"add"},{"annotation":{"meta":null,"sourceSpan":{"end":[16,19],"start":[16,1]}},"bindType":"NonRec","expression":{"annotation":{"meta":null,"sourceSpan":{"end":[16,19],"start":[16,1]}},"argument":"x","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectivesFile","M1"]}},"annotation":{"meta":null,"sourceSpan":{"end":[17,15],"start":[17,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[17,11],"start":[17,10]}},"type":"Var","value":{"identifier":"x","sourcePos":[17,1]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[17,15],"start":[17,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[17,15],"start":[17,14]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"type":"Abs"},"identifier":"keep"},{"annotation":{"meta":null,"sourceSpan":{"end":[11,19],"start":[11,1]}},"bindType":"NonRec","expression":{"annotation":{"meta":null,"sourceSpan":{"end":[11,19],"start":[11,1]}},"argument":"x","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectivesFile","M1"]}},"annotation":{"meta":null,"sourceSpan":{"end":[12,15],"start":[12,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[12,11],"start":[12,10]}},"type":"Var","value":{"identifier":"x","sourcePos":[12,1]}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[12,15],"start":[12,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[12,15],"start":[12,14]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}},"type":"App"},"type":"Abs"},"identifier":"incr"}],"exports":["incr","keep"],"foreign":[],"imports":[{"annotation":{"meta":null,"sourceSpan":{"end":[17,15],"start":[3,1]}},"moduleName":["Data","Semiring"]},{"annotation":{"meta":null,"sourceSpan":{"end":[5,15],"start":[5,1]}},"moduleName":["Prelude"]},{"annotation":{"meta":null,"sourceSpan":{"end":[17,15],"start":[3,1]}},"moduleName":["Prim"]}],"moduleName":["Golden","DirectivesFile","M1"],"modulePath":"src/Golden/DirectivesFile/M1.purs","reExports":{},"sourceSpan":{"end":[17,15],"start":[3,1]}} \ No newline at end of file diff --git a/test/ps/output/Golden.DirectivesFile.M1/golden.ir b/test/ps/output/Golden.DirectivesFile.M1/golden.ir new file mode 100644 index 00000000..51341fb6 --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.M1/golden.ir @@ -0,0 +1,40 @@ +UberModule + { uberModuleBindings = + [ Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectivesFile.M1", qnameName = Name "add$w" + }, AbsN Nothing + ( ParamNamed Nothing ( Name "x$168$188" ) :| [ ParamNamed Nothing ( Name "y$169$189" ) ] ) + ( PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "x$168$188" ) ) ) + ( Ref Nothing ( Local ( Name "y$169$189" ) ) ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectivesFile.M1", qnameName = Name "keep" + }, AbsN ( Just Never ) + ( ParamNamed Nothing ( Name "x" ) :| [] ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Golden.DirectivesFile.M1" ) ( Name "add$w" ) ) ) + ( Ref Nothing ( Local ( Name "x" ) ) :| [ LiteralInt Nothing 2 ] ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectivesFile.M1", qnameName = Name "incr" + }, AbsN ( Just Never ) + ( ParamNamed Nothing ( Name "x" ) :| [] ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Golden.DirectivesFile.M1" ) ( Name "add$w" ) ) ) + ( Ref Nothing ( Local ( Name "x" ) ) :| [ LiteralInt Nothing 1 ] ) + ) + ) + ], uberModuleForeigns = [], uberModuleExports = + [ + ( Name "incr", Ref Nothing + ( Imported ( ModuleName "Golden.DirectivesFile.M1" ) ( Name "incr" ) ) + ), + ( Name "keep", Ref Nothing + ( Imported ( ModuleName "Golden.DirectivesFile.M1" ) ( Name "keep" ) ) + ) + ] + } \ No newline at end of file diff --git a/test/ps/output/Golden.DirectivesFile.M1/golden.lua b/test/ps/output/Golden.DirectivesFile.M1/golden.lua new file mode 100644 index 00000000..1bd4abef --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.M1/golden.lua @@ -0,0 +1,13 @@ +local Golden_DirectivesFile_M1_add_S_w = function(x_S_168_S_188, y_S_169_S_189) + return x_S_168_S_188 + y_S_169_S_189 +end +local Golden_DirectivesFile_M1_keep = function(x) + return Golden_DirectivesFile_M1_add_S_w(x, 2) +end +local Golden_DirectivesFile_M1_incr = function(x) + return Golden_DirectivesFile_M1_add_S_w(x, 1) +end +return { + incr = Golden_DirectivesFile_M1_incr, + keep = Golden_DirectivesFile_M1_keep +} diff --git a/test/ps/output/Golden.DirectivesFile.Test/corefn.json b/test/ps/output/Golden.DirectivesFile.Test/corefn.json new file mode 100644 index 00000000..778eb5e2 --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.Test/corefn.json @@ -0,0 +1 @@ +{"builtWith":"0.15.16","comments":[],"decls":[{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[15,16],"start":[15,15]}},"type":"Var","value":{"identifier":"add","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[15,23],"start":[15,8]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"add"},{"annotation":{"meta":null,"sourceSpan":{"end":[14,12],"start":[14,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectivesFile","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[15,8]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[15,12],"start":[15,8]}},"type":"Var","value":{"identifier":"keep","moduleName":["Golden","DirectivesFile","M1"]}},"annotation":{"meta":null,"sourceSpan":{"end":[15,14],"start":[15,8]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[15,14],"start":[15,13]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[15,8]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[15,21],"start":[15,17]}},"type":"Var","value":{"identifier":"keep","moduleName":["Golden","DirectivesFile","M1"]}},"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[15,17]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[15,22]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"type":"App"},"identifier":"kept"},{"annotation":{"meta":null,"sourceSpan":{"end":[9,15],"start":[9,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","DirectivesFile","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[10,26],"start":[10,11]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[10,15],"start":[10,11]}},"type":"Var","value":{"identifier":"incr","moduleName":["Golden","DirectivesFile","M1"]}},"annotation":{"meta":null,"sourceSpan":{"end":[10,17],"start":[10,11]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[10,17],"start":[10,16]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[10,26],"start":[10,11]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[10,24],"start":[10,20]}},"type":"Var","value":{"identifier":"incr","moduleName":["Golden","DirectivesFile","M1"]}},"annotation":{"meta":null,"sourceSpan":{"end":[10,26],"start":[10,20]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[10,26],"start":[10,25]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"type":"App"},"identifier":"inlined"}],"exports":["inlined","kept"],"foreign":[],"imports":[{"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[1,1]}},"moduleName":["Data","Semiring"]},{"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[1,1]}},"moduleName":["Golden","DirectivesFile","M1"]},{"annotation":{"meta":null,"sourceSpan":{"end":[3,15],"start":[3,1]}},"moduleName":["Prelude"]},{"annotation":{"meta":null,"sourceSpan":{"end":[15,23],"start":[1,1]}},"moduleName":["Prim"]}],"moduleName":["Golden","DirectivesFile","Test"],"modulePath":"src/Golden/DirectivesFile/Test.purs","reExports":{},"sourceSpan":{"end":[15,23],"start":[1,1]}} \ No newline at end of file diff --git a/test/ps/output/Golden.DirectivesFile.Test/directives.txt b/test/ps/output/Golden.DirectivesFile.Test/directives.txt new file mode 100644 index 00000000..5449990f --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.Test/directives.txt @@ -0,0 +1,5 @@ +-- Precedence fixture: the file beats @inline export (incr is inlined +-- despite its exported never), and a local pragma beats the file +-- (keep survives despite the always below). +Golden.DirectivesFile.M1.incr always +Golden.DirectivesFile.M1.keep always diff --git a/test/ps/output/Golden.DirectivesFile.Test/golden.ir b/test/ps/output/Golden.DirectivesFile.Test/golden.ir new file mode 100644 index 00000000..e9e6a2c1 --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.Test/golden.ir @@ -0,0 +1,27 @@ +UberModule + { uberModuleBindings = + [ Standalone + ( QName + { qnameModuleName = ModuleName "Golden.DirectivesFile.M1", qnameName = Name "keep" + }, AbsN ( Just Never ) + ( ParamNamed Nothing ( Name "x" ) :| [] ) + ( PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "x" ) ) ) + ( LiteralInt Nothing 2 ) + ) + ) + ], uberModuleForeigns = [], uberModuleExports = + [ + ( Name "inlined", LiteralInt Nothing 5 ), + ( Name "kept", PrimBinOp Nothing PrimAdd + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Golden.DirectivesFile.M1" ) ( Name "keep" ) ) ) + ( LiteralInt Nothing 1 :| [] ) + ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Golden.DirectivesFile.M1" ) ( Name "keep" ) ) ) + ( LiteralInt Nothing 2 :| [] ) + ) + ) + ] + } \ No newline at end of file diff --git a/test/ps/output/Golden.DirectivesFile.Test/golden.lua b/test/ps/output/Golden.DirectivesFile.Test/golden.lua new file mode 100644 index 00000000..582372ed --- /dev/null +++ b/test/ps/output/Golden.DirectivesFile.Test/golden.lua @@ -0,0 +1,5 @@ +local Golden_DirectivesFile_M1_keep = function(x) return x + 2 end +return { + inlined = 5, + kept = Golden_DirectivesFile_M1_keep(1) + Golden_DirectivesFile_M1_keep(2) +} diff --git a/test/ps/output/Golden.LongReaderBind.Test/golden.ir b/test/ps/output/Golden.LongReaderBind.Test/golden.ir index 6f99a7c5..c7f49895 100644 --- a/test/ps/output/Golden.LongReaderBind.Test/golden.ir +++ b/test/ps/output/Golden.LongReaderBind.Test/golden.ir @@ -19,389 +19,6 @@ UberModule ( ModuleName "Effect.Console" ) ".spago/p/console/f82835a0b873aafe6bd7b14dd30cc150553d4ab9/src/Effect/Console.purs" [ ( Nothing, Name "log" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "applyIdentity" - }, LiteralObject Nothing - [ - ( PropName "apply", AbsN Nothing - ( ParamNamed Nothing ( Name "v" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1" ) :| [] ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v" ) ) ) - ( Ref Nothing ( Local ( Name "v1" ) ) :| [] ) - ) - ) - ), - ( PropName "Functor0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( LiteralObject Nothing - [ - ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$494" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$495" ) :| [] ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$494" ) ) ) - ( Ref Nothing ( Local ( Name "m$495" ) ) :| [] ) - ) - ) - ) - ] - ) - ) - ] - ), Standalone - ( QName - { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "bindIdentity" - }, LiteralObject Nothing - [ - ( PropName "bind", AbsN Nothing - ( ParamNamed Nothing ( Name "v" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "f" ) :| [] ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "f" ) ) ) - ( Ref Nothing ( Local ( Name "v" ) ) :| [] ) - ) - ) - ), - ( PropName "Apply0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) - ) - ] - ), Standalone - ( QName - { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "applicativeIdentity" - }, LiteralObject Nothing - [ - ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$496" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$496" ) ) ) - ), - ( PropName "Apply0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) - ) - ] - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "ask" - }, ObjectProp Nothing - ( Let Nothing - ( Standalone - ( Nothing, Name "dictMonad$488", LiteralObject Nothing - [ - ( PropName "Applicative0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "applicativeIdentity" ) ) - ) - ), - ( PropName "Bind1", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) - ) - ) - ] - ) :| [] - ) - ( LiteralObject Nothing - [ - ( PropName "ask", ObjectProp Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$488" ) ) ) - ( PropName "Applicative0" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) - ) - ( PropName "pure" ) - ), - ( PropName "Monad0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( LiteralObject Nothing - [ - ( PropName "Applicative0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Let Nothing - ( Standalone - ( Nothing, Name "dictApplicative$527", AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$488" ) ) ) - ( PropName "Applicative0" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] - ) - ) :| [] - ) - ( LiteralObject Nothing - [ - ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$585$1194" ) :| [] ) - ( AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApplicative$527" ) ) ) - ( PropName "pure" ) - ) - ( Ref Nothing ( Local ( Name "x$585$1194" ) ) :| [] ) - ) - ) - ), - ( PropName "Apply0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Let Nothing - ( Standalone - ( Nothing, Name "dictApply$531", AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApplicative$527" ) ) ) - ( PropName "Apply0" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] - ) - ) :| [] - ) - ( LiteralObject Nothing - [ - ( PropName "apply", AbsN Nothing - ( ParamNamed Nothing ( Name "v$532" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$533" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "r$534" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApply$531" ) ) ) - ( PropName "apply" ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$532" ) ) ) - ( Ref Nothing - ( Local ( Name "r$534" ) ) :| [] - ) :| [] - ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v1$533" ) ) ) - ( Ref Nothing ( Local ( Name "r$534" ) ) :| [] ) :| [] - ) - ) - ) - ) - ), - ( PropName "Functor0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( LiteralObject Nothing - [ - ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "x$585$1203" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$492$536" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "x$585$1200" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing - ( Local ( Name "dictApply$531" ) ) - ) - ( PropName "Functor0" ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Prim" ) - ( Name "undefined" ) - ) :| [] - ) - ) - ( PropName "map" ) - ) - ( Ref Nothing - ( Local ( Name "x$585$1203" ) ) :| [] - ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$492$536" ) ) ) - ( Ref Nothing - ( Local ( Name "x$585$1200" ) ) :| [] - ) :| [] - ) - ) - ) - ) - ) - ] - ) - ) - ] - ) - ) - ) - ] - ) - ) - ), - ( PropName "Bind1", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Let Nothing - ( Standalone - ( Nothing, Name "dictBind$537", AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$488" ) ) ) - ( PropName "Bind1" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] - ) - ) :| [] - ) - ( LiteralObject Nothing - [ - ( PropName "bind", AbsN Nothing - ( ParamNamed Nothing ( Name "v$538" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "k$539" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "r$540" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictBind$537" ) ) ) - ( PropName "bind" ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$538" ) ) ) - ( Ref Nothing ( Local ( Name "r$540" ) ) :| [] ) :| [] - ) - ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "a$541" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Local ( Name "k$539" ) ) ) - ( Ref Nothing ( Local ( Name "a$541" ) ) :| [] ) - ) - ( Ref Nothing ( Local ( Name "r$540" ) ) :| [] ) - ) :| [] - ) - ) - ) - ) - ), - ( PropName "Apply0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Let Nothing - ( Standalone - ( Nothing, Name "dictApply$543", AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictBind$537" ) ) ) - ( PropName "Apply0" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] - ) - ) :| [] - ) - ( LiteralObject Nothing - [ - ( PropName "apply", AbsN Nothing - ( ParamNamed Nothing ( Name "v$544" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$545" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "r$546" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApply$543" ) ) ) - ( PropName "apply" ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$544" ) ) ) - ( Ref Nothing - ( Local ( Name "r$546" ) ) :| [] - ) :| [] - ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v1$545" ) ) ) - ( Ref Nothing ( Local ( Name "r$546" ) ) :| [] ) :| [] - ) - ) - ) - ) - ), - ( PropName "Functor0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( LiteralObject Nothing - [ - ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "x$585$1209" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$492$548" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "x$585$1206" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing - ( Local ( Name "dictApply$543" ) ) - ) - ( PropName "Functor0" ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Prim" ) - ( Name "undefined" ) - ) :| [] - ) - ) - ( PropName "map" ) - ) - ( Ref Nothing - ( Local ( Name "x$585$1209" ) ) :| [] - ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$492$548" ) ) ) - ( Ref Nothing - ( Local ( Name "x$585$1206" ) ) :| [] - ) :| [] - ) - ) - ) - ) - ) - ] - ) - ) - ] - ) - ) - ) - ] - ) - ) - ) - ] - ) - ) - ] - ) - ) - ( PropName "ask" ) - ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "add$w" }, AbsN Nothing @@ -414,31 +31,18 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "go" }, AbsN Nothing - ( ParamNamed Nothing ( Name "r$552$588" ) :| [] ) + ( ParamNamed Nothing ( Name "r$512$551" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "add$w" ) ) ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "add$w" ) ) ) - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "ask" ) ) - ) - ( Ref Nothing ( Local ( Name "r$552$588" ) ) :| [] ) :| - [ AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "ask" ) ) - ) - ( Ref Nothing ( Local ( Name "r$552$588" ) ) :| [] ) - ] + ( Ref Nothing + ( Local ( Name "r$512$551" ) ) :| + [ Ref Nothing ( Local ( Name "r$512$551" ) ) ] ) :| - [ AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "ask" ) ) - ) - ( Ref Nothing ( Local ( Name "r$552$588" ) ) :| [] ) - ] + [ Ref Nothing ( Local ( Name "r$512$551" ) ) ] ) ) ), Standalone @@ -455,24 +59,8 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "add$w" ) ) ) - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "ask" ) ) - ) - ( LiteralInt Nothing 3 :| [] ) :| - [ AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "ask" ) ) - ) - ( LiteralInt Nothing 3 :| [] ) - ] - ) :| - [ AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongReaderBind.Test" ) ( Name "ask" ) ) - ) - ( LiteralInt Nothing 3 :| [] ) - ] + ( LiteralInt Nothing 3 :| [ LiteralInt Nothing 3 ] ) :| + [ LiteralInt Nothing 3 ] ) :| [] ) ) diff --git a/test/ps/output/Golden.LongReaderBind.Test/golden.lua b/test/ps/output/Golden.LongReaderBind.Test/golden.lua index 670cdc58..0ab1903d 100644 --- a/test/ps/output/Golden.LongReaderBind.Test/golden.lua +++ b/test/ps/output/Golden.LongReaderBind.Test/golden.lua @@ -4,37 +4,12 @@ local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } -local Data_Identity_applyIdentity = { - apply = function(v) return function(v1) return v(v1) end end, - Functor0 = function() - return { - map = function(f_S_494) - return function(m_S_495) return f_S_494(m_S_495) end - end - } - end -} -local Data_Identity_bindIdentity = { - bind = function(v) return function(f) return f(v) end end, - Apply0 = function() return Data_Identity_applyIdentity end -} -local Data_Identity_applicativeIdentity = { - pure = function(x_S_496) return x_S_496 end, - Apply0 = function() return Data_Identity_applyIdentity end -} -local Golden_LongReaderBind_Test_ask = (function() - local dictMonad_S_488 = { - Applicative0 = function() return Data_Identity_applicativeIdentity end, - Bind1 = function() return Data_Identity_bindIdentity end - } - return (dictMonad_S_488.Applicative0()).pure -end)() local Golden_LongReaderBind_Test_add_S_w = function( x_S_469_S_501 , y_S_470_S_502 ) return x_S_469_S_501 + y_S_470_S_502 end -M.Golden_LongReaderBind_Test_go = function(r_S_552_S_588) - return Golden_LongReaderBind_Test_add_S_w(Golden_LongReaderBind_Test_add_S_w(Golden_LongReaderBind_Test_ask(r_S_552_S_588), Golden_LongReaderBind_Test_ask(r_S_552_S_588)), Golden_LongReaderBind_Test_ask(r_S_552_S_588)) +M.Golden_LongReaderBind_Test_go = function(r_S_512_S_551) + return Golden_LongReaderBind_Test_add_S_w(Golden_LongReaderBind_Test_add_S_w(r_S_512_S_551, r_S_512_S_551), r_S_512_S_551) end -local Golden_LongReaderBind_Test_compute = Unsafe_Coerce_foreign.unsafeCoerce(Golden_LongReaderBind_Test_add_S_w(Golden_LongReaderBind_Test_add_S_w(Golden_LongReaderBind_Test_ask(3), Golden_LongReaderBind_Test_ask(3)), Golden_LongReaderBind_Test_ask(3))) +local Golden_LongReaderBind_Test_compute = Unsafe_Coerce_foreign.unsafeCoerce(Golden_LongReaderBind_Test_add_S_w(Golden_LongReaderBind_Test_add_S_w(3, 3), 3)) return Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(Golden_LongReaderBind_Test_compute))() diff --git a/test/ps/output/Golden.LongWriterBind.Test/golden.ir b/test/ps/output/Golden.LongWriterBind.Test/golden.ir index e85fca2f..dfa9ff4c 100644 --- a/test/ps/output/Golden.LongWriterBind.Test/golden.ir +++ b/test/ps/output/Golden.LongWriterBind.Test/golden.ir @@ -41,17 +41,6 @@ UberModule ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Data.Monoid", qnameName = Name "monoidArray" - }, LiteralObject Nothing - [ - ( PropName "mempty", LiteralArray Nothing [] ), - ( PropName "Semigroup0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) ) - ) - ] - ), Standalone ( QName { qnameModuleName = ModuleName "Data.Tuple", qnameName = Name "Tuple" }, Ctor Nothing ProductType @@ -93,26 +82,6 @@ UberModule ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "bindIdentity" - }, LiteralObject Nothing - [ - ( PropName "bind", AbsN Nothing - ( ParamNamed Nothing ( Name "v" ) :| [] ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "f" ) :| [] ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "f" ) ) ) - ( Ref Nothing ( Local ( Name "v" ) ) :| [] ) - ) - ) - ), - ( PropName "Apply0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) - ) - ] - ), Standalone ( QName { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "applicativeIdentity" }, LiteralObject Nothing @@ -257,306 +226,124 @@ UberModule ) ), Standalone ( QName - { qnameModuleName = ModuleName "Control.Monad.Writer.Trans", qnameName = Name "bindWriterT$w" - }, AbsN Nothing - ( ParamNamed Nothing - ( Name "dictSemigroup" ) :| - [ ParamNamed Nothing ( Name "dictBind" ) ] - ) - ( Let Nothing - ( Standalone - ( Nothing, Name "Apply0", AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictBind" ) ) ) - ( PropName "Apply0" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) - ) :| [] - ) - ( LiteralObject Nothing + { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "discard" + }, Let Nothing + ( Standalone + ( Nothing, Name "dictBind$519", LiteralObject Nothing [ ( PropName "bind", AbsN Nothing - ( ParamNamed Nothing ( Name "v" ) :| [] ) + ( ParamNamed Nothing ( Name "v$525" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "k" ) :| [] ) + ( ParamNamed Nothing ( Name "f$526" ) :| [] ) ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictBind" ) ) ) - ( PropName "bind" ) - ) - ( Ref Nothing ( Local ( Name "v" ) ) :| [] ) - ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "Apply0" ) ) ) - ( PropName "Functor0" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] - ) - ) - ( PropName "map" ) - ) - ( AbsN Nothing - ( ParamNamed Nothing ( Name "v3" ) :| [] ) - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v3" ) ) ) - ( PropName "value0" ) :| [] - ) - ) - ( AppN Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictSemigroup" ) ) ) - ( PropName "append" ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1" ) ) ) - ( PropName "value1" ) :| [] - ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v3" ) ) ) - ( PropName "value1" ) :| [] - ) :| [] - ) - ) :| [] - ) - ) - ( AppN Nothing - ( Ref Nothing ( Local ( Name "k" ) ) ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1" ) ) ) - ( PropName "value0" ) :| [] - ) :| [] - ) - ) :| [] - ) + ( Ref Nothing ( Local ( Name "f$526" ) ) ) + ( Ref Nothing ( Local ( Name "v$525" ) ) :| [] ) ) ) ), ( PropName "Apply0", AbsN Nothing ( ParamUnused Nothing :| [] ) - ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Writer.Trans" ) - ( Name "applyWriterT$w" ) - ) - ) - ( Ref Nothing - ( Local ( Name "dictSemigroup" ) ) :| - [ Ref Nothing ( Local ( Name "Apply0" ) ) ] - ) - ) + ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) ) ] - ) - ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Control.Monad.Writer.Trans", qnameName = Name "applicativeWriterT$w" - }, AbsN Nothing - ( ParamNamed Nothing - ( Name "dictMonoid" ) :| - [ ParamNamed Nothing ( Name "dictApplicative" ) ] + ) :| [] ) - ( LiteralObject Nothing - [ - ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "a" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "v$521" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "k$522" ) :| [] ) + ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApplicative" ) ) ) - ( PropName "pure" ) - ) - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) - ( Ref Nothing ( Local ( Name "a" ) ) :| [] ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonoid" ) ) ) - ( PropName "mempty" ) :| [] - ) :| [] - ) - ) - ), - ( PropName "Apply0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "applyWriterT$w" ) ) - ) - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonoid" ) ) ) - ( PropName "Semigroup0" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) :| - [ AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApplicative" ) ) ) - ( PropName "Apply0" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) - ] + ( Ref Nothing ( Local ( Name "dictBind$519" ) ) ) + ( PropName "bind" ) ) + ( Ref Nothing ( Local ( Name "v$521" ) ) :| [] ) ) - ) - ] - ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "discard" - }, ObjectProp Nothing - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "bindWriterT$w" ) ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) :| - [ Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) ] - ) - ) - ( PropName "bind" ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "tell" - }, ObjectProp Nothing - ( Let Nothing - ( Standalone - ( Nothing, Name "dictMonad$511", LiteralObject Nothing - [ - ( PropName "Applicative0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "applicativeIdentity" ) ) - ) - ), - ( PropName "Bind1", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) - ) - ) - ] - ) :| [] - ) - ( LiteralObject Nothing - [ - ( PropName "tell", AbsN Nothing - ( ParamNamed Nothing ( Name "x$532$535" ) :| [] ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "v1$523" ) :| [] ) ( AppN Nothing - ( ObjectProp Nothing - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$511" ) ) ) - ( PropName "Applicative0" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) - ) - ( PropName "pure" ) - ) ( AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) - ( ObjectProp ( Just Always ) - ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) - ( PropName "unit" ) :| [] - ) - ) - ( Ref Nothing ( Local ( Name "x$532$535" ) ) :| [] ) :| [] - ) - ) - ), - ( PropName "Semigroup0", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) - ) - ), - ( PropName "Monad1", AbsN Nothing - ( ParamUnused Nothing :| [] ) - ( LiteralObject Nothing - [ - ( PropName "Applicative0", AbsN Nothing - ( ParamUnused Nothing :| [] ) + ( ObjectProp Nothing ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Writer.Trans" ) - ( Name "applicativeWriterT$w" ) - ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Monoid" ) ( Name "monoidArray" ) ) :| - [ AppN Nothing + ( ObjectProp Nothing + ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$511" ) ) ) - ( PropName "Applicative0" ) + ( Ref Nothing ( Local ( Name "dictBind$519" ) ) ) + ( PropName "Apply0" ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) - ] + ) + ( PropName "Functor0" ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] ) ) - ), - ( PropName "Bind1", AbsN Nothing - ( ParamUnused Nothing :| [] ) + ( PropName "map" ) + ) + ( AbsN Nothing + ( ParamNamed Nothing ( Name "v3$524" ) :| [] ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Writer.Trans" ) - ( Name "bindWriterT$w" ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v3$524" ) ) ) + ( PropName "value0" ) :| [] ) ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) :| - [ AppN Nothing + ( AppN Nothing + ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$511" ) ) ) - ( PropName "Bind1" ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Semigroup" ) ( Name "foreign" ) ) + ) + ( PropName "concatArray" ) ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) :| [] + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v1$523" ) ) ) + ( PropName "value1" ) :| [] ) - ] + ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v3$524" ) ) ) + ( PropName "value1" ) :| [] + ) :| [] ) - ) + ) :| [] ) - ] - ) + ) + ( AppN Nothing + ( Ref Nothing ( Local ( Name "k$522" ) ) ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v1$523" ) ) ) + ( PropName "value0" ) :| [] + ) :| [] + ) + ) :| [] ) - ] + ) ) ) - ( PropName "tell" ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont539", AppN Nothing + ( Nothing, Name "$kont752", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 161 ] :| [] ) :| [] ) @@ -569,8 +356,12 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 162 ] :| [] ) :| [] ) @@ -583,8 +374,14 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 163 ] :| [] ) :| [] ) @@ -600,10 +397,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 164 ] :| [] ) :| [] @@ -620,10 +422,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 165 ] :| [] ) :| [] @@ -640,10 +447,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 166 ] :| [] ) :| [] @@ -660,10 +472,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -682,10 +505,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -704,10 +538,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -726,10 +571,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -748,10 +604,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -770,10 +637,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -792,10 +670,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -814,10 +703,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -836,10 +736,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -858,10 +769,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -880,10 +802,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -902,10 +835,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -924,10 +868,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -946,10 +901,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -968,10 +934,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -990,10 +967,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1012,10 +1000,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1034,10 +1033,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1056,10 +1066,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1078,10 +1099,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1100,10 +1132,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1122,10 +1165,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1144,10 +1198,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1166,10 +1231,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1188,10 +1264,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1210,10 +1297,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1232,10 +1330,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1254,10 +1363,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1276,10 +1396,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1298,10 +1429,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1320,10 +1462,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1342,10 +1495,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1364,10 +1528,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1386,10 +1561,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1402,23 +1588,120 @@ UberModule ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Writer.Trans" ) - ( Name "applicativeWriterT$w" ) + ( Let Nothing + ( Standalone + ( Nothing, Name "dictMonoid$515", LiteralObject Nothing + [ + ( PropName "mempty", LiteralArray Nothing [] + ), + ( PropName "Semigroup0", AbsN Nothing + ( ParamUnused Nothing :| [] ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Semigroup" ) + ( Name "semigroupArray" ) + ) + ) + ) + ] + ) :| [] + ) + ( AbsN Nothing + ( ParamNamed Nothing + ( Name "dictApplicative$516" ) :| [] + ) + ( LiteralObject Nothing + [ + ( PropName "pure", AbsN Nothing + ( ParamNamed Nothing + ( Name "a$517" ) :| [] + ) + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Local + ( Name "dictApplicative$516" ) + ) + ) + ( PropName "pure" ) + ) + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( Ref Nothing + ( Local + ( Name "a$517" ) + ) :| [] + ) + ) + ( ObjectProp Nothing + ( Ref Nothing + ( Local + ( Name "dictMonoid$515" ) + ) + ) + ( PropName "mempty" ) :| [] + ) :| [] + ) + ) + ), + ( PropName "Apply0", AbsN Nothing + ( ParamUnused Nothing :| [] ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Writer.Trans" ) + ( Name "applyWriterT$w" ) + ) + ) + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Local + ( Name "dictMonoid$515" ) + ) + ) + ( PropName "Semigroup0" ) + ) + ( Ref Nothing + ( Imported + ( ModuleName "Prim" ) + ( Name "undefined" ) + ) :| [] + ) :| + [ AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Local + ( Name "dictApplicative$516" ) + ) + ) + ( PropName "Apply0" ) + ) + ( Ref Nothing + ( Imported + ( ModuleName "Prim" ) + ( Name "undefined" ) + ) :| [] + ) + ] + ) + ) + ) + ] + ) ) ) ( Ref Nothing ( Imported - ( ModuleName "Data.Monoid" ) - ( Name "monoidArray" ) - ) :| - [ Ref Nothing - ( Imported - ( ModuleName "Data.Identity" ) - ( Name "applicativeIdentity" ) - ) - ] + ( ModuleName "Data.Identity" ) + ( Name "applicativeIdentity" ) + ) :| [] ) ) ( PropName "pure" ) @@ -1506,14 +1789,18 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont540", AppN Nothing + ( Nothing, Name "$kont753", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 121 ] :| [] ) :| [] ) @@ -1526,8 +1813,14 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 122 ] :| [] ) :| [] ) @@ -1543,8 +1836,16 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 123 ] :| [] ) :| [] ) @@ -1560,10 +1861,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 124 ] :| [] ) :| [] @@ -1580,10 +1886,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 125 ] :| [] ) :| [] @@ -1600,10 +1911,18 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1622,10 +1941,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1644,10 +1974,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1666,10 +2007,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1688,10 +2040,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1710,10 +2073,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1732,10 +2106,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1754,10 +2139,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1776,10 +2172,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1798,10 +2205,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1820,10 +2238,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1842,10 +2271,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1864,10 +2304,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1886,10 +2337,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1908,10 +2370,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1930,10 +2403,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1952,10 +2436,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1974,10 +2469,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -1996,10 +2502,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2018,10 +2535,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2040,10 +2568,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2062,10 +2601,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2084,10 +2634,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2106,10 +2667,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2128,10 +2700,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2150,10 +2733,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2172,10 +2766,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2194,10 +2799,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2216,10 +2832,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2238,10 +2865,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2260,10 +2898,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2282,10 +2931,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2304,10 +2964,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2326,10 +2997,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2348,10 +3030,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2363,7 +3056,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont539" ) + ( Name "$kont752" ) ) ) :| [] ) @@ -2446,14 +3139,18 @@ UberModule ) :| [] ) ), Standalone - ( Nothing, Name "$kont541", AppN Nothing + ( Nothing, Name "$kont754", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 81 ] :| [] ) :| [] ) @@ -2466,8 +3163,14 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 82 ] :| [] ) :| [] ) @@ -2483,8 +3186,16 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 83 ] :| [] ) :| [] ) @@ -2500,10 +3211,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 84 ] :| [] ) :| [] @@ -2520,10 +3236,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 85 ] :| [] ) :| [] @@ -2540,10 +3261,18 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 86 ] :| [] ) :| [] @@ -2560,10 +3289,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2582,10 +3322,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2604,10 +3355,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2626,10 +3388,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2648,10 +3421,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2670,10 +3454,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2692,10 +3487,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2714,10 +3520,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2736,10 +3553,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2758,10 +3586,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2780,10 +3619,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2802,10 +3652,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2824,10 +3685,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2846,10 +3718,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2868,10 +3751,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2890,10 +3784,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2912,10 +3817,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2934,10 +3850,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2956,10 +3883,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -2978,10 +3916,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3000,10 +3949,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3022,10 +3982,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3044,10 +4015,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3066,10 +4048,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3088,10 +4081,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3110,10 +4114,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3132,10 +4147,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3154,10 +4180,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3176,10 +4213,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3198,10 +4246,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3220,10 +4279,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3242,10 +4312,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3264,10 +4345,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3286,10 +4378,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3301,7 +4404,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont540" ) + ( Name "$kont753" ) ) ) :| [] ) @@ -3384,14 +4487,18 @@ UberModule ) :| [] ) ), Standalone - ( Nothing, Name "$kont542", AppN Nothing + ( Nothing, Name "$kont755", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 41 ] :| [] ) :| [] ) @@ -3404,8 +4511,14 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 42 ] :| [] ) :| [] ) @@ -3421,8 +4534,16 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 43 ] :| [] ) :| [] ) @@ -3438,10 +4559,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 44 ] :| [] ) :| [] @@ -3458,10 +4584,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 45 ] :| [] ) :| [] @@ -3478,10 +4609,18 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 46 ] :| [] ) :| [] @@ -3498,10 +4637,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3520,10 +4670,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3542,10 +4703,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3564,10 +4736,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3586,10 +4769,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3608,10 +4802,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3630,10 +4835,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3652,10 +4868,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3674,10 +4901,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3696,10 +4934,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3718,10 +4967,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3740,10 +5000,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3762,10 +5033,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3784,10 +5066,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3806,10 +5099,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3828,10 +5132,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3850,10 +5165,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3872,10 +5198,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3894,10 +5231,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3916,10 +5264,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3938,10 +5297,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3960,10 +5330,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -3982,10 +5363,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4004,10 +5396,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4026,10 +5429,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4048,10 +5462,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4070,10 +5495,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4092,10 +5528,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4114,10 +5561,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4136,10 +5594,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4158,10 +5627,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4180,10 +5660,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4202,10 +5693,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4224,10 +5726,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4239,7 +5752,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont541" ) + ( Name "$kont754" ) ) ) :| [] ) @@ -4330,8 +5843,12 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 1 ] :| [] ) :| [] ) @@ -4344,8 +5861,12 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 2 ] :| [] ) :| [] ) @@ -4358,8 +5879,14 @@ UberModule ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 3 ] :| [] ) :| [] ) @@ -4375,8 +5902,16 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "tell" ) ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] + ) ) ( LiteralArray Nothing [ LiteralInt Nothing 4 ] :| [] ) :| [] ) @@ -4392,10 +5927,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 5 ] :| [] ) :| [] @@ -4412,10 +5952,15 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Unit" ) ( Name "foreign" ) ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 6 ] :| [] ) :| [] @@ -4432,10 +5977,18 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing [ LiteralInt Nothing 7 ] :| [] ) :| [] @@ -4452,10 +6005,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4474,10 +6038,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4496,10 +6071,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4518,10 +6104,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4540,10 +6137,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4562,10 +6170,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4584,10 +6203,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4606,10 +6236,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4628,10 +6269,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4650,10 +6302,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4672,10 +6335,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4694,10 +6368,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4716,10 +6401,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4738,10 +6434,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4760,10 +6467,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4782,10 +6500,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4804,10 +6533,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4826,10 +6566,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4848,10 +6599,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4870,10 +6632,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4892,10 +6665,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4914,10 +6698,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4936,10 +6731,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4958,10 +6764,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -4980,10 +6797,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5002,10 +6830,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5024,10 +6863,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5046,10 +6896,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5068,10 +6929,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5090,10 +6962,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5112,10 +6995,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5134,10 +7028,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5156,10 +7061,21 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Golden.LongWriterBind.Test" ) - ( Name "tell" ) + ( AppN Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Tuple" ) + ( Name "Tuple" ) + ) + ) + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Unit" ) + ( Name "foreign" ) + ) + ) + ( PropName "unit" ) :| [] ) ) ( LiteralArray Nothing @@ -5171,7 +7087,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont542" ) + ( Name "$kont755" ) ) ) :| [] ) diff --git a/test/ps/output/Golden.LongWriterBind.Test/golden.lua b/test/ps/output/Golden.LongWriterBind.Test/golden.lua index 56d5f5ce..6bacf7af 100644 --- a/test/ps/output/Golden.LongWriterBind.Test/golden.lua +++ b/test/ps/output/Golden.LongWriterBind.Test/golden.lua @@ -20,10 +20,6 @@ local Effect_Console_foreign = { local Data_Semigroup_semigroupArray = { append = Data_Semigroup_foreign.concatArray } -local Data_Monoid_monoidArray = { - mempty = {}, - Semigroup0 = function() return Data_Semigroup_semigroupArray end -} local Data_Tuple_Tuple = function(value0) return function(value1) return { value0 = value0, value1 = value1 } end end @@ -37,10 +33,6 @@ local Data_Identity_applyIdentity = { } end } -local Data_Identity_bindIdentity = { - bind = function(v) return function(f) return f(v) end end, - Apply0 = function() return Data_Identity_applyIdentity end -} local Data_Identity_applicativeIdentity = { pure = function(x_S_503) return x_S_503 end, Apply0 = function() return Data_Identity_applyIdentity end @@ -71,167 +63,162 @@ local Control_Monad_Writer_Trans_applyWriterT_S_w = function( dictSemigroup end } end -local Control_Monad_Writer_Trans_bindWriterT_S_w = function( dictSemigroup -, dictBind ) - local Apply0 = dictBind.Apply0() - return { - bind = function(v) - return function(k) - return dictBind.bind(v)(function(v1) - return (Apply0.Functor0()).map(function(v3) - return Data_Tuple_Tuple(v3.value0)(dictSemigroup.append(v1.value1)(v3.value1)) - end)(k(v1.value0)) - end) - end +local Golden_LongWriterBind_Test_discard = (function() + local dictBind_S_519 = { + bind = function(v_S_525) + return function(f_S_526) return f_S_526(v_S_525) end end, - Apply0 = function() - return Control_Monad_Writer_Trans_applyWriterT_S_w(dictSemigroup, Apply0) - end + Apply0 = function() return Data_Identity_applyIdentity end } -end -local Control_Monad_Writer_Trans_applicativeWriterT_S_w = function( dictMonoid -, dictApplicative ) - return { - pure = function(a) - return dictApplicative.pure(Data_Tuple_Tuple(a)(dictMonoid.mempty)) - end, - Apply0 = function() - return Control_Monad_Writer_Trans_applyWriterT_S_w(dictMonoid.Semigroup0(), dictApplicative.Apply0()) + return function(v_S_521) + return function(k_S_522) + return dictBind_S_519.bind(v_S_521)(function(v1_S_523) + return ((dictBind_S_519.Apply0()).Functor0()).map(function(v3_S_524) + return Data_Tuple_Tuple(v3_S_524.value0)(Data_Semigroup_foreign.concatArray(v1_S_523.value1)(v3_S_524.value1)) + end)(k_S_522(v1_S_523.value0)) + end) end - } -end -local Golden_LongWriterBind_Test_discard = (Control_Monad_Writer_Trans_bindWriterT_S_w(Data_Semigroup_semigroupArray, Data_Identity_bindIdentity)).bind -local Golden_LongWriterBind_Test_tell = (function() - local dictMonad_S_511 = { - Applicative0 = function() return Data_Identity_applicativeIdentity end, - Bind1 = function() return Data_Identity_bindIdentity end - } - return function(x_S_532_S_535) - return (dictMonad_S_511.Applicative0()).pure(Data_Tuple_Tuple(Data_Unit_foreign.unit)(x_S_532_S_535)) end end)() local Golden_LongWriterBind_Test_go = (function() - local _S_kont539 = Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + local _S_kont752 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 161 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 162 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 163 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 164 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 165 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 166 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 167 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 168 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 169 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 170 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 171 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 172 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 173 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 174 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 175 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 176 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 177 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 178 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 179 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 180 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 181 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 182 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 183 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 184 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 185 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 186 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 187 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 188 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 189 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 190 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 191 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 192 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 193 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 194 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 195 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 196 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 197 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 198 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 199 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 200 }))(function( ) - return (Control_Monad_Writer_Trans_applicativeWriterT_S_w(Data_Monoid_monoidArray, Data_Identity_applicativeIdentity)).pure(42) + return ((function( ) + local dictMonoid_S_515 = { + mempty = {}, + Semigroup0 = function( ) + return Data_Semigroup_semigroupArray + end + } + return function( dictApplicative_S_516 ) + return { + pure = function( a_S_517 ) + return dictApplicative_S_516.pure(Data_Tuple_Tuple(a_S_517)(dictMonoid_S_515.mempty)) + end, + Apply0 = function( ) + return Control_Monad_Writer_Trans_applyWriterT_S_w(dictMonoid_S_515.Semigroup0(), dictApplicative_S_516.Apply0()) + end + } + end + end)()(Data_Identity_applicativeIdentity)).pure(42) end) end) end) @@ -272,127 +259,127 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont540 = Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + local _S_kont753 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 121 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 122 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 123 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 124 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 125 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 126 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 127 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 128 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 129 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 130 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 131 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 132 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 133 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 134 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 135 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 136 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 137 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 138 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 139 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 140 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 141 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 142 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 143 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 144 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 145 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 146 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 147 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 148 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 149 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 150 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 151 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 152 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 153 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 154 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 155 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 156 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 157 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 158 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 159 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 160 }))(function( ) - return _S_kont539 + return _S_kont752 end) end) end) @@ -433,127 +420,127 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont541 = Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + local _S_kont754 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 81 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 82 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 83 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 84 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 85 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 86 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 87 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 88 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 89 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 90 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 91 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 92 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 93 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 94 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 95 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 96 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 97 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 98 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 99 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 100 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 101 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 102 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 103 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 104 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 105 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 106 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 107 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 108 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 109 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 110 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 111 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 112 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 113 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 114 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 115 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 116 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 117 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 118 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 119 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 120 }))(function( ) - return _S_kont540 + return _S_kont753 end) end) end) @@ -594,127 +581,127 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont542 = Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + local _S_kont755 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 41 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 42 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 43 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 44 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 45 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 46 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 47 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 48 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 49 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 50 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 51 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 52 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 53 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 54 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 55 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 56 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 57 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 58 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 59 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 60 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 61 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 62 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 63 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 64 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 65 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 66 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 67 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 68 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 69 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 70 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 71 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 72 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 73 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 74 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 75 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 76 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 77 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 78 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 79 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 80 }))(function( ) - return _S_kont541 + return _S_kont754 end) end) end) @@ -755,127 +742,127 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 1 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 2 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 3 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 4 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 5 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 6 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 7 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 8 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 9 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 10 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 11 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 12 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 13 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 14 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 15 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 16 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 17 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 18 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 19 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 20 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 21 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 22 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 23 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 24 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 25 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 26 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 27 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 28 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 29 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 30 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 31 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 32 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 33 }))(function() - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 34 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 35 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 36 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 37 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 38 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 39 }))(function( ) - return Golden_LongWriterBind_Test_discard(Golden_LongWriterBind_Test_tell({ + return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple(Data_Unit_foreign.unit)({ [1] = 40 }))(function( ) - return _S_kont542 + return _S_kont755 end) end) end) diff --git a/test/ps/src/Golden/DirectiveAccessor/Test.purs b/test/ps/src/Golden/DirectiveAccessor/Test.purs new file mode 100644 index 00000000..27fd3033 --- /dev/null +++ b/test/ps/src/Golden/DirectiveAccessor/Test.purs @@ -0,0 +1,46 @@ +-- @inline ops.mul never +-- @inline mkOps...add always +module Golden.DirectiveAccessor.Test where + +import Prelude + +import Effect (Effect) +import Effect.Console (log) + +type Ops = + { add :: Int -> Int -> Int + , mul :: Int -> Int -> Int + } + +-- A dictionary record: .mul is pinned behind the dictionary, so both +-- call sites below stay field reads instead of resolving to the method. +ops :: Ops +ops = + { add: \a b -> a + b + , mul: \a b -> a * b + } + +type Ops4 = + { add :: Int -> Int -> Int + , sub :: Int -> Int -> Int + , mul :: Int -> Int -> Int + , divide :: Int -> Int -> Int + } + +-- A dictionary constructor too large for the default call-site budget: +-- only the ...add directive lets `(mkOps 1).add` resolve; the +-- undirected `(mkOps 2).mul` stays a projection of the application. +mkOps :: Int -> Ops4 +mkOps n = + { add: \a b -> a + b + n + 10 + 20 + 30 + 40 + 50 + 60 + , sub: \a b -> a - b + n + 10 + 20 + 30 + 40 + 50 + 60 + , mul: \a b -> a * b + n + 10 + 20 + 30 + 40 + 50 + 60 + , divide: \a b -> a * 2 + b * 3 + n + 10 + 20 + 30 + 40 + } + +main :: Effect Unit +main = do + log (show (ops.mul 6 7)) + log (show (ops.mul 2 3)) + log (show ((mkOps 1).add 20 21)) + log (show ((mkOps 2).mul 3 4)) diff --git a/test/ps/src/Golden/DirectiveArity/Test.purs b/test/ps/src/Golden/DirectiveArity/Test.purs new file mode 100644 index 00000000..defa637f --- /dev/null +++ b/test/ps/src/Golden/DirectiveArity/Test.purs @@ -0,0 +1,21 @@ +-- @inline runOp arity=1 +module Golden.DirectiveArity.Test where + +import Prelude + +import Effect (Effect) +import Effect.Console (log) + +data Op = Op (Int -> Int) + +-- A user abstraction: without the arity directive it stays a shared +-- binding and every call goes through the `case`. Directed at arity=1, +-- each applied site pastes the body, meets case-of-known-constructor, +-- and collapses to the wrapped function's own body. +runOp :: Op -> Int -> Int +runOp op x = case op of Op f -> f x + +main :: Effect Unit +main = do + log (show (runOp (Op (_ + 1)) 41)) + log (show (runOp (Op (_ * 2)) 21)) diff --git a/test/ps/src/Golden/DirectivesFile/M1.purs b/test/ps/src/Golden/DirectivesFile/M1.purs new file mode 100644 index 00000000..ce084751 --- /dev/null +++ b/test/ps/src/Golden/DirectivesFile/M1.purs @@ -0,0 +1,17 @@ +-- @inline export incr never +-- @inline keep never +module Golden.DirectivesFile.M1 where + +import Prelude + +-- The exported directive says never, but the directives file next to +-- Golden.DirectivesFile.Test overrides it with always: in that build +-- `incr` is inlined away. Compiled on its own (no file), the exported +-- never applies and the binding survives. +incr :: Int -> Int +incr x = x + 1 + +-- The local directive says never; the directives file says always and +-- loses: `keep` survives in every build. +keep :: Int -> Int +keep x = x + 2 diff --git a/test/ps/src/Golden/DirectivesFile/Test.purs b/test/ps/src/Golden/DirectivesFile/Test.purs new file mode 100644 index 00000000..b08a5e02 --- /dev/null +++ b/test/ps/src/Golden/DirectivesFile/Test.purs @@ -0,0 +1,15 @@ +module Golden.DirectivesFile.Test where + +import Prelude + +import Golden.DirectivesFile.M1 (incr, keep) + +-- `incr` folds to constants here: the directives file (always) beats +-- the exported directive (never). +inlined :: Int +inlined = incr 1 + incr 2 + +-- `keep` stays a shared call: the local directive in M1 (never) beats +-- the directives file (always). +kept :: Int +kept = keep 1 + keep 2