summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Pat.hs
diff options
context:
space:
mode:
authorAndrei Barbu <andrei@0xab.com>2021-08-25 03:20:51 -0400
committerAndrei Barbu <andrei@0xab.com>2021-10-08 19:45:29 -0400
commita76409c758d8c7bd837dcc6c0b58f8cce656b4f1 (patch)
tree95dde306e370fe296ef84efa959828e8ecdd1267 /compiler/GHC/Tc/Gen/Pat.hs
parent55a6377a5d55d6e6e93cf3d087f1e2d17fe7d3f3 (diff)
downloadhaskell-a76409c758d8c7bd837dcc6c0b58f8cce656b4f1.tar.gz
Add defaulting plugins.
Like the built-in type defaulting rules these plugins can propose candidates to resolve ambiguous type variables. Machine learning and other large APIs like those for game engines introduce new numeric types and other complex typed APIs. The built-in defaulting mechanism isn't powerful enough to resolve ambiguous types in these cases forcing users to specify minutia that they might not even know how to do. There is an example defaulting plugin linked in the documentation. Applications include defaulting the device a computation executes on, if a gradient should be computed for a tensor, or the size of a tensor. See https://github.com/ghc-proposals/ghc-proposals/pull/396 for details.
Diffstat (limited to 'compiler/GHC/Tc/Gen/Pat.hs')
0 files changed, 0 insertions, 0 deletions