How to Convert Type in Tuples

Posted by Pradeep on Stack Overflow See other posts from Stack Overflow or by Pradeep
Published on 2010-03-18T07:55:22Z Indexed on 2010/03/18 8:01 UTC
Read the original article Hit count: 465

Filed under:
|

how to convert a String type to a Int

i have a tuple and i want to convert it to a tuple which has different types

tupletotuple :: (String,String,String) ->(String,Int,Int)
tupletotuple (a,b,c) = (a,read(b),read(c))

i get this Error Msg

Project> tupletotuple ("cha",4,3) ERROR - Cannot infer instance * Instance : Num [Char] * Expression : tupletotuple ("cha",4,3)

© Stack Overflow or respective owner

Related posts about haskell

Related posts about conversion