Does anyone know if TR supports anything close to haskell's => operator?
basically, I want to make a function of the type:
(All ([A : Number]) A -> A)
Or basically just a function that goes from A to A, where we know A is a number.
tfb joined the channel
oldskirt_ joined the channel
tfb has quit
oldskirt has quit
jsvana has left the channel
oldskirt_ has quit
bb010g
leif: Could you give a Haskell example
?
(=>) is Ord a => a -> a -> Bool, which can be specialized to Number a => a -> a -> Bool.
asumu
leif: nope, you basically want bounded polymorphism
Which TR does not support (yet).
bb010g
Oh...=> isn't really a type operator, it's for indicating typeclasses
More syntax.
asumu
(that would be really cool to have in TR but I think the main challenges are making sure inference still works and untyped interop w/ bounded polymorphism)
bb010g
You could, however, try to throw together something with manual dictionary passing.
asumu: How does Number work in TR?
leif
Ah rats, thanks.
:(
But yeah, I basically want to write a function for all X, where I know X is of some type.