1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Recur through annotations.

This commit is contained in:
Rob Rix 2019-07-18 14:39:20 -04:00
parent aa1e36bc93
commit 9eae24ecc1
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -197,7 +197,7 @@ annWith callStack = maybe id (fmap send . Ann) (stackLoc callStack)
stripAnnotations :: (Member Core sig, Syntax sig) => Term sig a -> Term sig a
stripAnnotations (Var v) = Var v
stripAnnotations (Term t)
| Just c <- prj t, Ann _ b <- c = b
| Just c <- prj t, Ann _ b <- c = stripAnnotations b
| otherwise = Term (hmap stripAnnotations t)