Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make functions top-level #104

Closed
julianhyde opened this issue Feb 4, 2022 · 0 comments
Closed

Make functions top-level #104

julianhyde opened this issue Feb 4, 2022 · 0 comments

Comments

@julianhyde
Copy link
Collaborator

Standard ML defines that several functions and operators are top-level, which means that they can be used without their structure name. For example, List.hd can be written hd. A couple have different names: for example vector abbreviates Vector.fromList, and real abbreviates Real.fromInt.

This change adds a test for all top-level functions:

function Qualfied name Comments
val ! : 'a ref -> 'a General.! not yet implemented
val := : 'a ref * 'a -> unit General.:= not yet implemented
val @ : ('a list * 'a list) -> 'a list List.@ not yet implemented
val ^ : string * string -> string String.^ not yet implemented
val app : ('a -> unit) -> 'a list -> unit List.app
val before : 'a * unit -> 'a General.before not yet implemented
val ceil : real -> int Real.ceil
val chr : int -> char Char.chr (*) not yet implemented
val concat : string list -> string String.concat
val exnMessage : exn -> string General.exnMessage not yet implemented
val exnName : exn -> string General.exnName not yet implemented
val explode : string -> char list String.explode
val floor : real -> int Real.floor
val foldl : ('a*'b->'b)-> 'b -> 'a list -> 'b List.foldl
val foldr : ('a*'b->'b)-> 'b -> 'a list -> 'b List.foldr
val getOpt : ('a option * 'a) -> 'a Option.getOpt
val hd : 'a list -> 'a List.hd
val ignore : 'a -> unit General.ignore
val implode : char list -> string String.implode
val isSome : 'a option -> bool Option.isSome
val length : 'a list -> int List.length
val map : ('a -> 'b) -> 'a list -> 'b list List.map
val not : bool -> bool Bool.not
val null : 'a list -> bool List.null
val o : ('a->'b) * ('c->'a) -> 'c->'b General.o not yet implemented
val ord : char -> int Char.ord not yet implemented
val print : string -> unit TextIO.print not yet implemented
val real : int -> real Real.fromInt
val ref : 'a -> 'a ref primitive not yet implemented
val rev : 'a list -> 'a list List.rev
val round : real -> int Real.round
val size : string -> int String.size
val str : char -> string String.str
val substring : string * int * int -> string String.substring
val tl : 'a list -> 'a list List.tl
val trunc : real -> int Real.trunc
val use : string -> unit implementation dependent
val valOf : 'a option -> 'a Option.valOf
val vector : 'a list -> 'a vector Vector.fromList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant