[Haskell-cafe] Can I use String without "" in ghci?

yi lu zhiwudazhanjiangshi at gmail.com
Sun Sep 1 08:02:54 CEST 2013


I want to know if it is possible that I use strings without "".

If I type
*Prelude>foo bar*
which actually I mean
*Prelude>foo "bar"*
However I don't want to type ""s.

I have noticed if *bar* is predefined or it is a number, it can be used as
arguments. But can other strings be used this way? Like in bash, we can use
*ping 127.0.0.1* where *127.0.0.1* is an argument.

If not, can *foo* be defined as a function so that it recognize arguments
like *bar* as *"bar"*?


Thanks,
Yi Lu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130901/9cf50083/attachment.htm>


More information about the Haskell-Cafe mailing list