mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
e58bcfc7ef
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
20 lines
349 B
Idris
20 lines
349 B
Idris
module StringLiterals
|
|
|
|
hello : FromString a => a
|
|
hello = "Hello"
|
|
|
|
helloName : String -> String
|
|
helloName name = "\{hello {a = String}} \{name}"
|
|
|
|
welcomeName : String -> String
|
|
welcomeName name = """
|
|
\{helloName name}
|
|
and welcome!
|
|
"""
|
|
|
|
scareQuotes : String
|
|
scareQuotes = #""hello""#
|
|
|
|
test : StringLiterals.scareQuotes = "\"hello\""
|
|
test = Refl
|