Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

compatibility with AttoJSON 0.5.8

  • Loading branch information...
commit 897ec92f2ef81b802e1d975d61cc5b3c2fd29f94 1 parent 64d75c1
JP Moresmau authored
2  lib/Scion/Cabal.hs
@@ -24,7 +24,7 @@ import GHC hiding ( load, TyCon )
24 24 import GHC.Paths ( ghc, ghc_pkg )
25 25 import Data.Typeable ()
26 26
27   -import Text.JSON.AttoJSON
  27 +import Text.JSON.AttoJSON (JSON,JSValue(..),fromJSON,toJSON)
28 28 import qualified Data.ByteString.Char8 as S
29 29 import qualified Scion.Types.JSONDictionary as Dic
30 30
2  scion.cabal
... ... @@ -1,5 +1,5 @@
1 1 name: scion
2   -version: 0.1.0.4
  2 +version: 0.1.0.5
3 3 license: BSD3
4 4 license-file: docs/LICENSE
5 5 author: Thomas Schilling <nominolo@googlemail.com>
10 server/Scion/Server/Commands.hs
@@ -44,7 +44,7 @@ import Control.Applicative
44 44 import Data.List ( nub )
45 45 import Data.Time.Clock ( NominalDiffTime )
46 46 import System.Exit ( ExitCode(..) )
47   -import Text.JSON.AttoJSON
  47 +import Text.JSON.AttoJSON (JSON,JSValue(..),fromJSON,toJSON)
48 48 import qualified Data.ByteString.Char8 as S
49 49 import qualified Data.Map as M
50 50 import qualified Data.MultiSet as MS
@@ -328,10 +328,10 @@ instance (JSON a, JSON b)=> JSON (Either a b) where
328 328 toJSON (Right a)=Dic.makeObject [(Dic.rightC,toJSON a)]
329 329 fromJSON _ = fail "Either"
330 330
331   -instance (JSON a)=>JSON (Maybe a) where
332   - toJSON (Nothing)=Dic.makeObject [(Dic.nothingC,JSNull)]
333   - toJSON (Just a)=Dic.makeObject [(Dic.justC,toJSON a)]
334   - fromJSON _ = fail "Maybe"
  331 +--instance (JSON a)=>JSON (Maybe a) where
  332 +-- toJSON (Nothing)=Dic.makeObject [(Dic.nothingC,JSNull)]
  333 +-- toJSON (Just a)=Dic.makeObject [(Dic.justC,toJSON a)]
  334 +-- fromJSON _ = fail "Maybe"
335 335
336 336 str :: String -> JSValue
337 337 str = JSString . S.pack

0 comments on commit 897ec92

Please sign in to comment.
Something went wrong with that request. Please try again.