-
Notifications
You must be signed in to change notification settings - Fork 16
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
Os stdlib module and separation of Eval/External module #139
base: master
Are you sure you want to change the base?
Conversation
lib/Os.fram
Outdated
|
||
pub let fileExists = (extern dbl_fileExists : String ->[IO] Bool) | ||
|
||
pub let isDirectory {`re : {X} -> Unit -> [|_]X } name = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with existing code:
pub let isDirectory {`re : {X} -> Unit -> [|_]X } name = | |
pub let isDirectory {`re : {X} -> Unit ->[|_] X } name = |
lib/Os.fram
Outdated
then (extern dbl_isDirectory : String ->[IO] Bool) name | ||
else `re () | ||
|
||
pub let isRegularFile {`re : {X} -> Unit -> [|_]X } name = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here:
pub let isRegularFile {`re : {X} -> Unit -> [|_]X } name = | |
pub let isRegularFile {`re : {X} -> Unit ->[|_] X } name = |
lib/Os.fram
Outdated
pub let getUnixTime = (extern dbl_getUnixTime : Unit ->[IO] Int) | ||
|
||
(* calculate date and time stamp from unix time *) | ||
pub let getTime {`re : {X} -> Unit -> [|_]X } () = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here:
pub let getTime {`re : {X} -> Unit -> [|_]X } () = | |
pub let getTime {`re : {X} -> Unit ->[|_] X } () = |
Looking at external function list made me think that there are too many of them for one file, so i seperated them into modules making it easier for extending functionality. Implemented functionality that will allow for some system manipulation, accessing environment variables, program arguments and system time. Can be extended if there will be need for it.
Looking at external function list made me think that there are too many
of them for one file, so i seperated them into modules making it easier
for extending functionality.
Implemented functionality that will allow for some system manipulation,
accessing environment variables, program arguments and system time.
Can be extended if there will be need for it.
Didn't write any tests since it's almost only linking of external functions from ocaml.
This PR is dependent on #126