1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

📝 Element.

This commit is contained in:
Rob Rix 2019-10-08 15:08:17 -04:00
parent 49cba72090
commit ad1de17e64
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -6,6 +6,7 @@ module AST.Element
import GHC.Generics
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
prj :: sup a -> Maybe (sub a)