1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Define assignment of a child term.

This commit is contained in:
Rob Rix 2017-04-05 16:14:48 -04:00
parent a9ce523c47
commit 70f0c29758

View File

@ -29,6 +29,7 @@ data AssignmentF symbol a where
Rule :: symbol -> AssignmentF symbol a
Content :: AssignmentF symbol ByteString
Children :: AssignmentF symbol [a]
Child :: AssignmentF symbol a
And :: a -> a -> AssignmentF symbol a
rule :: symbol -> Assignment symbol a
@ -40,6 +41,9 @@ content = Content `Then` return
children :: Assignment symbol [Assignment symbol a]
children = Children `Then` return
child :: Assignment symbol a
child = Child `Then` return
-- | A program in some syntax functor, over which we can perform analyses.
type Program = Freer