mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-28 04:08:55 -06:00
Added explicit implementation for 'readJSON' in the instance declaration for 'JSON PGF.Trie'
This commit is contained in:
@@ -1024,6 +1024,7 @@ instance JSON PGF.Trie where
|
|||||||
showJSON (PGF.Ap f [[]]) = makeObj ["fun".=f] -- leaf
|
showJSON (PGF.Ap f [[]]) = makeObj ["fun".=f] -- leaf
|
||||||
-- showJSON (PGF.Ap f [es]) = makeObj ["fun".=f,"children".=es] -- one alternative
|
-- showJSON (PGF.Ap f [es]) = makeObj ["fun".=f,"children".=es] -- one alternative
|
||||||
showJSON (PGF.Ap f alts) = makeObj ["fun".=f,"alts".=alts]
|
showJSON (PGF.Ap f alts) = makeObj ["fun".=f,"alts".=alts]
|
||||||
|
readJSON = error "PGF.Trie.readJSON intentionally not defined"
|
||||||
|
|
||||||
instance JSON PGF.CId where
|
instance JSON PGF.CId where
|
||||||
readJSON x = readJSON x >>= maybe (fail "Bad language.") return . PGF.readLanguage
|
readJSON x = readJSON x >>= maybe (fail "Bad language.") return . PGF.readLanguage
|
||||||
|
|||||||
Reference in New Issue
Block a user