Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /tests/trunk/bugs/tests.obsolete/bug1231.sml
ViewVC logotype

View of /tests/trunk/bugs/tests.obsolete/bug1231.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2460 - (download) (annotate)
Sat Apr 28 20:18:10 2007 UTC (12 years, 1 month ago) by gkuan
File size: 812 byte(s)
(* bug1231.sml *)

signature CONS =
    sig
	type 'a sign
	type 'a constructor

	val new   : {name   : string,
		     signa  : 'a sign} -> 'a constructor
		    
    end;

structure Cons : CONS =
    struct

	    datatype sort =
		SUB		
	      | CSUB     	

	    datatype datacon = DCON of {name    : string,
					arity   : int,
					sign    : sort list,
					sort    : sort,
					strict  : bool}

	    type 'a constructor = datacon
	    datatype 'a sign = Sign of {sign : sort list, sort : sort, strict : bool}

	    fun new {name,signa=Sign{sign,sort,strict}} =
		DCON {name=name,
		      arity=List.length sign,
		      sign=sign,
		      sort=sort,
		      strict=strict
		      }

    end;

signature B =
    sig
	structure Cons : Cons
    end;

structure B :> B =
    struct
	structure Cons = Cons
    end;

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0