This is part of the critical path for repository tagging, so we should
test it to make sure it doesn't explode. This introduces a test that
creates a temporary git repo and queries it to make sure that adding
and then reading from a blob works properly.
The `BlobPair` type is defined as an alias for `Join These Blob`. Though
this sacrifices a degree of type safety, it's extremely convenient, as
you can get to a Functor and Bifunctor instance very quickly.
Pattern-matching on `BlobPair` is less elegant though, as it requires
a nested Join then a match on `These`, which is not immediately
indicative of what a given pair might do.
This adds pattern synonyms for the `Inserting`, `Deleting`, and
`Diffing` cases, and removes the less-expressive functions returning such.
This looks like a big patch, but it's very straightforward: no
behavior has changed.
After the umpteenth time spent hitting a compile error because I
passed a `FilePath` rather than a `File` to `readBlobFromPath`, I
decided to finally make the needed refactors to Semantic.IO, and to
split off the `File` type and `Files` effect. This patch:
* adds the `MonadIO` class to `Prologue`'s export list
* moves `File` into `Data.File`
* moves `Handle` into `Data.Handle`
* moves `Files` into `Semantic.Task.Files`
* moves functions for reading blobs into `Data.Blob`
* keeps general IO helpers in Semantic.IO
* renames `readFile` to `readBlobFromFile`
* renames `readBlobFromPath` to `readBlobFromFile'`
This should have a positive effect on compile times and ease of
navigation throughout the codebase.