Simon Marlow wrote:
On 19/10/2009 05:17, Misha Aizatulin wrote:
Hello,
is there a mechanism for ghc similar to setting the CPATH variable for
gcc? I'd like ghc to look in the given list of paths every time it
compiles something, without me having to retype the flags.
For ghci
Hello,
is there a mechanism for ghc similar to setting the CPATH variable for
gcc? I'd like ghc to look in the given list of paths every time it
compiles something, without me having to retype the flags.
For ghci there is .ghci, but it gets ignored when I run ghc.
Best,
Misha
Hi,
busNum n
| (isBusId n) = $(modify 'query) ($(set 'queryBusNumber) (Just n))
| otherwise = id
The solution I am using is creating for each record type @Rec@, and
each of its fields @fieldName :: T@ an updater
updateFieldName :: (T - T) - Rec - Rec
This way you can
hi,
I wasn't able to add an attachment to a ticket, is something wrong
with permissions?
Python Traceback
Traceback (most recent call last):
File /var/lib/python-support/python2.4/trac/web/main.py, line 387,
in dispatch_request
dispatcher.dispatch(req)
File
hello,
the new version of haddock (2.0.0) needs a new option -B that tells
it the GHC lib directory. How do I find out the correct value for this
option in a makefile, so that the makefile stays portable?
Cheers,
Misha
___
Haskell-Cafe mailing
Maybe you could do something like call out to a shell and ask it to run
'ghc --print-libdir'? That for me prints to stdout a string like
'/usr/lib64/ghc-6.8.2'.
Yes, this looks like a solution. Thanks a lot!
___
Haskell-Cafe mailing list
to me - leading to the problem above.
I would be very thankful for any suggestions!
Cheers,
Misha Aizatulin
1. John Hughes, Restricted Data Types in Haskell, September 4, 1999
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
hi,
is there some command line switch in GHC that would allow me to see
context reduction steps during the compilation?
Thanks,
Misha
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
Tiago Veloso wrote:
I am trying to find out how to work with the Read Class for a school
project, i need to declare instances of Read for a few data types.
My problem is that i do not know how to do it, i mean i do not know how
to build a Read instance, i do know about it for the Show Class.
hello all,
why is it not possible to use guards in do-expressions like
do
(a, b) | a == b - getPair
return a and b are equal
Cheers,
Misha
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Matthias Fischmann wrote:
Some lists have the Reply-To: set to the list address. I think you
can even configure the From: to be haskell-cafe instead of the poster,
making the poster merely identifiable by the Sender: field.
Do you have strong opinions on this subject?
Here is an
Thomas Conway wrote:
I'm having some difficulty with typeclasses.
What I'm trying to do should be obvious, but it's still giving me
trouble. I want to take a packaged item, and strengthen the
constraints on its type. Rather than being just any type that is an
instance of A, I want to do a
Simon Peyton-Jones wrote:
Concerning your application
| I am having a box like
| data Box = forall a. Cxt a = Box a
| and want to write a Read instances for it.
I don’t see how it helps to defer the Read instance.
I would defer the instance declaration till the point where I know
Kurt Hutchinson wrote:
Let those interested in a web forum set one
up and run it. Those interested in email can ignore the web forum.
My concern about introducing a web forum would be that it is yet
another place I have to search every time I need information (besides
the haskell report,
hello all,
I asked this question on haskell-cafe once, but my post didn't get any
responses, so I try once again here explaining a bit more where my
problem comes from.
Suppose I have a monomorphic datatype, say T and want to do something
with it, which depends on an instance of class C
It would be nice if there was some
sort of section-like syntax to access the settor function
Indeed - I'd like it as well. Also these threads seem to deal with
similar questions:
http://www.haskell.org/pipermail/haskell/2005-February/015354.html
hello,
I have a question about context in type signature. I would like to
write a function, say (f :: T - T) which also relies on an instance of
class C being defined for T. The problem is, I don't want this instance
defined at the same time f is defined, instead I would like to defer
this
Klaus Ostermann and I allude to this non-trivial extensibility problem
in our GPCE 2006 paper
and we started to look into ways (not in that paper) to resolve
the problem in a principled way.
I'm really looking forward to that! For now I'll probably use Template
Haskell to register all
Einar Karttunen wrote:
I've been using existentially quantified data constructors like
data Box = forall a. Cxt a = Box a
If you can include Typeable into the mix then serializing works.
Serialize the value as name of type value.
When deserializing use a Map name of type
hello all,
I've been using existentially quantified data constructors like
data Box = forall a. Cxt a = Box a
quite successfully for a while. But now I am trying to implement the
Load/Save mechanism and getting stuck with that. It's not hard to write
a Box into a file, but how do I get it
Bulat Ziganshin wrote:
data Box = forall a. Cxt a = Box a
quite successfully for a while. But now I am trying to implement the
Load/Save mechanism and getting stuck with that. It's not hard to write
a Box into a file, but how do I get it back?
gshow/gread provided by module
Daniel Fischer wrote:
Another thing:
Would it be a good idea to create derived Read instances that could parse
both, A `And` A and And A A ?
Since 6.4.2 parses the former and 6.2.2 parses the latter that should be
possible, I believe (and both forms are accepted at the ghci prompt).
I
Neil Mitchell wrote:
*Main show $ A `And` A
A And A
For me, using GHCi 6.4.2 + Windows, I get:
A `And` A
I installed GHC 6.4.2 now (on Linux). It really does print A `And`
A, but still doesn't read it. Would you agree that GHC doesn't conform
to the Haskell Report here? In fact it seems
Jason Dagit wrote:
Before you get too caught up in deriving Read, remember that in
Haskell it's very easy to create your own custom parser. Assuming you
have previous experience with happy or parsec you could probably have
already created a custom parser with time you've spent debugging this
Ian Lynagh wrote:
ghci on 6.4.2 Linux works for me:
oops, works for me too - I forgot the type annotation when calling
read :) So it's fine in 6.4.2 - sorry for the disturbance then!
Cheers,
Misha
___
Haskell-Cafe mailing list
25 matches
Mail list logo