Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

follow-file-0.0.2 build failure #3551

Closed
alexeyzab opened this issue Apr 26, 2018 · 1 comment
Closed

follow-file-0.0.2 build failure #3551

alexeyzab opened this issue Apr 26, 2018 · 1 comment

Comments

@alexeyzab
Copy link
Contributor

Encountered the following while trying to build follow-file-0.0.2 on the build server:

Preprocessing library for follow-file-0.0.2..
Building library for follow-file-0.0.2..
[1 of 1] Compiling System.File.Follow ( src/System/File/Follow.hs, dist/build/System/File/Follow.o )

src/System/File/Follow.hs:70:75: error:
    • Couldn't match type ‘[Char]’ with ‘BS8.ByteString’
      Expected type: System.Posix.ByteString.FilePath.RawFilePath
        Actual type: FilePath
    • In the third argument of ‘addWatch’, namely
        ‘(toFilePath $ parent file)’
      In the expression:
        addWatch
          inotify [Modify, Create, Delete] (toFilePath $ parent file)
      In the expression:
        addWatch
          inotify [Modify, Create, Delete] (toFilePath $ parent file)
          $ \ e
              -> let isFile filePath = ...
                 in
                   case e of
                     Created {filePath}
                       | isFile filePath -> void $ runInBase go
                       | otherwise -> pure ()
                     Deleted {filePath}
                       | isFile filePath -> void $ runInBase stop
                       | otherwise -> pure ()
                     Modified {maybeFilePath}
                       | (isFile <$> maybeFilePath) == Just True -> void $ runInBase go
                       | otherwise -> pure ()
                     MovedIn {filePath}
                       | isFile filePath -> void $ runInBase go
                       | otherwise -> pure ()
                     MovedOut {filePath}
                       | isFile filePath -> void $ runInBase go
                       | otherwise -> pure ()
                     DeletedSelf -> error "containing folder deleted"
                     Unmounted -> error "containing folder unmounted"
                     QOverflow -> error "queue overflow"
                     _ -> pure ()
   |
70 |   liftBaseWith $ \runInBase -> addWatch inotify [Modify, Create, Delete] (toFilePath $ parent file) $ \e ->
   |                                                                           ^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                                                                                                                                       
src/System/File/Follow.hs:73:40: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
73 |           Created {filePath}  | isFile filePath -> void $ runInBase go
   |                                        ^^^^^^^^

src/System/File/Follow.hs:75:40: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
75 |           Deleted {filePath}  | isFile filePath -> void $ runInBase stop
   |                                        ^^^^^^^^

src/System/File/Follow.hs:77:51: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: Maybe String
        Actual type: Maybe System.Posix.ByteString.FilePath.RawFilePath
    • In the second argument of ‘(<$>)’, namely ‘maybeFilePath’
      In the first argument of ‘(==)’, namely
        ‘(isFile <$> maybeFilePath)’
      In the expression: (isFile <$> maybeFilePath) == Just True
   |
77 |           Modified {maybeFilePath}  | (isFile <$> maybeFilePath) == Just True -> void $ runInBase go
   |                                                   ^^^^^^^^^^^^^

src/System/File/Follow.hs:79:40: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
79 |           MovedIn {filePath}  | isFile filePath -> void $ runInBase go
   |                                        ^^^^^^^^

src/System/File/Follow.hs:81:42: error:
    • Couldn't match type ‘BS8.ByteString’ with ‘[Char]’
      Expected type: String
        Actual type: System.Posix.ByteString.FilePath.RawFilePath
    • In the first argument of ‘isFile’, namely ‘filePath’
      In the expression: isFile filePath
      In a stmt of a pattern guard for
                     a case alternative:
        isFile filePath
   |
81 |           MovedOut {filePath}   | isFile filePath -> void $ runInBase go
   |                                          ^^^^^^^^

cc @athanclark

@athanclark
Copy link
Contributor

I think this is fixed with v0.0.3

alexeyzab added a commit that referenced this issue Jan 27, 2019
bergmark pushed a commit that referenced this issue Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants