Commit fc7264ca authored by Steffen Michels's avatar Steffen Michels

move JSON instances from Data.Map to Data.Map.GenJSON

parent 8eda0edc
Pipeline #19444 passed with stage
in 3 minutes and 17 seconds
......@@ -8,7 +8,7 @@ from StdList import ++, filter, hd, isEmpty, isMember, map, reverse, tl,
import StdOrdList
import StdTuple
import Data.Map
import Data.Map, Data.Map.GenJSON
import Data.Maybe
import Data.Functor
import Text.GenJSON
......
......@@ -69,7 +69,6 @@ from Data.Maybe import :: Maybe (..)
from StdOverloaded import class ==, class <
from StdBool import not
from StdFunc import id
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.GenEq import generic gEq
from Data.GenLexOrd import generic gLexOrd, :: LexOrd
from Data.Monoid import class Monoid, class Semigroup
......@@ -290,8 +289,6 @@ keysSet :: !(Map k a) -> Set k
*/
fromSet :: !(k -> a) !(Set k) -> Map k a
derive JSONEncode Map
derive JSONDecode Map
derive gEq Map
derive gLexOrd Map
......
......@@ -9,7 +9,6 @@ import Data.Functor
import Data.List
import Control.Applicative
import Control.Monad
import Text.GenJSON
import qualified Data.Set
from Data.Set import :: Set
......@@ -2060,8 +2059,6 @@ height :: !u:(Map k w:v) -> x:(!Int, !y:(Map k w:v)), [u y <= w, x <= y, u <= y]
height Tip = (0, Tip)
height (Bin h k v left right) = (h, Bin h k v left right)
derive JSONEncode Map
derive JSONDecode Map
gEq{|Map|} fk fv mx my = mapSize mx == mapSize my && and [fk kx ky && fv vx vy \\ (kx,vx) <- toList mx & (ky,vy) <- toList my]
gLexOrd{|Map|} kLexOrd vLexOrd x y = gLexOrd{|* -> *|} (gLexOrd{|* -> * -> *|} kLexOrd vLexOrd) (toAscList x) (toAscList y)
......
definition module Data.Map.GenJSON
from Data.Maybe import :: Maybe
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.Map import :: Map
derive JSONEncode Map
derive JSONDecode Map
implementation module Data.Map.GenJSON
import Data.Map, Text.GenJSON
derive JSONEncode Map
derive JSONDecode Map
......@@ -120,6 +120,7 @@ import qualified Data.Integer.ToInteger
import qualified Data.Integer.ToString
import qualified Data.List
import qualified Data.Map
import qualified Data.Map.GenJSON
import qualified Data.MapCollection
import qualified Data.Matrix
import qualified Data.Maybe
......
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