3
IO`操作考慮:評估`從REPL
*lecture2> :let x = (the (IO Int) (pure 42))
看着它的類型,有什麼MkFFI C_Types String String
簽名的含義是什麼?
*lecture2> :t x
x : IO' (MkFFI C_Types String String) Int
然後我嘗試從REPL評估x
:
*lecture2> :exec x
main:When checking argument value to function Prelude.Basics.the:
Type mismatch between
IO Int (Type of x)
and
Integer (Expected type)
另外,爲什麼不中REPL 42
打印出來?