mirror of
https://github.com/github/semantic.git
synced 2025-01-04 13:34:31 +03:00
documentation
This commit is contained in:
parent
e8c7389ffe
commit
dfc4d786e5
@ -29,10 +29,11 @@ type ValueConstructors location term
|
||||
newtype Value location term = Value { deValue :: Union (ValueConstructors location term) (Value location term) }
|
||||
deriving (Eq, Show, Ord)
|
||||
|
||||
|
||||
-- | Identical to 'inj', but wraps the resulting sub-entity in a 'Value'.
|
||||
injValue :: (f :< ValueConstructors location term) => f (Value location term) -> Value location term
|
||||
injValue = Value . inj
|
||||
|
||||
-- | Identical to 'prj', but unwraps the argument out of its 'Value' wrapper.
|
||||
prjValue :: (f :< ValueConstructors location term) => Value location term -> Maybe (f (Value location term))
|
||||
prjValue = prj . deValue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user