Happy OCaml!!


_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>




# 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

cost of cialis in mexico
cialis billig
cialis online lloyds
cialis and canadian pharmacy

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
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

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
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

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

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

FeerseFeerse2019/12/05 03:38Generic cialis best price <a href="https://getcialischeaply.online/">cheap cialis online</a> herbal viagra for women cialis generic

giktnFekgiktnFek2019/12/14 20:17generic viagra sales online viagra <a target="_blank" href="https://pharm-usa-official.com ">viagra without prescription </a> viagra pills cheap viagra usa without prescription

cheap viagra usa without prescription online viagra generic <a href=https://pharm-usa-official.com>online viagra</a> generic drugs for sale generic viagra cheap viagra online without prescription

buy generic viagra online viagra online <a target="_blank" href="https://pharm-usa-official.com ">cheap viagra online without prescription </a> viagra online generic buy generic viagra online

viagra online generic generic viagra online <a href=https://pharm-usa-official.com>viagra without prescription</a> cheap viagra usa without prescription viagra pills

jkyxuFekjkyxuFek2019/12/15 22:38viagra online generic cheap viagra online without prescription <a target="_blank" href="http://casino2018money.com/__media__/js/netsoltrademark.php?d=viagrnetwork.com/?online%20viagra ">buy viagra samples </a> viagra 100mg viagra online
sale generic viagra online pills viagra <a href=http://unionpersonal.com/__media__/js/netsoltrademark.php?d=viagrnetwork.com/?cheap%20viagra%20usa%20without%20prescription>generic viagra</a> viagra 100mg generic viagra sales
viagra 100mg buy generic viagra online <a target="_blank" href="http://happipounds.com/__media__/js/netsoltrademark.php?d=viagrnetwork.com/?viagra%20buy ">viagra generic online pharmacy </a> viagra online generic viagra sales
viagra samples online viagra <a href=http://smart-epi.com/__media__/js/netsoltrademark.php?d=viagrnetwork.com/?buy%20viagra>viagra online</a> viagra generic viagra samples

EllbonastEllbonast2020/01/15 04:41Amoxicillin Dental Use For Pain Buy Levitra Online In Canada <a href=http://cialibuy.com>Buy Cialis</a> Kamagra Pharmacie France Levitra 10 Mg Costo



| はてなブックマーク - SnowLeopardでOCamlは動くよ。しかも64bitで - Happy OCaml!!


とりあえず最新のMacPortsを入れてport install ocamlをしたら、あっさりocamlがインストールできました。


$ ocaml
        Objective Caml version 3.11.1

# Sys.word_size;;
- : int = 64



MafrapaMafrapa2012/04/15 00:41I spupsoe that sounds and smells just about right.

