Skip to content

Wiki about apostrophes #292

@kstarikov

Description

@kstarikov

In https://github.com/Frege/frege/wiki/LYAH-adaptions-for-Frege#babys-first-functions-subject-to-review-by-mmhelloworld :

In Frege, the apostrophe is only allowed at the end of a name

But in Frege repl (version 3.24.30) it looks as follows:

frege> conanOBrien' = "It's a-me, Conan O'Brien!"
function conanOBrien' :: String

frege> conanOBrien'
java.lang.NoSuchFieldException: conanOBrien'

By the way, having the apostrophe in the middle of the name leads to the same results:

frege> conanO'Brien = "It's a-me, Conan O'Brien!"
function conanO'Brien :: String

frege> conanO'Brien
java.lang.NoSuchFieldException: conanO'Brien

However, if I define it as a function with an argument, it works:

frege> conanO'Brien a = "It's a-me, Conan O'Brien!" ++ a
function conanO'Brien :: String -> String

frege> conanO'Brien "foo"
It's a-me, Conan O'Brien!foo

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions