1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00

A term has a syntax field (and eventually an annotation field)

This commit is contained in:
joshvera 2018-06-21 13:18:32 -04:00
parent 5c83bec0c3
commit f5bd8d0066

View File

@ -84,7 +84,7 @@ instance (Show1 f, Show a) => Show (Term f a) where
instance Message1 f => Message (Term f ()) where
encodeMessage num (Term (In _ f)) = Encode.embedded num (liftEncodeMessage encodeMessage (fromInteger 1) f)
decodeMessage num = termIn () . fromMaybe undefined <$> Decode.at (Decode.embedded (liftDecodeMessage decodeMessage num)) num
dotProto _ = liftDotProto (Proxy @(f (Term f ())))
dotProto _ = [ DotProtoMessageField (DotProtoField (fromInteger 1) (Prim (Named (Single "Syntax"))) (Single "syntax") [] Nothing) ]
instance Named (Term f a) where
nameOf _ = "Term"