未能在OSX 10.9.5上安装haskell-src-exts-1.16.0 [英] Failed to install haskell-src-exts-1.16.0 on OSX 10.9.5
本文介绍了未能在OSX 10.9.5上安装haskell-src-exts-1.16.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的环境:
- ghc 7.8.3 from http://ghcformacosx.github.io/
- OSX 10.9.5
- cabal 1.20.0.3(直接从ghc for mac osx)
<我的$cabal install alex 和 cabal install happy
。 cabal二进制路径被确认添加到我的$ PATH中作为$(HOME)/ Library / Haskell / bin /
。
cabal install haskell-src-exts
发出以下编译错误:
<$ c编译Language.Haskell.Exts.InternalParser(dist / build / Language / Haskell / Exts / InternalParser.hs,dist / build / Language / Haskell / Exts / InternalParser.o)
模板/ GenericTemplate.hs:104:22:
无法匹配预期类型'Bool'
,其实际类型为'Happy_GHC_Exts.Int#'
在表达式中:
(n Happy_GHC_Exts。<#(0#:: Happy_GHC_Exts.Int#))
在
a格式后卫的选项中:
(n Happy_GHC_Exts。<#( 0#:: Happy_GHC_Exts.Int#))
在另一种情况下:
n | (n Happy_GHC_Exts。<#(0#:: Happy_GHC_Exts.Int#))
- > (happyReduceArr Happy_Data_Array。!规则)我tk st
其中
规则
=(Happy_GHC_Exts.I#
((Happy_GHC_Exts.negateInt#
((n Happy_GHC_Exts。+ #(1#:: Happy_GHC_Exts.Int#))))))
模板/ GenericTemplate.hs:115:23:
无法匹配预期的类型'Bool'
实际类型为'Happy_GHC_Exts.Int#'
在表达式中:
(off_i Happy_GHC_Exts。> =#(0#:: Happy_GHC_Exts.Int#))
在表达式中:
if(off_i Happy_GHC_Exts。> =#(0#:: Happy_GHC_Exts.Int#))then
(indexShortOffAddr happyCheck off_i Happy_GHC_Exts。==#i)
else
False
在'check'等式中:
检查
= if(off_i Happy_GHC_Exts。> =#(0#:: Happy_GHC_Exts.Int#))然后
(indexShortOffAddr happyCheck off_i Happy_GHC_Exts。==#i)
else
False
模板/ GenericTemplate.hs:117:30:
无法匹配预期类型'Happy_GHC_Exts.Int#'
与实际类型'Bool'
In表达式:False
在表达式中:
if(off_i Happy_GHC_Exts。> =#(0#:: Happy_GHC_Exts.Int#))然后
(indexShortOffAddr happyCheck off_i Happy_GHC_Exts ==# i)
else
False
模板/ GenericTemplate.hs:119:13:
与实际类型无法匹配预期类型'Bool'
'Happy_GHC_Exts.Int#'
在表达式中:check
在
a的模式守卫stmt中绑定模式:
检查
模板/ GenericTemplate .hs:212:14:
包含unlifted类型的模式绑定应该使用最外层的模式:
(sts1 @((HappyCons(st1 @(action))(_))))
= happyDrop k(HappyCons(st)(sts))
在等式中happyMonadReduce:
happyMonadReduceķNT FNĴtk的ST STS STK
= happyThen1
(FN STK TK)
(\的R - > (HappyCons(st1 @(action))(_))))
= happyDrop k(() HappyCons(st)(sts))
drop_stk = happyDropStk k stk
模板/ GenericTemplate.hs:219:14:
包含未提升类型的模式绑定应该使用最外层的模式:
(HappyCons(st1 @(action))(_)))
= happyDrop k(HappyCons(st)(sts))
在'happyMonad2Reduce ':
happyMonad2Reduce k nt fn j tk st st 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)
....
无法安装haskell-src-exts-1.16.0
cabal:错误:某些软件包安装失败:
haskell-src-exts-1.16.0在构建阶段失败。例外是:
ExitFailure 1
解决方案它似乎已知 问题。如果我理解正确,只需更新
happy
地址:这里是问题的详细描述
My env:
- ghc 7.8.3 from http://ghcformacosx.github.io/
- OSX 10.9.5
- cabal 1.20.0.3 (directly from ghc for mac osx)
I did
cabal install alex
andcabal install happy
. cabal binary path was confirmed to be added to my $PATH as$(HOME)/Library/Haskell/bin/
.cabal install haskell-src-exts
emitted the following compiling error:[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
解决方案It seems to be known issue. If I understand it correctly, you just need to update
happy
ADD: Here is detailed description of the issue
这篇关于未能在OSX 10.9.5上安装haskell-src-exts-1.16.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文