mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
📝 Element.
This commit is contained in:
parent
49cba72090
commit
ad1de17e64
@ -6,6 +6,7 @@ module AST.Element
|
|||||||
import GHC.Generics
|
import GHC.Generics
|
||||||
import GHC.TypeLits (ErrorMessage(..), TypeError)
|
import GHC.TypeLits (ErrorMessage(..), TypeError)
|
||||||
|
|
||||||
|
-- | Projection of an element out of a tree of sums, particularly suitable for use with highly branching (e.g. balanced) trees.
|
||||||
class Element sub sup where
|
class Element sub sup where
|
||||||
prj :: sup a -> Maybe (sub a)
|
prj :: sup a -> Maybe (sub a)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user