(i always forget to reply-to-all)
If you'd like to reference C functions with Strings, one possible way is to
use System.Posix.DynamicLinker and the wrapper over libffi that's been
uploaded to hackage recently:
[...@monire asdf]$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for
Hi,
Consider this Haskell code:
---
class A a where
foo :: a b
class B a
class (A a, B a) = C a
---
GHC compiles it without errors, but Hugs rejects it: Illegal type in
class constraint.
What is the
Hi,
Consider this (a bit pathological) Haskell code:
--
class A a where
foo :: A (b d) = a (c b)
--
GHC compiles it successfully, but Hugs rejects it:
Ambiguous type signature in class declaration
*** ambiguous type : (A
Hi,
Seems that Haskell allows to specify dummy type variables in a
declaration of a type synonym, which do not appear in its right-hand
side. This can lead to interesting effects, which appears differently
in GHC and Hugs. I would like to know, what behavior is correct
according to the haskell 98
Hi,
I tried to evaluate this expression:
head[[]{}]
GHCi: []
Hugs: ERROR - Empty field list in update
What is the correct behavior?
Thanks,
Vladimir
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi Vladimir,
I don't have any answers for your questions, but what are you trying
to do that's causing you to play with the edges of the parser/type
system?
-- ryan
On Sun, May 31, 2009 at 12:41 AM, Vladimir Reshetnikov
v.reshetni...@gmail.com wrote:
Hi,
I tried to evaluate this
Patai Gergely schrieb:
is there a function that can safely split a command line into a FilePath
to the executable and its parameters?
In the yi source code, in HConf.Utils, there's a function that does part
of what you want, but maybe incorrectly (because I wrote it, and it
traverses the
---
class A a where
foo :: a b
class B a
class (A a, B a) = C a
---
GHC compiles it without errors, but Hugs rejects it: Illegal type in
class constraint.
The error message is horribly uninformative.
--
class A a where
foo :: A (b d) = a (c b)
--
GHC compiles it successfully, but Hugs rejects it:
Ambiguous type signature in class declaration
*** ambiguous type : (A a, A (b c)) = a (d b)
*** assigned to: foo
'd'
--
type F a = Int
class A a where
foo :: A b = a (F b)
--
GHC - OK
Hugs - Illegal type F b in constructor application
This time, I'd say Hugs is wrong (though eliminating that initial
complaint leads back to an
head[[]{}]
GHCi: []
Hugs: ERROR - Empty field list in update
What is the correct behavior?
Seems as if GHC interprets []{} as labelled construction instead
of labelled update - 3 Expressions (the grammar productions):
| qcon { fbind1 , ... , fbindn } (labeled construction, n=0)
|
Hi Günther
The code below should work for your simple example, provided it hasn't
lost formatting when I pasted it in to the email.
I was a bit surprised that there is no pSatisfy in this library, but
there are parsers for digits, lower case, upper case letters etc. in
the Examples module that
--
type F a = Int
class A a where
foo :: A b = a (F b)
--
GHC - OK
Hugs - Illegal type F b in constructor application
This time, I'd say Hugs is wrong (though eliminating that initial
complaint leads back to an
Lee Duhem:
On Sat, May 30, 2009 at 7:35 PM, Maurí cio briqueabra...@yahoo.com
wrote:
Hi,
How do I include type families (used as associated
types) in a module export list? E.g.:
class MyClass a where
type T a :: *
coolFunction :: Ta - a
(...)
If I just include MyClass and its
On Sun, May 31, 2009 at 7:10 PM, Manuel M T Chakravarty
c...@cse.unsw.edu.au wrote:
Lee Duhem:
On Sat, May 30, 2009 at 7:35 PM, Maurí cio briqueabra...@yahoo.com
wrote:
Hi,
How do I include type families (used as associated
types) in a module export list? E.g.:
class MyClass a where
It is my pleasure to announce that after 5 days of experimenting
with uu-parsinglib I have absolutely no clue, whatsoever, on how to
use it.
I do not even manage to write a parser for even a mere digit or a
simple character.
I don't know whether you will be willing to change over to
Dear Doaitse,
thank you very much for your help.
I am curious to know what made you go wrong with the tutorial, and
caused that you could not find the solution below?
Well let's first agree that I'm not very bright. I hate to admit it, but
it's a simple fact ;-).
Second let's agree that
Dear Malcom,
thanks for helping.
I had actually come to Haskell originally because of a parsing problem.
I had been using Smalltalk until I started a project which required
parsing files. Until then I had not done any RW parsing.
Well the route was more a Parsec - Haskell, wtf is Haskell?
Hi Günther
I suspect the problem you were having is that there are various
'parsers' (more correctly 'parser types') defined in
Text.ParserCombinators.UU.Parsing and the code you had in your running
example didn't always have enough information to allow GHC to pick a
particular one.
The /test/
A new version of the uu-parsinglib has been uploaded to hackage. It is
now based on Control.Applicative where possible.
Be warned that functions like some and many will be redefined in the
future.
Doaitse Swierstra
___
Haskell-Cafe mailing list
On 31 May 2009, at 20:40, S. Doaitse Swierstra wrote:
A new version of the uu-parsinglib has been uploaded to hackage. It
is now based on Control.Applicative where possible.
It's mutual.
Cheers
Conor
___
Haskell-Cafe mailing list
Dear Gunther,
I am providing my solution, on which one can of course specialise in
making sure that a valid date is parsed, which would be a bit more
cumbersome; how should e.g. error correction be done. I prefer to test
afterwards in such situations.
Best,
Doaitse
module Guenther
Tillmann Rendel wrote:
wren ng thornton wrote:
(Though it doesn't necessarily generalize to cover similar messages like:
Prelude :t (\x - x) :: a - b
interactive:1:7:
Couldn't match expected type `b' against inferred type `a'
`b' is a rigid type variable bound by
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
|
Jason Dusek wrote:
2009/05/30 Bartosz Wójcik bar...@sudety.it:
...reading RWH I could not memorize what those liftM funtions
meant.
The basic one, `liftM`, means `fmap`, though specialized for
functors that are monads.
Prelude Control.Monad :t liftM
liftM :: forall a b (m :: * -
On Thu, 28 May 2009, Claus Reinke wrote:
Just, please, keep in mind that there is no one-size-fits-all:
improving a message for one group of users might well make
it less useful for another group.
I once thought, that error messages must be configurable by libraries,
too. This would be
On Sun, May 31, 2009 at 09:40:38PM +0200, S. Doaitse Swierstra wrote:
A new version of the uu-parsinglib has been uploaded to hackage. It is
now based on Control.Applicative where possible.
Be warned that functions like some and many will be redefined in the
future.
Perhaps we should
On May 25, 2009, at 08:20 , ntu...@googlemail.com wrote:
data HandshakeRequest = HandshakeRequest { channel :: String , ... }
data HandshakeResponse = HandshakeResponse { channel :: String,
successful :: Bool, ... }
...
data BayeuxMessage = HSReq HandshakeRequest
| HSRes HandshakeResponse
Hi all,
When a command line argument contains an umlaut that argument gets garbled.
I'm using ghc 6.10.2 on Win XP. Are there any known solutions for this
problem?
Günther
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Sun, May 31, 2009 at 8:24 PM, GüŸnther Schmidt gue.schm...@web.de wrote:
Hi all,
When a command line argument contains an umlaut that argument gets garbled.
I'm using ghc 6.10.2 on Win XP. Are there any known solutions for this
problem?
Günther
GHC mangles UTF by default. You probably
Hi,
Using a type class in the way Wren suggests seems to be the right way
to do this in Haskell, as it is at the moment. I don't think that
this an inappropriate use of type classes at all---in fact, it is
exactly what type classes were designed to do (i.e., allow you to
reuse the same name at
31 matches
Mail list logo