Hello John,
Friday, January 15, 2010, 1:42:15 AM, you wrote:
Is it possible to prevent a library from being used unless
-threaded is enabled? I have a specific case where lots-of-nasty
yes. it's how opposite checked in gtk2hs:
when (rtsSupportsBoundThreads) $ fail $ \n ++
initGUI: Gtk+
Hello Niklas,
Friday, January 15, 2010, 10:57:55 PM, you wrote:
* UnicodeSyntax now works not only for identifiers, but also for
does this mean that unicode identifiers are allowed only when
UnicodeSyntax enabled? ghc allows them anyway
--
Best regards,
Bulat
Hello Daniel,
Thursday, January 14, 2010, 11:08:24 PM, you wrote:
i think you are wrong. stdcall used for std windows dlls, but gcc by
default generates ccall things. and cl anyway useless here
Just an idea. Are you on windows?
If so, then your foreign calls would probably have to be
Hello DNM,
Thursday, January 14, 2010, 10:42:42 PM, you wrote:
there is better way rather than playing with random bits. just find
tutorial on FFI, and try it. once this example works, start modifying
it to learn various aspects of ffi and add functionality you need
it's one thing i've learned
Hello DNM,
Wednesday, January 13, 2010, 8:57:45 AM, you wrote:
Note: I'm relatively new to Haskell, and my knowledge of C and C++ is
basically pretty
minimal -- I can read, modify and compile C/C++ programs (usually).
1. you use too much unsafePerformIO. since you need newCString, i
suggest
Hello Cristiano,
Wednesday, January 13, 2010, 9:43:06 PM, you wrote:
coming up to my mind is that type inference actually forbids a
type-directed resolution of names as in C++ or Java.
you are right. we either have ad-hoc polymorphism like in C++ where
type of id selected based on type of
Hello John,
Wednesday, January 13, 2010, 10:08:08 PM, you wrote:
Of course, this doesn't allow you to have functions share the same
name if they have different signatures
class Open a where
open :: a
instance Open (Int - String) where ...
instance Open (String - Int) where ...
--
Best
Hello DNM,
Thursday, January 14, 2010, 7:07:43 AM, you wrote:
Yes, I thought of doing this, but then thought it was better to use a
so-called managed foreign pointer via newForeignPtr.
i recommend to use Ptr and switch to ForeignPtr only when you will
study how to use it. overall, unsafe*
Hello Brandon,
Thursday, January 14, 2010, 7:40:45 AM, you wrote:
Really, the only reason in this case is that there is no equivalent
for `extern C' that you can apply to a function definition, only to
a declaration
it works with GCC:
extern C int c_szOpenArchive (TABI_ELEMENT* params)
{
Hello Andrew,
Wednesday, January 13, 2010, 1:54:44 AM, you wrote:
(The material I quoted from had notes about which version of Java added
certain of the words. I guess it was outdated.)
you would be more respected in this list if you will compare haskell 1.0
with java'2010 or better '2020 ;)
Hello Sebastian,
Friday, January 8, 2010, 3:53:53 PM, you wrote:
Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to
parse command-line arguments into a user-defined data structure.
Is there something similar for parsing config files?
Lua language may be used to describe
Hello Johannes,
Thursday, January 7, 2010, 3:32:03 PM, you wrote:
the existence (or: need for) a preprocessor
shows omissions in (the design of) a language.
yes, that's the common opinion. the same true for comments and
identifiers :D
shortly speaking, preprocessor is just another language
Hello Bulat,
Thursday, January 7, 2010, 4:03:07 PM, you wrote:
the existence (or: need for) a preprocessor
shows omissions in (the design of) a language.
forget to add: for language designers, analysis of typical
preprocessor usage and adding analogous features to language instead
is a great
Hello Keith,
Thursday, January 7, 2010, 11:26:51 PM, you wrote:
existential types has more limited usage compared to dynamics, but in
the cases they work they allow to have compile-time type-checking
instead of run-time one
Hello, My impression is that using existential types where possible
Hello Patrick,
Monday, January 4, 2010, 5:59:18 AM, you wrote:
I'm guessing no such syntax exists?
you are right. look at
http://www.haskell.org/bz/th3.htm
http://www.haskell.org/bz/thdoc.htm
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
Hello Larry,
Sunday, January 3, 2010, 8:46:30 PM, you wrote:
Using seed-getSeed from the ghci command line works. Why doesn't
it work in a
script?
because it's a feature of ghci command prompt, not haskell language.
use smth like this:
randList minval maxval = do
seed - getSeed
Hello Richard,
Thursday, December 31, 2009, 12:28:01 PM, you wrote:
Problem: I don't understand how I can generate the foreign import
statements at runtime.
there are special C libraries that doest it. one of them is libffi,
another one (can't recall its name) is used by ghc itself. libffi
Hello Richard,
C/Invoke is another library whose name i forget.
Thanks a lot. Though the haskell wiki [0] claims that libffi works on x64.
i don't know, just read yesterday on Lua list:
A question for Fabio: what are the issues with Alien for 64-bit Windows?
I can answer part of that.
Hello michael,
Thursday, December 17, 2009, 6:54:24 AM, you wrote:
what is you see here is called association list. *function* array
takes an index range and assoclist and returns an array. notice that
data constructors are started with capital letter, f.e. Array
Hello Don,
Wednesday, December 16, 2009, 7:27:29 PM, you wrote:
The bug described in Ticket #650, AFAICS, prevents implementation of a
reasonable, generic hash table in Haskell. :-(
You can certainly implement it, it just requires that you increase the
heap size to a bit bigger than your
Hello Scott,
Wednesday, December 16, 2009, 10:21:51 PM, you wrote:
Can anyone involved give a quick overview (or pointers to one)?
GHC has great support for SMP systems. there is further work on
parallel libraries and i believe that it was main part of HackPar. there
are good serialization
Hello Don,
Tuesday, December 15, 2009, 10:42:01 AM, you wrote:
How about a fast STHashTable?
you can use array of arrays instead of large array
Note to minmize the issue, but we get many of the same benefits via the
associated type transformation (e.g. for arrays of
Hello Brad,
Tuesday, December 15, 2009, 6:53:14 PM, you wrote:
How about a fast STHashTable?
you can use array of arrays instead of large array
Can you elaborate?
what exactly? how to implement this or why it will be faster?
--
Best regards,
Bulat
Hello Brad,
Tuesday, December 15, 2009, 7:16:18 PM, you wrote:
You said to use an array of arrays instead of a large array, in the
context of a fast hash table in ST. Do you mean I should use an array
for hash buckets, rather than a list?
Is that what you meant? And why would it be
Hello Alberto,
Tuesday, December 15, 2009, 5:23:41 PM, you wrote:
ST monad is the same as IO monad modulo type trickery. tris trickery
allows to limit imperative operations available inside ST monad to
STRef/STArray manipulations which is guaranteed to be
referential-transparent as part of this
Hello Donn,
Monday, December 14, 2009, 4:31:58 AM, you wrote:
I'm just not sure where AppData lives while it's referenced in a
FunPtr via partial application, if there might be multiple copies, etc.
GHC RTS creates thunk with this partial call. this thunk references
all the data used in
Hello Erik,
Monday, December 14, 2009, 5:44:22 AM, you wrote:
I also pointed out that Windows NT had a fully compliant
POSIX subsystem, by design, and that Microsoft cared at least enough
about POSIX support to buy the company that made what is now SUA.
How does that explain things like
Hello Erik,
Monday, December 14, 2009, 1:02:58 PM, you wrote:
POSIX is a *subsystem*. you are using Win32 subsystem. There is also
Please enlighten me. How do I access the POSIX subsystem?
i don't know since i never tried. it seems that this is bad idea. if
you really need it, it should be
Hello Duncan,
Monday, December 14, 2009, 1:33:14 PM, you wrote:
Please enlighten me. How do I access the POSIX subsystem?
I'm not sure of all the details, but the program ends up getting linked
differently. The GNU ld user guide says:
yes, it should be linked to other dlls. the catch is
Hello Erik,
Monday, December 14, 2009, 1:27:12 PM, you wrote:
It seems the POSIX subsystem was POSIX.1 only and was removed completely
in windows XP. Thats not a solution.
yes, i mean the same. just don't mix up fseek() in your C compiler
with windows POSIX implementation
POSIX subsystem
Hello Brad,
Tuesday, December 15, 2009, 1:55:41 AM, you wrote:
How about a fast STHashTable?
you can use array of arrays instead of large array
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Haskell-Cafe
Hello Ravi,
Saturday, December 12, 2009, 9:48:28 AM, you wrote:
Based on the responses to my previous message, our featured presenter
will be Ryan Newton who will talk about the Intel Concurrent
Collections for Haskell.
awesome! you may try it on many typical unix text processing tasks,
such
Hello Stephen,
Saturday, December 12, 2009, 3:32:09 PM, you wrote:
the GPL would apply. Distribution being the key point, as at that
your mileage may vary, etcetera. Similar the limits on 'client' would
need some definition vis-a-vis distribution, one person would surely
be fine,
Hello Sebastian,
Thursday, December 10, 2009, 4:27:49 PM, you wrote:
The killer app for that, IMO, is parallelism these days
btw, are you seen Google App Engine? it's python/java ATM, but i think
that haskell will be ideal fit there. it's all about
computations-in-cloud, or more precisely
Hello Michael,
Tuesday, December 8, 2009, 11:48:09 AM, you wrote:
Do you mean symbols as in interned strings with an O(1) string
comparison method? I would love to have those, but I don't see an easy
way to get it without being in the IO or ST monad.
you could intern IO usage with
Hello Stephen,
Monday, December 7, 2009, 8:11:01 PM, you wrote:
it's just what goupBy compares with the first element of group rather
than comparing two adjancent elements. look at the trace
it's not a bug, but misunderstanding of specification :)
Could it not be a bug in
a) printf
b)
Hello Don,
Monday, December 7, 2009, 8:16:25 PM, you wrote:
http://haskellwebnews.wordpress.com/2009/12/05/whats-new-in-haskell-december-2009/
can we make download counts for individual packages available?
my own program (http://freearc.org) has about 10k downloads/month so i
doubt what place
Hello Andrew,
Sunday, December 6, 2009, 1:09:18 AM, you wrote:
Maybe once I get hired by some financial modelling consultants and get
paid shedloads of money to write Haskell all day, I'll be able to afford
a Mac. But until then...
with such attitude you will never be hired by financial
Hello Andrew,
Saturday, December 5, 2009, 6:40:23 PM, you wrote:
prominent?) Somebody pointed out this bug 6 months ago. Somebody else
posted a potential fix a month ago. There is no visible activity from
the developers.
Developer. many Haskell problems is due to the fact that we have a few
Hello Andrew,
Saturday, December 5, 2009, 10:14:17 PM, you wrote:
I did try to get wxHaskell going once or twice. And the SDL binding. (I
wasn't aware we have Qt now...) I've never got any of them to work yet.
it depends on when you have tried. wx made significant progress in
last year or two
Hello Emmanuel,
Thursday, December 3, 2009, 3:03:02 PM, you wrote:
memory footprint and is easier. But I don't know if it worth to do this
optimization: having a dictionary to translate string words in Int.
GHC compiler already has this optimization. unfortunately it's not in
the code it
Hello Emmanuel,
Thursday, December 3, 2009, 6:23:56 PM, you wrote:
that forall x; List x = x==x. GHC have all informations to do this
optimization job, because haskell functions definitions are mathematics
definitions.
GHC doesn't make ALL possible optimizations, isn't it obvious? ;)
--
Hello jean-christophe,
Monday, November 30, 2009, 11:43:00 AM, you wrote:
I am writing a port to F# of some haskell standard libraries.
www.haskell.org is under the simple permissive license. Does this
license also cover the souce code available from that site?
the license cover only Wiki
Hello Malcolm,
Monday, November 30, 2009, 1:45:29 PM, you wrote:
And in fact the official Haskell'98 libraries are covered by an even
more permissive license: that of the Language Report.
The authors intend this Report to belong to the entire Haskell
community, and so we grant permission
Hello papa,
Sunday, November 29, 2009, 5:11:23 PM, you wrote:
add some IO on top of it, keeping the main code pure. The idea was to
write a very simple two-player game, then define some strategies to
play it that do not involve IO
ho i could do it:
class Strategy state where
initState ::
Hello El,
Sunday, November 29, 2009, 8:00:02 PM, you wrote:
segfault is due to free, you may omit peekCString call.
you should free only memory that was malloced and not freed other way
Hello,
I get a segfault when I do
str - peekCString ptr
free ptr
return (Just str)
But not when I
Hello vishnu,
Friday, November 27, 2009, 10:41:37 PM, you wrote:
it's just false assumption that you should got speed comparable to
other languages. haskell is lazy and ghc has much less mature compiler
Ive just started learning haskell pretty recently and Ive been
trying to solve some
Hello Don,
Friday, November 27, 2009, 11:08:44 PM, you wrote:
it's just false assumption that you should got speed comparable to
other languages. haskell is lazy and ghc has much less mature compiler
comparable to other languages eh?
That seems a little too broad to be meaningful, Bulat, as
Hello Juan,
Monday, November 23, 2009, 7:01:39 PM, you wrote:
But in HUGS i can't. It says:
ERROR conjunction.hs:1 - Unrecognised character `\8743'
hugs doesn't accept unicode source files
there are lots of unicode support problems in both haskell
implementations. probably we have some wiki
Hello Simon,
Wednesday, November 18, 2009, 12:17:31 PM, you wrote:
You could argue that (a - b - b) is doing more than (a - ()),
if i correctly understand, we have two versions:
1) easier to use
2) more efficient
and one of them may be defined via another? how about providing both
versions,
Hello michael,
Tuesday, November 17, 2009, 10:16:50 PM, you wrote:
I'm trying to create a hash table. Yeah, I know, don't use hash
tables, but I need to create something I'm familiar with, not
something I've never worked with before. What's wrong with this code?
ht = MyHashTable.new (==)
Hello Daniel,
Tuesday, November 17, 2009, 11:21:18 PM, you wrote:
The hash function must have a return type of fixed and specified width, or
porting the app
between 32-bit and 64-bit platforms could have enormous performance impact,
so it can't be
plain Int.
i think that the problem with
Hello michael,
Wednesday, November 18, 2009, 12:00:58 AM, you wrote:
*Main toList ht
[(miguel,3),(michael,2),(mike,1)]
It seems my dummy function is being ignored.
i wonder why you think so?
your ht has all 3 pairs you ever inserted
inside, they all are inside the same bucket since hash
Hello Casey,
Monday, November 16, 2009, 11:30:51 PM, you wrote:
Why not use www.sourceforge.net?
i strongly recommend http://code.google.com or http://codeplex.com
SF is slow and olf-fashioned
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
Hello Casey,
Saturday, November 14, 2009, 9:15:51 PM, you wrote:
Where is a good place to place code like this, so if I may be so bold,
people can learn from it?
the solution i've seen in 80's was:
main = print (solutions 8 8)
solutions n 0 = [[]]
solutions n k = [(i,k):xs | xs - solutions
Hello Abby,
Sunday, November 15, 2009, 12:00:42 AM, you wrote:
I understand that error may (and will) happen in floating point, but
it surprises me that they do so easily, and, above all, the difference
between GHC and Hugs. Does someone know why does this difference
occur?
compare:
Hello David,
Thursday, November 12, 2009, 10:22:41 AM, you wrote:
are you seen hugs, for example? i think that ghc is slow because it's
written in haskell and compiled by itself
If I understood, Evan is interested in ideas to speed up compilation.
As far as I know, hugs is an interpreter,
Hello Neil,
Thursday, November 12, 2009, 1:57:06 PM, you wrote:
I'd really love a faster GHC!
there are few obvious ideas:
1) use Binary package for .hi files
2) allow to save/load bytecode
3) allow to run program directly from .hi files w/o linking
4) save mix of all .hi files as program
Hello Konstantin,
Thursday, November 12, 2009, 1:12:35 PM, you wrote:
I'm writing an wxHaskell application. Everything is ok, but now I need
a separate folder for icons, bitmaps, and so on, from where they are
loaded at runtime. How can I compile resources, and link them into my
executable
Hello Rafal,
Thursday, November 12, 2009, 3:10:54 PM, you wrote:
it's impossible to interpret haskell - how can you do type inference?
hugs, like ghci, is bytecode interpreter. the difference is their
implementation languages - haskell vs C
We use Standard ML for the Isabelle/HOL theorem
of
next cl iterations should only depend on the number of changes one
does, not on the total project size.
On Thu, Nov 12, 2009 at 1:10 PM, Rafal Kolanski x...@xaph.net wrote:
Bulat Ziganshin wrote:
it's impossible to interpret haskell - how can you do type inference?
hugs, like ghci, is bytecode
Hello Gregory,
Thursday, November 12, 2009, 12:14:56 AM, you wrote:
Hey everyone! Do you have any suggestions for how I might allocate an
aligned block of memory that I can pin while making foreign calls, but
leave unpinned the rest of the time to potentially improve allocation
and garbage
Hello Evan,
Thursday, November 12, 2009, 4:02:17 AM, you wrote:
Recently the go language was announced at golang.org. There's not a
lot in there to make a haskeller envious, except one real big one:
compilation speed. The go compiler is wonderfully speedy.
are you seen hugs, for example? i
Hello Don,
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=cleanbox=1
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=ocamlbox=1
The Haskell compiler isn't the bottleneck. Use it when performance matters. I
do.
Don, shootout times may
Hello Ketil,
Wednesday, November 4, 2009, 4:31:20 PM, you wrote:
Well, it clearly demonstrates that it is possible to write fast code in
Haskell.
my measures says that by psending 3x more time than for C you can
optimize haskell code to be only 3x slower than C one
succinct and correct
Hello Alberto,
Wednesday, November 4, 2009, 5:58:31 PM, you wrote:
I personally don´t care about raw performance.
me too. actually, i write time-critical parts of my app in c++
Haskell is in the
top of the list of language performance.
this list is meaningless, as i said before
It has
Hello Ketil,
Wednesday, November 4, 2009, 7:43:38 PM, you wrote:
Right?, the interesting thing is not how fast I can get with N times the
effort, but if I can get fast enough with 1/N.
it depends entirely on how fast you need. so it's again changing the
topic - while i say that haskell is
Hello Kalman,
Wednesday, November 4, 2009, 7:53:49 PM, you wrote:
I've not looked at the code, but you'll want ghc to do better optimizations
than -O. -O2 is what you should use in general. Also, number-crunching often
profits from -fexcess-precision.
also, floating-point number crunching
Hello Will,
Monday, November 2, 2009, 10:41:15 AM, you wrote:
(testing was done running the ghc -O3 compiled code inside GHCi).
afaik, -O2 should be used
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Hello Kim-Ee,
Tuesday, October 27, 2009, 8:08:27 PM, you wrote:
Just for completeness' sake, bottom is a value for any expression.
Wouldn't making the else clause optional by defaulting to undefined
worthy of consideration for Evil Haskell?
in this case you will get an exception when
Hello michael,
Monday, October 26, 2009, 7:24:46 PM, you wrote:
afair, ** and ^ are different - one is for integers, another for
floating-point numbers
Hi Brandon,
Being new to Haskell, I take it (^) and (^^) would be the preferred
exponential operator. When (how,where,why) would one use
Hello Colin,
Sunday, October 25, 2009, 7:59:54 PM, you wrote:
developers, I would probably find it very difficult indeed to find
another job as an Eiffel developer, so I would have to look elsewhere,
Haskell developers have another risk - they may be considered as
overqualified for doing
Hello zaxis,
Friday, October 23, 2009, 11:15:01 AM, you wrote:
good_ssq_red = withFile ssqHitNum.txt ReadMode (\h - do {
samp - fmap str2Ints $ hGetContents h;
print samp;--without this line, the result will always [1..16]
return $ statis samp;
})
withFile
ssqHitNum.txt;
return $ statis samp;
}
It works now ! thank you
Bulat Ziganshin-2 wrote:
Hello zaxis,
Friday, October 23, 2009, 11:15:01 AM, you wrote:
good_ssq_red = withFile ssqHitNum.txt ReadMode (\h - do {
samp - fmap str2Ints $ hGetContents h;
print samp
Hello michael,
Thursday, October 22, 2009, 4:59:43 AM, you wrote:
return () does the trick if another branch also returns ()
Thanks guys,
I understand what you're telling me, but have some nested IFs and
just want to fall through on one of the ELSES but then I end up with
two ELSES in a
Hello zaxis,
Thursday, October 22, 2009, 11:28:14 AM, you wrote:
aaa - newIORef ([]::[(Int,Int)])
writeIORef aaa [(1,1),(2,2),(3,3)]
then if i want to change aaa to [(1,1),(2,222),(3,3)] , what's the best way
?
re-write aaa is not permitted.
it's the only way. in Haskell, you have
Hello zaxis,
Thursday, October 22, 2009, 11:28:14 AM, you wrote:
then if i want to change aaa to [(1,1),(2,222),(3,3)] , what's the best way
... well, anyway what you are doing isn't very haskellish. it may be
considered as advanced topic but basically, best way to compute
something in Haskell
; send_backP pipe (buf,len))
yes, it's imperative but it includes several lambdas per each line
Bulat Ziganshin-2 wrote:
Hello zaxis,
Thursday, October 22, 2009, 11:28:14 AM, you wrote:
aaa - newIORef ([]::[(Int,Int)])
writeIORef aaa [(1,1),(2,2),(3,3)]
then if i want to change aaa to [(1,1
Hello zaxis,
Thursday, October 22, 2009, 1:03:21 PM, you wrote:
Is [(1,1),(2,2),(3,3)] been regarded as a hash ? If not, what is the best
way to change it to [(1,1),(2,),(3,3)] in function `f` ?
f = map (\x@(a,b) - if a==2 then (a,) else x)
or
f xs = [(a, if a==2 then else b) |
Hello Andrew,
Friday, October 16, 2009, 10:19:46 PM, you wrote:
actually print out what's in it. On the other hand, I don't want to
alter the entire program to have Show constraints everywhere just so I
can print out some debug traces (and then alter everything back again
afterwards once I'm
Hello Andrew,
Wednesday, October 14, 2009, 10:28:45 PM, you wrote:
I had always *assumed* that there was something like a hundred core
developers
only 10 and only in binary system :)))
Simon Peyton-Jones works on front-end, i.e compiling Haskell down to
simple core language, and Simon Marlow
Hello Andrew,
Thursday, October 15, 2009, 12:54:37 AM, you wrote:
Does anybody actually get paid to develop GHC? Or is this all people
SPJ, SM and Ian are paid by MS Research. Other people involved in core
development are mainly scientists (afaik)
--
Best regards,
Bulat
Hello Neil,
Sunday, October 11, 2009, 5:58:51 PM, you wrote:
I had a crack at a simple proper Data instance, and got as far as
needing a Data instance for ByteString#, accompanied by an error I don't
impossible. i'm not sure wher i've read this but those # types (Int#,
ByteArray# and so on)
Hello Cristiano,
Thursday, October 8, 2009, 7:14:20 PM, you wrote:
Could you explain why, under NoMonomorphismRestriction, this typechecks:
let a = 1 in (a + (1 :: Int),a + (1 :: Float))
while this not:
foo :: Num a = a - (Int,Float)
foo k = (k + (1 :: Int), k + (1.0 :: Float))
i think
Hello Ross,
Wednesday, October 7, 2009, 6:02:28 AM, you wrote:
car = head
unfortunately it doesn't work without -fno-monomorphism-restriction
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Haskell-Cafe
Hello Luke,
Wednesday, October 7, 2009, 11:35:47 AM, you wrote:
car = head
unfortunately it doesn't work without -fno-monomorphism-restriction
It should be fine without the monomorphism restriction. Said
restriction only applies to functions with typeclass constraints, of
which this has
Hello Peter,
Wednesday, October 7, 2009, 2:04:49 PM, you wrote:
afair, nhc was started there. it was a small compiler exactly because
Amiga was a rather small computer (comapred to RISC stations)
Yep. Commodore 64, Amiga. I really loved those machined, especially
the Amiga (mmm, maybe someone
Hello Deniz,
Wednesday, October 7, 2009, 5:03:59 PM, you wrote:
it depends. what i see with ghc 6.6.1:
C:\!\Haskellrunghc test.hs
test.hs:1:6:
Ambiguous type variable `a' in the constraint:
`Enum a' arising from use of `fromEnum' at test.hs:1:6-13
Possible cause: the monomorphism
Hello Deniz,
Wednesday, October 7, 2009, 5:23:24 PM, you wrote:
Possible cause: the monomorphism restriction applied to the following:
ord :: a - Int (bound at test.hs:1:0)
Probable fix: give these definition(s) an explicit type signature
or use
Hello Rafal,
Monday, October 5, 2009, 9:18:30 AM, you wrote:
Is there a neat way to have c2hs generate the FunPtr version for me?
from my program:
-- |My callback function type
type CALLBACK_FUNC = Ptr CChar - IO CInt
foreign import ccall threadsafe wrapper
mkCALL_BACK :: CALLBACK_FUNC
Hello Paul,
Wednesday, September 30, 2009, 1:18:03 PM, you wrote:
I haven't found a function in hackage or in the standard library that
takes a list of booleans (or a list of 0s and 1s, or a tuple of booleans
or 0s and 1s) and outputs a Word8 or Word32.
sum . zipWith (*) (map (2^) [0..])
Hello Max,
Wednesday, September 30, 2009, 5:53:37 PM, you wrote:
afaik, SYB just provides gshow/gread functions what serialize any Data
instance to String
FWIW, writing your own is not hard. I wrote a serializer for GHC using
Data in less than 150 (simple) LOC. It produces [Word8], but
Hello Curt,
Sunday, September 27, 2009, 8:16:53 PM, you wrote:
http://www.starling-software.com/en/blog/drafts/2009/09/27.succ-java-summary.html
what are the types of balance and interest in balance * interest
expression? ;)
--
Best regards,
Bulat
Hello Martijn,
Monday, September 28, 2009, 1:42:10 PM, you wrote:
Another nice
thing this suggests is the ability to use underscore as a pattern for
when you know the compiler will infer the type but it's too complex to
want to write out (e.g. while experimenting).
in case you not seen
Hello Edward,
Monday, September 28, 2009, 6:26:12 PM, you wrote:
If you have counterexamples, then perhaps you can name them. I'm looking
for Java shops with 5+ developers and code bases of 100k converting
over to Haskell. I don't know _any such shop_ that has switched to
Haskell, and I
Hello Casey,
Friday, September 25, 2009, 11:22:25 AM, you wrote:
Well that makes sense, but for a learner, how is he/she supposed to
know that 'i' could be '(i,i)' or for that matter a tuple of n of
those i's?
look at Ix class instances:
Hello Vasyl,
Thursday, September 24, 2009, 1:30:46 PM, you wrote:
I couldn't find any solutions to this problem, I am afraid that
this problem could occur in other non-native haskell modules (bindings to C
libraries)
look at GHC.ConsoleHandler module
--
Best regards,
Bulat
Hello Jimmy,
Wednesday, September 23, 2009, 11:11:58 AM, you wrote:
How about this (which I believe to be backwards compatible):
brilliant!
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Haskell-Cafe
Hello Grzegorz,
Wednesday, September 23, 2009, 7:19:59 PM, you wrote:
This seems like a bug in the implementation of writeArray: when passed
let (l,u) = ((0,10),(20,20))
writeArray computes raw index (from 0 to total number of array
elements) and check that this index is correct. with
Hello John,
Wednesday, September 23, 2009, 10:50:24 PM, you wrote:
This may be more appropriate for a different list, but I'm having a
hard time figuring out whether or not we're getting a cross compiler
in 6.12 or not. Can some one point me to the correct place in Traq to find
this
101 - 200 of 1995 matches
Mail list logo