cvs commit: fptools/ghc/compiler/ghci InteractiveUI.hs
Marcin 'Qrczak' Kowalczyk
23 Mar 2001 00:14:17 GMT
I haven't seen replies for this, so I hope it was forgotten and not rejected:
11 Feb 2001 15:07:37 GMT, Marcin 'Qrczak' Kowalczyk <firstname.lastname@example.org> pisze:
> Sun, 11 Feb 2001 06:33:27 -0800, Simon Marlow <email@example.com> pisze:
> > :def <name> <expr>
> > :undef <name>
> > :def defines a new command, :<name>, with the semantics that
> > (<expr> :: String -> IO String)
> Please consider the syntax
> which defines :<name>, the function name of <funbind>, to execute
> (let <name> :: String -> IO String; <funbind> in <name>)
> so that we can write
>:def date _ = Time.getClockTime >>= print >> return ""
>:def mycd s = Directory.setCurrentDirectory s >> return ""
> We can also try to unify the return type with (), not only String,
> and treat () as "". This would require to either check the type
> after compilation instead of using textual ":: String -> IO String"
> or write a private class with instances for String and (). Generally
> I think it's best to avoid working on the source text (what if String
> is redefined in this context?).
__("< Marcin Kowalczyk * firstname.lastname@example.org http://qrczak.ids.net.pl/
^^ SYGNATURA ZASTĘPCZA