typelevel / typelevel/skunk

Should AppliedFragment Monoid use spaces?

Open
#1,110 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
175
Avg merge
5d 14h
Merged PRs (30d)
9

Description

When combining AppliedFragments, should we intercalcate a space? I think technically that would violate the Monoid rules but I think that is what callers would want 99% of the time.

  /** `AppliedFragment` is a monoid. */
  implicit val MonoidAppFragment: Monoid[AppliedFragment] =
    new Monoid[AppliedFragment] {
      def combine(x: AppliedFragment, y: AppliedFragment): AppliedFragment = x |+| y
      def empty: AppliedFragment = AppliedFragment.empty
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AppliedFragment MonoidAppFragment definition shown in the issue and inspect the callers that combine AppliedFragments. Evaluate whether inserting spaces preserves the intended monoid behavior and matches caller expectations. Done requires a maintainer decision on the semantics, followed by an agreed implementation or documentation of the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.