Permalink
Browse files

minor

  • Loading branch information...
1 parent c9f218a commit f7db374cb24b38944697c2c8db82ba05810d0842 @rrnewton rrnewton committed Mar 2, 2014
View
6 backend-kit/Data/Array/Accelerate/BackendKit/Phase1/RemoveArrayTuple.hs
@@ -245,10 +245,12 @@ listOfLeaves :: [a] -> TempTree a
listOfLeaves = listToTT . L.map TLeaf
-- Index from the right:
-indexTT :: TempTree a -> Int -> TempTree a
+indexTT :: Show a => TempTree a -> Int -> TempTree a
indexTT _ i | i < 0 = error "indexTT: negative index not allowed"
indexTT (TLeaf x) 0 = TLeaf x
-indexTT (TLeaf x) i = error$"cannot index singleton tuple with index: "++show i
+indexTT (TLeaf x) i = error $ "cannot index singleton tuple ("++show x++") with index: "++show i
+ -- trace ("TEMP/HACK/FIXME - temporarily going past this error -- cannot index singleton tuple ("++show x++") with index: "++show i) (TLeaf x)
+-- indexTT (TLeaf x) i = error$"cannot index singleton tuple ("++show x++") with index: "++show i
indexTT (TT a b rest) i = reverse (a:b:rest) !! i
fromLeaf :: Show t => TempTree t -> t
View
1 backend-kit/Data/Array/Accelerate/BackendKit/Phase2/SizeAnalysis.hs
@@ -90,6 +90,7 @@ doAE mp ae =
L.zip template ls
Unit _ -> error "sizeAnalysis: Unit is not part of the grammar accepted by this pass"
+ oth -> error $ "sizeAnalysis: not expecting this: "++(take 500$ show oth)
where
useSizeof vr =
case M.lookup vr mp of

0 comments on commit f7db374

Please sign in to comment.