cmigrep-1.5/0000755000162400007670000000000010774553464013442 5ustar estokesocamlgroupcmigrep-1.5/._d/0000755000162400007670000000000010653204721014063 5ustar estokesocamlgroupcmigrep-1.5/._d/cmigrep.d0000644000162400007670000000000010774552460015656 0ustar estokesocamlgroupcmigrep-1.5/.omakedb.lock0000644000162400007670000000007610774552460015772 0ustar estokesocamlgroup*** omake: the project was last locked by riyouko.local:4825. cmigrep-1.5/_darcs/0000755000162400007670000000000010774553464014675 5ustar estokesocamlgroupcmigrep-1.5/_darcs/inventories/0000755000162400007670000000000010653204717017230 5ustar estokesocamlgroupcmigrep-1.5/_darcs/inventory0000644000162400007670000001516110774553464016661 0ustar estokesocamlgroup[very first stupid test that I am completly nuts letaris@mac.com**20070105192409] [working out parse tree generation and timing letaris@mac.com**20070105213355] [fixed bugs in parsing code, now thinking about structure letaris@mac.com**20070113185251] [adding more structure, and parsing functions to parse the whole buffer letaris@mac.com**20070114000407] [working out my stupidity with respect to just parsing letaris@mac.com**20070114010231] [background parsing via a thread letaris@mac.com**20070114050204] [new approach, tiny command line tools letaris@mac.com**20070126210938] [cmigrep fucking rules (but it isn't quite done yet) letaris@mac.com**20070127000706] [constructor search implemented letaris@mac.com**20070127003348] [prettier letaris@mac.com**20070127004117] [it only gets sweeter record field labels are done letaris@mac.com**20070127011740] [added val searching letaris@mac.com**20070127032016] [major good changes which do not yet compile letaris@mac.com**20070127043900] [compiles letaris@mac.com**20070127044401] [rudamentry build system letaris@mac.com**20070127051247] [adding makefile letaris@mac.com**20070127060622] [removed silly deps file letaris@mac.com**20070127060644] [by default, include the standard library and the current directory letaris@mac.com**20070127062333] [added make clean, rejoice letaris@mac.com**20070127064945] [handle classes, but not methods yet letaris@mac.com**20070127170921] [fixed overloaded flag letaris@mac.com**20070127171821] [findlib support letaris@mac.com**20070127200605] [list modules and sub modules letaris@mac.com**20070127211949] [regexp searching of the full module tree letaris@mac.com**20070127212801] [print out very pretty errors letaris@mac.com**20070127215629] [added a bunch of gnu crap letaris@mac.com**20070127222613] [exception declarations letaris@mac.com**20070127225307] [documentation letaris@mac.com**20070127230135] [added install target letaris@mac.com**20070127232623] [now works with polymorphic variants letaris@mac.com**20070131033231] [implemented multi module greping letaris@mac.com**20070201035642] [cmi_files now returns the module name along with the path, and the main loop uses it letaris@mac.com**20070201040322] [removed the ever annoying 'from file...' letaris@mac.com**20070201040413] [fixed a tiny bug concating paths letaris@mac.com**20070201041553] [multi module stuff appears to work letaris@mac.com**20070201044331] [fixed the command line for -m letaris@mac.com**20070201044503] [new read cmi function which is significantly faster, and ONLY reads the cmi file letaris@mac.com**20070201050202] [fixed printing of path in polymorphic variants letaris@mac.com**20070201050710] [fixed a silly formatting bug with polymorphic variants letaris@mac.com**20070202024405] [consider all types of nodes, descriminate only by depth letaris@mac.com**20070202024749] [minor tweaks letaris@mac.com**20070202030244] [updated readme letaris@mac.com**20070202031333] [adding functions for emacs integration letaris@mac.com**20070202173612] [completion of qualified values is partially working letaris@mac.com**20070204005320] [emacs completion of nested module expressions letaris@mac.com**20070204014616] [progress letaris@mac.com**20070204035327] [show the type in the completion buffer, and in a tooltip in the case of immediate completion letaris@mac.com**20070208012301] [solving the hard module tree problem letaris@mac.com**20070208030350] [module tree problem solved letaris@mac.com**20070208034032] [progress on module trees letaris@mac.com**20070209172618] [fixed regexp escaping for emacs 21 letaris@mac.com**20070208224534] [ported to emacs 21 letaris@mac.com**20070209000835] [merged changes from work letaris@mac.com**20070209174158] [wrote a function to set buffer local module open variables only if the list of open modules changes letaris@mac.com**20070209212741] [added some testing code letaris@mac.com**20070209213325] [reworked caml-search to take multiple argument, and made it stop using eval letaris@mac.com**20070209215417] [added a function to fully qualify a module given the list of open modules in context letaris@mac.com**20070209221759] [a few nicities with tooltips letaris@mac.com**20070209224626] [better value completion extraction letaris@mac.com**20070210021145] [use looking-back, which is much much better for our case letaris@mac.com**20070210024801] [handle the case that there is only one completion in a module e.g. Bar. results in a sole completion letaris@mac.com**20070210174009] [qualified record field labels done letaris@mac.com**20070210180322] [further abstraction of completion letaris@mac.com**20070210185215] [unqualified record field completion letaris@mac.com**20070210185614] [dynamic scope is evil. Fixed regexps to be case sensitive letaris@mac.com**20070210192154] [qualified constructor matching done letaris@mac.com**20070210204124] [progress letaris@mac.com**20070211021756] [pervasives should be handled slightly differently letaris@mac.com**20070211152215] [regular expression tuning for emacs 21. I'm starting to really hate regular expressions letaris@mac.com**20070211173600] [only move the cursor forward the number of chars that were inserted by the completion. no longer move to eol letaris@mac.com**20070211184727] [added an explicit function to complete module expressions letaris@mac.com**20070212171825] [updated todo list letaris@mac.com**20070212200129] [fixed numbers not allowed in module names letaris@mac.com**20070213203744] [fixed a set bug that causes duplicated completions letaris@mac.com**20070213210730] [fixed a set bug that causes duplicated completions letaris@mac.com**20070213210754] [now handles module opens, computes the proper context, probably very slow letaris@mac.com**20070216172514] [added better support for wildcard expressions and module opens, tested a bit more letaris@mac.com**20070216175105] [fixed a little bug in the argument parser letaris@mac.com**20070216211303] [ported the elisp to use the open feature of cmigrep letaris@mac.com**20070217001611] [added a changelog letaris@mac.com**20070223023551] [made it work in xemacs letaris@mac.com**20070330145420] [fixed a bug in generating the tree of opens letaris@mac.com**20070330160442] [regexp fix for XEmacs letaris@mac.com**20070330163556] [support local module renaming letaris@mac.com**20070729213340] [updated changes letaris@mac.com**20070729214213] [minor code refactoring, ignore (but warn about) missing findlib packages letaris@mac.com**20080402003817] [update changes letaris@mac.com**20080402004137] [removed lib dir letaris@mac.com**20080402004234] [updated elisp functions letaris@mac.com**20080402004347] cmigrep-1.5/_darcs/patches/0000755000162400007670000000000010774553464016324 5ustar estokesocamlgroupcmigrep-1.5/_darcs/patches/20070105192409-c661d-a20c217543e8eb06c21eaf0ad5092410ee341843.gz0000644000162400007670000000054010774552460026330 0ustar estokesocamlgroupmK0Wܴ"Ț=&5v/e|_r;Xk5J 5 DjHxj".y¿Fidz2^e+ hJG7&xp)-t&?QWhd{Nd=>4.4@3d)ةtJH.X.h=9!Ep  -׏oLbۤ7m伂=!i5$2fPEm)٠t-5b^a{()p[X;[exMڃ'MT^#(Տ&ΊF%cmigrep-1.5/_darcs/patches/20070105213355-c661d-7b5f41a05786aab10f5b5e13834ddb6bea37d232.gz0000644000162400007670000000147510774552460026567 0ustar estokesocamlgroupUKo6>Gb{GAB윂@D"vĿ=3+n8o83ߐcJa+g!CV8i49 *6bqٜo7g'ǧgg_[VBH*G6[g&H굉ElRqSJH3vCQR="Մ]nQ$tP(ݝLZ$X>tD.TęR?ib2`iJA;-6^VV>s] lkGu(5Bp\-VD]wRAp{]1V[[]#]p'ܾXFigK8Ț@>j!i|L_es6!LY+q )&ѨyjwFum}e[yыYJ6Ljuwr U_wZѦP:2\4NyfNeg@ʟ=B9Fؤ  a:ܺAj/".Ɣ4<"v_=+2x#R6Tφ.=ի[J)B]KC_~9W;Q֢vaK(|S0wFk#cnan,$NDjaղk˞ȉiUZU 5<Q-U.dFxȱњdJvݼǴ3ڵ a%^Gp~LU]Q{x\٨hVp;:6pX uOѭcmigrep-1.5/_darcs/patches/20070113185251-c661d-0900e131e1099781911f452be0c00e6137d791b3.gz0000644000162400007670000000143610774552460026047 0ustar estokesocamlgroupUR0=X !NaiL{fzt\^;ɕd·w%q}i[L!.s\B2DxR.v&҂Ll1h%aVt6;9=>}_NVp%$S1JAo ;U'T1z>.5/5,)z"ǽms)-BzVoPRX/_QzTQ7mY0&ev=Wxk!<@漺xoWK&|C#>RmtA8 Fq5h{'׫Y 3& WаTvN$P؈[RbA=s?.>|lk&st bHa'eo.xoM?Szt%KaS@bY%}[$Ȣy+`&P¥6CvM}kX`b=&)3oDsњ&!Cpś/ZAwok ;)<[s\"gMvոSl2'Ybr"[6_ 8sܺS .l&S?9J}ךT/jgkhslUCsõ+v&¶fNv>1x&,run-`t4* cmigrep-1.5/_darcs/patches/20070114000407-c661d-467dc908d3b23e3478007441fda12116c88e2c0b.gz0000644000162400007670000000211410774552460026255 0ustar estokesocamlgroupVo6~ɱ<͚[!ECQhDYBhҠ(F#)Yۺ_><VJsn2h>&sX3]hdf*%k0 9C[*aׁeŲYVɋ$L/$H.?SP6f?X%g+W٬9l 4a5gOpdkPNx$ LJI|fZ.uYGٝ++yv?p1 R2NHTs% ȼFLOj+veO2ѤfwUcB O)VrťÍ|azKl[4 q-q.f3G0@35be# Ӝ. ` 9(I-FA-LkW7plMs!ii G5WkFhM+H;bAF?]aiV25b<ɔ<3' `DžP@3wϱ.ڞqW^]FFyj(6g[hkj:} YѧJ#կK `9.ߌӹ)@,t:MvxV=yZlBttz8)D@K;Kp֠iQ e[ZY~ -UEJkJV$'!/xǻ$NHCb`Yrc;Ga#۱=t}u;!>~';!>~'_⯺o;!q-Xk 7 dgDLvr<5Z#€NKܬ9 ]n3rdY%3BUril  #JMB%1Sv[s>Qm}gSU)``7XX0*8 ij=}P *B­Zq;ϻVX8u$S / "EV{^gWm۫Sp#٫mU`5"yTmw3~;${tڞ0Iw @~S-s[iؠ cmigrep-1.5/_darcs/patches/20070114010231-c661d-fb0733dd4e0ee9b45759b42a8d3110feb1df411b.gz0000644000162400007670000000200210774552460026621 0ustar estokesocamlgroupVK6>ǿb*n7q=hEt7 `dZ1KIko )Z\z7|3҇R߁i3QHϕQT+/p6UJs[+!ruS(ӳAZIH ﶍTu. f'5L?$a@7rvX7ݵ* 4R[#nuYվ3;|a~:^[vGC]E%m4Q97)e,kkAO RKlʀmW}BܨrO[S}SN)yYFSKvtQIRP;Ϡt48dkZEe?QY=KxA%^P罄:OF).j~#d@a <NBd}&h6A0p7"t$L^ aTGhpcGX|GC;~ݼB#I ۘVzbf?ֵ vP݀݀<6hTH 6R#h"X<˙^A?>B}4385ԥ^<*Go,Qv,x്̹`NFѐwb#;Խ3'a'] Ǟ@eg'1/ )vk?cmigrep-1.5/_darcs/patches/20070127003348-c661d-b514b7f09ffdc15fd41998b433ff5005940ed876.gz0000644000162400007670000000073610774552460026474 0ustar estokesocamlgroupTn0Wo//IeUR]Ylm2÷@@s̵󶕾PXYM, ܥZGizɧv *,6LW$'"4Vϧ+I70?5לP@G@ 6[m<^=9u^۠80ʄ\;rZ fI`jBh$k@@  #4{0E4}2P)bAhf;Cn;r21@&)cmigrep-1.5/_darcs/patches/20070127004117-c661d-ebaabc785954c9cc9fc2d39ac444b70e07296d94.gz0000644000162400007670000000023610774552460026700 0ustar estokesocamlgroup 0E|ţS1&E ID$KCv]tה9`#a>O$eզZ7x+>AxisCv2Ţ弘ݼ;BhhLUڳ@Ҍv&+aZpk|'wKo"Y]?KcV $<)hc^mІóSըL<Nd0Jh5S,_7>X}"*qc:oY?ÂL<-f2 ʦs5;s@-Uc`q=xlML ( 6#9&?rA<cmigrep-1.5/_darcs/patches/20070127043900-c661d-fc2f57a036b3f77b056eddc3385a3da4df6b279d.gz0000644000162400007670000000371010774552460026747 0ustar estokesocamlgroupYmo6"vh{ ž@a(SD\%8E$M}XQ6x|xI_E H!Y2 6K,!-@lyID2^R_rĸvpp2^NO.gogo!9Ţ8x/d:+L rTE魖<)tGyO,["]gj)bo:9|LJ|W;~XG3 a9z<"gqa6˸Ď"n(R׾:bŪSLJ""r= A.J>(jVl[!y#P"90-j{h-ijtx:5R8 ~} S秧(:CC F5:ƇpLTGEջFMb5oB@@?O=@nҼ0҇ j*y*BzPz_tvCyC`e8;6ɆShWd%J\EQ%вU-- Ȋ3|ٰDOhQ K~焯*EnNFgmm%no1 a$m,g) OK)ZBYH5_~F@R5A{X .Ċφ^韘+KݚѢl)Rsd+LrCk؛99*t\Gq_i`}NJcӛH f%%k Ȋ'bV*rxgwsޑ#sVWh#e/&\Z7K̵lWG5]L׭}}'[&]tzmϝ\;?i;%}z:ʑv:;S "[+[ɟI{9@;bR][aS$n;34-^)_wpDTa柫ne|!df^{ʁaoϵ|C< ޥv"4l'Wí))qKa˧_/|Hv8y1ݕ`ņtǵ+Lc f56U8Ey ]5^^w M؈5@ǚp DQ 6[4R$ǶffΘ3&9C2}iSNʆfk6U-yZ+ca X~ ft!Eսjfڳtg)\H엸{Pt!Syj'$M2Qhϛ\C\I!.uy;E| khƛ,\ Ha͏'>uNa,Y( fOj3-*0ϲk%+nk-p_[mM+4̪~jcs:u<mLGcmigrep-1.5/_darcs/patches/20070127051247-c661d-0303fc50791609e359cc917ca7116fbaa405f99c.gz0000644000162400007670000000314010774552460026364 0ustar estokesocamlgroupWmo6 6P;k7XQ@] Cdm؇mPiPJR$-P1_w=w]E&ޒEEEX֜ f槆YW?|<]ude×Y#ӋrZ{T\pyJXfU`|.Fta̪¹f:@R3X8UUPD087fCBRɚ/PԂ.fV~AњjeHpd1`\0K^A(lT懂m`я4iOv|Gz-(pam)AqYj7(dIQe5*ʤ邙#KUxM[J捪 *ٲlu%wU1 2pz~ǖgG|+h5$ W#voe-W _sOu: t=q0{o; ҷIO3t1#NXrMN/>,1D)7Z+KS8,f~D5Rsn+܂",{511zr$6WHZONR1E'I DѮ45dg}83cuWNC'ߩYa{M#>+ С]mNJ 0 NY %[R&(M)G=H j0ni\Ys"l#kfOEә8ӍqH) ? eʡrpjY8{0 hYadg,?{ !8TY(*NCٵ|" cY1X&dRX3aɚnԐFI1#;|hȋ< qOyn @aErT'>$n%v%`1#5Q#ddΏ34^̷TZbm,:ݛ$h CD#L澴C *XM.Ra8kI(8r \_3(H,YXLV${'m!<5yLVĮaAȂ-Q ׃Cbʉc: , 0ι?x K͓X{APbdiW&tY~bQ90>/y_ j^Z ƴ)j#uU&ۓ";HI.xxZ@kJo8p fnxsC1r14.FqXB; x@=> )y) 6Nnq!RW b;6Hl΃:Ѭ[|Ϝ .q'Gq_H^(gxj^vGq=dnu88#{(ٰ6Hpܚ-lTHֽW7?7h0YIZlAbޤgzLXAiM0{ t¡2E0N`zC<^S>;ށ"F6ƛ\})T3%:[YUEf>W*wsWX.Ŝˊ10IѨToQj\9GeI[@=рIv}׺ȳ}>zcmigrep-1.5/_darcs/patches/20070127060644-c661d-977843f24178fae06cc500a3ab977ddb36e7c323.gz0000644000162400007670000000045510774552460026460 0ustar estokesocamlgroupUn0 y +U= )' 1?ǟ=#gm pݡBR)}禹56>k9U/9GT֖Cz!:K!CQ_*Ғɭ,D{zZ =IIMcqAE&s(*bNt40$#Jwp ,,2 8D0iT~dиL  +;Y hX-|7uJf%fBy^٦nW?C [Gcmigrep-1.5/_darcs/patches/20070127062333-c661d-7cfd0ac1265246d7be8e3f9fcc559e37e76e399a.gz0000644000162400007670000000106510774552460026722 0ustar estokesocamlgroupTQk0~qximIi 6cH"˶,INNƍ[dI߷X f K*hCdLT Q;m}@+4sŨ)Јt2\N'Wl^VGҜQ.`z %1܁b ,ELxYZVGMS`1Q\0J* Y;e2bb){*AA%0`4l9rˉ-*Iδ>#r f3c\P&ڨ^h8brB!wJ8]F`8m8op#]%D8ݹ \‡(+ +9ЇPK.MsyݴmVvuSaKŴFW79|LIFbֹ >F4wa'ZwFDT?4]58%?HN!^0H:NA>C~rc ryB:LN0A6ho*CZ,ϭXɭcmigrep-1.5/_darcs/patches/20070127064945-c661d-995ddbe290fb4f408d288cc9ae3c6eb0523f90ad.gz0000644000162400007670000000021410774552460026765 0ustar estokesocamlgroup-A E)f ]=q1bt'9vibi^c[!) jmto.j;z1 7# 6쫩_ w/cmigrep-1.5/_darcs/patches/20070127170921-c661d-dea619bb4970544c645d62c23c0d27ca0d04ad6b.gz0000644000162400007670000000063110774552460026563 0ustar estokesocamlgroupAo@'Jh)"5&A1 ;558!if~Q A69rS0LhN9<G ]Bfky^E1/zc~";,Y4q*wtt+\KK~gx&)զB8̖pe)B2B'#0\ @X{$C4>6keČh!ٳ3.l51_xߛEM{C8 vi&KH֝yR|č~,ZM!]dVV~Q::JEiEW̱*WW @ E}CFE/CGO>&pڒtɁ}-N?:FB%F*qXocmigrep-1.5/_darcs/patches/20070127171821-c661d-4ac054b56f5414b1a9c7879fd9eeb683aa6c8ea9.gz0000644000162400007670000000024510774552460026711 0ustar estokesocamlgroup̽ 0@=Oq6&E89 "%$i0?%i .g:wRvpL6TLE_U-m':o d\VykN;q7Z42' a 9@ƹQ#Г WN  rY5JENcmigrep-1.5/_darcs/patches/20070127200605-c661d-3cdc005e20a2ea0205859fd113c191e6a2d4f22f.gz0000644000162400007670000000061310774552460026460 0ustar estokesocamlgroup]k0_ªcjdmZC&b/;x{{[)(Vd$ Bۃ^oF}ly4f?t0T_BjaE%ZOz>K$9S&&dx{{XzN`t\9A1r:0tEU@b x!372i0ŋ)Ir>gV-uSlׁkcsxZ8-&j>07V/C* G#E EA 7[Uu,lr.Z<Ͳ0SRaEψ)%"FfM1Eړo/>cmigrep-1.5/_darcs/patches/20070127211949-c661d-cadce56cb200b965480866b9c999c3a9f3f3581d.gz0000644000162400007670000000261610774552460026565 0ustar estokesocamlgroupWmo6<vkq!vЮŲ~J:hJoJbd8"yw{#u!E!͓JX@Y]5)Q8hy|r\>9&*7욯a&Y*а!NFghg볟g(X|6XCҒ RdE߾a/QkλCMm0L%<̧J0ZPLL 5\r B i8@g-fUz2Y,k\1 *JYk(N `Du.Hsucx>)mBopvՊl3N8?k.>4oqv%))~F 2s&s%yk I .?>%F4j9;Y:L }&i:Jn١ A$Ƥ"yY+t[d qY,LoSo?N̾բvfwL<4&M~L^SgɍJ }^AZecCBdjRV;182`>~Liyty>;DXjw)inwsOn˒?lgo #MADR]MA-X<^QMm"9TBdnRXzJ-S:re: ּ.ߩr\F5e^}AeLWVBS6 \ VW/8eE=N٦qvɳNh"ժo~vrX7B[YNQ['/"sx ]eK+U(uEԦ-UD=>m먷)`}_ocUU{GޥJ9{.i_`G_a=Iq  Bcmigrep-1.5/_darcs/patches/20070127212801-c661d-6bf70d887f0356d3bbf5d5272c123a8a8eb488a2.gz0000644000162400007670000000123310774552460026525 0ustar estokesocamlgroupU]o0}W\m5S=U>lOU9pk`mFgҢ({l9ր@“ de U%^p*V$Ot6~{E~A!hα`ߩM8`v_I I樇 l P~ٻ}4Zwi1QfZn4Lc}t/'jǿJA24Vᝣ7M @@&i9G&˝m6f`4,R <.0Bknj6`BSd`G[* G҃Xkad˒RֻANJ۠퉨DyHZޢ=4?hzk k@Iky4a,5W.$i 魑逦*W0ܖ)5=kIq=M\g>s^XsYgȜ4߽LeH0+1]*u=`$dTqApmcO ~ZxivYy1c\FMKљS1j/Ƿi>&nCwݏ_3'7Ԭn qRgT%dD{??sMlcmigrep-1.5/_darcs/patches/20070127215629-c661d-2b4d5d5204af218469ca5d646473c1eb47984354.gz0000644000162400007670000000050310774552460026237 0ustar estokesocamlgroup]k0+a*fǐݸjS k9I/Q@ {7o[Rځ)TH:w$2dYNOLxb~?Y4gh2W6~jMEd^ ;IZı <,u=j5φ u$ҡ eAo{t`_B'cGt]wo:lp|ΆPro+&՞'*?{_SB+lyB+Fd41TXҕPThY xymNB:pULj u})6cmigrep-1.5/_darcs/patches/20070127222613-c661d-4e79506f053a912bddbcf5263219e4dd1f921a6d.gz0000644000162400007670000001646310774552460026532 0ustar estokesocamlgroup\ksȕ.49'e3%쨶*  H>Þ׺%o߾sL 0|eyk3/M'UR?ɼ?/|_իW>t0xf=]s9tϋͶLV99?5fXs3ut:2)\W,o̶AInJH]U&L/-J鮋E uVT\;μ-ֳ tҹ͝53zɭٖg$'J,PREwiltxy2tNYbCbo[% ~<˵9 Ī`+Ln{ounggCD/% 8:xr.ˬ(ʽmmU !hoZ\||&\Q]ڲ z=Nwi˛unO 鲽Fb钨pQ"D1 8CJmy*j.Iby E!mѪdx G$@֡H!}[@`ބ׈A`}ƻ%༴gc }=Ihb> k<9K~P5O ;fS,:%! 8oYP̠u@|;y Ӱ{a-ɐ}H@8Kc?#:$#–qci|&&RH ZوAaLrv}I4s}ƫ$L.빏Tbd o[}OlUbC8X!2| 3\+wN|!m6 $+gOiu2yCA"$吷ֲJaC8봔L3[TSג j+b IrKMG5'nR3$qE8_L d@zY" <:\ӏU+4*)LЈ5G 2N7[-^(Ο$ngqmU'3Tn#cQ iR7H;mOգ$>Q.i3pAMvED >#r*p¥.1i~Dr+>$^qubh/*Lpōj0,vT"[Wi" K)0Q{o kFEOڧ$D ˣ؋sDvB1w-G9%ԐdbY% T..cɿ^9Xd58(o6)h1Lň>5,}ncw@)9boJ;q^WlpНīS0:`(:&!FZ9P WTweWXJ}E7ZMS;9.wǍ[Scb)ԡɦ&II%Ac2!8nWӽmmRr HJ+ qs8.EPZ_yG[z|܋~ZN@e|>i0HT)f~Q̏ ZzDq/Y|N v`GMPrIrrsh Y2 KN\Ʉ"K{E òk3oI@ R2FfRϼ!Ӫ-K#6!Kr,\%.j>؁\`#&\r}., A{X8+mY$I+ϴA!RLTҹeݞwpD_ 8Hϲ$ͦGb=A壷+ɥh\ ٣q'K*Rftt\Z3NXC͞&i qdOu@[+8sE:gT'nrUD Dc`|k#D+,aL {1:W j\q#9iYOm*UdS-kuAuD줠"(c,H$$g?Zeӆ|)>4TSc 0zbX%lV%5&Q#yt^z6nw~I|;*Ҳi "aQ`6ړpjl߲diSOr>TrET MκbKsfv_RW$4m\U ܗM/_vw[蓪^;6kU[I#hu;Mxʠl*.#Yܡ&+Ь.Rj?7!\U&eXqq/iFFc=j4R+Ysh)ޟ3P ⁓eW̴$d[K=X_9:վH-CkN{aH2~fvHhLLdۯS˩EZSi|QDٕPjV`^- EZ i.]JJ &/ B5Rڵi28TNG%u/GTQ;;pȡi.is5eEp}mGP/C&Q`rBE(iQg12Vdb8іU y<me.ɥv^Tjr+xrQRˀP3A9&8-ڱ=7KƸxpWp[QdV?sxaZɼM]a;'1qsk=jZ3PӀHEgᬹ*X苌ׇP꜕6az%T .F&u یi ]Cu@B!ԕG卽=`;)$SnG#ʨ77^.\a״Xn 3nCQ @+6Jɔ֘፣zJ1Ы"U9ѢXhXOd 0L x}]o7vEm\ Td4%iTamJjq/;B-{ Od-9ns-J1b! 7+v5IpMOzK=uAC9uA4cR;].eR'~#+ȠFSQƉCB}Rbϭ:G;]-)אG[/49)a@ Bx%Q>w~|r:DnNrsHE"S +Imd@t?l&%N^7z=elN-9yy/3~fuUY ٭&M%h< '(}Ckw:r"|nnl 1~^|ķX{h#maD{b[N-"u\n]>oqEChlv_ֺHT%sصMӅmB>B 5P$;b%PP-mɘI&u !X!{NnQ<ɶpQ%owͻM|oҜ {xHofNhv?9^Opa4bfp{oj L|x;5;ZM16ƣ)ݭx;(L7YCs1OGqx M> )3\A`|o&9o#5|4͵7tG+x;lH,w;bitڕF !P7^UNЊHG#7ĈhĄ pmiŵ?g&!8+a Twtb8Vi$Iݵ';ru3!2Ӂa߷Cz}<XwcA#@7tiϬܣ.f{҆oF.JiE.{=CR{vGdd!L:GʗB]XȐ7-zs 8A~yOHqV׹͊ < 4ݧM 5 |[{P#w 5(1&{=l{ qv'[jSͅ@D] ]iJR\0%KQܔȵ-zu/Mtx[-;tM4\۞7 MB -C{r~:NvՑV.ʆw9D^妭EN @>oXBT8L/>=Gk&fwjz,|P&^p<&kV E\gkZ=LF/$/Ҵѣn\"L WeR2q"u8% .09h̩kͮ݋d9.wu*Uyp_FwmtW_O[ <:~mS#!4Xriէ7$lR͕gͥURز){Ocp"Jmȅ|l֒F3j7>d̿"N:w~:vP; );7"ȼOmB!0-T32[.qIwRc:!|xV S|֜14j}elͭNHȭ4|ģqTh~x(B UxzK]@0 O6=sz͌-Y#J)7i艱!]aTҞ:2+lD>#EIR"@cƂzcLDO*糸 I!䩕@}o)r*9 Sֲt >u@ +]y>uiY}*!ĦΈk'f@^2*Mwju<FfD{`߿d~/_y3cρ}C}?CPcmigrep-1.5/_darcs/patches/20070127225307-c661d-ddf4fe4a5ab95594298e04c1ab74957bf8191032.gz0000644000162400007670000000203110774552460026455 0ustar estokesocamlgroupVmo6_q0/kS]0'VZc8Na :\)Q )'A)9GO<Ͻcn F.fݴ$Z)e<*^<8E4>pxT,4o= sSO؄%3`o=KDhce1- KA%04_l'JÊ\Smhܾ5 2#bj ݫ8ZRȸ,bt[aiuΕ} qwyr-2[@%z'!c)"&FtLA&NeuWMų&&byv=nWl_ Fw8%:XB}ΰɑDpZ=xV]QWb-bi.%FZyߊLUšj_̮9\;tOtz̿(%l^CNpt65æh 9 /a3lMfzEx6<; /ggdҌNk*a} hڈzr25 J·fo6F5\"bq'*V(mV+3j?WlEK3H1&WhV9즶$#,Js!QpN#ō1i"ϕ&cfbڰ?E9XX Hl8K`md\4/wc%+GڜnE/FȘ-4΅g]6ne^ ifX& rlkqFW-~/~o* .SGף V/̓{sx=u@')20B%HSv&Yvo^_\zK[)]7xTB֥hHJ7"bBd`Kgz4 Ŀ1B=RpeJQ(ZHswRn%/n(<t"[z @* cmigrep-1.5/_darcs/patches/20070127230135-c661d-5caaecb2714bcf04965a3aed6b788f73fc0ca793.gz0000644000162400007670000000214610774552460027024 0ustar estokesocamlgroupWmo6_q3 ,5vk`ɐ5 k :[)J ))іˀa_ wǻ{ẋU2+ IL mx‹> __|?RsH^ssqJ-\r,q A,τ'6[V/Q:@d&5O@- ๘i,TCqXF1).F8ꃡ{Pn\tD%zD7zG>+)|J} 7~#~aN,Se~H*xJb*BۓMLVx4%s6C(F8]pGt~!٘r0o 5S %~ G$8BRkuT+4Sȋϳ^ү-azou4shz$Eu^rӎ V9Z+ꭄřm}=~Z]!;&ʆpi$b*ΓX+H:# ` vm~[-xdfР%]B% +ف˞d܏[|6 sRi?x{zd<^NێǨ5ݿjb sSFEunu- 2]5w&%@lvB͑jzQX0AEgGA&@%J\"U\j\%pVX^J6#R)-^g|VF%CEr!MCn0=R|(3P|[0 Zw<dv"[6޲2PZK$h;<-(C`F,i 4]<i>o<48lʼ+_o|LJt cmigrep-1.5/_darcs/patches/20070127232623-c661d-6cab2b6ffbf847aa6819cec206b9f0065c8fcd01.gz0000644000162400007670000000020610774552460027020 0ustar estokesocamlgroupNLIIMQ+.IQ(I,JO-I22rs ̍̌c2J}S2sR ͹Xqis&($f(hx;9j'eqrA xcmigrep-1.5/_darcs/patches/20070131033231-c661d-506ad14d79d916e2740b49ab23a8c16a33a55ee3.gz0000644000162400007670000000115410774552460026421 0ustar estokesocamlgroupUM0+F\ ,JjӞjjL0v]m}dž$\̛7S[ja+L e=*S/SI -h4L>Ld>ͧK7r {23vp'd7`%s> PG_rr#AghC"H Aa8n*!N}+sfxjg,G퇷L N$)D Yո<Zb\""] l BkFtsG\ Y1>VDn&5@|jcأ6qB@̙K BVHF"GxIPs\v@;SUuA7ցtv`M0)oV<%4LJD d__Y OGIQV_BFTRW7tr_ڔM{Qc{P#~J|HJ`DZ wRV$ f&0%Cg[E~ڸU0:45{jK$y#LL$q :s!О b/feP֫FaN ]OϏ9zo2cmigrep-1.5/_darcs/patches/20070201035642-c661d-77b5f137b17fb9c6cc4cc799ca216ce7befd8d2d.gz0000644000162400007670000001015310774552460027120 0ustar estokesocamlgroup\moF_!d:N& 4rrcM"u$ۭ~3/ܗ!%Jĝ}vfw|*RhsBZzmVߖl:GgGNOį;7ȗi,ΞيWlOro@xga<9ugY'D^Ί\ 'U1OWY{#,ė[A^ P47VįDM6M-dWA3PGye^j%EPl=F >+POiW|it 9>>7<)V=͊バweU=0; ^iÝ >v64S?j w+Tkg+/Z6M^zaw٬E 9z&%C&wۆL@W0N3Ll3 G_uGRq('ɯˬ]RK>i|~S~n K| l)=CT$!qk$bK*{,vvpy_7/I5E85?nB-:id7w ~v X qe;?"WmL2Սl >\|l/Wh0O|//=h XמRnYye7Q}o Me'L9яeR`8ZKV$"EcD/pUd3)$RL+Hןek`\)7.+9ԴY0VT<;J>LAI>d S;o׹x{|][xn .ۛ/楠pԡ4s RH.͊>mIH8lz".ƞ)0(YύtW:S+Y"qi3jɒtMrh740#<68:H4:mVE=  7C9:x@"Zeײ1+A=O&X9>@N(E;10>;4CHcsEe(c!z8{zxEU>%+ b[Y/pIj;rfY @ (@:z'jFu1Jw"CƬ#YYAXқ?2c / m~dلX\qihdB!9xڛLOgi.) eeEɤ3< ŕ\ 0F/Ix}!*_?GZEHb\60azM ah{ \NkT6j7t#̥ . zIUgU&c8ёQrKaNp>m~F)%Tq{ӬHKӮti7%bG'c2J1'̻YyK9Ud:ijB:5*ՑճD> G0UIz3eUnY9 ){&d\봳c,7\ 4jl>-2_Hp.㠒Fc}\6x|E477 z6k2W>`3E:R*iGP_R}$ܓDٗv( ![4Hy81/Y`40%/Dܔى)D8H#'Y+q 79iMZ! nՈ\3'J0Hx;C⧶0#gzhybt6i-gη Qx`6HA44jրG 2tCxQ< g6 ֛X{3+ ֔ǐ1i;ˑw3Ctn ]#Frrp'U:6돩9oQ} (ѯt X)VhÐyFVppMwekJD( mjV5~R(v4lx-;̨Gr hާ] oc|d 2u G@Q1s~UDK^hQxz@}%@68hts5W;:R6ϩ:v) la呮©A*?M)– Ե1eYiWey +Xѯ?9*^O|ё vRt?ʲi2 PSjȰvp|u [\BU](ͻu %t6+_›8ʨXYuߔi"X5GoA~ΪrR K4S*R XjVʹբV]۪'16hR'4s_?4 P{;5ۯiT~!ipӵ-7EpLy>e'G:X4dr` JOVֳqL( b x`3eӳ2lbԀֵ+,+˪2E."6eWF:>|SgnKneg0vv`QW8\UIaniGۤ1ڗQ*gރ!Y >ݴ *H,x3$Tjt.+Υ@極Ϊ^^\ۡka\`N&S`BE-e:ۗ|Q;?nB:/q'L¹Wv8\q';ڌ;+8YM+!l U\_uF+ܳ՚t(KfQ˓[p2[DGІ;FwHdD{37Hcs=OH0{ /ak(ޫXg~"|~ퟸfz߮8+'(ODUMccbhۘ<8X rPWm+4I?r@H=ak!MhV̀:8]y㖸:V(9.ʘ hS.Lnc@u69]iеϩ3ګC-w@f${7cxXfE!(k?2wRʠٞRο !z12zaYŝ" Pҹ ,S|d5ч <b.s" z5"{F &A_$;?5Ч `ghe)ʖ59)S܄oS-8ڛr'OF9ğ&j%묕*e~L۞>͙>!fE<*:]iܨd緝RÁGcmigrep-1.5/_darcs/patches/20070201040322-c661d-15a1507a0a9565edcdb2b1e3ec7eb896d4f29369.gz0000644000162400007670000000062510774552460026576 0ustar estokesocamlgroupSn0)UO=c! XQZ5>@XRR}y< S R*S*8I•LB1ԉIJPiÌǩ!%ς~l&eVax//;8>+i [;Xf`oJM*\AIZ:1,RjjF.$'creԊ.Plv FtLvARfڷ=vNAL3M%V\'!|A#r2c{܆pwcn~n-tpex8/i@o3|X>4!}m"FXp-b]g3[//cmigrep-1.5/_darcs/patches/20070201040413-c661d-46cd951beca5abee578c355ff10733885cdb2ce5.gz0000644000162400007670000000025210774552460026735 0ustar estokesocamlgroupUA 0D9PB֊ {) &?%uQp6Ǽ'!vȣbvO-;FRP{[ղv6 ֪P*U//xwEmu멗`U(1_tQ6vGh8zͱL™ يu0cmigrep-1.5/_darcs/patches/20070201041553-c661d-405d8990693f3ee8fb307d4f4c48066bc27b08b1.gz0000644000162400007670000000036710774552460026400 0ustar estokesocamlgroupMn0F>ŧZR'zq&A#QNDT/,o}3\])S綀ݫEҲhk!SYd/g/VԪh ͆=]^#4a [D\IQw{xL(u o$rľH0[Գ|l }g]gFWޫ.fc}2oQhם=ZwCcmigrep-1.5/_darcs/patches/20070201044331-c661d-001dd11b986e70b050a53ac70d391107f312211c.gz0000644000162400007670000000074610774552461026150 0ustar estokesocamlgroupTn0S  \+ ra!VP*g?"Z~ ٙ]M_+M[5T}Y:BjO+L74󶹼\%&Y%ieuoV ⦆,,wE v&6jQW#QgfxT̽HR&Xd@`-PBGQn!X>Z`Nk}`y0oyN%u_ gL" ˞쟴tC:!$\.9޹uT~\<1Yǃmd%5\O= v){22<`\knazW6C|,+ų 8ĎkdCI?ˌoi g|RO9 SQX˶4ģ3Liz΢‚q\eUxpHEڿ;=J/cmigrep-1.5/_darcs/patches/20070201044503-c661d-4dda8ae117fbf26953d09b4cbc819462e959b2f2.gz0000644000162400007670000000024610774552461026611 0ustar estokesocamlgroupu @~Q'ǍFݲGLplDR)ƒN䠵{~fa+ " {\ zulIƯ`Vy(NاLfJ% 8T]{*F "[D 3k FFjs(i}UWpր70'K!q^XZ6ʩ2<\R:~ȿN[Ji = &]0I3ifJya+ܚqnt%SYYac Btb*vk"[ 1STfm Gl!QZTq%ʂQxXG'P,SY r]"W""IXÖp'o*ujOn45@|3d~5)D?-y )A#OJA'W!g+ &yzRE.H-NI]c1N'yA<""۲ɿyn٦53f~-TZ;p_o97xbefV ؓoZjSQW3_;0őewH< NVAp„Vz;wtQQN ɲAtNyT3=d*~#eWܼ۳N*cᘿarT8^~aGI"NOFU :?-S)H"8$XfM'yB YD)/Nۅcmigrep-1.5/_darcs/patches/20070202173612-c661d-bcc6f92eb6a9f40b5d5a551853c98211f2e08128.gz0000644000162400007670000000146710774552461026454 0ustar estokesocamlgroup}TM6 W'.=- ڢ!ADJLd;ޝHmpnTvYK@O^`^_hY~m^^>4/O?!NZ=ٜm0u+Ω#D 'jN3W@ȼ =m|Nm+J<-ôPtp#Noh 3C%#h!j*{&#HgX'R P)KG?$T`WҲ̂0aZPPz^$EY"`pQp3GIߣ47\Ado*NI*O|+t\u+D\z(Sc.-Ƕ҉!ω 2$Cadl%R)p$fbt@;t\EOFK+l{kELkb}>։w^OM묝AĂt U m*8mrVoҌtv${ݔ׃2cKsfrȮMΝO PEҝ&K@-gKڷW>c^vž6=HuspM 395iU0I /4ևfW?ZvIeaV"_u͟*Ylz-&,t*:bûZy}Jvc8ߚ3kBu~ 4{?I(A7>v/ҋ Yzɹ9>RBIotͿOcmigrep-1.5/_darcs/patches/20070204005320-c661d-512f70b968b265997e5ed4ad578cbb18f0d99ecb.gz0000644000162400007670000000242010774552461026622 0ustar estokesocamlgroupWn6}W|䀎H-EV l5h ˢBRw(Rul Mrg2OL!3$w蹠 \#QN4MѫTG'*>Q6t1?_̗|fw$3rrin4mCxf)[sʎtpn"31.$4aƍ6 m&2 e"m$|GԐD(\;s?L'1ɕd\k:{"񦜪nlB( aNInWC '-Q.EfIdq=o1 u@JQdR[jB:AO?Q gF zUEFE3]= `[8lh!(Dq;N4YKAWyl3^^9kw]cZg ?8Tuxh gˬA(yγZHA([`ewRB*|} wn nsjU32 %"U{i$3 A6}h %;sQ+U anG#a~7:ՀoT<>?k %H -`~.2ec %YqB,^nc([}hd R?qw-Wr+$xo',w-g3ѶV Yk8*s75н7#pq),(?_Ԁt9ws7?աui鱗eyϢ m ^AaSltSëz_$ )KcW%/˜KU >nr=rU #vפjƠ\ +FMDþ|%X˨R90-{⅏1_6\*R^?Vx꣟ݬqUV]m:W)k<ut!qZJw)$CP9dK#=JgmaWz}eۥN\ѪaWaD&/  ?UwǦiOL= "\@M[)7&Qܾbşo!g axfwnb4/Wz5rgINtT(SVg;GV˃%JA7E%ܷxnvmGN,r;g#HRT&Krm! j? ncmigrep-1.5/_darcs/patches/20070204014616-c661d-b7ba283090a7e2bec956845af801fb1418803ec2.gz0000644000162400007670000000127310774552461026436 0ustar estokesocamlgroupUM0W"ڭ\e $Npa\wZv|wUU;yfyr%)+^ &J*|,:\|}xe7<[d$~KQb5EWd!Uz #"RFxHT x؞[mNQr{0ht$wطrIvRڒlݛ1P Yc༕U]bġg|cF%:Ȁ(ԅ6Xߴ)7䞵ba\@,6mVá/&8v"hjKuJiۄ3үZ>M?Q'pڴ,R=ygqi:xuX\g~P(h0XcȎ-`S'cib(朰"Șe۾G('CEy /fW՗cfc'lzv7Z{\x(DvIXLIm۝964`c/SED̴]+6&u9H_?1qHǖ+ː eV\+L,} #\ϓɮ:u+p8 J˕f$TsY-٬*EYZd= {%up9OHְvPӾ#մv#HKYVJp#`a_9h)[Bp"%O(_Gt+ TA͆+LCB!8d2%y> o05 }nYC2MpkSG6/xH p2, SA:uPO*{-FW:)7r7i^)p7ןW|ݷ773{zjѸjϘYS!hNhq=]\apj1 geʹ 8(@'9s&ĠT5]mɺ&+'X0^"  ôs϶ǣ:Z3k%]9X5XMbYҗ-45ܠ":n3x¶uhpR]?i Mk3yO_viv܍KRƘcnם%H{j'2;HvRY deeǠ{ir|qEဧg*Gw9m :Ncmigrep-1.5/_darcs/patches/20070208030350-c661d-16944f05f4df2b23d92a6ebd7d5885a7f9d11eac.gz0000644000162400007670000000212310774552461026667 0ustar estokesocamlgroupWn6+-Uٞ:iQ`VqmH E;N{/%яiM=J{Q!#H+JQ"TŪ %,fE>t./+'8;J~ WL(GEtwhǸ E{Y<"$QI HsMHEF8GȤgq\{2pgF +JTv'ELe=dƞ,isp$*B| {j(+6NJXSNSS #V+󈨢o:Y|YXeQ(sXYz֊dN棜MԎ$L"12{%6*=* [@6w ?'o&;ģh@9RˈR#EIBˀW[L\/\ @$yQ) 1,Ŗ*ܖ bZn$ʛV=X40(DbV:+v<>34A?ZDl+ ꙜCߏ1lו FC$Ff4zM;0]UyW.͎v 7㜎\[rQ{)\Nqh4{Lf@d\b[е`6x{AE6*%q]E?Nt3hY[Mi:4l_V8 _=M_< gUɧQ 6<0 ym֒=[b~6:l@h[4i[VlInfkurUh e9(IqFN< l8ޔ ?5i9cmigrep-1.5/_darcs/patches/20070208034032-c661d-23ec64143a29887e8420db07c016135ae204f983.gz0000644000162400007670000000045510774552461026135 0ustar estokesocamlgroupN0~U.$i*G^kb@wMO|wgY#DwkF `SR͕mӬn˦kElRq#C׉ zIc:h42q5y(}X'UTbv6;:]u"r3b5C1N2 0) C}w$3M^M G~|4XWS*>ufTd/+վiK9FFC(9g9QǾ7 Scmigrep-1.5/_darcs/patches/20070208224534-c661d-d5784be205dfd7af252eef7623fb49e489398a7e.gz0000644000162400007670000000036510774552461026653 0ustar estokesocamlgroupN0 y R0kDUymDVIaNZ^6"Ycg]̈GXJp<`bC,ڛ,sBln >I^!ZS{sKJMa*:~}♽D١\lI*C`4]ʫ2$%Kk~Wφ/1zduIףjZ! 0,&?a0cmigrep-1.5/_darcs/patches/pending0000644000162400007670000000000410774553464017665 0ustar estokesocamlgroup{ } cmigrep-1.5/_darcs/patches/20070209000835-c661d-8778f665cb05cd8b17238c87c172277cf0f96d01.gz0000644000162400007670000000124110774552461026330 0ustar estokesocamlgroupSM0Wr(!mKjϭTRIHv`;N lvϼfތ6sp(( #;3]$LU$/^3Xj0+`c/U[.t zTU].pxmoVZgA*iEq0`9.kQID'Mm>υO?p]ʝ$ɥddpM5;V`{*Xr*zVPA cȬUUHqؒX ׵L"۬6cn .Wiikf'LB)G ͊HX/h E|ј L*^꼦qG wG$̢ Fȹ `\Ty*aReEf9n8։p<CQ FNjX(z~x tw9 xlƶ~Ck4ONy/7AFL[zRFaiUFSf:Xr'i\xמٟSKE)lswY~֟~ؙG(?FD[:[~x@aTHyI|˖X\PEIVp ota[4E_B cOW}VewI S+! ;𻣓TX* p! NjZMeҥTG+z$ksFfxC~' %|%:4ui8Q(Rƺ]g_F3_vXn LۼaƄZ>C!v22gH""i6hZ[tqcII`!l:g>99Ջz {h$]IiDqĪ76$n)d~| o;^D֖iT5ƅ&#;XKHj:WD=nqLq39F&s W9wG(r,5֨1CFC8ϣ4[ԏ{_GTcmigrep-1.5/_darcs/patches/20070209174158-c661d-16a2bc4d890038b6c40049564bd5b19ee43a368e.gz0000644000162400007670000000033010774552461026366 0ustar estokesocamlgroup 0 EŗIjsZ)k9NQMI4TDU`Csk4=[aB ɤA0<#>(Rz!*)J/, dעD8:(MhA) Lhm6?SӋ39FhWD9%83/ lO3?dxs9wcAațtcmigrep-1.5/_darcs/patches/20070209212741-c661d-312d020e0aa882270e4fc3b84f9e74d8542df1db.gz0000644000162400007670000000121310774552461026511 0ustar estokesocamlgroupTr +v|v2Is'遠Ȏ%gzxc_'k<Kp᭫* Sv ȭo  +5΃$BOAGFaݾln fuaM4`ݠ٪h;>#KXҴQ:+YI,Y.nG%R༕-ki^-OzIelP-$lf3 ȃ1 Oo-D9'o#X{}onTm[S.T>yzcmigrep-1.5/_darcs/patches/20070209213325-c661d-451e2a13169d2fb02176116db04179f0817b4ff3.gz0000644000162400007670000000100410774552461026200 0ustar estokesocamlgroupeR]0|XI[ ćB[X8vvurR{vg<{Ro@>(J+i)SC岴l*Y~OZ)M|Kғ3PL混pW+*Xn@Z3 pD XxC7[f9}ޅQ:@,࠼b0pTϢZ P2P2`엷SOAYh8ȳHxBWւ IHlKfm(~6(~7nX m00c/H;4/֞g=FՏG^&%xh1a!夊|W=ZxH%uDD=jU.LY[:2x%5V}҃}UAr~N(ZX5X=BRYd/̏#>iK }ύy1*du,\3 rjcmigrep-1.5/_darcs/patches/20070209215417-c661d-9f4ba215f5c7ae5af41853d2f1616d0f9c7e6019.gz0000644000162400007670000000035710774552461026542 0ustar estokesocamlgroupuN0EYUIQ*vbd!.Ht{4.>Τ@5<Fy!L`:SS`Q )%i7}a2FN nG!b/?7;7(" F;E(tXW \#<nHg84]-ַc!  ޥ;o"D`cmigrep-1.5/_darcs/patches/20070209221759-c661d-5a96dc8c9362c8f2c9af8a3f3fda909b582270ba.gz0000644000162400007670000000113610774552461026716 0ustar estokesocamlgroupTn0-HѥStTt8SL"2l(юdN9I{wJT4h:[JNkL)<(<6'Jx}i4eQؔj}C7ͅ*ɀT% G.t< 86*#l݂V E =Lи" /u/r7X8Zxi֤>.&K}6ddHe8?<ߩ.U*͸:^D 6H\ _kcE܏0+:1GUaYY%ȳȧ2jIN MhlѦ,N6-6O: E ji^p213dyTwbOeU2=OXoRF2*ȭ7'[vV ͉iF-sqn:xwnPP5G] }pܿC7K¤(^7ɂ8т)Uo2Gɠ; 8OhK^jc-ΒVuF4!ij6\ƠDeM kH?D7[>;]RvBdE^?[֌θ5}">NDpN}Ro(6k,]Ǩ*}W77఺Űk3PACt'/N/kCߏ--'{ߑ0$½tVr/͝z҉^DCn(pU>WRd#+f&5GiGc ^֥G7J(~WlƝJL uwsfǤd=Ӵd(OA(hL5eМ/r)8x2 c/u=1*ĚQ()ёx"FAWPT)A( (2hItz9O216<ǔvڷݣ@+{&HQ )쀚`xzj$FljgV_mn@+* )FҬ`WSl2l8:pkv8f0#WM!cIz2@7~E}qV`ᕺu"0y!ӕ`VWiio $H qb .ϒNJcr* 1ڤcx u5Yg")4ѱ=͎vS4)$2B"BF{NٍNZ27~ )0Q?[o:!j wXJAR͆jS!EhyہTcw ;no"hq꽁|Z5󩄔 a"Ә|ʼ Aَy z(v$=n6]zTa_?2!9'Qݣ;i#rvT(DbRzu)goUJ\A#N MW2LE55':tnb;ʕ \mM)y `({4=0 {Zdy5lc{NV x@y֬.& CB7nX+>|AMEzgy4%3L[D /e^JN9+(~0N g#fRu.(uEjduz*0mnes>8͏gCeڡj]zI68\k9# 8O^JS VoP4Ϫ4IYӑr3lzhgSb=a/ȃ 'C =%zmpn5>vW#HBt j(n^K  pVc 2#/%s˫$&E|?©5?R9JHJrL-]cWm3|qK_tHmSa "g+'eCbRgN"a;6%[R#׽-5{A;x4u4%>9 u ]Ъw#Adk!>P:;Rp΋w2)} /Wfaklgs[ l3&cĿ6MYߘ{wg3UBY_O.1"V@ +A{2A1MgOaFZF`) et֒P^03o8.kĕk7DNXOA3rGc(19Ӹ?#ǼuhCk ڿU" (=:vp'Sl2) RNO~_ot7.cmigrep-1.5/_darcs/patches/20070210174009-c661d-6fe386e49ff17897f924aeaef13b5d794d657725.gz0000644000162400007670000000225310774552462026521 0ustar estokesocamlgroupWKs8+T`$dG՜溗FWL[߷eX$T֧f}"(R'RRD'IQ^" 8\psDY*01F#IˊҬ&x#2/;4"In<~J79Uſ(iS>NffB%%2=aRPDXEQhLETfd,5m&>YJHPL M(Zɓ<3 )-QX BA#GL#9?B-2+jmZ 51+ u<G\c}whdϸo/W/Sh5Iq7#3Ey+yr_޶"g "^GFBYNsr(JTeM[zO=]-i ꭛Ф©F?cY.M.]PYΩ ,\F(v{z9"íxcͿZNphBj% s#3n!{EX@=ИUќ`M[;;t{ěMAۛhf@6 l" aK0{^%9r P~ʹ9ajNqYuiuեK,f my&\NQ [ti)1Q~޼|y2׷!=t!vz9-Ѵbl#?34LW0oKӈ_4נ>ŏB#@R9#YMH `DNTQܶ!Em-` b9P7 ngy X|vIyf yȮ{ag9?tgCϮarv_Iо[r c=@17nC7"u']i#z*7i3z?cQw-IHh~Z—WT~yW:\ջʟdHۣtx(p1] 8bcqD0Q=LxdbO4)H_\Ӎ ,]mפ(|97ɄԬBUi: تŦ{A3S)Wk.~%g;`ֻn rkIwZE_e;$f9cmigrep-1.5/_darcs/patches/20070210180322-c661d-10cb03a5250714dbf27be6df7a357153104c468d.gz0000644000162400007670000000344010774552462026331 0ustar estokesocamlgroupYmo6_A"8]a-0`%YAK-DTE"fI[Զxw<=wǾV,]>2Bn7tos ^[YhTMr =9aI3>lBHKP`RT ܨP\hFɹZ38.2e&/$Yr!۬D!«Z/ +ek)r~RPdU@ 3]& h%uL6"!((,PFq3ZN)+8$]U}m`vd Ac#I{)꜏ݠ9o~4sk;BLIZaҹID ipuUV#1JĹ;T3{tLm/|X0u RCSR]! W#[dqϊnh`T Mw8T;ǢC&\[&Sz W+hYd;xq*-1~N 1uaghWBnT ]:s]=zj&բRi彫&oQq}VEۭw{dczbj{J/ l0 Ł}(K` ASH6Hky-&T5(i).pŀ_|_;jś7' ,ÑVы/*V_ f܎Kͷ_6'=t4t]7'ϰwq}σ^.rj懇jh+yYpGxx}yB{B#q;ŏ +`Tod,cPB.@t']nk{.a/ߥ}4ww VEnujﶙ|w{/wۨuח] dmC7wK]t.ۆvR}w[>\|+1y(3sWV) ;bx |6;bҧ] c.jwq Eݧ]:w ^~G'7wnw仍nh`4w ]t|Gݦ=6l']?{nG|ʎ8IwLmT/ -9 =_c{c)f;9 ј˅"N_)3F߇wz"P.E0FZhX=y)yWT.D!pbVJbM5{R9.\FAxoF}0B+ ɱj8½5?eEq H`5QL]:,a2!,@q8{az|q9\gŒ/̘/4ō 't{DFw?cmigrep-1.5/_darcs/patches/20070210185215-c661d-3501a12acaf245719dfb3f6317a41fb6cee57d7d.gz0000644000162400007670000000376010774552462026656 0ustar estokesocamlgroupZIo6WDn4$@- zq0em(*K;}I%vq"mߦ*!)9# ;iP|?$Z|uqbuyqys~@-xh 9>>94f3G0ͷUBK QUN)'ZCP2KJXt=EA^,HDuxߞ/??Y8A9O `y;(ۣl e%EZ1WJDN~#eLa1mCTͱGcQߟ--UH]$KEx%6S}~+!C$CU&tؠ"%JxgnqPYEZDa{0Xby@ޓkZ/Yl.촱Ё5p2?2pbҼG8{/"-A QE@ 1!ө(۩(65[I,)uDm WC /uTm<*=Ȥl%֖lgƄl:2 ƾ(܃YJ-pCGF~d41S?9Jsa//>v;pYmԵ:ht1 9賒eQ1d+oLd@Qۣp:iD؅'Ӡ>`ɃJ(S7l^~zLa 8Lfc1V=o\#Xme2o*T&ϗ28>ީA,Rr8{$r)xSa5*"vqkiK!s;dY)Hbg9+E]>9HEgxַ_W6E-BٗE-Y >,=@;+-F;>2$po=csn;2t-NbA:&{VWRe|K)@#3ن,n L$y(@1.?^fo֊Aq1Jӡ9%z4k>Y=At\?ۮۄ%X)&1xS.~J7P @("pd /Ѷu6qvUas wܸ$1x0AbTMOf viFInh,GwNS\mtSf6fvJ >h#yN'%$zT7wGdӯ{eU&J}ir8KoՍ77S%Jm͞W͚˾C`Ff`ub\KH)o?1)_Q}~u)ljqŌF94sw?VE a-η fv>j0VCC$&`A=а|훗獔Bۍݩ !xu?jt/`a>T|Oe\H51at.c2%+o,~`)||vOǼՋYL> 1fvKwT*o|ivٿ*cmigrep-1.5/_darcs/patches/20070210185614-c661d-c675fb690a49c11628fd8e6ba185cb684c619d01.gz0000644000162400007670000000051410774552462026461 0ustar estokesocamlgroupSR0+1 ĥḈ2IM7-E_g㞤ϭ۶ʚ-Aw,Rz?E-"C>OiLueք-%U@&(kl\K^+jAEz#îF1șU]4!8Zcvq m?)dܝ C !ngm˛g+4Εij o+TjxEq:'!'n[l8to; b${KQ7.H$z+y1w0b_Zscmigrep-1.5/_darcs/patches/20070210192154-c661d-72c87bdfed26666a1d1ab0e572bd4d8945ac11ac.gz0000644000162400007670000000076210774552462026740 0ustar estokesocamlgroupSے0)a:+vOmoEv'_M={,+7w$aih& \La ׸+4 1Ac[tQ6a2ftLY)&Y nPP䅁hx1 uah}:}gQ`=ݗxokR*!+JJCc.x!`6x-TIF BOUnH(J=]Er\z ;Kpd ☐-Uurú&em5P[z|.qr cmigrep-1.5/_darcs/patches/20070210204124-c661d-5f07bb7537f92deb5743ba7cc047999fa9e8d62e.gz0000644000162400007670000000147410774552462026636 0ustar estokesocamlgroupVYs0~FxH3ig3Ke`K,M;]>D!ewǷvیF<,_TRAL?b̉oc}wl0< hy&|Xg OGN X `&DИ9=7w1I@552bXpco"О:UhJ: C|k Մ%g"N0.? F^MIWeaI`uj̊03egveh6lo{D+NV*lqzk>4Tiå@pbX3cvEXqЕLa*<'E^xTd\{OrOpJʆLz4WZ9+Enr /zR;$[JRPylCpށP0 &%IyV)?xZQ R&FtY]DWV*QBG3m9-zV`n0N% fjD~z3z7K?;:qf\5Vvy%tLΠ_ppZVbƙ6 (B*a]<bF;2H9X2zXeww5RR nOr6@@VA(ɚZ2  ژ.BxMSVrHK-e[`T) d]!f`!)R<ۍcn+`*Wlv[ aZ1Lb4#h?m #wl_kZ8V0JVqMm$nj|DBօ4߅x[bKB=O,2,}h?; ?4Iv O_]v' Sg՗zIcR&sGs<}fy)5](ۆ:>e<'<$/uZ$:+q}KΡCENr#߽?#Hcmigrep-1.5/_darcs/patches/20070211173600-c661d-ec3528554f122b3e5b91f3622b3728644c32a4c4.gz0000644000162400007670000000102510774552462026205 0ustar estokesocamlgroupTMs0WFƆ^z)"A& weCJC;c},U|h4Fئ fK.  J0kB\-Es@!Dˋqqe4M#X7$#QʕM fi"/PMQ8jPj),'Ta$XFYK R%5(P3U `p\%4dQ7ȵXCՀT^n7:AJ:u9g}K`yX$ED9.E!݄7a+3v|͍$H}̖NSt^*Чuaz%nd!1MtfoOezu#";>wd/}B3XL'!~\a[rUd;OgNf}xD-kĻDI1_ 鄶dEͶV3?Fcmigrep-1.5/_darcs/patches/20070211184727-c661d-ca5fdef69a1defe35e347cded2a85f3a6d9af215.gz0000644000162400007670000000132410774552462027264 0ustar estokesocamlgroupWM0+{iR+uKU`X8vXTI} xޛSIXlRmk|K5j5j. j!L7+9@(9wElDϽ1eg}yy5NWxr5{Q*0xb>ט P$nH"L{uWits]O)?`VTHL:5V4YIc&J b"EqL9BK'ISkxA^Wrn::Vsp1:7 K'+$Mk fL-HH-ݖ`!5HfJ ,E b df4>~?>~zow_޿P<ʇ0İd4m`P66`J.kԂ9ReJq FtHܳÓ٤ ť%Ԓq!i,HyvZ /s|2=BЩ7OѼBy&ȼѺUtNZB=)tEP[0z ;;Xn4j̺;n I#j\h\h/tHegb٫`Q~&sedBfTTn]VqW;ez:cyF;[\+;Q;;|_nx?wopo64'WBiP#?.4d5ʋh 0,nL1m3@"; [@6Y MkYIwtLN-8ްTwP'm4o-G6M;q{]E&x{gzUrbF rOˌ d{c?cmigrep-1.5/_darcs/patches/20070212200129-c661d-c52ec4aa488ec666a77af408678bd1d9b342c420.gz0000644000162400007670000000032010774552462026514 0ustar estokesocamlgroup-N0 y  q&8]N#<ﭬXI)&@Y|}lGL˴KyyZleD Wjtk60$CI6$N!SRt}CgC=ެ`<]BXsVc/=M,9oMJoJYwhɵ[5M@cmigrep-1.5/_darcs/patches/20070213203744-c661d-8cd415d65f3f2915170e7f0e9254ca824c8b59be.gz0000644000162400007670000000040410774552462026460 0ustar estokesocamlgroup]K0+cКu AnUQ^h*7Yۛ#@h^MY05Dc'jot&M ηX n6%'޾@~-=6ѰE R4a {q=UgCeh y lCcB!tX4MUUozKw!>R¦ HdM[Id%"F{5DÂ>Zcmigrep-1.5/_darcs/patches/20070213210730-c661d-0c034a1ca8d6950db7d9ffd7239ab032d5e0e801.gz0000644000162400007670000000051410774552462026557 0ustar estokesocamlgroup_O0)8!BLF1n4]Q춌?*ؗgz{j9pHV@KA EA^ oh$=B^vyx |e] RM\jv[Z#Ɇa?xEUE'AKoqdkI@ɛBi~uZI7~g[+:{E0)SAo}-$f-odEy-b \V 4~A9PO2e_i!dcmigrep-1.5/_darcs/patches/20070213210754-c661d-e0a1307ef72f53af25bae32a0dec87bb5a2c2a13.gz0000644000162400007670000000025610774552462026765 0ustar estokesocamlgroupm }n[EsnJd*ѻgAss8Ы老.q Y΢,"zM 8iHU4>hWܨa uM'eCݻ s,-hEPz+-fׇ聞j#cmigrep-1.5/_darcs/patches/20070216172514-c661d-d0f4a5c6a1bdebb09d8f91dadc5e367f0199c000.gz0000644000162400007670000000261210774552462027014 0ustar estokesocamlgroupWێ6}߯KYoAP) AEDJJR6{uKșᙙ33ԧR=VI. *sIYPX[IƪZi.=QGdrtK+tf"^Bru^]}Nu@qmEN'D63g0JrM{US,J2ɌYXYJqIY.fԅ!L1AR>Qt8A$ U,g2hle[VHa3UIf?D dr3²`S|S.\ >: *hL|}lqpFC,&j 6[U h(,G sG>rCO@>kR*IgUǾ;ϾtoAq7'٬ŗR<`X궑ESIXRhM*ٲzpDi]Ҏ_SƔ6ℝsw1ypQXۅ5i!οNʆ)3Yvv:CxdeBߔ|Ac}t|]o: ,iyJU//$t8^k4Uf񇖻;4Bru骨}fm+?4U8b 7yIBYyz`r>;gg Dp1 4_em){[qA!엾߉R0AQ] BZax5|5y ={֝MweHL7Ndf#2G6Y-ׯ.u 'z.Wx s@or/4ZX 4VpL:¢26?iZiƴ@9˾{\"o͗7gsN)(AuG$Ļi1ޘi!2.(@.(d zFJf3Guc5@Y"Ҍ/q᷉lU%$ -+oiޛZGgǍڜ xoT'\-A\d˽ӟ1h v4n= +0g䈻Yu M8?K/1.ufhOy y(unWc5_zifcEcoh?V̐vLjHvո;oX꼄8P3~ ipåg4֣C0H}gȎ|C}=~s4D~VwCǭ `7Z>1`J=P.ǑO8tW^vFB ~̿iT\>O0Ohcmigrep-1.5/_darcs/patches/20070216175105-c661d-4b151d6bd809af22b8e217a773351af2f45382e4.gz0000644000162400007670000000110410774552462026354 0ustar estokesocamlgroupTM0W mnh eEWpCcUEn2iu`;]q ٰ͛, vh-j0UY*m!W^R3c&3(TV U4`X"`㖮4F-<,SUf~\|\ܯ~GJ>A.-^cUt*ih`rd60Fo{8acٗ>z?$ Eac>f #lnO$jv_Fkq?DL7u p$u໒8  9,im^P r vZVnH큲$Wuhow`WLN\^uD[j;S_ØSwϡbwIM!ʠ1U"p¬jRwOn\ƒcmigrep-1.5/_darcs/patches/20070216211303-c661d-f2fb8c75094fb593561343cbf0bf9258beaadc33.gz0000644000162400007670000000032510774552462026660 0ustar estokesocamlgroupN0DQNm!IT! ܫ+lZ;! F/<34< OGGb@ i$S!hS!v]=tmo=ޕ  :xƒf{]pMH2zwRTw#diN[$/AciQױdrq"LlO?`V˒Wcmigrep-1.5/_darcs/patches/20070217001611-c661d-f8a6d81cd27c59add1316fe796b296247f9fb2d7.gz0000644000162400007670000000340210774552462026627 0ustar estokesocamlgroupY[o6~ )6=;iÀmе$ȢJRqa}76?yn<;* Hn(U)$j 5ZQ"[+o5ͤR|%&8p4s:Jd̔N-0Nr~<:|hh&.α_yW44n\p]+A \ ];ׇM)@'Icn{<0uї=(T!kwܓN,1sM3BHJXʺi}n`6PK-KixA}NE[veUi1Q 4} M6bQX<5RY2} 59QANW X]A \Iƅ;ُ%@=$('ZHAfR1k?H 󏹍ϲfF*]7Dd5}uW} ۓC5D*C5Lh@k!P;p~ԝöIRuNS3Pʺ.m!q43ʃDӯUb Nl*hǠx4x!*XxjHrg0R!P15k-DRC 1^_Iǫ:|X.g"B"۫gBp]PB,oQLʒT}u,|)qH@ݓ4{D_w>Lΐl90R v—; 5E}ߓj'cmigrep-1.5/_darcs/patches/20070223023551-c661d-136ef2e25043dca5c44b66a2b4088b8320b7806a.gz0000644000162400007670000000122010774552462026333 0ustar estokesocamlgroupmTn0 }WyɥU膡ذ؀}^kѱ0YR%q:GJ (JI͖"z>X-+.|W'tu J,ߜP4h\Cq9g}z*UrUB[udӜA!ؖӖz62anO!(k"$\6*0[{ہfa&B.Tp@;\d9d^򄑸1ܫ`Ss>dR+8!vg2_.YY(B pIB_5 K$!7h]}?P<˛f3Q"'OXZwPa NeNCaH?yBߌȞof G!y~'Zǖϓ_,R`N#0 gccMA=oi䱍{DxrxŤ}tR0$"/e:; 0P- =LN8o;%stNƈ~vϮz/F"䋐蔴v?R`̴әV"9>r`9WI1ɞ$]+L&ݍV]0 濖Zݥcmigrep-1.5/_darcs/patches/20070330145420-c661d-6577e3423b2c43caf89819feb36f278b08905b14.gz0000644000162400007670000000051410774552462026320 0ustar estokesocamlgroupN0EWnAHq&U)!QZH@Hx̹sghD<2eaFȜh©*\F238dt=Yv sifdHU 4N%7nK>T|.WedaB൐.qZhw2\Gپr"8Fp($L~#7!'|;D *s c2$eTKp+6?cux?Ry|yi& IlP==ie:YAI;>SZzlHU7l',ALV`a \@ ?x'r"9i^q)`xR0_pmBoa^#[;}($[#Rt_^_y:J' =/Dcmigrep-1.5/_darcs/patches/20070330163556-c661d-2ecb5950b47afa45c163aa15d2c18babcf9f46df.gz0000644000162400007670000000026310774552462027077 0ustar estokesocamlgroupK0yWqD) =KczMhܻ \gL>BgK''G?-'QCE{,XZdy^?!٩N7mR S BzNt',JqULoK^qETUzm` I5ؗ&kcmigrep-1.5/_darcs/patches/20070729213340-c661d-9597da91db4a9f939b6623e2693a6cc8def92920.gz0000644000162400007670000000050310774552462026510 0ustar estokesocamlgroupMN0>(D.i@kVhjUDqA{7U׷8k ^Z4 w(ZTzYϛ;A!0jK=-7je;"%r[5|mƐF(Y2Tf0dPA^{ UŖ͡T6˿iѽv)OJ05}V?0Agu}<"?鱭y~r,2Mof)96!Nlh49UmK2ɴW\ I7cmigrep-1.5/_darcs/patches/20070729214213-c661d-7cec33cfb280a01d0a5b84f190cbe7838b4e44d8.gz0000644000162400007670000000026410774552462026664 0ustar estokesocamlgroup5 0DY7Ņ 6mIJEw9gfqja r4$ Leٕ] lbw KgqRIӢ퀻#_Cmn'fL} .@:xZmWؾsbocmigrep-1.5/_darcs/patches/20080402003817-c661d-b5294a835d151b977e9e81bd6cd472aa279a3c72.gz0000644000162400007670000000353110774553006026453 0ustar estokesocamlgroupYmo6_ +*;4MX; P˚DPd:7HjoY""(M[ Ȼ玼KeMrAIMqҖuZNIz 7|7(m\/yIO&hO\Gw➄?'yz[*3rzbQGWI;0&>6S_Hxs[Th.ҧMMk1jc"]6ƉCtAX?mo#!p0z4-]WĻl&S)+Bl7%~<kR.QriD_Si7E&BX xqfe []% jHHHZX4Ω$xKr9o$N[tK0g;kx F~~, Kn2T1$Y#id*宿 qOj^M~258\^opo,u5\%(bn71D{'Jhv<7ƣSU7UeqBɷl[K*{t)1H{Giυ(1cU %Ӆ8ذAx]4#$Vu˹m5Bx<ۜu>]5. ux _weF8XsFX=xCn v/ V2l*eN^6{J$F2N3VѼ;҅y6v324lo擪m OH,f0JO 2zb[\F4o,iD~KyV|eY֥//?- RX5 .^CK>c;ƨ1lTV-]wb}gik;ǸcaP3=ע`A_,ol0:;(pѫ`( ѫ)*DI皏Qi\0=áp88CSVp0Pt /ݺPnW*B>>bzO3[۵'r:R|L%xNNꌺ>A`; <<T h#?[ƾѰ" 8 ^BjކwE7u\o$ C~xR&|~aUZr"|ց 5q:xj&v-Xk?Vk(,F0JO>!9BH/DS |v<Ѩ+,/麰"xlEXiE¥|_Xy&D/ǃ&RLx1fhqwl|w{.K{S_?qBK_#"oN~suQ}vKQ^Ϻ*(̺ΡXP &+]6iŴK 71 R%9 G(.5EK˲W%9J{hKh}D!{C1p( U^PD^1P|(Bj]:V}YsF])($4e!I$8XωDr4R0-kA*vs >Ȟ&ć3yʾ͋_?"6.QVjႾ ϧ0Ra7U*2xpSf0*j+ˆW 2LԷX0#r{zvb15> :dk'M^m(v:5^|nK wkZ#9/[v! 8>?/{kD!U˂v+n҅!y~.6HУd̕cmigrep-1.5/_darcs/prefs/0000755000162400007670000000000010653204720015774 5ustar estokesocamlgroupcmigrep-1.5/_darcs/prefs/author0000644000162400007670000000001710774552462017234 0ustar estokesocamlgroupletaris@mac.comcmigrep-1.5/_darcs/prefs/binaries0000644000162400007670000000061310774552463017531 0ustar estokesocamlgroup# Binary file regexps: \.png$ \.PNG$ \.gz$ \.GZ$ \.pdf$ \.PDF$ \.jpg$ \.JPG$ \.jpeg$ \.JPEG$ \.gif$ \.GIF$ \.tif$ \.TIF$ \.tiff$ \.TIFF$ \.pnm$ \.PNM$ \.pbm$ \.PBM$ \.pgm$ \.PGM$ \.ppm$ \.PPM$ \.bmp$ \.BMP$ \.mng$ \.MNG$ \.tar$ \.TAR$ \.bz2$ \.BZ2$ \.z$ \.Z$ \.zip$ \.ZIP$ \.jar$ \.JAR$ \.so$ \.SO$ \.a$ \.A$ \.tgz$ \.TGZ$ \.mpg$ \.MPG$ \.mpeg$ \.MPEG$ \.iso$ \.ISO$ \.exe$ \.EXE$ \.doc$ \.DOC$ cmigrep-1.5/_darcs/prefs/boring0000644000162400007670000000102610774552463017214 0ustar estokesocamlgroup# Boring file regexps: \.hi$ \.o$ \.o\.cmd$ # *.ko files aren't boring by default because they might # be Korean translations rather than kernel modules. # \.ko$ \.ko\.cmd$ \.mod\.c$ (^|/)\.tmp_versions($|/) (^|/)CVS($|/) (^|/)RCS($|/) ~$ #(^|/)\.[^/] (^|/)_darcs($|/) \.bak$ \.BAK$ \.orig$ (^|/)vssver\.scc$ \.swp$ (^|/)MT($|/) (^|/)\{arch\}($|/) (^|/).arch-ids($|/) (^|/), \.class$ \.prof$ (^|/)\.DS_Store$ (^|/)BitKeeper($|/) (^|/)ChangeSet($|/) (^|/)\.svn($|/) \.py[co]$ \# \.cvsignore$ (^|/)Thumbs\.db$ (^|/)autom4te\.cache($|/) cmigrep-1.5/_darcs/prefs/defaultrepo0000644000162400007670000000004210774552463020243 0ustar estokesocamlgroup/Users/eric/Desktop/cmigrep-devel cmigrep-1.5/_darcs/prefs/motd0000644000162400007670000000000010774552463016666 0ustar estokesocamlgroupcmigrep-1.5/_darcs/prefs/repos0000644000162400007670000000010710774552463017063 0ustar estokesocamlgroup/Volumes/letaris/Sites/cmigrep-devel /Users/eric/Desktop/cmigrep-devel cmigrep-1.5/_darcs/pristine/0000755000162400007670000000000010774553464016532 5ustar estokesocamlgroupcmigrep-1.5/_darcs/pristine/Changes0000644000162400007670000000047710774553065020032 0ustar estokesocamlgroup1.5 * ignore (but warn about) missing findlib packages * minor refactoring 1.4 * support module aliasing with let module, and module = * started making a cmigrep library, but not done yet 1.3 * bug fixes 1.2 * add support for specifying a list of open modules * fix some regexp bugs in the module expression parser cmigrep-1.5/_darcs/pristine/cmigrep.el0000644000162400007670000004152110774553255020503 0ustar estokesocamlgroup; pop up the tooltip under the text ; partially complete as much as possible (if (string-match "XEmacs" emacs-version) (defun replace-regexp-in-string (regexp newtext string) (replace-in-string string regexp newtext))) (unless (fboundp 'looking-back) ; Exists in Emacs 22 (defun looking-back (regexp &optional limit greedy) ; Copied from Emacs 22 "Return non-nil if text before point matches regular expression REGEXP. Like `looking-at' except matches before point, and is slower. LIMIT if non-nil speeds up the search by specifying a minimum starting position, to avoid checking matches that would start before LIMIT. If GREEDY is non-nil, extend the match backwards as far as possible, stopping when a single additional previous character cannot be part of a match for REGEXP." (let ((start (point)) (pos (save-excursion (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t) (point))))) (if (and greedy pos) (save-restriction (narrow-to-region (point-min) start) (while (and (> pos (point-min)) (save-excursion (goto-char pos) (backward-char 1) (looking-at (concat "\\(?:" regexp "\\)\\'")))) (setq pos (1- pos))) (save-excursion (goto-char pos) (looking-at (concat "\\(?:" regexp "\\)\\'"))))) (not (null pos))))) (unless (fboundp 'tooltip-show) (defun tooltip-show (tip) (print tip))) (unless (fboundp 'line-number-at-pos) ; Exists in Emacs 22. (defun line-number-at-pos (&optional pos) "Buffer line number at position POS. Current line number if POS is nil. Counting starts at (point-min), so any narrowing restriction applies." (1+ (count-lines (point-min) (save-excursion (when pos (goto-char pos)) (forward-line 0) (point)))))) (defun fold (f x li) "Recursively applies (f x i) where i is the ith element in the list li. For example, (fold f x '(1 2)) returns (f (f x 1) 2)" (let ((li2 li) (ele) (x2 x)) (while (setq ele (pop li2)) (setq x2 (funcall f x2 ele))) x2)) (defun filter (g li) (fold (lambda (acc x) (if (funcall g x) (cons x acc) acc)) nil li)) (defun caml-format-packages (packages) (mapconcat 'identity packages ",")) ;(caml-format-packages '("pcre" "netstring" "ocamldap")) (defun caml-format-paths (paths) (fold '(lambda (acc p) (cons "-I" (cons p acc))) () paths)) ;(caml-format-paths '("/home/eric" "/opt/godi/lib/ocaml/pkg-lib/pcre" "foo")) ; state and configuration variables (defvar caml-completion-buf "*caml-cmigrep*") (defvar caml-packages nil) (defvar caml-includes nil) (defvar caml-default-dir nil) (defvar caml-always-show-completions-buf t) (make-variable-buffer-local 'caml-default-dir) (set-default 'caml-default-dir nil) (defconst search-type-value "-v") (defconst search-type-record-label "-r") (defconst search-type-module "-m") (defconst search-type-constructor "-c") (defconst search-type-variant "-p") (defun caml-clear-completion-buf () (save-excursion (set-buffer caml-completion-buf) (delete-region (point-min) (point-max)))) (defun strip-props (s) (set-text-properties 0 (length s) nil s) s) (defun open-modules () "parse the file to determine the list of modules open, and return the list unqualified" (save-excursion (save-match-data (goto-char (point-min)) (let ((modules "")) (while (re-search-forward "open +\\([A-Z][a-zA-Z0-9'._]*\\)" nil t) (if (equal modules "") (setq modules (strip-props (match-string 1))) (setq modules (concat modules "," (strip-props (match-string 1)))))) modules)))) (defun caml-search (search-type value &rest module-exps) "search for a value starting with [value] in [module-exp], in the directories specified by [packages] and [includes] and with the current working directory of cmigrep set to [dir]. placing the results in the *caml-cmigrep* buffer" (let ((process-connection-type nil) ; Use a pipe for communication (default-directory (if caml-default-dir caml-default-dir default-directory)) ; Set CWD of cmigrep to dir (args (if value (append (list search-type value) module-exps) (cons search-type module-exps))) (open (open-modules))) (and caml-packages (let ((packages (caml-format-packages caml-packages))) (push packages args) (push "-package" args))) (and caml-includes (let ((includes (caml-format-paths caml-includes))) (setq args (append includes args)))) (and (not (equal open "")) (progn (push open args) (push "-open" args))) (and (get-buffer caml-completion-buf) (caml-clear-completion-buf)) (apply 'call-process (append (list "cmigrep" nil caml-completion-buf nil) args)))) (defun condense-spaces (s) "condense long strings of white space into a single space" (replace-regexp-in-string "[[:space:]]+" " " s)) (defun strip (s) (replace-regexp-in-string "[[:space:]]+$" "" (replace-regexp-in-string "^[[:space:]]+" "" s))) (defun extract-value-name () (save-match-data (if (re-search-forward "[a-z]") (let ((start (progn (backward-char) (point)))) (if (re-search-forward ":") (progn (backward-char) (strip (buffer-substring start (point))))))))) (defun extract-value-type () (interactive) (save-match-data (let ((start (point))) (if (re-search-forward "=\\|(\\*" (point-at-eol) t) (progn (backward-char 2) (strip (buffer-substring start (point)))) (progn (goto-char (point-at-eol)) (strip (buffer-substring start (point)))))))) (defun extract-value-module () (save-match-data (let ((start (point))) (if (search-forward "(*" (point-at-eol) t) (if (re-search-forward "[[:space:]]*\\([A-Za-z0-9_'.]*\\)" (point-at-eol) t) (match-string 1) (error "invalid module comment")) nil)))) (defun caml-parse-value-completion () (save-match-data (if (re-search-forward "val\\|external") (let* ((value-name (extract-value-name)) (value-type (extract-value-type)) (value-module (extract-value-module))) (if value-module (list value-name (condense-spaces (concat value-type " from " value-module))) (list value-name value-type))) (error "invalid value completion")))) (defun caml-extract-value-completion (line) (set-buffer caml-completion-buf) (goto-line line) ; goto the line that our completion is on (beginning-of-line) ; goto the beginning (caml-parse-value-completion)) (defun caml-extract-module-completion (line) (save-match-data (set-buffer caml-completion-buf) (goto-line line) (beginning-of-line) (if (looking-at "\\([A-Z][a-zA-Z0-9._']*\\)") (match-string 1) (error "cannot read completion")))) (defun caml-parse-record-label () (or (search-forward "mutable" (point-at-eol) t) ; skip the "mutable" keyword (goto-char (point-at-bol))) (let* ((field-name (extract-value-name)) (field-type (extract-value-type)) (field-module (extract-value-module))) (if field-module (list field-name (condense-spaces (concat field-type " from " field-module))) (list field-name field-type)))) (defun caml-extract-record-label (line) (set-buffer caml-completion-buf) (goto-line line) (beginning-of-line) (caml-parse-record-label)) (defun extract-constructor-name () (save-match-data (let ((start (point))) (if (search-forward " of " (point-at-eol) t) (progn (backward-char 4) (strip (buffer-substring start (point)))) (progn (goto-char (point-at-bol)) (if (search-forward "(*" (point-at-eol) t) (progn (backward-char 2) (strip (buffer-substring start (point)))) (progn (goto-char (point-at-eol)) (strip (buffer-substring start (point)))))))))) (defun caml-extract-constructor-completion (line) (set-buffer caml-completion-buf) (goto-line line) (beginning-of-line) (let* ((constructor-name (extract-constructor-name)) (constructor-type (extract-value-type)) (constructor-module (extract-value-module)) (hint constructor-type)) (and constructor-module (setq hint (concat hint " from " constructor-module))) (list constructor-name hint))) ; (caml-extract-value-completion 1) (defun caml-extract-completions (completion-parser) (save-match-data (save-excursion (set-buffer caml-completion-buf) (goto-char (point-min)) (let ((beg (line-number-at-pos (point-min))) (end (line-number-at-pos (point-max))) completions) (while (> end (line-number-at-pos (point))) (let ((completion (funcall completion-parser (line-number-at-pos (point))))) (setq completions (cons completion completions)) (forward-line))) completions)))) (defun caml-format-value-match (value) (if value (concat "^" value ".*") ".*")) (defun caml-format-module-exp (module-match) (if module-match (substring module-match 0 (- (length module-match) 1)) (error "no module matched"))) ; (caml-format-module-exp "Unix.LargeFile.") (defun strip-colon (type) "given a type expression in the form ': foo -> bar', this function will strip the ':', just a small cosmetic thing. It actually just strips any colon and following white space" (save-match-data (if (string-match ":[[:space:]]*" type) (replace-match "" nil nil type nil) type))) ; (strip-colon-from-type ": foo -> bar") (defun caml-show-completions (completions) (with-output-to-temp-buffer "*Completions*" (display-completion-list completions) 0)) (defun caml-show-unique-completion (completion) (if caml-always-show-completions-buf (caml-show-completions (list completion)) (tooltip-show completion))) (defun caml-perform-completion (unformatted-value completions) (save-match-data (if completions (if (> (length completions) 1) (caml-show-completions completions) (let* ((completion (car completions)) (value-name (if (listp completion) (car completion) completion)) (value-type (if (listp completion) (car (cdr completion)) nil))) (if unformatted-value (let* ((beg (length unformatted-value)) (end (length value-name)) (value-substr (substring value-name beg end))) (insert value-substr) (if value-type (caml-show-unique-completion (strip-colon value-type))) (length value-substr)) (progn (insert value-name) (if value-type (caml-show-unique-completion (strip-colon value-type))) (length value-name)))))))) (defun deref-module (x) (let* ((local (concat "let +module +" x " *= *\\([A-Z][A-Za-z_'0-9.]*\\) +in")) (global (concat "module +" x " *= *\\([A-Z][A-Za-z_'0-9.]*\\)"))) (cond ((re-search-backward local nil t) (deref-module-exp (match-string 1))) ((re-search-backward global nil t) (deref-module-exp (match-string 1))) (t x)))) (defun deref-module-exp (x) (mapconcat 'deref-module (split-string x "\\.") ".")) (defun caml-cmigrep-complete-qualified (parser search-type) (let* ((module-name (match-string 1)) (unformatted-value (match-string 2)) (value (caml-format-value-match unformatted-value)) (module-exp (save-excursion (save-match-data (deref-module-exp (caml-format-module-exp module-name)))))) (if (caml-search search-type value module-exp) (let ((completions (caml-extract-completions parser))) (caml-perform-completion unformatted-value completions)) (error "cmigrep failed")))) (defun caml-cmigrep-complete-unqualified (parser search-type) (let* ((unformatted-value (match-string 1)) (value (caml-format-value-match unformatted-value))) (if (caml-search search-type value) (caml-perform-completion unformatted-value (caml-extract-completions parser)) (error "cmigrep failed")))) (defconst qualified-record-field-lookup "[^a-zA-Z_'][a-z_][a-zA-Z0-9_']*\\.\\(\\(?:[A-Z][A-Za-z_'0-9]*\\.\\)+\\)\\([a-z_][a-zA-Z0-9_']*\\)?") (defconst qualified-value "[^a-zA-Z_'.]\\([A-Z][A-Za-z_'0-9.]*\\.\\)\\([a-z_][A-Za-z0-9_']*\\)?") (defconst qualified-constructor "[^a-zA-Z_'.]\\(\\(?:[A-Z][A-Za-z_'0-9]*\\.\\)+\\)\\([A-Z][A-Za-z_'0-9]*\\)") (defconst unqualified-record-field-lookup "[^a-zA-Z_'][a-z][A-Za-z0-9_']*\\.\\([a-z][A-Za-z0-9_']*\\)?") (defconst unqualified-value "^[^a-zA-Z_']\\([a-z][A-Za-z0-9_']*\\)") (defconst qualified-partial-module "[^a-zA-Z_']\\(\\(?:[A-Z][A-Za-z_'0-9]*\\.\\)+\\)\\([A-Z][A-Za-z_'0-9]*\\)?") (defconst unqualified-partial-module "[^a-zA-Z_']\\([A-Z][A-Za-z_'0-9]*\\)") (defun caml-cmigrep-complete () "complete OCaml based on context" (interactive) (let ((case-fold-search nil) ; make searches case sensitive. I HATE DYNAMIC SCOPE! chars-added) (save-excursion (save-match-data (or caml-default-dir (and (buffer-file-name) (setq caml-default-dir (file-name-directory (buffer-file-name))))) (setq chars-added (cond ((looking-back qualified-record-field-lookup (point-at-bol)) (caml-cmigrep-complete-qualified 'caml-extract-record-label search-type-record-label)) ((looking-back qualified-value (point-at-bol)) (caml-cmigrep-complete-qualified 'caml-extract-value-completion search-type-value)) ((looking-back unqualified-record-field-lookup (point-at-bol)) (caml-cmigrep-complete-unqualified 'caml-extract-record-label search-type-record-label)) ((looking-back unqualified-value (point-at-bol)) (caml-cmigrep-complete-unqualified 'caml-extract-value-completion search-type-value)) ((looking-back qualified-constructor (point-at-bol)) (caml-cmigrep-complete-qualified 'caml-extract-constructor-completion search-type-constructor)) (t (error "requested completion not implemented (yet)")))))) (if chars-added (forward-char chars-added)))) (defun not-empty-string (s) (if (equal s "") nil s)) (defun caml-complete-module () (let* (unformatted-value (module-exp (cond ((looking-back qualified-partial-module (point-at-bol)) (let ((containing-module (not-empty-string (match-string 1))) (partial-module (match-string 2))) (setq unformatted-value partial-module) (list (concat (caml-format-module-exp containing-module) "." partial-module "*")))) ((looking-back unqualified-partial-module (point-at-bol)) (let* ((partial-module (match-string 1)) (partial-module-exp (concat partial-module "*"))) (setq unformatted-value partial-module) (list partial-module-exp))) (t (list "*"))))) (if (apply 'caml-search (cons search-type-module module-exp)) (let ((completions (caml-extract-completions 'caml-extract-module-completion))) (caml-perform-completion unformatted-value completions)) (error "cmigrep failed")))) (defun caml-cmigrep-complete-module () "complete the partial module name before the point" (interactive) (let ((case-fold-search nil) ; make searches case sensitive. I HATE DYNAMIC SCOPE! chars-added) (save-excursion (save-match-data (or caml-default-dir (setq caml-default-dir (file-name-directory (buffer-file-name)))) (setq chars-added (caml-complete-module)))) (if chars-added (forward-char chars-added)))) cmigrep-1.5/_darcs/pristine/cmigrep.ml0000644000162400007670000005554310774552463020524 0ustar estokesocamlgroup(* A utility to gather information from caml compiled interface files Copyright (C) 2007 Eric Stokes This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) open Types exception Break module Pathset = Set.Make(struct type t = string let trailing_slash = Pcre.regexp "/\\s*$|\\\\\\s*$" let compare p1 p2 = let p1' = Pcre.replace ~rex:trailing_slash ~templ:"" p1 in let p2' = Pcre.replace ~rex:trailing_slash ~templ:"" p2 in String.compare p1' p2' end) (* the standard library should not be so deficient *) module List = struct include List let filter_map f l = List.fold_left (fun acc item -> match f item with | Some x -> x :: acc | None -> acc) [] l let find_map f l = let res = ref None in try List.iter (fun x -> match f x with | None -> () | Some y -> res := Some y; raise Break) l; raise Not_found with Break -> begin match !res with | Some y -> y | None -> raise Break end let map f l = let r = rev_map f l in rev r end module Unix = struct include Unix let fold_path ~f ~init path = let dir = Unix.opendir path in let acc = ref init in try while true do let file = Unix.readdir dir in acc := f file !acc done; !acc with | End_of_file -> Unix.closedir dir; !acc | exn -> Unix.closedir dir; raise exn end module Match = struct let comma = Pcre.regexp "\\s*,\\s*" end module Module_expression = struct type t = | Exact of string | Begins_with of string * Pcre.regexp | Ends_with of string * Pcre.regexp | Begins_and_ends of string * Pcre.regexp | Contains of string * Pcre.regexp | Any let to_string = function | Exact m -> m | Begins_with (s, _) | Ends_with (s, _) | Begins_and_ends (s, _) | Contains (s, _) -> s | Any -> "*" (* ModA,ModB,Foo*.Make *) let parse = let dot = Pcre.regexp "\\." in let capname = Pcre.regexp "^[A-Z][A-Za-z_'0-9]*$" in let starend = Pcre.regexp "^[A-Z][A-Za-z0-9_']*\\*$" in let starbegin = Pcre.regexp "^\\*[A-Za-z0-9_']+$" in let starboth = Pcre.regexp "^\\*[A-Za-z0-9_']+\\*$" in let starmiddle = Pcre.regexp "^([A-Z][A-Za-z0-9_']*)\\*([A-Za-z0-9_']+)$" in let star = Pcre.regexp "\\*" in fun exp -> List.map (fun token -> let token_no_star = Pcre.replace ~rex:star ~templ:"" token in if token = "*" then Any else if Pcre.pmatch ~rex:capname token then Exact token else if Pcre.pmatch ~rex:starboth token then Contains (token, Pcre.regexp ("^.*" ^ token_no_star ^ ".*$")) else if Pcre.pmatch ~rex:starmiddle token then begin match Pcre.extract ~rex:starmiddle token with | [|_whole; begins; ends |] -> let rex = Pcre.regexp (Printf.sprintf "^%s.*%s$" begins ends) in Begins_and_ends (token, rex) | _ -> failwith "invalid begins and ends with match" end else if Pcre.pmatch ~rex:starbegin token then Ends_with (token, Pcre.regexp (Printf.sprintf "%s$" token_no_star)) else if Pcre.pmatch ~rex:starend token then Begins_with (token, Pcre.regexp (Printf.sprintf "^%s" token_no_star)) else failwith "invalid module expression") (Pcre.split ~rex:dot exp) let is_exact t = List.for_all (function | Exact _ -> true | Begins_with _ | Ends_with _ | Begins_and_ends _ | Contains _ | Any -> false) t let parse_exact exp = let t = parse exp in if is_exact t then t else failwith "Module_expression.parse_exact: expression is not exact!" end type mode = | Find_type of Pcre.regexp | Find_constructor of Pcre.regexp | Find_polymorphic_variant of Pcre.regexp | Find_record_label of Pcre.regexp | Find_value of Pcre.regexp | Find_exception of Pcre.regexp | Find_module | Find_class of Pcre.regexp | Find_all of Pcre.regexp type module_tree = | Leaf of string * signature | Node of string * signature * module_tree list type args = { mode: mode; path: Pathset.t; context: Module_expression.t list list; (* open modules *) modname: Module_expression.t list list; } let parse_args () = let module Parse = struct open Arg let mode = ref None let path = ref (Pathset.add "." (Pathset.singleton Config.standard_library)) let context = ref ["Pervasives"] let modname = ref [] let set_mode m = match !mode with | None -> mode := Some m; | Some _ -> raise (Invalid_argument "the mode is already set") let add_packages p = Findlib.init (); let packages = Pcre.split ~rex:Match.comma p in List.iter (fun package -> try let dir = Findlib.package_directory package in path := Pathset.add dir !path with exn -> Printf.eprintf "warning, error finding package dir: %s\n" (Printexc.to_string exn)) packages let add_opens s = context := Pcre.split ~rex:Match.comma s let args = Arg.align [("-t", String (fun s -> set_mode (Find_type (Pcre.regexp s))), " (regexp) print types with matching names"); ("-r", String (fun s -> set_mode (Find_record_label (Pcre.regexp s))), " (regexp) print record field labels with matching names"); ("-c", String (fun s -> set_mode (Find_constructor (Pcre.regexp s))), " (regexp) print constructors with matching names"); ("-p", String (fun s -> set_mode (Find_polymorphic_variant (Pcre.regexp s))), " (regexp) print polymorphic variants with matching names"); ("-m", Unit (fun () -> set_mode Find_module), " (regexp) print all matching module names in the path"); ("-v", String (fun s -> set_mode (Find_value (Pcre.regexp s))), " (regexp) print values with matching names"); ("-e", String (fun s -> set_mode (Find_exception (Pcre.regexp s))), " (regexp) print exceptions with matching constructors"); ("-o", String (fun s -> set_mode (Find_class (Pcre.regexp s))), " (regexp) print all classes with matching names"); ("-a", String (fun s -> set_mode (Find_all (Pcre.regexp s))), " (regexp) print all names which match the given expression"); ("-I", String (fun s -> path := Pathset.add s !path), " (directory) add additional directory to the search path"); ("-package", String (fun s -> add_packages s), " (packages) comma seperated list of findlib packages to search"); ("-open", String (fun s -> add_opens s), " (modules) comma seperated list of open modules (in order!)")] let usage = Printf.sprintf ("%s: \n" ^^ "extract information from caml compiled interface files\n" ^^ " can be an exact module name, " ^^ " or a shell wildcard. Multiple modules can be specified " ^^ "E.G. \"ModA ModB Foo*.Make\" means to search ModA, ModB, and " ^^ "any submodule Make of a module that starts with Foo.") Sys.argv.(0) let parse () = Arg.parse args (fun anon -> modname := (Module_expression.parse anon) :: !modname) usage let error msg = prerr_endline msg; Arg.usage args usage; exit 1 end in Parse.parse (); let mode = match !Parse.mode with | Some m -> m | None -> Parse.error "you must specify a search mode" in {mode = mode; path = if Pathset.is_empty !Parse.path then Parse.error "you must specify a search path" else !Parse.path; context = List.map Module_expression.parse_exact !Parse.context; modname = (match !Parse.modname with | [] -> if !Parse.context = [] then Parse.error "you must specify a module expression, or a list of open modules" else [] | name -> name)} let match_ident exp id = Pcre.pmatch ~rex:exp (Ident.name id) let whsp = Pcre.regexp ~study:true "\\s+|$" let print_type print_path path s exp = List.iter (function | Tsig_type (id, type_decl, rec_status) -> if match_ident exp id then begin Printtyp.type_declaration id Format.std_formatter type_decl; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () end | _ -> ()) s let print_constructor print_path path s exp = let type_expr_to_string exp = Printtyp.type_expr Format.str_formatter exp; Format.flush_str_formatter (); in List.iter (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_variant (constructors, _private) -> List.iter (fun (name, type_exprs) -> if Pcre.pmatch ~rex:exp name then begin Format.print_string name; if type_exprs <> [] then begin Format.print_string " of "; Format.print_string (String.concat " * " (List.map (fun e -> type_expr_to_string e) type_exprs)) end; Format.print_string " (* "; if print_path then Format.print_string (path ^ "."); Format.print_string (Ident.name id); Format.print_string " *)"; Format.print_newline () end) constructors | _ -> () end | _ -> ()) s let print_polymorphic_variant print_path path s expr = let print_if_polymorphic_variant id type_decl = begin match type_decl.type_manifest with | None -> () | Some {desc = type_descr} -> begin match type_descr with | Tvariant variant_descr -> List.iter (fun (name, param) -> let src_name = "`" ^ name in if Pcre.pmatch ~rex:expr src_name then begin Format.print_string src_name; begin match param with | Rpresent None -> () | Rabsent -> () | Reither _ -> () (* this can't happen in a type *) | Rpresent (Some type_expr) -> Format.print_string " of "; Printtyp.type_expr Format.str_formatter type_expr; let s = Pcre.replace ~rex:whsp ~templ:" " (Format.flush_str_formatter ()) in Format.print_string s; end; Format.print_string (Printf.sprintf " (* %s%s *)" (if print_path then (path ^ ".") else "") (Ident.name id)); Format.print_newline () end) variant_descr.row_fields | _ -> () end end in List.iter (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_abstract -> print_if_polymorphic_variant id type_decl | _ -> () end | _ -> ()) s let print_record_label print_path path s exp = List.iter (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_record (labels, _, _) -> List.iter (fun (name, mutable_flag, type_expr) -> if Pcre.pmatch ~rex:exp name then begin begin match mutable_flag with | Asttypes.Mutable -> Format.print_string "mutable " | Asttypes.Immutable -> () end; Format.print_string name; Format.print_string ": "; Printtyp.type_expr Format.std_formatter type_expr; Format.print_string " (* "; if print_path then Format.print_string (path ^ "."); Format.print_string (Ident.name id); Format.print_string " *)"; Format.print_newline () end) labels | _ -> () end | _ -> ()) s let print_value print_path path s exp = List.iter (function | Tsig_value (id, desc) -> if match_ident exp id then begin Printtyp.value_description id Format.str_formatter desc; let s = Pcre.replace ~rex:whsp ~templ:" " (Format.flush_str_formatter ()) in if print_path then print_endline (s ^ (Printf.sprintf " (* %s *)" path)) else print_endline s end | _ -> ()) s let print_class print_path path s exp = List.iter (function | Tsig_class (id, cd, _) when match_ident exp id -> Printtyp.class_declaration id Format.std_formatter cd; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () | Tsig_cltype (id, ct, _) when match_ident exp id -> Printtyp.cltype_declaration id Format.std_formatter ct; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () | _ -> ()) s let print_all print_path path s exp = let new_s = List.filter (function | Tsig_value (id, _) | Tsig_type (id, _, _) | Tsig_exception (id, _) | Tsig_module (id, _, _) | Tsig_modtype (id, _) | Tsig_class (id, _, _) | Tsig_cltype (id, _, _) -> match_ident exp id) s in Printtyp.signature Format.std_formatter new_s; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () let print_exception print_path path s exp = List.iter (function | Tsig_exception (id, exn) -> if match_ident exp id then begin Printtyp.exception_declaration id Format.std_formatter exn; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () end | _ -> ()) s let warn_env_error e = Env.report_error Format.str_formatter e; let e = Format.flush_str_formatter () in Printf.eprintf "%s\n%!" e let match_mod_expr expr mod_name = let module E = Module_expression in match expr with | E.Exact name -> mod_name = name | E.Begins_with (_, rex) | E.Ends_with (_, rex) | E.Begins_and_ends (_, rex) | E.Contains (_, rex) -> Pcre.pmatch ~rex mod_name | E.Any -> true let cmi_file = Pcre.regexp "\\.cmi$" let modname_of_cmi f = String.capitalize (Pcre.replace ~templ:"" ~rex:cmi_file f) let cmi_of_modname n = (String.lowercase n) ^ ".cmi" let cmi_files args mod_expr = let module E = Module_expression in match mod_expr with | E.Exact mod_name -> let cmi_name = cmi_of_modname mod_name in Pathset.fold (fun path acc -> if Sys.file_exists (Filename.concat path cmi_name) then (mod_name, Filename.concat path cmi_name) :: acc else acc) args.path [] | _ -> Pathset.fold (fun path cmi_files -> Unix.fold_path ~f:(fun file cmi_files -> if Pcre.pmatch ~rex:cmi_file file then begin let mod_name = modname_of_cmi file in if match_mod_expr mod_expr mod_name then (mod_name, Filename.concat path file) :: cmi_files else cmi_files end else cmi_files) ~init:cmi_files path) args.path [] let rec matching_submods mod_expr s = match s with | Tsig_module (id, mt, _) :: tl when match_mod_expr mod_expr (Ident.name id) -> begin match mt with | Tmty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl | Tmty_functor (_, mt, _) -> begin match mt with | Tmty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl | _ -> matching_submods mod_expr tl end | Tmty_ident _ -> matching_submods mod_expr tl end | _ :: tl -> matching_submods mod_expr tl | [] -> [] let rec build_module_tree name root mod_expr = match mod_expr with | [] -> Leaf (name, root) | mod_expr :: tl -> begin match matching_submods mod_expr root with | [] -> Leaf (name, root) | mods -> let children = List.map (fun (name, sg) -> build_module_tree name sg tl) mods in Node (name, root, children) end let rec extract_nodes depth path modtree = let concatpath path name = if path = "" then name else (path ^ "." ^ name) in match modtree with | Leaf (name, sg) -> [(concatpath path name, depth, sg)] | Node (name, sg, children) -> (concatpath path name, depth, sg) :: (List.flatten (List.map (fun submod -> extract_nodes (depth + 1) (concatpath path name) submod) children)) let print_requested_stuff print_path name s args = match args.mode with | Find_type e -> print_type print_path name s e | Find_constructor e -> print_constructor print_path name s e | Find_polymorphic_variant e -> print_polymorphic_variant print_path name s e | Find_record_label e -> print_record_label print_path name s e | Find_value e -> print_value print_path name s e | Find_exception e -> print_exception print_path name s e | Find_class e -> print_class print_path name s e | Find_all e -> print_all print_path name s e | Find_module -> Format.print_string name; Format.print_newline () let read_cmi_file filename = let ic = open_in_bin filename in try let buffer = String.create (String.length Config.cmi_magic_number) in really_input ic buffer 0 (String.length Config.cmi_magic_number); if buffer <> Config.cmi_magic_number then begin close_in ic; failwith (Printf.sprintf "not an interface: %s" filename) end; let (name, sg) = input_value ic in close_in ic; sg with exn -> close_in ic; failwith (Printf.sprintf "bad cmi file: %s, error: %s" filename (Printexc.to_string exn)) let module_exists args mod_exp = let expr_len = List.length mod_exp in let mod_name = List.hd mod_exp in let submods = List.tl mod_exp in match cmi_files args mod_name with | [] -> false | cmi_files -> List.exists (fun (name, cmi_file) -> let s = read_cmi_file cmi_file in let sgs = List.filter (fun (_, depth, _) -> depth = expr_len) (extract_nodes 1 "" (build_module_tree name s submods)) in List.length sgs > 0) cmi_files let gen_qualified args context = let context = Array.of_list context in for i = 0 to Array.length context - 1 do try for j = i downto 0 do let maybe_parent = context.(j) in let child = context.(i) in let qualified = maybe_parent @ child in if module_exists args qualified then begin context.(i) <- qualified; raise Break end done with Break -> () done; Array.to_list context let () = let args = parse_args () in let qualified_context = gen_qualified args args.context in let mod_exprs = (* combine the list of fully qualified open modules with the module expressions that the user has specified following the compiler's rules about module opens for exact expressions, and combining everything for non exact expressions. *) match args.modname with | [] -> qualified_context | exps -> List.flatten (List.map (fun exp -> if Module_expression.is_exact exp then [try List.find_map (fun qual -> let exp' = qual @ exp in if module_exists args exp' then Some exp' else None) (List.rev qualified_context) (* look from the bottom up *) with Not_found -> exp] else exp :: (List.rev_map (fun qual -> qual @ exp) qualified_context)) exps) in List.iter (fun mod_expr -> try let expr_len = List.length mod_expr in let mod_name = List.hd mod_expr in let submods = List.tl mod_expr in let cmi_files = cmi_files args mod_name in List.iter (fun (name, cmi_file) -> let s = read_cmi_file cmi_file in let sgs = List.filter (fun (_, depth, _) -> depth = expr_len) (extract_nodes 1 "" (build_module_tree name s submods)) in let print_path = List.length sgs > 1 || List.length cmi_files > 1 || List.length args.modname > 1 in List.iter (fun (name, _, sg) -> print_requested_stuff print_path name sg args) sgs) cmi_files with exn -> Printf.eprintf "failed to operate on: \"%s\", %s\n%!" (String.concat " " (List.map Module_expression.to_string mod_expr)) (Printexc.to_string exn)) mod_exprs cmigrep-1.5/_darcs/pristine/COPYING0000644000162400007670000000151710774552463017567 0ustar estokesocamlgroupCopyright (C) 2004 Eric Stokes This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA cmigrep-1.5/_darcs/pristine/GPL0000644000162400007670000004310310774552463017076 0ustar estokesocamlgroup GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. cmigrep-1.5/_darcs/pristine/Makefile0000644000162400007670000000300110774552463020162 0ustar estokesocamlgroupSOURCES=misc.cmx tbl.cmx config.cmx clflags.cmx terminfo.cmx ccomp.cmx \ warnings.cmx consistbl.cmx linenum.cmx location.cmx longident.cmx \ syntaxerr.cmx parser.cmx lexer.cmx parse.cmx printast.cmx \ unused_var.cmx ident.cmx path.cmx primitive.cmx types.cmx btype.cmx \ oprint.cmx subst.cmx predef.cmx datarepr.cmx env.cmx typedtree.cmx \ ctype.cmx printtyp.cmx includeclass.cmx mtype.cmx includecore.cmx \ includemod.cmx parmatch.cmx typetexp.cmx stypes.cmx typecore.cmx \ typedecl.cmx typeclass.cmx typemod.cmx cmigrep.ml BYTESOURCES=misc.cmo tbl.cmo config.cmo clflags.cmo terminfo.cmo \ ccomp.cmo warnings.cmo consistbl.cmo linenum.cmo location.cmo \ longident.cmo syntaxerr.cmo parser.cmo lexer.cmo parse.cmo \ printast.cmo unused_var.cmo ident.cmo path.cmo primitive.cmo types.cmo \ btype.cmo oprint.cmo subst.cmo predef.cmo datarepr.cmo env.cmo \ typedtree.cmo ctype.cmo printtyp.cmo includeclass.cmo mtype.cmo \ includecore.cmo includemod.cmo parmatch.cmo typetexp.cmo stypes.cmo \ typecore.cmo typedecl.cmo typeclass.cmo typemod.cmo cmigrep.ml GODI_CONF=$(shell godi_confdir) GODI_BASE=$(shell cat $(GODI_CONF)/godi.conf | grep ^LOCALBASE | sed -e 's/LOCALBASE *= *//') GODI_LIB=$(GODI_BASE)/lib/ocaml/compiler-lib all: ocamlfind ocamlopt -o cmigrep -I $(GODI_LIB) \ -package pcre,findlib,unix -linkpkg $(SOURCES) byte: ocamlfind ocamlc -o cmigrep -I $(GODI_LIB) \ -package pcre,findlib,unix -linkpkg $(BYTESOURCES) install: cp cmigrep $(GODI_BASE)/bin clean: @rm -f *.o *.cmo *.cmi *.cma *.cmx *.cmi cmigrep cmigrep-1.5/_darcs/pristine/README0000644000162400007670000001515510774552463017417 0ustar estokesocamlgroupGODI Recomended To build, type make. If it doesn't work, you probably aren't using godi. You'll have to edit the make file to tell it where your compiler sources are, as well as possibly rewrite the very simple build rule to not use findlib. A short description of features, cmigrep: cmigrep has two modes, the first and most common is that of searching for various types of objects inside a module. Objects that you can search for include switch purpose -t (regexp) print types with matching names -r (regexp) print record field labels with matching names -c (regexp) print constructors with matching names -p (regexp) print polymorphic variants with matching names -e (regexp) print exceptions with matching constructors -v (regexp) print values with matching names -o (regexp) print all classes with matching names -a (regexp) print all names which match the given expression These are all very useful for finding specific things inside a given module. Here are a few examples, find some constructors in the unix module itsg106:~ eric$ cmigrep -c SO_ Unix SO_DEBUG (* socket_bool_option *) SO_BROADCAST (* socket_bool_option *) SO_REUSEADDR (* socket_bool_option *) SO_KEEPALIVE (* socket_bool_option *) SO_DONTROUTE (* socket_bool_option *) SO_OOBINLINE (* socket_bool_option *) SO_ACCEPTCONN (* socket_bool_option *) SO_SNDBUF (* socket_int_option *) SO_RCVBUF (* socket_int_option *) SO_ERROR (* socket_int_option *) SO_TYPE (* socket_int_option *) SO_RCVLOWAT (* socket_int_option *) SO_SNDLOWAT (* socket_int_option *) SO_LINGER (* socket_optint_option *) SO_RCVTIMEO (* socket_float_option *) SO_SNDTIMEO (* socket_float_option *) find the same constructors, but this time anywhere itsg106:~/cmigrep-1.1 eric$ ./cmigrep -c SO_ \* SO_DEBUG (* UnixLabels.socket_bool_option *) SO_BROADCAST (* UnixLabels.socket_bool_option *) SO_REUSEADDR (* UnixLabels.socket_bool_option *) SO_KEEPALIVE (* UnixLabels.socket_bool_option *) SO_DONTROUTE (* UnixLabels.socket_bool_option *) SO_OOBINLINE (* UnixLabels.socket_bool_option *) SO_ACCEPTCONN (* UnixLabels.socket_bool_option *) SO_SNDBUF (* UnixLabels.socket_int_option *) SO_RCVBUF (* UnixLabels.socket_int_option *) SO_ERROR (* UnixLabels.socket_int_option *) SO_TYPE (* UnixLabels.socket_int_option *) SO_RCVLOWAT (* UnixLabels.socket_int_option *) SO_SNDLOWAT (* UnixLabels.socket_int_option *) SO_LINGER (* UnixLabels.socket_optint_option *) SO_RCVTIMEO (* UnixLabels.socket_float_option *) SO_SNDTIMEO (* UnixLabels.socket_float_option *) SO_DEBUG (* Unix.socket_bool_option *) SO_BROADCAST (* Unix.socket_bool_option *) SO_REUSEADDR (* Unix.socket_bool_option *) SO_KEEPALIVE (* Unix.socket_bool_option *) SO_DONTROUTE (* Unix.socket_bool_option *) SO_OOBINLINE (* Unix.socket_bool_option *) SO_ACCEPTCONN (* Unix.socket_bool_option *) SO_SNDBUF (* Unix.socket_int_option *) SO_RCVBUF (* Unix.socket_int_option *) SO_ERROR (* Unix.socket_int_option *) SO_TYPE (* Unix.socket_int_option *) SO_RCVLOWAT (* Unix.socket_int_option *) SO_SNDLOWAT (* Unix.socket_int_option *) SO_LINGER (* Unix.socket_optint_option *) SO_RCVTIMEO (* Unix.socket_float_option *) SO_SNDTIMEO (* Unix.socket_float_option *) It seems they only exist in the unix module. By default cmigrep searches the current directory, and the standard library. You can of course tell it to search elsewhere. full types get printed in the case that the constructors have arguments. Notice that adding to the include path is modeled after the compiler. Findlib is also supported. itsg106:~ eric$ cmigrep -c "^Tsig_.*" -I /opt/godi/lib/ocaml/compiler-lib Types Tsig_value of Ident.t * value_description (* signature_item *) Tsig_type of Ident.t * type_declaration * rec_status (* signature_item *) Tsig_exception of Ident.t * exception_declaration (* signature_item *) Tsig_module of Ident.t * module_type * rec_status (* signature_item *) Tsig_modtype of Ident.t * modtype_declaration (* signature_item *) Tsig_class of Ident.t * class_declaration * rec_status (* signature_item *) Tsig_cltype of Ident.t * cltype_declaration * rec_status (* signature_item *) record field labels itsg106:~ eric$ cmigrep -r "^st_" Unix st_dev: int (* stats *) st_ino: int (* stats *) st_kind: file_kind (* stats *) st_perm: file_perm (* stats *) st_nlink: int (* stats *) st_uid: int (* stats *) st_gid: int (* stats *) st_rdev: int (* stats *) st_size: int (* stats *) st_atime: float (* stats *) st_mtime: float (* stats *) st_ctime: float (* stats *) findlib support, matching value names itsg106:~ eric$ cmigrep -package pcre -v for Pcre val foreach_line : ?ic:in_channel -> (string -> unit) -> unit val foreach_file : string list -> (string -> in_channel -> unit) -> unit nested modules itsg106:~ eric$ cmigrep -v ".*" Unix.LargeFile val lseek : file_descr -> int64 -> seek_command -> int64 val truncate : string -> int64 -> unit val ftruncate : file_descr -> int64 -> unit val stat : string -> stats val lstat : string -> stats val fstat : file_descr -> stats types itsg106:~ eric$ cmigrep -t ".*" Unix.LargeFile type stats = { st_dev : int; st_ino : int; st_kind : file_kind; st_perm : file_perm; st_nlink : int; st_uid : int; st_gid : int; st_rdev : int; st_size : int64; st_atime : float; st_mtime : float; st_ctime : float; } everything! itsg106:~ eric$ cmigrep -a ".*" Unix.LargeFile val lseek : file_descr -> int64 -> seek_command -> int64 val truncate : string -> int64 -> unit val ftruncate : file_descr -> int64 -> unit type stats = { st_dev : int; st_ino : int; st_kind : file_kind; st_perm : file_perm; st_nlink : int; st_uid : int; st_gid : int; st_rdev : int; st_size : int64; st_atime : float; st_mtime : float; st_ctime : float; } val stat : string -> stats val lstat : string -> stats val fstat : file_descr -> stats exception declarations itsg106:~/cmigrep eric$ ./cmigrep -e ".*" Unix exception Unix_error of error * string * string toplevel modules starting with Net itsg106:~/cmigrep-1.1 eric$ ./cmigrep -m -package netstring Net* Neturl Netulex Netstring_top Netstring_str Netstring_pcre Netstring_mt Netstream Netsendmail Netmime Netmappings_other Netmappings_min Netmappings_jp Netmappings_iso Netmappings Nethttp Nethtml_scanner Nethtml Netencoding Netdb Netdate Netconversion Netchannels Netbuffer Netaux Netaddress Netaccel_link Netaccel sub modules one level deep of modules starting with Net itsg106:~/cmigrep-1.1 eric$ ./cmigrep -m -package netstring Net*.* Netulex.ULB Netulex.Ulexing Nethttp.Header Netencoding.Base64 Netencoding.QuotedPrintable Netencoding.Q Netencoding.Url Netencoding.Html Netaux.KMP Netaux.ArrayAux cmigrep-1.5/cmigrep.el0000644000162400007670000004152110774553255015413 0ustar estokesocamlgroup; pop up the tooltip under the text ; partially complete as much as possible (if (string-match "XEmacs" emacs-version) (defun replace-regexp-in-string (regexp newtext string) (replace-in-string string regexp newtext))) (unless (fboundp 'looking-back) ; Exists in Emacs 22 (defun looking-back (regexp &optional limit greedy) ; Copied from Emacs 22 "Return non-nil if text before point matches regular expression REGEXP. Like `looking-at' except matches before point, and is slower. LIMIT if non-nil speeds up the search by specifying a minimum starting position, to avoid checking matches that would start before LIMIT. If GREEDY is non-nil, extend the match backwards as far as possible, stopping when a single additional previous character cannot be part of a match for REGEXP." (let ((start (point)) (pos (save-excursion (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t) (point))))) (if (and greedy pos) (save-restriction (narrow-to-region (point-min) start) (while (and (> pos (point-min)) (save-excursion (goto-char pos) (backward-char 1) (looking-at (concat "\\(?:" regexp "\\)\\'")))) (setq pos (1- pos))) (save-excursion (goto-char pos) (looking-at (concat "\\(?:" regexp "\\)\\'"))))) (not (null pos))))) (unless (fboundp 'tooltip-show) (defun tooltip-show (tip) (print tip))) (unless (fboundp 'line-number-at-pos) ; Exists in Emacs 22. (defun line-number-at-pos (&optional pos) "Buffer line number at position POS. Current line number if POS is nil. Counting starts at (point-min), so any narrowing restriction applies." (1+ (count-lines (point-min) (save-excursion (when pos (goto-char pos)) (forward-line 0) (point)))))) (defun fold (f x li) "Recursively applies (f x i) where i is the ith element in the list li. For example, (fold f x '(1 2)) returns (f (f x 1) 2)" (let ((li2 li) (ele) (x2 x)) (while (setq ele (pop li2)) (setq x2 (funcall f x2 ele))) x2)) (defun filter (g li) (fold (lambda (acc x) (if (funcall g x) (cons x acc) acc)) nil li)) (defun caml-format-packages (packages) (mapconcat 'identity packages ",")) ;(caml-format-packages '("pcre" "netstring" "ocamldap")) (defun caml-format-paths (paths) (fold '(lambda (acc p) (cons "-I" (cons p acc))) () paths)) ;(caml-format-paths '("/home/eric" "/opt/godi/lib/ocaml/pkg-lib/pcre" "foo")) ; state and configuration variables (defvar caml-completion-buf "*caml-cmigrep*") (defvar caml-packages nil) (defvar caml-includes nil) (defvar caml-default-dir nil) (defvar caml-always-show-completions-buf t) (make-variable-buffer-local 'caml-default-dir) (set-default 'caml-default-dir nil) (defconst search-type-value "-v") (defconst search-type-record-label "-r") (defconst search-type-module "-m") (defconst search-type-constructor "-c") (defconst search-type-variant "-p") (defun caml-clear-completion-buf () (save-excursion (set-buffer caml-completion-buf) (delete-region (point-min) (point-max)))) (defun strip-props (s) (set-text-properties 0 (length s) nil s) s) (defun open-modules () "parse the file to determine the list of modules open, and return the list unqualified" (save-excursion (save-match-data (goto-char (point-min)) (let ((modules "")) (while (re-search-forward "open +\\([A-Z][a-zA-Z0-9'._]*\\)" nil t) (if (equal modules "") (setq modules (strip-props (match-string 1))) (setq modules (concat modules "," (strip-props (match-string 1)))))) modules)))) (defun caml-search (search-type value &rest module-exps) "search for a value starting with [value] in [module-exp], in the directories specified by [packages] and [includes] and with the current working directory of cmigrep set to [dir]. placing the results in the *caml-cmigrep* buffer" (let ((process-connection-type nil) ; Use a pipe for communication (default-directory (if caml-default-dir caml-default-dir default-directory)) ; Set CWD of cmigrep to dir (args (if value (append (list search-type value) module-exps) (cons search-type module-exps))) (open (open-modules))) (and caml-packages (let ((packages (caml-format-packages caml-packages))) (push packages args) (push "-package" args))) (and caml-includes (let ((includes (caml-format-paths caml-includes))) (setq args (append includes args)))) (and (not (equal open "")) (progn (push open args) (push "-open" args))) (and (get-buffer caml-completion-buf) (caml-clear-completion-buf)) (apply 'call-process (append (list "cmigrep" nil caml-completion-buf nil) args)))) (defun condense-spaces (s) "condense long strings of white space into a single space" (replace-regexp-in-string "[[:space:]]+" " " s)) (defun strip (s) (replace-regexp-in-string "[[:space:]]+$" "" (replace-regexp-in-string "^[[:space:]]+" "" s))) (defun extract-value-name () (save-match-data (if (re-search-forward "[a-z]") (let ((start (progn (backward-char) (point)))) (if (re-search-forward ":") (progn (backward-char) (strip (buffer-substring start (point))))))))) (defun extract-value-type () (interactive) (save-match-data (let ((start (point))) (if (re-search-forward "=\\|(\\*" (point-at-eol) t) (progn (backward-char 2) (strip (buffer-substring start (point)))) (progn (goto-char (point-at-eol)) (strip (buffer-substring start (point)))))))) (defun extract-value-module () (save-match-data (let ((start (point))) (if (search-forward "(*" (point-at-eol) t) (if (re-search-forward "[[:space:]]*\\([A-Za-z0-9_'.]*\\)" (point-at-eol) t) (match-string 1) (error "invalid module comment")) nil)))) (defun caml-parse-value-completion () (save-match-data (if (re-search-forward "val\\|external") (let* ((value-name (extract-value-name)) (value-type (extract-value-type)) (value-module (extract-value-module))) (if value-module (list value-name (condense-spaces (concat value-type " from " value-module))) (list value-name value-type))) (error "invalid value completion")))) (defun caml-extract-value-completion (line) (set-buffer caml-completion-buf) (goto-line line) ; goto the line that our completion is on (beginning-of-line) ; goto the beginning (caml-parse-value-completion)) (defun caml-extract-module-completion (line) (save-match-data (set-buffer caml-completion-buf) (goto-line line) (beginning-of-line) (if (looking-at "\\([A-Z][a-zA-Z0-9._']*\\)") (match-string 1) (error "cannot read completion")))) (defun caml-parse-record-label () (or (search-forward "mutable" (point-at-eol) t) ; skip the "mutable" keyword (goto-char (point-at-bol))) (let* ((field-name (extract-value-name)) (field-type (extract-value-type)) (field-module (extract-value-module))) (if field-module (list field-name (condense-spaces (concat field-type " from " field-module))) (list field-name field-type)))) (defun caml-extract-record-label (line) (set-buffer caml-completion-buf) (goto-line line) (beginning-of-line) (caml-parse-record-label)) (defun extract-constructor-name () (save-match-data (let ((start (point))) (if (search-forward " of " (point-at-eol) t) (progn (backward-char 4) (strip (buffer-substring start (point)))) (progn (goto-char (point-at-bol)) (if (search-forward "(*" (point-at-eol) t) (progn (backward-char 2) (strip (buffer-substring start (point)))) (progn (goto-char (point-at-eol)) (strip (buffer-substring start (point)))))))))) (defun caml-extract-constructor-completion (line) (set-buffer caml-completion-buf) (goto-line line) (beginning-of-line) (let* ((constructor-name (extract-constructor-name)) (constructor-type (extract-value-type)) (constructor-module (extract-value-module)) (hint constructor-type)) (and constructor-module (setq hint (concat hint " from " constructor-module))) (list constructor-name hint))) ; (caml-extract-value-completion 1) (defun caml-extract-completions (completion-parser) (save-match-data (save-excursion (set-buffer caml-completion-buf) (goto-char (point-min)) (let ((beg (line-number-at-pos (point-min))) (end (line-number-at-pos (point-max))) completions) (while (> end (line-number-at-pos (point))) (let ((completion (funcall completion-parser (line-number-at-pos (point))))) (setq completions (cons completion completions)) (forward-line))) completions)))) (defun caml-format-value-match (value) (if value (concat "^" value ".*") ".*")) (defun caml-format-module-exp (module-match) (if module-match (substring module-match 0 (- (length module-match) 1)) (error "no module matched"))) ; (caml-format-module-exp "Unix.LargeFile.") (defun strip-colon (type) "given a type expression in the form ': foo -> bar', this function will strip the ':', just a small cosmetic thing. It actually just strips any colon and following white space" (save-match-data (if (string-match ":[[:space:]]*" type) (replace-match "" nil nil type nil) type))) ; (strip-colon-from-type ": foo -> bar") (defun caml-show-completions (completions) (with-output-to-temp-buffer "*Completions*" (display-completion-list completions) 0)) (defun caml-show-unique-completion (completion) (if caml-always-show-completions-buf (caml-show-completions (list completion)) (tooltip-show completion))) (defun caml-perform-completion (unformatted-value completions) (save-match-data (if completions (if (> (length completions) 1) (caml-show-completions completions) (let* ((completion (car completions)) (value-name (if (listp completion) (car completion) completion)) (value-type (if (listp completion) (car (cdr completion)) nil))) (if unformatted-value (let* ((beg (length unformatted-value)) (end (length value-name)) (value-substr (substring value-name beg end))) (insert value-substr) (if value-type (caml-show-unique-completion (strip-colon value-type))) (length value-substr)) (progn (insert value-name) (if value-type (caml-show-unique-completion (strip-colon value-type))) (length value-name)))))))) (defun deref-module (x) (let* ((local (concat "let +module +" x " *= *\\([A-Z][A-Za-z_'0-9.]*\\) +in")) (global (concat "module +" x " *= *\\([A-Z][A-Za-z_'0-9.]*\\)"))) (cond ((re-search-backward local nil t) (deref-module-exp (match-string 1))) ((re-search-backward global nil t) (deref-module-exp (match-string 1))) (t x)))) (defun deref-module-exp (x) (mapconcat 'deref-module (split-string x "\\.") ".")) (defun caml-cmigrep-complete-qualified (parser search-type) (let* ((module-name (match-string 1)) (unformatted-value (match-string 2)) (value (caml-format-value-match unformatted-value)) (module-exp (save-excursion (save-match-data (deref-module-exp (caml-format-module-exp module-name)))))) (if (caml-search search-type value module-exp) (let ((completions (caml-extract-completions parser))) (caml-perform-completion unformatted-value completions)) (error "cmigrep failed")))) (defun caml-cmigrep-complete-unqualified (parser search-type) (let* ((unformatted-value (match-string 1)) (value (caml-format-value-match unformatted-value))) (if (caml-search search-type value) (caml-perform-completion unformatted-value (caml-extract-completions parser)) (error "cmigrep failed")))) (defconst qualified-record-field-lookup "[^a-zA-Z_'][a-z_][a-zA-Z0-9_']*\\.\\(\\(?:[A-Z][A-Za-z_'0-9]*\\.\\)+\\)\\([a-z_][a-zA-Z0-9_']*\\)?") (defconst qualified-value "[^a-zA-Z_'.]\\([A-Z][A-Za-z_'0-9.]*\\.\\)\\([a-z_][A-Za-z0-9_']*\\)?") (defconst qualified-constructor "[^a-zA-Z_'.]\\(\\(?:[A-Z][A-Za-z_'0-9]*\\.\\)+\\)\\([A-Z][A-Za-z_'0-9]*\\)") (defconst unqualified-record-field-lookup "[^a-zA-Z_'][a-z][A-Za-z0-9_']*\\.\\([a-z][A-Za-z0-9_']*\\)?") (defconst unqualified-value "^[^a-zA-Z_']\\([a-z][A-Za-z0-9_']*\\)") (defconst qualified-partial-module "[^a-zA-Z_']\\(\\(?:[A-Z][A-Za-z_'0-9]*\\.\\)+\\)\\([A-Z][A-Za-z_'0-9]*\\)?") (defconst unqualified-partial-module "[^a-zA-Z_']\\([A-Z][A-Za-z_'0-9]*\\)") (defun caml-cmigrep-complete () "complete OCaml based on context" (interactive) (let ((case-fold-search nil) ; make searches case sensitive. I HATE DYNAMIC SCOPE! chars-added) (save-excursion (save-match-data (or caml-default-dir (and (buffer-file-name) (setq caml-default-dir (file-name-directory (buffer-file-name))))) (setq chars-added (cond ((looking-back qualified-record-field-lookup (point-at-bol)) (caml-cmigrep-complete-qualified 'caml-extract-record-label search-type-record-label)) ((looking-back qualified-value (point-at-bol)) (caml-cmigrep-complete-qualified 'caml-extract-value-completion search-type-value)) ((looking-back unqualified-record-field-lookup (point-at-bol)) (caml-cmigrep-complete-unqualified 'caml-extract-record-label search-type-record-label)) ((looking-back unqualified-value (point-at-bol)) (caml-cmigrep-complete-unqualified 'caml-extract-value-completion search-type-value)) ((looking-back qualified-constructor (point-at-bol)) (caml-cmigrep-complete-qualified 'caml-extract-constructor-completion search-type-constructor)) (t (error "requested completion not implemented (yet)")))))) (if chars-added (forward-char chars-added)))) (defun not-empty-string (s) (if (equal s "") nil s)) (defun caml-complete-module () (let* (unformatted-value (module-exp (cond ((looking-back qualified-partial-module (point-at-bol)) (let ((containing-module (not-empty-string (match-string 1))) (partial-module (match-string 2))) (setq unformatted-value partial-module) (list (concat (caml-format-module-exp containing-module) "." partial-module "*")))) ((looking-back unqualified-partial-module (point-at-bol)) (let* ((partial-module (match-string 1)) (partial-module-exp (concat partial-module "*"))) (setq unformatted-value partial-module) (list partial-module-exp))) (t (list "*"))))) (if (apply 'caml-search (cons search-type-module module-exp)) (let ((completions (caml-extract-completions 'caml-extract-module-completion))) (caml-perform-completion unformatted-value completions)) (error "cmigrep failed")))) (defun caml-cmigrep-complete-module () "complete the partial module name before the point" (interactive) (let ((case-fold-search nil) ; make searches case sensitive. I HATE DYNAMIC SCOPE! chars-added) (save-excursion (save-match-data (or caml-default-dir (setq caml-default-dir (file-name-directory (buffer-file-name)))) (setq chars-added (caml-complete-module)))) (if chars-added (forward-char chars-added)))) cmigrep-1.5/COPYING0000644000162400007670000000151710774552463014477 0ustar estokesocamlgroupCopyright (C) 2004 Eric Stokes This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA cmigrep-1.5/._GPL0000644000162400007670000000012210774552463014215 0ustar estokesocamlgroupMac OS X  2 Rcmigrep-1.5/GPL0000644000162400007670000004310310774552463014006 0ustar estokesocamlgroup GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. cmigrep-1.5/Makefile0000644000162400007670000000300110774552463015072 0ustar estokesocamlgroupSOURCES=misc.cmx tbl.cmx config.cmx clflags.cmx terminfo.cmx ccomp.cmx \ warnings.cmx consistbl.cmx linenum.cmx location.cmx longident.cmx \ syntaxerr.cmx parser.cmx lexer.cmx parse.cmx printast.cmx \ unused_var.cmx ident.cmx path.cmx primitive.cmx types.cmx btype.cmx \ oprint.cmx subst.cmx predef.cmx datarepr.cmx env.cmx typedtree.cmx \ ctype.cmx printtyp.cmx includeclass.cmx mtype.cmx includecore.cmx \ includemod.cmx parmatch.cmx typetexp.cmx stypes.cmx typecore.cmx \ typedecl.cmx typeclass.cmx typemod.cmx cmigrep.ml BYTESOURCES=misc.cmo tbl.cmo config.cmo clflags.cmo terminfo.cmo \ ccomp.cmo warnings.cmo consistbl.cmo linenum.cmo location.cmo \ longident.cmo syntaxerr.cmo parser.cmo lexer.cmo parse.cmo \ printast.cmo unused_var.cmo ident.cmo path.cmo primitive.cmo types.cmo \ btype.cmo oprint.cmo subst.cmo predef.cmo datarepr.cmo env.cmo \ typedtree.cmo ctype.cmo printtyp.cmo includeclass.cmo mtype.cmo \ includecore.cmo includemod.cmo parmatch.cmo typetexp.cmo stypes.cmo \ typecore.cmo typedecl.cmo typeclass.cmo typemod.cmo cmigrep.ml GODI_CONF=$(shell godi_confdir) GODI_BASE=$(shell cat $(GODI_CONF)/godi.conf | grep ^LOCALBASE | sed -e 's/LOCALBASE *= *//') GODI_LIB=$(GODI_BASE)/lib/ocaml/compiler-lib all: ocamlfind ocamlopt -o cmigrep -I $(GODI_LIB) \ -package pcre,findlib,unix -linkpkg $(SOURCES) byte: ocamlfind ocamlc -o cmigrep -I $(GODI_LIB) \ -package pcre,findlib,unix -linkpkg $(BYTESOURCES) install: cp cmigrep $(GODI_BASE)/bin clean: @rm -f *.o *.cmo *.cmi *.cma *.cmx *.cmi cmigrep cmigrep-1.5/README0000644000162400007670000001515510774552463014327 0ustar estokesocamlgroupGODI Recomended To build, type make. If it doesn't work, you probably aren't using godi. You'll have to edit the make file to tell it where your compiler sources are, as well as possibly rewrite the very simple build rule to not use findlib. A short description of features, cmigrep: cmigrep has two modes, the first and most common is that of searching for various types of objects inside a module. Objects that you can search for include switch purpose -t (regexp) print types with matching names -r (regexp) print record field labels with matching names -c (regexp) print constructors with matching names -p (regexp) print polymorphic variants with matching names -e (regexp) print exceptions with matching constructors -v (regexp) print values with matching names -o (regexp) print all classes with matching names -a (regexp) print all names which match the given expression These are all very useful for finding specific things inside a given module. Here are a few examples, find some constructors in the unix module itsg106:~ eric$ cmigrep -c SO_ Unix SO_DEBUG (* socket_bool_option *) SO_BROADCAST (* socket_bool_option *) SO_REUSEADDR (* socket_bool_option *) SO_KEEPALIVE (* socket_bool_option *) SO_DONTROUTE (* socket_bool_option *) SO_OOBINLINE (* socket_bool_option *) SO_ACCEPTCONN (* socket_bool_option *) SO_SNDBUF (* socket_int_option *) SO_RCVBUF (* socket_int_option *) SO_ERROR (* socket_int_option *) SO_TYPE (* socket_int_option *) SO_RCVLOWAT (* socket_int_option *) SO_SNDLOWAT (* socket_int_option *) SO_LINGER (* socket_optint_option *) SO_RCVTIMEO (* socket_float_option *) SO_SNDTIMEO (* socket_float_option *) find the same constructors, but this time anywhere itsg106:~/cmigrep-1.1 eric$ ./cmigrep -c SO_ \* SO_DEBUG (* UnixLabels.socket_bool_option *) SO_BROADCAST (* UnixLabels.socket_bool_option *) SO_REUSEADDR (* UnixLabels.socket_bool_option *) SO_KEEPALIVE (* UnixLabels.socket_bool_option *) SO_DONTROUTE (* UnixLabels.socket_bool_option *) SO_OOBINLINE (* UnixLabels.socket_bool_option *) SO_ACCEPTCONN (* UnixLabels.socket_bool_option *) SO_SNDBUF (* UnixLabels.socket_int_option *) SO_RCVBUF (* UnixLabels.socket_int_option *) SO_ERROR (* UnixLabels.socket_int_option *) SO_TYPE (* UnixLabels.socket_int_option *) SO_RCVLOWAT (* UnixLabels.socket_int_option *) SO_SNDLOWAT (* UnixLabels.socket_int_option *) SO_LINGER (* UnixLabels.socket_optint_option *) SO_RCVTIMEO (* UnixLabels.socket_float_option *) SO_SNDTIMEO (* UnixLabels.socket_float_option *) SO_DEBUG (* Unix.socket_bool_option *) SO_BROADCAST (* Unix.socket_bool_option *) SO_REUSEADDR (* Unix.socket_bool_option *) SO_KEEPALIVE (* Unix.socket_bool_option *) SO_DONTROUTE (* Unix.socket_bool_option *) SO_OOBINLINE (* Unix.socket_bool_option *) SO_ACCEPTCONN (* Unix.socket_bool_option *) SO_SNDBUF (* Unix.socket_int_option *) SO_RCVBUF (* Unix.socket_int_option *) SO_ERROR (* Unix.socket_int_option *) SO_TYPE (* Unix.socket_int_option *) SO_RCVLOWAT (* Unix.socket_int_option *) SO_SNDLOWAT (* Unix.socket_int_option *) SO_LINGER (* Unix.socket_optint_option *) SO_RCVTIMEO (* Unix.socket_float_option *) SO_SNDTIMEO (* Unix.socket_float_option *) It seems they only exist in the unix module. By default cmigrep searches the current directory, and the standard library. You can of course tell it to search elsewhere. full types get printed in the case that the constructors have arguments. Notice that adding to the include path is modeled after the compiler. Findlib is also supported. itsg106:~ eric$ cmigrep -c "^Tsig_.*" -I /opt/godi/lib/ocaml/compiler-lib Types Tsig_value of Ident.t * value_description (* signature_item *) Tsig_type of Ident.t * type_declaration * rec_status (* signature_item *) Tsig_exception of Ident.t * exception_declaration (* signature_item *) Tsig_module of Ident.t * module_type * rec_status (* signature_item *) Tsig_modtype of Ident.t * modtype_declaration (* signature_item *) Tsig_class of Ident.t * class_declaration * rec_status (* signature_item *) Tsig_cltype of Ident.t * cltype_declaration * rec_status (* signature_item *) record field labels itsg106:~ eric$ cmigrep -r "^st_" Unix st_dev: int (* stats *) st_ino: int (* stats *) st_kind: file_kind (* stats *) st_perm: file_perm (* stats *) st_nlink: int (* stats *) st_uid: int (* stats *) st_gid: int (* stats *) st_rdev: int (* stats *) st_size: int (* stats *) st_atime: float (* stats *) st_mtime: float (* stats *) st_ctime: float (* stats *) findlib support, matching value names itsg106:~ eric$ cmigrep -package pcre -v for Pcre val foreach_line : ?ic:in_channel -> (string -> unit) -> unit val foreach_file : string list -> (string -> in_channel -> unit) -> unit nested modules itsg106:~ eric$ cmigrep -v ".*" Unix.LargeFile val lseek : file_descr -> int64 -> seek_command -> int64 val truncate : string -> int64 -> unit val ftruncate : file_descr -> int64 -> unit val stat : string -> stats val lstat : string -> stats val fstat : file_descr -> stats types itsg106:~ eric$ cmigrep -t ".*" Unix.LargeFile type stats = { st_dev : int; st_ino : int; st_kind : file_kind; st_perm : file_perm; st_nlink : int; st_uid : int; st_gid : int; st_rdev : int; st_size : int64; st_atime : float; st_mtime : float; st_ctime : float; } everything! itsg106:~ eric$ cmigrep -a ".*" Unix.LargeFile val lseek : file_descr -> int64 -> seek_command -> int64 val truncate : string -> int64 -> unit val ftruncate : file_descr -> int64 -> unit type stats = { st_dev : int; st_ino : int; st_kind : file_kind; st_perm : file_perm; st_nlink : int; st_uid : int; st_gid : int; st_rdev : int; st_size : int64; st_atime : float; st_mtime : float; st_ctime : float; } val stat : string -> stats val lstat : string -> stats val fstat : file_descr -> stats exception declarations itsg106:~/cmigrep eric$ ./cmigrep -e ".*" Unix exception Unix_error of error * string * string toplevel modules starting with Net itsg106:~/cmigrep-1.1 eric$ ./cmigrep -m -package netstring Net* Neturl Netulex Netstring_top Netstring_str Netstring_pcre Netstring_mt Netstream Netsendmail Netmime Netmappings_other Netmappings_min Netmappings_jp Netmappings_iso Netmappings Nethttp Nethtml_scanner Nethtml Netencoding Netdb Netdate Netconversion Netchannels Netbuffer Netaux Netaddress Netaccel_link Netaccel sub modules one level deep of modules starting with Net itsg106:~/cmigrep-1.1 eric$ ./cmigrep -m -package netstring Net*.* Netulex.ULB Netulex.Ulexing Nethttp.Header Netencoding.Base64 Netencoding.QuotedPrintable Netencoding.Q Netencoding.Url Netencoding.Html Netaux.KMP Netaux.ArrayAux cmigrep-1.5/cmigrep.ml0000755000162400007670000005554310774552463015437 0ustar estokesocamlgroup(* A utility to gather information from caml compiled interface files Copyright (C) 2007 Eric Stokes This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *) open Types exception Break module Pathset = Set.Make(struct type t = string let trailing_slash = Pcre.regexp "/\\s*$|\\\\\\s*$" let compare p1 p2 = let p1' = Pcre.replace ~rex:trailing_slash ~templ:"" p1 in let p2' = Pcre.replace ~rex:trailing_slash ~templ:"" p2 in String.compare p1' p2' end) (* the standard library should not be so deficient *) module List = struct include List let filter_map f l = List.fold_left (fun acc item -> match f item with | Some x -> x :: acc | None -> acc) [] l let find_map f l = let res = ref None in try List.iter (fun x -> match f x with | None -> () | Some y -> res := Some y; raise Break) l; raise Not_found with Break -> begin match !res with | Some y -> y | None -> raise Break end let map f l = let r = rev_map f l in rev r end module Unix = struct include Unix let fold_path ~f ~init path = let dir = Unix.opendir path in let acc = ref init in try while true do let file = Unix.readdir dir in acc := f file !acc done; !acc with | End_of_file -> Unix.closedir dir; !acc | exn -> Unix.closedir dir; raise exn end module Match = struct let comma = Pcre.regexp "\\s*,\\s*" end module Module_expression = struct type t = | Exact of string | Begins_with of string * Pcre.regexp | Ends_with of string * Pcre.regexp | Begins_and_ends of string * Pcre.regexp | Contains of string * Pcre.regexp | Any let to_string = function | Exact m -> m | Begins_with (s, _) | Ends_with (s, _) | Begins_and_ends (s, _) | Contains (s, _) -> s | Any -> "*" (* ModA,ModB,Foo*.Make *) let parse = let dot = Pcre.regexp "\\." in let capname = Pcre.regexp "^[A-Z][A-Za-z_'0-9]*$" in let starend = Pcre.regexp "^[A-Z][A-Za-z0-9_']*\\*$" in let starbegin = Pcre.regexp "^\\*[A-Za-z0-9_']+$" in let starboth = Pcre.regexp "^\\*[A-Za-z0-9_']+\\*$" in let starmiddle = Pcre.regexp "^([A-Z][A-Za-z0-9_']*)\\*([A-Za-z0-9_']+)$" in let star = Pcre.regexp "\\*" in fun exp -> List.map (fun token -> let token_no_star = Pcre.replace ~rex:star ~templ:"" token in if token = "*" then Any else if Pcre.pmatch ~rex:capname token then Exact token else if Pcre.pmatch ~rex:starboth token then Contains (token, Pcre.regexp ("^.*" ^ token_no_star ^ ".*$")) else if Pcre.pmatch ~rex:starmiddle token then begin match Pcre.extract ~rex:starmiddle token with | [|_whole; begins; ends |] -> let rex = Pcre.regexp (Printf.sprintf "^%s.*%s$" begins ends) in Begins_and_ends (token, rex) | _ -> failwith "invalid begins and ends with match" end else if Pcre.pmatch ~rex:starbegin token then Ends_with (token, Pcre.regexp (Printf.sprintf "%s$" token_no_star)) else if Pcre.pmatch ~rex:starend token then Begins_with (token, Pcre.regexp (Printf.sprintf "^%s" token_no_star)) else failwith "invalid module expression") (Pcre.split ~rex:dot exp) let is_exact t = List.for_all (function | Exact _ -> true | Begins_with _ | Ends_with _ | Begins_and_ends _ | Contains _ | Any -> false) t let parse_exact exp = let t = parse exp in if is_exact t then t else failwith "Module_expression.parse_exact: expression is not exact!" end type mode = | Find_type of Pcre.regexp | Find_constructor of Pcre.regexp | Find_polymorphic_variant of Pcre.regexp | Find_record_label of Pcre.regexp | Find_value of Pcre.regexp | Find_exception of Pcre.regexp | Find_module | Find_class of Pcre.regexp | Find_all of Pcre.regexp type module_tree = | Leaf of string * signature | Node of string * signature * module_tree list type args = { mode: mode; path: Pathset.t; context: Module_expression.t list list; (* open modules *) modname: Module_expression.t list list; } let parse_args () = let module Parse = struct open Arg let mode = ref None let path = ref (Pathset.add "." (Pathset.singleton Config.standard_library)) let context = ref ["Pervasives"] let modname = ref [] let set_mode m = match !mode with | None -> mode := Some m; | Some _ -> raise (Invalid_argument "the mode is already set") let add_packages p = Findlib.init (); let packages = Pcre.split ~rex:Match.comma p in List.iter (fun package -> try let dir = Findlib.package_directory package in path := Pathset.add dir !path with exn -> Printf.eprintf "warning, error finding package dir: %s\n" (Printexc.to_string exn)) packages let add_opens s = context := Pcre.split ~rex:Match.comma s let args = Arg.align [("-t", String (fun s -> set_mode (Find_type (Pcre.regexp s))), " (regexp) print types with matching names"); ("-r", String (fun s -> set_mode (Find_record_label (Pcre.regexp s))), " (regexp) print record field labels with matching names"); ("-c", String (fun s -> set_mode (Find_constructor (Pcre.regexp s))), " (regexp) print constructors with matching names"); ("-p", String (fun s -> set_mode (Find_polymorphic_variant (Pcre.regexp s))), " (regexp) print polymorphic variants with matching names"); ("-m", Unit (fun () -> set_mode Find_module), " (regexp) print all matching module names in the path"); ("-v", String (fun s -> set_mode (Find_value (Pcre.regexp s))), " (regexp) print values with matching names"); ("-e", String (fun s -> set_mode (Find_exception (Pcre.regexp s))), " (regexp) print exceptions with matching constructors"); ("-o", String (fun s -> set_mode (Find_class (Pcre.regexp s))), " (regexp) print all classes with matching names"); ("-a", String (fun s -> set_mode (Find_all (Pcre.regexp s))), " (regexp) print all names which match the given expression"); ("-I", String (fun s -> path := Pathset.add s !path), " (directory) add additional directory to the search path"); ("-package", String (fun s -> add_packages s), " (packages) comma seperated list of findlib packages to search"); ("-open", String (fun s -> add_opens s), " (modules) comma seperated list of open modules (in order!)")] let usage = Printf.sprintf ("%s: \n" ^^ "extract information from caml compiled interface files\n" ^^ " can be an exact module name, " ^^ " or a shell wildcard. Multiple modules can be specified " ^^ "E.G. \"ModA ModB Foo*.Make\" means to search ModA, ModB, and " ^^ "any submodule Make of a module that starts with Foo.") Sys.argv.(0) let parse () = Arg.parse args (fun anon -> modname := (Module_expression.parse anon) :: !modname) usage let error msg = prerr_endline msg; Arg.usage args usage; exit 1 end in Parse.parse (); let mode = match !Parse.mode with | Some m -> m | None -> Parse.error "you must specify a search mode" in {mode = mode; path = if Pathset.is_empty !Parse.path then Parse.error "you must specify a search path" else !Parse.path; context = List.map Module_expression.parse_exact !Parse.context; modname = (match !Parse.modname with | [] -> if !Parse.context = [] then Parse.error "you must specify a module expression, or a list of open modules" else [] | name -> name)} let match_ident exp id = Pcre.pmatch ~rex:exp (Ident.name id) let whsp = Pcre.regexp ~study:true "\\s+|$" let print_type print_path path s exp = List.iter (function | Tsig_type (id, type_decl, rec_status) -> if match_ident exp id then begin Printtyp.type_declaration id Format.std_formatter type_decl; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () end | _ -> ()) s let print_constructor print_path path s exp = let type_expr_to_string exp = Printtyp.type_expr Format.str_formatter exp; Format.flush_str_formatter (); in List.iter (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_variant (constructors, _private) -> List.iter (fun (name, type_exprs) -> if Pcre.pmatch ~rex:exp name then begin Format.print_string name; if type_exprs <> [] then begin Format.print_string " of "; Format.print_string (String.concat " * " (List.map (fun e -> type_expr_to_string e) type_exprs)) end; Format.print_string " (* "; if print_path then Format.print_string (path ^ "."); Format.print_string (Ident.name id); Format.print_string " *)"; Format.print_newline () end) constructors | _ -> () end | _ -> ()) s let print_polymorphic_variant print_path path s expr = let print_if_polymorphic_variant id type_decl = begin match type_decl.type_manifest with | None -> () | Some {desc = type_descr} -> begin match type_descr with | Tvariant variant_descr -> List.iter (fun (name, param) -> let src_name = "`" ^ name in if Pcre.pmatch ~rex:expr src_name then begin Format.print_string src_name; begin match param with | Rpresent None -> () | Rabsent -> () | Reither _ -> () (* this can't happen in a type *) | Rpresent (Some type_expr) -> Format.print_string " of "; Printtyp.type_expr Format.str_formatter type_expr; let s = Pcre.replace ~rex:whsp ~templ:" " (Format.flush_str_formatter ()) in Format.print_string s; end; Format.print_string (Printf.sprintf " (* %s%s *)" (if print_path then (path ^ ".") else "") (Ident.name id)); Format.print_newline () end) variant_descr.row_fields | _ -> () end end in List.iter (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_abstract -> print_if_polymorphic_variant id type_decl | _ -> () end | _ -> ()) s let print_record_label print_path path s exp = List.iter (function | Tsig_type (id, type_decl, _rec_status) -> begin match type_decl.type_kind with | Type_record (labels, _, _) -> List.iter (fun (name, mutable_flag, type_expr) -> if Pcre.pmatch ~rex:exp name then begin begin match mutable_flag with | Asttypes.Mutable -> Format.print_string "mutable " | Asttypes.Immutable -> () end; Format.print_string name; Format.print_string ": "; Printtyp.type_expr Format.std_formatter type_expr; Format.print_string " (* "; if print_path then Format.print_string (path ^ "."); Format.print_string (Ident.name id); Format.print_string " *)"; Format.print_newline () end) labels | _ -> () end | _ -> ()) s let print_value print_path path s exp = List.iter (function | Tsig_value (id, desc) -> if match_ident exp id then begin Printtyp.value_description id Format.str_formatter desc; let s = Pcre.replace ~rex:whsp ~templ:" " (Format.flush_str_formatter ()) in if print_path then print_endline (s ^ (Printf.sprintf " (* %s *)" path)) else print_endline s end | _ -> ()) s let print_class print_path path s exp = List.iter (function | Tsig_class (id, cd, _) when match_ident exp id -> Printtyp.class_declaration id Format.std_formatter cd; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () | Tsig_cltype (id, ct, _) when match_ident exp id -> Printtyp.cltype_declaration id Format.std_formatter ct; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () | _ -> ()) s let print_all print_path path s exp = let new_s = List.filter (function | Tsig_value (id, _) | Tsig_type (id, _, _) | Tsig_exception (id, _) | Tsig_module (id, _, _) | Tsig_modtype (id, _) | Tsig_class (id, _, _) | Tsig_cltype (id, _, _) -> match_ident exp id) s in Printtyp.signature Format.std_formatter new_s; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () let print_exception print_path path s exp = List.iter (function | Tsig_exception (id, exn) -> if match_ident exp id then begin Printtyp.exception_declaration id Format.std_formatter exn; if print_path then Format.print_string (Printf.sprintf " (* %s *)" path); Format.print_newline () end | _ -> ()) s let warn_env_error e = Env.report_error Format.str_formatter e; let e = Format.flush_str_formatter () in Printf.eprintf "%s\n%!" e let match_mod_expr expr mod_name = let module E = Module_expression in match expr with | E.Exact name -> mod_name = name | E.Begins_with (_, rex) | E.Ends_with (_, rex) | E.Begins_and_ends (_, rex) | E.Contains (_, rex) -> Pcre.pmatch ~rex mod_name | E.Any -> true let cmi_file = Pcre.regexp "\\.cmi$" let modname_of_cmi f = String.capitalize (Pcre.replace ~templ:"" ~rex:cmi_file f) let cmi_of_modname n = (String.lowercase n) ^ ".cmi" let cmi_files args mod_expr = let module E = Module_expression in match mod_expr with | E.Exact mod_name -> let cmi_name = cmi_of_modname mod_name in Pathset.fold (fun path acc -> if Sys.file_exists (Filename.concat path cmi_name) then (mod_name, Filename.concat path cmi_name) :: acc else acc) args.path [] | _ -> Pathset.fold (fun path cmi_files -> Unix.fold_path ~f:(fun file cmi_files -> if Pcre.pmatch ~rex:cmi_file file then begin let mod_name = modname_of_cmi file in if match_mod_expr mod_expr mod_name then (mod_name, Filename.concat path file) :: cmi_files else cmi_files end else cmi_files) ~init:cmi_files path) args.path [] let rec matching_submods mod_expr s = match s with | Tsig_module (id, mt, _) :: tl when match_mod_expr mod_expr (Ident.name id) -> begin match mt with | Tmty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl | Tmty_functor (_, mt, _) -> begin match mt with | Tmty_signature sg -> (Ident.name id, sg) :: matching_submods mod_expr tl | _ -> matching_submods mod_expr tl end | Tmty_ident _ -> matching_submods mod_expr tl end | _ :: tl -> matching_submods mod_expr tl | [] -> [] let rec build_module_tree name root mod_expr = match mod_expr with | [] -> Leaf (name, root) | mod_expr :: tl -> begin match matching_submods mod_expr root with | [] -> Leaf (name, root) | mods -> let children = List.map (fun (name, sg) -> build_module_tree name sg tl) mods in Node (name, root, children) end let rec extract_nodes depth path modtree = let concatpath path name = if path = "" then name else (path ^ "." ^ name) in match modtree with | Leaf (name, sg) -> [(concatpath path name, depth, sg)] | Node (name, sg, children) -> (concatpath path name, depth, sg) :: (List.flatten (List.map (fun submod -> extract_nodes (depth + 1) (concatpath path name) submod) children)) let print_requested_stuff print_path name s args = match args.mode with | Find_type e -> print_type print_path name s e | Find_constructor e -> print_constructor print_path name s e | Find_polymorphic_variant e -> print_polymorphic_variant print_path name s e | Find_record_label e -> print_record_label print_path name s e | Find_value e -> print_value print_path name s e | Find_exception e -> print_exception print_path name s e | Find_class e -> print_class print_path name s e | Find_all e -> print_all print_path name s e | Find_module -> Format.print_string name; Format.print_newline () let read_cmi_file filename = let ic = open_in_bin filename in try let buffer = String.create (String.length Config.cmi_magic_number) in really_input ic buffer 0 (String.length Config.cmi_magic_number); if buffer <> Config.cmi_magic_number then begin close_in ic; failwith (Printf.sprintf "not an interface: %s" filename) end; let (name, sg) = input_value ic in close_in ic; sg with exn -> close_in ic; failwith (Printf.sprintf "bad cmi file: %s, error: %s" filename (Printexc.to_string exn)) let module_exists args mod_exp = let expr_len = List.length mod_exp in let mod_name = List.hd mod_exp in let submods = List.tl mod_exp in match cmi_files args mod_name with | [] -> false | cmi_files -> List.exists (fun (name, cmi_file) -> let s = read_cmi_file cmi_file in let sgs = List.filter (fun (_, depth, _) -> depth = expr_len) (extract_nodes 1 "" (build_module_tree name s submods)) in List.length sgs > 0) cmi_files let gen_qualified args context = let context = Array.of_list context in for i = 0 to Array.length context - 1 do try for j = i downto 0 do let maybe_parent = context.(j) in let child = context.(i) in let qualified = maybe_parent @ child in if module_exists args qualified then begin context.(i) <- qualified; raise Break end done with Break -> () done; Array.to_list context let () = let args = parse_args () in let qualified_context = gen_qualified args args.context in let mod_exprs = (* combine the list of fully qualified open modules with the module expressions that the user has specified following the compiler's rules about module opens for exact expressions, and combining everything for non exact expressions. *) match args.modname with | [] -> qualified_context | exps -> List.flatten (List.map (fun exp -> if Module_expression.is_exact exp then [try List.find_map (fun qual -> let exp' = qual @ exp in if module_exists args exp' then Some exp' else None) (List.rev qualified_context) (* look from the bottom up *) with Not_found -> exp] else exp :: (List.rev_map (fun qual -> qual @ exp) qualified_context)) exps) in List.iter (fun mod_expr -> try let expr_len = List.length mod_expr in let mod_name = List.hd mod_expr in let submods = List.tl mod_expr in let cmi_files = cmi_files args mod_name in List.iter (fun (name, cmi_file) -> let s = read_cmi_file cmi_file in let sgs = List.filter (fun (_, depth, _) -> depth = expr_len) (extract_nodes 1 "" (build_module_tree name s submods)) in let print_path = List.length sgs > 1 || List.length cmi_files > 1 || List.length args.modname > 1 in List.iter (fun (name, _, sg) -> print_requested_stuff print_path name sg args) sgs) cmi_files with exn -> Printf.eprintf "failed to operate on: \"%s\", %s\n%!" (String.concat " " (List.map Module_expression.to_string mod_expr)) (Printexc.to_string exn)) mod_exprs cmigrep-1.5/Changes0000644000162400007670000000047710774553065014742 0ustar estokesocamlgroup1.5 * ignore (but warn about) missing findlib packages * minor refactoring 1.4 * support module aliasing with let module, and module = * started making a cmigrep library, but not done yet 1.3 * bug fixes 1.2 * add support for specifying a list of open modules * fix some regexp bugs in the module expression parser