Cayenne, a Haskell-style language with a dependent type system, supported this 
sort of thing.  You could write something like:

div :: (x::Int,y::Int)->if x==0 then Void else Int

See: http://www.cs.chalmers.se/~augustss/cayenne/

-Tim

________________________________
From: [email protected] [[email protected]] On Behalf Of 
Jonathan S. Shapiro [[email protected]]
Sent: Monday, January 12, 2009 12:37 AM
To: Discussions about the BitC language
Subject: Re: [bitc-dev] Solver specification?

Related to all this, has anybody seen work on what might be termed 
"conditionally dependent types"? That is, a system where I can write something 
like

  div: x:int y:int -> { x == 0 => Raise DivideByZero; x != 0 => int }


? Is this just match types?
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to