File tree Expand file tree Collapse file tree 8 files changed +403
-478
lines changed Expand file tree Collapse file tree 8 files changed +403
-478
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ module Data.Aeson
76
76
-- ** Generic JSON classes and options
77
77
, GFromJSON (.. )
78
78
, FromArgs (.. )
79
- , GToJSON ( .. )
80
- , GToEncoding ( .. )
79
+ , GToJSON
80
+ , GToEncoding
81
81
, ToArgs (.. )
82
82
, Zero
83
83
, One
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ module Data.Aeson.Encoding
14
14
, Series
15
15
, pairs
16
16
, pair
17
+ , pairStr
17
18
, pair'
18
19
-- * Predicates
19
20
, nullEncoding
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module Data.Aeson.Encoding.Internal
13
13
, Series (.. )
14
14
, pairs
15
15
, pair
16
+ , pairStr
16
17
, pair'
17
18
-- * Predicates
18
19
, nullEncoding
@@ -124,6 +125,11 @@ data Series = Empty
124
125
125
126
pair :: Text -> Encoding -> Series
126
127
pair name val = pair' (text name) val
128
+ {-# INLINE pair #-}
129
+
130
+ pairStr :: String -> Encoding -> Series
131
+ pairStr name val = pair' (string name) val
132
+ {-# INLINE pairStr #-}
127
133
128
134
pair' :: Encoding' Text -> Encoding -> Series
129
135
pair' name val = Value $ retagEncoding $ retagEncoding name >< colon >< val
Original file line number Diff line number Diff line change @@ -63,8 +63,8 @@ module Data.Aeson.Types
63
63
-- ** Generic JSON classes
64
64
, GFromJSON (.. )
65
65
, FromArgs (.. )
66
- , GToJSON ( .. )
67
- , GToEncoding ( .. )
66
+ , GToJSON
67
+ , GToEncoding
68
68
, ToArgs (.. )
69
69
, Zero
70
70
, One
Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE CPP #-}
2
+ {-# LANGUAGE ConstraintKinds #-}
2
3
{-# LANGUAGE FlexibleContexts #-}
3
4
{-# LANGUAGE FlexibleInstances #-}
4
5
{-# LANGUAGE GADTs #-}
@@ -36,8 +37,8 @@ module Data.Aeson.Types.Class
36
37
-- * Generic JSON classes
37
38
, GFromJSON (.. )
38
39
, FromArgs (.. )
39
- , GToJSON ( .. )
40
- , GToEncoding ( .. )
40
+ , GToJSON
41
+ , GToEncoding
41
42
, ToArgs (.. )
42
43
, Zero
43
44
, One
@@ -94,4 +95,10 @@ import Prelude ()
94
95
95
96
import Data.Aeson.Types.FromJSON
96
97
import Data.Aeson.Types.Generic (One , Zero )
97
- import Data.Aeson.Types.ToJSON
98
+ import Data.Aeson.Types.ToJSON hiding (GToJSON )
99
+ import qualified Data.Aeson.Types.ToJSON as ToJSON
100
+ import Data.Aeson.Types.Internal (Value )
101
+ import Data.Aeson.Encoding (Encoding )
102
+
103
+ type GToJSON = ToJSON. GToJSON Value
104
+ type GToEncoding = ToJSON. GToJSON Encoding
You can’t perform that action at this time.
0 commit comments