return a single archive with everything included?
Please excuse my ignorance of the linking process. Thanks for any help!
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
?
Thanks for any help!
-Tom
SELECT * FROM freeKey;
SELECT * FROM nextKey;
INSERT INTO nextKey VALUES (1);
SELECT * FROM freeKey;
SELECT * FROM nextKey;
UPDATE nextKey SET key = 2 WHERE key = 1;
SELECT * FROM freeKey;
SELECT * FROM nextKey;
UPDATE nextKey SET key = 3 WHERE key = 2;
INSERT
Hi John,
Thanks for releasing HDBC. This is probably more of a GHC question, but
is there any way to staticly link in the Sqlite3 libraries with an
application that uses HDBC.Sqlite3?
Thanks!
-Tom
John Goerzen wrote:
I've had some questions about my intentions for HDBC. The Current Plan
Lennart Augustsson wrote:
Tom Hawkins wrote:
In a pure language, is it possible to detect cycles in recursive data
structures? For example, is it possible to determine that cyclic
has a loop? ...
data Expr = Constant Int | Addition Expr Expr
cyclic :: Expr
cyclic = Addition (Constant 1
.
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
+ every other monad used in a
program). But I don't see how a monad could escape this fate since bind
and return only produce more monads with the same type constructor.
Thanks for your help!
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe
What is the best way to perform a map inside IO? I defined the
following function, but this must be common enough to warrant something
in the standard library. What am I missing?
-Tom
mapIO :: (a - IO b) - [a] - IO [b]
mapIO _ [] = return []
mapIO f (x:xs) = do y - f x
.
What are my [monadic] options?
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
the
tree traversals easier for queries.
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello,
Is it possible to overload (==) to a type other than a - a - Bool?
I have an abstract datatype that somewhat behaves like a C integer: a
comparison returns a boolean represented as the same datatype:
(==) :: my_type - my_type - my_type
Thanks for any help!
-Tom
Does anyone have a build.bat that they have used to install fgl on
windows that they could donate to me?
Thanks
Tom Spencer
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
[EMAIL PROTECTED] wrote:
[...]
However, if we try
t2' = W $ id
we get an error:
/tmp/t1.hs:13:
Inferred type is less polymorphic than expected
Quantified type variable `a' escapes
Expected type: (a - a) - b
Inferred type: (forall a1. a1 - a1) - W
In the first argument
Steven Huwig wrote:
On Dec 6, 2004, at 11:05 PM, Tom Pledger wrote:
import Data.Char(isSpace)
import Data.List(groupBy)
(op `on` f) x y = f x `op` f y
wordsAndSpaces = groupBy ((==) `on` isSpace)
`on` is a handy little function in this instance.
Does it have a technical name
was on one of the mailing lists a few years ago. So
please don't treat this as authoritative!
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
)
It has a couple of advantages: laziness, and being reversible by good
ol' concat.
It's a slight nuisance that you have to use isSpace *again* to get your
bearings, if you use wordsAndSpaces in a mapWords function.
Regards,
Tom
___
Haskell-Cafe mailing list
Tom Spencer
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
in the current context. Is there a
work around to get similar functionality from the HaXml library?
Many Thanks
Tom Spencer
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Tom Spencer [EMAIL PROTECTED] writes:
I thought i had successfully installed HaXml, ghci loads up the
package successfully etc. but then it complains that it can't find
XmlLib.
There isn't any module called XmlLib in HaXml. You maybe want
to import Text.XML.HaXml instead?
Thanks
... done.
Writing new package config file... done.
make[1]: Leaving directory `/usr/local/bin/HaXml-1.12/obj/ghc'
it doesn't seem to work in ghc or hugs either
any ideas?
Thanks in advance
Tom Spencer
P.S. apologies if i've accidentally posted this twice
file... done.
Writing new package config file... done.
make[1]: Leaving directory `/usr/local/bin/HaXml-1.12/obj/ghc'
it doesn't seem to work in ghc or hugs either
any ideas?
Thanks in advance
Tom Spencer
___
Haskell-Cafe mailing list
[EMAIL PROTECTED
of the finite map contains the lower end of the range and the
open/closed flags. This sort of thing seems to be the intended use of
the _GE functions in Data.FiniteMap.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org
I haven't studied yet, already do something
equivalent?
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
l a | l - a where
[] :: l
(:) :: a - l - l
data OrthodoxLinkedList a = NilOLL | ConsOLL a (OrthodoxLinkedList a)
instance List (OrthodoxLinkedList a) a where ...
Then existing definitions of list functions would work at the more
generic level.
Regards,
Tom
to install ghc and it's dependancies.
Hope this helps anyone digging in the archives for a solution.
Tom Davie
On Thu, 2 Sep 2004 22:59:59 -0400, Gregory Wright [EMAIL PROTECTED] wrote:
Hi Tom,
You might try building ghc using darwinports
(darwinports.opendarwin.org).
It works under both
Has anyone successfully installed HaXML to be used
with winhugs in XP. Using the build.bat included with HaXML it seems that it
can only be installed for GHC.
Any suggestions?
Thanks
Tom Spencer
PS. Apologies that this is pretty vague
notation.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
a
function which catches one sort of error and lets others through:
-- untested
m `onRefError` h
= m `catchError` \e -
case e of
RefError{} - h (expectedType e) (pointOfError e)
_ - throwError e
HTH.
Tom
, and carry the last consumed vertex forward as part of
the result type of the fold.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
of foo in list1 don't get
evaluated until list1 is used, e.g. by sum.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
/ghc/docs/latest/html/libraries/base/Control.Monad.Error.html
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
program to not compile.
Just going off on a short tangent here...
Perhaps Alex meant that pStack is local to some other top level
declaration (not digStack), but that the rest of that decl was
irrelevant and omitted from the question?
Regards,
Tom
...
i - modifyT (strIntTrans 4) -- strIntTrans :: Int -
String - (Int, String)
i' - modifyT (strIntTrans i)
...
Aside: if you rewrite ($) similarly, you get id.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http
the everywhere life is full of heroism bit. Sometimes we
can't hear the heroes over the noise of the motherfucking idiots.
Step 3: Say either Thanks, Tom or You're just another motherfucking
idiot, Tom.
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http
away.
Your particular f, i.e. add, is strict in both its parameters, so I
don't think the choice between foldl and foldr will affect whether you
get stack overflows. However, if you do get stack overflows, try a
strict folding function, such as a copy of Hugs's Prelude.foldl' (not
exported).
- Tom
about passing in a partial comparison function?
dropSubsumedBy :: (a - a - Maybe Ordering) - [a] - [a]
- Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
, vbNull = False
}
I dimly remember reading that Hugs optimises the latter to the former,
recognising when a subexpression exactly matches the head of the
alternative (in this case 'joinVarBindings vb1 vb2').
- Tom
___
Haskell-Cafe mailing list
will only be
used in Decode mode.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
to my office
wanting help with homework I've set. I'd have no problem with
(informed) third parties doing the same.
(If you sent me descriptive text, didn't keep a copy yourself, and
were expecting me to relay it to everyone, please let me know.)
- Tom
of? Which do you disapprove of?
Please email me a concise vote, e.g.
OK: B D E
Not OK: A
and I'll post a collated result next week.
- Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
not count as a type signature for x.
- Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
to process each row, that
you can't express it all in one SQL query. So you use a variety of
little queries during the processing of each row of the main query.
The result of the fold in your doquery could be, say, a record of
batch totals.
- Tom
.
- Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Tim Docker writes:
| Tom Pledger writes:
|
| This is a pretty good way to stop those nasty vague SQL row types at
| the Haskell border and turn them into something respectable. Perhaps
| it would even be worth constraining the extracted type to be in
| DeepSeq
|
| doquery
attention to one row at
a time per cursor.
- Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
= forkIO io
which is equivalent to using forkIO directly, as in
do ...
let ioe :: IO MyEvent
ioe = ...
h :: MyEvent - IO ()
h e = ...
forkIO (ioe = h)
...
HTH.
Tom
___
Haskell-Cafe mailing
bkfilled
... but you should be able to simplify that code, using one of the
monad laws in http://haskell.org/onlinereport/basic.html#sect6.3.6
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo
\
518130533026045150594816676476469224548430690874860242714680177615276168526041\
[ 83 lines omitted ]
535500476970565917875995082926214969042647564930033701717898024811160065586065\
5536080415376091806331620179538459843417141322454179981 /
12072109463901626300591430
Cheers,
Tom
___
Haskell-Cafe mailing list
[EMAIL
...
instance Integral a = Integral (Close a) where ...
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
writing a small module to
provide it:
Full version at http://tea.moertel.com/~thor/ravt/ravt-0.9/GetInput.hs
-- GetInput.hs
-- Tom Moertel [EMAIL PROTECTED]
-- CVS $Id: GetInput.hs,v 1.1 2002/09/09 04:57:23 thor Exp $
-- | This module provides a method of getting input from files named
Tim Otten writes:
:
| Can anyone suggest why the tighter algorithm exhibits significantly
| worse performance? Is takeWhile significicantly more expensive than
| take?
No.
| Is the \z lambda expression expensive?
No.
| The intsqrt isn't recalculated each time takeWhile evalutes a
|
Tom Pledger writes:
| Tim Otten writes:
| :
| | Can anyone suggest why the tighter algorithm exhibits significantly
| | worse performance? Is takeWhile significicantly more expensive than
| | take?
|
| No.
Correction (before anyone else pounces on it):
Only if the predicate function
fm rb = FM {set= \k v - fm (extendRedBlackMap rb k v),
get= \k - ...,
toList = redBlackMapToList rb}
HTH,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
a for return,
which lacks the state variable s. In turn, s corresponds to the third
* in the inferred kind in the error message.
Try partially applying St to its state variable, and declaring a Monad
instance of that partial application, which will have the right kind
*-*.
Regards,
Tom
over the wire where a
| different implementation of a typeclass exists things will go
| wild. What's Haskell's approach to versioning?
I think the safety checks are made statically, even if dynamic loading
will occur later.
Regards,
Tom
___
Haskell-Cafe
Joe English writes:
:
| Suppose you have two morphisms f : A - B and g : B - A
| such that neither (f . g) nor (g . f) is the identity,
| but satisfying (f . g . f) = f. Is there a conventional name
| for this?
Is it equivalent to saying that (f . g) is the identity on the range
of f?
response.
http://www.mail-archive.com/haskell@haskell.org/msg05658.html
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
I noticed that Ralf Hinze posted a CPS monad yesterday.
Would someone be kind enough to post a simple example of a function that uses
CPS.
Thanks
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Ludovic Kuty writes:
:
| Is it an idiom or some sort of optimization ?
It's more to do with the particular algorithm for finding the area of
a convex polygon. Try working through the calculation of the area of
this kite.
Polygon [(0, 0), (1, 0), (2, 2), (0, 1)]
I think the two versions
..10] at the Hugs prompt instead.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
to generate instances which break the
| compiler.
|
| Or am I just being a spoilsport?
It depends on your definition of sport. ;-)
data Sport f
= Sport
| Association (f Bool)
deriving Show
test = show (Sport :: Sport Maybe)
Regards,
Tom
Tom Pledger writes:
| C T McBride writes:
| :
| | A little more tinkering, and it looks like it might be
| |
| | show :: Show (f (Wonky f)) = Wonky f - String
| |
| | Is this really the type of show?
|
| That looks correct to me.
Well, after the first context reduction
Hi,
I've come across this sort of data constructor below many times but I'm
not really sure how to use it. Can someone please point me to the right
section in the documentation?
In particular, I want to know how to create a calendar time and how to
access the fields .
Tom
data CalendarTime
of lifting functions, unless you're willing to clutter the call
sites:
infixl 0 `ap`
ap :: Parser (a - b) - Parser a - Parser b
ap = Monad.ap
...
... Monad.liftM f p1 `ap` p2 `ap` p3 `ap` p4
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL
/ input - make a character from stndIn available to the state
transformation functions
4/ output - send the state of the monad after a certain set of
transformations to stndOut
I've managed to write functions 1-3 but not 4.
Here's my work so far.I'm not really sure if this is on the right track.
Tom
I consider myself a newbie too but here are my solutions
Tom
On Fri, 2002-01-18 at 10:14, Amrit K Patil ;012;VKSF6; wrote:
Hi,
I am newbie at Haskell.
I am not able to write a program to find the number of unique elments in a
list in haskell.
I am also not able to write a porgram
.
I threw in the towel 6 months or so ago basically because I couldn't see
my way through to debugging my programmes.
But here i am back again. A glutton for punishment.
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman
Hello,
I'm learning haskell and I'm having some trouble with type classes. I
understand them conceptually, but when I try to create an instance I run
into problems. As a simple example, I create a class called ToInt:
class ToCh a where
int :: a - Int
Then I create an
| = take m v
| where
| v = 1 : flatten (map single v)
| single x = [x]
By contrast, when you consume the (N+1)th cell of this v, you free up
the Nth, so foo2 runs in constant space.
| -- flatten a list-of-lists
| flatten :: [[a]] - [a]
:
Rather like concat?
Regards,
Tom
Michal Gajda writes:
| On Tue, 29 May 2001, Tom Pledger wrote:
:
| When you consume the (3N)th cell of v, you can't yet garbage collect
| the Nth cell because it will be needed for generating the (3N+1)th,
| (3N+2)th and (3N+3)th.
|
| So, as you proceed along the list, about two
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
isn't list-shaped, is the activity still called
parsing? Or is it a generalised fold (of the input type) and unfold
(of the result type)?
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
greaterthan 0 [] -- empty list of Char
This need for an explicit type signature is quite common in
out-of-context tests at an interpreter's prompt, but rarer in actual
programs.
HTH.
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http
' can apply to most container types, even
those with branching structures which don't look like half an actual
zip.
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
(moved to haskell-cafe)
G Murali writes:
| hi there,
|
| I'm tryng to get my concepts right here.. can you please help in
| defining a funtion like
|
| makeSet :: (a-Bool)-Set a
|
| I understand that we need a new type Set like
| data Set a = Set (a-Bool) what puzzles me is how to
?
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Marcin 'Qrczak' Kowalczyk writes:
| Fri, 9 Feb 2001 17:29:09 +1300, Tom Pledger [EMAIL PROTECTED] pisze:
|
| (x + y) + z
|
| we know from the explicit type signature (in your question that I was
| responding to) that x,y::Int and z::Double. Type inference does not
| need
, and
- The declarations would contain enough un-abstracted clichs to
bring a tear to the eye.
instance Mul Double (Dim_L Double) (Dim_L Double)
instance Mul (Dim_L Double) (Dim_per_T Double) (Dim_L_per_T Double)
etc.
Regards,
Tom
Marcin 'Qrczak' Kowalczyk writes:
| On Thu, 8 Feb 2001, Tom Pledger wrote:
|
| nice answer: give the numeric literal 10 the range type 10..10, which
| is defined implicitly and is a subtype of both -128..127 (Int8) and
| 0..255 (Word8).
|
| What are the inferred types for
| f
ociativity of (+)
-- realToFrac (x + y) + z-- injection (or treating up) done
-- conservatively, i.e. only where needed
Regards,
Tom
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
.
This is quite similar to the way overlapping instances are handled
when they occur via substitutions for type variables (e.g. 'instance C
[Char]' is strictly more specific than 'instance C [a]') in
implementations which support than language extension.
Regards,
Tom
the purity of the predicate composition
approach. It may even be a happy medium, in cases where the input
document only uses a tiny fraction of the character set.
Regards,
Tom
601 - 681 of 681 matches
Mail list logo