mirror of
https://github.com/github/semantic.git
synced 2025-01-01 11:46:14 +03:00
Add type annotation for mkChannelType
This commit is contained in:
parent
ed012fe18d
commit
d0a521779e
@ -272,6 +272,7 @@ arrayType = makeTerm <$> symbol ArrayType <*> children (Type.Array . Just <$> ex
|
||||
channelType :: Assignment
|
||||
channelType = makeTerm' <$> symbol ChannelType <*> children (mkChannelType <$> optional (token AnonLAngleMinus) <* token AnonChan <*> optional (token AnonLAngleMinus) <*> expression)
|
||||
where
|
||||
mkChannelType :: Maybe a -> Maybe a -> b -> Union Syntax b
|
||||
mkChannelType receive send | Just _ <- receive = inj . Go.Type.ReceiveChannel
|
||||
| Just _ <- send = inj . Go.Type.SendChannel
|
||||
| otherwise = inj . Go.Type.BidirectionalChannel
|
||||
|
Loading…
Reference in New Issue
Block a user