<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I find if I run “<font face="Courier New" class="">stack ghci intero</font>” (remove the “<font face="Courier New" class="">—with-ghc</font>”) from terminal, then the issue will not occur. Does anyone have idea why?<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 23, 2017, at 9:58 PM, 乃潇 张 <<a href="mailto:zhangnaixiao@me.com" class="">zhangnaixiao@me.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi, I am trying to define some functions in a REPL window of emacs intero. However, I always got "<font face="Courier New" class="">parse error on input ‘=’</font>” as blow:<div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">Starting:</font></div><div class=""><font face="Courier New" class=""> 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</font></div><div class=""><font face="Courier New" class="">Intero 0.1.20 (GHC 8.0.2)</font></div><div class=""><font face="Courier New" class="">Type :intro and press enter for an introduction of the standard commands.</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""> addTwo x y = x + y</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><interactive>:2:12: error:</font></div><div class=""><font face="Courier New" class=""> parse error on input ‘=’</font></div><div class=""><font face="Courier New" class=""> Perhaps you need a 'let' in a 'do' block?</font></div><div class=""><font face="Courier New" class=""> e.g. 'let x = 5' instead of 'x = 5’</font></div></div><div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Sid</div></div>_______________________________________________<br class="">Beginners mailing list<br class=""><a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners<br class=""></div></blockquote></div><br class=""></div></body></html>