Just thinking out loud here, but could one write their own Prelude which just imports hiding (head), adds a new definition of head, and reexports the lot. Then add this new Prelude higher in the search path perhaps?<span></span><div><br>On Monday, 14 March 2016, Han Joosten <<a href="mailto:han.joosten.han@gmail.com">han.joosten.han@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks all! Plenty good options, fortunately I found my bug pretty fast by simple code inspection :))</div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-12 4:28 GMT+01:00 Chris Wong <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','lambda.fairy@gmail.com');" target="_blank">lambda.fairy@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Sat, Mar 12, 2016 at 8:07 AM, Jonas Scholl<br>
<<a href="javascript:_e(%7B%7D,'cvml','anselm.scholl@tu-harburg.de');" target="_blank">anselm.scholl@tu-harburg.de</a>> wrote:<br>
> You mean like this?<br>
><br>
> default-extensions: CPP<br>
> cpp-options:<br>
> -Dhead=(foldr(const)(error("head:\x20\x65mpty\x20list\x20in\x20"++__FILE__++":"++show(__LINE__))).(take$1))<br>
<br>
</span>That's pretty cool!<br>
<br>
By the way: can the (take$1) be removed? foldr should be lazy enough already.<br>
<span><font color="#888888"><br>
--<br>
Chris Wong (<a href="https://lambda.xyz" rel="noreferrer" target="_blank">https://lambda.xyz</a>)<br>
<br>
"I had not the vaguest idea what this meant and when I could not<br>
remember the words, my tutor threw the book at my head, which did not<br>
stimulate my intellect in any way." -- Bertrand Russell<br>
</font></span><div><div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','Haskell-Cafe@haskell.org');" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>
</blockquote></div>