Questions tagged [parse-transform]

7 questions
6
votes
1 answer

Why are programmers "strongly advised not to engage in parse transformations"?

According to the erl_id_trans documentation: Programmers are strongly advised not to engage in parse transformations and no support is offered for problems encountered. Why are programmers strongly advised not to use parse_transform/2? Will this…
justin
  • 3,357
  • 1
  • 23
  • 28
4
votes
1 answer

Lager - Parse Transforms

I have added Lager to my application using rebar. It compiles fine and Lager starts ok when I start my app. However, I get undef messages when I call lager:debug/1 which tells me that the lager_transform parse transformation is not being picked up,…
Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116
4
votes
2 answers

Lager calls failing during Common Test test runs

I decided to setup lager in my Erlang project. I am using erlang.mk, so I added ERLC_OPTS = +'{parse_transform, lager_transform}' to my Makefile. I can run make all and compile the modules without errors. I can also start an erl console and run…
Stratus3D
  • 4,648
  • 4
  • 35
  • 67
4
votes
1 answer

How would you add capabilities to Erlang without making a new language?

I was wondering how someone would go about adding Capability-based security to Erlang without making it into a new language and preserving maximum backwards compatibility on the application side?
Eric des Courtis
  • 5,135
  • 6
  • 24
  • 37
2
votes
1 answer

erlang: function called with real 'fun' should be transformed with parse_transform?

I'm looking at the O'Reilly Erlang Programming book and there's an example that is run in the erlang shell that looks like this: 17> MS = ets:fun2ms(fun({Name,Country,Job}) when Job /= cook -> [Country,Name] end). [ ....an erlang…
Sniggerfardimungus
  • 11,583
  • 10
  • 52
  • 97
1
vote
1 answer

Erlang parse_transform second parameter

When defining a parse_transform, the function has two parameters: parse_transform(FormsIn, Options) -> FormsOut What is the meaning of the Options parameter? I'm trying to define additional options for transforming.
hairyhum
  • 156
  • 5
0
votes
2 answers

How to use dialyzer with parse transform modules

I'm trying to use dialyzer on my erlang application but here's the output : dialyzer \ --src -r src \ -pa /home/niahoo/src/popos \ -pa /home/niahoo/src/popos/deps/parse_trans \ --verbose Checking whether the PLT…
lud
  • 1,941
  • 20
  • 35