Talk:Numeric Haskell: A Repa Tutorial

From HaskellWiki
Revision as of 00:51, 24 April 2011 by Danharaj (talk | contribs) (New page: ---- '''Things I've Learned So Far''' If you specify a slice as such: (Z :. All :. 2), for example, you will get many pages of type incantation errors. In order to be a true wizard you m...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Things I've Learned So Far

If you specify a slice as such: (Z :. All :. 2), for example, you will get many pages of type incantation errors. In order to be a true wizard you must touch the 2 with a salve of type annotation as so: (Z :. All :. (2 :: Int)). This will satisfy the type demons that compile your code.

The reason is that GHC assumes literals like 2 are of type Integer, and Repa demands Ints.

I'll post more "oopsies" as I come across them.

--Danharaj 00:51, 24 April 2011 (UTC)