repa-flow-4.0.0.2: Data-parallel data flows.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Flow.Default.Debug

Contents

Synopsis

More

more Source

Arguments

:: (Windowable l a, Index l ~ Int, Nicer a) 
=> Int

Index of source in bundle.

-> Sources l a

Bundle of sources.

-> IO (Maybe [Nice a]) 

Given a source index and a length, pull enough chunks from the source to build a list of the requested length, and discard the remaining elements in the final chunk.

  • This function is intended for interactive debugging. If you want to retain the rest of the final chunk then use head_i.

more' :: (Windowable l a, Index l ~ Int, Nicer a) => Int -> Int -> Sources l a -> IO (Maybe [Nice a]) Source

Like more but also specify now many elements you want.

More (tabular)

moret Source

Arguments

:: (Windowable l a, Index l ~ Int, Nicer [a], Presentable (Nice [a])) 
=> Int

Index of source in bundle.

-> Sources l a

Bundle of sources.

-> IO () 

Like more, but print results in a tabular form to the console.

moret' :: (Windowable l a, Index l ~ Int, Nicer [a], Presentable (Nice [a])) => Int -> Int -> Sources l a -> IO () Source

Like more', but print results in tabular form to the console.

More (raw)

morer Source

Arguments

:: (Windowable l a, Index l ~ Int) 
=> Int

Index of source in bundle.

-> Sources l a

Bundle of sources.

-> IO (Maybe [a]) 

Like more, but show elements in their raw format.

morer' :: (Windowable l a, Index l ~ Int) => Int -> Int -> Sources l a -> IO (Maybe [a]) Source

Like more', but show elements in their raw format.

Nicer

class Nicer a where

Convert some value to a nice form.

In particular:

  • Nested Arrays are converted to nested lists, so that they are easier to work with on the ghci console.
  • Lists of characters are wrapped into the Str data type, so that they can be pretty printed differently by follow-on processing.

As ghci automatically pretty prints lists, using nice is more fun than trying to show the raw Repa array representations.

Associated Types

type Nice a :: *

Methods

nice :: a -> Nice a

Instances

Nicer Char 
Nicer Double 
Nicer Float 
Nicer Int 
Nicer Word8 
Nicer Word16 
Nicer Word32 
Nicer Word64 
Nicer () 
Nicer [Char] 
Nicer [Double] 
Nicer [Float] 
Nicer [Int] 
Nicer [a] => Nicer [[a]] 
Nicer [Word8] 
Nicer [Word16] 
Nicer [Word32] 
Nicer [Word64] 
(Nicer a, Nicer b) => Nicer [(a, b)] 
Nicer a => Nicer [Maybe a] 
(Bulk l a, Nicer [a]) => Nicer [Array l a] 
Nicer a => Nicer (Maybe a) 
(Nicer a, Nicer b) => Nicer (a, b) 
(Bulk l a, Nicer [a]) => Nicer (Array l a) 

class Presentable a where

Convert some value to a form presentable to the user.

Like show but we allow the nesting structure to be preserved so it can be displayed in tabular format.

Methods

present :: a -> Present