I haven't dealt explicitly with templates. I treat them as type
parameters (element $type-parameter). I don't check that they have
been declared at all. As explained, these are semantic checks and
should be deferred until type checking stage ;-)
Cheers,
Yin
On Wed, Feb 1, 2012
e C++ programs.
Cheers,
Yin
On Tue, Jan 24, 2012 at 5:06 AM, Christopher Brown
wrote:
> Hi,
>
> I have stumbled across language-c on hackage and I was wondering if anyone is
> aware if there exists a full C++ parser written
>>> The typical example would be
>>>
>>> instance Eq a => Eq [a] where
>>> [] == [] = True
>>> (a : as) == (b : bs) = a == b && as == bs
>>> _ == _ = False
>>
>> It can handle this case, although it doesn't handle it as a parametric
>> instance. I suspect that we don't need the concept of "param
On Sat, Jan 14, 2012 at 2:38 PM, Dominique Devriese
wrote:
>> I may or may not have thought about it. Maybe you can give an example
>> of parametric instances where there could be problems, so that I can
>> figure out whether my system works on the example or not.
>
> The typical example would be
> Also, you don't seem to have thought about the question of parametric
> instances: do you allow them or not, if you do, what computational
> power do they get etc.?
I may or may not have thought about it. Maybe you can give an example
of parametric instances where there could be problems, so tha
esn't
just match the name. It must match both the name and the inferred
principle type.
This intuition also explains why local instances shouldn't be allowed,
because if we capture the variables at the definition site, the method
call becomes "statically scoped".
-- yin
__
_closure'
World.o: In function `r2JT_info':
(.text+0xb8): undefined reference to
`gtkzm0zi9zi12zi1_GraphicsziUIziGtkziTypes_zdf550_closure'
...
collect2: ld returned 1 exit status
The first command worked well with the ghc 6.6.1 came with ubuntu. I
tried to uninstall my
Hi,
I need to parse a file in this format:
float float float
float float float
Each row has 3-columns of floating procision number divided by white
space. The number of lines is undefined. I use (lines (readFile "..."))
to read the file.
Thnks.
Matej &
Bernard Pope wrote:
>On Wed, 2005-07-20 at 11:43 +0200, yin wrote:
>
>>
>>how do I convert an Word32 (or WordXYZ) to Int, or Integer, or Float,
>>...? The Int conversion is the priority.
>>
>>
>fromIntegral to convert to an instance of Integral, such as
hello,
how do I convert an Word32 (or WordXYZ) to Int, or Integer, or Float,
...? The Int conversion is the priority.
Thanks.
Matej 'Yin' Gagyi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listin
OF h
eof2 <- hIsEOF h
case (eof1, eof2) of
(False, False) -> do
l1 <- hGetLine h1
l2 <- hGetLine h2
return l1:l2:(zipFiles h1 h2)
(False, True) -> return (readFile h1)
(True, False) -> return (readFile h2)
_ -> []
I didn't tested i
-- where x = 1, 2 ... 50
...
...
3b. every funtion needs only a part of the data... can I build for every
fintion a class with defined operators to manipulate with the data and then:
* pass the variable in func1 known as class A to func2, which is
infering a class B?
Thank you all...
Matej
?
>
In short, to not break functional aproach. Non-IO functions can't call
IO functions, because IO functions are evaluated every time you call them.
Matej 'Yin' Gagyi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-- where x = 1, 2 ... 50
...
...
3b. every funtion needs only a part of the data... can I build for every
fintion a class with defined operators to manipulate with the data and then:
* pass the variable in func1 known as class A to func2, which is
infering a class B?
Thank you
implement camera_pos_x, y and z as variables, which chage values
in run? This is only simplified example, but it's important to implement
it in as most imperative form as possible.
Thank fo all answers.
Matej 'Yin' Gagyi
___
Haskell-Cafe m
robert dockins wrote:
>
>
> yin wrote:
>
>> Hello all!
>>
>> I'm doing a 3D simulation. Now I need something like variables in
>> imperative languages. My mainLoop check for new events and renders
>> scene.
>
>
> Then you want IORef.
>
it.
I made a 3D engine in C++, but it was a broken aproach. I rewrote ti in
C and it had many memory leaks and too many optimalizations. I shoudn't
implement MainLoop and rendering state in Haskell. Haskell has the same
leaks like imperative languages, but in other "programing u
- getCameraPos
--setCameraPos (x + 1, y, z)
-- ...
-- drawGLScreen
drawGLScreen = do
-- glTranslate to getCameraPos...
Is this apoarch safe enougth, what do you think?
Matej 'Yin' Gagyi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Lemmih wrote:
>On 7/18/05, yin <[EMAIL PROTECTED]> wrote:
>
>
>>Lemmih wrote:
>>
>>
>>
>>>On 7/18/05, yin <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>
>>>>Hello,
>>>>
&
Lemmih wrote:
>On 7/18/05, yin <[EMAIL PROTECTED]> wrote:
>
>
>>Hello,
>>
>>I'm trying to write a 3D renderer in Haskell using SDL bindings (Lemmih)
>>and OpenGL bindings. When I try to compile my work, ghc runs collect2:
>>
>>
yin wrote:
>I tried to run the example from http://haskell.org/hawiki/HaskellOpenGl
>(the SDL version), but the scene is shown, only when I resize the
>window. I tried to insert the drawGLScreen before mainloop call, but it
>didn't worked. Do you some idea how to resolve th
oblem?
Thanks
Matej 'Yin' Gagyi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
re -u
GHCziIOBase_BlockedIndefinitely_closure -u GHCziIOBase_Deadlock_closure
-u GHCziWeak_runFinalizzerBatch_closure -u __stginit_Prelude
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../crt1.o
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../crti.o
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/crtbegin.o
-L/hom
Logesh Pillay wrote:
> I found the following code on the web
>
> /-- Andrew Bromage
> /
> /-- If you're doing permutations, then I suppose you want this too:
> //-- (subLists might be a more suggestive name)
> /combinations *:: [a] -> [[a]]
> *combinations [] = [[]]
> combinations (x:xs)
>= co
Isaac Jones wrote:
yin <[EMAIL PROTECTED]> writes:
./bundle01...
I more apoarches, but no one worked. Now I tried this:
m01_mod :: Int -> Int -> Int
What's m01? You define b01 below:
oops! "m01" propably is a halucination of my keyboard :)
need
runing more s and with various argument counts and types. All
functions "in a bundle" should be in one file.
Thanks to you all :)
Matej 'Yin' Gagyi
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hello!
Is there some way how to fork a process in haskell? And excuting an
another proces, waiting until it exit and colecting his stdout?
Matej 'Yin' Gagyi
PS: I'm sorry for my English!
___
Haskell-Cafe mailing list
Haskell-Cafe@h
Hi all!
I'm new to Haskell... absolutely new. I need some practice, but little
problem seems to me like unresolvable... Is there some tutorial of
"Exercise, set of resolutions" pairs type?
My english is very bat, so there is it in a picture:
Exercise 1: hello world
Hint: use 'putStrLn'
Resolutio
28 matches
Mail list logo