
-----------------------------------
neokewl
Fri Dec 29, 2006 9:51 pm

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...

-----------------------------------
rdrake
Fri Dec 29, 2006 10:50 pm


-----------------------------------
Well...
Prelude> :t 5
5 :: (Num t) => tHm...Prelude> :t "HI!"
"HI!" :: [Char]Hmmmmmmmm...Prelude> :t 5 ** 2
5 ** 2 :: (Floating t) => tSeems to me like every datatype in Haskell begins with a capital letter.  Maybe that could be why? ;-)

The error, of course, tells us that.

-----------------------------------
neokewl
Sat Dec 30, 2006 1:59 am


-----------------------------------
Hey ..

possibly could mean that ....  dint think of tht ...thnx buddy...
