input-output-hk / input-output-hk/fs-sim

Reconsider internal representation of `FsPath`s

Open
#68 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
2
Forks
6
Avg merge
3d 22h
Merged PRs (30d)
1

Description

The current `FsPath` representation as `[Text]` is not very ergonomic. We should reconsider whether we want to pick a different internal representation, maybe something like an `OsPath` or `Vector`.

If we pick `OsPath` (or even `FilePath`) as the internal representation, with sufficient invariants to ensure that they form sensible relative paths, then we could probably simplify the implementation of a number of `FsPath` combinator and conversion functions. For example, `()` on `FsPaths` could be a simple wrapper around `()` on `OsPath`s/`FilePath`s. `FilePath`s would, however, probably not be more performant than the current `[Text]` representation.

Contributor guide

Open the contributing guide

Research direction

Start by examining the current FsPath representation as [Text] and its combinator and conversion functions. Compare possible OsPath, FilePath, and Vector representations, including the invariants needed for sensible relative paths. Done means selecting and implementing a justified internal representation while simplifying the affected FsPath operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
operating-systems
Issue type
Refactor
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.