Iavor,
Thanks.
> One way to test this would be to name the equality function explicitly. For
> example, something like this:
> myEquality x y = ...
> instance Eq MyType where (==) = myEquality
Good idea (but a little painful!).
> Another option would be to look at the generated core by using -
=
Second Call for Papers
ICFP 2011: International Conference on Functional Programming
Tokyo, Japan, Monday 19 -- Wednesday 21 September 2011
http://www.icfpconference.org/icfp2011
Hi,
I need to convert IOArray to bytestring as shown below -
import Data.Array.IO
import Data.Binary.Put
import qualified Data.ByteString.Lazy as BS
import Data.Word
main = do
arr <- newArray (0,9) 0 :: IO (IOArray Int Int)
let bs=toByteString arr
return ()
How can I implement the 'toByteString'
Your array contains machine-sized Ints, which in practice are likely
either 32-bit or 64-bit, while a ByteString is the equivalent of an
array or 8-bit values. So you'll need to somehow convert the Ints to
Word8s. Do you know if you need big or little endian?
A basic approach would be:
* Use free
On Mon, 2011-02-07 at 14:42 +, Malcolm Wallace wrote:
> > It seems then that a package should be the least restrictive
> > combination of all the licenses in all the contained modules.
>
> Omit the words "least restrictive" and I think you are correct.
>
> To combine licences, just aggregat
On Tue, Feb 8, 2011 at 2:26 PM, Michael Snoyman wrote:
> Your array contains machine-sized Ints, which in practice are likely
> either 32-bit or 64-bit, while a ByteString is the equivalent of an
> array or 8-bit values. So you'll need to somehow convert the Ints to
> Word8s. Do you know if you n
On Tue, Feb 8, 2011 at 11:13 AM, C K Kashyap wrote:
>
>
> On Tue, Feb 8, 2011 at 2:26 PM, Michael Snoyman wrote:
>>
>> Your array contains machine-sized Ints, which in practice are likely
>> either 32-bit or 64-bit, while a ByteString is the equivalent of an
>> array or 8-bit values. So you'll ne
>
>
> 1) Just use Data.Word.Word8 instead of the second Int in your type sig
> for IOArray
> 2) Use getElems to get a [Word8]
> 3) Data.ByteString.pack converts a [Word8] into a ByteString
>
> Michael
>
I am currently using a list of tuples - [(Int,Int,Int)] to represent an
image buffer. You can s
C K Kashyap writes:
> I am currently using a list of tuples - [(Int,Int,Int)] to represent an
> image buffer.
[...]
> Looks like this is pretty slow,
Unsurprisingly, as there's a huge space overhead, and (depending on
usage, but probably even worse) linear access time.
> I wonder if working
2011/2/7 Richard O'Keefe :
>
> On 8/02/2011, at 3:47 AM, Gábor Lehel wrote:
>>
>> I dunno. As a language extension, would - let's call it BangTypes - be
>> backwards-incompatible in any way?
>
> Let's look at an intermediate step first, BangFunctions.
>
> What this does is to say that there are two
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21
09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded
binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does
work, gcc does work, but for ghc I get:
ghc -O2 --make test.hs -o test
[1 of
On Tue, Feb 8, 2011 at 10:39 AM, C K Kashyap wrote:
>>
>> 1) Just use Data.Word.Word8 instead of the second Int in your type sig
>> for IOArray
>> 2) Use getElems to get a [Word8]
>> 3) Data.ByteString.pack converts a [Word8] into a ByteString
>>
>> Michael
>
> I am currently using a list of tuple
Gábor Lehel writes:
> Is there any sensible meaning for bangs on return types? I've been
> trying to think this through but not necessarily succeeding.
Not knowing Clean in any detail, I've always just thought that a type
signature of, say:
something :: !Foo -> Bar
would mean the sam
2011/2/8 Ketil Malde :
> Gábor Lehel writes:
>
>> Is there any sensible meaning for bangs on return types? I've been
>> trying to think this through but not necessarily succeeding.
>
> Not knowing Clean in any detail, I've always just thought that a type
> signature of, say:
>
> something
Am 08.02.2011 11:39, schrieb Dušan Kolář:
> ghc -O2 --make test.hs -o test
> [1 of 1] Compiling Main ( test.hs, test.o )
> ghc: could not execute: /usr/bin/gcc
>
> Even if I can easily compile gcc testc.c -o testc and run testc.
Your ghc script (under /usr/local/bin or elsewhere "type
Not the problem, ghc script:
cat /usr/local/lib/ghc-6.10.4/V12/bin/ghc
#!/bin/sh
exedir="/usr/local/lib/ghc-6.10.4/V12//lib/ghc-6.12.3"
exeprog="ghc-stage2"
executablename="$exedir/$exeprog"
datadir="/usr/local/lib/ghc-6.10.4/V12/share"
bindir="/usr/local/lib/ghc-6.10.4/V12/bin"
topdir="/usr/loca
Ok, gcc is used as linker, too. So maybe try to
-pgml /usr/local/bin/gcc
add to your command line.
C.
Am 08.02.2011 12:50, schrieb Dušan Kolář:
> Not the problem, ghc script:
>
> cat /usr/local/lib/ghc-6.10.4/V12/bin/ghc
> #!/bin/sh
> exedir="/usr/local/lib/ghc-6.10.4/V12//lib/ghc-6.12.3"
>
Does adding "-v" reveal when /usr/bin/gcc is used?
ghc -v -O2 --make test.hs -o test
C.
Am 08.02.2011 11:39, schrieb Dušan Kolář:
> Hello all,
>
> I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21
> 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded
> binary
Unfortunately, no help :-(
String /usr/bin/gcc was found in the following files, if it is useful
information:
/lib/ghc-6.12.3/haddock
/lib/ghc-6.12.3/ghc
/lib/ghc-6.12.3/ghc-6.12.3/Config.hi
/lib/ghc-6.12.3/ghc-6.12.3/Config.p_hi
/lib/ghc-6.12.3/ghc-6.12.3/Config.dyn_hi
/lib/ghc-6.12.3/ghc-6.
Hi,
I have recently finished a paper about Froglingo, a programming language
designed to make it easier to write data-intensive business applications. It is
a monolith consolidating programming, database/file management, data exchange,
web server, and access control. What makes Froglingo unique
This is the end of the log:
*** Assembler:
/usr/bin/gcc -I. -c /tmp/ghc29474_0/ghc29474_0.s -o test.o
*** Deleting temp files:
Deleting: /tmp/ghc29474_0/ghc29474_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc29474_0
ghc: could not execute: /usr/bin/gcc
Otherwise gcc not mentioned, no error menti
On Mon, Feb 7, 2011 at 11:30 PM, Ivan Lazar Miljenovic <
ivan.miljeno...@gmail.com> wrote:
> On 8 February 2011 09:57, John Lato wrote:
> > I think the real problem we have with container classes has a lot more to
> do
> > with what we would use them for. That is, Haskell already has Monoid,
> >
This looks like gcc is used as assembler.
Try to add:
-pgma /usr/local/bin/gcc
C.
Am 08.02.2011 13:22, schrieb Dušan Kolář:
> This is the end of the log:
>
> *** Assembler:
> /usr/bin/gcc -I. -c /tmp/ghc29474_0/ghc29474_0.s -o test.o
> *** Deleting temp files:
> Deleting: /tmp/ghc29474_0/gh
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:35:0:
Error: bad register name `%rbp)'
/tmp/ghc32376_0/ghc32376_0.s:36:0: Error: bad register name `%r15'
/tmp/ghc32376_0/ghc32376_0.s:38:0: Error: bad register
On 8 February 2011 23:25, John Lato wrote:
>> class Container c where
>> type Elem c :: *
>>
>> class (Container cIn, Container cOut) => CMap cIn cOut where
>> cmap :: (Elem cIn -> Elem cOut) -> cIn -> cOut
>>
>> instance (a ~ Elem (c a), b ~ Elem (c b), Functor c, Container (c a),
>> Cont
2011/2/8 Dušan Kolář :
> Hello all,
>
> I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04
> CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of
> ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does
> work, but for ghc I get:
>
> ghc -O
On Tue, Feb 8, 2011 at 12:33 PM, Ivan Lazar Miljenovic <
ivan.miljeno...@gmail.com> wrote:
> On 8 February 2011 23:25, John Lato wrote:
> >> class Container c where
> >> type Elem c :: *
> >>
> >> class (Container cIn, Container cOut) => CMap cIn cOut where
> >> cmap :: (Elem cIn -> Elem
There seems to be confusion about 32bit and 64bit assembly.
Can you compile and link without optimization?
C.
Am 08.02.2011 13:33, schrieb Dušan Kolář:
> Well, it helped, but not getting output anyway:
>
> /tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
>
> /tmp/ghc32376_0/ghc32376_0.s:35:0:
2011/2/8 Dušan Kolář :
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21 09:44:04
CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of
ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gcc does
work, but for ghc I get:
ghc -O2 --make tes
No :-(
D.
There seems to be confusion about 32bit and 64bit assembly.
Can you compile and link without optimization?
C.
Am 08.02.2011 13:33, schrieb Dušan Kolář:
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:
On Monday, February 7, 2011, C K Kashyap wrote:
> Hi,I found that on windows and my ubuntu box, when I did this
> ghci> t <- forkIO someAction
> "someAction" started executing in the foreground - as in, the ghci prompt did
> not come back (until I pressed Ctrl-C)
>
> On my mac however, when I ran
> On Mon, 2011-02-07 at 14:42 +, Malcolm Wallace wrote:
> > > It seems then that a package should be the least restrictive
> > > combination of all the licenses in all the contained modules.
> >
> > Omit the words "least restrictive" and I think you are correct.
>
OK.
> >
> > To combine lice
> From: David Leimbach, Sent: Tue, February 8, 2011 8:07:39 AM
> On Monday, February 7, 2011, C K Kashyap wrote:
> > Hi,I found that on windows and my ubuntu box, when I did this
> > ghci> t <- forkIO someAction
> > "someAction" started executing in the foreground - as in, the ghci prompt
>did
Vivian McPhail writes:
> Looking specifically at hmatrix, there are three kinds of modules
>
>i) bindings to GSLGPL
>ii) bindings to LAPACK BSD
>iii) pure Haskellhmatrix author's choice
>
> 1) Am I correct in thinking that even the bindings modules (the
Consider the following definitions:
1. Denotational semantics can be considered as relation between syntax
and mathematical objects (the meaning of the syntax).
2. Operational semantics can be considered as set of rules for
performing computation.
Question 1
Applying these definitions in a Haskell
It feels to me like a quite reasonable simplification that if someone
wants to offer different bits of code, with the intent that the license
terms of the eventual executable may be different depending on which
bits you use, then they ought to do so in different packages. It's
simple enough to do,
Is there any way to get current position from System.IO.Handle as
Integer? If no, what other windows/unix portable IO function set
of file io with this functionality you can suggest? keeping track of
current position by hand is not an option, sorry.
I'm thinking about c's low-level functions such
>
>
> I can't reproduce this. What are you using as the action?
>
> I've tried bottoms, and tight loops whose Core contains no allocations, and
> not
> managed to lock up the prompt, or seen ghci using more threads than I have
> cores.
>
> One thing that may give the appearance of locking up the pr
On Tue, 2011-02-08 at 18:15 +0300, Permjacov Evgeniy wrote:
> Is there any way to get current position from System.IO.Handle as
> Integer?
Have you looked at hTell in System.IO?
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
ht
What does "gcc -v" say?
Maybe you have to install the 32Bit ghc-6.12.3 that can work together
with your gcc.
Christian
Am 08.02.2011 15:05, schrieb Kolar Dusan:
> No :-(
>
> D.
>
>
>> There seems to be confusion about 32bit and 64bit assembly.
>> Can you compile and link without optimization?
Am 08.02.2011 11:39, schrieb Dušan Kolář:
> Hello all,
>
> I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21
> 09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded
> binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does
> work, gcc does work, but for
2011/2/8 Kolar Dusan :
>> 2011/2/8 Dušan Kolář :
>>>
>>> Hello all,
>>>
>>> I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21
>>> 09:44:04
>>> CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded binary of
>>> ghc6.12.3 for the purpose, but ghc doesn't work. ghci does work, gc
On Tue, Feb 8, 2011 at 7:04 AM, Patrick Browne wrote:
> Consider the following definitions:
> 1. Denotational semantics can be considered as relation between syntax
> and mathematical objects (the meaning of the syntax).
> 2. Operational semantics can be considered as set of rules for
> performing
Ten days until the submission deadline.
"Nein": what I won't take for an answer.
Eighth to eighteenth February,
Seven thousand minutes twice,
Sick's he who can't write aught.
Five submissions now;
Four more, at least?
Three'd be fair
To no-
One.
http://themonadreader.wordpress.com/2011/01/19/call
ACM SIGPLAN Workshop on ML
Sunday, 18 September 2011, Tokyo, Japan (co-located with ICFP)
http://conway.rutgers.edu/ml2011/
CALL FOR CONTENT
The ML family of programming languages includes dialects known as
Standard ML, Objective Caml, and F#. These languages have inspired
a large amount of comp
* Iavor Diatchki [2011-02-07 23:45:58-0800]
> Another option would be to look at the generated core by using -ddump-simpl
> when compiling. This will generate a whole bunch of output, which you can
> redirect to a file and the search for the mysterious symbols inside.
IIRC they are generated at r
On Tuesday 08 February 2011 22:18:14, Roman Cheplyaka wrote:
> * Iavor Diatchki [2011-02-07 23:45:58-0800]
>
> > Another option would be to look at the generated core by using
> > -ddump-simpl when compiling. This will generate a whole bunch of
> > output, which you can redirect to a file and the
On Tue, Feb 8, 2011 at 7:04 AM, Patrick Browne wrote:
> Consider the following definitions:
> 1. Denotational semantics can be considered as relation between syntax
> and mathematical objects (the meaning of the syntax).
> 2. Operational semantics can be considered as set of rules for
> performing
On Tue, Feb 8, 2011 at 2:01 PM, Alexander Solla wrote:
> It is hard to come up with a single operational semantic for types, because
> they do so many different things, and there is a semantic for each
> interpretation.
G. Hillebrand, P. C. Kanellakis (in paper "Functional Database Query Langu
On Tue, Feb 8, 2011 at 07:55 pm, Conal Elliott wrote:
Here's my personal denotational answer to question 2: I think of a type as
denoting a collection of (mathematical) values. If an expression e has type T,
then the meaning (value) of e is a member of the collection denoted by T. This
simple
On Tue, Feb 8, 2011 at 9:02 PM, wrote:
>
> On Tue, Feb 8, 2011 at 07:55 pm, Conal Elliott wrote:
>
>> Here's my personal denotational answer to question 2: I think of a type as
>> denoting a collection of (mathematical) values. If an expression e has type
>> T, then the meaning (value) of e is
Hi,
Is this a good implementation of split function? ... I was wondering about
the "lines" function, it basically a special case of split right?
split c xs = foldr f [[]] xs
where
f x list@(l:ls)= if x == c then []:list else (x:l):ls
Regards,
Kashyap
52 matches
Mail list logo