Daniel Fischer wrote:
Am Freitag 16 April 2010 20:50:25 schrieb Brian Hulley:
revealed a link to a US Patent (7120900) for the idea of implementing
the Unicode Bidirectional Algorithm (UAX #9
http://www.unicode.org/reports/tr9) in Haskell, making use, as far as I
can tell, of nothing more than
jerzy.karczmarc...@info.unicaen.fr wrote:
Brian Hulley reports a search similar to :
haskell unicode bidirectional
Comment irrelevant to Haskell, sorry.
Everybody does his/her various jobs. But I lost all respect due to people
who work in the US Patent Office, when I saw the patent
Murray Gross wrote:
On Sat, 17 Apr 2010, Brian Hulley wrote:
see the patent 6,368,227. The search site is here:
http://patft.uspto.gov/netahtml/PTO/srchnum.htm
Best regards.
Jerzy Karczmarczuk
...
It's really almost not fair to cite that particular patent, since, if I
recall the story
Hi everyone,
It's been a long time since I last posted to this list since I'm
currently working on something that is not directly Haskell-related, but
it still relates to functional programming in general.
Anyway imagine my surprise when an innocent search for some keywords (I
can't remember
Jefferson Heard wrote:
Adrian, my understanding is that it's not that simple, because I need
to preserve the state between calls to GLUT's callbacks, which all
return IO ().
2008/8/6 Adrian Neumann [EMAIL PROTECTED]:
There is the State Monad...
data ProgramState = ProgramState {
Jonathan Cast wrote:
It's weird. ML-derived languages are functional languages at the value
level (and have regular lambda-bound variables in consequence), but are
logical languages at the type level (and have logical variables in
consequence). So ordinary lambda-bound variables, like in
Tillmann Rendel wrote:
Brian Hulley wrote:
class Foo a where
f :: a - b - (a, b)
Here there is no capitalization distinction in the type of (f) but the
implementation can still insert the forall b. since (a) is already
in scope. Therefore similarly, if type constructors like
Hi,
I'm familiar with the capitalization rules for identifiers in Haskell
and know that they are very useful and practical e.g. by allowing
variables to be distinguished from constants in patterns etc.
However I'm trying to understand on a much deeper level whether or not
they can really be
Jonathan Cast wrote:
On Mon, 2008-08-04 at 19:51 +0100, Brian Hulley wrote:
For example, why is there any distinction between a type variable and
a type constant?
forall a b. (a - b) - List a - List b
Now this begs the question: why does List need to start with a
capital? (supposing
Krzysztof Kościuszkiewicz wrote:
Fellow Haskellers,
I wanted to experiment a bit with lists and sequences (as in Data.List and
Data.Sequence), and I got stuck. I wanted to dynamically select processing
function depending on cmdline argument:
main = do
args - getArgs
let reversor =
Brian Hulley wrote:
Krzysztof Kościuszkiewicz wrote:
So the type of mapM_ used in the code is
(Foldable t, Monad m) = (a - m b) - t a - m ()
I'd like to keep the generic Foldable t there when m is specialized
to IO.
I thought this would allow type of reversor to be specialized to
(Foldable f
Krzysztof Kościuszkiewicz wrote:
So the type of mapM_ used in the code is
(Foldable t, Monad m) = (a - m b) - t a - m ()
I'd like to keep the generic Foldable t there when m is specialized to IO.
I thought this would allow type of reversor to be specialized to
(Foldable f) = [String] - f String
Sam Hughes wrote:
Brian Hulley wrote:
... For example, with the prefix definition of a function with
multiple clauses, the function name at the start of each clause is
already lined up since it must appear at the margin of the current
layout block ...
Or you could have everything
Hi,
I'm in the process of designing a little language inspired by Haskell
but imperative, and have hit an issue regarding infix syntax which may
be of interest also to anyone thinking about future revisions of Haskell
or the problem of consistent parameter order in libraries.
I'm wondering
Brian Hulley wrote:
I'm wondering if anyone can shed light on the reason why
x # y
gets desugared to
(#) x y
and not
(#) y x
Can anyone think of an example where the current desugaring of infix
arguments gives the correct order when the function is used in a
postfix application
Jonathan Cast wrote:
On Tue, 2007-09-25 at 19:18 +0100, Brian Hulley wrote:
Brian Hulley wrote:
I'm wondering if anyone can shed light on the reason why
x # y
gets desugared to
(#) x y
and not
(#) y x
Of course, this is all a consequence of the well-known failure
Ryan Ingram wrote:
My comments inlined below...
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
let
shiftLeftByThree = shiftL' 3
in
map shiftLeftByThree [10, 78, 99, 102]
let shiftLeftByThree = (`shiftL` 3) in ...
Aha! but this is using section syntax which
Dan Piponi wrote:
On 9/25/07, Brian Hulley [EMAIL PROTECTED] wrote:
..I seem to dimly recall that there is a natural language
somewhere that also uses it but I can't remember which one.
Every permutation of [S,V,O] appears in 'nature':
http://en.wikipedia.org/wiki/Word_order.
Thanks
Hi,
On http://hackage.haskell.org/trac/haskell-prime/wiki/LambdaCase the
proposed syntax for lambda case is:
case of
alts
but this has a really bad downside for interactive editors: it doesn't
allow one to distinguish between an incomplete construct and a completed
construct thus
Stefan O'Rear wrote:
On Wed, Aug 15, 2007 at 06:58:40PM +0100, Duncan Coutts wrote:
On Wed, 2007-08-15 at 10:50 -0700, Stefan O'Rear wrote:
OTOH, your proposal provides (IMO) much more natural syntax for
multi-pattern anonymous functions, especially if we stipulate that
unlike a case
Brian Hulley wrote:
apfelmus wrote:
Brian Hulley schrieb:
main = do
buffer - createBuffer
edit1 - createEdit buffer
edit2 - createEdit buffer
splitter - createSplitter (wrapWidget edit1) (wrapWidget
edit2)
runMessageLoopWith splitter
apfelmus wrote:
Brian Hulley schrieb:
main = do
buffer - createBuffer
edit1 - createEdit buffer
edit2 - createEdit buffer
splitter - createSplitter (wrapWidget edit1) (wrapWidget
edit2)
runMessageLoopWith splitter
... Thus the ability
apfelmus wrote:
However, most genuinely imperative things are often just a building
block for a higher level functional model. The ByteString library is a
good example: the interface is purely functional, the internals are
explicit memory control. It's a bad idea to let the internal memory
Martin Percossi wrote:
Brian Hulley wrote:
hidden away in the definition of their API function to create a
label, is a call to (ref 0) ;-) The equivalent implementation in
Haskell would completely destroy all hope of using this in a pure
context and force all use of the API into the IO
Hugh Perkins wrote:
On 8/8/07, *Brian Hulley* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
In contrast, all the pure functional GUIs that I've seen...
In defense of Haskell (wow!), note that imperative languages are not
without problems in GUIs. In a multithreaded environment
Paul Hudak wrote:
All of the recent talk of support for imperative programming in
Haskell makes me really nervous
... if we give imperative programmers the tools to do all the things
they are used to doing in C++, then we will be depriving them of the
joys of programming in the
peterv wrote:
In de book Modern C++ design, Andrei Alexandrescu writes that Haskell
supports “multi-methods”
Using multi-methods, I could write (in pseudo code)
collide (Asteroid, Planet) = an asteroid hit a planet
collide (Asteroid, Earth) = the end of the dinos
...
collide (Planet,
Dan Weston wrote:
Remember that type classes do not provide object-oriented
functionality. The dispatch is static, not dynamic. Although OOP can
be simulated in Haskell, it is not a natural idiom. If you need
dynamic dispatch (including multiple dispatch), you may want to
reconsider your
peterv wrote:
This is very nice, but it does not really solve the original problem.
To get Haskell to choose the best fit it's necessary to encode the
location of each element in the hierarchy, so that elements deeper in
the hierarchy are more instantiated than those at the top. Then
On Fri Aug 3 06:06:31 EDT Neil Mitchell wrote:
What are the semantics of
do b f (- a)
where does the evaluation of a get lifted to?
I suggest the execution of (a) should be done immediately before the
action obtained by applying the monadic function whose argument it is
part of:
Hi,
Ii is interesting that in ML, the presence of mutable ref cells and
parametric polymorphism requires the whole language to be dominated by a
value restriction [1] to ensure that the type system remains sound,
whereas in Haskell, because IORef's can only be created (and used) in
the IO
Hi,
Following a recent thread on the Haskell' mailing list about the nusiance of
having to deal with commas in tuples (when cutting and pasting things to
re-order the elements there's always a pesky comma left over in the wrong
place), I've written up a proposal for a very simple syntax tweak
Donald Bruce Stewart wrote:
magnus:
All I'm trying to say is that imperative thinking is so common
outside of CS/math and we learn it so early on in life that we
probably can consider it the natural thinking way.
foldl (\water dish - wash water dish) soapywater dishes ::
[Dishes]
^^ type
On Thursday, January 25, 2007 7:08 AM, John Ky wrote:
On 1/25/07, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
I'm probably missing something, but:
(a) Why not:
data ANode
= Branch { name :: String, description :: String,
children :: [AnyNode] }
Chris Kuklewicz wrote:
This is how I would write getLeaves, based on your GADT:
data IsLeaf
data IsBranch
newtype Node = Node { getNode :: (forall c. ANode c) }
data ANode :: * - * where
Branch :: String - String - (ANode a,ANode b) - [Node] -
ANode IsBranch
Leaf :: String - String
jamin1001 wrote:
Hi, I am new at Haskell and have some basic questions.
So then how should this be done? What if I want to do something like
data Chair = Chair {pos:: Int, color :: Int}
data Table = Table {pos:: Int, color :: Int}
Unfortunately you have to think up different names for all
Yitzchak Gale wrote:
I wrote:
Prelude let f .! g = ((.) $! f) $! g
Prelude let f = undefined :: Int - IO Int
Prelude f `seq` 42
*** Exception: Prelude.undefined
Prelude ((= f) . return) `seq` 42
42
Prelude ((= f) .! return) `seq` 42
42
Duncan Coutts wrote:
Perhaps I'm missing something but I
Brian Hulley wrote:
Yitzchak Gale wrote:
I wrote:
Prelude let f = undefined :: Int - IO Int
Prelude f `seq` 42
*** Exception: Prelude.undefined
Prelude ((= f) . return) `seq` 42
42
The monad laws say that (= f) . return must be
identical to f.
I thought it was:
return x = f = f x
so
Brian Hulley wrote:
Brian Hulley wrote:
Yitzchak Gale wrote:
I wrote:
Prelude let f = undefined :: Int - IO Int
Prelude f `seq` 42
*** Exception: Prelude.undefined
Prelude ((= f) . return) `seq` 42
42
The monad laws say that (= f) . return must be
identical to f.
I thought
Lennart Augustsson wrote:
On Jan 19, 2007, at 08:05 , [EMAIL PROTECTED] wrote:
Thus, Hask is not a category, at least not as defined in the article.
The problem is that (either) morphisms or the morphism composition
('.')
are not internalized correctly in Haskell.
And this is why some of
Neil Mitchell wrote:
Hi Brian,
Is there any solution that would allow excess laziness to be removed
from a Haskell program such that Hask would be a category?
class Seq a where
seq :: a - b - b
Then you have a different seq based on the types, and it doesn't go
wrong. You would probably
Johan Gršnqvist wrote:
Ulf Norell skrev:
On Jan 16, 2007, at 7:22 PM, David House wrote:
In the section on the category laws you say that the identity
morphism should satisfy
f . idA = idB . f
This is not strong enough. You need
f . idA = f = idB . f
(I do not know category theory,
David House wrote:
http://en.wikibooks.org/wiki/Haskell/Category_theory
I'd love comments from newcomers and experts alike regarding my
approach, the content, improvements and so on. Of course, it's on the
wikibook, so if you have anything to add (that's not _too_ substantial
otherwise I'd
Brian Hulley wrote:
David House wrote:
http://en.wikibooks.org/wiki/Haskell/Category_theory
But in the second exercise in the intro it's clear that function
composition is not associative.
Apologies. I got totally confused with the way function composition is back
to front etc.
I still
Yitzchak Gale wrote:
David House wrote:
I've added a bit more explanation, so it may now be palatable. It is
quite a hard exercise, though, perhaps it shouldn't come so early on.
In my opinion, it is now much more clear. And it is a very
instructive example.
If people still find it too hard,
Meng Wang wrote:
Hi Brian,
Thank you for starting the thread. We (Martin Sulzmann and me)
proposed a type class extension which allows modular extension of
superclasses (a complement of subclass extension). The idea has been
shown to be particularly useful in (but not limited to) encodings of
Simon Peyton-Jones wrote:
One of the great things about John's class-alias proposal is that
John worked out a lot of details and captured them in a web page,
rather than it getting buried in an email thread.
If you have ideas to refine his proposal, it'd be good to see if,
with him, you can
Brian Hulley wrote:
Simon Peyton-Jones wrote:
One of the great things about John's class-alias proposal is that
John worked out a lot of details and captured them in a web page,
rather than it getting buried in an email thread.
If you have ideas to refine his proposal, it'd be good to see
[EMAIL PROTECTED] wrote:
David House wrote:
You can fake this:
(-!) = ($)
(!-) = flip ($)
foo -! liftM2 (,) !- bar
Was anyone in that brainstorm thinking of Chung-chieh Shan's
-: and :-
(http://www.haskell.org/pipermail/haskell-cafe/2002-July/003215.html)
or was the similarity just a
Hi,
There is a page on the Haskell Wiki titled Talk:SantaClausProblem
subtitled Beautiful concurrency. However typing any of the following into
the search box *doesn't* lead to the page:
Santa
talk:santaclausproblem
beautiful
beautiful concurrency
Talk:Santa
In fact to get the
Bulat Ziganshin wrote:
Hello Brian,
Thursday, January 4, 2007, 10:00:05 PM, you wrote:
deeper, the programmer is burdened more and more by the need to
cut-and-paste method definitions between instances because Haskell
doesn't allow a superclass (or ancestor class) method default to be
Brian Hurt wrote:
nth 0 (x:xs) = Some x
nth i (x:xs) = if i 0 then Empty else nth (i-1) xs
nth i [] = Empty
[blows stack on large i]
As other people have pointed out, this is due to laziness. I'd write it
like:
nth 0 (x:_) = Some x
nth i (_:xs) = of i 0 then Empty else (nth $! i-1)
Brian Hulley wrote:
Brian Hurt wrote:
nth 0 (x:xs) = Some x
nth i (x:xs) = if i 0 then Empty else nth (i-1) xs
nth i [] = Empty
[blows stack on large i]
As other people have pointed out, this is due to laziness. I'd write
it like:
nth 0 (x:_) = Some x
nth i (_:xs) = of i 0 then Empty
Brian Hulley wrote:
Brian Hulley wrote:
Brian Hurt wrote:
nth 0 (x:xs) = Some x
nth i (x:xs) = if i 0 then Empty else nth (i-1) xs
nth i [] = Empty
[blows stack on large i]
As other people have pointed out, this is due to laziness. I'd write
it like:
nth 0 (x:_) = Some x
nth i (_:xs
Hi,
Looking at some of the ideas in
http://www.haskell.org/haskellwiki/The_Other_Prelude , it struck me that the
class system at the moment suffers from the problem that as hierarchies get
deeper, the programmer is burdened more and more by the need to
cut-and-paste method definitions between
Roberto Zunino wrote:
Brian Hulley wrote:
because Haskell doesn't allow a superclass (or ancestor class)
method default to be redefined in a subclass.
How one would write instances? Using your Monad class, does
instance Monad F where
return = ...
(=) = ...
automatically define
Yitzchak Gale wrote:
Can anyone explain the following behavior (GHCi 6.6):
Prelude Control.Monad.ST runST (return 42)
42
Prelude Control.Monad.ST (runST . return) 42
interactive:1:9:
Couldn't match expected type `forall s. ST s a'
against inferred type `m a1'
In the second
Paul Moore wrote:
I'm thinking around the design of a couple of things, and am hitting
an issue which I know how I would solve in Python, but I'm not sure
what a good idiomatic Haskell approach would be.
The problem is that I am trying to write a function which takes a
rather large number of
Steve Schafer wrote:
In my text/graphics formatting work, I find myself doing a lot of
pipeline processing, where a data structure will undergo a number of
step-by-step transformations from input to output. For example, I
have a function that looks like this (the names have been changed to
Lennart Augustsson wrote:
On Dec 21, 2006, at 15:53 , Neil Mitchell wrote:
Hi
there are really no choices for real development. many libraries,
language
extensions and techniques are for ghc only
I develop everything in Hugs, including the Yhc compiler itself. Hugs
is great. There are lots
Neil Mitchell wrote:
Hi
In other words, what on earth is good about gluing oneself to
Haskell98? Life's moved on...
If you stick to Haskell 98 you can:
* Convert your code to Clean (Hacle)
* Debug it (Hat)
* Run it in your browser (ycr2js)
* Document it (Haddock)
* Make a cross platform
Jacques Carette wrote:
Yes, dependent types have a lot to do with all this. And I am an
eager lurker of all this Epigram.
Would it be possible to augment Haskell's type system so that it was the
same as that used in Epigram?
Epigram itself uses a novel 2d layout and a novel way of writing
Imam Tashdid ul Alam wrote:
hi guys,
I was just wondering if anyone is interested is a
quasi-project of rewriting the Prelude (only
shrinking it as measured by the total number of names
imported, read along...)
the idea is (just to be substantially different in
approach) to develop an alternate
Ashley Yakeley wrote:
Since learning Haskell, I can now count in Spanish! See:
one in Spanish,
two in Spanish,
three in Spanish,
four in Spanish..
Is there a solution ie some concept C such that C Haskell C Spanish,
somewhere?
Thanks, Brian.
--
http://www.metamilk.com
Reto Kramer wrote:
The code below does not compile unless the bar function is
annotated with a suitable constraint on the class of the formal
parameter.
class (C a)
data (C foo) = XY foo = X foo | Y foo
bar :: a - XY a
bar aFoo = X aFoo
As suggested, this works:
bar :: (C a) = a - XY a
Neil Mitchell wrote:
Hi,
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple
(,) a b -- 2 element tuple
(,,) a b c -- 3 element tuple
() a - meaningless
(a) - a in brackets
GHC has the 1 element unboxed tuple, (# a #), and all the other sizes
unboxed as well, but
Brian Hulley wrote:
Conal Elliott wrote:
GUIs are usually programmed in an unnatural style, in that ...
Also, suppose you have a gui consisting of an edit widget such that
when the user types something it gets lexed, parsed, and fontified as
a Haskell program, ie from the user's point
Kirsten Chevalier wrote:
since it's not as if anyone programs in Pascal anymore.
Yet I'm sure most people who did a computer science degree some decades ago
remember the old joke about passing things by name or value for what it's
Wirth... :-)
Brian.
--
http://www.metamilk.com
Taral wrote:
On 12/1/06, Brian Hulley [EMAIL PROTECTED] wrote:
This problem is so general (ie converting a cyclic graph into an
expression tree such that each node appears no more than once) that
I'm sure someone somewhere must already have determined whether or
not there can be a solution
Paul Hudak wrote:
Brian Hulley wrote:
Anyway to get to my point, though all this sounds great, I'm
wondering how to construct an arbitrary graph of Fudgets just from a
fixed set of combinators, such that each Fudget (node in the graph)
is only mentioned once in the expression. To simplify
Grady Lemoine wrote:
f x = x^3
f' = snd . (evalDeriv f)
When I load this in GHCi, I get:
*Main :t f
f :: (Num a) = a - a
*Main :t snd . (evalDeriv f)
snd . (evalDeriv f) :: (Num a, Num (Dual a)) = a - a
*Main :t f'
f' :: Integer - Integer
Why is the type of f' Integer - Integer,
Hi,
I've been looking at the Fudgets research
(http://www.cs.chalmers.se/ComputingScience/Research/Functional/Fudgets/ )
as an example of a purely functional gui.
Afaiu a brief summary is that a Fudget can represent a GUI widget or some
other object, which can have some internal state, and
Brian Hulley wrote:
Anyway to get to my point, though all this sounds great, I'm
wondering how to construct an arbitrary graph of Fudgets just from a
fixed set of combinators, such that each Fudget (node in the graph)
is only mentioned once in the expression. To simplify the question,
assume we
Slavomir Kaslev wrote:
I have to define a couple of float2, float3, float4 Cg, HLSL style
vectors in Haskell. At first I was tempted to make them instances of
Num, Floating, RealFrac, etc. but some of the functions defined in
those classes have no sense for vectors.
I'd suggest that this
Benjamin Franksen wrote:
Henning Thielemann wrote:
On Fri, 10 Nov 2006, Benjamin Franksen wrote:
Although one could view this as a bug in the offending module it
makes me somewhat uneasy that one additional import can have such a
drastic effect on the code in a module /even if you don't use
Jim Apple wrote:
On 10/14/06, Brian Hulley [EMAIL PROTECTED] wrote:
User defined fixities are an enormous problem for
an interactive editor
This is the second or third time you've proposed a language change
based on the editor you're writing. I don't think this is a fruitful
avenue
Hi -
I'm wondering if it is possible to construct a methodical procedure to
assign a fixity to symbolic operators so that we could get rid of the need
for user defined fixites. User defined fixities are an enormous problem for
an interactive editor, because it is not possible to construct a
Albert Lai wrote:
Brian Hulley [EMAIL PROTECTED] writes:
You'll never believe it but I've been struggling last night and all
of today to try and think up a name for the following type and I'm
still nowhere near a solution:
data ??? = VarId | VarSym | ConId | ConSym
Perhaps Atom
Brian Hulley wrote:
Hi,
In the Haskell98 report at
http://haskell.org/onlinereport/lexemes.html section 2.2 has the rule:
whitechar - newline | vertab | space | tab | uniWhite
Does anyone know what a vertical tab is supposed to do?
Is there any reason to allow them as whitespace? (Does
Hi,
You'll never believe it but I've been struggling last night and all of today
to try and think up a name for the following type and I'm still nowhere near
a solution:
data ??? = VarId | VarSym | ConId | ConSym
this is part of a type to describe Haskell lexemes:
data Token = TName
Hi,
In the Haskell98 report at http://haskell.org/onlinereport/lexemes.html
section 2.2 has the rule:
whitechar - newline | vertab | space | tab | uniWhite
Does anyone know what a vertical tab is supposed to do?
Is there any reason to allow them as whitespace? (Does anyone in the
universe
Lennart Augustsson wrote:
I think your first try looks good.
[snip]
...
addPoly1 p1@(p1h@(Nom p1c p1d):p1t) p2@(p2h@(Nom p2c p2d):p2t)
| p1d == p2d = Nom (p1c + p2c) p1d : addPoly1 p1t p2t
| p1d p2d = p1h : addPoly1 p1t p2
| p1d p2d = p2h : addPoly1 p1 p2t
...
The last comparison
Ross Paterson wrote:
On Tue, Oct 03, 2006 at 07:52:54AM -0400, Lennart Augustsson wrote:
Yes, having fail in the Monad is a horrible wart.
(As far as I know, it's there for the translation of pattern match
failure in do-expressions.)
I think it would be much less of a wart if the signature
Lennart Augustsson wrote:
Hang on, hang on, now I'm getting confused.
First you asked for the smallest (positive) x such that
1+x /= x
which is around x=4.5e15.
1 + 0 /= 0
0 is smaller than 4.5e15
So I don't understand this at all...
Regards, Brian.
--
Logic empowers us and Love gives
Thomas Davie wrote:
On 30 Sep 2006, at 17:19, Brian Hulley wrote:
Lennart Augustsson wrote:
Hang on, hang on, now I'm getting confused.
First you asked for the smallest (positive) x such that
1+x /= x
which is around x=4.5e15.
1 + 0 /= 0
0 is smaller than 4.5e15
So I don't understand
Benjamin Franksen wrote:
Brian Hulley wrote:
ith = Data.Array.IArray.(!)
Sorry, but I can't see the problem here. Why can't the editor offer
the operator as '!' in the list of options, and if the user selects
it insert both '(' and ')' at the right places (i.e. before the
module name
Brandon Moore wrote:
Brian Hulley wrote:
I would *like* to be able to use the syntax:
ith = Data.Array.IArray.(!)
Why does the nice argument not apply equally well to infixifying
things? Shouldn't I be able to write
myArr Data.Arr.`get` ix
Good point. This would also remove the need
On Thursday, September 28, 2006 1:33 AM, Greg Fitzgerald wrote:
Since there's talk of removal of the composition operator in
Haskell-prime,
how about this:
Instead of:
foo = f . g
you write:
foo = .g.f
A leading dot would mean, apply all unnamed parameters
to the function on the right. A
Hi -
Consider the scenario when you want to find a function that returns the i'th
element of an array but all you know is that there is a module called
Data.Array.IArray that will probably have such a function in it. So you
start typing in your program:
let
ith = Data.Array.IArray.
David House wrote:
Hi all.
The recent thread on email vs. forums inspired a bit of interest to
get some forum software on haskell.org. Were we to go ahead with this,
I think it'd be great to have this software written in Haskell itself.
[snip]
* What kind of forum are we aiming at? In my
Andreas Marth wrote:
low_l :: Word8 = fromIntegral (len .. 0x)
low_h :: Word8 = fromIntegral (shiftR len 8 .. 0x)
high_l :: Word8 = fromIntegral (shiftR len 16 .. 0x)
high_h :: Word8 = fromIntegral (shiftR len 24 .. 0x)
Hi -
I just noticed the mask should be
Andreas Marth wrote:
Thanks a lot for this information it helped a lot.
Glad to be of help.
I am thinking about creating a wikipage about Haskell-VBA
interfacing through a DLL.
Is it okay for you if I put your code there?
Yes.
I am a bit concerned about the memory. newArray states that
Maarten wrote:
Only update (see code below) is a bit ugly (I have no idea why I need
fixCastUpdate)
class (Show a, Typeable a) = ICustom a where
[snip]
update :: a - (forall b. (ICustom b) = b - b) - a
update a f = f a
instance ICustom Node where
getVal (Node n) f = getVal n f
Brian Hulley wrote:
-- this change is not strictly necessary
update :: a - (a - a) - a
Sorry - I just looked again at the instance decl for Node, so the above
change should not be made.
Apologies for the multiple posts, I must try to think more before clicking
send ;-)
Regards
Andreas Marth wrote:
Hi!
I try to export a Haskell function to VBA. (At the moment without
COM.) Because VBA seems to expect a String with length information I
tried to return a CStringLen as defined in Foreign.C.String.
But if I try to compile it I get an unacceptable argument type in
foreign
Brian Hulley wrote:
I assume that this means that on 32 bit Windows, the format of a BSTR
is:
Word16 -- low word of length
Word16 -- high word of length
Word16 -- first char of string
...
The above is not quite correct. It appears from
http://www.oreilly.com/catalog/win32api
Maarten wrote:
For a project involving I use some partially defined node (in this
case a simple record, in my project state transformers) in which the
defined part is common to all nodes, and the custom part is different
for each node. They have to become anonymous so I can put them in a
list of
Henning Thielemann wrote:
On Wed, 13 Sep 2006, Lennart Augustsson wrote:
I don't think Haskell really has the mechanisms for setting up an
algebraic class hierarchy the right way. Consider some classes we
might want to build: SemiGroup
Monoid
AbelianMonoid
Group
AbelianGroup
SemiRing
Ring
...
[EMAIL PROTECTED] wrote:
Brian Hulley wrote:
[...]
Ref.write proxiesRef $! (weakProxy : proxies)
(This is nothing to do with your main question, but the
strict application looks unnecessary there. Its right hand
side is already a constructor cell.)
Yes, thanks for pointing this out
Bryan Burgers wrote:
That being said, I'll have to play the other side of the coin: it
would probably be a little bit of a pain to have to define instances
of each data declaration (Integer, Int, Float, Matrix, Complex, etc.)
on each of these seperate classes--especially when being in a certain
1 - 100 of 381 matches
Mail list logo