From b11d7d93dcb22b26564f49158414f07f1bd3f4cc Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Wed, 13 Mar 2019 01:51:26 +0100 Subject: GF.Grammar.Canonical: some Functor/Foldable/Traversable instances --- src/compiler/GF/Grammar/CanonicalJSON.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler/GF/Grammar/CanonicalJSON.hs') 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 -- cgit v1.2.3