Mitar schrieb:
Hi!
Is there for $ (fmap) operator some nice looking symbol in mathematics,
LaTeX?
I am looking here:
http://www.soi.city.ac.uk/~ross/papers/Applicative.html
http://www.haskell.org/ghc/docs/6.12.1/html/libraries/base/Control-Applicative.html
but only for other
Magnus Therning schrieb:
AFAIK there is no way to do that, thouhg scion[1] may offer it.
Personally I develop more complex local functions at the top-level,
and once I'm happy with it I perform some re-factoring and move it in.
I would not write large local functions at all. I would leave
http://www.haskell.org/haskellwiki/Determining_the_type_of_an_expression
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Jacques Carette schrieb:
I am trying to install llvm-0.9.0.1 on Windows (through cygwin), on top
of a clean install of Haskell Platform 2010.2.0.0.
I do
cabal install llvm --configure-option --with-llvm-prefix=C:\\llvm
(which is where I unpacked llvm-gcc4.2-2.8-x86-mingw43.tar.bz2). This
Jason Dagit schrieb:
While the GLfloat instances don't need to be in base, the CFloat
instance probably should be in base. Is this something I should make a
library proposal for and submit patches? Is there an easier way to get
these instances? Has someone already done this?
Maybe the
I have a large package and want to profile all functions of a single module of
that package. I tried to prepend the pragma
{-# OPTIONS_GHC -prof -auto-all #-}
to the mentioned module, but GHC rejects this, because the profiler options are
not allowed in the OPTIONS pragma. According to
James Cook schrieb:
Those are both options, as is to simply restart findRoot if it returns
a 'Left' vaule. I personally would incline toward a custom driver
function (findRoot). I should probably add one to the library that
accepts a step limit and/or one that just iterates until
On Tue, 22 Mar 2011, Jarkko Vilhunen wrote:
Greetings,
With OpenGL shaders it is possible to write code utilizing loops with
unknown number of iterations, I'm wondering if the same can be done
with GPipe? Fractals would be one use case and implicit surfaces
another. Fragment Floats had to be
Andrew Coppin schrieb:
On 16/03/2011 03:05 PM, Brent Yorgey wrote:
This kind of knot-tying approach is nice for static graphs.
I think we should have a wiki page somewhere which explains what all the
various Haskell-related terms mean. Terms like typing the knot and
finally tagless. (Not
Andrew Coppin schrieb:
Haskell has ADTs. Most of the time, these work great. As I've written in
several other places (but possibly not here), OO languages tend to
factor the problem the other way. That is, if I want a binary tree, an
OO language makes me split the type and all of its
On Mon, 21 Mar 2011, Tom Nielsen wrote:
sampler = do
x - gauss 0.0 1.0
y - gauss 0.0 1.0
return $ (2*x, x+y)
main = do
xys - take 10 `fmap` runSamplerIO sampler
print $ runStat
(both (before varF fst) (before varF snd)) $
xys
=
On Sun, 20 Mar 2011, Edward Amsden wrote:
Hi cafe,
I'm looking for a library that provides an instance of Num,
Fractional, Floating, etc, but carries uncertainty values through
calculations. A scan of hackage didn't turn anything up. Does anyone
know of a library like this?
Do you mean
On Fri, 18 Mar 2011, Magnus Therning wrote:
On Fri, Mar 18, 2011 at 10:13:21PM +0100, Daniel Fischer wrote:
On Friday 18 March 2011 21:51:27, Magnus Therning wrote:
However, I can't seem to get the test's sources included in the
tar-ball created by 'sdist'. Is there some trick to it?
On Thu, 17 Mar 2011, wren ng thornton wrote:
(1) If the result would drop below zero then throw an overflow error;
(2) Use saturating subtraction, i.e. if the result would drop below zero then
return zero;
(3) Use type hackery to disallow performing subtraction when the result would
drop
On Wed, 16 Mar 2011, Daniel Fischer wrote:
Tail recursion is good for strict stuff, otherwise the above pattern - I
think it's called guarded recursion - is better, have the recursive call as
a non-strict field of a constructor.
In
http://haskell.org/haskellwiki/Tail_recursion
it is also
On Fri, 11 Mar 2011, Daniel Fischer wrote:
On Friday 11 March 2011 17:04:16, Daniel Díaz wrote:
Hi, cafe,
I'm working in a program where I use many connections with Network.HTTP.
Sometimes, connections are closed while my program is reading them, and
an error appears:
socket: XXX:
On Fri, 11 Mar 2011, Daniel Peebles wrote:
Check out the spoon package on hackage. It's designed for these kinds of
situations, and
will wrap up common user-generated pure exceptions into a Maybe (and will
return
Nothing in the cases you describe)
This is a hack, since 'undefined' cannot
On Wed, 9 Mar 2011, Yves Parès wrote:
Hello,
I am trying to make a monad that uses ST internally.
But even when reducing this to the simplest case I'm still cramped by the 's'
phantom
type :
{-# LANGUAGE Rank2Types #-}
newtype MyST a = MyST (forall s. ST s a)
-- ^ I cannot use deriving
On Wed, 2 Mar 2011, Henning Thielemann wrote:
On Wed, 2 Mar 2011, Rouan van Dalen wrote:
I would like to know what is the preferred Haskell mechanism for handling
exceptions in the IO monad? I am not concerned with mechanisms such as
Maybe / Either, but would like to know about exception
Jacek Generowicz schrieb:
Hi Cafe,
It seems that I don't understand what groupBy does.
I expect it to group together elements as long as adjacent ones satisfy
the predicate, so I would expect ALL four of the following to give one
group of 3 and a group of 1.
Prelude :m + Data.List
On Mon, 7 Mar 2011, trysta...@comcast.net wrote:
* I could see what OS it is and try those options and use a temp file only if
it's an
unexpected os. Unfortunately System.Info.os reports windows (and some other
os's) as
mingw32, I think it's because of how GHC was compiled. Who knows what
On Sun, 6 Mar 2011, Dominic Steintiz wrote:
I'd like to create a darcs repo for a package I've just created so
people can do:
darcs get http://code.haskell.org/largeword
I can logon to code.haskell.org but I don't have permission to create a
directory in /srv/code which is what I thought I
Daniel Peebles schrieb:
Have you tried it? It's completely addictive (and takes up a big chunk
of my free time).
+1 after completing some missions in PVS. :-)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Wed, 2 Mar 2011, Rouan van Dalen wrote:
I would like to know what is the preferred Haskell mechanism for
handling exceptions in the IO monad? I am not concerned with mechanisms
such as Maybe / Either, but would like to know about exception
mechanisms inside the IO monad.
The 2 I know
Now that almost every syntax can be redirected to custom functions
(RebindableSyntax, OverloadedStrings), would it make sense to map 'let'
to 'fix' ? Would this open a way to implement observable sharing as
needed in EDSLs by a custom 'fix'?
___
Roel van Dijk schrieb:
In general code compiled with GHC will be a lot faster than code
interpreted by GHCI. You can also call compiled code from within GHCI,
in which case you would hardly see a performance difference.
$ ghci -fobject-code
compiles modules before loading into the interpreter
Duncan Coutts schrieb:
Several people have asked about the new host key. Yes, there is a new
RSA host key for the community server, the fingerprint of which is:
21:b8:59:ff:39:69:58:7a:51:ef:c1:d8:c6:24:6e:f7
ssh will likely give you a scary warning and you'll need to delete the
old
On Tue, 8 Feb 2011, C K Kashyap wrote:
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 ()
Thank you a lot for bringing code.haskell.org back! I missed it a lot!
However, I still get
$ ssh code.haskell.org
@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@
Chris Smith schrieb:
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.
Thomas Davie schrieb:
A while ago I remember someone showing me some tool, I *think* ghci that
allowed you to pass it a function of type String - String as an input, and
have it simply run that function on stdin (presumably using interact) to
achieve useful things like this...
$ cat
On Sun, 13 Feb 2011, Iustin Pop wrote:
On Sat, Feb 12, 2011 at 11:21:37AM -0500, Gwern Branwen wrote:
See http://hackage.haskell.org/package/split
The reason it's not in Data.List is because there are a bazillion
different splits one might want (when I was pondering the issue before
Brent
On Mon, 31 Jan 2011, MattMan wrote:
I'm new to Haskell, and am trying to implement some simple typeclasses for
doing algebra. For example I have type class (simplified for the sake of
argument)
class AbGroup a where
add :: a - a - a
I would like any type instantiating Num to also be an
On Mon, 31 Jan 2011, Brandon S Allbery KF8NH wrote:
On 1/31/11 15:24 , Daniel Fischer wrote:
want. You could then also enable OverlappingInstances, which would allow
you to write other instances, but that extension is widely regarded as
dangerous (have to confess, I forgot what the dangers
Patrick Browne schrieb:
On 29/01/2011 20:56, Henning Thielemann wrote:
Is there a reason why you use an individual type for every unit?
The existing implementations of typed physical units only encode the
physical dimension in types and leave the unit factors to the value
level. I found
Patrick Browne schrieb:
On 30/01/2011 19:43, Henning Thielemann wrote:
I do not see a constant 1 that is equated with a type.
This is due to my misunderstanding of Haskell.
After your comments my understanding of the unit function is as follows:
1) In the instance below the argument
Henk-Jan van Tuyl schrieb:
L.S.,
Only four days until the old Haskell.org server disappears; I found the
following missing:
http://www.haskell.org/yale/
http://darcs.haskell.org/hfuse/
http://haskell.org/gtk2hs/
http://haskell.org/FranTk
http://www.haskell.org/yampa/
Frank Kuehnel schrieb:
Hi folks,
how do I make this work: I want a division algebra over a field k, and I want
to define
the conjugation of complex numbers, i.e. conj (C 1 2) but also the
conjugation of tensors of complex numbers
conj (C (C 1 2) (C 1 4))
ghci load that stuff butt
Patrick Browne schrieb:
Below is some code that is produces information about the *types* used
for measuring (e.g. metres). The following evaluation returns 1.00
which the convert factor for metres.
convertFactorToBaseUnit (unit (LengthInMetres 7))
.
The next evaluation returns the type,
Evan Laforge schrieb:
One of the first things I did when starting a larger haskell project
was to write a preprocessor that would replace certain tokens with
(token_srcpos (filename, func_name, lineno)) and then write x and
x_srcpos versions of the various 'throw' and logging functions. This
Chris Smith schrieb:
On Thu, 2011-01-27 at 11:44 -0600, aditya siram wrote:
I was a little negative in my last message so maybe I can contribute
something positive. If you're looking for a musical way to teach
Haskell I did a Haskell music hackathon [1] about a year and a half
ago. The idea
On Tue, 25 Jan 2011, gutti wrote:
I created some code from scratch - probably ugly beginners style - so
I'm keen to get tips how to make it more pretty and faster
Can you please add type signatures? This would help me understanding.
import Data.List
-- Input Data
xi :: [Double]
xi = [0
On Sun, 23 Jan 2011, Claude Heiland-Allen wrote:
essentially, it creates a matrix of 1d splines, but now I see that this isn't
what you wanted...
for interpolated 2d matrix lookup, something like this, perhaps:
Interpolated matrix or vector lookup can of course be written as
interpolation
On Sat, 22 Jan 2011, gutti wrote:
I'm looking for Vector and especially Matric interpolation ala:
z = interp2 (xMatrix, yMatrix, zMatrix, x, y)
- x and y can be single values or also vectors or matrices
- indeally with the options nearest, linear, quadratic, qubic..
Any hope that
On Sat, 22 Jan 2011, Grigory Sarnitskiy wrote:
I need to deal with functions of type (Double - Double). I need Fourier
transform, integration, + - * / operations, value of a function in a
point, probably composition.
Incidentally I am currently working on a function representation based on
On Sat, 22 Jan 2011, Henning Thielemann wrote:
http://code.haskell.org/numericprelude/src/MathObj/Gaussian/Polynomial.hs
a hyphen was missing:
http://code.haskell.org/numeric-prelude/src/MathObj/Gaussian/Polynomial.hs
___
Haskell-Cafe mailing
On Sat, 22 Jan 2011, gutti wrote:
I just don't fully get how it works:
- are t a b c d points or curve parameters ?
- how does lifting to matrix create a 1d spline to a 2d spline ? -- I don't see
how it works
I think it interpolates cubically between four equidistant nodes, then it
lifts
On 20/01/2011 18:56, Ryan Ingram wrote:
On Wed, Jan 19, 2011 at 11:56 PM, Patrick Browne patrick.bro...@dit.ie
wrote:
I am trying to see what how this requirement can be represented using
just the normal instance-implements-class relation for a comparison with
a specification language
C K Kashyap schrieb:
Hi,
I am trying to get a better understanding of the monad laws - right
now, it seems too obvious
and pointless. I had similar feelings about identity function when I
first saw it but understood its use
when I saw it in action.
Could someone please help me get a better
On Tue, 18 Jan 2011, John Lato wrote:
In case anyone was replying off-list, could you please cc me as well? I
believe this is
the cause of problems with the iteratee list (which Maciej just mentioned) as
well.
Although the problem does seem intermittent.
My messages to haskell-llvm are
On Fri, 14 Jan 2011, Henning Thielemann wrote:
I want to trace calls from a Haskell program to LLVM. I tried ltrace and
latrace. latrace didn't trace anything useful and ltrace shows at least the
call to one function (LLVMBuildRetVoid), but not the other ones. I'm quite
confident that I
On Mon, 17 Jan 2011, Patrick Browne wrote:
-- My intension is that the PERSON class should *specify*
-- that a person has a constant id called p1
-- and that a person has a name that can be found from the id.
class PERSON a b where
p1 :: a
name :: a - b
-- My intension is that the instance
Blake Rain wrote:
Oh yeah, it does. You're right. I haven't used it in so long that I
forgot about them! No need to be sorry.
Well, +2 for C, eh? :)
And I'd just make a mess if I used the preprocessor.
C optimizer should also unroll loops.
___
Blake Rain wrote:
Determinant is a bit fiddly, but quite trivial. However it is
woefully slow at O(n!). I need to make use of LU decomposition
(in which the determinant is the sum of the diagonal values in
U).
product of diagonal values
Adjoint is even more of a fiddle, but
Ketil Malde wrote:
Blake Rain blake.r...@gmail.com writes:
Here is the one in C:
void multiplyM4 (float m1[4][4], float m2[4][4], float m3[4][4]) {
m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0] +
m2[0][3] * m3[3][0];
m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] *
I want to trace calls from a Haskell program to LLVM. I tried ltrace and
latrace. latrace didn't trace anything useful and ltrace shows at least
the call to one function (LLVMBuildRetVoid), but not the other ones. I'm
quite confident that I linked to LLVM dynamically, since the executable is
John Meacham wrote:
On Thu, Jan 13, 2011 at 3:07 AM, Stefan Kersten s...@k-hornz.de wrote:
On 28.12.10 21:25, John Meacham wrote:
jhc generated C works on the android/ARM just fine. Android specific
libraries arn't available, so you would have to bind to what you want
with the FFI.
is there a
On Wed, 12 Jan 2011, Serge Le Huitouze wrote:
Also, I wonder how you guys do when you're trying to tests code
using a lot of numbers (be them floating point or even integer).
Machine size integers and floating point numbers are indeed nasty. I test
a lot in NumericPrelude with QuickCheck,
On Mon, 10 Jan 2011, Aaron Gray wrote:
Yes. I have came back to looking at the binary package, the only thing is I
think I have
to build my own primatives with it as it is big-endian, where ActionScript Byte
Code
format is little-endian. It does provide some little-endian functions but they
On Tue, 11 Jan 2011, Julian Gilbey wrote:
Does anyone know what has happened to the Haskell School of Expression
(SOE) webpages? The link from books for learning Haskell now gives a
404 Not Found error.
Maybe caused by the recent server move.
___
John Lato schrieb:
You could use my word24 package[1] (GHC only) to provide non-aligned
24-bit word and int types with Storable instances. You should be able
to write a binary instance (or whatever blaze-builder needs) fairly
simply from this. Little-endian only ATM, but BE could be added
On Sun, 9 Jan 2011, Aaron Gray wrote:
I am trying to work out how to use GHC.Ptr, Foreign.Storable,
Data.Storable.Endian, and
am looking for good examples of usage.
What do you intend to do with them?
The package storablevector uses a lot of Ptr, peek, and poke. Maybe this
is of some
On Sat, 8 Jan 2011, Roman Cheplyaka wrote:
I think catMaybes deserves its own typeclass, which would represent
truncatable structures:
class Truncatable struct where
catMaybes :: struct (Maybe a) - Maybe a
But catMaybes has the type
catMaybes :: struct (Maybe a) - struct a
for
On Fri, 7 Jan 2011, Brandon S Allbery KF8NH wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 1/7/11 21:56 , Tony Morris wrote:
I am wondering if it possible to generalise catMaybes:
(Something f, SomethingElse t) = t (f a) - t a
I have being doing some gymnastics with Traversable
On Fri, 7 Jan 2011, Daryoush Mehrtash wrote:
-- | Performs a signed request with the available token.
serviceRequest :: (HttpClient c,MonadIO m) = c - OAuthRequest - OAuthMonadT
m Response
serviceRequest c req = do { result - lift $ runClient c (unpackRq req)
I do not see, why different
On Sat, 8 Jan 2011, Conor McBride wrote:
On 8 Jan 2011, at 11:14, Henning Thielemann wrote:
For me, the solutions of Dave Menendez make most sense: Generalize Maybe to
Foldable and List to MonadPlus.
What has it to do with monads? There's no bind in sight.
I see a '=' in front of each
On Sat, 8 Jan 2011, Conor McBride wrote:
Of course, there is an alternative generalisation.
[] and Maybe are both Foldable, hence so is their composition.
There's got to be a thing of type
collapse :: (Foldable f, Alternative a) = f x - a x
which would do the job.
Nice! It would be
Edward Amsden schrieb:
Aditya: Not quite, because I'm actually looking to extract values from
a functor (Maybe) with a default.
Stephen: Thanks, I'll take a look at those. I do have a need for it.
I'm writing a very similar library to Yampa. (I would be patching
Yampa, but the code is a
Claude Heiland-Allen schrieb:
I've been working on [0] Haskell bindings for [1] libqd for [2]
double-double and quad-double arithmetic,
At the ICIAM conference in Zurich 2007 I heard about the sum algorithm
with two double precision floating point numbers in three talks. :-)
Nice to know that
Magicloud Magiclouds schrieb:
Hi,
I am using Data.Binary which defined instance Binary a = Binary
[a]. Now I need to define instance Binary [String] to make
something special for string list.
How to make it work? I looked into the chapter of
overlappinginstances, nothing works.
Christian Maeder schrieb:
Am 27.12.2010 08:44, schrieb Henning Thielemann:
On Mon, 27 Dec 2010, Jonathan Geddes wrote:
#2 Provide instances automatically.
http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/generic-classes.html
I see the text below and have no idea where
Eugene Kirpichov schrieb:
I would happily use a better online presentation sharing tool if I knew of
one - I am a novice in this respect. Which do you suggest?
For me a plain PDF file, say on code.haskell.org or projects.haskell.org
is the best way.
On Sun, 2 Jan 2011, Stephen Tetley wrote:
I'm trying to make a Stream library, hopefully efficient enough for
audio synthesis in the style of Jerzy Karczmarczuk's Clarion.
I am trying to code real-time audio synthesis in Haskell for some years
now. I can tell at least, that it is not so
On Sun, 2 Jan 2011, Stephen Tetley wrote:
Un-optimized, with a head-strict stream (basically Wouter Swierstra's
Stream with a bang on the element), rendering currently takes minutes
to generate seconds. But as well as the Stream representation, I've
plenty of room to optimize the WAV file
On Sat, 1 Jan 2011, Jesse Schalken wrote:
On Sat, Jan 1, 2011 at 8:54 AM, Felipe Almeida Lessa felipe.le...@gmail.com
wrote:
No definition for last works with infinite lists =).
Unless you make the result nullable, of course.
maybeLast :: [a] - Maybe a
maybeLast [] = Nothing
On Wed, 29 Dec 2010, william murphy wrote:
Hi All,
I've spent a lot of time trying to write a version of concat, which
concatenates lists of any
depth:
So:
concat'' [[[1,2],[3,4]],[[5]]] would return: [1,2,3,4,5]
You can nicely solve this problem in Haskell 98 using a Tree
On Thu, 30 Dec 2010, Antoine Latter wrote:
I started for cleaner diffs and easier editing - I can add/remove a
line at the end without editing any other line. Eventually I grew to
like the look of it.
That's not true. As long as the comma is used as separator one line can
affect an adjacent
On Thu, 30 Dec 2010, Lauri Alanko wrote:
Even nowadays, Haddock deliberately generates the following layout for
long function types:
openTempFile
:: FilePath
- String
- IO (FilePath, Handle)
The layout draws special attention to the first argument type, whereas
the other argument
On Thu, 30 Dec 2010, Lauri Alanko wrote:
Except that it falsely suggests that the last argument types are of a
similar nature as the return type. Here's what went in my head when I
first read Haskell code:
openTempFile ::
FilePath -- All right, this first part is probably the argument.
On Tue, 28 Dec 2010, aditya siram wrote:
The problem here is that unfortunately the Haskell type system cannot
do coercion.
I'd omit the unfortunately. For me it is a good thing that Haskell does
not silently apply lossy number conversions, as e.g. MatLab does.
'realToFrac' allows
On Sun, 5 Dec 2010, Henning Thielemann wrote:
Thomas Schilling schrieb:
I created http://www.haskell.org/haskellwiki/MigratingWikiContent to
list known issues and workarounds. Please feel free to extend that
page where needed.
...
I did not like to add these items while having to log
On Wed, 29 Dec 2010, Robert Clausecker wrote:
Am Mittwoch, den 29.12.2010, 13:29 +0100 schrieb Henning Thielemann:
I don't know, I hope it's doing its best. :-) You might compare speed of
Array.accum with a manually written foldl with (//).
At a glance onto it's sourcecode it actually does
On Wed, 29 Dec 2010, michael rice wrote:
In the case of ReaderT and StateT
newtype ReaderT r m a = ReaderT {
-- | The underlying computation, as a function of the environment.
runReaderT :: r - m a
}
newtype StateT s m a = StateT { runStateT :: s - m (a, s) }
what is the
On Tue, 28 Dec 2010, Robert Clausecker wrote:
Hi folks!
I have the following problem. As code is most time easier to understand,
let give an example what I try to do in C:
unsigned int i,j;
unsigned int r[100];
for (i = 0; i 100; i++) {
j = makeResult(); //j is known to be smaller than
On Mon, 27 Dec 2010, Jonas Almström Duregård wrote:
Hi Henning,
I also think that Template Haskell is used too much. Several
things that are done in existing libraries could be done in plain
Haskell in a better way.
Can you give any examples of this? I'm not saying it's not true, I'm just
On Sun, 26 Dec 2010, Antoine Latter wrote:
I haven't had a chance to dig into your example, but you might want to try the
maybeT library:
http://hackage.haskell.org/package/MaybeT
That way you could try to narrow down where the error is coming from.
MaybeT is also part of transformers
On Sun, 26 Dec 2010, David Menendez wrote:
instance Show (MaybeT m a)
This is never valid. You've defined show, shows, and showsPrec in terms of each
other, creating
unbounded recursion. Delete it.
Unfortunately, the -Wall option of GHC won't help here, since all the
methods are
On Sun, 26 Dec 2010, bri...@aracnet.com wrote:
for example :
ghc -e main foo.hs these should be treated as args for argv
I'm wondering if there is a magic option to indicate that everything
after this option is an arg option.
Use 'runghc' or 'runhaskell' instead? This is the way Cabal
On Mon, 27 Dec 2010, Jonathan Geddes wrote:
#1 Parse a string at compile-time so that a custom syntax for
representing data can be used. At the extreme, this data might even
be an EDSL.
I think it would be enough, if the compiler could be told to unfold an
expression like
parse text in a
On Sat, 25 Dec 2010, gutti wrote:
this line works :
matrixfunction x y = liftMatrix2 (zipVectorWith(\a1 a2 - if a2=0 then a1 else
0)) x y
but when I use this line :
matrixfunction f x y = liftMatrix2 (zipVectorWith f) x y
how can / do I have to define f in a seperate line a way, that it
On Fri, 24 Dec 2010, Eugene Kirpichov wrote:
I've released storable-endian 0.2.0, which does not use TH and bases
on your suggestion (though it has a bit of boilerplate because of
abandoning TH, but I don't think that's critical).
Great, this should make it also usable on JHC (I have not
On Fri, 24 Dec 2010, Gábor Lehel wrote:
One further idea -- assuming HasBigEndian and HasLittleEndian are
unexported because you don't want people writing new instances
Why should people not write further instances? I could write a
LittleEndianStorable instance for fixed point numbers, long
On Fri, 24 Dec 2010, Eugene Kirpichov wrote:
I don't think I'd like to allocate memory in these functions - I
expect them to have very predictable and very high performance.
I'm afraid on ix86 it is not possible to move a Double that is stored in
(two 32 bit) general purpose registers over
On Fri, 24 Dec 2010, Henk-Jan van Tuyl wrote:
You could use ADNS.Endian.endian from package hsdns in your Setup.hs to
define endianness at compile time.
Cool, it's already there! However I would not recommend to let a low-level
library depend on a higher-level one. I think it would be
On Fri, 24 Dec 2010, Aaron Gray wrote:
How do I code an 'instance' declaration for '(Show ([(String, Int)] - Int))'.
You ask for displaying a function that maps from [(String, Int)] to Int.
What shall the generated text look like?
___
On Fri, 24 Dec 2010, Aaron Gray wrote:
The compiler is requesting an instance declaration for Show :-
expr-eval.hs:334:23:
No instance for (Show ([(String, Int)] - Int))
arising from a use of `print' at expr-eval.hs:334:23-27
Possible fix:
add an instance
On 13.12.2010 16:38, Pavel Perikov wrote:
Is it possible to make GHC-7.0.1 to generate intrinsic instructions instead of
calls to C library to compute trigonometric functions?
main = do
a- readLn
print $ sin a
I tried -O -msse2 -fllvm and their combinations. Generating
On 16.12.2010 15:40, Duncan Coutts wrote:
On 16 December 2010 13:38, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
Maybe a flag ignore upper bounds and try with the latest for cabal would
be a solution. Would that be hard to implement or easy?
That suggestion has come up quite a
The page
http://www.haskell.org/haskellwiki/Yet_Another_Haskell_Tutorial
says that there is a darcs repository at
http://darcs.haskell.org/yaht/
but it is not. Also in the canonical replacement location
http://code.haskell.org/yaht/
I cannot find it.
The Wikiboook
On Thu, 23 Dec 2010, C K Kashyap wrote:
Here's my attempt to convert a list of integers to a list of range tuples -
Given [1,2,3,6,8,9,10], I need [(1,3),(6,6),8,10)]
That's an interesting problem!
My first attempt:
List.unfoldr (\xs - case xs of [] - Nothing; y:ys - case span (uncurry
201 - 300 of 2035 matches
Mail list logo