Open safareli opened 7 years ago
This way CreateMount AbsPath MountConfig
will change to CreateMount (MountF Identity Identity)
What's the benefit of more and more indirection?
This change would ensure that the path you use to create a mount is appropriate for the type of mount: currently you can try to mount a view on a directory path, a connection on a file path, etc.
Well, a change along these lines, I'm not sure on the specific implementation, but I mentioned about using the types to do this to Irakli which is why he commented on it again just now.
We would be able to express all this types with just one MountF
:
type CreateMountConfig = MountF Identity Identity
type MountConfig = MountF (Const Unit) Identity
type Mount = MountF Identity (Const Unit)
type MountType = MountF (Const Unit) (Const Unit)
This way it's more clear and fun :D
type On = Identity
type Off = Const Unit
type CreateMountConfig = MountF On On
type MountConfig = MountF Off On
type Mount = MountF On Off
type MountType = MountF Off Off
Related change https://github.com/slamdata/purescript-quasar/pull/104
We could change Resource to ResourceF (like for MountF) and have deleteResource and moveResource instead of moveData, MoveMount, etc.
This ^ could be combined into:
then: