[erlang-questions] Core Erlang problem

Henrique Ferreiro García hferreiro@REDACTED
Sun May 11 15:39:32 CEST 2008


Hello,

I have a problem when compiling from Core:

$ erlc +to_core list.erl
$ erlc +from_core list.core
./list.core:21: syntax error before: LITERAL

Looking at the Core Erlang language specification, there doesn't seem to
exist such a construction.

Can anyone explain what is happening here?

-- 
Henrique Ferreiro García <hferreiro@REDACTED>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: list.erl
Type: text/x-erlang
Size: 78 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080511/5a54869a/attachment.bin>
-------------- next part --------------
module 'list' ['len'/1,
	       'module_info'/0,
	       'module_info'/1]
    attributes []
'len'/1 =
    %% Line 4
    fun (_cor0) ->
	case _cor0 of
	  <[_cor3|Xs]> when 'true' ->
	      let <_cor1> =
		  apply 'len'/1
		      (Xs)
	      in  call 'erlang':'+'
		      (1, _cor1)
	  %% Line 5
	  <[]> when 'true' ->
	      0
	  ( <_cor2> when 'true' ->
		primop 'match_fail'
		    ({'function_clause',_cor2})
	    -| LITERAL<[compiler_generated]> )
	end
'module_info'/0 =
    fun () ->
	call 'erlang':'get_module_info'
	    ('list')
'module_info'/1 =
    fun (_cor0) ->
	call 'erlang':'get_module_info'
	    ('list', _cor0)
end


More information about the erlang-questions mailing list