yeah, os(1) is your friend.

but you need to watch out for the fact that files have different names inside
inferno and out. i usually knock up a little script to translate the names
(there's no universally correct answer, so it varies somewhat each time,
depending on your conventional namespace)

for example, here's part of the script i'm using currently, running
inferno under macos, and using
the windows F# compiler running on a remote computer
(mounted on /n/remote, with /n/remote/cmd mounted on /cmd)

load regex std
assemblies=(...)

subfn ftrans {
        emuroot := ${unquote "{cat /n/remote/env/emuroot}}
        ifs := '
'
        f := $1
        if{! match '^[a-zA-Z]:[\\/]' $f} {
                if{! ~ $f '/*'}{
                        f = `{pwd}^/$f
                }
                if{! ~ $f '/n/remote/*'}{
                        echo $f is not in remote namespace
                }
                f = ${re s '^/n/remote' '' $f}
                f = ${re sg '/+' '\\' $emuroot/$f}
        }
        result = $f
}

fn osrun {
        os -d ${ftrans .} ${ftrans $1} ${tl $*}
}

fn fsc {
        opts := ()              # --fast-sublanguage-only
        for(i in $assemblies){
                opts = (-r $i) $opts
        }
        osrun 'C:\Program Files\FSharp-1.9.2.9\bin\fsc' $opts $* < /dev/null |
                (sed
                        -e 's/
$//'
                        -e '/^$/d'
                        -e 
's/^([a-zA-Z0-9.]+)\(([0-9]+),([0-9]+)\)/\1:\2-#0+#\3;+0/'
                        -e 's/error: FS[[0-9]+: //')
}

Reply via email to