Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor readFile and some parsers to use Path instead of FilePath #2649

Merged
merged 3 commits into from
Feb 19, 2024

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Feb 13, 2024

Now the prelude exports this function:

readFile :: (MonadIO m) => Path Abs File -> m Text
readFile = liftIO . Utf8.readFile . toFilePath

It is more convenient to use because it uses typed Path and works in any MonadIO.

@janmasrovira janmasrovira self-assigned this Feb 13, 2024
@janmasrovira janmasrovira changed the title Refactor readFile and some parsers to use Path Refactor readFile and some parsers to use Path instead of FilePath Feb 13, 2024
@janmasrovira janmasrovira marked this pull request as ready for review February 14, 2024 09:04
@janmasrovira janmasrovira force-pushed the readFile branch 2 times, most recently from e667344 to d5672fe Compare February 16, 2024 17:32
@lukaszcz lukaszcz merged commit a825f41 into main Feb 19, 2024
4 checks passed
@lukaszcz lukaszcz deleted the readFile branch February 19, 2024 16:33
paulcadman added a commit that referenced this pull request Feb 20, 2024
Following on from #2649

Factor `$(mkAbsFile "/<text>")` to `Juvix.Extra.Paths`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants