Claus Reinke wrote:
Do you argue that overloading logical operations like this in Haskell
sacrifices type safety? Could programs go wrong [1] that use such
abstractions?
If I understand your point correctly, you are suggesting that such
programs
are still type safe. I agree with the claim
On Jun 1, 2009, at 12:17 AM, Henning Thielemann wrote:
On Thu, 28 May 2009, Bulat Ziganshin wrote:
i use another approach which imho is somewhat closer to
interpretation
of logical operations in dynamic languages (lua, ruby, perl): [...]
The absence of such interpretations and thus the
On Mon, Jun 1, 2009 at 3:06 AM, Sebastian Fischer
s...@informatik.uni-kiel.de wrote:
On Jun 1, 2009, at 12:17 AM, Henning Thielemann wrote:
On Thu, 28 May 2009, Bulat Ziganshin wrote:
i use another approach which imho is somewhat closer to interpretation
of logical operations in dynamic
Do you argue that overloading logical operations like this in Haskell
sacrifices type safety? Could programs go wrong [1] that use such
abstractions?
If I understand your point correctly, you are suggesting that such programs
are still type safe. I agree with the claim that such features are
Do you argue that overloading logical operations like this in
Haskell
sacrifices type safety? Could programs go wrong [1] that use such
abstractions?
If I understand your point correctly, you are suggesting that such
programs
are still type safe.
My asking was really meant as a question to
On Thu, 28 May 2009, Bulat Ziganshin wrote:
i use another approach which imho is somewhat closer to interpretation
of logical operations in dynamic languages (lua, ruby, perl):
a ||| b | isDefaultValue a = b
| otherwise= a
a b | isDefaultValue a = defaultValue
|
Excerpts from Bulat Ziganshin's message of Thu May 28 15:07:02 +0200 2009:
Hello Lennart,
Thursday, May 28, 2009, 11:57:09 AM, you wrote:
-- | Generalization of the 'Bool' type. Used by the generalized 'Eq' and
'Ord'.
class Boolean bool where
() :: bool - bool - bool --
anyway.
Simon
| -Original Message-
| From: haskell-cafe-boun...@haskell.org
[mailto:haskell-cafe-boun...@haskell.org] On
| Behalf Of Sebastiaan Visser
| Sent: 27 May 2009 13:32
| To: Haskell Cafe
| Subject: [Haskell-cafe] Bool as type class to serve EDSLs.
|
| Hello,
|
| While playing
as type class to serve EDSLs.
Hello,
While playing with embedded domain specific languages in Haskell I
discovered the Num type class is a really neat tool. Take this simple
example embedded language that can embed primitives from the output
language and can do function application
Message-
| From: haskell-cafe-boun...@haskell.org
[mailto:haskell-cafe-boun...@haskell.org] On
| Behalf Of Sebastiaan Visser
| Sent: 27 May 2009 13:32
| To: Haskell Cafe
| Subject: [Haskell-cafe] Bool as type class to serve EDSLs.
|
| Hello,
|
| While playing with embedded domain
Of course once you've got ifthenelse you find yourself wanting explicit
desugaring of pattern matching (could view patterns help here?),
Could you be more specific about what you want there, perhaps
with a small example? I recognize the other problems from my own
forays into EDSLs, but I'm not
08:46
To: Simon Peyton-Jones; Sebastiaan Visser; Haskell Cafe
Cc: Augustsson, Lennart
Subject: RE: [Haskell-cafe] Bool as type class to serve EDSLs.
There are multiple possible classes that you might want under
different
circumstances (I think the most interesting issue is whether the class
Hello Lennart,
Thursday, May 28, 2009, 11:57:09 AM, you wrote:
-- | Generalization of the 'Bool' type. Used by the generalized 'Eq' and
'Ord'.
class Boolean bool where
() :: bool - bool - bool -- ^Logical conjunction.
(||) :: bool - bool - bool -- ^Logical disjunction.
i
Hello,
While playing with embedded domain specific languages in Haskell I
discovered the Num type class is a really neat tool. Take this simple
example embedded language that can embed primitives from the output
language and can do function application.
data Expr :: * - * where
Prim ::
+1. I agree completely, I've missed this often for exactly the same
reasons.
Edsko
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
And I would certainly celebrate when if b then x else y expression becomes polymorphic
in b.
Edsko de Vries wrote on 27.05.2009 17:33:
+1. I agree completely, I've missed this often for exactly the same
reasons.
Edsko
___
Haskell-Cafe mailing list
2009/05/27 Miguel Mitrofanov miguelim...@yandex.ru:
And I would certainly celebrate when if b then x else y
expression becomes polymorphic in b.
class Boolean b where
fromBoolean :: b - Bool
--
Jason Dusek
___
Haskell-Cafe mailing list
17 matches
Mail list logo