1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Add a Named instance for Term

This commit is contained in:
joshvera 2018-05-29 15:12:25 -04:00
parent e6ad8fc439
commit 79b1c8e1a6

View File

@ -84,6 +84,9 @@ instance (Message1 f) => Message (Term f ()) where
decodeMessage num = termIn () <$> liftDecodeMessage decodeMessage num
dotProto _ = liftDotProto (dotProto @(Term f ())) (Proxy @(f (Term f ())))
instance Named (Term f ()) where
nameOf _ = "Term"
instance Ord1 f => Ord1 (Term f) where
liftCompare comp = go where go t1 t2 = liftCompare2 comp go (unTerm t1) (unTerm t2)