Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

compatibility with AttoJSON 0.5.8

  • Loading branch information...
commit 897ec92f2ef81b802e1d975d61cc5b3c2fd29f94 1 parent 64d75c1
@JPMoresmau authored
View
2  lib/Scion/Cabal.hs
@@ -24,7 +24,7 @@ import GHC hiding ( load, TyCon )
import GHC.Paths ( ghc, ghc_pkg )
import Data.Typeable ()
-import Text.JSON.AttoJSON
+import Text.JSON.AttoJSON (JSON,JSValue(..),fromJSON,toJSON)
import qualified Data.ByteString.Char8 as S
import qualified Scion.Types.JSONDictionary as Dic
View
2  scion.cabal
@@ -1,5 +1,5 @@
name: scion
-version: 0.1.0.4
+version: 0.1.0.5
license: BSD3
license-file: docs/LICENSE
author: Thomas Schilling <nominolo@googlemail.com>
View
10 server/Scion/Server/Commands.hs
@@ -44,7 +44,7 @@ import Control.Applicative
import Data.List ( nub )
import Data.Time.Clock ( NominalDiffTime )
import System.Exit ( ExitCode(..) )
-import Text.JSON.AttoJSON
+import Text.JSON.AttoJSON (JSON,JSValue(..),fromJSON,toJSON)
import qualified Data.ByteString.Char8 as S
import qualified Data.Map as M
import qualified Data.MultiSet as MS
@@ -328,10 +328,10 @@ instance (JSON a, JSON b)=> JSON (Either a b) where
toJSON (Right a)=Dic.makeObject [(Dic.rightC,toJSON a)]
fromJSON _ = fail "Either"
-instance (JSON a)=>JSON (Maybe a) where
- toJSON (Nothing)=Dic.makeObject [(Dic.nothingC,JSNull)]
- toJSON (Just a)=Dic.makeObject [(Dic.justC,toJSON a)]
- fromJSON _ = fail "Maybe"
+--instance (JSON a)=>JSON (Maybe a) where
+-- toJSON (Nothing)=Dic.makeObject [(Dic.nothingC,JSNull)]
+-- toJSON (Just a)=Dic.makeObject [(Dic.justC,toJSON a)]
+-- fromJSON _ = fail "Maybe"
str :: String -> JSValue
str = JSString . S.pack
Please sign in to comment.
Something went wrong with that request. Please try again.