Closed Thhethssmuz closed 5 years ago
Using Maybe types leads to an infinite loop on the client:
import Control.Concurrent (forkIO) import Data.MessagePack import Network.MessagePack.Client import Network.MessagePack.Server getMaybeValue :: Server (Maybe Int) getMaybeValue = return $ Just 42 getMaybeValue' :: Client (Maybe Int) getMaybeValue' = call "getMaybeValue" main = do forkIO $ serve 5000 [ method "getMaybeValue" getMaybeValue ] maybeValue <- execClient "127.0.0.1" 5000 getMaybeValue' print maybeValue -- Newer reaches this point
Using Maybe types leads to an infinite loop on the client: