On Mon, 2009-12-21 at 22:55 -0800, Mark Lentczner wrote:
I have been thinking about the location of installed Haskell package
files on Mac OS X. The choice of location affects:
[..]
Thoughts? I'd be happy to help by supplying patches for various tools
to normalize all this on some agreed
Here's another way of writing it:
data Matrix a = Matr {unMatr :: [[a]]} | Scalar a deriving (Show, Eq)
-- RealFrac constraint removed
reMatr :: RealFrac a = ([[a]] - [[a]]) - (Matrix a - Matrix a)
reMatr f = Matr . f . unMatr -- this idiom occurs a lot, esp. with
newtypes
Affixing
Mark Lentczner wrote:
I have been thinking about the location of installed Haskell package
files on Mac OS X. The choice of location affects: GHC other
Haskell implementations Haskell Platform Cabal cabal-install
Haddock If all those agreed on directory locations and layouts, I
think the
On Monday 21 December 2009 20:37:30 zaxis wrote:
In erlang, first i use the following function to set the seed:
new_seed() -
{_,_,X} = erlang:now(),
{H,M,S} = time(),
H1 = H * X rem 32767,
M1 = M * X rem 32767,
S1 = S * X rem 32767,
put(random_seed, {H1,M1,S1}).
hello everybody, i'm a newbie this is my first post here..
i have trouble making a function pointfree:
data RealFrac a = Matrix a = Matr [[a]] | Scalar a
deriving (Show, Eq)
unMatr :: RealFrac a = Matrix a - [[a]]
unMatr = (\(Matr a) - a)
reMatr :: RealFrac a = ([[a]] - [[a]]) - (Matrix a -
thanks, that's a really neat syntactic sugar :)
however, my original question was how to make the reMatr function pointfree,
as
reMatr = Matr . (flip (.) unMatr)
is not working. any ideas/explanation why it doesnt work?
Kim-Ee Yeoh wrote:
Here's another way of writing it:
data Matrix a =
Hello, I didn't try to understand what the function is doing, but just
quickly noticed that
reMatr a = Matr . (flip (.) unMatr) a
can be written as
reMatr a = Matr . ((flip (.) unMatr) a)
but that
reMatr = Matr . (flip (.) unMatr)
can be written as
reMatr a = (Matr . (flip (.) unMatr)) a
On Tue, Dec 22, 2009 at 12:50:26AM -0800, Kim-Ee Yeoh wrote:
reMatr :: RealFrac a = ([[a]] - [[a]]) - (Matrix a - Matrix a)
reMatr f = Matr . f . unMatr -- this idiom occurs a lot, esp. with
newtypes
And usually we would call this 'liftMatr' or something along
these lines. The function
On Tue, Dec 22, 2009 at 09:27:47AM -0500, Keith Sheppard wrote:
Hello, I didn't try to understand what the function is doing, but just
quickly noticed that
reMatr a = Matr . (flip (.) unMatr) a
can be written as
reMatr a = Matr . ((flip (.) unMatr) a)
...and then
reMatr a = (Matr .)
On Tue, Dec 22, 2009 at 3:09 PM, slemi 0sle...@gmail.com wrote:
this works fine, but if i leave the 'a' in the last function's definition
like this:
reMatr = Matr . (flip (.) unMatr)
The correct point free version would be :
reMatr = (Matr .) . (. unMatr)
--
Jedaï
On Tue, Dec 22, 2009 at 1:16 PM, Scott Turner 1hask...@pkturner.org wrote:
In haskell, i just use the following function to get the random number. It
seems i donot need to set the seed of random number generator manually?
rollDice :: Int - IO Int
rollDice n = randomRIO(1,n)
That's correct.
Am Dienstag 22 Dezember 2009 15:09:34 schrieb slemi:
hello everybody, i'm a newbie this is my first post here..
i have trouble making a function pointfree:
data RealFrac a = Matrix a = Matr [[a]] | Scalar a
deriving (Show, Eq)
unMatr :: RealFrac a = Matrix a - [[a]]
unMatr = (\(Matr a)
Günther Schmidt wrote:
I'm wondering if there is any chance that functional dependencies will
not be around in the future.
As was previously noted they are supposed to be replaced by type families,
but for me the crucial difference between these two now is that currently
type families do not
On Dec 21, 2009, at 5:03 PM, Thomas Schilling wrote:
It's probably just the search path ordering, no? I.e., if you add
something on the command line or in .cabal/config it gets added to
the beginning of the search path. Then again, there are cases where
you'd want the macports version
2009/12/22 Eduard Sergeev eduard.serg...@gmail.com:
As was previously noted they are supposed to be replaced by type families,
Hi Eduard
Currently this seems a more like a rumour than a fact - from [1] Type
Families and Fun Deps are equivalently expressive which seems a
worthwhile point to
hey there and thanks for the replies to my earlier question, here is the next
one:
i have defined both the (*) and (/) operators for my new type
data Matrix a = Matr {unMatr :: [[a]]} | Scalar a
deriving (Show, Eq)
(*) being matrix multiplication and
(/) being multiplication with inverse
i
Semi Off Topic:
If the ultimate nature of reality is mathematical, as many physicist say,
then everything is mathematical. Then the question must be rephrased to ¿is
this or that isomorphic with a mathematical structure powerful enough
(general enough, simple enough, but not more) or is out there
Hi Stephen,
Stephen Tetley-2 wrote:
Currently this seems a more like a rumour than a fact - from [1] Type
Families and Fun Deps are equivalently expressive which seems a
worthwhile point to restate.
I've got the same impresion initially and was keen to use TF in favor to FD.
And I'm
-- Haddock 2.6.0
A new version of Haddock, the Haskell documentation tool, is out!
This is the version that comes with GHC 6.12.1. It contains the main results of
Isaac Dupree's Summer of Code project,
On Dec 22, 2009, at 10:39 , Aaron Tomb wrote:
On Dec 21, 2009, at 5:03 PM, Thomas Schilling wrote:
It's probably just the search path ordering, no? I.e., if you add
something on the command line or in .cabal/config it gets added to
the beginning of the search path. Then again, there are
On Tue, Dec 22, 2009 at 09:03:44AM -0800, slemi wrote:
this allows me to use the (^^) powering operator, which works fine with
non-zero exponents.
however to my surprise when i try (^^ 0) the answer is (Scalar 1), and not
the identity matrix as expected.
does this mean that (a ^^ 0) is not
oh well thats pretty straight-forward:)
the next thing i don't understand is how ghci turns 1 into (Scalar 1).
1 == (Scalar 1) returns True, which is logical in a way (NOT), but if i
change the type definition to
data Matrix a = Matr {unMatr :: [[a]]} | Lol a | Scalar a
then
1 == (Scalar 1)
slemi wrote:
oh well thats pretty straight-forward:)
the next thing i don't understand is how ghci turns 1 into (Scalar 1).
1 == (Scalar 1) returns True, which is logical in a way (NOT), but if i
change the type definition to
data Matrix a = Matr {unMatr :: [[a]]} | Lol a | Scalar a
then
Hi,
Not everyone in the community is keen on replacing functional
dependencies with type families. My advice would be to use whichever
language construct seems more suitable to your problem and disregard
the occasional posts by people claiming that functional dependencies
are obsolete or
Thanks; this should be enough for me to get it working again.
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Patai Gergely schrieb:
I would do resampling (with some of the Interpolation routines) and
mixing in two steps, that is I would prepare (lazy) storable vectors
with the resampled sounds and mix them.
And is that straightforward considering the peculiarities of tracked
music? After all,
On Dec 22, 2009, at 9:33 AM, Brandon S. Allbery KF8NH wrote:
On Dec 22, 2009, at 10:39 , Aaron Tomb wrote:
On Dec 21, 2009, at 5:03 PM, Thomas Schilling wrote:
It's probably just the search path ordering, no? I.e., if you add
something on the command line or in .cabal/config it gets added
On Tue, Dec 22, 2009 at 4:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Likewise, ~/Library/Haskell seems to be the best place for user installs.
While I don't mind the /Library/Haskell path for global installs, I'm
not sure how I feel about this for local installs. It usually
On Mon, Dec 21, 2009 at 5:08 PM, Ozgur Akgun ozgurak...@gmail.com wrote:
Oh sorry for that character. I wanted to make that part underlined in gmail
which uses (i guess) *'s to denote it. Just to emphasise the problematic
part.
Yikes — I just checked what Gmail sends as the plain-text
That's verrry correct. Sorry for the confusion again.
Any more suggestions by the way?
2009/12/22 Tom Tobin korp...@korpios.com
On Mon, Dec 21, 2009 at 5:08 PM, Ozgur Akgun ozgurak...@gmail.com wrote:
Oh sorry for that character. I wanted to make that part underlined in
gmail
which uses
On Mon, 2009-12-21 at 22:55 -0800, Mark Lentczner wrote:
I suggest that the default place for global installs on Mac OS X be:
/Library/Haskell/
As I've mentioned I'm mostly an OSX ignoramus. One thing I think I've
seen said before however is that things in /Library and ~/Library are
On Mon, 2009-12-21 at 23:08 +, Ozgur Akgun wrote:
So what's the recommended thing to do now?
Please file a ticket in the ghc trac with as much detail as is necessary
for someone else to reproduce this.
Given what we have at the moment I cannot see the cause of the problem.
From what you've
On Tue, 2009-12-22 at 07:39 -0800, Aaron Tomb wrote:
Do we need some more flexible options to GHC, giving users more
control on the ordering of libraries on the linker command line?
I don't think there is any single ordering that will work. Different
packages need libs from different
On Fri, 18 Dec 2009, Gregory Crosswhite wrote:
Yay, advancePtr is exactly what I needed! I totally missed that one in the
docs.
Also thanks to those of you who pointed me to the scoped type variables
feature, since I had figured that a feature liked that had to exist but
I just didn't
Hello,
has anybody ever used Happstack as XML-RPC-Server? Perhaps in
conjunction with HaXR? I like the architecture of Happstack and would
like to use it in a project where I have to use HTML as well as XML-RPC,
now to me it would make sense to integrate XML-RPC abilities into
Happstack, since
What about this part:
-o dist/build/Codec/Compression/
Zlib/Stream.hs Codec/Compression/Zlib/Stream.hsc
Isn't it passing multiple (two in this case) output parameters? Or am I
missing sth?
2009/12/22 Duncan Coutts duncan.cou...@googlemail.com
On Mon, 2009-12-21 at 23:08 +, Ozgur Akgun
Hello!
Does anyone know if it is possible to turn spaces inside strings
to visible spaces. That is, format
test
as
\textvisiblespace{}test
With the 'listings' package there's the option 'showspaces'.
However, unfortunately this and obvious variations don't work:
%format =
Hi,
I was just trying to consult my html-documentation of ghc-6.10.4
libraries on Windows.
Almost all of the Standard Monads are missing, State, Writer etc.
What happened, how do I get them back?
Günther
___
Haskell-Cafe mailing list
On Tue, 22 Dec 2009, Günther Schmidt wrote:
Hi,
I was just trying to consult my html-documentation of ghc-6.10.4 libraries on
Windows.
Almost all of the Standard Monads are missing, State, Writer etc.
They are (and already were) part of the mtl package. You may install 'mtl'
manually
On Tue, 2009-12-22 at 21:48 +, Ozgur Akgun wrote:
What about this part:
-o dist/build/Codec/Compression/
Zlib/Stream.hs Codec/Compression/Zlib/Stream.hsc
Isn't it passing multiple (two in this case) output parameters? Or am
I missing sth?
No, that's one -o flag and a single
Hi all,
Sorry about the inflammatory title, but I just got this message from an
uploaded package (hums):
Warning: This package indirectly depends on multiple versions of the
same package. This is highly likely to cause a compile failure.
The thing is, I got the same message while trying
I am trying to parse XML using HXT following
http://www.haskell.org/haskellwiki/HXT/Conversion_of_Haskell_data_from/to_XML
Here is my XML file (way.xml):
way id=27776903 visible=true timestamp=2009-05-31T13:39:15Z
version=3 changeset=1368552 user=Matt uid=70
tag k=access v=private/
tag
The referenced writings are a bit old. I wonder, what are the current plans
and decisions (or at least dominating opinions) on FD and TF. And when the
equality constraint will be ready.
Andrey
Stephen Tetley-2 wrote:
2009/12/22 Eduard Sergeev eduard.serg...@gmail.com:
As was previously
Adding (a_remove_whitespace,v_1) as a parser option when running solves
it. Silly me.
Tony Morris wrote:
I am trying to parse XML using HXT following
http://www.haskell.org/haskellwiki/HXT/Conversion_of_Haskell_data_from/to_XML
Here is my XML file (way.xml):
way id=27776903 visible=true
On Dec 22, 2009, at 18:14 , Bardur Arantsson wrote:
Warning: This package indirectly depends on multiple versions of the
same package. This is highly likely to cause a compile failure.
The thing is, I got the same message while trying to compile locally
and it turned out that all I had to
Aaron Tomb wrote:
I've come across the issue with iconv, as well.
The problem seems to be that some versions of iconv define iconv_open
and some related functions as macros (that then call libiconv_open,
etc.), and some versions of iconv have exported functions for
everything. In particular,
On Dec 22, 2009, at 12:35 PM, Duncan Coutts wrote:
One thing I think I've seen said before however is that things in /Library
and ~/Library are supposed to be app bundles or frameworks or some other
special OSX packaging thing, rather than traditional Unix-style installations.
Nope - not
Mark Lentczner wrote:
Taking a cue from the various preinstalled language systems on Mac OS X, up
over in /Library might be a better place:
Python puts installed packages in:
/Library/Python/version/site-packages
Ruby puts installed packages in:
Tom Tobin wrote:
On Tue, Dec 22, 2009 at 4:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Likewise, ~/Library/Haskell seems to be the best place for user installs.
While I don't mind the /Library/Haskell path for global installs, I'm
not sure how I feel about this for local
Mark Lentczner wrote:
On Dec 22, 2009, at 12:35 PM, Duncan Coutts wrote:
One thing I think I've seen said before however is that things in /Library and
~/Library are supposed to be app bundles or frameworks or some other special
OSX packaging thing, rather than traditional Unix-style
There you have it: fully- and semi-pointfree versions of reMatr.
A heads up: aggressively pursuing pointfreeness without type signatures
guarantees a courtesy call from the monomorphism restriction,
pace ()-garlic aficionados.
As for your question on why the original code doesn't typecheck: if
51 matches
Mail list logo