Changes between Initial Version and Version 1 of Ticket #1696
 Timestamp:
 Sep 14, 2007 10:08:19 PM (10 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #1696 – Description
initial v1 1 1 I was working with some buggy numerical code of mine, and I was having problems with some types involving exponentiation. My working hypothesis was that the problem involved using ^ with a numerical type I had defined  I had checked ^'s type through :t and saw: 2 2 {{{ 3 3 (^) :: forall a b. (Integral b, Num a) => a > b > a 4 4 }}} 5 5 I immediately thought that I needed another type class declaration for my new type, and went haring off on that tangent for a long time. Eventually someone on #haskell pointed out to me that the *base* could be Num, but the power to which it was being raised had to be Integral and that my problems stemmed from going foo^(1/3), and that what I needed was more along the lines of foo**(1/3). 6 6 7 7 My confusion stemmed from the variables  the forall declaration goes, in order, ab, and the curried signature itself goes ab as well, but the classes goes ba! This apparently is for no particular reason, and so I think it'd be good if the signatures :t displayed could be a little more consistent and go ab as well, so it'd be instead: 8 8 {{{ 9 9 (^) :: forall a b. (Num a, Integral b) => a > b > a 10 10 }}} 11 11 A small thing, perhaps, but it did trip me up.