-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
@arybczak I have been prototyping with having OsPath-base APIs in Effectful. Today we have the following:
- Effectful.FileSystem
- Effectful.FileSystem.IO
- Effectful.FileSystem.IO.ByteString
- Effectful.FileSystem.IO.ByteString.Builder
- Effectful.FileSystem.IO.ByteString.Lazy
- Effectful.FileSystem.IO.File
- Effectful.FileSystem.IO.ByteString
- Effectful.FileSystem.IO
My first attempt was to add *.OsPath modules, giving us:
- Effectful.FileSystem
- Effectful.FileSystem.OsPath
- Effectful.FileSystem.IO
- Effectful.FileSystem.OsPath
- Effectful.FileSystem.IO.ByteString
- Effectful.FileSystem.IO.ByteString.OsPath
- Effectful.FileSystem.IO.ByteString.Builder
- Effectful.FileSystem.IO.ByteString.Lazy
- Effectful.FileSystem.IO.ByteString.Lazy.OsPath
- Effectful.FileSystem.IO.File
- Effectful.FileSystem.IO.File.OsPath
- Effectful.FileSystem.IO.ByteString
From what I understand, we have two dimensions that determine the amount of APIs:
- Does the API take a
FilePathor anOsString? - Does the API return a
StrictByteStringor aLazyByteString?
There is probably the opportunity to bundle some of these modules together? I'm having a hard time understanding why the .IO.File module does not have actions on file like removeFile, for instance.
In particular I'd like to challenge the existence of the .IO module hierarchy, since there the effect is static and thus cannot have a pure interpreter.
If you're down with it I can make suggestions to redesign the module hierarchy so that we have alternative APIs that don't duplicate that many modules.
Metadata
Metadata
Assignees
Labels
No labels