Open danidiaz opened 1 year ago
Come to think of it, nothing forbids a component to take a monad type parameter, ignore it completely, and have its effects in IO
, like a boss:
data FileSystem (m :: Type -> Type) = FileSystem {
readFile :: FilePath -> IO String
writeFile :: FilePath -> String -> IO ()
}
So what use is m
then? I guess it's a means of coordination, a hint of some common monad that the component might play along with, or ignore.
Perhaps it could make sense, but I don't have a pressing need for it and it might complicate other things (like dynamic environments).