Hatena::Groupocaml-nagoya

Happy OCaml!!

2009-09-27

_xを使えば、unused variable警告を抑制できるよ

| はてなブックマーク - _xを使えば、unused variable警告を抑制できるよ - Happy OCaml!!

みなさん、コンパイルするときに"-w A -warn-error A"つけてますか? わりと適切な警告がでて便利ですよ。

例えば、こんなコード書くと警告してくれます。

# let f x = ();;
Warning Z: unused variable x.
val f : 'a -> unit = <fun>

うん、うん、xを使ってないことを教えてくれたんだね、ありがとう。

で、普段はなんの問題もないんだけど、コードを自動生成したときとかは、この警告がうざいこともある。

そんなときは、先頭に_をつければ、警告を抑制できるよ。

# let f _x = ();;
val f : 'a -> unit = <fun>

ワイルドカード・パターン(_)とは違うから、ちゃんと変数を使うこともできる。

# let f _x = _x +1;;
val f : int -> int = <fun>

JeffJeff2012/04/10 00:02Deep thought! Thanks for contbriutnig.

suhixtsuhixt2012/04/11 03:54BSueQK , [url=http://julmwqvgqxbd.com/]julmwqvgqxbd[/url], [link=http://ojovhfygosjw.com/]ojovhfygosjw[/link], http://ebsqzkhxclfi.com/

pyaavdpyaavd2012/04/14 00:411XqumQ , [url=http://vinxudtgwvnq.com/]vinxudtgwvnq[/url], [link=http://prbmlajygpsu.com/]prbmlajygpsu[/link], http://udmahctyaqoo.com/

MatSaloMatSalo2018/06/12 11:43Medicament Generique Du Viagra Cialis Original Comprar <a href=http://cialicheap.com>generic 5mg cialis best price</a> Low Cost Sildenfil Citrate

MatSaloMatSalo2018/08/26 02:39Priligy Dapoxetina Precio <a href=http://ciali5mg.com>cheapest cialis</a> Acheter Kamagra Medicament Topimax Without A Prescription Canada

JospehunumbJospehunumb2019/02/02 02:51generic cialis no prescription mastercard
cialis negative reviews
cialise
www.cialiscanada.ca

cost of cialis in mexico
cialis billig
cialis online lloyds
cialis and canadian pharmacy
https://stowe365.com/#Buy-Cialis

WilliamhannaWilliamhanna2019/02/02 09:54sildenafil vs cialis
generic cialis with mastercard
<a href=https://greatwinesgrandhouses.com>Cialis 20 mg</a>
buy cialis with discover card
20 mg cialis reviews
https://kellyannehulme.com
does cialis require a prescription in canada
average cost of cialis daily use
<a href=https://kellyannehulme.com>cialis</a>
female cialis 20mg
best place to buy cialis online yahoo
https://kellyannehulme.com

WilliamhannaWilliamhanna2019/02/02 09:55cialis softgel
buy cialis soft fast shipping
<a href=https://greatwinesgrandhouses.com>Cialis 20 mg cheap price</a>
buy cialis online melbourne
buy cialis over the counter
https://greatwinesgrandhouses.com
free samples of cialis sold in the usa
us made cialis
<a href=https://greatwinesgrandhouses.com>buy Cialis 20 mg</a>
cost of cialis in manitoba
cialis online offer
https://kellyannehulme.com

WilliamhannaWilliamhanna2019/02/02 09:56best online cialis site
best cialis online
<a href=https://greatwinesgrandhouses.com>cialis</a>
order cialis pills
wholesale cialis
https://kellyannehulme.com
phone number for cialis
cialis mit ec karte kaufen
<a href=https://greatwinesgrandhouses.com>20 mg cialis buy</a>
cialis cialis cialis
cialis drug
https://kellyannehulme.com

ArnoldPoumnArnoldPoumn2019/02/05 17:59sudafed and cialis
buy cialis canada yahoo answers
<a href="http://xcialisxx.com">Buy Cialis Online</a>
vendita cialis originale on line
original cialis price
<a href="http://cialisfurr.com">Buy Cheap Cialis Online</a>
low cost daily cialis
cialis tyskland
<a href="http://cialistlm.com">Buy Cheap Cialis Online</a>

ArnoldPoumnArnoldPoumn2019/02/05 18:00cialis 10mg online bestellen
cialis for bph reviews
<a href="http://xcialisxx.com">buy cialis</a>
cialis online without rx
best price cialis canadian pharmacy
<a href="http://cialistlm.com">Cheap Cialis buy</a>
buy cialis 10mg australia
generic cialis from usa
<a href="http://xcialisxx.com">Buy Cheap Cialis Online</a>

ArnoldPoumnArnoldPoumn2019/02/05 18:01cialis sales rayh health care
generic cialis t20
<a href="http://cialistlm.com">Buy Cheap Cialis</a>
cialis probe kostenlos
best online store for cialis
<a href="http://cialistlm.com">buy cialis</a>
cost of cialis in singapore
cialis direct mexico
<a href="http://cialistlm.com">Cheap Cialis buy</a>

olaestixmaolaestixma2019/02/21 02:13**97653985320493959 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 52220652415 &&

rlaestzwywrlaestzwyw2019/03/01 19:05**979921487521531195 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 864614944549 &&

hlaestovauhlaestovau2019/03/01 22:06**8689306979059675 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 42374970151 &&

alaestgfxfalaestgfxf2019/03/02 04:12**3885240392522901 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 288812492 &&

nlaestsurjnlaestsurj2019/03/09 15:23**529825672203937275 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 916244444295 &&

plaestttnbplaestttnb2019/03/09 18:06**625746774444809791 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 118292260967 &&

alaestrclxalaestrclx2019/03/09 20:31**904448965867347 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 37917752543 &&

zlaestxobuzlaestxobu2019/03/09 22:53**249793121367654917 <a href="http://lookevision.org/forums/topic/ciprofloxacin-500mg-sale">ciprofloxacin 500mg sale</a> 219154676380 &&

LesSanyLesSany2019/05/11 07:40Cialis Dailey Drugs From Canada Kamagra In Deutschland Viagra 100 <a href=http://dan5325.com>viagra</a> Female Indian Viagra Tablets Venta De Cialis Professional Viagra Occhi Rossi

MatSaloMatSalo2019/05/13 06:36How To Buy Acticin Acheter Levitra Sur Le Net Discount Tadalafil Tablets <a href=http://vhsfp.com>viagra</a> Viagra Prezzo Migliore

BbokgoaNEEWSBbokgoaNEEWS2019/05/20 03:57Concomitant administration of strong CYP3A inducers is expected to substantially decrease plasma concentrations of sildenafil. <a href="https://viagraoktobuy.com/">buy female viagra pills near me</a> The overall MI rate for double-blind and open-label sildenafil citrate-treated patients was 0.58/100 PY.

JerryCourbJerryCourb2019/05/23 01:24http://erectiledysfunctionpillsest.com
is erectile dysfunction a chronic disease
<a href=http://erectiledysfunctionpillsest.com/>erectile dysfunction medications</a>
best erectile dysfunction treatment
<a href="http://erectiledysfunctionpillsest.com/">ed drugs generic</a>

LesSanyLesSany2019/08/21 03:06Best Buy Progesterone With Free Shipping With Doctor Consult <a href=http://cialonlineno.com>п»їcialis</a> Doxycycline 100mg Canada Viagra Dopo L'Eiaculazione

LesSanyLesSany2019/08/23 01:14Comprare Viagra Thailandia <a href=http://drugs2k.net>cialis 5mg best price</a> Efficienza Propecia Sildenafil Citrate For Sale

EllbonastEllbonast2019/10/30 05:03Priligy Da 30 O 60 <a href=http://prilipills.com>viagra dapoxetine online purchase 259</a> Clobetasol In Canada Pharmacy Baclofene Cardiologue Clomid Multiple