caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Type Encoding Format Control
@ 2015-08-18 17:06 Kenneth Adam Miller
  2015-08-18 18:57 ` Hendrik Boom
  2015-08-25 12:09 ` [Caml-list] <DKIM> " Pierre Chambart
  0 siblings, 2 replies; 12+ messages in thread
From: Kenneth Adam Miller @ 2015-08-18 17:06 UTC (permalink / raw)
  To: caml users

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

I was wondering if cases where format control is possible in typing
constructs can allow things like restricting the implementation size after
compilation of a specific variant type. Say, for instance that I wanted to
have a malloc implementation instead of returning a Some 'a | None type
that compiles down to a boxed case of first a word and then the subsequent
'a instance, down to the 'a instance, where in the values of the word enum
(or tag) are not present in the possibilities of the 'a instance.

Maybe it sounds silly, but in really tight loops you want to squeeze for
efficiency. So I was wondering if maybe the same actual code be used with
the same sanity of type checking, but some annotation provided at the type
declaration to allow such optimization to take place.

[-- Attachment #2: Type: text/html, Size: 845 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-08-25 12:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-18 17:06 [Caml-list] Type Encoding Format Control Kenneth Adam Miller
2015-08-18 18:57 ` Hendrik Boom
2015-08-18 19:01   ` Kenneth Adam Miller
2015-08-18 19:44     ` Gabriel Scherer
2015-08-18 19:55       ` Kenneth Adam Miller
2015-08-18 19:58         ` Gabriel Scherer
2015-08-20  9:10       ` Goswin von Brederlow
2015-08-20 13:08         ` Kenneth Adam Miller
2015-08-20 14:05           ` David Allsopp
2015-08-20 14:09             ` Kenneth Adam Miller
2015-08-20 14:11               ` Kenneth Adam Miller
2015-08-25 12:09 ` [Caml-list] <DKIM> " Pierre Chambart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).