ystem like this
before? Anyone want to offer suggestions? I think probably it's most
appropriate to reply off-list, since I don't want to bog the list down.
Best,
- Hal
p.s., the language is here: http://www.cs.utah.edu/~hal/HBC
--
Hal Daume III --- me AT hal3 DOT name | http
> -Alex-
>
>
> __
> S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
> ___
> Haskell mailing list
> Haskell@haskell.org
> http://www.haskell.org/mailman/
image = unlines $ map show $ elems cm
> (width,heigth) = snd $ bounds cm
> maxval = maximum (elems cm)
>
> Not *very* beautiful, but seems to do the job for my stuff. I'll try
> the PPM library if I need something a tad more
t; to do this...
- hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
er.
> [Although, in the second approach, I presume that you would need
> addtional code for multi-threaded use.]
I don't care about multi-threaded use.
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this
be
possible.
Any thoughts?
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
I can do
> >if cond then return 1 else (
> > ...--subsequent actions
> > )
> >
> >
> > However, that syntax does not look very pleasant to me due to this extra
> >indentation and the pair of parens.
> >
> >
> >Is this possible at a
used! Passing [] to
> > > the second works just fine.
> >
> > You can write this as
> >
> > > foo' list@(~(h:t)) = list
> >
> > foo' [] will evaluate to []. The H98 report calls it an "irrefutable
> > pattern", IIRC.
> >
>
> any severe theoretical (semantical) problems (main is running in the IO
> monad either way)?
>
> Ciao,
> Steffen
> ___
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/haskell
>
--
; http://antispam.yahoo.com/tools
> > _______
> > Haskell mailing list
> > [EMAIL PROTECTED]
> > http://www.haskell.org/mailman/listinfo/haskell
> >
>
> ___
> Haskell mailing lis
te:
> Per Larsson wrote:
>
> > .. I have since long missed some
> > typical text processing functionality in haskell.
>
> it is often the case that people process "text"
> only because they have no better (structured and typed) way of
>
nt }
data Foo2 = Foo2 { foo2_size :: Int }
f x y z = let size = foo1_size
in
(size x) + (size y) + (Foo2..size z)
also, this would lead to highly ambiguous parses, i think.
- hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest t
Hi,
> If I may suggest, a Haskell implementation may want to give a
> programmer a way to obtain the unmangled argv0.
If I may second that, ...
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www
True. Replace "the" with "a" and "?" with ", if it exists?".
On Thu, 8 Jan 2004, Lennart Augustsson wrote:
> Hal Daume III wrote:
> > is there a function, related to getProgName, which returns the (absolute)
> > path to the current pro
ble
File: _
On Thu, 8 Jan 2004, Christopher Milton wrote:
> The environmental var "_" in $ENV{"_"} (pardon my Perlish) holds
> the full path name of the command currently executing (itself), at
> least on RedHat Linux and HP-UX, so you should be able to use
>
is there a function, related to getProgName, which returns the (absolute)
path to the current program?
basically, i want to be able to read a file which i know will be in the
same directory as the current program, but not necessarily in the same
directory that we're running it from.
--
d runSTUArray need not be
> considered unsafe? if so, perhaps we should add these (or some better
> generalization that someone comes up with) to the standard libraries, as
> it would be nice to be able to use this idiom without resorting to
> trickery. (well, user visible trickery at lea
ery speedy reply and thanks to whoever maintains the
> list archive for updating the archive for each message (I'm pretty sure it
> used to be made daily, which was a nuisance if you wanted to forward URLs
> to interesting discussions).
>
> Hal Daume III said:
> > (1
e pixel stream so that the image is
> subsampled (see "everyN" in the code)
> - the possibility to filter the pixel strean so that a subsection of the
> image is selected.
>
> All that is possible in the code I have now, but it's slow.
>
> Thanks,
> Andrew
>
ank you in advance for the explanation.
> Copy, please, the answer to [EMAIL PROTECTED]
>
> -
> Serge Mechveliani
> [EMAIL PROTECTED]
>
>
>
>
> _______
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haske
r plain 8bit ascii as you see
fit.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
your own using getting characters and concatenating them
(AFAIK). Either way, you're going to get performance hits for going
through [Char]s.
As a minor quibble, I don't like the naming scheme with packString and
unpackPS...seems very unbalanced to me :).
my 2 c
ction
and better control over memory usage.
More information and documentation is available at:
http://www.isi.edu/~hdaume/SVMseq/
Best,
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.
e up front cost for creating a data structure that
could do this more quickly (i.e., in logarithmic time).
is such a thing possible? "does anyone have a haskell implementation of"
such a thing? :P
thanks!
- hal
--
Hal Daume III | [EMAIL PR
gt; convertIntegral :: (Integral a, Integral b) => a -> b
>
>
>
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Matrix ((e,f),(g,h)))
> =
> Matrix ((a-e,b-f),(c-g,d-h))
>
> hvVecMult (HVec a b) (VVec c d) = a*c + b*d
>
> scalHVecMult :: Float -> HVec -> HVec
> scalHVecMult i (HVec a b ) = HVec (i*a) (i*b)
>
> Thanks,
>
> David J. Sankel
>
> ___
ere?
>
>
> Actually mutators of the general form
>
> t_f1' :: (X->X) -> T -> T
> t_f1_ f t = t{t_f1=f (t_f1 t)}
>
> _______
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www
or a Haskell user program?
>
> Thank you in advance for the respond.
>
> Please, add [EMAIL PROTECTED]
> to the reply list.
>
> --
> Serge Mechhveliani
> [EMAIL PROTECTED]
>
>
>
ers' tpa ia n []
> = "data TypeWrapper = StandInForEasierAutomaticGeneration\n"
> ++ tpa ++ "\n\n" ++ ia
>
> generateTypeWrappers' tpa ia n (x:xs)
> = generateTypeWrappers' (tpa ++ wrap n x) (ia ++ inst n x) (n + 1) xs
>
>
> -- make one wrap
> wrap n x = " | T" ++ show n ++ " " ++ x ++ "\n"
>
>
> -- make one instance
> inst n x = "instance MyTypeable " ++ x ++ " where\n"
>++ " typeOf _ = " ++ show n ++ "\n"
>++ " toDyn = T" ++ show n ++ "\n"
>++ " fromDyn (T" ++ show n ++ " x) = Just x\n"
>++ " fromDyn _ = Nothing\n\n\n"
> ___
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/haskell
>
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Perhaps someone one this list might find this interesting...
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
-- Forwarded message --
Date: Sat, 25 Oct 2003 22:18:59 -0700
Fr
might not. :)
>
> -- Lennart
>
> Hal Daume III wrote:
> >>>My preference would be for succ (+-0) to return the smallest positive
> >>>real, since then you could define succ x to be the unique y with
> >>>x < y and forall z . z < y => not (x
> > My preference would be for succ (+-0) to return the smallest positive
> > real, since then you could define succ x to be the unique y with
> > x < y and forall z . z < y => not (x < z), where such a y exists, and
> > I'm not sure if the Haskell standard knows about signed zeros.
>
> Is this re
> I don't understand the details of your example (for instance, what
> does "evaluate" do? I found a reference to it in the GHC manual under
> Debug.QuickCheck, but couldn't figure out what it.), but get the
> general point.
evaluate is from Control.Exception; basically it's:
evaluate :: a -> IO
is 'return . head', you might get a
'head:: empty list' error, while if 'f' is 'evaluate . head', you won't.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi
Hi,
> But I'm just writing this to let you guys know (surely you know this
> already) that anyone from a C/C++/Java/Delphi background is going to
> completely misunderstand the meaning of A.anything in Haskell... it's
> completely nonintuitive to people with my background.
Surely this is no wor
rn
into the Iteratee.
- Hal
> > hfold_left:: FileName -> Title
> > -> Iteratee seed
> > -> seed -- the initial seed
> > -> IO seed
> > type FileName = String
> > type Titl
nts.
>
>
>
> Gordon James Miller Promisemark, Inc. Senior Computer Scientist
> [EMAIL PROTECTED] (571)330-9012 The box said "Requires Windows 95
> or better." So I installed LINUX
>
> ___
> Haskell
llation?). Can anyone shed any light or pointers?
>
> Thanks.
>
> #g
>
>
>
> Graham Klyne
> [EMAIL PROTECTED]
>
> ___
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/ma
___
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/haskell
--
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
___
m use of `==' at CircularInsts.hs:16
> > `Eq (D C)' arising from use of `==' at CircularInsts.hs:16
> >
> > Would it be reasonable for the compiler to check back through the stack
> > and allow the circularity? It will just create an ordinary recursive
> > function.
> >
> > --
ll compilers/interpreters
- developing libraries for Haskell
- writing Haskell debuggers, tracers, profilers or other tools
- more or less anything with matches /.*Haskell.*/, other than
/in Haskell$/ :)
Thanks,
- Hal
--
Hal Daume III |
> In your example it's more or less guaranteed that putting "b"
> and "c" will
> never happen, because the result of the combinated IO action
> isn't demanded.
well yes, it was a bad example. i got another answer basically saying
that threading could screw it up (i'm not using thread) as could,
"b" >> putStrLn
"c") is unspecified, is it the case that the whole thing will be done at
once?
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
There's a small problem with this solution, namely that it requires you
to have an Eq instance for the elements in the list. You can fix this
by using 'null' from the Prelude.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this ma
Yes, this is essentially what DynamicMap isThe url i posted before
was wrong...it should have been:
www.isi.edu/~hdaume/haskell/DynamicMap.hs
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.e
econd"
_ -> "either i don't know or is third"
of course 'deriving Typeable' means you need GHC6; otherwise you can
write the instances by hand.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talk
n. Also, it does
use implicit parameters, so you've got to have GHC or Hugs or some other
compiler that supports those.
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths.&qu
ngs
up like that -- if you have to be in a monad anyway, there's no reason
to pass the WordNetEnv around everywhere. But still, if possible, it
would be nice for these to be pure.
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest thi
Buffering stdout NoBuffering
hSetBuffering stdin NoBuffering
you'll need to import System.IO to get these.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
-Original Message-
From: [
understanding -- someone might correct me)
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
x27;d like to take advantage of this new infrastructure,
if possible...
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
> -Original Message-
> From: [EMAIL PROTECTED]
>
Hi Ben,
> Bad things:
>
> * There's no way to implement fgetpos/fsetpos type functionality,
> because coders don't expose their internal state. (In fact, there
> would need to be a way to explicitly copy the state, since it may
> well include IORefs, Ptrs, etc.) Is this a serious pr
> This looks like a bizarre rendition of the Error/Exception monad.
Yes, of course. *Hal slaps himself*
Thanks.
> Also, your motivating example is ambiguous. I think you mainly care
> about the case where the test is testing for some "exceptional"
> condition. I personally wouldn't want to us
hIsEOF h `breaksTo` []
> lift $ do
> l <- hGetLine h
> rest <- test3 h
> return (l:rest)
where passThrough and repeatM are:
> repeatM :: Monad m => m () -> m ()
> repeatM x = x >> repeatM x
>
> passThrough :: Monad m => (a -> m b
with ghc:
real0m27.167s
user0m9.991s
sys 0m1.304s
nhc all-in-one:
real0m31.411s
user0m10.007s
sys 0m1.299s
i am completely unable to explain this. someone want to hazard a guess?
- hal, who is a bit disappointed now :(
--
Hal Daume III
Hi Fellow Haskellers,
I normally wouldn't send out bug fix notifications, but there has been an
update to HAllInOne (http://www.isi.edu/~hdaume/HAllInOne/), which fixes
two major bugs:
- recursive modules now work correctly
- proper separation of type and value environments
The reason I'm p
7;)
True
*PushF> Maybe.isJust (getInner fs "hello")
True
*PushF> Maybe.isJust (getInner fs True)
True
*PushF> Maybe.isJust (getInner fs (1::Int))
True
*PushF> Maybe.isJust (getInner fs (1::Float))
False
*PushF> Maybe.isJust (getInner fs ())
False
hope this helps.
- hal
Hi guys,
I'm not replying to anything in the message, but...
> Is the idea
> to abstract away from the syntax of pathnames on the platform (eg.
> directory separator characters)? If so, I'm not sure it's worthwhile.
> There are lots of differences between pathname conventions: case
> sensitivity
default" case.
however, if you try something you haven't written an instance of, you do
get this default case:
*Foo> typeOf (undefined :: Foo Double)
Foo a
so, it kind of depends on what you want. probably you want exactly what
didn't work; perhaps someone else has a more ingeniou
Please ignore my stupid question :)
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
> -Original Message-----
> From: Hal Daume
> Sent: Friday, July 18, 2003 10:23 AM
>
M1.foo else 'b'
but neither of these is valid. Is there any way to get at the
definition from M3?
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
n two
test cases, but if someone wants to stress test this
and submit bugs, that would be great.
A new version is up on the web page now.
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/
y the code such
that System.IO no longer imports 'bracket' and uncomment the 'cast'
function in the GMap library.
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
Quite right :). I agree whole-heartedly. There's nothing wrong with
overloading (+) and (-) in this case, but the rest really don't make
much sense. Probably best to leave them undefined and just not use
them. Then you could define your own dot product function and the like.
--
fromInteger :: Integer->Vector is a little harder. Perhaps just
'fromInteger i = [fromInteger i]' would be acceptable. Or you could
leave these undefined.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths."
could become standard.
This is available at:
http://www.isi.edu/~hdaume/haskell/NewBinary/
and allows both bit-based and byte-based writing styles.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.
There was some discussion about something like this a while ago...would
this solve our problems?
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
-- Forwarded message --
Date:
Hi, quick reply :)...i've reordered some of what you've said (i hope you
don't mind!)
> However the monad is defined, sequence_ has to process the entire list
> before anything can be determined about the result. The entire result
> of (>>) depends upon both arguments, whereas you can deduce the h
ucture and
doesn't modify (just "runs") elements. is there some sor tof theory
that talks about this relationship? and why is it that when put
together, these things are strong enough (plus refs) to subsume
primitive recursiveness?
- Hal
p.s., responses delayed until after ICFP a
demand on its argument (quite the opposite, in
fact).
Of course, the powers that be can weight in on this, and I'm sure that
you're aware of the phantom type solution, but I figured I'd post anyway
so that others can get a look at types like this for their own
benefit...
--
or me on large input
like:
*Main> ind 1 "foo" $ listArray (1,1) (concat $ repeat
"abcfoodefgfooa")
even in ghci.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
uld use a more informed coding tree based on letter
distributions, but this is probably overkill.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
> -Original Message-
> From: [EMAI
pile
any module with a 'main :: IO a' function as an executable without having
to call it Main. You can probably find a message from me to this extent
in the archives, as well as some response.
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arre
Presumably you need a call to yield or threadDelay or something like that.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Fri, 13 Jun 2003, Filip wrote:
> Hi,
>
> I have fu
tit
extra2" to be the text in the output file. I'm guessing this has
something to do with buffering. When you open the files, try
'hSetBuffering h? NoBuffering' and see if that fixes it.
--
Hal Daume III | [EMAIL PROTECTED]
"
Look through the mailing list archives/wiki/haskell tutorials. But
basically you can't, except by combining it with another action, as in:
suppose 'baz :: Int -> IO Bool', then:
foo = do
bar <- baz 5
if bar
then ...
else ...
for instance.
if the condition is
'true' at the start, it will never be 'false'). Moreover, there isn't
usually a return value associated with a while statement.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths."
No, you need a fold to do that.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Wed, 4 Jun 2003, Graham Klyne wrote:
> I'm trying to figure if there's any way I can use
ny rules to keep track of something with a combination of
multiple named fields and multiple unnamed fields.
I don't know though...
You can always give them names like "_foo1" etc., in which case ghc
probably won't warn about them, as is the case with methods whose names
begin
> But how can one implement RefMonad to support references of all possible
> types simultaneously?
...you could use Dynamics...
but other than that, I think you're stuck...
> - Original Message -
> From: "Derek Elkins" <[EMAIL PROTECTED]>
> To: "Tim Sweeney" <[EMAIL PROTECTED]>
> Cc: <[E
nt time
evaluate (f a)
t2 <- get current time
return (different in t2 and t1)
where evaluate is from Control.Exception. could someone tell me how
evaluate compares to seq and deepSeq?
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he tal
get unsafePerformIO with which we can write
unsafeCoerce. Using simply String ids as in the referenced paper would
make this sort-of-safe, provided users don't give bogus instances of
Typeable.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in ma
e requires around class
contexts? i've always found this odd...
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Fri, 21 Mar 2003, Simon Peyton-Jones wrote:
> You might also find the &
> -- *Main> test $ MkFoo (0::Int)
> -- Just True
> -- *Main> test $ MkFoo (10::Int)
> -- Just False
> -- *Main> test $ MkBar 'a'
> -- Just True
> -- *Main> test $ MkBar 'b'
> -- Just False
ah, yes. i was aware that would work. i forgot to mention the constraint
that i don't want the user t
= Nothing
instance Foo a => FooBar a where
wasFoo a = Just (MkFoo a)
instance Bar a => FooBar a where
wasBar a = Just (MkBar a)
but this complains about duplicate instance declarations (for obvious
reasons).
i'm hoping one of the type class gurus out there can help me
Hi,
> f x = let ...
>in
> ...
> where
> ...
>
> Assuming that all the ...s are legal, is this OK? Should it be? It
> really makes the 'where' clause look like it's inside the 'let', when
> in fact it can't be.
Ah, sorry. Yes, this is legal. However, if
g -> ...
> Just (y,z) -> let Just q = z
>in b
> where b = g q
does it really make sense to let the where clause look that deep into an
expression to pull out a variable? And what if you use the name 'q'
multiple times in the expression?
--
Hal Daume III
lause.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Sun, 16 Mar 2003, Graham Klyne wrote:
> In the function body (rhs):
>
> let
> { a = (e1) }
> in
It seems that the inability to have (\x . x) as a type in the Theimann et
al approach is a severe limitation. I don't think that having to help the
typechecker along, as in boundless rank polymorphism, is a bad thing at
all.
--
Hal Daume III | [EMAIL PROT
ast this with do notation, where you a let is a statement (just like
"x <- foo" is a statement) and doesn't have a corresponding "in".
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths."
Right. *Recurse* down the list. Somethign like:
foo orig_str new_str xl@(x:xs)
| orig_str `isPrefixOf` xl =
| otherwise= x :
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~
3 lines of code.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Thu, 13 Mar 2003, Alexandre Weffort Thenorio wrote:
> OK Guys. First I would like to say thanks for all the help given b
well, yes, but if you export:
mkN :: Int -> N
mkD :: Int -> D
or something like that, then they'll still bea ble to tell the difference,
right?
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.is
yes.
> data D = D Int
> newtype N = N Int
there is a difference between
(N undefined) `seq` ()
and
(D undefined) `seq` ()
there has been a lot of discussion about this on the mailing list,
probably under a title of something like "difference between data and
newtype".
-
I'd not been following this discussion, but now it seems it's gotten to
instances of the Binary module. I figured I'd chime in briefly:
> thanks for your replies. i browsed thrugh the discussion on the
> libraries list, but it mainly seems to discuss if one should use bits or
> bytes in the bi
da).
Could some one help my intuition a bit here and explain to me how you
could use big lambdas in class declarations to write programs?
Thanks!
- Hal
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths.
> | entirely so, since the result of it is not of type 'forall b. b', but
> | rather of 'forall b. C Int b => b'. Thus, if the C class has a
> function
> | which takes a 'b' as an argument, then this value does have use.
>
> I disagree. Can you give an example of its use?
I believe somethin
main = do
v <- try $ readFile "foo"
case v of
Left _ -> putStrLn "an error occurred"
Right t -> putStrLn t
should work
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." |
Look at the functions try catch and bracket.
--
Hal Daume III | [EMAIL PROTECTED]
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Sat, 1 Mar 2003, Alexandre Weffort Thenorio wrote:
> I am trying to write a small software
> The reason, which is thoroughly explained in Simon Peyton-Jones'
> message, is that the given type signature is wrong: it should read
> f1 :: (exists b. (C Int b) => Int -> b)
Right. Simon pointed out that this is a pretty useless function, but not
entirely so, since the result of it is n
1 - 100 of 252 matches
Mail list logo