Difference between revisions of "Pronunciation"
Peripatetic (talk  contribs) 
m (Remove trailing whitespace in <hask> tags) 

Line 1:  Line 1:  
There was a thread on HaskellCafe about [http://www.haskell.org/pipermail/haskellcafe/2008January/038756.html how to pronounce Haskell]. 
There was a thread on HaskellCafe about [http://www.haskell.org/pipermail/haskellcafe/2008January/038756.html how to pronounce Haskell]. 

−  Below are some notes for beginners on how to pronounce those strange Haskell operators and 'read' Haskell programs. 
+  Below are some notes for beginners on how to pronounce those strange Haskell operators and 'read' Haskell programs. 
This is meant to be a table with formal and informal ways of saying various operators and code snippets. 
This is meant to be a table with formal and informal ways of saying various operators and code snippets. 

Line 10:  Line 10:  
! References 
! References 

 
 

−   <hask> 
+   <hask>::</hask> 
 has type (in definitions); at type (in expressions or patterns) 
 has type (in definitions); at type (in expressions or patterns) 

 
 

−   <hask> 
+   <hask>></hask> 
 maps to, to 
 maps to, to 

 
 

−   <hask> 
+   <hask>=</hask> 
 is 
 is 

 
 

−   <hask> 
+   <hask>==</hask> 
 equals 
 equals 

 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3A6161 Prelude] 
 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3A6161 Prelude] 

 
 

−   <hask> 
+   <hask>/=</hask> 
 not equals 
 not equals 

 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3A6161 Prelude] 
 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3A6161 Prelude] 

 
 

