1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 05:27:08 +03:00

📝 emptyTerm.

This commit is contained in:
Rob Rix 2017-08-16 14:22:25 -04:00
parent fb60c60c9c
commit 2457402a48

View File

@ -43,6 +43,7 @@ makeTerm1' f = case toList f of
a : _ -> makeTerm' (headF (runCofree a)) f
_ -> error "makeTerm1': empty structure"
-- | Construct an empty term at the current position.
emptyTerm :: (HasCallStack, Empty :< fs, Apply1 Foldable fs) => Assignment.Assignment ast grammar (Term (Union fs) (Record Assignment.Location))
emptyTerm = makeTerm <$> Assignment.location <*> pure Empty