Hello Brian,
Saturday, June 10, 2006, 3:05:25 AM, you wrote:
It is possible that this feature was added to the language for the benefit
of people who prefer not to use explicit type signatures but afaiu this goes
against best practice where everything should always have an explicit
On 6/9/06, Brandon Moore [EMAIL PROTECTED] wrote:
data DataType m = forall m' . (Monad m') = DataType (TyEq m m') (Char
- m' ())
It appears that the more intuitive formulation:
data DataType m
where DataType :: Monad m = (Char - m ()) - DataType m
should work in GHC 6.4
/g
Jeff Harper defined typeclasses
class Reciprocate a b | a - b where
recip :: a - b
class Multiply a b c | a b - c where
(*) :: a - b - c
and encountered the problem with
-- Here I define a default (/) operator that uses the
-- Reciprocate and Multiply class to perform division.
Greg Buchholz [EMAIL PROTECTED] writes:
tmap :: (b - a, b - a) - Twist b b - Twist a a
...I'm wondering why they couldn't infer the more general...
tmap :: (a - b, c - d) - Twist a c - Twist b d
Because the latter type involves polymorphic recursion. Standard H-M
cannot infer a
Brian Hulley wrote:
Don't put class constraints on a data type,
constraints belong only to the functions
that manipulate the data.
So according to this guideline you're not supposed to think of
associating
contraints with data: constraints are only relevant for functions
which
From: Bulat Ziganshin [mailto:[EMAIL PROTECTED]
when you work with C++ or some other OOP language, you can define that
some field in structure should some some specific interface and this
allows to use functions of this interface on this field. i required
the same feature in Haskell, for
The Wikipedia article on lambda abstractions
(http://en.wikipedia.org/wiki/Lambda_abstraction) has a statement that
does not resonate with me:
A lambda abstraction is to a functional programming language
such as Scheme what pseudo-code
is to an imperative programming language.
Does anyone
On Saturday 10 June 2006 04:35 pm, Clifford Beshers wrote:
The Wikipedia article on lambda abstractions
(http://en.wikipedia.org/wiki/Lambda_abstraction) has a statement that
does not resonate with me:
A lambda abstraction is to a functional programming