Fixes weird segmentation fault on message receive.
By removing the strictness annotation from an existential field.
This commit is contained in:
parent
5f7983e1f8
commit
4410ab2f8c
@ -43,13 +43,13 @@ data Message = Message
|
||||
-- | The typeclass for different types of messages.
|
||||
class (Typeable msg, Show msg, Eq msg, Ord msg) => MessageC msg where
|
||||
toMessage :: msg -> MessageW
|
||||
toMessage = MessageW
|
||||
toMessage !msg = MessageW msg
|
||||
|
||||
fromMessage :: MessageW -> Maybe msg
|
||||
fromMessage (MessageW msg) = cast msg
|
||||
|
||||
-- | A wrapper over all types of messages.
|
||||
data MessageW = forall m . MessageC m => MessageW !m deriving (Typeable)
|
||||
data MessageW = forall m . MessageC m => MessageW m deriving (Typeable)
|
||||
|
||||
instance Show MessageW where
|
||||
show (MessageW m) = show m
|
||||
|
Loading…
Reference in New Issue
Block a user