ion-1.0.0.0: EDSL for concurrent, realtime, embedded programming on top of Ivory

Copyright(c) 2015 Chris Hodapp
Safe HaskellNone
LanguageHaskell2010

Ivory.Language.Ion.Util

Description

 

Synopsis

Documentation

procName :: Def proc -> String Source

Return the symbol name of an Ivory procedure

fitWordType :: Integer -> Type Source

Return the Ivory unsigned int type (in its AST) that the given Integer would require (i.e. any value from 0 to 255 returns a Word8; values beyond that but less than 65535 require a Word16; and so on.) The given integer must be non-negative.

checkCName :: String -> Maybe Int Source

Checks the given string for being a valid C identifier. If it is, then it returns Nothing, and otherwise Just and the string index of the character which renders it invalid.