Improve Haskell language support
Improve Haskell language support

Removes the need to call setup_ghc_compilers in every Haskell language
formula, by automatically calling fails_with.

Adds a :home option to the cabal_sandbox method.  This option allows a
specific temporary HOME to be used instead of the current working
directory, and in turn allows a single Cabal package database to be reused
between multiple calls to this method.

Avoids updating the Cabal package database more than once if cabal_sandbox
is called multiple times.

Removes the need to call cabal_clean_lib whenever cabal_sandbox is called,
by automatically cleaning the lib directory.

Adds a :keep_lib option to the cabal_sandbox method.  This option allows
opting out of the automatic cleaning.

Ensures build products are always removed from the current working
directory.

Removes a workaround for versions of cabal-install older than 1.20.0.0.

Adds a cabal_sandbox_add_source method.

Adds a :using option to the install_cabal_package method.  This option
allows specifying the Haskell language tools that are required to install
a particular formula, and in turn allows formulae to be simplified by
replacing calls to multiple methods with a single call to this method.

Allows customizing the call to install_cabal_package by giving a block.

Removes empty method shells.

Closes #47293.

Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com>

reelsense/homebrew,michaKFromParis/homebrew-sparks,sjackman/linuxbrew,muellermartin/homebrew,totalvoidness/homebrew,esamson/homebrew,ralic/homebrew,osimola/homebrew,deorth/homebrew,apjanke/homebrew,miketheman/homebrew,hyuni/homebrew,Asuranceturix/homebrew,emcrisostomo/homebrew,ebouaziz/linuxbrew,pcottle/homebrew,jsjohnst/homebrew,feelpp/homebrew,bigbes/homebrew,jsjohnst/homebrew,sferik/homebrew,base10/homebrew,jsjohnst/homebrew,jiashuw/homebrew,lrascao/homebrew,lrascao/homebrew,gawbul/homebrew,zchee/homebrew,ilovezfs/homebrew,adamliter/homebrew,dplarson/homebrew,TaylorMonacelli/homebrew,slyphon/homebrew,muellermartin/homebrew,manphiz/homebrew,vigo/homebrew,benjaminfrank/homebrew,Linuxbrew/linuxbrew,knpwrs/homebrew,reelsense/linuxbrew,sometimesfood/homebrew,SuperNEMO-DBD/cadfaelbrew,tschoonj/homebrew,Red54/homebrew,Chilledheart/homebrew,iostat/homebrew2,theeternalsw0rd/homebrew,Angeldude/linuxbrew,elgertam/homebrew,yazuuchi/homebrew,ento/homebrew,gawbul/homebrew,dongcarl/homebrew,quantumsteve/homebrew,princeofdarkness76/homebrew,mkrapp/homebrew,sferik/homebrew,scorphus/homebrew,DoomHammer/linuxbrew,hongkongkiwi/homebrew,princeofdarkness76/homebrew,princeofdarkness76/homebrew,jconley/homebrew,BrewTestBot/homebrew,TaylorMonacelli/homebrew,scpeters/homebrew,TaylorMonacelli/homebrew,ralic/homebrew,afh/homebrew,totalvoidness/homebrew,Angeldude/linuxbrew,sakra/homebrew,kevinastone/homebrew,benjaminfrank/homebrew,jsjohnst/homebrew,booi/homebrew,theeternalsw0rd/homebrew,ryanfb/homebrew,Red54/homebrew,booi/homebrew,jab/homebrew,retrography/homebrew,3van/homebrew,retrography/homebrew,cprecioso/homebrew,teslamint/homebrew,ybott/homebrew,redpen-cc/homebrew,youtux/homebrew,joshfriend/homebrew,decors/homebrew,princeofdarkness76/homebrew,BrewTestBot/homebrew,bukzor/linuxbrew,gicmo/homebrew,bukzor/linuxbrew,polishgeeks/homebrew,optikfluffel/homebrew,blogabe/homebrew,dalanmiller/homebrew,3van/homebrew,SuperNEMO-DBD/cadfaelbrew,benjaminfrank/homebrew,kenips/homebrew,brunchboy/homebrew,hakamadare/homebrew,frodeaa/homebrew,mmizutani/homebrew,eighthave/homebrew,esamson/homebrew,reelsense/linuxbrew,kenips/homebrew,filcab/homebrew,knpwrs/homebrew,Angeldude/linuxbrew,hakamadare/homebrew,treyharris/homebrew,vigo/homebrew,polishgeeks/homebrew,ento/homebrew,dalanmiller/homebrew,nelstrom/homebrew,dickeyxxx/homebrew,drewwells/homebrew,hyuni/homebrew,tutumcloud/homebrew,mactkg/homebrew,johanhammar/homebrew,sakra/homebrew,mobileoverlord/homebrew-1,muellermartin/homebrew,adamliter/homebrew,MartinDelille/homebrew,ablyler/homebrew,OJFord/homebrew,sjackman/linuxbrew,sjackman/linuxbrew,davydden/linuxbrew,SteveClement/homebrew,pdxdan/homebrew,DoomHammer/linuxbrew,skinny-framework/homebrew,thinker0/homebrew,cosmo0920/homebrew,influxdata/homebrew,dunn/homebrew,iandennismiller/homebrew,booi/homebrew,pcottle/homebrew,muellermartin/homebrew,dutchcoders/homebrew,treyharris/homebrew,dgageot/homebrew,ilovezfs/homebrew,gnubila-france/linuxbrew,cprecioso/homebrew,royhodgman/homebrew,Homebrew/linuxbrew,tutumcloud/homebrew,3van/homebrew,MartinDelille/homebrew,3van/homebrew,LinusU/homebrew,danieroux/homebrew,hanxue/homebrew,chadcatlett/homebrew,saketkc/linuxbrew,bigbes/homebrew,osimola/homebrew,OJFord/homebrew,influxdata/homebrew,nelstrom/homebrew,skinny-framework/homebrew,ablyler/homebrew,royhodgman/homebrew,mobileoverlord/homebrew-1,Homebrew/linuxbrew,hyuni/homebrew,kodabb/homebrew,georgschoelly/homebrew,brunchboy/homebrew,arnested/homebrew,dongcarl/homebrew,keith/homebrew,cprecioso/homebrew,dutchcoders/homebrew,iandennismiller/homebrew,retrography/homebrew,osimola/homebrew,iostat/homebrew2,yumitsu/homebrew,ear/homebrew,ryanfb/homebrew,reelsense/homebrew,gicmo/homebrew,Homebrew/linuxbrew,ablyler/homebrew,Homebrew/homebrew,arnested/homebrew,nandub/homebrew,decors/homebrew,miketheman/homebrew,dutchcoders/homebrew,alebcay/homebrew,dericed/homebrew,elgertam/homebrew,getgauge/homebrew,cosmo0920/homebrew,zhipeng-jia/homebrew,drbenmorgan/linuxbrew,base10/homebrew,filcab/homebrew,TaylorMonacelli/homebrew,benjaminfrank/homebrew,cosmo0920/homebrew,tutumcloud/homebrew,blogabe/homebrew,manphiz/homebrew,jconley/homebrew,ento/homebrew,scorphus/homebrew,manphiz/homebrew,zchee/homebrew,manphiz/homebrew,brunchboy/homebrew,OJFord/homebrew,apjanke/homebrew,drbenmorgan/linuxbrew,thinker0/homebrew,esamson/homebrew,pdxdan/homebrew,MoSal/homebrew,galaxy001/homebrew,haihappen/homebrew,redpen-cc/homebrew,dunn/homebrew,liamstask/homebrew,ryanfb/homebrew,knpwrs/homebrew,jamer/homebrew,MoSal/homebrew,sakra/homebrew,knpwrs/homebrew,skatsuta/homebrew,kenips/homebrew,mobileoverlord/homebrew-1,Homebrew/linuxbrew,haihappen/homebrew,totalvoidness/homebrew,saketkc/linuxbrew,bigbes/homebrew,ebouaziz/linuxbrew,kodabb/homebrew,optikfluffel/homebrew,alebcay/homebrew,iandennismiller/homebrew,emcrisostomo/homebrew,LinusU/homebrew,ablyler/homebrew,youtux/homebrew,liamstask/homebrew,scorphus/homebrew,tutumcloud/homebrew,saketkc/linuxbrew,eighthave/homebrew,influxdb/homebrew,zhipeng-jia/homebrew,yazuuchi/homebrew,slyphon/homebrew,jarrettmeyer/homebrew,youtux/homebrew,nandub/homebrew,influxdata/homebrew,ralic/homebrew,optikfluffel/homebrew,jamer/homebrew,teslamint/homebrew,feelpp/homebrew,joshfriend/homebrew,nelstrom/homebrew,sakra/homebrew,pcottle/homebrew,ralic/homebrew,zchee/homebrew,Homebrew/homebrew,miketheman/homebrew,josa42/homebrew,tschoonj/homebrew,iandennismiller/homebrew,ebouaziz/linuxbrew,hanxue/homebrew,utzig/homebrew,LinusU/homebrew,royhodgman/homebrew,ryanfb/homebrew,redpen-cc/homebrew,redpen-cc/homebrew,scpeters/homebrew,deorth/homebrew,adamliter/homebrew,mactkg/homebrew,afh/homebrew,gicmo/homebrew,hanxue/homebrew,deorth/homebrew,dgageot/homebrew,MoSal/homebrew,blogabe/homebrew,skatsuta/homebrew,jarrettmeyer/homebrew,Homebrew/homebrew,recruit-tech/homebrew,ear/homebrew,ear/homebrew,arnested/homebrew,quantumsteve/homebrew,vigo/homebrew,royhodgman/homebrew,marcwebbie/homebrew,galaxy001/homebrew,yazuuchi/homebrew,emcrisostomo/homebrew,influxdb/homebrew,ento/homebrew,Asuranceturix/homebrew,reelsense/homebrew,AlexejK/homebrew,osimola/homebrew,yazuuchi/homebrew,filcab/homebrew,jarrettmeyer/homebrew,feelpp/homebrew,marcwebbie/homebrew,mkrapp/homebrew,teslamint/homebrew,georgschoelly/homebrew,eighthave/homebrew,gnubila-france/linuxbrew,SuperNEMO-DBD/cadfaelbrew,ilovezfs/homebrew,menivaitsi/homebrew,galaxy001/homebrew,johanhammar/homebrew,kodabb/homebrew,ExtremeMan/homebrew,DoomHammer/linuxbrew,MartinDelille/homebrew,lrascao/homebrew,elyscape/homebrew,jiashuw/homebrew,treyharris/homebrew,utzig/homebrew,ebouaziz/linuxbrew,skinny-framework/homebrew,youtux/homebrew,dunn/homebrew,keith/homebrew,mmizutani/homebrew,blogabe/homebrew,recruit-tech/homebrew,totalvoidness/homebrew,base10/homebrew,keith/homebrew,hongkongkiwi/homebrew,mmizutani/homebrew,michaKFromParis/homebrew-sparks,influxdb/homebrew,frodeaa/homebrew,mactkg/homebrew,eighthave/homebrew,esamson/homebrew,Chilledheart/homebrew,dericed/homebrew,SuperNEMO-DBD/cadfaelbrew,dericed/homebrew,sferik/homebrew,mkrapp/homebrew,decors/homebrew,davydden/linuxbrew,pcottle/homebrew,utzig/homebrew,elyscape/homebrew,apjanke/homebrew,marcwebbie/homebrew,recruit-tech/homebrew,dickeyxxx/homebrew,kevinastone/homebrew,hongkongkiwi/homebrew,utzig/homebrew,nelstrom/homebrew,SteveClement/homebrew,OJFord/homebrew,hanxue/homebrew,zhipeng-jia/homebrew,dalanmiller/homebrew,reelsense/linuxbrew,josa42/homebrew,adamliter/homebrew,quantumsteve/homebrew,AlexejK/homebrew,dalanmiller/homebrew,hongkongkiwi/homebrew,DoomHammer/linuxbrew,jab/homebrew,Asuranceturix/homebrew,kevinastone/homebrew,cosmo0920/homebrew,sferik/homebrew,getgauge/homebrew,kenips/homebrew,ilovezfs/homebrew,apjanke/homebrew,MartinDelille/homebrew,nandub/homebrew,marcwebbie/homebrew,saketkc/linuxbrew,gnubila-france/linuxbrew,jab/homebrew,frodeaa/homebrew,slyphon/homebrew,Red54/homebrew,getgauge/homebrew,elyscape/homebrew,kodabb/homebrew,ybott/homebrew,ear/homebrew,frodeaa/homebrew,iostat/homebrew2,filcab/homebrew,bigbes/homebrew,afh/homebrew,skatsuta/homebrew,iostat/homebrew2,galaxy001/homebrew,menivaitsi/homebrew,theeternalsw0rd/homebrew,dickeyxxx/homebrew,dgageot/homebrew,reelsense/homebrew,Chilledheart/homebrew,Asuranceturix/homebrew,georgschoelly/homebrew,tschoonj/homebrew,jiashuw/homebrew,MoSal/homebrew,zhipeng-jia/homebrew,dgageot/homebrew,gicmo/homebrew,AlexejK/homebrew,ybott/homebrew,treyharris/homebrew,ExtremeMan/homebrew,decors/homebrew,chadcatlett/homebrew,menivaitsi/homebrew,pcottle/homebrew,gawbul/homebrew,liamstask/homebrew,Homebrew/homebrew,mobileoverlord/homebrew-1,drewwells/homebrew,recruit-tech/homebrew,dplarson/homebrew,haihappen/homebrew,miketheman/homebrew,johanhammar/homebrew,influxdb/homebrew,retrography/homebrew,ybott/homebrew,scpeters/homebrew,thinker0/homebrew,base10/homebrew,pdxdan/homebrew,yumitsu/homebrew,kevinastone/homebrew,cscetbon/homebrew,theeternalsw0rd/homebrew,dickeyxxx/homebrew,cprecioso/homebrew,drewwells/homebrew,SteveClement/homebrew,dplarson/homebrew,cscetbon/homebrew,sometimesfood/homebrew,alebcay/homebrew,cscetbon/homebrew,dongcarl/homebrew,yumitsu/homebrew,vigo/homebrew,Linuxbrew/linuxbrew,quantumsteve/homebrew,LinusU/homebrew,nandub/homebrew,getgauge/homebrew,slyphon/homebrew,drbenmorgan/linuxbrew,jconley/homebrew,dongcarl/homebrew,drbenmorgan/linuxbrew,SteveClement/homebrew,chadcatlett/homebrew,liamstask/homebrew,ExtremeMan/homebrew,jab/homebrew,Asuranceturix/homebrew,feelpp/homebrew,Red54/homebrew,sometimesfood/homebrew,sjackman/linuxbrew,danieroux/homebrew,Chilledheart/homebrew,skinny-framework/homebrew,drewwells/homebrew,gnubila-france/linuxbrew,menivaitsi/homebrew,jiashuw/homebrew,hyuni/homebrew,haihappen/homebrew,danieroux/homebrew,dunn/homebrew,jamer/homebrew,dericed/homebrew,michaKFromParis/homebrew-sparks,keith/homebrew,brunchboy/homebrew,scorphus/homebrew,davydden/linuxbrew,danieroux/homebrew,Linuxbrew/linuxbrew,alebcay/homebrew,BrewTestBot/homebrew,georgschoelly/homebrew,johanhammar/homebrew,reelsense/linuxbrew,jconley/homebrew,Angeldude/linuxbrew,pdxdan/homebrew,ExtremeMan/homebrew,AlexejK/homebrew,elgertam/homebrew,afh/homebrew,influxdata/homebrew,mmizutani/homebrew,scpeters/homebrew,polishgeeks/homebrew,dutchcoders/homebrew,SteveClement/homebrew,optikfluffel/homebrew,arnested/homebrew,skatsuta/homebrew,zchee/homebrew,thinker0/homebrew,tschoonj/homebrew,josa42/homebrew,jamer/homebrew,elyscape/homebrew,davydden/linuxbrew,emcrisostomo/homebrew,bukzor/linuxbrew,BrewTestBot/homebrew,dplarson/homebrew,mactkg/homebrew,jarrettmeyer/homebrew,Linuxbrew/linuxbrew,polishgeeks/homebrew,hakamadare/homebrew,sometimesfood/homebrew,joshfriend/homebrew,bukzor/linuxbrew,elgertam/homebrew,hakamadare/homebrew,teslamint/homebrew