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

Introduce helper for preluded definitions.

This commit is contained in:
Patrick Thomson 2019-12-17 13:14:17 -05:00
parent 1d7ddcc36e
commit 3407b4d273

View File

@ -46,6 +46,9 @@ pattern SingleIdentifier name <- Py.ExpressionList
]
}
prelude :: Has Core sig t => [Name] -> t Name
prelude = foldl' (\a b -> a ... b) (pure "__semantic_prelude")
-- We leave the representation of Core syntax abstract so that it's not
-- possible for us to 'cheat' by pattern-matching on or eliminating a
-- compiled term.