Comment by tomn

Comment by tomn 3 days ago

0 replies

> I am pretty sure that, unless you use --impure, all files that are read are required to be in the store. Since the store is read-only, it does not break purity.

Right, but even then the logical type for readFile would be something like "string -> string" (because from nix's perspective it is pure), but in haskell it would have to be "string -> IO string" (because from haskell's perspective it is not).

Maybe this is fine, i just suspect it would make things messier than expected.

Alternatively this could be worked around using unsafePerformIO or the FFI, but that feels a bit far away from the idea of just making a DSL? Unclear...

> But I don't know why one would want to.

Same, I just think it's an interesting discussion.