Now that #2223 is fixed, we're encountering certain large files,
such as[this](https://github.com/golang/text/blob/master/collate/tables.go),
that parse in an acceptable window but that take a tremendously long
time to assign. As such, it behooves us to provide a mechanism to
specify assignment timeouts, independent of the tree-sitter parse timeout.
I copied the Dockerfile/default values from those specified for
TREE_SITTER_PARSE_TIMEOUT. I am open to suggestions as to different
values.
ccing @tclem on this to make sure I haven't screwed anything up w/r/t Docker.
In the past few years, GHC has been moving to remove the `fail` method
from the definition of `Monad`, a longtime wart, and requiring monads
that fail due to an incomplete pattern match to implement `MonadFail`.
You can read about it[here](https://wiki.haskell.org/MonadFail_Proposal).
Though this move is still in progress, we can opt into it by turning
on the `-XMonadFailDesugaring` extension.
The matching and rewriting systems will both benefit from this, as the
incomplete pattern match in following rewrite rule will crash without
`-XMonadFailDesugaring`, even though the sensible and correct thing
for the rule to do is call out to its `MonadFail` instance:
```haskell
-- crashes the program without -XMonadFailDesugaring
getReceiver :: Rule a (Ruby.Send term) term
getReceiver = do
(Ruby.Send (Just rec) _ _ _) <- target
pure rec
```
In addition, turning on `MonadFailDesugaring` will warn you if you put
an incomplete pattern match in a monad that doesn't implement `MonadFail`.
This setting will become implicit in GHC 8.6, so this is a good chance
to make sure that we don't introduce any incomplete patterns going forward.
The bumped version of tree-sitter-ruby did not make it into #2223 due
to an error on my part. This halves the time it takes to parse the
pathological lexer.rb file.