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>

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

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

pyaavdpyaavd 2012/04/14 00:41 1XqumQ , [url=http://vinxudtgwvnq.com/]vinxudtgwvnq[/url], [link=http://prbmlajygpsu.com/]prbmlajygpsu[/link], http://udmahctyaqoo.com/

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

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

JospehunumbJospehunumb 2019/02/02 02:51 generic 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

WilliamhannaWilliamhanna 2019/02/02 09:54 sildenafil 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

WilliamhannaWilliamhanna 2019/02/02 09:55 cialis 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

WilliamhannaWilliamhanna 2019/02/02 09:56 best 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

ArnoldPoumnArnoldPoumn 2019/02/05 17:59 sudafed 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>

ArnoldPoumnArnoldPoumn 2019/02/05 18:00 cialis 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>

ArnoldPoumnArnoldPoumn 2019/02/05 18:01 cialis 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>

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

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

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

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

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

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

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

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

LesSanyLesSany 2019/05/11 07:40 Cialis 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

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

BbokgoaNEEWSBbokgoaNEEWS 2019/05/20 03:57 Concomitant 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.

JerryCourbJerryCourb 2019/05/23 01:24 http://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>

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

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

ゲスト



トラックバック - http://ocaml-nagoya.g.hatena.ne.jp/mzp/20090927