1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 21:01:35 +03:00

nodeSymbol & stateNodes cannot be unpacked.

This commit is contained in:
Rob Rix 2017-08-04 10:43:25 -04:00
parent bc930773d1
commit 9dd03613f8

View File

@ -174,7 +174,7 @@ type Location = '[Info.Range, Info.Span]
type AST grammar = Cofree [] (Node grammar) type AST grammar = Cofree [] (Node grammar)
data Node grammar = Node data Node grammar = Node
{ nodeSymbol :: {-# UNPACK #-} !grammar { nodeSymbol :: !grammar
, nodeByteRange :: {-# UNPACK #-} !Info.Range , nodeByteRange :: {-# UNPACK #-} !Info.Range
, nodeSpan :: {-# UNPACK #-} !Info.Span , nodeSpan :: {-# UNPACK #-} !Info.Span
} }
@ -315,7 +315,7 @@ data State ast grammar = State
{ stateOffset :: {-# UNPACK #-} !Int -- ^ The offset into the Source thus far reached, measured in bytes. { stateOffset :: {-# UNPACK #-} !Int -- ^ The offset into the Source thus far reached, measured in bytes.
, statePos :: {-# UNPACK #-} !Info.Pos -- ^ The (1-indexed) line/column position in the Source thus far reached. , statePos :: {-# UNPACK #-} !Info.Pos -- ^ The (1-indexed) line/column position in the Source thus far reached.
, stateErrorCounter :: {-# UNPACK #-} !Int -- ^ Monotonic counter tracking the number of error handlers invoked. , stateErrorCounter :: {-# UNPACK #-} !Int -- ^ Monotonic counter tracking the number of error handlers invoked.
, stateNodes :: {-# UNPACK #-} ![ast] -- ^ The remaining nodes to assign. Note that 'children' rules recur into subterms, and thus this does not necessarily reflect all of the terms remaining to be assigned in the overall algorithm, only those “in scope.” , stateNodes :: ![ast] -- ^ The remaining nodes to assign. Note that 'children' rules recur into subterms, and thus this does not necessarily reflect all of the terms remaining to be assigned in the overall algorithm, only those “in scope.”
} }
deriving (Eq, Show) deriving (Eq, Show)