0 | ||| A DYI version of 'string interpolation', mimicking Python 3's 'f-string' syntax
1 | ||| Not as fancy
5 | %inline
11 | %inline
16 | {- Examples:
17 | fstring : String
18 | fstring = let apples = "apples" in
19 | F["I have some ", apples," here."] --- cf. f"I have some {apples} here."
21 | multiline : String
22 | multiline = let name = "Edwin"
23 | profession = "Hacker"
24 | affiliation = "the University of St. Andrews" in --- cf.
25 | F [["Hi ",name,". " ] --- f"Hi {name}. " \
26 | ,["You are a ",profession,". "] --- f"You are a {profession}. " \
27 | ,["You were in ",affiliation,"."] --- f"You were in {affiliation}."
28 | ]
30 | -}