Hi,
I've been using Data.Dynamic but the Typeable requirement doesn't go
well with FFI declarations (which don't accept type contexts).
This is a little example of what I would like to do:
data MyDyn = MyDyn
myToDyn :: a - MyDyn
myToDyn = unsafeCoerce
myFromDyn :: MyDyn - a
myFromDyn =
Hello to everyone!
Two days ago I have found Haskell in Internet. It sounds very nice.
I have read some articles, few examples, ... yes it sounds nice.
Now my problem is connected with the non-update object feature.
I can't write variable instead object because - from the meaning of the word
(
Hi Waldmar,
Now my problem is connected with the non-update object feature.
I can't write variable instead object because - from the meaning of the word
( variable ) - it has the possibility to CHANGE its value.
Yes that my problem :-(
main = do
username - read_info_from_user
To think properly in haskell when you need side effects you should look at
monads
and how they are used in I/O.
I'm no expert but most applications i've seen start like this
main = do x -getArgs
mapM_ somefunction(x)
do is a construct that lets you have a bunch of IO statements
wb:
Hello to everyone!
Two days ago I have found Haskell in Internet. It sounds very nice.
I have read some articles, few examples, ... yes it sounds nice.
Great! Welcome to Haskell.
Now my problem is connected with the non-update object feature.
I can't write variable instead object
On Sat, Nov 25, 2006 at 11:28:13PM +, Ivan Tomac wrote:
I've noticed that code compiled with -threaded doesn't like +RTS -
Nthread count as an argument.
This seems to be the case with both the binary distribution of GHC
6.6 at www.haskell.org/ghc as well as the version I built from
Hello yourself!-)
Two days ago I have found Haskell in Internet. It sounds very nice.
I have read some articles, few examples, ... yes it sounds nice.
you need to try it as well. haskell.org has information, tutorials,
interactive implementations (and to answer the likely follow-on question:
Hello Waldemar,
Saturday, December 9, 2006, 7:57:52 PM, you wrote:
1. At the beginning the user should write her/his name (for instance as the
application parameter).
2. Let's assume that the application has many various functions defined
inside, and - after printing each of the outputs -
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote:
I've been using Data.Dynamic but the Typeable requirement doesn't go
well with FFI declarations (which don't accept type contexts).
Can you be a little more specific?
mt2mgt :: MyType a b - MyGenType
mt2mgt = MyGenType.myToDyn
mgt2mt ::
On 12/9/06, Taral [EMAIL PROTECTED] wrote:
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote:
I've been using Data.Dynamic but the Typeable requirement doesn't go
well with FFI declarations (which don't accept type contexts).
Can you be a little more specific?
Functions like this one are
Alfonso Acosta wrote:
I've been using Data.Dynamic but the Typeable requirement doesn't go
well with FFI declarations (which don't accept type contexts).
You wouldn't need a Typeable context anyway; what's biting you is that
Dynamic is not one of the primitive types that can pass across the
On 12/9/06, Udo Stenzel [EMAIL PROTECTED] wrote:
You wouldn't need a Typeable context anyway; what's biting you is that
Dynamic is not one of the primitive types that can pass across the FFI.
There are good reasons for that and unsafeCoerce certainly cannot
invalidate them.
You want a
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote:
Functions like this one are not directy exportable
myfunc :: (Tyeable a, Typeable b) = MyType a b ...
Well, that's true. Then again, you can't export that type anyway
without use of a StablePtr. All StablePtrs are exportable.
Uhm thinking
On 12/9/06, Alfonso Acosta [EMAIL PROTECTED] wrote:
On 12/9/06, Udo Stenzel [EMAIL PROTECTED] wrote:
You wouldn't need a Typeable context anyway; what's biting you is that
Dynamic is not one of the primitive types that can pass across the FFI.
There are good reasons for that and unsafeCoerce
I have made some improvements to the algorithm, and I am happy to say
that with some minor tweaks, it correctly lays out the programs in the
nofib suite.
the algorithm is not much more complicated than the current one in the
report, but doesn't have the parse-error rule. it does require a single
Hi --
I'm using ghc 6.6, and I had some questions about the extend of
laziness and foldr.
I've noticed the following:
x = foldr (:) [] [1..]
(take 10) x
yields [1..10]
Which is great.. however, what I'd like to fold the list over a tuple:
foo x (l,payload) = ((x:l), payload)
(x,_) = foldr
16 matches
Mail list logo