In a file being consulted, the statement export _A/2. should trigger a syntax error , like export _A/2. ^Syntax error 'test.pro', line 2: Illegal token after primary expression It currently fails to do so, instead producing an Internal error.