mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Define a GSum instance for sums.
This commit is contained in:
parent
30dad2da72
commit
5231b4f282
@ -187,3 +187,8 @@ class GSum t where
|
||||
instance GSum f => GSum (M1 i c f) where
|
||||
type Members (M1 i c f) = Members f
|
||||
gmembers = gmembers . unM1
|
||||
|
||||
instance (GSum f, GSum g) => GSum (f :+: g) where
|
||||
type Members (f :+: g) = Members f :+: Members g
|
||||
gmembers (L1 l) = L1 (gmembers l)
|
||||
gmembers (R1 r) = R1 (gmembers r)
|
||||
|
Loading…
Reference in New Issue
Block a user