gpt4 book ai didi

macos - 无法在 OSX 10.9.5 上安装 haskell-src-exts-1.16.0

转载 作者:行者123 更新时间:2023-12-04 23:49:34 24 4
gpt4 key购买 nike

我的环境:

  • 来自 http://ghcformacosx.github.io/ 的 ghc 7.8.3
  • OSX 10.9.5
  • cabal 1.20.0.3(直接来自 ghc for mac osx)

  • 我做了 cabal install alexcabal install happy . cabal 二进制路径被确认添加到我的 $PATH 中为 $(HOME)/Library/Haskell/bin/ .
    cabal install haskell-src-exts发出以下编译错误:
    [19 of 22] Compiling Language.Haskell.Exts.InternalParser ( dist/build/Language/Haskell/Exts/InternalParser.hs, dist/build/Language/Haskell/Exts/InternalParser.o )

    templates/GenericTemplate.hs:104:22:
    Couldn't match expected type ‘Bool’
    with actual type ‘Happy_GHC_Exts.Int#’
    In the expression:
    (n Happy_GHC_Exts.<# (0# :: Happy_GHC_Exts.Int#))
    In a stmt of a pattern guard for
    a case alternative:
    (n Happy_GHC_Exts.<# (0# :: Happy_GHC_Exts.Int#))
    In a case alternative:
    n | (n Happy_GHC_Exts.<# (0# :: Happy_GHC_Exts.Int#))
    -> (happyReduceArr Happy_Data_Array.! rule) i tk st
    where
    rule
    = (Happy_GHC_Exts.I#
    ((Happy_GHC_Exts.negateInt#
    ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))

    templates/GenericTemplate.hs:115:23:
    Couldn't match expected type ‘Bool’
    with actual type ‘Happy_GHC_Exts.Int#’
    In the expression:
    (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#))
    In the expression:
    if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#)) then
    (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)
    else
    False
    In an equation for ‘check’:
    check
    = if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#)) then
    (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)
    else
    False

    templates/GenericTemplate.hs:117:30:
    Couldn't match expected type ‘Happy_GHC_Exts.Int#’
    with actual type ‘Bool’
    In the expression: False
    In the expression:
    if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#)) then
    (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)
    else
    False

    templates/GenericTemplate.hs:119:13:
    Couldn't match expected type ‘Bool’
    with actual type ‘Happy_GHC_Exts.Int#’
    In the expression: check
    In a stmt of a pattern guard for
    a pattern binding:
    check

    templates/GenericTemplate.hs:212:14:
    Pattern bindings containing unlifted types should use an outermost bang pattern:
    (sts1@((HappyCons (st1@(action)) (_))))
    = happyDrop k (HappyCons (st) (sts))
    In an equation for ‘happyMonadReduce’:
    happyMonadReduce k nt fn j tk st sts stk
    = happyThen1
    (fn stk tk)
    (\ r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
    where
    (sts1@((HappyCons (st1@(action)) (_))))
    = happyDrop k (HappyCons (st) (sts))
    drop_stk = happyDropStk k stk

    templates/GenericTemplate.hs:219:14:
    Pattern bindings containing unlifted types should use an outermost bang pattern:
    (sts1@((HappyCons (st1@(action)) (_))))
    = happyDrop k (HappyCons (st) (sts))
    In an equation for ‘happyMonad2Reduce’:
    happyMonad2Reduce k nt fn j tk st sts stk
    = happyThen1
    (fn stk tk)
    (\ r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
    where
    (sts1@((HappyCons (st1@(action)) (_))))
    = happyDrop k (HappyCons (st) (sts))
    drop_stk = happyDropStk k stk
    (off) = indexShortOffAddr happyGotoOffsets st1
    (off_i) = (off Happy_GHC_Exts.+# nt)
    ....
    Failed to install haskell-src-exts-1.16.0
    cabal: Error: some packages failed to install:
    haskell-src-exts-1.16.0 failed during the building phase. The exception was:
    ExitFailure 1

    最佳答案

    好像是known issue .如果我理解正确,你只需要更新 happy
    地址:Here是问题的详细描述

    关于macos - 无法在 OSX 10.9.5 上安装 haskell-src-exts-1.16.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26098486/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com