Try again without missing out the list...
Peter Padawitz wrote:
Jules Bean wrote:
Incidentally, I question why the compFoo are methods. Why not just
make them polymorphic functions? They don't look like you expect
instances to change them. The code continues to compile if I make them
Jules Bean wrote:
Try again without missing out the list...
Peter Padawitz wrote:
Jules Bean wrote:
Incidentally, I question why the compFoo are methods. Why not
just make them polymorphic functions? They don't look like you expect
instances to change them. The code continues to compile if
Peter Padawitz wrote:
What is so bad about making compFoo part of the class? It reduces the
code (constraints can be avoided) and reflects the close connection
between a signature Sig (implemented by the class) and the evaluation
(compFoo) of Sig-terms in Sig-algebras.
making it part of the
Peter Padawitz wrote:
Jules Bean wrote:
Peter Padawitz wrote:
What is so bad about making compFoo part of the class? It reduces the
code (constraints can be avoided) and reflects the close connection
between a signature Sig (implemented by the class) and the
evaluation (compFoo) of
Jules Bean wrote:
Peter Padawitz wrote:
Jules Bean wrote:
Peter Padawitz wrote:
What is so bad about making compFoo part of the class? It reduces
the code (constraints can be avoided) and reflects the close
connection between a signature Sig (implemented by the class) and
the
Peter Padawitz wrote:
Jules Bean wrote:
I don't see why!
In the class
class Foo a where
f :: a - Int
g :: b - Integer
g = fromIntegral . f
The equations within the class are defaults, not equations.
I must admit that I didn't know this... Nevertheless, won't you agree that
On Dec 5, 2007 10:38 PM, Ben Franksen [EMAIL PROTECTED] wrote:
data Command = Skip
class Java block command where
block_ :: [command] - block
compBlock :: [Command] - block
--compBlock = block_ . map compCommand
compCommand :: Command - command
My guess is that nothing's
On 12/5/07, Ben Franksen [EMAIL PROTECTED] wrote:
data Command = Skip
class Java block command where
block_ :: [command] - block
compBlock :: [Command] - block
--compBlock = block_ . map compCommand
compCommand :: Command - command
This compiles ok. But when I ask ghci for the type of