Dear All,

For finishing properly the creation of a plugin for Haskell, I need to add the 
following modifications in a file named init-haskell.scm that I wrote by 
analogy on what I observed for some other Texmacs plugins (but without having a 
real understanding of how that works).
I want to modify (haskell-serialize lan t) by adding:

[1]  :  (string-replace s "\"" "''")  "\n")

In order to substitute two simple quotes by on double quote.
With that the plugin can accept the definition of a string like 
name = "blabla"

I also nees the following :

[2]   :  (string-replace s "\n" "~")  "\n")

That is for interpreting multiline expressions, or some code with Haskell 
indentation.

When only [1] or [2] is introduced, that produces the expected result, but I 
don’t know how to get both of then.

For example if I try 

(define (haskell-serialize lan t)
  (with u (pre-serialize lan t)
    (with s (texmacs->code (stree->tree u))
       (string-append  (string-replace s "\"" "''")  "\n")
       (string-append  (string-replace s "\n" "~")  "\n")
      )))

, then in that case only the last replacement is implemented...

Greetings,
Bertrand
_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to