[Haskell-cafe] How to read a file and return a String?

2013-09-04 Thread yi lu
it into *[String]* with *lines*function. Here is what I have tried. linkhttps://github.com/eccstartup/findDict/blob/master/src/Data/Dict/Utils.hsI think I could directly operate on *[String]*. But it is not true for me. [1] http://www.haskell.org/hoogle/?hoogle=IO+String+-%3E+String Yi Lu

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

2013-09-01 Thread yi lu
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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

[Haskell-cafe] How can I use ghci more wisely?

2013-07-23 Thread yi lu
I am wondering how can I ask ghci to show an infinite list wisely. When I type *fst ([1..],[1..10])* The result is what as you may guess *1,2,3,4,...*(continues to show, cut now) How could I may ghci show *[1..]* this wise way not the long long long list itself? Yi