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

Safe HaskellNone
LanguageHaskell98

Data.Repa.Flow.Generic.Debug

Contents

Synopsis

More

more Source

Arguments

:: (States i IO, Nicer a) 
=> i

Index of source in bundle.

-> Sources i IO a

Bundle of sources.

-> IO [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' :: (States i IO, Nicer a) => i -> Int -> Sources i IO a -> IO [Nice a] Source

Like more but also specify now many elements you want.

More (tabular)

moret Source

Arguments

:: (States i IO, Nicer [a], Presentable (Nice [a])) 
=> i

Index of source in bundle.

-> Sources i IO a

Bundle of sources.

-> IO () 

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

moret' :: (States i IO, Nicer [a], Presentable (Nice [a])) => i -> Int -> Sources i IO a -> IO () Source

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

More (raw)

morer Source

Arguments

:: States i IO 
=> i

Index of source in bundle.

-> Sources i IO a

Bundle of sources.

-> IO [a] 

Like more, but show elements in their raw format.

morer' :: States i IO => i -> Int -> Sources i IO a -> IO [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 Int8 
Nicer Int16 
Nicer Int32 
Nicer Int64 
Nicer Word 
Nicer Word8 
Nicer Word16 
Nicer Word32 
Nicer Word64 
Nicer () 
Nicer Date32 
Nicer [Char] 
Nicer [Double] 
Nicer [Float] 
Nicer [Int] 
Nicer [Int8] 
Nicer [Int16] 
Nicer [Int32] 
Nicer [Int64] 
Nicer [a] => Nicer [[a]] 
Nicer [Word8] 
Nicer [Word16] 
Nicer [Word32] 
Nicer [Word64] 
(Nicer a, Nicer b) => Nicer [(a, b)] 
Nicer a => Nicer [Maybe a] 
(Nicer a, Nicer b) => Nicer [(:*:) a b] 
(Bulk l a, Nicer [a]) => Nicer [Array l a] 
Nicer a => Nicer (Maybe a) 
(Nicer a, Nicer b) => Nicer (a, b) 
(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