−   <hask> 
+   <hask>=></hask> 
 is a witness for, implies 
 is a witness for, implies 

 [http://www.haskell.org/tutorial/classes.html Type Classes and Overloading] 
 [http://www.haskell.org/tutorial/classes.html Type Classes and Overloading] 

 
 

−   <hask> 
+   <hask>.</hask> 
 dot (could be used anywhere, but especially in, for example, Data.Char.ord), ring, compose (for example, negate . (+1)), (silent) (for example, forall a. (Num a) => a) 
 dot (could be used anywhere, but especially in, for example, Data.Char.ord), ring, compose (for example, negate . (+1)), (silent) (for example, forall a. (Num a) => a) 

 
 

−   <hask> 
+   <hask><</hask> 
 drawn from, from 
 drawn from, from 

 
 

−   <hask> 
+   <hask><</hask> 
 arrow application 
 arrow application 

 [http://haskell.org/arrows/syntax.html Arrows syntax] 
 [http://haskell.org/arrows/syntax.html Arrows syntax] 

 
 

−   <hask> 
+   <hask>&&&</hask> 
 both, fanout 
 both, fanout 

 [http://www.haskell.org/ghc/docs/latest/html/libraries/base/ControlArrow.html Control.Arrow] 
 [http://www.haskell.org/ghc/docs/latest/html/libraries/base/ControlArrow.html Control.Arrow] 

 
 

−   <hask> 
+   <hask></hask> 
 either, fanin 
 either, fanin 

 [http://www.haskell.org/ghc/docs/latest/html/libraries/base/ControlArrow.html#v%3A%7C%7C%7C Control.Arrow] 
 [http://www.haskell.org/ghc/docs/latest/html/libraries/base/ControlArrow.html#v%3A%7C%7C%7C Control.Arrow] 

−   
+   
 
 

−   <hask> 
+   <hask>++</hask> 
 append 
 append 

 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3A4343 Prelude] 
 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3A4343 Prelude] 

 
 

−   <hask> 
+   <hask>>>=</hask> 
 bind 
 bind 

 [http://www.haskell.org/tutorial/monads.html About monads] 
 [http://www.haskell.org/tutorial/monads.html About monads] 

[[Monads as containers]] 
[[Monads as containers]] 

 
 

−   <hask> 
+   <hask>>></hask> 
 then, sequence 
 then, sequence 

 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:6262 Prelude] 
 [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:6262 Prelude] 

 
 

−   <hask> 
+   <hask><*></hask> 
 applied over 
 applied over 

 [http://www.haskell.org/haskellwiki/Applicative_functor Applicative Functors] 
 [http://www.haskell.org/haskellwiki/Applicative_functor Applicative Functors] 

 
 

−   <hask> 
+   <hask>\</hask> 
 lambda 
 lambda 

 [[Lambda abstraction]] 
 [[Lambda abstraction]] 

[http://www.haskell.org/onlinereport/exps.html#sect3.3 Haskell 98 Report] 
[http://www.haskell.org/onlinereport/exps.html#sect3.3 Haskell 98 Report] 

 
 

−   <hask> 
+   <hask>!</hask> 
 bang; strict (in patterns or data definitions); index (in expressions) 
 bang; strict (in patterns or data definitions); index (in expressions) 

 [http://www.haskell.org/ghc/docs/latest/html/users_guide/bangpatterns.html Bang Patterns] 
 [http://www.haskell.org/ghc/docs/latest/html/users_guide/bangpatterns.html Bang Patterns] 

[[Keywords]] 
[[Keywords]] 

 
 

−   <hask> 
+   <hask>~</hask> 
 irrefutable, lazy (in patterns) 
 irrefutable, lazy (in patterns) 

 
 

−   <hask> 
+   <hask>:</hask> 
 cons 
 cons 

 
 

−   <hask> 
+   <hask>[]</hask> 
 nil 
 nil 

 
 

−   <hask> 
+   <hask>()</hask> 
 unit 
 unit 

 
 

−   <hask> 
+   <hask>(,)</hask> 
 2tuple, pair 
 2tuple, pair 

 
 

−   <hask> 
+   <hask>(a,b,c)</hask> 
 [3]tuple [of] a, b, and c 
 [3]tuple [of] a, b, and c 

 
 

−   <hask> 
+   <hask>({)}</hask> 
 just as inconvenient to convey grouping verbally, whether it's layout or punctuation 
 just as inconvenient to convey grouping verbally, whether it's layout or punctuation 

} 
} 

Line 111:  Line 111:  
The tables above would be best split into more columns to distinguish Informal, possibly bad suggestions like "then", "is", "gets", from Formal correct ways of saying the same thing. The Symbols could also be named in a literal way in another column, such as "arrow" or "doublecolon". The Description column can be quite brief and a link provided to the relevant wiki page for the operator. 
The tables above would be best split into more columns to distinguish Informal, possibly bad suggestions like "then", "is", "gets", from Formal correct ways of saying the same thing. The Symbols could also be named in a literal way in another column, such as "arrow" or "doublecolon". The Description column can be quite brief and a link provided to the relevant wiki page for the operator. 

−  Some words, particularly the informal ones, may be good for several different symbols, but these can hopefully be arranged so that their context will make them unambiguous when reading a code snippet. 
+  Some words, particularly the informal ones, may be good for several different symbols, but these can hopefully be arranged so that their context will make them unambiguous when reading a code snippet. 
[[Category:Syntax]] 
[[Category:Syntax]] 
Revision as of 23:21, 17 December 2013
There was a thread on HaskellCafe about how to pronounce Haskell.
Below are some notes for beginners on how to pronounce those strange Haskell operators and 'read' Haskell programs.
This is meant to be a table with formal and informal ways of saying various operators and code snippets.
Symbol  Pronunciation  References  

::

has type (in definitions); at type (in expressions or patterns)  
>

maps to, to  
=

is  
==

equals  Prelude  
/=

not equals  Prelude  
=>

is a witness for, implies  Type Classes and Overloading  
.

dot (could be used anywhere, but especially in, for example, Data.Char.ord), ring, compose (for example, negate . (+1)), (silent) (for example, forall a. (Num a) => a)  
<

drawn from, from  
<

arrow application  Arrows syntax  
&&&

both, fanout  Control.Arrow  


either, fanin  Control.Arrow  
++

append  Prelude  
>>=

bind  About monads
Monads as containers  
>>

then, sequence  Prelude  
<*>

applied over  Applicative Functors  
\

lambda  Lambda abstraction
Haskell 98 Report  
!

bang; strict (in patterns or data definitions); index (in expressions)  Bang Patterns
Keywords  
~

irrefutable, lazy (in patterns)  
:

cons  
[]

nil  
()

unit  
(,)

2tuple, pair  
(a,b,c)

[3]tuple [of] a, b, and c  
({)}

just as inconvenient to convey grouping verbally, whether it's layout or punctuation 
Example  Pronunciation 

f :: Int > Int

f has type Int to Int 
Thoughts on improving this page:
The tables above would be best split into more columns to distinguish Informal, possibly bad suggestions like "then", "is", "gets", from Formal correct ways of saying the same thing. The Symbols could also be named in a literal way in another column, such as "arrow" or "doublecolon". The Description column can be quite brief and a link provided to the relevant wiki page for the operator.
Some words, particularly the informal ones, may be good for several different symbols, but these can hopefully be arranged so that their context will make them unambiguous when reading a code snippet.