cdepillabout / cdepillabout/highlight

Change `childOf` function to be similar to dirstream's `childOf` function

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Haskell
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Internally, the `childOf` function is just reading a list of files and turning them into a `Producer`. It would be better if `childOf` used unix-specific functionality to read only one directory entry at a time. See the comment on the `childOf` function:

https://github.com/cdepillabout/highlight/blob/e7b8e662a6eb1b6cb63e3a3179149fac2895e6ea/src/Highlight/Pipes.hs#L140

The result of the `childOf` function is being turned into a list [here](https://github.com/cdepillabout/highlight/blob/e7b8e662a6eb1b6cb63e3a3179149fac2895e6ea/src/Highlight/Common/Monad/Input.hs#L289) as well. It would be better if it could just be used as a `Producer` without turning it into a list. I'm not sure the best way to do this, especially with the possibility of IO errors when reading from a directory.

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.