我正在尝试加载文件。
我有:
wf :: STMutable a File
wf = File.new "worlds/seed_77.world"
data PickleSerialization = pure native com.github.lands.PickleSerialization where
native loadWorld com.github.lands.PickleSerialization.loadWorld :: MutableIO File -> IO World throws IOException, IncorrectFileException
如果我尝试这样做:
PickleSerialization.loadWorld wf
我收到此错误,这对我来说似乎很困惑:
[ERROR: 4]: type error in expression wf
type is IOMutable File
used as MutableIO File