Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion GHCi Problems
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ketil Malde  
View profile  
 More options Mar 21 2003, 4:08 am
Newsgroups: comp.lang.functional
From: "Ketil Malde" <ket...@ii.uib.no>
Date: 21 Mar 2003 09:52:57 +0100
Local: Fri, Mar 21 2003 3:52 am
Subject: Re: GHCi Problems

r...@163.com (Liu Junfeng) writes:
> wno...@ugcs.caltech.edu (Aaron Denney) wrote in message <news:slrnb7l2ql.bcf.wnoise@hork.ugcs.caltech.edu>...
>> On 20 Mar 2003 19:23:05 -0800, Liu Junfeng <r...@163.com> wrote:
>>> I find that Haskell interpreter is rather difficult to use:
>>> 1."f=3" is a legal statement in Haskell, i.e. define "f" as a
>>> constant function, but a parse error occurs. "let f=3" is illegal,
>>> "let" and "in" are used together, but it works in GHCi.
>> GHCi doesn't directly let you enter Haskell statements.
> Why not,

I've no idea if this is the reason, but I like to think about GHCi as
running the IO monad.  So you can enter things like

        x <- readFile "foo"

and actually have x be the contents of that file.  Frankly, I don't
see the problem of using 'let' to assign values.

> the Python interpreter is a good example.

Do you actually use the interpreter to enter real programs?  I always
use an editor for that, and I find GHCi at least as comfortable as the
Python interactive.  (But I'm of course not a Python expert)

(Perhaps it'd be possible to have a (user defined?) command to edit a
function, which could, for instance, bring up an emacs window (using
gnuclient) with the correct file, narrowed to the appropriate
function?)

-kzm
--
If I haven't seen further, it is by standing in the footprints of giants


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.