[erlang-questions] [Off-topic] Haskell type constructor syntax

David Hopwood <>
Mon Sep 10 20:59:38 CEST 2007


ok wrote:
> On 8 Sep 2007, at 2:12 am, Tony Finch wrote:
>> I'd suggest using initial caps for type names, and omit the () except
>> when the type parameter is non-trivial. (That is somewhat like the  
>> Haskell type syntax.)
> 
> It would be more accurate to describe it as "as unlike the Haskell
> syntax as possible".  Haskell uses the same conventions for type
> (constructors/variables) as for data (constructors/variables), so to
> be close to Haskell syntax, you have to use the same spelling for
> type constructors as you do for constants, namely, LOWER case.

You're mistaken about Haskell syntax -- it does use initial
uppercase for type constructors. See
<http://en.wikibooks.org/wiki/Haskell/Type_declarations>, or
<http://www.haskell.org/onlinereport/decls.html> section 4.1.2.

-- 
David Hopwood <>




More information about the erlang-questions mailing list