inline-c-0.9.1.10: Write Haskell source files including C code inline. No FFI required.

Safe Haskell | None
Language | Haskell2010

Language.C.Inline.HaskellIdentifier

Contents

- for testing

Synopsis

- data HaskellIdentifier
- unHaskellIdentifier :: HaskellIdentifier -> String
- haskellIdentifierFromString :: Bool -> String -> Either String HaskellIdentifier
- haskellCParserContext :: Bool -> TypeNames -> CParserContext HaskellIdentifier
- parseHaskellIdentifier :: CParser i m => m HaskellIdentifier
- mangleHaskellIdentifier :: Bool -> HaskellIdentifier -> CIdentifier
- haskellReservedWords :: HashSet String

# Documentation

data HaskellIdentifier Source #

A possibly qualified Haskell identifier.

#### Instances

Instances details

IsString HaskellIdentifier Source # |
Instance details Defined in Language.C.Inline.HaskellIdentifier Methods fromString :: String -> HaskellIdentifier Source #
Show HaskellIdentifier Source # |
Instance details Defined in Language.C.Inline.HaskellIdentifier Methods showsPrec :: Int -> HaskellIdentifier -> ShowS Source # show :: HaskellIdentifier -> String Source # showList :: [HaskellIdentifier] -> ShowS Source #
Eq HaskellIdentifier Source # |
Instance details Defined in Language.C.Inline.HaskellIdentifier Methods (==) :: HaskellIdentifier -> HaskellIdentifier -> Bool Source # (/=) :: HaskellIdentifier -> HaskellIdentifier -> Bool Source #
Ord HaskellIdentifier Source # |

Instance details

Defined in Language.C.Inline.HaskellIdentifier

Methods

compare :: HaskellIdentifier -> HaskellIdentifier -> Ordering Source #

(<) :: HaskellIdentifier -> HaskellIdentifier -> Bool Source #

(<=) :: HaskellIdentifier -> HaskellIdentifier -> Bool Source #

(>) :: HaskellIdentifier -> HaskellIdentifier -> Bool Source #

(>=) :: HaskellIdentifier -> HaskellIdentifier -> Bool Source #

max :: HaskellIdentifier -> HaskellIdentifier -> HaskellIdentifier Source #

min :: HaskellIdentifier -> HaskellIdentifier -> HaskellIdentifier Source #

Hashable HaskellIdentifier Source # |
Instance details Defined in Language.C.Inline.HaskellIdentifier Methods hashWithSalt :: Int -> HaskellIdentifier -> Int Source # hash :: HaskellIdentifier -> Int Source #
Pretty HaskellIdentifier Source # |
Instance details Defined in Language.C.Inline.HaskellIdentifier Methods pretty :: HaskellIdentifier -> Doc ann Source # prettyList :: [HaskellIdentifier] -> Doc ann Source #

unHaskellIdentifier :: HaskellIdentifier -> String Source #

haskellIdentifierFromString :: Bool -> String -> Either String HaskellIdentifier Source #

haskellCParserContext :: Bool -> TypeNames -> CParserContext HaskellIdentifier Source #

parseHaskellIdentifier :: CParser i m => m HaskellIdentifier Source #

See https://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-160002.2.

mangleHaskellIdentifier :: Bool -> HaskellIdentifier -> CIdentifier Source #

Mangles an `HaskellIdentifier` to produce a valid `CIdentifier` which still sort of resembles the `HaskellIdentifier`.

# for testing

haskellReservedWords :: HashSet String Source #