[MLton] Bug in monomorphise(?)

Matthew Fluet fluet at tti-c.org
Wed Jul 4 09:17:33 PDT 2007


Confirmed.  I probably won't get a chance to look at this until the end of 
the week.  But, the fact that all of the xml passes type-check does point 
to a bug in monomorphise.

> Attempt to compile the program (which uses stuff from mltonlib)
>
> (* <--- test.mlb *)
> local
>   $(MLTON_LIB)/com/ssh/extended-basis/unstable/basis.mlb
>   $(MLTON_LIB)/com/ssh/generic/unstable/lib-with-default.mlb
>
>  test.sml
> in
> end
> (* ---> *)
>
> (* <--- test.sml *)
> val () = let
>  open Generic
> in
>   app (println o Word.toString o hash largeInt)
>       [12345678910,
>        12345678911,
>        11987654321]
> end
> (* ---> *)
>
> with latest MLton from the trunk, produces the following compiler
> output (-verbose 2 -type-check true):
>
> MLton starting
> MLton MLTONVERSION (built Tue Jul 03 22:53:10 2007 on grape)
> 	  monomorphise starting
> 	  monomorphise finished in 0.26 + 0.23 (47% GC)
> 	  typeCheck starting
> 	    typeCheck starting
> Type error: type mismatch
> (list_0 * Sum.sum_0 -> bool * Lazy.status_0 ref ref)
> * (WithTypeInfo.s_0
>   * ((Sum.sum_0 * Sum.sum_0 -> bool)
>      * ((Sum.sum_0 * Sum.sum_0 -> Primitive.Order.t_0)
> 	  * ((unit -> Sum.sum_0)
> 	     * ((Sum.sum_0 * Sum.sum_0 -> bool)
> 	        * ((Sum.sum_0 * Sum.sum_0 -> Primitive.Order.t_0)
> 		   * ((unit -> Sum.sum_0)
> 		      * (WithArbitrary.t_0
> 			 * ((Sum.sum_0 -> word32 * word32 -> word32 ->
> 			 word32)
> 			   * unit)))))))))
> ->  word32
> (list_0 * Sum.sum_0 -> bool * Lazy.status_0 ref ref)
> * (WithTypeInfo.s_0
>   * ((Sum.sum_0 * Sum.sum_0 -> bool)
>      * ((Sum.sum_0 * Sum.sum_0 -> Primitive.Order.t_0)
> 	  * ((unit -> Sum.sum_0)
> 	     * (WithArbitrary.t_0
> 	       * ((Sum.sum_0 -> word32 * word32 -> word32 -> word32) * 
> unit))))))
> ->  word32
> val x_0 =
>  x_1
> val x_0 =
>  x_1



More information about the MLton mailing list