Add OsString conversions#156
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
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.0as a library dependency. - Introduce
From/TryFromorphan instances forOsStringinWitch.Instances. - Add HUnit + Hedgehog coverage for the new
OsStringconversions 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.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #155.