mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-22 11:13:36 +03:00
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
|