On Fri, Aug 23, 2013 at 10:12:27AM +0200, Erik Hesselink wrote:
Note that the 'normal' hoogle indexes all (?) of hackage. But by
default it only searches the haskell platform. You can add a package
with '+' to search in that package. E.g. PublicKey +crypto-api.
If the idea behind this, that
Hi Tom,
See [1] for an explanation of free monads in general. For IO in particular,
define a functor
data IOF a = GetChar (Char - a) | PutChar Char a | ...
with constructors for all elementary IO operations.
But how should this work if the user adds an IO operation, e.g by wrapping
Hi John,
Alan - I do NOT want to generate Haskell code. I want only to generate AST
and compile it.
The question about generating the code was only to have a debugging tool
- to see if the generated AST is good - I wanted to generate the Haskell
code only to check if its correct, but
Hi Adrian,
What's an exception? I thought Haskell used Maybe.
Haskell also has exceptions:
dan@machine ~ ghci
Prelude head []
*** Exception: Prelude.head: empty list
I also consider them as quite problematic, especially if they're used in
libraries, but sometimes we're all a bit lazy and
Hi Mateusz,
I don't think my post was out of order at all and I don't understand
why it sparked such an... energetic response - that wasn't my intent
at all.
A friendly response might contain the things you told John, but it could
also be a bit more empathic, otherwise its easy to perceive
Hi Nathan,
DataAlt c | Right tag - genDataConTag c - return $ Cond tag
Are you sure, that genDataConTag always returns a 'Right'?
If it returns a 'Left', than the pattern won't match.
Greetings,
Daniel
___
Haskell-Cafe mailing list
Hi Roman,
One issue with it in Haskell is that it'd lead to inconsistent
semantics:
myEq x x = True
is not the same as
myEq x y =
case y of
x - True
I don't think that it's inconsistent, because the 'case' defines a new name
scope, like the function does for its
Hi Roman,
In fact, lots of Haskell newcomers are surprised that
f 10 = 42
is not the same as
n = 10
f n = 42
Well, yes, at the beginning I've been also surprised about this.
But allowing this seems to be even more error prone, because now you
could bind function arguments to
Hi Jan,
On Tue, Apr 09, 2013 at 01:32:33PM +0200, Jan Stolarek wrote:
Thanks for pointing me to earlier discussions on this subject - they are
enlightening :) One
particular argument against seems to be very convincing to me:
From a language design point of view, it should be noted that
Hi Steffen,
most of the time I'm just using these cpp macros:
#define __POS__(__FILE__ ++ : ++ show __LINE__)
#define ERROR error $ __POS__ ++ - ++
Instead of writing 'error blub' you would write 'ERROR blub'
and additionally get the file name and the line.
There's a bracktracing
Hi Corentin,
On Wed, Mar 27, 2013 at 09:13:41PM +0100, Corentin Dupont wrote:
I have a function that looks like this:
call :: SomeFunction - String - SomeState
The string is actually the representation of the function passed in
parameter. It is stored in the state for documentation.
So a
Hi Michael,
On Sun, Mar 24, 2013 at 05:13:35PM -0500, Michael Better wrote:
Isn't this similar to the problem Cloud Haskell had to solve to send code
to another process to run?
As much as I know, the sendable code of 'Cloud Haskell' is limited, you
can't just send any kind of function.
Hi Corentin,
I have a DSL like this:
data Exp where
OnEvent :: EventName - (Int - Exp) - Exp
(...)
The OnEvent element carries a function (the handler to be called when the
event happens), and that makes my DSL non showable/serializable.
How could I fix that? This is a real
Hi Peter,
-- smart constructor with serialNumber
date serialNumber
| serialNumber 0 = Date serialNumber
| otherwise = error (invalid serialNumber ++ show serialNumber)
Instead of raising an error it's more secure to return a Maybe value.
date :: Int - Maybe Date
date
Hi Michael,
On Mon, Feb 25, 2013 at 02:41:19PM +0200, Michael Snoyman wrote:
At that point, we've now made two changes to REWRITE rules:
1. They can takes a new ALWAYS parameters.
2. There's a new, special identifier currentLocation available.
What would be the advantage is of that
Hi Henk-Jan,
It seems to me that there is something missing from this e-mail.
What are you missing?
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Feb 19, 2013 at 02:15:33PM +0100, Vo Minh Thu wrote:
Screenshots obviously ;)
Hurray!
attachment: layers.png___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi all,
also if there's not that much to see and only a few minutes of gameplay,
but after spending quite a few hours writing it, getting a feeling for
Haskell and it's usage, perhaps it's in some way useful for someone,
even if just for a few minutes of distraction.
Hi Alex,
On Fri, Jan 18, 2013 at 08:26:10PM +0100, Alexander Bernauer wrote:
I thought it would make sense to use these names for ease of
reference. Given this, would you still prefer them being grouped in
separate modules?
Yes, I still think that having separate modules can be beneficial,
Hi Alexander,
On Thu, Jan 17, 2013 at 10:17:33PM +0100, Alexander Bernauer wrote:
I am happy to announce the second release of hgdbmi, a Haskell
implementation of the GDB Machine Interface.
Nice project! :)
PS: This is my first serious Haskell package. If you see something
that you
Hi Christopher,
On Fri, Dec 21, 2012 at 04:36:04AM -0900, Christopher Howard wrote:
Using a simple type I gave earlier from my monadic type question...
code:
data Socket3 a b c = Socket3 a b c
deriving (Show)
Is it possible somehow to layer on record syntax onto a
On Thu, Dec 13, 2012 at 08:40:09PM +0200, Michael Snoyman wrote:
If you have a commercial use for cpphs, and feel the terms of the (L)GPL
are too onerous, you have the option of distributing unmodified binaries
(only, not sources) under the terms of a different licence (see
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Joachim,
On Sun, Nov 11, 2012 at 02:10:34PM +0100, Joachim Breitner wrote:
dear package authors. If you define a useful class, please think twice
before you do not export the methods, otherwise something like this will
happen:
I like the way 'Common Lisp' deals with this issue. Exported
Hi all,
I'm currently struggling in the search for a nice abstraction for the
input handling of a game (it's a simple platformer with rectangular platforms).
One good example is the level editor of the game. When pressing the left
mouse button the creation of a new platform is started. As long
Hi Jon
On Wed, Oct 24, 2012 at 11:08:29AM +0100, Jon Fairbairn wrote:
for each field, which is tedious (and O(n)). Obviously Templates
would help, but is there an alternative I’ve missed?
perhaps something like:
data Type = Ta | Tb | Tc ...
data E= Ea A | Eb B | Ec C | ...
type D=
On Thu, Aug 16, 2012 at 11:33:17PM -0400, wren ng thornton wrote:
However, there are certainly cases where we have hard upper
bounds[1][2][3], and ignoring those is not fine. Circumventing hard
upper bounds should require altering the .cabal file, given as
getting things to compile will
On Wed, Aug 15, 2012 at 03:54:04PM -0700, Michael Sloan wrote:
Upper bounds are a bit of a catch-22 when it comes to library authors evolving
their APIs:
1) If library clients aren't encouraged to specify which version of the
exported API they target, then changing APIs can lead to
Hi Oleg,
On Sat, Aug 11, 2012 at 08:14:47AM -, o...@okmij.org wrote:
I'd like to point out that the only operation we can do on the first
argument of MkFoo is to show to it. This is all we can ever do:
we have no idea of its type but we know we can show it and get a
String. Why not to
Hi all,
it should be possible a call a function on all elements of the data
structure, to add and remove elements.
What I currently have:
the type class:
class Foo a where
hasId :: a - Int - Maybe a
a few instances:
data A = A deriving Show
instance Foo A where
hasId a 1 = Just a
Hi Joey,
On Tue, Aug 07, 2012 at 02:13:09PM -0400, Joey Adams wrote:
Are you looking for existential quantification [1]?
data SomeFoo = forall a. Foo a = a
[1]:
http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#existential-quantification
Thanks!
Hi Ivan,
thanks, but l have been able to build it by myself.
I just want to get the package updated and if the maintainer can't be
reached, than ask for maintainership.
Greetings,
Daniel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi,
Marko Lauronens email address from the package is invalid, so I'm trying
to reach him this way.
pngload doesn't compile with ghc = 7.2 because of it's dependency to base and
haskell98.
Greetings,
Daniel
___
Haskell-Cafe mailing list
33 matches
Mail list logo