function - Haskell - type classes -


i new haskell, , trying learn how type classes work. typed following code ghci compiler.

let (+) :: num => -> -> a; (+) b = a+b; 

the code compiles, whenever call function, stuck , have ctrl+c stop process.

am doing wrong here? thank in advance!

you calling function + function + recursively, it's same if wrote:

add :: num => -> -> add b = add b 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -