Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this syntax mean in Haskell: _|_ or (_|_)

Tags:

haskell

I keep seeing this rather embarrassing thing in many respected documents: _|_ or (_|_)

Cannot find a definition of it (Google doesn't work well with symbols). So what is it anyway?

like image 758
Trident D'Gao Avatar asked Dec 20 '22 22:12

Trident D'Gao


1 Answers

From here:-

Bottom

The mathematical symbol for bottom is '⊥'. That's Unicode character 22A5 hex = 8869 decimal. Also available in HTML as '⊥' and in LaTeX as '\bot' (within math mode). In plain ASCII, it's often written as the extremely ugly character sequence '_|_'.

Also from the reserve keywords in Haskell.

Check the wiki for Bottom and Partial Functions

To define partial functions, we introduce a special value ⊥, named bottom and commonly written | in typewriter font. We say that ⊥ is the completely "undefined" value or function. Every basic data type like Integer or () contains one ⊥ besides their usual elements.

More description is given here:-

enter image description here

enter image description here

like image 70
Rahul Tripathi Avatar answered Jan 17 '23 20:01

Rahul Tripathi