<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 13 February 2016 at 08:32, Christopher Allen <span dir="ltr"><<a href="mailto:cma@bitemyapp.com" target="_blank">cma@bitemyapp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Prelude> let myList = [1, 2, 3 :: Integer]</div><div>Prelude> let myList' = myList ++ undefined</div><div><div>Prelude> :t myList</div><div>myList :: [Integer]</div></div><div>Prelude> :t myList'</div><div>myList' :: (?callStack::GHC.Stack.Types.CallStack) => [Integer]</div></div></blockquote><div><br></div><div>Yes, and I think perhaps an even more worrying problem here is that by adding the reference to undefined, myList went from being a thunk to being a function. That is, it will be re-evaluated each time it it used. I made a ticket about this: <a href="https://ghc.haskell.org/trac/ghc/ticket/11383">https://ghc.haskell.org/trac/ghc/ticket/11383</a><br><br></div><div>Cheers<br></div><div>Simon<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>This is on by default and insofar as I've been able to try, it's avoidable in a default GHCi 8.0 REPL session. I'm glad I caught this before our book goes to print in a couple months. We'd managed to avoid talking about implicit parameters in 1,100+ pages of book but now we're forced to acknowledge their existence in the 4th of 32 chapters.<br></div><div><br></div><div>This slipped past the radar more stealthily than the earlier stages of BBP did for 7.10. I was hearing about BBP on the GHC Trac pretty early on for months on end. Was the thinking that people still used implicit parameters for anything or taught them? On the one hand, this is a nice change and something I personally attempted (and failed) to make easier in GHC 7.10. The implementation making the types noisy rankles and didn't seem necessary when I investigated it between 7.8 and 7.10.</div><div><br></div><div>Could you warn us when (educationally relevant?) stuff like this is coming down the pipe before the RC please? Ideally during the design phase. I think this was discussed as part of FTP to avoid future debacles.<br></div><div><br></div><div>This isn't just a pedagogical problem, this is a UX problem. The users don't _care_ that call stack information is being carried around. Why would they? It happens without any mention in the types in almost every other programming language.</div><div><br></div><div><br></div><div>--- Chris Allen</div><div><br></div><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"></div></div></div></div></div>
</div>
<br>_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div></div>