Evaluating `IO` Actions from REPL

Viewed 106

Given:

*lecture2> :let x = (the (IO Int) (pure 42))

Looking at its type, what's the meaning of the MkFFI C_Types String String signature?

*lecture2> :t x
x : IO' (MkFFI C_Types String String) Int

I then attempted to evaluate x from the REPL:

*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)

Also, why doesn't 42 print out in the REPL?

1 Answers
Related