Two things that i still can't understand in Haskell standard

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Oct 14 10:57:01 EDT 2006


Hello haskell-prime,

first is the monomorphism restriction. why isn't it possible to check
_kind_ of parameter-less equation and apply monomorphism restrictions
only to values of kind '*'? so, this:

sum = foldr1 (*)

will become polymorphic because its kind is '*->*' while this

exps = 1 : map (2*) exps

will become monomorphic because its kind is *


second is lack of support for prefix/postfix operations. why it is
impossible to do in first pass only lexical analysis of Haskell
program, then split it into sentences, extract all import/infix
operations and only after processing of these operations, having all
the information about operator types and precedence, do the syntax
analysis?

-- 
Best regards,
 Bulat                          mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-prime mailing list