haskell / haskell/filepath

Add lens/idempotence properties

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
enhancement ghc-8.2
Dominant language
Haskell
Stars
74
Forks
38
PR merge metrics
No merged PRs in 30d

Description

Two useful properties of filepath operators are being idempotent (as you might hope `normalise` was) and being valid lenses, specifically obeying:

```
view l (set l b a) = b
set l (view l a) a = a
set l c (set l b a) = set l c a
```

I should probably add functions to capture these properties directly in the TestUtils code, then write things like `lens getExtension replaceExtension` for those which are actually true (I'm not sure extensions are, but some will be).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.