pact icon indicating copy to clipboard operation
pact copied to clipboard

Ticks/symbols do not work with literals

Open emilypi opened this issue 6 years ago • 1 comments

Example:

pact> (+ 'true 'false)
ErrInfo {_errDoc = (interactive):1:5: error: expected: space
(+ 'true 'false) 
    ^            , _errDeltas = [Columns 4 4]}
pact> (+ "true" "false")
"truefalse"

or

pact> (+ '1 '1)
ErrInfo {_errDoc = (interactive):1:5: error: expected: atom
(+ '1 '1) 
    ^     , _errDeltas = [Columns 4 4]}
pact> (+ "1" "1")
"11"
pact> 

This needs to be fixed so that these have confluent behavior

emilypi avatar Sep 20 '19 15:09 emilypi

'true and 'false are valid cases that should work, however '1 is not -- the parser needs ticks to have valid pact atoms after it, and a pact atom cannot begin with a number.

sirlensalot avatar Apr 15 '20 20:04 sirlensalot