Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Got "parse error on input ‘=’” in Emacs Intero REPL when define any function (乃潇 张) 2. Re: Got "parse error on input ‘=’” in Emacs Intero REPL when define any function (乃潇 张) 3. Re: Got "parse error on input ‘=’” in Emacs Intero REPL when define any function (baa dg) 4. Re: Got "parse error on input ‘=’” in Emacs Intero REPL when define any function (乃潇 张) ---------------------------------------------------------------------- Message: 1 Date: Tue, 23 May 2017 21:58:41 +0800 From: 乃潇 张 <zhangnaix...@me.com> To: beginners@haskell.org Subject: [Haskell-beginners] Got "parse error on input ‘=’” in Emacs Intero REPL when define any function Message-ID: <04c0433b-3d6a-4de9-abec-488ef5985...@me.com> Content-Type: text/plain; charset="utf-8" Hi, I am trying to define some functions in a REPL window of emacs intero. However, I always got "parse error on input ‘=’” as blow: Starting: stack ghci --with-ghc intero "--docker-run-args=--interactive=true --tty=false" --no-build --no-load --ghci-options -odir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea --ghci-options -hidir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea baby Intero 0.1.20 (GHC 8.0.2) Type :intro and press enter for an introduction of the standard commands. addTwo x y = x + y <interactive>:2:12: error: parse error on input ‘=’ Perhaps you need a 'let' in a 'do' block? e.g. 'let x = 5' instead of 'x = 5’ I did some research, seems like “let” is not a must here for ghci version above 8.0. And my ghc version is 8.0.2. So is it a issue of ghci or intero? Thanks, Sid -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170523/f7530171/attachment-0001.html> ------------------------------ Message: 2 Date: Tue, 23 May 2017 22:04:26 +0800 From: 乃潇 张 <zhangnaix...@me.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Got "parse error on input ‘=’” in Emacs Intero REPL when define any function Message-ID: <a51b1f3c-5568-4b58-8e8d-0ce94d33f...@me.com> Content-Type: text/plain; charset="utf-8" I find if I run “stack ghci intero” (remove the “—with-ghc”) from terminal, then the issue will not occur. Does anyone have idea why? > On May 23, 2017, at 9:58 PM, 乃潇 张 <zhangnaix...@me.com> wrote: > > Hi, I am trying to define some functions in a REPL window of emacs intero. > However, I always got "parse error on input ‘=’” as blow: > > Starting: > stack ghci --with-ghc intero "--docker-run-args=--interactive=true > --tty=false" --no-build --no-load --ghci-options > -odir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea > --ghci-options > -hidir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea > baby > Intero 0.1.20 (GHC 8.0.2) > Type :intro and press enter for an introduction of the standard commands. > > addTwo x y = x + y > > <interactive>:2:12: error: > parse error on input ‘=’ > Perhaps you need a 'let' in a 'do' block? > e.g. 'let x = 5' instead of 'x = 5’ > > I did some research, seems like “let” is not a must here for ghci version > above 8.0. And my ghc version is 8.0.2. So is it a issue of ghci or intero? > > > Thanks, > Sid > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170523/a0f73590/attachment-0001.html> ------------------------------ Message: 3 Date: Tue, 23 May 2017 19:22:04 +0300 From: baa dg <aqua...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Got "parse error on input ‘=’” in Emacs Intero REPL when define any function Message-ID: <calmmzyhpahje8sapkw00eo75jy8rbaxmi0zh733wyuk0sqp...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" try with "let": let f x y = x + y 2017-05-23 17:04 GMT+03:00 乃潇 张 <zhangnaix...@me.com>: > I find if I run “stack ghci intero” (remove the “—with-ghc”) from > terminal, then the issue will not occur. Does anyone have idea why? > > On May 23, 2017, at 9:58 PM, 乃潇 张 <zhangnaix...@me.com> wrote: > > Hi, I am trying to define some functions in a REPL window of emacs intero. > However, I always got "parse error on input ‘=’” as blow: > > Starting: > stack ghci --with-ghc intero "--docker-run-args=--interactive=true > --tty=false" --no-build --no-load --ghci-options -odir=/Users/spike/Code/ > haskell/learn-haskell/baby/.stack-work/intero/intero445zea --ghci-options > -hidir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea > baby > Intero 0.1.20 (GHC 8.0.2) > Type :intro and press enter for an introduction of the standard commands. > > addTwo x y = x + y > > <interactive>:2:12: error: > parse error on input ‘=’ > Perhaps you need a 'let' in a 'do' block? > e.g. 'let x = 5' instead of 'x = 5’ > > I did some research, seems like “let” is not a must here for ghci version > above 8.0. And my ghc version is 8.0.2. So is it a issue of ghci or intero? > > > Thanks, > Sid > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170523/54e7c38f/attachment-0001.html> ------------------------------ Message: 4 Date: Wed, 24 May 2017 09:04:44 +0800 From: 乃潇 张 <zhangnaix...@me.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Got "parse error on input ‘=’” in Emacs Intero REPL when define any function Message-ID: <f6fab073-95b5-4415-bf3e-45bed2f37...@me.com> Content-Type: text/plain; charset="utf-8" Thanks, I know if using “let”, there’ll be no error. My question is: 1. what does option "—with-ghc” do? 2. Is it better to remove “—with-ghc” when running in intero REPL? If yes, how to remove it? > On May 24, 2017, at 12:22 AM, baa dg <aqua...@gmail.com> wrote: > > try with "let": > let f x y = x + y > > 2017-05-23 17:04 GMT+03:00 乃潇 张 <zhangnaix...@me.com > <mailto:zhangnaix...@me.com>>: > I find if I run “stack ghci intero” (remove the “—with-ghc”) from terminal, > then the issue will not occur. Does anyone have idea why? > >> On May 23, 2017, at 9:58 PM, 乃潇 张 <zhangnaix...@me.com >> <mailto:zhangnaix...@me.com>> wrote: >> >> Hi, I am trying to define some functions in a REPL window of emacs intero. >> However, I always got "parse error on input ‘=’” as blow: >> >> Starting: >> stack ghci --with-ghc intero "--docker-run-args=--interactive=true >> --tty=false" --no-build --no-load --ghci-options >> -odir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea >> --ghci-options >> -hidir=/Users/spike/Code/haskell/learn-haskell/baby/.stack-work/intero/intero445zea >> baby >> Intero 0.1.20 (GHC 8.0.2) >> Type :intro and press enter for an introduction of the standard commands. >> >> addTwo x y = x + y >> >> <interactive>:2:12: error: >> parse error on input ‘=’ >> Perhaps you need a 'let' in a 'do' block? >> e.g. 'let x = 5' instead of 'x = 5’ >> >> I did some research, seems like “let” is not a must here for ghci version >> above 8.0. And my ghc version is 8.0.2. So is it a issue of ghci or intero? >> >> >> Thanks, >> Sid >> _______________________________________________ >> Beginners mailing list >> Beginners@haskell.org <mailto:Beginners@haskell.org> >> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners >> <http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners> > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org <mailto:Beginners@haskell.org> > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > <http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners> > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170524/417b0eba/attachment.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 107, Issue 10 ******************************************