Skip to content

[fork-ffi] Ship a default @inline directive pack for the prelude/core forks #242

Description

@Unisay

Problem

A default directive pack for purescript-prelude and core covers the usual suspects: dictionary methods (bindFlipped arity=1, semigroupFn.append arity=2), identities (categoryFn.identity always, otherwise always), generics machinery, and ST/Ref glue. These force-inline the tiny, ubiquitous dictionary-parameterized combinators that otherwise fall below the size threshold and block downstream specialization. pslua has no such pack, so even with graduated directives these combinators stay un-inlined unless a user annotates them.

Approach

Assemble a pslua directive pack for the Lua forks of prelude and core, tuned to pslua's model and net of what #180's automatic monad specialization already covers. Ship it either as the directives file the compiler loads by default for these packages, or as module-header @inline export pragmas in the fork sources. Release the affected forks and bump the package set.

Prerequisites / Relations

Blocked by #232 (the graduated @inline directives issue): the pack is written in that DSL. Package-set work: fork edits plus a coordinated release and set bump, in the shape of #176 and #186. Pairs with the directive auto-inference issue.

Verification / Measurement

With the pack loaded, a representative program's common dictionary combinators (append, identity, flipped bind) inline away and linked output shrinks; eval goldens across the corpus stay unchanged. The size delta is the headline number, captured before/after through #172.

Metadata

Metadata

Assignees

No one assigned

    Labels

    OptimisationA Compiler Optimisationarea: package-setBug in a package-set fork (FFI/sources), not the compilerenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions