flp-0.1.0.0: A layout spec language for memory managers implemented in Rust.

Safe HaskellNone
LanguageHaskell2010

Language.Floorplan.Rust.Common

Synopsis

Documentation

isPow2 :: Integral b => b -> Bool Source #

log' :: Int -> Int -> Int Source #

Log base i of n rounded up.

mkIntExp :: Int -> Expr Span Source #

Makes a Rust expression of from an integer

mkBin' :: Integral a => a -> [Char] Source #

mkBinU8 :: (Show a, Integral a) => a -> [Char] Source #

addrName :: [Char] -> [Char] Source #

All named entities get an addrName:

structName :: [Char] -> [Char] Source #

Only for (known to be) fixed-width things:

bitsGetterName :: (Eq a, Num a) => a -> [Char] -> [Char] Source #

bitsFromerName :: (Eq a, Num a) => a -> [Char] -> [Char] Source #

findExists :: BaseExp -> [BaseExp] Source #

Determine all existential-bound names brought into scope by this expression. Alignment and Constrained can be traversed because only a ":#" can refer to names.