Safe Haskell | None |
---|
- module Data.Patch
- class Syntactic a where
- type Internal a1 :: *
- type family Internal a1 :: *
- data FeldDomain a
- data Data a
- class (SyntacticFeld a, Type (Internal a)) => Syntax a
- data FeldOpts
- defaultFeldOpts :: FeldOpts
- reifyFeld :: SyntacticFeld a => FeldOpts -> BitWidth n -> a -> ASTF (Decor Info FeldDom) (Internal a)
- reifyFeldUnOpt :: SyntacticFeld a => FeldOpts -> BitWidth n -> a -> ASTF FeldDom (Internal a)
- showExpr :: SyntacticFeld a => a -> String
- printExpr :: SyntacticFeld a => a -> IO ()
- printExprWith :: SyntacticFeld a => FeldOpts -> a -> IO ()
- printExprUnOpt :: SyntacticFeld a => a -> IO ()
- showAST :: SyntacticFeld a => a -> String
- drawAST :: SyntacticFeld a => a -> IO ()
- writeHtmlAST :: SyntacticFeld a => FilePath -> a -> IO ()
- showDecor :: SyntacticFeld a => a -> String
- drawDecor :: SyntacticFeld a => a -> IO ()
- eval :: SyntacticFeld a => a -> Internal a
- evalTarget :: (SyntacticFeld a, BoundedInt (GenericInt U n), BoundedInt (GenericInt S n)) => BitWidth n -> a -> Internal a
- desugar :: Syntax a => a -> Data (Internal a)
- sugar :: Syntax a => Data (Internal a) -> a
- resugar :: (Syntax a, Syntax b, Internal a ~ Internal b) => a -> b
- (===>) :: Testable prop => Data Bool -> prop -> Property
- (====) :: Equal a => a -> a -> Property
- tData :: Patch a a -> Patch (Data a) (Data a)
- tArr1 :: Patch a a -> Patch (Data [a]) (Data [a])
- tArr2 :: Patch a a -> Patch (Data [[a]]) (Data [[a]])
- tM :: Patch a a -> Patch (M a) (M a)
- ilog2 :: Bits a => Data a -> Data Index
- nlz :: Bits a => Data a -> Data Index
Documentation
module Data.Patch
class Syntactic a
type Internal a1 :: *
Syntactic () | |
Type a => Syntactic (Data a) | |
Syntax a => Syntactic (Future a) | |
Syntax a => Syntactic (M a) | |
Syntax a => Syntactic (Ref a) | |
Syntax a => Syntactic (IVar a) | |
Syntax a => Syntactic (P a) | |
Syntax a => Syntactic (Vector a) | |
Unit a => Syntactic (BitVector a) | |
Type a => Syntactic (Fix a) | |
Syntax a => Syntactic (Option a) | |
Syntax a => Syntactic (PushVector a) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, IsHODomain dom p pVar, p (Internal a -> Internal b), p (Internal a), pVar (Internal a)) => Syntactic (a -> b) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, TupleSat dom p, p (Internal a, Internal b), p (Internal a), p (Internal b), InjectC (:|| Tuple p) dom (Internal a, Internal b), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b)) => Syntactic (a, b) | |
Syntactic (ASTF dom a) | |
(Shape sh, Syntax a) => Syntactic (Vector sh a) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, TupleSat dom p, p (Internal a, Internal b, Internal c), p (Internal a), p (Internal b), p (Internal c), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c)) => Syntactic (a, b, c) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, IsHODomain dom Typeable pVar, InjectC (MONAD m) dom (m (Internal a)), Monad m, Typeable1 m, Typeable (Internal a), pVar (Internal a)) => Syntactic (Mon dom m a) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d), p (Internal a), p (Internal b), p (Internal c), p (Internal d), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d)) => Syntactic (a, b, c, d) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e)) => Syntactic (a, b, c, d, e) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f)) => Syntactic (a, b, c, d, e, f) | |
(Syntactic a, ~ (* -> *) (Domain a) dom, Syntactic b, ~ (* -> *) (Domain b) dom, Syntactic c, ~ (* -> *) (Domain c) dom, Syntactic d, ~ (* -> *) (Domain d) dom, Syntactic e, ~ (* -> *) (Domain e) dom, Syntactic f, ~ (* -> *) (Domain f) dom, Syntactic g, ~ (* -> *) (Domain g) dom, TupleSat dom p, p (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g), p (Internal a), p (Internal b), p (Internal c), p (Internal d), p (Internal e), p (Internal f), p (Internal g), InjectC (:|| Tuple p) dom (Internal a, Internal b, Internal c, Internal d, Internal e, Internal f, Internal g), InjectC (:|| Select p) dom (Internal a), InjectC (:|| Select p) dom (Internal b), InjectC (:|| Select p) dom (Internal c), InjectC (:|| Select p) dom (Internal d), InjectC (:|| Select p) dom (Internal e), InjectC (:|| Select p) dom (Internal f), InjectC (:|| Select p) dom (Internal g)) => Syntactic (a, b, c, d, e, f, g) |
type family Internal a1 :: *
data FeldDomain a Source
Constrained FeldDomain | |
Project sym FeldSymbols => Project sym FeldDomain | |
TupleSat FeldDomain Type | |
(InjectC sym FeldSymbols a, Typeable a) => InjectC sym FeldDomain a | |
IsHODomain FeldDomain Typeable Type |
Typeable1 Data | |
Type a => Eq (Data a) | |
Fraction a => Fractional (Data a) | |
Numeric a => Num (Data a) | |
Type a => Show (Data a) | |
Testable (Data Bool) | |
(Type a, Arbitrary a) => Arbitrary (Data a) | |
Type a => Sized (Data [a]) | |
Type a => Indexed (Data [a]) | |
Type a => Syntactic (Data a) | |
Fixable (Data Float) | |
Type a => ElemWise (Data a) | |
(Type a, Type b) => CollMap (Data [a]) (Data [b]) | |
Numeric a => Mul (Data a) (Matrix a) | |
Numeric a => Mul (Data a) (Vector1 a) | |
Numeric a => Mul (Data a) (Data a) | |
Numeric a => Mul (Vector1 a) (Matrix a) | |
Numeric a => Mul (Vector1 a) (Vector1 a) | |
Numeric a => Mul (Vector1 a) (Data a) | |
Numeric a => Mul (Matrix a) (Matrix a) | |
Numeric a => Mul (Matrix a) (Vector1 a) | |
Numeric a => Mul (Matrix a) (Data a) | |
Slice sl => Slice (:. sl (Data Length)) | |
Shape sh => Shape (:. sh (Data Length)) |
class (SyntacticFeld a, Type (Internal a)) => Syntax a Source
Specialization of the Syntactic
class for the Feldspar domain
(SyntacticFeld a, Type (Internal a)) => Syntax a |
defaultFeldOpts :: FeldOptsSource
Default options.
reifyFeld :: SyntacticFeld a => FeldOpts -> BitWidth n -> a -> ASTF (Decor Info FeldDom) (Internal a)Source
Reification and optimization of a Feldspar program
reifyFeldUnOpt :: SyntacticFeld a => FeldOpts -> BitWidth n -> a -> ASTF FeldDom (Internal a)Source
Reification of a Feldspar program
showExpr :: SyntacticFeld a => a -> StringSource
printExpr :: SyntacticFeld a => a -> IO ()Source
Print an optimized expression
printExprWith :: SyntacticFeld a => FeldOpts -> a -> IO ()Source
Print an optimized expression with options
printExprUnOpt :: SyntacticFeld a => a -> IO ()Source
Print an unoptimized expression
showAST :: SyntacticFeld a => a -> StringSource
Show the syntax tree using Unicode art
drawAST :: SyntacticFeld a => a -> IO ()Source
Draw the syntax tree on the terminal using Unicode art
writeHtmlAST :: SyntacticFeld a => FilePath -> a -> IO ()Source
Convert the syntax tree to an HTML file with foldable nodes
showDecor :: SyntacticFeld a => a -> StringSource
Draw a syntax tree decorated with type and size information
drawDecor :: SyntacticFeld a => a -> IO ()Source
Draw a syntax tree decorated with type and size information
eval :: SyntacticFeld a => a -> Internal aSource
evalTarget :: (SyntacticFeld a, BoundedInt (GenericInt U n), BoundedInt (GenericInt S n)) => BitWidth n -> a -> Internal aSource