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
Depend-type beginner question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-05 (16:05)
From: Ashish Agarwal <agarwal1975@g...>
Subject: Re: [Caml-list] Depend-type beginner question
> I can't get how the following could ever be typed at compile time:
>  > if ... then [] else [a]
> Is this a 0-list or a 1-list ? do they just put an existential
> variable -> n-list ? If this is it, it seems to me that you won't be
> able to gain much information.

The type system is not rich enough to distinguish between 0-lists' and
1-list's. It is just a list.