Commit 3e9677cc authored by Tom McLaughlin's avatar Tom McLaughlin

Cleaning up build

parent e6fb0fe0
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing #-}
-- | Description : Parsing messages received from IPython -- | Description : Parsing messages received from IPython
-- --
...@@ -7,15 +8,14 @@ ...@@ -7,15 +8,14 @@
-- the low-level 0MQ interface. -- the low-level 0MQ interface.
module IHaskell.IPython.Message.Parser (parseMessage) where module IHaskell.IPython.Message.Parser (parseMessage) where
-- import Control.Applicative ((<|>), (<$>), (<*>))
import Data.Aeson ((.:), (.:?), decode, Result(..), Object, Value(..)) import Data.Aeson ((.:), (.:?), decode, Result(..), Object, Value(..))
import Data.Aeson.Types (parse, parseEither) import Data.Aeson.Types (parse, parseEither)
import Data.ByteString hiding (unpack) import Data.ByteString hiding (unpack)
import qualified Data.ByteString.Lazy as Lazy import qualified Data.ByteString.Lazy as Lazy
import Data.HashMap.Strict as HM import Data.HashMap.Strict as HM
import Data.Map (Map) import Data.Map (Map)
import Data.Maybe (catMaybes, fromMaybe) import Data.Maybe (fromMaybe)
import Data.Text (Text, unpack, concat) import Data.Text (Text, unpack)
import Debug.Trace import Debug.Trace
import IHaskell.IPython.Types import IHaskell.IPython.Types
......
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
module IHaskell.IPython.Message.UUID (UUID, random, randoms, uuidToString) where module IHaskell.IPython.Message.UUID (UUID, random, randoms, uuidToString) where
import Control.Monad (mzero, replicateM) import Control.Monad (mzero, replicateM)
-- import Control.Applicative ((<$>))
import Data.Text (pack)
import Data.Aeson import Data.Aeson
import Data.Text (pack)
import Data.UUID.V4 (nextRandom) import Data.UUID.V4 (nextRandom)
-- | A UUID (universally unique identifier). -- | A UUID (universally unique identifier).
......
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing -fno-warn-unused-matches #-}
-- | Description : @ToJSON@ for Messages -- | Description : @ToJSON@ for Messages
-- --
...@@ -7,13 +8,7 @@ module IHaskell.IPython.Message.Writer (ToJSON(..)) where ...@@ -7,13 +8,7 @@ module IHaskell.IPython.Message.Writer (ToJSON(..)) where
import Data.Aeson import Data.Aeson
import Data.Map (Map) import Data.Map (Map)
-- import Data.Monoid (mempty)
import Data.Text (Text, pack) import Data.Text (Text, pack)
-- import qualified Data.ByteString as B
-- import qualified Data.ByteString.Lazy as L
-- import Data.Text.Encoding
import IHaskell.IPython.Types import IHaskell.IPython.Types
instance ToJSON LanguageInfo where instance ToJSON LanguageInfo where
......
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, DeriveGeneric #-} {-# LANGUAGE OverloadedStrings, DeriveDataTypeable, DeriveGeneric #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing -fno-warn-unused-matches #-}
-- | This module contains all types used to create an IPython language kernel. -- | This module contains all types used to create an IPython language kernel.
module IHaskell.IPython.Types ( module IHaskell.IPython.Types (
...@@ -34,13 +35,11 @@ module IHaskell.IPython.Types ( ...@@ -34,13 +35,11 @@ module IHaskell.IPython.Types (
extractPlain, extractPlain,
) where ) where
-- import Control.Applicative ((<$>), (<*>))
import Data.Aeson import Data.Aeson
import Data.ByteString (ByteString) import Data.ByteString (ByteString)
import Data.List (find) import Data.List (find)
import Data.Map (Map) import Data.Map (Map)
import Data.Serialize import Data.Serialize
-- import qualified Data.String as S
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as Text import qualified Data.Text as Text
import qualified Data.Text.Encoding as Text import qualified Data.Text.Encoding as Text
...@@ -507,8 +506,12 @@ data DisplayData = DisplayData MimeType Text ...@@ -507,8 +506,12 @@ data DisplayData = DisplayData MimeType Text
-- We can't print the actual data, otherwise this will be printed every time it gets computed -- We can't print the actual data, otherwise this will be printed every time it gets computed
-- because of the way the evaluator is structured. See how `displayExpr` is computed. -- because of the way the evaluator is structured. See how `displayExpr` is computed.
instance Show DisplayData where instance Show DisplayData where
show _ = "DisplayData" show (DisplayData PlainText t) = "DisplayData PlainText (" ++ show t ++ ")"
show (DisplayData (MimePng w h) t) = "DisplayData (Png " ++ show (w, h) ++ ")"
show (DisplayData MimeSvg t) = "DisplayData (Svg)"
show (DisplayData (MimeJpg w h) t) = "DisplayData (Jpg " ++ show (w, h) ++ ")"
show (DisplayData MimeHtml t) = "DisplayData (Html " ++ show t ++ ")"
show (DisplayData typ t) = "DisplayData (unknown: " ++ show typ ++ ")"
-- Allow DisplayData serialization -- Allow DisplayData serialization
instance Serialize Text where instance Serialize Text where
put str = put (Text.encodeUtf8 str) put str = put (Text.encodeUtf8 str)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment