summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/CanonicalJSON.hs
diff options
context:
space:
mode:
authorThomas Hallgren <th-github@altocumulus.org>2019-03-13 01:51:26 +0100
committerThomas Hallgren <th-github@altocumulus.org>2019-03-13 01:51:26 +0100
commitb11d7d93dcb22b26564f49158414f07f1bd3f4cc (patch)
tree1c61f7824920b3661e8750804f51b096a0ad62fa /src/compiler/GF/Grammar/CanonicalJSON.hs
parentba9aeb33228b70185e92cdd192408587349e83de (diff)
GF.Grammar.Canonical: some Functor/Foldable/Traversable instances
Diffstat (limited to 'src/compiler/GF/Grammar/CanonicalJSON.hs')
-rw-r--r--src/compiler/GF/Grammar/CanonicalJSON.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Grammar/CanonicalJSON.hs b/src/compiler/GF/Grammar/CanonicalJSON.hs
index 8024fe99a..8b3464674 100644
--- a/src/compiler/GF/Grammar/CanonicalJSON.hs
+++ b/src/compiler/GF/Grammar/CanonicalJSON.hs
@@ -210,10 +210,10 @@ instance JSON a => JSON (RecordRow a) where
where fromRow (lbl, jsvalue) = do value <- readJSON jsvalue
return (RecordRow (LabelId lbl) value)
-instance JSON TableRowValue where
- showJSON (TableRowValue l v) = makeObj [(".pattern", showJSON l), (".value", showJSON v)]
+instance JSON rhs => JSON (TableRow rhs) where
+ showJSON (TableRow l v) = makeObj [(".pattern", showJSON l), (".value", showJSON v)]
- readJSON o = TableRowValue <$> o!".pattern" <*> o!".value"
+ readJSON o = TableRow <$> o!".pattern" <*> o!".value"
-- *** Identifiers in Concrete Syntax