couldn't match expected type ByteString with actual type IO ByteString

9 Jun
2016
9 Jun
'16
8:07 a.m.
Hello All, I'm getting the following error: /apps/workspace/hade/src/Step/ReadExcel.hs:39:23: Couldn't match expected type ‘L.ByteString’ with actual type ‘IO L.ByteString’ In the first argument of ‘IBuf’, namely ‘j’ In the second argument of ‘sendChan’, namely ‘(IBuf j)’ when I compile the following code: data Buf = IChan (SendPort Buf) | IBuf (L.ByteString) deriving (Show,Generic,Typeable) instance Binary Buf readExcel :: Process() readExcel = do sendChan chan (IBuf j) where IChan chan = expect j = do r <- toTableRowsFromFile 8 "final-project.xlsx" let b = A.encode r return b remotable ['readExcel] Any ideas as to what I'm doing wrong? Carl
3271
Age (days ago)
3271
Last active (days ago)
2 comments
3 participants
participants (3)
-
Carl Petersen
-
Marc Ziegert
-
Mitchell Rosen