@@ -67,17 +67,17 @@ foreign import mkFSAction
6767 \ };\
6868 \ };\
6969 \ };\
70- \}" :: forall eff a . (String -> Either String a )
71- -> (a -> Either String a )
70+ \}" :: forall eff a . (Error -> Either Error a )
71+ -> (a -> Either Error a )
7272 -> (Unit -> a )
73- -> Eff eff (Either String a )
73+ -> Eff eff (Either Error a )
7474
7575-- |
7676-- Renames a file.
7777--
7878rename :: forall eff . FilePath
7979 -> FilePath
80- -> Eff (fs :: FS | eff ) (Either String Unit )
80+ -> Eff (fs :: FS | eff ) (Either Error Unit )
8181
8282rename oldFile newFile = mkFSAction Left Right $ \_ -> runFn2
8383 fs.renameSync oldFile newFile
@@ -87,7 +87,7 @@ rename oldFile newFile = mkFSAction Left Right $ \_ -> runFn2
8787--
8888truncate :: forall eff . FilePath
8989 -> Number
90- -> Eff (fs :: FS | eff ) (Either String Unit )
90+ -> Eff (fs :: FS | eff ) (Either Error Unit )
9191
9292truncate file len = mkFSAction Left Right $ \_ -> runFn2
9393 fs.truncateSync file len
@@ -98,7 +98,7 @@ truncate file len = mkFSAction Left Right $ \_ -> runFn2
9898chown :: forall eff . FilePath
9999 -> Number
100100 -> Number
101- -> Eff (fs :: FS | eff ) (Either String Unit )
101+ -> Eff (fs :: FS | eff ) (Either Error Unit )
102102
103103chown file uid gid = mkFSAction Left Right $ \_ -> runFn3
104104 fs.chownSync file uid gid
@@ -108,7 +108,7 @@ chown file uid gid = mkFSAction Left Right $ \_ -> runFn3
108108--
109109chmod :: forall eff . FilePath
110110 -> Number
111- -> Eff (fs :: FS | eff ) (Either String Unit )
111+ -> Eff (fs :: FS | eff ) (Either Error Unit )
112112
113113chmod file mode = mkFSAction Left Right $ \_ -> runFn2
114114 fs.chmodSync file mode
@@ -117,7 +117,7 @@ chmod file mode = mkFSAction Left Right $ \_ -> runFn2
117117-- Gets file statistics.
118118--
119119stat :: forall eff . FilePath
120- -> Eff (fs :: FS | eff ) (Either String Stats )
120+ -> Eff (fs :: FS | eff ) (Either Error Stats )
121121
122122stat file = mkFSAction Left Right $ \_ -> Stats $ runFn1
123123 fs.statSync file
@@ -127,7 +127,7 @@ stat file = mkFSAction Left Right $ \_ -> Stats $ runFn1
127127--
128128link :: forall eff . FilePath
129129 -> FilePath
130- -> Eff (fs :: FS | eff ) (Either String Unit )
130+ -> Eff (fs :: FS | eff ) (Either Error Unit )
131131
132132link src dst = mkFSAction Left Right $ \_ -> runFn2
133133 fs.linkSync src dst
@@ -138,7 +138,7 @@ link src dst = mkFSAction Left Right $ \_ -> runFn2
138138symlink :: forall eff . FilePath
139139 -> FilePath
140140 -> SymlinkType
141- -> Eff (fs :: FS | eff ) (Either String Unit )
141+ -> Eff (fs :: FS | eff ) (Either Error Unit )
142142
143143symlink src dst ty = mkFSAction Left Right $ \_ -> runFn3
144144 fs.symlinkSync src dst (show ty)
@@ -147,7 +147,7 @@ symlink src dst ty = mkFSAction Left Right $ \_ -> runFn3
147147-- Reads the value of a symlink.
148148--
149149readlink :: forall eff . FilePath
150- -> Eff (fs :: FS | eff ) (Either String FilePath )
150+ -> Eff (fs :: FS | eff ) (Either Error FilePath )
151151
152152readlink path = mkFSAction Left Right $ \_ -> runFn1
153153 fs.readlinkSync path
@@ -156,7 +156,7 @@ readlink path = mkFSAction Left Right $ \_ -> runFn1
156156-- Find the canonicalized absolute location for a path.
157157--
158158realpath :: forall eff . FilePath
159- -> Eff (fs :: FS | eff ) (Either String FilePath )
159+ -> Eff (fs :: FS | eff ) (Either Error FilePath )
160160
161161realpath path = mkFSAction Left Right $ \_ -> runFn2
162162 fs.realpathSync path {}
@@ -167,7 +167,7 @@ realpath path = mkFSAction Left Right $ \_ -> runFn2
167167--
168168realpath' :: forall eff cache . FilePath
169169 -> { | cache }
170- -> Eff (fs :: FS | eff ) (Either String FilePath )
170+ -> Eff (fs :: FS | eff ) (Either Error FilePath )
171171
172172realpath' path cache = mkFSAction Left Right $ \_ -> runFn2
173173 fs.realpathSync path cache
@@ -176,7 +176,7 @@ realpath' path cache = mkFSAction Left Right $ \_ -> runFn2
176176-- Deletes a file.
177177--
178178unlink :: forall eff . FilePath
179- -> Eff (fs :: FS | eff ) (Either String Unit )
179+ -> Eff (fs :: FS | eff ) (Either Error Unit )
180180
181181unlink file = mkFSAction Left Right $ \_ -> runFn1
182182 fs.unlinkSync file
@@ -185,7 +185,7 @@ unlink file = mkFSAction Left Right $ \_ -> runFn1
185185-- Deletes a directory.
186186--
187187rmdir :: forall eff . FilePath
188- -> Eff (fs :: FS | eff ) (Either String Unit )
188+ -> Eff (fs :: FS | eff ) (Either Error Unit )
189189
190190rmdir file = mkFSAction Left Right $ \_ -> runFn1
191191 fs.rmdirSync file
@@ -194,7 +194,7 @@ rmdir file = mkFSAction Left Right $ \_ -> runFn1
194194-- Makes a new directory.
195195--
196196mkdir :: forall eff . FilePath
197- -> Eff (fs :: FS | eff ) (Either String Unit )
197+ -> Eff (fs :: FS | eff ) (Either Error Unit )
198198
199199mkdir = flip mkdir' 777
200200
@@ -203,7 +203,7 @@ mkdir = flip mkdir' 777
203203--
204204mkdir' :: forall eff . FilePath
205205 -> Number
206- -> Eff (fs :: FS | eff ) (Either String Unit )
206+ -> Eff (fs :: FS | eff ) (Either Error Unit )
207207
208208mkdir' file mode = mkFSAction Left Right $ \_ -> runFn2
209209 fs.mkdirSync file mode
@@ -212,7 +212,7 @@ mkdir' file mode = mkFSAction Left Right $ \_ -> runFn2
212212-- Reads the contents of a directory.
213213--
214214readdir :: forall eff . FilePath
215- -> Eff (fs :: FS | eff ) (Either String [FilePath ])
215+ -> Eff (fs :: FS | eff ) (Either Error [FilePath ])
216216
217217readdir file = mkFSAction Left Right $ \_ -> runFn1
218218 fs.readdirSync file
@@ -223,7 +223,7 @@ readdir file = mkFSAction Left Right $ \_ -> runFn1
223223utimes :: forall eff . FilePath
224224 -> Date
225225 -> Date
226- -> Eff (fs :: FS | eff ) (Either String Unit )
226+ -> Eff (fs :: FS | eff ) (Either Error Unit )
227227
228228utimes file atime mtime = mkFSAction Left Right $ \_ -> runFn3
229229 fs.utimesSync file
@@ -234,7 +234,7 @@ utimes file atime mtime = mkFSAction Left Right $ \_ -> runFn3
234234-- Reads the entire contents of a file returning the result as a raw buffer.
235235--
236236readFile :: forall eff . FilePath
237- -> Eff (fs :: FS | eff ) (Either String Buffer )
237+ -> Eff (fs :: FS | eff ) (Either Error Buffer )
238238
239239readFile file = mkFSAction Left Right $ \_ -> runFn2
240240 fs.readFileSync file {}
@@ -244,7 +244,7 @@ readFile file = mkFSAction Left Right $ \_ -> runFn2
244244--
245245readTextFile :: forall eff . Encoding
246246 -> FilePath
247- -> Eff (fs :: FS | eff ) (Either String String )
247+ -> Eff (fs :: FS | eff ) (Either Error String )
248248
249249readTextFile encoding file = mkFSAction Left Right $ \_ -> runFn2
250250 fs.readFileSync file { encoding: show encoding }
@@ -254,7 +254,7 @@ readTextFile encoding file = mkFSAction Left Right $ \_ -> runFn2
254254--
255255writeFile :: forall eff . FilePath
256256 -> Buffer
257- -> Eff (fs :: FS | eff ) (Either String Unit )
257+ -> Eff (fs :: FS | eff ) (Either Error Unit )
258258
259259writeFile file buff = mkFSAction Left Right $ \_ -> runFn3
260260 fs.writeFileSync file buff {}
@@ -265,7 +265,7 @@ writeFile file buff = mkFSAction Left Right $ \_ -> runFn3
265265writeTextFile :: forall eff . Encoding
266266 -> FilePath
267267 -> String
268- -> Eff (fs :: FS | eff ) (Either String Unit )
268+ -> Eff (fs :: FS | eff ) (Either Error Unit )
269269
270270writeTextFile encoding file buff = mkFSAction Left Right $ \_ -> runFn3
271271 fs.writeFileSync file buff { encoding: show encoding }
@@ -275,7 +275,7 @@ writeTextFile encoding file buff = mkFSAction Left Right $ \_ -> runFn3
275275--
276276appendFile :: forall eff . FilePath
277277 -> Buffer
278- -> Eff (fs :: FS | eff ) (Either String Unit )
278+ -> Eff (fs :: FS | eff ) (Either Error Unit )
279279
280280appendFile file buff = mkFSAction Left Right $ \_ -> runFn3
281281 fs.appendFileSync file buff {}
@@ -286,7 +286,7 @@ appendFile file buff = mkFSAction Left Right $ \_ -> runFn3
286286appendTextFile :: forall eff . Encoding
287287 -> FilePath
288288 -> String
289- -> Eff (fs :: FS | eff ) (Either String Unit )
289+ -> Eff (fs :: FS | eff ) (Either Error Unit )
290290
291291appendTextFile encoding file buff = mkFSAction Left Right $ \_ -> runFn3
292292 fs.appendFileSync file buff { encoding: show encoding }
0 commit comments