You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Ubuntu 19.10 x86_64. Beware: it's unclear to me whether getHomeDirectory :: IO RawFilePath is available anywhere in the standard Ubuntu distro (despite 45 minutes' effort), so applying the "correct" fix might make this example harder to use.
I made it work by (encodeUtf8 $ pack home) but of course that's a broken approach.
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
% ghc simple.hs
[1 of 1] Compiling Main ( simple.hs, simple.o )
simple.hs:13:60: error:
• Couldn't match type ‘[Char]’
with ‘Data.ByteString.Internal.ByteString’
Expected type: System.Posix.ByteString.FilePath.RawFilePath
Actual type: FilePath
• In the third argument of ‘addWatch’, namely ‘home’
In a stmt of a 'do' block:
wd <- addWatch
inotify [Open, Close, Access, Modify, ....] home print
In the expression:
do inotify <- initINotify
print inotify
home <- getHomeDirectory
wd <- addWatch inotify [Open, Close, ....] home print
....
|
13 | wd <- addWatch inotify [Open,Close,Access,Modify,Move] home print
| ^^^^
The text was updated successfully, but these errors were encountered:
mb720
added a commit
to mb720/hinotify
that referenced
this issue
Mar 9, 2020
Haskell newbie here, please expect naivety.
Using Ubuntu 19.10 x86_64. Beware: it's unclear to me whether
getHomeDirectory :: IO RawFilePath
is available anywhere in the standard Ubuntu distro (despite 45 minutes' effort), so applying the "correct" fix might make this example harder to use.I made it work by
(encodeUtf8 $ pack home)
but of course that's a broken approach.The text was updated successfully, but these errors were encountered: