LightAndLight / ipso

A functional scripting language.

Home Page:https://ipso.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't pass literal `$` as command argument

LightAndLight opened this issue · comments

# bad : IO ()                                                                                    
# bad =                                                                                          
#   comp                                                                                   
#     cmd.run `echo dollar sign: \$`          
                                                                              
good : IO ()                                                                           
good =                                                                                    
  comp                                                                                      
    let dollar = "\$"                                                                      
    cmd.run `echo dollar sign: $dollar`                                                
                                                                                              
main : IO ()                                                                                 
main = good

bad gives a syntax error:

test.ipso:4:33: error: expected one of: '"', '$', '${', '`', command fragment, space
  |
4 |     cmd.run `echo dollar sign: \$`
  |                                 ^

good is how I'm working around this.