Giter Club home page Giter Club logo

pmod_transform's People

Contributors

bjorng avatar josevalim avatar norton avatar uabboli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pmod_transform's Issues

Please crease tag

Could you please create an X.Y.Z tag, so that rebar's semver can create succinct directory name for this dependency?

compile error

when compile the paramtered module occur this error:
error in parse transform 'pmod_pt': {function_clause,
[{pmod_pt,expr,
[{record_index,71,buff,{atom,71,id}},
{pmod, ...}],
[{file,"./pmod_transform/pmod_pt.erl"},
{line,296}]}
]}

behaviour won't work on a module transformed by pmod_pt

Related to: rabbitmq/erlando#12 (comment)

It seems a module can't have both -behaviour(..) and -compile({parse_transform, pmod_pt}) at the same time. I think the reason is behaviour tries to validate callback functions after pmot_pt is applied(?)

state_t.erl

-module(state_t, [InnerMonad]).
-compile({parse_transform, do}).
-compile({parse_transform, pmod_pt}).

-behaviour(monad).
-export(['>>='/2, return/1, fail/1]).
...

monad.erl

behaviour_info(callbacks) ->
    [{'>>=',  2},
     {return, 1},
     {fail,   1}];

state_t module doesn't compile:

src/state_t.erl:21: undefined callback function '>>='/2 (behaviour 'monad')
src/state_t.erl:21: undefined callback function fail/1 (behaviour 'monad')
src/state_t.erl:21: undefined callback function return/1 (behaviour 'monad')

If I remove -behaviour(monad), it compiles. Note that each function has an extra parameter (e.g. '>>='/3, not '>>='/2)

Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.1  (abort with ^G)
...
3> state_t:module_info().
[{exports,[{'>>=',3},
           {return,2},
           {fail,2},
           {get,1},
           {put,2},
           {eval,3},
           {exec,3},
           {run,3},
           {modify,2},
           {modify_and_return,2},
           {lift,2},
           {new,1},
           {instance,1},
           {module_info,0},
           {module_info,1}]},

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.