repa-array-4.0.0.2: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Nice

Synopsis

Documentation

class Nicer a where Source

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 Source

Methods

nice :: a -> Nice a Source

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) 

data Str Source

Wrapper to indicate a list of characters should be printed as a string, including double quotes.

Constructors

Str [Char] 

Instances

data Tok Source

Wrapper to indicate a list of characters should be printed as a string, without double quotes.

Constructors

Tok [Char] 

Instances