Perplexing type error with unboxed tuples
The fast-digits package fails to build with 8.2.0-rc1,
[1 of 2] Compiling Data.FastDigits.Internal ( src/Data/FastDigits/Internal.hs, dist/build/Data/FastDigits/Internal.o )
src/Data/FastDigits/Internal.hs:42:34: error:
• Couldn't match a lifted type with an unlifted type
Expected type: Word# -> (# Word#, Word# #)
Actual type: Word# -> (# Word#, Word# #)
• In the expression: go pw2
In a pattern binding: (# n, pw2n #) = go pw2
In the expression:
let (# n, pw2n #) = go pw2
in
case timesWord2# pw pw2n of
(# 0##, pw2n1 #) -> (# n `timesWord#` 2## `plusWord#` 1##, pw2n1 #)
_ -> (# n `timesWord#` 2##, pw2n #)
|
42 | -> let (# n, pw2n #) = go pw2 in
| ^^^^^^
src/Data/FastDigits/Internal.hs:43:33: error:
• Couldn't match a lifted type with an unlifted type
When matching the kind of ‘Word#’
• In the second argument of ‘timesWord2#’, namely ‘pw2n’
In the expression: timesWord2# pw pw2n
In the expression:
case timesWord2# pw pw2n of
(# 0##, pw2n1 #) -> (# n `timesWord#` 2## `plusWord#` 1##, pw2n1 #)
_ -> (# n `timesWord#` 2##, pw2n #)
|
43 | case timesWord2# pw pw2n of
| ^^^^
src/Data/FastDigits/Internal.hs:44:37: error:
• Couldn't match a lifted type with an unlifted type
When matching the kind of ‘Word#’
• In the first argument of ‘timesWord#’, namely ‘n’
In the first argument of ‘plusWord#’, namely ‘n `timesWord#` 2##’
In the expression: n `timesWord#` 2## `plusWord#` 1##
|
44 | (# 0##, pw2n1 #) -> (#n `timesWord#` 2## `plusWord#` 1##, pw2n1 #)
| ^
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |
Edited by Matthew Pickering