jfbmokdjewjfbmokdjew2012/04/16 20:16XHXo3s , [url=http://nnqycehppvhh.com/]nnqycehppvhh[/url], [link=http://gglviieziarp.com/]gglviieziarp[/link], http://gfpfgeltcirt.com/



| はてなブックマーク - Macでxml-lightを使おう - Happy OCaml!!





# xml-lightをインストールした!
$ sudo port install xml-light
# でもocamlfindからは見えない><
$ ocamlfind list | grep xml-light



  1. 自分でxml-lightをビルドする
  2. ボクの作ったPortfileを使う


普通にビルドする。うっかりmake installしちゃわないように注意してください。

$ wget http://tech.motion-twin.com/zip/xml-light-2.2.zip
$ unzip xml-light-2.2.zip
$ cd xml-light
$ make all
$ make opt


description="minimal XML parser & printer"
archive(byte) = "xml-light.cma"
archive(native) = "xml-light.cmxa"


$ vi META
# 上記の内容を保存する

$ ocamlfind install xml-light META xml-light.a xml-light.cma xml-light.cmxa *.cmo *.cmi *.cmx *.cmx"


$ ocamlfind list | grep xml-light
xml-light           (version: 2.2)

方法2: ボクの作ったPortfileを使う


port installするだけでxml-lightをインストールできます。

$ wget http://howdyworld.org/patches/Portfile
$ sudo port install
$ ocamlfind list | grep xml-light
xml-light           (version: 2.2)



propellapropella2009/08/08 08:32書いてある通りにしたら上手く行きました。ありがとうございます!



| はてなブックマーク - imenu.elで、関数定義にジャンプ - Happy OCaml!!




imenu.el の使い方と応用 — ありえるえりあ を参考に、imenu.elとanything.elを設定する。



(autoload 'tuareg-imenu-set-imenu "tuareg-imenu" "Configuration of imenu for tuareg" t)
(add-hook 'tuareg-mode-hook
	  (lambda ()


| はてなブックマーク - omakeをインストールしよう - Happy OCaml!!

MacPortsomakeをインストールしようとすると、 omakeがインストールできない - fu7mu4’s diaryって怒られてしまいます。



(* external sync : unit -> unit = "caml_sync" *)


LenLen2012/04/15 03:12Articles like this just make me want to visit your wesbite even more.

xkfedqyptxkfedqypt2012/04/15 13:00Q7HOHE <a href="http://bnqleelrubpe.com/">bnqleelrubpe</a>

AagibpaggiptAagibpaggipt2018/04/09 18:00 This condition is very limited by the reproductive system and can have several causes like a result of injury or abnormal blood circulation within the testicles. He is content, along with the the complete opposite of what we think old age has in store for us.

AHauhsoychoabsAHauhsoychoabs2018/06/30 23:30Pression arterielle est comment calleux votre sang pousse contre les parois de vos arteres lorsque votre coeur essence pompe le sang. Arteres sont les tubes qui transportent perseverent b gerer offre sang loin de votre coeur. Chaque temps votre coeur bat, il pompe le sang tout au long vos arteres a la flanerie de votre corps.

AlbertSoomoAlbertSoomo2018/09/07 20:28The prostate is an essential part of a male's reproductive system. It secretes fluids that assist the transportation and activation of sperm. The prostate can be found just as you're watching rectum, below the bladder and around the urethra. When there is prostate problem, it will always be very uncomfortable and inconvenient for your patient as his urinary product is directly affected.

The common prostate health problems are prostate infection, enlarged prostate and cancer of prostate.

Prostate infection, also referred to as prostatitis, is easily the most common prostate-related problem in men younger than 55 yrs . old. Infections with the prostate gland are classified into four types - acute bacterial prostatitis, chronic bacterial prostatitis, chronic abacterial prostatitis and prosttodynia.

Acute bacterial prostatitis may be the least common of forms of prostate infection. It is due to bacteria located in the large intestines or urinary tract. Patients may experience fever, chills, body aches, back pains and urination problems. This condition is treated by using antibiotics or non-steroid anti-inflammatory drugs (NSAIDs) to ease the swelling.

Chronic bacterial prostatitis is often a condition associated with a particular defect within the gland along with the persistence presence of bacteria within the urinary tract. It can be caused by trauma towards the urinary tract or by infections via other areas from the body. A patient may experience testicular pain, small of the back pains and urination problems. Although it is uncommon, it may be treated by removal of the prostate defect as well as the utilization antibiotics and NSAIDs to treat the soreness.

Non-bacterial prostatitis is the reason for approximately 90% of all prostatitis cases; however, researchers have not even to ascertain the causes of these conditions. Some researchers believe that chronic non-bacterial prostatitis occur because of unknown infectious agents while other think that intensive exercise and heavy lifting may cause these infections.

Maintaining a Healthy Prostate

To prevent prostate diseases, an effective diet is important. These are some of the actions you can take to keep your prostate healthy.

1. Drink sufficient water. Proper hydration is necessary for health and wellness and will also also keep your urinary track clean.

2. Some studies claim that a few ejaculations each week will prevent cancer of the prostate.

3. Eat steak without excess. It has been shown that consuming a lot more than four meals of beef every week will heighten the probability of prostate diseases and cancer.

4. Maintain a proper diet with cereals, vegetable and fruits to make certain sufficient intake of nutrients essential for prostate health.

The most significant measure to take to ensure a proper prostate is always to opt for regular prostate health screening. If you are forty years of age and above, you need to go for prostate examination one or more times 12 months.

AodosseinsurneAodosseinsurne2018/09/28 15:01Pression arterielle est comment calleux votre sang pousse contre les parois de vos arteres lorsque votre coeur determination pompe le sang. Arteres sont les tubes qui transportent perseverent b gerer offre sang loin de votre coeur. Chaque temps votre manque de sensibilite bat, il pompe le sang a tous egards vos arteres a la reste de votre corps.

AodosseinsurneAodosseinsurne2018/10/13 00:23 Torsion bras de quelqu'un est comment calleux votre sang pousse contre les parois de vos arteres lorsque votre coeur determination pompe le sang. Arteres sont les tubes qui transportent prendre offre sang loin de votre coeur. Chaque set votre moelle bat, il pompe le sang par de vos arteres a la vacances de votre corps.

WilliamhannaWilliamhanna2019/02/02 12:49cialis colombia
cialis priligy
<a href=https://greatwinesgrandhouses.com>cialis</a>
cialis professional does it work
cheap generic female cialis
costco pharmacy cialis cost
cialis without a doctor's prescription
<a href=https://kellyannehulme.com>20 mg cialis buy</a>
take 2 cialis pills
what is the average price of cialis

WilliamhannaWilliamhanna2019/02/02 12:50what is the price of cialis in canada
cialis fara reteta
<a href=https://greatwinesgrandhouses.com>Cialis 20 mg cheap price</a>
generic cialis cipla
cialis actors
genuine cialis online shopping
cialis paiement par cheque
<a href=https://kellyannehulme.com>buy Cialis 20 mg</a>
cheap procialis
order cialis black

ArnoldPoumnArnoldPoumn2019/02/05 23:08cialis international shipping
free bonus cialis
<a href="http://cialistlm.com">Buy Cheap Cialis</a>
bijwerkingen cialis
cheap cialis canada pharmacy
<a href="http://cialisfurr.com">Buy Cheap Cialis Online</a>
cialis quotidien meilleur prix
cialis 10mg prix
<a href="http://xcialisxx.com">buy cialis</a>

ArnoldPoumnArnoldPoumn2019/02/05 23:09buy cialis with priligy
cialis generika indien
<a href="http://xcialisxx.com">Buy Cialis Online</a>
cost of cialis daily dose
cialis online from us pharmacy
<a href="http://cialistlm.com">Buy Cheap Cialis Online</a>
cheap cialis professional online
cialis sales online canada
<a href="http://xcialisxx.com">Buy Cheap Cialis Online</a>

EllbonastEllbonast2019/03/10 08:40Bactrim And Zithromax Drug Shelf Life Of Cephalexin Estrofem No Prescription Australia <a href=http://cthosts.net>cheap cialis</a> Priligy Sicher Kaufen Prix Xenical 120 Trigliceridos Propecia

EllbonastEllbonast2019/04/09 23:30Non Prescription India Pharmacy Finasteride For Sale Internet <a href=http://bakgol.com>achat de viagra france</a> Online Pharmacy No Dr Prescriptions Online Pharmacies Without Scripts Propecia 98 Stuck

LesSanyLesSany2019/08/16 10:11Amoxicillin And Diarrhea <a href=http://curerxfor.com>viagra</a> Viagra Rezeptfrei Osterreich

StevstomStevstom2019/08/25 06:38No Perscription Wellbutrin <a href=http://cpsmeds.com>cialis</a> Need Direct Amoxicilina Canada Cheapeast Cash On Delivery Propecia Merck Bentyl In Internet



| はてなブックマーク - ocamloptでユニバーサルバイナリが作りたい - Happy OCaml!!



$ ocamlopt hello.ml -o hello
$ file hello
hello-i386: Mach-O executable i386


$ ocamlopt -ccopt "-arch i386 -arch ppc" hello.ml
ld warning: in /var/folders/ER/ERpTAvKHGAeST-apMbQus++++TI/-Tmp-/camlstartup73a88f.o, file is not of required architecture
ld warning: in /opt/manual/ocaml-spot/lib/ocaml/std_exit.o, file is not of required architecture
ld warning: in hello.o, file is not of required architecture
ld warning: in /opt/manual/ocaml-spot/lib/ocaml/stdlib.a, file is not of required architecture
ld warning: in /opt/manual/ocaml-spot/lib/ocaml/libasmrun.a, file is not of required architecture
Undefined symbols for architecture ppc:
  "_main", referenced from:
      start in crt1.10.5.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/ER/ERpTAvKHGAeST-apMbQus++++TI/-Tmp-//ccwCVSY5.out (No such file or directory)
File "caml_startup", line 1, characters 0-1:
Error: Error during linking


  1. Re: [Caml-list] Re: Building a universal binary on OS X?を参考にして、PPC用ocamloptとi386用ocamloptを作ってやる
  2. PPC用とi386用のバイナリをコンパイルする
  3. lipoで結合する



$ ./configure -cc "gcc -mmacosx-version-min=10.4 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk" -prefix /opt/ppc -host powerpc-apple-darwin8.11.0
$ make world
$ make opt
$ sudo make install


$ make clean


$ ./configure -cc "gcc -mmacosx-version-min=10.4 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" -prefix /opt/i386
$ make world
$ make opt
$ sudo make install


$ /opt/ppc/bin/ocamlopt -o hello-ppc hello.ml
$ /opt/i386/bin/ocamlopt -o hello-i386 hello.ml
$ lipo -create -output hello -arch ppc hello-ppc -arch i386 hello-i386
$ file hello
hello: Mach-O universal binary with 2 architectures
hello (for architecture ppc):   Mach-O executable ppc
hello (for architecture i386):  Mach-O executable i386

やった! できた!!




PradeepPradeep2012/07/08 21:08Weeeee, what a quick and easy slotouin.

lollugklollugk2012/07/10 02:21AJTAt6 , [url=http://otgfehdhfbzi.com/]otgfehdhfbzi[/url], [link=http://njpgyhjylsno.com/]njpgyhjylsno[/link], http://mhptlaemahff.com/

rezmbzyrezmbzy2012/07/11 02:01Ew6S95 <a href="http://czvhptympwka.com/">czvhptympwka</a>

ihtejkihtejk2012/07/11 05:391V0aPO , [url=http://chexpyesofal.com/]chexpyesofal[/url], [link=http://rejdptzqbmvw.com/]rejdptzqbmvw[/link], http://holgbxjkkwom.com/

quianbyxppquianbyxpp2014/03/18 17:16krcowpdbnm.obhpzb, <a href="http://www.wiiijrioxz.com/">qfcldeaozd</a> , [url=http://www.wqgllhygxa.com/]cjmurdgrdm[/url], http://www.teflvcdhpj.com/ qfcldeaozd