atom-1.0.9: A DSL for embedded hard realtime applications.

Safe Haskell | None

Language.Atom.Unit

Contents

- Types and Classes
- Test Execution
- Printing Utilities

Synopsis

- data Test = Test {
  - name :: String
  - cycles :: Int
  - testbench :: Atom ()
  - modules :: [FilePath]
  - includes :: [FilePath]
  - declCode :: String
  - initCode :: String
  - loopCode :: String
  - endCode :: String
  }
- defaultTest :: Test
- class Expr a => Random a where
  - random :: E a
- runTests :: Int -> [IO Test] -> IO ()
- printStrLn :: String -> Atom ()
- printIntegralE :: IntegralE a => String -> E a -> Atom ()
- printFloatingE :: FloatingE a => String -> E a -> Atom ()

# Types and Classes

data Test

Data constructor:Test

Constructors

Test |
Fields name :: String cycles :: Int testbench :: Atom () modules :: [FilePath] includes :: [FilePath] declCode :: String initCode :: String loopCode :: String endCode :: String

defaultTest :: Test

class Expr a => Random a where

Methods

random :: E a

Instances

Random Bool |
Random Int8 |
Random Int16 |
Random Int32 |
Random Int64 |
Random Word8 |
Random Word16 |
Random Word32 |
Random Word64 |

# Test Execution

runTests :: Int -> [IO Test] -> IO ()

Running TestList

# Printing Utilities

printStrLn :: String -> Atom ()

Printing strings in C using printf.

printIntegralE :: IntegralE a => String -> E a -> Atom ()

Print integral values.

printFloatingE :: FloatingE a => String -> E a -> Atom ()

Print floating point values.