The error message is really all you need. You are passing a value of type IO ByteString to IBuf which expects a value of type ByteString.