Skip to content

Nix Expression: Build fails #170

@GuillaumeDesforges

Description

@GuillaumeDesforges

I am currently adding haskell-language-server to nixpkgs: NixOS/nixpkgs#91279

I have errors (see NixOS/nixpkgs#91279 (comment)):

Building library for haskell-language-server-0.1.0.0..
[ 1 of 17] Compiling Ide.Logger       ( src/Ide/Logger.hs, dist/build/Ide/Logger.o )
[ 2 of 17] Compiling Ide.Cradle       ( src/Ide/Cradle.hs, dist/build/Ide/Cradle.o )
[ 3 of 17] Compiling Ide.Plugin.Config ( src/Ide/Plugin/Config.hs, dist/build/Ide/Plugin/Config.o )
[ 4 of 17] Compiling Ide.PluginUtils  ( src/Ide/PluginUtils.hs, dist/build/Ide/PluginUtils.o )
[ 5 of 17] Compiling Ide.Types        ( src/Ide/Types.hs, dist/build/Ide/Types.o )
[ 6 of 17] Compiling Ide.Plugin.Formatter ( src/Ide/Plugin/Formatter.hs, dist/build/Ide/Plugin/Formatter.o )

src/Ide/Plugin/Formatter.hs:67:33: error:
    • Couldn't match expected type ‘shake-0.19:Development.Shake.Internal.Core.Types.Action
                                      (FileVersion, Maybe T.Text)
                                    -> IO (a1, Maybe T.Text)’
                  with actual type ‘IO a0’
    • The first argument of ($) takes one argument,
      but its type ‘IO a0’ has none
      In a stmt of a 'do' block:
        (_, mb_contents) <- runAction "Formatter" ideState
                              $ getFileContents fp
      In the expression:
        do (_, mb_contents) <- runAction "Formatter" ideState
                                 $ getFileContents fp
           case mb_contents of
             Just contents -> do ...
             Nothing
               -> return
                    $ Left
                        $ responseError
                            $ T.pack
                                $ "Formatter plugin: could not get file contents for " ++ show uri
   |
67 |             (_, mb_contents) <- runAction "Formatter" ideState $ getFileContents fp
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Ide/Plugin/Formatter.hs:67:55: error:
    • Couldn't match expected type ‘shake-0.19:Development.Shake.Internal.Core.Types.Action
                                      a0’
                  with actual type ‘IdeState’
    • In the second argument of ‘runAction’, namely ‘ideState’
      In the expression: runAction "Formatter" ideState
      In a stmt of a 'do' block:
        (_, mb_contents) <- runAction "Formatter" ideState
                              $ getFileContents fp
   |
67 |             (_, mb_contents) <- runAction "Formatter" ideState $ getFileContents fp
   |                                                       ^^^^^^^^
[16 of 17] Compiling Paths_haskell_language_server ( dist/build/autogen/Paths_haskell_language_server.hs, dist/build/Paths_haskell_language_server.o )
[17 of 17] Compiling Ide.Version      ( src/Ide/Version.hs, dist/build/Ide/Version.o )

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous integrationos: nixos

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions