Skip to content

string/interp can't handle strings composed with str #456

@jmglov

Description

@jmglov

It would be nice to be able to build up long strings for interpolation like so:

(let [foo 1
      bar :baz]
  (string/interp (str "foo: $foo$" ", bar: $bar$")))

However, it throws the following error:

ERROR: 
 in pixie function repl_fn

in pixie/repl.pxi at 27:24
               (let [x (eval form)]
                       ^
in internal function eval

in pixie function interp

in /home/jmglov/Documents/code/pixie/pixie/string.pxi at 120:7
      (starts-with? txt "$")
      ^
in internal function starts-with

in internal function name

in polymorphic function -name dispatching on pixie.stdlib.Cons

RuntimeException: :pixie.stdlib/AssertionException No override for pixie.stdlib.Cons on -name in protocol INamed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions