Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Does anyone know the explanation of this !!!
Index -> Programming, General Programming -> Functional Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
neokewl




PostPosted: Fri Dec 29, 2006 9:51 pm   Post subject: Does anyone know the explanation of this !!!

type Person = String
type Book = String

are the two types tht i have defined. when i define a type tht corresponds to a tuple of Person and Book, i get the following error:

type database = [ (Person, Book) ]

' Malformed LHS to type of class declaration '

but when i change to :

type Database = [ (Person, Book)] , things are fine and everything seems proper...

a) Why does this happen ?
b) What is the meaning of the above error specified ?

Thanx..
NeoKewl...
Sponsor
Sponsor
Sponsor
sponsor
rdrake




PostPosted: Fri Dec 29, 2006 10:50 pm   Post subject: (No subject)

Well...
code:
Prelude> :t 5
5 :: (Num t) => t
Hm...
code:
Prelude> :t "HI!"
"HI!" :: [Char]
Hmmmmmmmm...
code:
Prelude> :t 5 ** 2
5 ** 2 :: (Floating t) => t
Seems to me like every datatype in Haskell begins with a capital letter. Maybe that could be why? Wink

The error, of course, tells us that.
neokewl




PostPosted: Sat Dec 30, 2006 1:59 am   Post subject: (No subject)

Hey ..

possibly could mean that .... dint think of tht ...thnx buddy...
Display posts from previous:   
   Index -> Programming, General Programming -> Functional Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: