Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Turning off type-checking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-13 (19:31)
From: Lauri Alanko <la@i...>
Subject: Re: [Caml-list] Turning off type-checking
> It would be really nice if there were some command-line flag for the
> OCaml-compilers which turns off every check that is not required under the
> assumption that the given OCaml-code is (type) correct as is guaranteed in
> my case. Would this be easily possible? What else could I do to reduce the
> amount of work the OCaml-compiler has to do? Insert Obj.magic everywhere?

How about enabling -rectypes, defining

type t = t -> t

, casting everything to t with Obj.magic and then operating with this
pseudo-typeless language, and finally casting the values back to their real
types? Then at least you can do function application without casting all the

Lauri Alanko
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: