|
FISH READY REFERENCE | |||||||||
|
ConstantsArray Constructorsget names the unique entry of a zero-dimensional array. if applied to a variable then the result is a variable: if aplied to an expression then the result is an expression. Hence, get has two typing rules:t : var [a] t : exp [a] ------------- ------------- get t : var a get t : exp aSub-arrays of arrays with one or more dimensions are named by sub. Its two rules are
t : var [a] i : int t : exp [a] i : int
-------------------- ---------------------
sub(t,i) : var a sub(t,i) : exp a
Shape expressionsd_shape: #d zerodim: #X -> #[X] succdim: size -> #[X] -> #[X] undim: #[X] -> #X lendim: #[X] -> size preddim: #[X] -> #[X] numdim: #[X] -> size equal: #X -> # X -> fact Commandsoutput: X -> comm skip: comm abort: comm assign: var X -> X -> comm seq: comm -> comm -> comm forall: int -> int -> (int-> comm) -> comm whileTrue: bool -> comm-> comm fix: (comm -> comm) -> comm newvar: #X -> (var X -> comm) -> comm newexp: #X -> (var [X] -> comm) -> X Phrase polymorphic constantscond: bool -> V -> V -> V primrec: (size -> V -> V) -> V -> size -> V error: V shape: V -> #V null: #V -> V |
|||||||||
|
Page Last Updated: Friday, 07-Aug-1998 21:33:15 EST
|
![]()
Main |
Announcement |
Latest Paper |
Distribution |
Tutorial Please feel free to send any comments.
Copyright Barry Jay © 1998
|