diff options
Diffstat (limited to 'Com/Simatime/Go.hs')
-rw-r--r-- | Com/Simatime/Go.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Com/Simatime/Go.hs b/Com/Simatime/Go.hs index bd9296a..e622539 100644 --- a/Com/Simatime/Go.hs +++ b/Com/Simatime/Go.hs @@ -7,6 +7,7 @@ Golang and Clojure's core.async. $example -} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE OverloadedStrings #-} module Com.Simatime.Go ( -- * Running and forking @@ -25,6 +26,7 @@ import Com.Simatime.Alpha hiding ( read ) import qualified Control.Concurrent as Concurrent import qualified Control.Concurrent.Chan.Unagi.Bounded as Chan +import qualified Data.Aeson as Aeson -- | A standard channel. data Channel a = Channel @@ -33,6 +35,9 @@ data Channel a = Channel , _size :: Int } +instance Aeson.ToJSON (Channel a) where + toJSON _ = Aeson.String ("#<channel>" :: Text) + -- | Starts a background process. fork :: IO () -> IO Concurrent.ThreadId fork = Concurrent.forkIO |