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

Can't install using Cabal 3.10.2.1 + GHC 9.8.2. #1135

Open
ghost opened this issue Feb 25, 2024 · 3 comments
Open

Can't install using Cabal 3.10.2.1 + GHC 9.8.2. #1135

ghost opened this issue Feb 25, 2024 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 25, 2024

error.txt


Configuring library for yi-language-0.19.0..
Preprocessing library for yi-language-0.19.0..
Building library for yi-language-0.19.0..
[ 1 of 10] Compiling Paths_yi_language ( dist/build/autogen/Paths_yi_language.hs, dist/build/Paths_yi_language.o, dist/build/Paths_yi_language.dyn_o )
[ 2 of 10] Compiling Yi.Style         ( src/Yi/Style.hs, dist/build/Yi/Style.o, dist/build/Yi/Style.dyn_o )
[ 3 of 10] Compiling Yi.Style.Library ( src/Yi/Style/Library.hs, dist/build/Yi/Style/Library.o, dist/build/Yi/Style/Library.dyn_o )
[ 4 of 10] Compiling Yi.Utils         ( src/Yi/Utils.hs, dist/build/Yi/Utils.o, dist/build/Yi/Utils.dyn_o )

src/Yi/Utils.hs:101:20-23: warning: [GHC-63394] [-Wx-partial]
    In the use of ‘head’
    (imported from Prelude, but defined in GHC.List):
    "This is a partial function, it throws an error on empty lists. Use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty."
    |
101 |           prefix = head heads
    |                    ^^^^
[ 5 of 10] Compiling Yi.Buffer.Basic  ( src/Yi/Buffer/Basic.hs, dist/build/Yi/Buffer/Basic.o, dist/build/Yi/Buffer/Basic.dyn_o )
[ 6 of 10] Compiling Yi.Region        ( src/Yi/Region.hs, dist/build/Yi/Region.o, dist/build/Yi/Region.dyn_o )
[ 7 of 10] Compiling Yi.Syntax        ( src/Yi/Syntax.hs, dist/build/Yi/Syntax.o, dist/build/Yi/Syntax.dyn_o )

src/Yi/Syntax.hs:126:76-79: warning: [GHC-63394] [-Wx-partial]
    In the use of ‘head’
    (imported from Prelude, but defined in GHC.List):
    "This is a partial function, it throws an error on empty lists. Use pattern matching or Data.List.uncons instead. Consider refactoring to use Data.List.NonEmpty."
    |
126 |                   newResult = if null recomputed then oldResult else snd $ head recomputed
    |                                                                            ^^^^
[ 8 of 10] Compiling Yi.Lexer.Alex    ( src/Yi/Lexer/Alex.hs, dist/build/Yi/Lexer/Alex.o, dist/build/Yi/Lexer/Alex.dyn_o )
[ 9 of 10] Compiling Yi.Regex         ( src/Yi/Regex.hs, dist/build/Yi/Regex.o, dist/build/Yi/Regex.dyn_o )

src/Yi/Regex.hs:84:38-39: warning: [GHC-83475] [-Wunused-record-wildcards]
    No variables bound in the record wildcard match are used
    Suggested fix: Omit the ‘..’
   |
84 |                    seOptions = opts, .. }) = do put re
   |                                      ^^

src/Yi/Regex.hs:144:1-76: warning: [GHC-62161] [-Wincomplete-uni-patterns]
    Pattern match(es) are non-exhaustive
    In a pattern binding:
        Patterns of type ‘Maybe Regex’ not matched: Nothing
    |
144 | Just emptyRegex = makeRegexOptsM defaultCompOpt defaultExecOpt "[[:empty:]]"
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[10 of 10] Compiling Yi.Lexer.Compilation ( dist/build/Yi/Lexer/Compilation.hs, dist/build/Yi/Lexer/Compilation.o, dist/build/Yi/Lexer/Compilation.dyn_o )

dist/build/Yi/Lexer/Compilation.hs:274:50-51: error: [GHC-83865]
    • Couldn't match expected type ‘Int16#’ with actual type ‘Int#’
    • In the fifth argument of ‘alex_scan_tkn’, namely ‘sc’
      In the expression:
        alex_scan_tkn user__ input__ 0# input__ sc AlexNone
      In the expression:
        case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of
          (AlexNone, input__')
            -> case alexGetByte input__ of
                 Nothing -> AlexEOF
                 Just _ -> AlexError input__'
          (AlexLastSkip input__'' len, _) -> AlexSkip input__'' len
          (AlexLastAcc k input__''' len, _)
            -> AlexToken input__''' len (alex_actions ! k)
    |
274 |   = case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of
    |                                                  ^^

dist/build/Yi/Lexer/Compilation.hs:(304,1)-(337,67): error: [GHC-83865]
    Couldn't match type ‘Int#’ with ‘Int16#’
    Expected: t1
              -> t2
              -> Int#
              -> AlexInput
              -> Int16#
              -> AlexLastAcc
              -> (AlexLastAcc, AlexInput)
      Actual: t1
              -> t2
              -> Int#
              -> AlexInput
              -> Int#
              -> AlexLastAcc
              -> (AlexLastAcc, AlexInput)
    |
304 | alex_scan_tkn user__ orig_input len input__ s last_acc =
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

dist/build/Yi/Lexer/Compilation.hs:319:27-30: error: [GHC-83865]
    • Couldn't match expected type ‘Int#’ with actual type ‘Int32#’
    • In the first argument of ‘(+#)’, namely ‘base’
      In the expression: base +# ord_c
      In an equation for ‘offset’: offset = (base +# ord_c)
    |
319 |                 offset = (base +# ord_c)
    |                           ^^^^

dist/build/Yi/Lexer/Compilation.hs:322:73-77: error: [GHC-83865]
    • Couldn't match expected type ‘Int#’ with actual type ‘Int16#’
    • In the first argument of ‘(==#)’, namely ‘check’
      In the first argument of ‘tagToEnum#’, namely ‘(check ==# ord_c)’
      In the second argument of ‘(&&)’, namely
        ‘(tagToEnum# (check ==# ord_c))’
    |
322 |                 new_s = if GTE(offset,0#) && EQ(check,ord_c)
    |                                                                         ^^^^^

dist/build/Yi/Lexer/Compilation.hs:327:13-15: error: [GHC-83865]
    • Couldn't match expected type ‘Int16#’ with actual type ‘Int#’
    • In the pattern: -1#
      In a case alternative: -1# -> (new_acc, input__)
      In the expression:
        case new_s of
          -1# -> (new_acc, input__)
          _ -> alex_scan_tkn
                 user__ orig_input
                 (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len) new_input
                 new_s new_acc
    |
327 |             -1# -> (new_acc, input__)
    |             ^^^

src/Yi/Lexer/common.hsinc:33:45-46: error: [GHC-83865]
    • Couldn't match expected type ‘Int16#’ with actual type ‘Int#’
    • In the fifth argument of ‘alex_scan_tkn'’, namely ‘sc’
      In the expression: alex_scan_tkn' user input 0# input sc AlexNone
      In the expression:
        case alex_scan_tkn' user input 0# input sc AlexNone of
          (AlexNone, input', lookahead)
            -> case alexGetByte input of
                 Nothing -> (AlexEOF, lookahead)
                 Just _ -> (AlexError input', lookahead)
          (AlexLastSkip input'' len, _, lookahead)
            -> (AlexSkip input'' len, lookahead)
          (AlexLastAcc k input'' len, _, lookahead)
            -> (AlexToken input'' len (alex_actions ! k), lookahead)
   |
33 |   = case alex_scan_tkn' user input 0# input sc AlexNone of
   |                                             ^^

src/Yi/Lexer/common.hsinc:(47,1)-(73,61): error: [GHC-83865]
    Couldn't match type ‘Int#’ with ‘Int16#’
    Expected: t1
              -> t2
              -> Int#
              -> AlexInput
              -> Int16#
              -> AlexLastAcc
              -> (AlexLastAcc, AlexInput, Int)
      Actual: t1
              -> t2
              -> Int#
              -> AlexInput
              -> Int#
              -> AlexLastAcc
              -> (AlexLastAcc, AlexInput, Int)
   |
47 | alex_scan_tkn' user orig_input len input s last_acc =
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

src/Yi/Lexer/common.hsinc:56:25-28: error: [GHC-83865]
    • Couldn't match expected type ‘Int#’ with actual type ‘Int32#’
    • In the first argument of ‘(+#)’, namely ‘base’
      In the expression: base +# ord_c
      In an equation for ‘offset’: offset = (base +# ord_c)
   |
56 |           offset     = (base +# ord_c)
   |                         ^^^^

src/Yi/Lexer/common.hsinc:59:73-77: error: [GHC-83865]
    • Couldn't match expected type ‘Int#’ with actual type ‘Int16#’
    • In the first argument of ‘(==#)’, namely ‘check’
      In the first argument of ‘tagToEnum#’, namely ‘(check ==# ord_c)’
      In the second argument of ‘(&&)’, namely
        ‘(tagToEnum# (check ==# ord_c))’
   |
59 |           new_s      = if GEQ_(offset, 0#) && EQ_(check, ord_c)
   |                                                                         ^^^^^

src/Yi/Lexer/common.hsinc:64:11-13: error: [GHC-83865]
    • Couldn't match expected type ‘Int16#’ with actual type ‘Int#’
    • In the pattern: -1#
      In a case alternative: -1# -> (new_acc, input, (I# (new_len)))
      In the expression:
        case new_s of
          -1# -> (new_acc, input, (I# (new_len)))
          _ -> alex_scan_tkn' user orig_input new_len new_input new_s new_acc
   |
64 |           -1# -> (new_acc, input, IBOX(new_len))
   |           ^^^
@josephcsible
Copy link
Contributor

Those errors look like they're from the version of Alex you have installed being too old for your GHC version.

@mfourne
Copy link
Member

mfourne commented Aug 28, 2024

#1136 might be related, but I couldn't reproduce it before. Since #1136 fixes most of the fallout for me and the OP deleted their account, I'm tempted to close this and make a new issue for newer vty. Any comments on this?

@josephcsible
Copy link
Contributor

I like that plan too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants