on master help sign in
export pair' and reimplement pair
commitecc3485ae695b76aa2775b8a11827c1bb1f915e6 authorAndrew Martin <andrew.thaddeus@gmail.com> dateSun 18 Dec 2016, 21:13 (10 years ago) parentf9e4093
2 files changed+3−1
Data/Aeson/Encoding.hs+1 Data/Aeson/Encoding/Internal.hs+2−1
Data/Aeson/Encoding.hs+1
@@ -14,6 +14,7 @@ module Data.Aeson.Encoding
1414 , Series
1515 , pairs
1616 , pair
17+ , pair'
1718 -- * Predicates
1819 , nullEncoding
1920 -- * Encoding constructors
Data/Aeson/Encoding/Internal.hs+2−1
@@ -13,6 +13,7 @@ module Data.Aeson.Encoding.Internal
1313 , Series (..)
1414 , pairs
1515 , pair
16+ , pair'
1617 -- * Predicates
1718 , nullEncoding
1819 -- * Encoding constructors
@@ -122,7 +123,7 @@ data Series = Empty
122123 deriving (Typeable)
123124
124125pair :: Text -> Encoding -> Series
125−pair name val = Value $ retagEncoding $ text name >< colon >< val
126+pair name val = pair' (text name) val
126127
127128pair' :: Encoding' Text -> Encoding -> Series
128129pair' name val = Value $ retagEncoding $ retagEncoding name >< colon >< val