Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* A propos de "this matching case is unused"
@ 1997-06-04 14:41 Didier Plaindoux
  1997-06-04 17:42 ` Pierre Weis
  0 siblings, 1 reply; 2+ messages in thread
From: Didier Plaindoux @ 1997-06-04 14:41 UTC (permalink / raw)
  To: caml-list

N'ayant pas entrevu de message a ce propos je me permet
de poser la question suivante : 

Soit le code suivant (stupide soit mais pas pour le typage)

# fun x -> x
#   | x -> 1 + x
#;;

La reponse est la suivante :

Toplevel input:
>  | x -> 1 + x
>    ^
Warning: this matching case is unused.
- : int -> int = <fun>

Ma question est la suivante : pourquoi prendre en compte
cette branche lors du typage, qui de ce fait instancie le
type de 'x' par 'int' ? 

D. Plaindoux

-- 
o----------o---------------------------------------o
|S.L.O.O.P.|           Didier PLAINDOUX            |
+----------+        mailto:plaindou@irit.fr        |
|  |\_/|   |  http://www.irit.fr/~Didier.Plaindoux |
|  (o O)   |  Tel : 05 61 55 [ 63 56 | 82 09 ]     |    
|   ( )    |  @   : IRIT,UPS 118 route de Narbonne |
|    O     |        31062 Toulouse France          |
o--------------------------------------------------o





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

end of thread, other threads:[~1997-06-04 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-04 14:41 A propos de "this matching case is unused" Didier Plaindoux
1997-06-04 17:42 ` Pierre Weis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox