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

A term has a syntax

This commit is contained in:
joshvera 2018-06-20 16:34:14 -04:00
parent 09258b88f7
commit 9dda9dfc47

View File

@ -82,7 +82,7 @@ instance (Show1 f, Show a) => Show (Term f a) where
showsPrec = showsPrec1
instance Message1 f => Message (Term f ()) where
encodeMessage num (Term (In _ f)) = Encode.embedded num (liftEncodeMessage encodeMessage num f)
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 ())))