<ChristopheT>
It depends. Local uses of float's, float array's, and float records receive special attention. Also, [compare] and Bigarrays operations will be specialized if used monomorphically. If you want to retain this while writing polymorphic functions on them to be specialized only later, you must use the camlp4 macro system.
2007-07-25
<xavierbot>
Camlp4 Parsing version 3.10.0
2007-07-22
<flux>
ah, there is USE_CAMLP4, even though using it doesn't fix the ocamldep-stage..
2007-07-20
<flux>
camlp4 is involved in the compilation process
<flux>
I think some camlp4 extension that can generated such functions
2007-07-18
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
2007-07-17
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
2007-07-12
<bluestorm_>
and it's a shame i don't know camlp4 :p
<psnively>
Yeah. It's interesting to look at the grammar that camlp4, either classic or revised, actually uses.
<bluestorm_>
camlp4 pa_o.cmo pr_o.cmo transform a;; into let _ = a :p
2007-07-11
<xavierbot>
Camlp4 Parsing version 3.10.0
<twobitsprite>
hmm... actually... if I was working on a compiler which output ocaml code as a target language, would it just be easier to use camlp4?
<zarvok>
I wouldn't know, but I'm told gerard huet's coq camlp4 syntax extensions are very cool
<Smerdyakov>
Using camlp4-in-Coq is very frustrating. It's easy to add rules that break each other, but wouldn't with a fully-general parsing engine.
<Smerdyakov>
Does anyone know what class of grammars camlp4 supports?
<zarvok>
I'm dissatisfied with camlp4 streams and the other available options
<xavierbot>
Camlp4 Parsing version 3.10.0
<psnively>
I agree. Now I don't see it as ugly at all, but I guess some people really prefer the revised syntax. As a Lisper, I like the fact that we have camlp4 and even have two "competing" syntaxes...
2007-07-05
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<rwmjones>
_ke, so camlp4 is not possible?
<rwmjones>
_ke, not in basic OCaml, but there are camlp4 extensions, or other ways to do it
2007-07-04
<psnively>
Which is why I encouraged Oleg to include his monadic delimited continuations in version 1.1 of his camlp4 extension that provides do-notation for OCaml. The whole point was to make the code more legible.
2007-06-29
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
<xavierbot>
Camlp4 Parsing version 3.10.0
2007-06-28
<rwmjones>
Camlp4 Parsing version 3.10.0
<rwmjones>
$ ocaml -I +camlp4
* rwmjones
wishes they'd document the new camlp4 ...
<rwmjones>
camlp4 with lots of DELETE_RULEs might be a goer
<flux>
I would trust a camlp4-based solution more..
<flux>
rwmjones, hey, here's an idea: feed it through a camlp4 filter that bails out on unsafe constructs :-)
2007-06-27
<psnively>
We talked about this before, right? I know it builds; I don't know that it works correctly in front-ending the various OCaml tools given the new camlp4 in 3.10.0.
<psnively>
So, an actual OCaml question: has anyone confirmed that findlib 1.1.2pl1 works correctly with OCaml 3.10.0, in particular that it compiles code using camlp4 correctly?
2007-06-19
<psnively>
I'll look into it. I ended up rolling back to 3.09.3 personally--there's just too much camlp4 stuff that needs updating.
<psnively>
I think we're going to have to see how findlib fares with code making extensive use of camlp4.
<psnively>
On the mailing list, though, someone mentioned that there are issues around the new camlp4.
<tsuyoshi>
was he the one complaining about the new camlp4 on the mailing list?
<flux>
is it possible to write a camlp4 extension such that it can be used with ocamlfind ocamlc -package pa_foo -syntax pa_foo .. ? at present I must write .. -syntax camlp4o,pa_foo, and I feel it should be able to work that out by itself..
<flux>
but it would still need some (very little) camlp4 magic to get rid of the syntactic cruft
<flux>
(I guess it'd be a nice project for studying camlp4..)
<flux>
any nice camlp4 module for me to do that?-)
2007-05-26
<rwmjones>
yup, it's a good idea. However at the moment I'm conservatively sticking with 3.09.3 because of all the camlp4 changes in the latest.
<mikeX>
Oatmeat: I've seen it done with a camlp4 module
2007-05-22
<mattam>
Coq uses camlp4 for all its parsing needs
<flux>
epigram might be too difficult for camlp4
<flux>
infact, doesn't even coq use camlp4
<twobitsprite>
i.e. if I were to design a language using camlp4, is it probable that I'll reach a point where I might outgrow the capabilities of camlp4+ocaml?
<twobitsprite>
would camlp4 be well suited to designing a language from scratch? or is it mostly good for extending/modifying the ocaml language?
2007-05-20
<bluestorm_>
martin jambon explains that the camlp4 extensions are written using the revised syntax
<bluestorm_>
i'm looking for a camlp4 tutorial
2007-05-18
<flux>
hmm.. if sexplib were extended to support for example listing fields and their types, the s-expr generating capabilities would be brought more to the ocaml-land from the camlp4-land..
2007-05-17
<ita>
noteventime: camlp4 teh sucks ? :-)
<twobitsprite>
flux: can't be too long, esp. if you exclude camlp4...
2007-05-16
<twobitsprite>
how do I find out what levels are defined in camlp4 for expr?
2007-05-13
<twobitsprite>
LeCamarade: you ever mess around with camlp4?
<twobitsprite>
anyways... anyone mind glancing at my (small) camlp4 code and tell me how I can get it to like streams in my expressions?
<twobitsprite>
I wish the camlp4 syntax was a bit more integrated with/similar to the actual ocaml syntax
<twobitsprite>
I have a .ml file, that has EXTEND expressions... I can't seem to get it to compile... I've tried "ocamlopt -pp camlp4o foo.ml" and "ocamlopt -I +camlp4 gramlib.cmxa foo.ml" but every time I get a syntax error in my EXTEND expression, and I'm almost positive that it should work..
2007-05-12
<twobitsprite>
how do you compile things with streams? I've tried "ocamlopt -I +camlp4 gramlib.cmxa test.ml"
<flux>
I suppose that's a good example on using camlp4 also
<flux>
there's a camlp4-module that gives that, I think
<flux>
I'm thinking some camlp4-module for doing that might still be the way..
<flux>
the camlp4-module for statically checking sql queries seemed interesting, but unfortunately it didn't allow composing queries
<pango_>
they're functional streams, but they're barely supported in camlp4 3.09... (Hopefully situation will improve with 3.10 ?)
2007-05-11
<bluestorm>
i'm waiting for the camlp4 twt extension :-°
2007-05-09
<kelaouchi>
what would be the camlp4 command to create analyze.ml ?
<pango_>
it creates it from analyze.p4 using camlp4, see above
<pango_>
do you have camlp4 installed ?
2007-05-05
<lucca>
does camlp4 see line/column info
<flux>
(make that camlp4)
2007-04-30
<joelr1>
is anyone familiar with the new camlp4?
<joelr1>
does anyone know the new camlp4?
2007-04-26
<postalchris>
ocamlcp + camlp4: anybody have a well-worn strategy for making this happen?
<flux>
hmm.. a similar one might be possible in ocaml too, but it would require a camlp4 module to forbid certain structures, such as references to external symbols ("extern") and using certain modules ("Unix") and even certain functions from certain modules ("Pervasives.open_out")
2007-04-23
<postalchris>
Is there maybe a camlp4 extension that adds a "matches" predicate?
2007-04-20
<pango>
tsuyoshi: isn't Lisp's macros simplicity related to the uniformity of underlying datastructure ? (dynamically typed lists ?) camlp4 can't beat that, I guess
<tsuyoshi>
benny9: there's a preprocessor, camlp4, but it's pretty difficult to use compared to lisp macros
2007-03-28
<flux->
postalchris, camlp4 uses the revised syntax
<postalchris>
OK, it seems the parametric type syntax is inverted in camlp4 <:sig_item <value x : ref int >> becomes "val x : int ref"...
<postalchris>
More camlp4 fun... <:sig_item< value x : int ref >> becomes "val x : ref int"...
2007-03-27
<postalchris>
Is the identifier "__DEBUG__" reserved by camlp4?
<postalchris>
I'm getting "unbound value _loc" from camlp4 even with "camlp4 -loc _loc". This is in code that doesn't reference "loc" or "_loc" explicitly. Anybody seen this before?
2007-03-18
<pango_>
afair, yes, it uses camlp4
<flux->
and otags uses the camlp4-mechanism, right?
2007-03-09
<flux->
jave, maybe you can use camlp4 to scan source
2007-03-03
<flux->
however $ might be a bad choice if you use camlp4
2007-03-01
<flux->
I suppose you could write a camlp4-extension for ocaml to do s-magic
2007-01-24
<Harzilein>
ahaa, i found my answer in the camlp4 tutorial (which isn't the first place i'd look ;)
2007-01-15
<flux->
camlp4-tutorial had an example of a new keyword FLOAT, which allowed let a = FLOAT 5.0 + 4.0
<mattam>
c++ templates are not much more than intelligent macros, so camlp4 could easily emulate them
<Smirnov>
camlp4? is that like ocaml without the objective-orientedness?
<haelix>
but in a few lines of camlp4
<haelix>
and I've never dug into metaOcaml, but it should be helpful, too. Though not quite as "core language" as camlp4
<haelix>
camlp4 will let you do this and more at compile time
<haelix>
Ocaml is not too gifted for compile time manipulations (camlp4 (a syntax-tree level preprocessor) or metaocaml ("multistage compilation extension for ocaml) might be the way to go)
2007-01-09
<flux__>
I tried simply requires(syntax) = "camlp4" and archive(syntax,preprocessor)="pa_sexp_conv.cmo" in the META-file
2007-01-07
<pango>
the only way would be to use camlp4
2006-12-30
<twobitsprite>
is camlp4 strictly for generating Ocaml code, or can it be used to translate one language to another?
<pango>
it's an alternative syntax, implemented using OCaml's camlp4 preprocessor
2006-12-02
<tsuyoshi>
camlp4 is difficult to understand
<dark_light>
the fact that the shell acts as both command interpreter and scripting language plays a big role too. i could just type this terminal. but, hm, yes, a camlp4 macro to implement pipes in ocaml would be just useful
<Smerdyakov>
You can definitely do that with camlp4.
2006-11-21
<dark_light>
like camlp4 does at compile level, but at runtime instead
<dark_light>
i have no idea how the camlp4 would process a macro at runtime *and* mantain type safety, but i think it is possible..
<dark_light>
there are a camlp4 that does postgresql calls, but only at compile time.. not dynamic calls
<sponge45>
technically camlp4 is a part of ocaml, but it's a delicate topic.
<sponge45>
the one that comes with camlp4
2006-11-19
<quarkalone_>
well... what I'm looking is a very simple example of using streams for a hand writing parser, but i'm lost with camlp4.
<dark_light>
or camlp4 has some magic
2006-11-14
<pango__>
(probably a job for camlp4 to get a "macro expansion" instead of a function...)
2006-11-13
<flux__>
and camlp4-extensions
2006-11-12
<bluestorm>
(do someone know where will be the next, promising new camlp4 version available ?)
<flux__>
plus it comes with a camlp4 language extension that makes it more convenient to work with the wrappers
2006-11-11
<levi_home>
That's the idea behind Lisp and, to a lesser extent, Camlp4.
2006-11-09
<pango>
and ocaml -I +camlp4 camlp4r.cma for toplevel
2006-11-08
<flux__>
or maybe it would require using camlp4
2006-11-04
<Smerdyakov>
You might want to go for camlp4.
2006-11-03
<pango>
you could probably create your own using camlp4, though
2006-10-28
<pango>
maybe with camlp4...
2006-10-26
<pango>
flux__: in 3.10 snapshot, the only mentions of fparser are in old Changelog entries and camlp4-old subdir, so I suspect it won't be supported by 3.10
<pango>
beware that reading from standard streams is destructive... camlp4 has functional streams too, but I've yet to figure out the correct syntax for them ;)
2006-10-21
<dark_light>
hmm yes, i have ocaml-doc here. and, hmm ocaml-doc has other docs too, nice.. there are an camlp4 tutorial here, hm
2006-10-17
<love-pingoo>
I messed a bit with camlp4, but I probably won't go back to it before the new clean version
<love-pingoo>
actually, he probably didn't use camlp4
<shans_home>
so I'm playing around with camlp4. One of the things I want to do is generate classes automatically from templates.
2006-10-16
<pango>
but can they be used in camlp4's parsers ?
<pango>
well, I can ask too ;) Is it possible to lookup one element ahead (= non destructively) with camlp4 streams ?
<pango>
camlp4 is the preprocessor, camlp4o a predefined set of extensions
2006-10-14
<dark_light>
The and the use of -syntax camlp4 seems to obscure compiler errors. A "File "tester.ml", line 5, characters 11-14: Syntax error" was transformed into "File "", line 5, characters 11-14: Parse error: [patt] expected after ',' (in [patt])"
2006-10-13
<shans_home>
do you need to use special quotations for generating classes in camlp4? Or should <:str_item< ... >> work?
<shans_home>
sorry, camlp4?
2006-10-11
<flux__>
I think a camlp4-mechanism is perfectly suitable for making language extensions, because it partially discourages making the language very different due to little things :)
<dark_light>
not camlp4, in ocaml itself
<dark_light>
TFK, there is only a problem: it uses micmatch camlp4 extension to do pcre regex matches in a nice way
<abez>
dark_light: generally camlp4 is the best way to break the rules
<abez>
dark_light: you're welcome to write some macros in camlp4 which do what you want
2006-10-10
<TFK>
Hmm, I see I can add stuff using camlp4.
2006-10-03
<postalchris>
datrus: there may be a camlp4 extension that will do this for you
2006-09-27
<flux__>
I suppose so, but I haven't done any camlp4-stuff :)
<flux__>
I suppose most of these tricks could be achieved with camlp4, but with extra syntax
2006-09-25
<sponge45>
micmatch actually relies on some code from the regexp-pp package. This is the camlp4 stuff which allows to move the command which compiles the regexp to a place where it will be executed only once.
2006-09-24
<sponge45>
with camlp4 preprocessing plus some runtime libraries, it's too complicated without findlib/ocamlfind
<sponge45>
camlp4 is part of ocaml
2006-09-20
<love-pingoo>
otherwise you can go for some preprocessing using camlp4
2006-09-19
<kaspersv>
hello, I'm having trouble compiling a camlp4 syntax extension, I get the following error message "Error while linking pa_while.cmo: Reference to undefined global `Plexer'" when I try to compile it
2006-09-18
<flux__>
and maybe automate sprinkling those everywhere with camlp4 :)
<shans_home>
is there a more recent version of the camlp4 tutorial than 3.07?
<levi_home>
But I've never used camlp4, so you'd have to verify that such a thing is reasonable.
<levi_home>
Perhaps you could make a camlp4 macro that defines a function and adds its name to a Hashtbl at the same time, or something like that.
2006-09-09
<zvrba>
DRMacIver: maybe he was suggesting camlp4 :)
2006-09-06
<zvrba>
camlp4 magic?
2006-08-28
<shans_home>
how do I use camlp4 in an application?
2006-08-23
<oracle1>
with camlp4 ?
2006-08-21
<ppsmimou>
zmdkrbou: there is a camlp4 extenstion which allows you to match strings according to regexps
<exa>
stupid emphasis on camlp4 and C++ objects while I need proper doc on interfacing with plain C first.
2006-07-15
<asbeta>
except creators of camlp4 :)
<dylan>
Anyway, I think writing a build rule in ocaml, with camlp4 syntax sugar, would be very nice.
<dylan>
which is why I'm considering rewriting it to use camlp4
<dylan>
I'm thinking of making my build tool just be a camlp4 front end
2006-07-14
<dylan>
I'm not sure an implementation like the former is possible with camlp4
2006-07-06
<BetaTEST>
i don't know :) how do i use camlp4?
<dylan>
without camlp4, that isn't valid syntax, is it?
2006-06-04
<dylan>
But there is a camlp4 extension for it
<dylan>
There is a camlp4 extension for monad syntax.
2006-05-28
<mikeX>
well Unix_error expects a tupple, not sure if camlp4 somehow changes that
2006-05-23
<pg_>
I must extend the quotation expander of camlp4
<pg_>
I have defined an ocaml syntax extension with camlp4.
<pg_>
hello. I'm looking for help with a camlp4 issue.
2006-05-22
<love-pingoo>
flux__: maybe a camlp4 extension to add all the needed assert false ?
2006-05-21
<ketty>
throu the use of camlp4
2006-05-20
<flux__>
camlp4 is something I've been intending to dig into myself, for some time already, but.. maybe now that I have some time off the work I'll do it. or not :)
<alcojol>
Camlp4 looks very good
2006-05-19
<love-pingoo>
metaperl: there is a camlp4 thing for doing regexp as pattern-matching
2006-05-18
<dylan>
there is a camlp4 thing to allow pattern matching to use regexp, though
2006-05-17
<flux__>
that can be changed with a camlp4-parameter too
<ketty>
mikeX: you use the new version of camlp4?
<mikeX>
the error message is one line off btw, I can't figure out what's the problem with this one, i'm hardly acquainted with camlp4
2006-05-16
<dvorak>
hrm, according to the docs there, the Stream module does part of what I want, but most of that functionality has been moved into camlp4
2006-04-30
<love-pingoo>
bothering with camlp4 params in my makefile system, and so on
* ketty
is allready hooked by the camlp4 extension without ever using it :)
<love-pingoo>
should I go for the camlp4 extension or the pcre lib ?
2006-04-21
<Smerdyakov>
srle, camlp4
2006-04-12
<ketty>
from the camlp4 tutorial: Between the release of OCaml 3.08.2 and 3.08.3, the default identifier for locations used in syntax extensions silently changed from loc to _loc . For compatibility reasons, pass the -loc _loc option (or -loc loc ) to camlp4o as we did in the Makefiles of this tutorial.
2006-03-29
<pango>
love-pingoo: no, camlp4 has no access to types
<love-pingoo>
mmm we could think of something similar for print_poly.. but I don't think camlp4 has access to type info
2006-03-11
<twobitsprite>
camlp4 just seems to have too many non-othognal syntaxes involved for me to really grok
<Smerdyakov>
I use camlp4 at a shallow level to extend Coq with new tactics and such.
<Demitar>
twobitsprite: And, yes camlp4 is confusing to me as well but that's nothing I need to worry about right now. :)
<twobitsprite>
Demitar: you having problems understand camlp4 too?
<Smerdyakov>
twobitsprite, no; Coq uses camlp4, and I think camlp4 was developed with use in Coq as a main goal. :)
<twobitsprite>
i.e. I'm currently trying to tackle camlp4 so that I can introduce a septemvigesimal (base-27) litteral syntax... would this be simpler in coq?
<Smerdyakov>
If your language will get any more complicated, you should use a parsing tool like ocamlyacc or camlp4.
<twobitsprite>
gah! camlp4 is so confusing!
2006-03-10
<Anarchos>
twobitsprite isn't it because the author of camlp4 is the same of the revised syntax ?
<twobitsprite>
why does camlp4 use the revised syntax?
2006-03-04
<pango>
camlp4 pa_r.cmo pa_rp.cmo pr_dump.cmo
<pango>
I guess $(PP) is camlp4, so just after $(PP) I'd say
<dylan>
twobitsprite: Other people can always use can always use camlp4
2006-02-18
<perspectivet>
I've been reading through the camlp4 tutorial. a syntax extension seem to be the way to go. though it's still not simple.
2006-02-16
<naerbnic>
Quick question about the behavior of camlp4
<pango>
it's supported thru camlp4 preprocessing
2006-02-10
<JosephRivers>
Could it possibly be done with the camlp4 preprocessor?
2006-02-01
<twobitsprite>
camlp4 scares me
<Smerdyakov>
twobitsprite, I bet you can implement that with camlp4.
2006-01-24
<Hadaka>
I think I shall have to dabble in camlp4
2006-01-16
<dylan>
it could in theory be used as a library. Or as a camlp4 syntax extension even.
2005-12-15
<Mozillion>
I'm stuck with camlp4 for the moment
2005-12-12
<ski>
so is your colleague's code translated into this camlp4 grammar thing ?
<Mozillion>
speaking of camlp4, I've been struggling with a Grammar for the entire day and still got troubles with it
<flux__>
btw, is there a camlp4-extension that would create de-wrapping functions for such types?-)
2005-12-11
<Smerdyakov>
You may underestimate the power of the non-camlp4 facilities that OCaml offers.
<Smerdyakov>
See camlp4.
2005-12-04
<vodka-goo>
man camlp4
2005-12-01
<vincenz>
it's a camlp4 module
2005-11-30
<Smerdyakov>
vincenz, not sure about w/ ocamlyacc, but you can do that with camlp4 for regular OCaml code.
2005-11-17
<pingoo>
and a camlp4 friendly syntax
2005-11-16
* dylan
ponders a camlp4 grammar that replaces all the english keywords with welsh.
2005-11-15
<bluestorm>
do you know camlp4 ?
2005-11-14
<bluestorm>
camlp4 in general
<bluestorm>
do you know camlp4 ?
<bluestorm>
introduced in Camlp4 manual
2005-10-26
<vincenz>
Schmurtz: maybe a camlp4 module that has a way of doing it
<Schmurtz>
vincenz, there's no other possibilities than using a function or camlp4
<Schmurtz>
so.... camlp4
<vincenz>
I was hopinig more for a camlp4 module that easily lets one create simple hygienic macros
<Submarine>
camlp4
2005-10-16
<Smerdyakov>
You can make 'em with camlp4.
<Demitar>
*ponders* camlp4 just might be up for the challenge. (Provided there is someone who's willing to bother. It simply confuses me. :)
<Demitar>
Perhaps such a datastructure would be a worthy challenge... (Would probably require some camlp4 magic to make it convenient.)
2005-10-09
<pango>
written in Ocaml and Camlp4 and uses the library unix.cma.
2005-09-23
<pnou>
there's a camlp4 extension which does that
2005-09-17
<beschmi>
should be possible to implement ~?l:v => ?l:(Some v) with camlp4
2005-09-13
<twobitsprite>
Smerdyakov: ... in certain ways, mind you... for the most part I'm much happier in OCaml, but there are certain aspects of SML that might drive me to learn camlp4 to implement in OCaml :P
2005-09-05
<twobitsprite>
what kind of parsers can one describe in camlp4?
2005-09-02
<twobitsprite>
someone in here earlier today gave me a really good tutorial on the camlp4 system and I seem to have lost the link... anyone know what that might be?
2005-09-01
<twobitsp1ite>
i.e. one could (if masochistic enough) write a Perl compiler in camlp4...
<twobitsp1ite>
hmm... so theoretically, you could write a camlp4 "application(?)" that would compile an existing language into ocaml...?
<Msandin>
camlp4 is a ocaml pre-processor/parser which can be used instead of the standard one when using ocamlc etc, it is extensible. ie camlp4 is a neat macro system for ocaml. the author of it used it to construct, among other things, the revised syntax
<twobitsp1ite>
so, camlp4 is a macro system for ocaml?
<twobitsp1ite>
er... I'm not familiar with camlp4... I was just assuming camlp4 was just another name for the "revized syntax"...
<Msandin>
what do you want that camlp4 can't do?
<Msandin>
ocaml+camlp4 united under one syntax would be a much more convinient environment for syntactic extensions, converting everyone to revised is a non-starter, and so it should be declared deprecated and done in
<Msandin>
the revised syntax is an improvement, but it should be put to sleep, camlp4 lacks a lot of it's potential modularity because the exposed grammar stubs so few in order to keep them common to both syntaxes
2005-08-07
<petter>
I suppose it's not that bad, I just like to think up things to use camlp4 for
<petter>
just to let camlp4 do some work for you, writing "let a = Int 1" is specifying the type information twice