<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>I think you’re right—this is our current hypothesis. I do think it would be 
kinder to complain about the â€“define, in the case where the parse transform 
fails... since it’s the error in the define which CAUSES the parse transform to 
fail! Maybe a failing parse_transform could be treated as an identity function 
as far as other errors are concerned... although, of course, there could be a 
LOT of other errors caused by the parse transform failing to run!</DIV>
<DIV> </DIV>
<DIV>Damned if you do, damned if you don’t!</DIV>
<DIV> </DIV>
<DIV>Thanks for joining in the fun <IMG class="wlEmoticon wlEmoticon-smile" 
style="BORDER-TOP-STYLE: none; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none" 
alt=Smile src="cid:C767FF5263034993AB70E4ADE5478718@JohnsTablet2014"></DIV>
<DIV> </DIV>
<DIV>John</DIV>
<DIV 
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A 
title=jose.valim@plataformatec.com.br 
href="mailto:jose.valim@plataformatec.com.br">José Valim</A> </DIV>
<DIV><B>Sent:</B> Monday, January 30, 2017 5:00 PM</DIV>
<DIV><B>To:</B> <A title=alex0player@gmail.com 
href="mailto:alex0player@gmail.com">Alex S.</A> </DIV>
<DIV><B>Cc:</B> <A title=john.hughes@quviq.com 
href="mailto:john.hughes@quviq.com">John Hughes</A> ; <A 
title=erlang-questions@erlang.org 
href="mailto:erlang-questions@erlang.org">Erlang</A> </DIV>
<DIV><B>Subject:</B> Re: [erlang-questions] For your amusement--why doesn't this 
compile?</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV 
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV dir=ltr>My bet is that the parse transform fails before a warning/error is 
emitted for the bad -define declaration. 
<DIV> </DIV>
<DIV>I am not sure there is much it could do, given the parse_transform itself 
could rewrite -define(Foo) to mean something else, disappearing with the error 
in the first place.</DIV>
<DIV>
<DIV class=gmail_extra>
<DIV>
<DIV class=gmail_signature data-smartmail="gmail_signature">
<DIV dir=ltr>
<DIV>
<DIV> </DIV>
<DIV><SPAN style="FONT-SIZE: 13px">
<DIV><SPAN 
style="FONT-SIZE: 13px; FONT-FAMILY: arial,sans-serif; BORDER-COLLAPSE: collapse"><B>José 
Valim</B></SPAN></DIV>
<DIV><SPAN 
style="FONT-SIZE: 13px; FONT-FAMILY: arial,sans-serif; BORDER-COLLAPSE: collapse">
<DIV><SPAN style="FONT-SIZE: x-small; FONT-FAMILY: verdana,sans-serif"><A 
style="COLOR: rgb(42,93,176)" href="http://www.plataformatec.com.br/" 
target=_blank>www.plataformatec.com.br</A></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: x-small; FONT-FAMILY: verdana,sans-serif">Skype: 
jv.ptec</SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: x-small; FONT-FAMILY: verdana,sans-serif">Founder 
and Director of 
R&D</SPAN></DIV></SPAN></DIV></SPAN></DIV></DIV></DIV></DIV></DIV>
<DIV> </DIV>
<DIV class=gmail_quote>On Mon, Jan 30, 2017 at 4:50 PM, Alex S. <SPAN 
dir=ltr><<A href="mailto:alex0player@gmail.com" 
target=_blank>alex0player@gmail.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
  <DIV style="WORD-WRAP: break-word">It’s considered an unknown module 
  attribute, and those aren’t errors.<BR>
  <DIV>
  <BLOCKQUOTE type="cite">
    <DIV>30 ÑÐ½Ð². 2017 Ð³., Ð² 18:38, <A href="mailto:john.hughes@quviq.com" 
    target=_blank>john.hughes@quviq.com</A> Ð½Ð°Ð¿Ð¸ÑÐ°Ð»(а):</DIV>
    <DIV> </DIV>
    <DIV>
    <DIV style="WORD-WRAP: break-word" dir=ltr>
    <DIV dir=ltr>
    <DIV style="FONT-SIZE: 12pt; FONT-FAMILY: calibri">
    <DIV>So why isn’t that reported as an error?</DIV>
    <DIV> </DIV>
    <DIV>John</DIV>
    <DIV 
    style="FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: calibri; FONT-WEIGHT: normal; FONT-STYLE: normal; DISPLAY: inline">
    <DIV style="FONT: 10pt tahoma">
    <DIV> </DIV>
    <DIV style="BACKGROUND: #f5f5f5">
    <DIV><B>From:</B> <A title=alex0player@gmail.com 
    href="mailto:alex0player@gmail.com" target=_blank>Alex S.</A> </DIV>
    <DIV><B>Sent:</B> Monday, January 30, 2017 4:31 PM</DIV>
    <DIV><B>To:</B> <A title=john.hughes@quviq.com 
    href="mailto:john.hughes@quviq.com" target=_blank>john.hughes@quviq.com</A> 
    </DIV>
    <DIV><B>Cc:</B> <A title=erlang-questions@erlang.org 
    href="mailto:erlang-questions@erlang.org" 
    target=_blank>erlang-questions@erlang.org</A> </DIV>
    <DIV><B>Subject:</B> Re: [erlang-questions] For your amusement--why doesn't 
    this compile?</DIV></DIV></DIV>
    <DIV> </DIV></DIV>
    <DIV 
    style="FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: calibri; FONT-WEIGHT: normal; FONT-STYLE: normal; DISPLAY: inline">
    <DIV> </DIV>
    <DIV>
    <BLOCKQUOTE type="cite">
      <DIV>30 ÑÐ½Ð². 2017 Ð³., Ð² 18:24, <<A href="mailto:john.hughes@quviq.com" 
      target=_blank>john.hughes@quviq.com</A>> <<A 
      href="mailto:john.hughes@quviq.com" 
      target=_blank>john.hughes@quviq.com</A>> Ð½Ð°Ð¿Ð¸ÑÐ°Ð»(а):</DIV>
      <DIV> </DIV>
      <DIV>
      <DIV dir=ltr>
      <DIV dir=ltr>
      <DIV style="FONT-SIZE: 12pt; FONT-FAMILY: calibri">
      <DIV>Here’s a behaviour that’s had me tearing my hair today. Consider this 
      module:</DIV>
      <DIV> </DIV>
      <DIV>-module('Aaargh!!').</DIV>
      <DIV>-define(PLEASE_DONT).</DIV>
      <DIV>-ifndef(PLEASE_DONT).</DIV>
      <DIV>-compile({parse_transform,<WBR>undefined_parse_transform}).</DIV>
      <DIV>-endif.</DIV>
      <DIV> </DIV>
      <DIV>It fails to compile, with one simple error message:</DIV>
      <DIV> </DIV>
      <DIV>20> c('Aaargh!!').</DIV>
      <DIV>Aaargh!!.erl: undefined parse transform 
      'undefined_parse_transform'</DIV>
      <DIV>error</DIV>
      <DIV> </DIV>
      <DIV>If you can see why, you’re more an Erlang wizard than I am!</DIV>
      <DIV> </DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE>Easy enough, there’s 
    no one-argument define().</DIV>
    <DIV> </DIV>
    <DIV>Define it to true if you don’t care about the value.</DIV>
    <DIV> </DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
  <DIV> </DIV></DIV><BR>______________________________<WBR>_________________<BR>erlang-questions 
  mailing list<BR><A 
  href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</A><BR><A 
  href="http://erlang.org/mailman/listinfo/erlang-questions" rel=noreferrer 
  target=_blank>http://erlang.org/mailman/<WBR>listinfo/erlang-questions</A><BR><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>