Add support for SOFT_SPACE

This commit is contained in:
John J. Camilleri
2021-02-16 14:57:33 +01:00
parent 23e49cddb7
commit 21f14c2aa1
6 changed files with 13 additions and 7 deletions

View File

@@ -6,4 +6,5 @@ abstract Bind = {
concat : S -> S -> S ;
bind : S -> S -> S ;
softbind : S -> S -> S ;
softspace : S -> S -> S ;
}

View File

@@ -12,3 +12,6 @@ BindCnc: hello theregoodbye
Bind: softbind f1 f2
BindCnc: hello theregoodbye
Bind: softspace f1 f2
BindCnc: hello there goodbye

View File

@@ -3,3 +3,4 @@ f2
concat f1 f2
bind f1 f2
softbind f1 f2
softspace f1 f2

View File

@@ -7,4 +7,5 @@ concrete BindCnc of Bind = open Prelude in {
concat a b = ss (a.s ++ b.s) ;
bind a b = ss (a.s ++ BIND ++ b.s) ;
softbind a b = ss (a.s ++ SOFT_BIND ++ b.s) ;
softspace a b = ss (a.s ++ SOFT_SPACE ++ b.s) ;
}