Skip to content

Add OsString conversions#156

Merged
tfausak merged 12 commits into
mainfrom
gh-155-os-string
May 26, 2026
Merged

Add OsString conversions#156
tfausak merged 12 commits into
mainfrom
gh-155-os-string

Conversation

@tfausak

@tfausak tfausak commented May 23, 2026

Copy link
Copy Markdown
Owner

Fixes #155.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds System.OsString.OsString conversions to the witch ecosystem (Fixes #155), enabling From/TryFrom conversions between OsString and existing string-like types, plus associated test coverage and design/plan documentation.

Changes:

  • Add os-string ^>=2.0 as a library dependency.
  • Introduce From/TryFrom orphan instances for OsString in Witch.Instances.
  • Add HUnit + Hedgehog coverage for the new OsString conversions and include supporting design/plan docs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
witch.cabal Adds the os-string dependency needed to compile OsString instances.
source/library/Witch/Instances.hs Implements From/TryFrom instances between OsString and [OsChar]/String/Text/LazyText.
source/test-suite/Main.hs Adds HUnit tests for OsString conversions.
source/hedgehog/Main.hs Adds a Hedgehog group/generator to property-test [OsChar]OsString round-tripping.
docs/superpowers/specs/2026-05-23-osstring-conversions-design.md Documents intended OsString conversion design (currently diverges from implementation in a few places).
docs/superpowers/plans/2026-05-23-osstring-conversions.md Implementation plan for the feature (currently diverges from implementation in a few places).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/test-suite/Main.hs Outdated
Comment thread docs/superpowers/specs/2026-05-23-osstring-conversions-design.md Outdated
Comment thread docs/superpowers/plans/2026-05-23-osstring-conversions.md Outdated
Comment thread docs/superpowers/plans/2026-05-23-osstring-conversions.md Outdated
Comment thread docs/superpowers/plans/2026-05-23-osstring-conversions.md Outdated
Comment thread source/test-suite/Main.hs Outdated
Comment thread source/test-suite/Main.hs Outdated
Comment thread docs/superpowers/specs/2026-05-23-osstring-conversions-design.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread source/test-suite/Main.hs
Comment thread source/test-suite/Main.hs
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread source/library/Witch/Instances.hs
Comment thread source/library/Witch/Instances.hs
Comment thread source/library/Witch/Instances.hs
Comment thread source/library/Witch/Instances.hs
@tfausak tfausak marked this pull request as ready for review May 26, 2026 14:47
@tfausak tfausak merged commit 2fe35a8 into main May 26, 2026
11 checks passed
@tfausak tfausak deleted the gh-155-os-string branch May 26, 2026 14:49
@tfausak tfausak mentioned this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OsString conversions

2 participants