file-effects.tri (488B)
1 !import prelude * 2 !import io * 3 !export * 4 -- Shared filesystem interpretation for named SCP effects. Workflow and error 5 -- policy remain in SCP; these handlers expose the native IO Result unchanged. 6 -- readFile and writeBytes preserve raw byte lists across filesystem operations. 7 8 readBytes path = readFile path 9 writeBytesHandler argument = matchPair (path contents : writeBytes path contents) argument 10 byteOperations = [(pair "ReadBytes" readBytes) (pair "WriteBytes" writeBytesHandler)]