list vs. atom

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

list vs. atom

aminagho
what is the best way to distinguish atoms and lists in haskell?
I mean How I can find out the variable is List or atom.
I know we can use :t to define type but  I cannot use this.
I have to do it dynamically in my program.
Thanks a lot for your attention.
Reply | Threaded
Open this post in threaded view
|

Re: list vs. atom

Neil Mitchell
Hi

> what is the best way to distinguish atoms and lists in haskell?

In a statically typed language everything is distinguished at compile
time, you might want to rephrase your question - starting with what
you are hoping to achieve, so someone can give you the Haskell way of
doing this.

Also you are likely to get much more success asking on
[hidden email] - this list is more for issues with using
Hugs, rather than general Haskell questions.

Thanks

Neil


> I mean How I can find out the variable is List or atom.
> I know we can use :t to define type but  I cannot use this.
> I have to do it dynamically in my program.
> Thanks a lot for your attention.
> --
> View this message in context: http://www.nabble.com/list-vs.-atom-tf3543626.html#a9892551
> Sent from the Haskell - Hugs-Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Hugs-Users mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/hugs-users
>
_______________________________________________
Hugs-Users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/hugs-users