Skip to content

Failure to build with stock streamly

https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/c842c41a784affa4a7c48d9b8d693401805cb7ad/cabal.project#L32-33

https://github.com/composewell/streamly/pull/1485#issuecomment-1127532793

@fishtreesugar

lib/GHCup/HLS.hs:209:11: error:
    • Could not deduce (monad-control-1.0.3.1:Control.Monad.Trans.Control.MonadBaseControl
                          IO m)
        arising from a use of ‘mergeFileTree’
      from the context: (MonadMask m, MonadUnliftIO m, MonadReader env m,
                         MonadFail m, HasLog env, HasDirs env, HasSettings env,
                         MonadResource m, HasPlatformReq env)
        bound by the type signature for:
                   installHLSUnpacked :: forall (m :: * -> *) env.
                                         (MonadMask m, MonadUnliftIO m, MonadReader env m,
                                          MonadFail m, HasLog env, HasDirs env, HasSettings env,
                                          MonadCatch m, MonadIO m, MonadResource m,
                                          HasPlatformReq env) =>
                                         FilePath
                                         -> InstallDirResolved
                                         -> Version
                                         -> Bool
                                         -> Excepts
                                              '[ProcessError, CopyError, FileAlreadyExistsError,
                                                NotInstalled, MergeFileTreeError]
                                              m
                                              ()
        at lib/GHCup/HLS.hs:(186,1)-(202,119)
    • In the second argument of ‘($)’, namely
        ‘mergeFileTree
           (tmpInstallDest `appendGHCupPath` dropDrive (fromInstallDir inst))
           inst HLS (mkTVer ver)
           (\ f t
              -> liftIO
                   $ do mtime <- ifM
                                   (pathIsSymbolicLink f) (pure Nothing)
                                   (Just <$> getModificationTime f)
                        install f t (not forceInstall)
                        forM_ mtime $ setModificationTime t)’
      In a stmt of a 'do' block:
        liftE
          $ mergeFileTree
              (tmpInstallDest `appendGHCupPath` dropDrive (fromInstallDir inst))
              inst HLS (mkTVer ver)
              (\ f t
                 -> liftIO
                      $ do mtime <- ifM
                                      (pathIsSymbolicLink f) (pure Nothing)
                                      (Just <$> getModificationTime f)
                           install f t (not forceInstall)
                           forM_ mtime $ setModificationTime t)
      In the expression:
        do PlatformRequest {..} <- lift getPlatformReq
           lift $ logInfo "Installing HLS"
           tmpInstallDest <- lift withGHCupTmpDir
           lEM
             $ make
                 ["DESTDIR=" <> fromGHCupPath tmpInstallDest,
                  "PREFIX=" <> fromInstallDir inst, ....]
                 (Just path)
           ....
    |
209 |   liftE $ mergeFileTree (tmpInstallDest `appendGHCupPath` dropDrive (fromInstallDir inst))
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information