我是 Haskell 的新手,正在尝试使用 Data.Bits 中的按位运算。每次我尝试我都会收到一条错误消息
Prelude Data.Bits> 1 `shiftL` 16
<interactive>:1:0:
Ambiguous type variable `t' in the constraint:
`Bits t' arising from a use of `shiftL' at <interactive>:1:0-12
Probable fix: add a type signature that fixes these type variable(s)
这发生在许多操作中,我也尝试过。|。和 。&。
我一定遗漏了一些非常简单的东西,如果你能发现问题,请告诉我