David House wrote:
> I see this a lot. My personal preference is:
>
> mylist =
> [ foo, bar, baz,
>qux, quux, foo,
>bar, baz, qux ]
Or,
mylist = [foo, bar , baz,
qux, quux, foo,
bar, baz , qux]
___
Haskell-Cafe m
Andrzej Jaworski wrote:
> Good direction.
> Perhaps you can also figure out how to replace the disturbing $ operator?
Something out of Unicode?
≬⊳⌁⋆☕⚡‣‸‡⁏•△▴◆◇◊◬◢◮♘♣♲♪◖▻▿轢
Greg Buchholz
___
Haskell-Cafe mailing list
Haskel
strict Functional Programs
How to Chase Bottoms, and How to Ignore Them"
http://www.cs.chalmers.se/~nad/publications/danielsson-lic.pdf
"Total Functional Programming"
http://www.jucs.org/jucs_10_7/total_functional_programming/jucs_10_07_0751_0768_turner.pdf
Greg Buchholz
__
Maybe some of the type experts could pipe up, but couldn't you
express that as an intersection type?
mapTuple :: ((a -> b) ^ (c -> d)) -> (a,c) -> (b,d)
http://www.cs.cmu.edu/~rwh/theses/pierce.pdf
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
| ' })
conid ->large {small | large | digit | ' }
varop ->varsym | `varid ` (variable operator)
qvarop ->qvarsym | `qvarid ` (qualified variable operator)
conop ->consym | `conid ` (constructor operator)
qconop ->gconsym | `qcon
Conal Elliott wrote:
> Warning: I haven't tried to type-check and may have made a clerical error.
> Since questionCategories isn't used, use "fst" & eliminate another let.
> Then, for my personal preference, and just to mix things up, switch to
> "where" style:
>
> process item mediaKind mediaSize
Steve Schafer wrote:
>
> Here's the essence of the problem. If I have this:
>
> process1 x y =
>let u = foo x y;
>v = bar u;
>w = baz v
>in w
>
> I can easily rewrite it in point-free style:
>
> process1 = baz . bar . foo
Not unless you have a much fancier versio
Joshua Ball wrote:
> Here is how I am trying to solve the problem, using multi-parameter
> type classes.
>
> class NPProblem inst cert where
>validates :: cert -> inst -> Bool
>certificates :: inst -> [cert]
>decide :: inst -> Bool
>decide i = any (\x -> x `validates` i) $ certific
gt; roundCDec :: (RealFloat a) => Int -> Complex a -> Complex a
> roundCDec d (c :+ b) = (roundDDec d c :+ roundDDec d b)
>
> roundDDec :: (RealFloat a) => Int -> a -> a
> roundDDec d a = a -- or somegthing
Greg Buchholz
___
Haske
isto wrote:
] I've been trying to compile the following function
] (rounding to a desired degree):
]
] roundDec :: (Num a, Typeable a) => Int -> a -> a
] roundDec d a =
] let t = show (typeOf a)
] in case t of
] "Double" -> roundDDec d a
] "Complex Double"
> instance Twice (forall a. (m a) -> a) (m (m b)) b where
> twice f x = f (f x)
...but with ghc-6.6 it chokes with...
Illegal polymorphic or qualified type: forall a. m a -> a
In the instance declaration for `Twice (forall a.
`my_read' at gadt_wobbly.hs:65:28-36
Probable fix: add a type signature that fixes these type variable(s)
...problem was fixable by adding a type signature or grafting on some
additional type machinery.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
[EMAIL PROTECTED] wrote:
>
> Greg Buchholz has posed an interesting problem of writing a
> typechecker. Given untyped terms of the form
...snip...
> We show the solution that uses no GADTs and no representation types.
> We retain however the eval function in the previous me
(does that make any sense?).
I'm curious if there could be a small change to the type system to
make the fully general "my_read" possible, or if it suffers from an
incurable defect.
Thanks,
Greg Buchholz
> {-# OPTIONS -fglasgow-exts #-}
>
> main
differences.
> foo :: Int -> Int -> Int -> Int
> foo 0 = (+)
>
> bar :: Int -> Int -> Int -> Int
> bar 1 x = succ
>
> baz :: Int -> Int -> Int -> Int
> baz 0 = (+)
> baz 1 x = succ
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Rearranging...
Nicolas Frisby wrote:
> On 10/31/06, Greg Buchholz <[EMAIL PROTECTED]> wrote:
> >...That first article is the strangest. I couldn't reconcile the fact
> >that if our type signature specifies two arguments, we can pattern
> >match on
re
> build' l x y = build'(x:l) y
...if you try something like...
foo :: [a] -> a -> r
foo l x y = undefined
...you'll get an error message like...
The equation(s) for `foo' have three arguments,
but its type `[a] -> a -> r' has only two
YMMV
erm (Int,Bool))
...but how does a person fix this to work in the more general case? Or
is this even the right way to build a parser for the GADT evaluator
example? Notice the repetition needed: the "If", "Fst", and "Snd"
defintions have to be copied to all thr
nteger -> (a::Type -> Show a -> a -> b) -> b
>
> In order for the first case to work as you expect, you'd need the type
>
> foo :: Integer -> (a::Type, Show a, a)
>
> which is traditionally written
>
> foo :: Integer -> (exists a. S
a => a->b) -> b
> bar 2 k = k ["bar"]
> bar x k = k x
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
e you could show me your implementation of "main" and "square" to
help nudge me in the right direction. (I'm using ghc-6.6)
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
In the expression: square . 4
In the definition of `test'': test' = square . 4
...so it seems that (a -> (Integer, t)) can't be unified with (a ->
(Integer, a)), or somesuch. Any thoughts on how to get this to work?
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
[EMAIL PROTECTED] wrote:
]
] One way is to use existentials:
]
> data Seq1 a = forall b. (Pre a b, Show b) => Cons1 a (Seq1 b) | Nil1
]
] which perhaps not entirely satisfactory because we have to specify all
] the needed classes in the definition of Seq1.
Yes, that seems pretty burdensom
hanks everyone, those are interesting solutions!
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Spencer Janssen wrote:
] Here's an attempt with GADTs:
]
] \begin{code}
] {-# OPTIONS_GHC -fglasgow-exts #-}
] data Succ a
] data Zero
] data Seq a b where
] Cons :: a -> Seq a b -> Seq a (Succ b)
] Nil :: Seq a Zero
] \end{code}
]
] Seems to work for me.
Hmm. Maybe I'm missing som
: type variable `b'". Of
course that makes perfect sense, but I'd like to know if there is a
Haskell idiom that I'm missing in order to get this to work.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Casey Hawthorne wrote:
>
> The Q Programming Language can do the following:
>
> sqr X = X*X
>
> ==>sqr 5
> 25
>
> ==>sqr (X+1)
> (X+1)*(X+1)
>
> Can Haskell do symbolic manipulation?
Typeful symbolic differentiation of compiled functions
http://www.haskell.org/pipermail/haskell/
Jared Warren wrote:
> Haskell's type checking language is a logical programming language.
> The canonical logical language is Prolog.
> Why can't Haskell (with extensions) do type-level Peano naturals in
> the same fashion? The code would be something like:
Also of possible interest, _Fun with F
declare
> this instance?
Not by the looks of section 4.3.2 of the Haskell Report (at least by
my reading).
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
erstand monads, I
ported the parser combinators from the Hutton and Meijer paper to
perl...
http://sleepingsquirrel.org/monads/parser/monad_parser.txt
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
nly take
you so far in a language like C.
http://www.gnu.org/software/libc/manual/html_node/Allocation-Debugging.html
http://perens.com/FreeSoftware/ElectricFence/
http://valgrind.org/
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Ca
ral...
tmap :: (a -> b, c -> d) -> Twist a c -> Twist b d
>data Twist a b = Nil | Cons a (Twist b a) deriving Show
>
>x = (Cons "foo" (Cons 1 (Cons "bar" (Cons 2 Nil
>
>tmap :: (a->b,c->d) -> Twist a c -> Twist b d
>tmap _ N
Brandon Moore wrote:
> I don't quite understand the problem, but maybe an example involving an
> explicit recursion operator will help.
-- Maybe he's looking for something like...
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -fallow-undecidable-instances #-}
import List
type Var = String
type Co
Christophe Poucet wrote:
> I'm not certain but I think this will still fail for exactly the piece that
> you ignored, which is the crux of the problem.
-- You're not looking for this solution, right?
import List
type Var = String
type Const = String
data MonoType mt = TyVar Var
Christophe Poucet wrote:
> The idea however is that MonoType is going to be used in a recursive
> way. For instance:
>
> newtype FMT = FMT MonoType FMT
>
> instance FMT where...
Er, I'll ignore this part.
>
> And this definition will have to reside on recursive definitions. In the
> style
Christophe Poucet wrote:
> What I would like to do is combine HasVars and Type (mostly because in my
> framework the two concepts shouldn't be divided from a design perspective)
> into one type class to clean it up a bit. However I fail to see how I would
> implement toType and fromType for the giv
Robert Dockins wrote:
] In the second instance, what you really want to say is "instance c [a]
] c, only where c is not an application of (->)". As I recall, there is
] a way to express such type equality/unequality using typeclasses, but
] I don't remember how to do it offhand.
For those pla
g when applied to a list of Int's. So in Prolog...
:- op(1000,xfy,=>).
app(A=>B,[A],C) :- app(B,[A],C).
app(C,[A],C) :- not(isfuncwithhead(C,A)).
isfuncwithhead(A=>B,A).
...Now I just need to figure out how to represent "not" without "cut".
I'll ta
d where to enable these extentions. (Bonus
points awarded if it explains things in terms of Prolog). Or is this
just one of those things that requires reading lots of papers on each
extentsion and possibly the source code of the implementation?
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Aditya Siram wrote:
] I am trying to write a function 'applyArguments' which takes a
] function and a list and recursively uses element each in the list as
] an argument to the function. I want to do this for any function taking
] any number of arguments.
]
] applyArgument f (arg) = f arg
] applyA
Greg Buchholz wrote:
> instance Apply a b c => Apply (a->b) b (a,c) where
Whoops, instead of that, I think I meant...
instance Apply (b->c) c d => Apply (a->b->c) (b->c) (a,d) where
...where we strip off one layer of types, because of the recursion. Of
course, that s
, b, and (a,c) are
> -- also a member, so keep going...
> instance Apply a b c => Apply (a->b) b (a,c) where
> app f (x,rest) = app (f x) rest
>
> g w x y z = w*x + y*z
> args = (1,(2,(3,(4,Nil
>
> main = print $ app g args
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Gerhard Navratil wrote:
> I need a library that provides partial derivatives for functions. The
> solution I came up with is based on a datatype using reversed polish
> notation to store the function:
I like Oleg Kiselyov's "Typeful symbolic differentiation of compiled
functions"...
http:
uot;y"
>
> main = do print (f y)
> print (g y)
...which results in...
*Main> main
(Var "y")+(Const (2.0))
(Var "y")+(Const (1.0))+(Const (1.0))
...is this competely unrelated?
Thanks,
Greg Buchholz
ly
> transparent.
OK. I'm probably being really dense today, but where did "g" come
from? Is this is the internal definition of "not"? And does this loss
of referential transparency contaminate the rest of the language, or is
this superShow just an anomaly?
Thank
...I guess I'm not understanding what that means. Would there be some
sort of contradiction that arises when trying to evaluate "show (show)"
or somesuch? Can anyone point me in the direction of information that
tries to explain why this is? I'm at a loss as to what search
al1_ (TmIfExpr t1 t2 t3) = liftM3 TmIfExpr (eval1_ t1) (return t2) (return
> t3)
...and if it turns out you don't like the resulting "Maybeified"
program, you can get the original functionality back by changing the
type signature to use the Identity monad instead of Maybe.
Greg
and lazy evaluation.
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
os
-- f lst = show (filter (> 1) lst, filter (> 2) lst)
para_filter_sum f g xs =
foldl' (\(n,m) elem -> seq n $ seq m $
(n+if f elem then elem else 0,
m+if g elem then elem else 0 ) ) (0,0) xs
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
fmappable things.
Excellent. I guess I'll be brushing up on my typeclass-fu in order
to figure out how all this works.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
fmappable things.
Excellent. I guess I'll be brushing up on my typeclass-fu in order
to figure out how all this works.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
f b
>
>instance Funct [] where
>f_map = map
>
>instance Funct a => Funct [a] where
>f_map f = map (f_map f)
>
>main = print $ fmap (+1) [[[1,2,3]]]
...but maybe it gets the idea across?
Thanks,
Greg Buchholz
__
rge.net/
> And many of the algorithms that you are required to use are a very
> poor match for haskell.
True. But there are some tests like "fasta" that appear to have a
laziness induced space leak that presumably could be fixed.
http://
You might also like to try the slightly more efficient...
pyth n = [(a,b,c) | a <- [1..n],
b <- [a..n],
c <- [a+1..n],
a*a + b*b == c*c ]
Greg Buchholz
___
Has
= c*c ]
...or...
pythagoras n = [(a,b,c) |
a <- [1..n], b <- [1..n], c <- [1..n],
a <= b, b < c, a*a + b*b == c*c ]
...See also...
http://www.haskell.org/onlinereport/lexemes.html#lexemes-layout
Greg Buchholz
_
Daniel Carrera wrote:
>
> Playing around with Haskell... I'm writing a 'choose' function:
> --//--
> fac :: Int -> Int
> fac 0 = 1
> fac n = n*fac(n-1)
>
> choose :: Int -> Int -> Int
> choose n k = fac(n) / (fac(k) * fac(n-k))
> --//--
>
> I'm having problems with the last line.
>
Integral
Start
| Stop
| State a deriving (Show, Eq)
...Does it give better error messages at compile time or something?
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing
ster executables than existing Haskell
compilers? "
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ralf Lammel wrote:
>
> What you can do is define a dedicated *type code* for composition.
>
> comp = hFoldr (undefined::Comp) (id::Int -> Int) test
>
> data Comp
>
> instance Apply Comp (x -> y,y -> z) (x -> z)
> where
> apply _ (f,g) = g . f
27;: comp = hFoldr (.) id test
...Anyway, I couldn't quite tell whether I was using hFoldr incorrectly,
or if I needed to have more constraints placed on the construction of
"test", or if needed some sort of type-level function that resolves...
Apply ((b -> c) -> (a -> b)
> c
([4,16,36,64,100,144,196,256,324],(1140,34519618525593600))
...So a few generic munging functions can be defined for inside the fold.
I couldn't think of how to define "take" or "drop" or figure out what a
zipWith would mea
com/search?&q=backtracking+monad
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
hat if we had a name for
this implicit composition operation? We could then modify it to do a
whole host of other things with the functions "f" and "g" besides just
the boring old composition (like maybe skipping the execution of "g" if
"f" fails, or all
is used in a single-threaded style, i.e. after //
application the old version is no longer used, a'!'i takes O(1) time and
a // d takes O(length d). Accessing elements of older versions gradually
becomes slower.
Greg Buchholz
___
Haskell-Caf
.uk/wadler/topics/monads.html
...especially _Monads for functional programming_ and
_Imperative functional programming_.
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
are cold blooded. It
doesn't get at the essence of what it means to be an insect. Compare
with a statment like...
B.) Insects are six-legged animals with an exoskeleton.
...which tells us a lot more about the fundamental nature of insects.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ompiler? No. I've never
written a Haskell compiler, but I'd say it sounds like it might be a
tedious book-keeping problem though.
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
or "foo" since we know the type of "foo" from its
arguments and return value (it passed the type checker after all).
Confused,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
theoretical reason it can't be done? Is it more convienient for
compiler/specification writers this way? Is it just because that's the
way its always been done?
Curious,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
ht
this behavior more
desirable than failing with an error at compile time?
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
should one use a more sophisticated algorithm?
The change in energy is from round-off error caused by floating point
arithmetic. For this particular test, the shootout requires everyone to use the
same algorithm. So the error is expected.
Greg Buchholz
__
ere's my code. It's not beautiful but it solves the space
> problem. I hope I got it right this time :)
Alright, looks good. I've incorporated this latest change. You can
see the code...
http://xrl.us/fzn4
Greg Buchholz
___
Haskel
be the source of the space leak). You can see one
profile I ran (for n=1000 instead of 100) at...
http://sleepingsquirrel.org/nbody/nbody.prof
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Lennart Augustsson wrote:
> Have you tried heap profiling?
>
Not on the updated version from Josef Svenningsson, but you can look
at the heap profiles for the previous version at...
http://sleepingsquirrel.org/nbody
...the *.ps files are the ones you want.
Greg Bu
we'll be in good shape.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
n see the reports I generated (like the
biography report) over at <http://sleepingsquirrel.org/nbody>. I've
tried several different variations on the "advance" function, as well as
trying "seq" in numerous spots, but I haven't stumbled on to the right
combination yet
got a run
time exception. Which surprised me a little, since it seems like it
could have been caught at compile time. (Although I did ignore a
warning). This has probably been answered a thousand times, but could
someone point me in the direction of documentation explaining why it
compiled
s C code generated by OCaml?
> Do you want to retarget ti so that Haskell is generated, or rewrite the
> generator in Haskell? (Or both?)
Maybe not completely related, but you might find this paper interesting...
http://lambda-the-ultimate
Daniel Carrera wrote:
> Alright, I have what I believe must be a simple question. As one of the
> exercises for the Haskell tutorial I got I have to implement an
> alternative to the 'map' function.
>
> This is what I have:
>
> -
> my/prompt $ cat Test.hs
> module Te
Dmitry Vyal wrote:
> By the way, how to use Unboxed arrays and unsafeAccumArray Greg Buchholz
> mentioned? I can't find them in GHC 6.2 documentation.
http://www.haskell.org/~simonmar/haddock-example/Data.Array.Base.html
Greg Buchholz
Greg Buchholz wrote:
> You'd probably get a faster program with Unboxed arrays and
> unsafeAccumArray.
>
Yeah, its about 20x faster unboxed and unsafe...
import Data.Array.Base
main = print $ quick_func $ take 100 $ cycle [1,2,3,1,2,9,1,9]
quick_func :: [Int
Dmitry Vyal wrote:
> Hello everybody.
>
> I have a long list consisted of a small number (about a dozen) of
> elements repeating in random pattern. I know all the possible elements.
> I need to count number of occurences of each particular element and to
> do i quickly.
>
>For example
> qui
o I/O.
http://www.cs.uu.nl/~daan/download/parsec/parsec.html
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
one have any thoughts?
You might be interested in hOp:
"hOp is a micro-kernel based on the RTS of GHC. It is meant to
enable people to experiment with writing device drivers in Haskell."
http://www.macs.hw.ac.uk/~sebc/hOp/
or maybe House...
http://
Keean Schupke wrote:
> The things to notice are using types as instance labels, that constraints
> form horn clause compile time meta-programs (in a non-backtracking prolog
> style) and that multi-parameter classes with functional depandencies simulate
> some dependant types.
>
I think I unde
askell (which would imply it was possible to statically
type). Well, it wasn't quite as direct as I had initially thought, but
it looks like you've done it. Are there any papers/books out there
which I could study to learn more about these (and other) tricks of the
type system wizards?
Keean Schupke wrote:
> Haskell is not dependantly typed, so cannot deal with types that "depend" on
> values.
Can anyone recommend a nice dependently typed language to play with?
Cayenne, Epigram, other?
Greg Buchholz
___
Hask
ts, GhcSyntax,
CommonMain, Datatypes2, Variant, TIC, TIP, HTypeIndexed, GhcRecord,
Record, HZip, HOccurs, HArray, HListPrelude, FakePrelude.
Looks to me like a very similar error to the tuple case.
Greg Buchholz
--Joy combinators in Haskell
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -fallo
-checker knows that 'fact' is
> polymorphic and that it's perfectly all right to instantiate it at a
> different type in the recursive call.
That pretty much sums up why I thought the whole crazy scheme might
work, only in better words.
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Daniel Fischer wrote:
> Am Freitag, 4. M?rz 2005 19:35 schrieb Greg Buchholz:
> > So, can anyone direct me towards more information on exactly
> > what an "Occurs check" is, or does anyone see an easy fix to my
> > problems?
>
> If I remember correctly, an
an "Occurs
check". So, can anyone direct me towards more information on exactly
what an "Occurs check" is, or does anyone see an easy fix to my
problems?
Thanks,
Greg Buchholz
P.S. The first thing you should note about the code below is the
definition of the reverse
e
portrable greymap (PGM) file format. You read in a simple header with
the dimensions of the image, and one 8 bit character per pixel.
http://www-info2.informatik.uni-wuerzburg.de/mitarbeiter/wolfram/lehre/bildformate.html
Greg Buchholz
___
Haskel
Mike Gunter wrote:
>
> I'd guess that
> let (cam, sh) = parse_text shape_parse input
> is what you want? (Completely untested ...)
>
Yep. That did it.
Thanks,
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-C
against `(Camera, [Shape])'
Expected type: GenParser Char () (IO t)
Inferred type: GenParser Char () (Camera, [Shape])
In the first argument of `parse_text', namely `shape_parse'
In a 'do' expression: (cam, sh) <- parse_text shape_parse in
ed in wxFruit...
http://zoo.cs.yale.edu/classes/cs490/03-04b/bartholomew.robinson/
...although still a research project, it takes a more functional
approach to GUI's.
Greg Buchholz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.o
pt file, since I don't have SOEGraphics).
Hugs chokes without increasing the stack, while my copy of GHC 6.2.1 runs
the program below quite fine, even without enabling optimizations.
Greg Buchholz
--Floating point PostScript version of Sierpinkski Carpet
fillSquare x y s = putStr $ x1 +
ts of
_Programming_Perl_ (camel) and _Perl_Cookbook_ (ram)?
I suppose I should stop being lazy and contribute to the Haskell
version of the PLEAC project...
http://pleac.sourceforge.net/
Greg Buchholz
___
Haskell-Cafe mailing list
[EMAIL PROTECTED
The paper elaborates that enumerators are
superior: in efficiency; in ease of programming; in more predictable
resource utilization and avoidance of resource leaks. We present a
design of the overall optimal collection traversal interface, which is
based on a left-fold-like combinator with premature term
he "Sum a Column
of Integers" and "Spell Checker" would be good candidates to convert).
Just for reference, here's a list of the "Same Thing" tests:
Simple TCP/IP Server
Matrix Multiplication
Statistical Moments
Process Instantiation
Reverse A File
Ring of Messag
Robert Dockins wrote:
> BTW can you give some references to these known techniques?
See also, "Purely Functional Data Structures" by Chris Okasaki for
functional implementations of queues, dequeues, etc.
www-2.cs.cmu.edu/~rwh/theses/okasaki.pdf
1 - 100 of 110 matches
Mail list logo