mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Use $! instead of seq.
This commit is contained in:
parent
e4a37940c0
commit
8ff6b1aa96
@ -49,7 +49,7 @@ documentToTerm language document blob = alloca $ \ root -> do
|
||||
, spanEnd = SourcePos (fromIntegral $! ts_node_p_end_point_row node) (fromIntegral $! ts_node_p_end_point_column node) }
|
||||
|
||||
-- Note: The strict application here is semantically important. Without it, we may not evaluate the range until after we’ve exited the scope that `node` was allocated within, meaning `alloca` will free it & other stack data may overwrite it.
|
||||
range `seq` termConstructor (source blob) (sourceSpan `seq` pure sourceSpan) (toS name) range (filter (\child -> category (extract child) /= Empty) children)
|
||||
range `seq` termConstructor (source blob) (pure $! sourceSpan) (toS name) range (filter (\child -> category (extract child) /= Empty) children)
|
||||
getChild node n out = ts_node_p_named_child node n out >> toTerm out
|
||||
{-# INLINE getChild #-}
|
||||
termConstructor = case language of
|
||||
|
Loading…
Reference in New Issue
Block a user