g?     non-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@cse.unsw.edu.au>None !"#$%&'()*+,-./01234567'*+,-./01234567 !"#$%&'()*+,-./01234567non-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@cse.unsw.edu.au>None89:;<=89<=89:;<=non-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@justtesting.org>None>`Hints imply marshalling strategies, which include source and destination types for marshalling.  Annotating entities with hints. BThe alternatives are to provide an explicit marshalling hint with '(:>)', or to leave the marshalling  implicitly defined by the name's type. TWe provide additional syntax where the hint is to the left of the annotated entity. "Annotation for irrelevant results ?"Pretty print an annotated entity. @CDetermine the Haskell type implied for the given annotated entity. AUDetermine the foreign type *directly* implied for the given annotated entity if any. BRemove the annotation. >CD In case of E6, the foreign type is determined by the Haskell type. F ?@ABGH >CDF ?@AB >CDF ?@ABGHnon-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@justtesting.org>NoneIIProject the name of the head of a type term if it is a type constructor. JLike I2, but fail if the head is not a type constructor. KADecompose an n-ary type application into its head and arguments. L;Obtain the data constructor of the newtype in an idiomatic   wrapper of the form > newtype Wrapper <tvs> = Wrapper (ForeignPtr (Wrapper <tvs>)) MAUnwraps a newtype wrapper around a foreign pointer and turns the   into a N. O^Generate code that unwraps the foreign pointer inside the given foreign pointer wrapper type. PRGiven a type whose head is a newtype wrapper around a foreign pointer of the form  > newtype Wrapper <tvs> = Wrapper (ForeignPtr (Wrapper <tvs>)) Ireturn the name of the wrapper data constructor and type argument of the   , where all '<tvs>' have been f substituted by the arguments in the type application constituting the input type (might be nullary). IJKLMOPIJLMOIJKLMOPnon-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@justtesting.org>None nHint indicating to marshal an Objective-C object as a foreign pointer, where the argument is the Haskell type j representing the Objective-C class. The Haskell type name must coincide with the Objective-C class name. 0Class of entities that can be used as TH types.  QRSTU  QRSTUnon-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@cse.unsw.edu.au>NoneVRConstructs C code to marshal an argument (used to marshal arguments and results). ? The argument is the identifier of the value to be marshalled. C * The result of the generated expression is the marshalled value. WTConstructs Haskell code to marshal a value (used to marshal arguments and results). I The first argument is the code referring to the value to be marshalled. Z * The second argument is the continuation that gets the marshalled value as an argument. X:Determine the C type that we map a given Haskell type to. YfDetermine the C type that we map a given Haskell type constructor to  i.e., we map all Haskell types S whose outermost constructor is the given type constructor to the returned C type. gAll types representing boxed values that are not explicitly mapped to a specific C type, are mapped to  stable pointers. ZiGenerate the type-specific marshalling code for Haskell to C land marshalling for a Haskell-C type pair. )The result has the following components: . Haskell type after Haskell-side marshalling. % * C type before C-side marshalling. 4 * Generator for the Haskell-side marshalling code. . * Generator for the C-side marshalling code. [iGenerate the type-specific marshalling code for Haskell to C land marshalling for a C-Haskell type pair. )The result has the following components: . Haskell type after Haskell-side marshalling. % * C type before C-side marshalling. 4 * Generator for the Haskell-side marshalling code. . * Generator for the C-side marshalling code. VWXY\]Z^[_`aVWXZ[ VWXY\]Z^[_`anon-portable (GHC extensions) experimental-Manuel M T Chakravarty <chak@cse.unsw.edu.au>None tMaps a quoted property to a quoted projection and a quoted update function in addition to the type of the projected  value. mSpecify imported Objective-C files. Needs to be spliced where an import declaration can appear. (Just put it : straight after all the import statements in the module.) TNB: This inline splice must appear before any other use of inline code in a module. JFIXME: need to use TH.addDependentFile on each of the imported ObjC files & read headers <Inline Objective-C top-level definitions for a header file ('.h'). EInline Objective-C top-level definitions for an implementation file ('.m'). mThe top-level Haskell variables given in the first argument will be foreign exported to be accessed from the w generated Objective-C code. In C, these Haskell variables will always be represented as functions. (In particular, if t the Haskell variable refers to a CAF, it will be a nullary function in C  after all, a thunk may still need to be  evaluated.) <Map a property to explicit projection and update functions. hMap a property to a field label. This function assumes that the field name is typed and can be reified. dSpecification of a bridge for a Haskell structure that can be queried and updated from Objective-C. hThe first argument is the name of the Objective-C class that will be a proxy for the Haskell structure. T The second argument the name of the Haskell type of the bridged Haskell structure. hThe generated class is immutable. When a property is updated, a new instance is allocated. This closely P mirrors the behaviour of the Haskell structure for which the class is a proxy. 5The designated initialiser of the generated class is ' [-initWith HsName HsPtr:(HsStablePtr)particleHsPtr]',  where  '<HsName>'W is the type name of the Haskell structure. This initialiser is generated if it is not + explicitly provided. The generated method '[-init]'' calls the designated initialiser with nil for the  stable pointer. XWARNING: This is a very experimental feature and it will SURELY change in the future!!!  FIXME: don'Ct generate the designated initialiser if it is explicitly provided Declare a Haskell -VObjective-C marshaller pair to be used in all subsequent marshalling code generation. sOn the Objective-C side, the marshallers must use a wrapped foreign pointer to an Objective-C class (just as those  of  g hints). The domain and codomain of the two marshallers must be the opposite and both are executing in b. Inline Objective-C expression. mThe inline expression will be wrapped in a C function whose arguments are marshalled versions of the Haskell p variables given in the first argument. The marshalling of the variables and of the result is determined by the E marshalling annotations at the variables and the inline expression. ^Emit the Objective-C file and return the foreign declarations. Needs to be the last use of an  'objc...' function. 1 (Just put it at the end of the Haskell module.) IForce type checking of all declaration appearing earlier in this module. qTemplate Haskell performs type checking on declaration groups seperated by toplevel splices. In order for a type l declaration to be available to an Objective-C inline directive, the type declaration must be in an earlier v declaration group than the Objective-C inline directive. A toplevel Objective-C inline directive always is the start Y of a new declaration group; hence, it can be considered to be implicitly preceded by an . cdeprefix of the class name  class name :name of the Haskell type of the bridged Haskell structure +Haskell variables used in Objective-C code SObjective-C properties with corresponding Haskell projections and update functions extra interface declarations "extra implementation declarations fghijPklmnopqrstuvwxyz{|}~   cdefghij         !"#$%&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP QRSTUVWXYZ [\]^_`abcdefghijklmnopqrstuvwxyz {| {| {} {} {~ {~ { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { {language-c-inline-0.7.7.0Language.C.Inline.ObjCLanguage.C.Inline.StateLanguage.C.Inline.ErrorLanguage.C.Inline.HintLanguage.C.Inline.THLanguage.C.Inline.ObjC.HintLanguage.C.Inline.ObjC.Marshaltemplate-haskellLanguage.Haskell.TH.SyntaxNamebaseForeign.C.String CWStringLenCWString CStringLenCStringForeign.C.ErrorErrno AnnotatedTyped:><:voidGHC.ForeignPtr ForeignPtrcastForeignPtrClassIsTypePropertyAccess objc_importobjc_interfaceobjc_implementation==>--> objc_recordobjc_marshallerobjc objc_emitobjc_typecheckState foreignTable foreignLabelsheaders marshallers hoistedObjC_h hoistedObjC_m hoistedHSCustomMarshallerstate initialStateinitialiseState readState modifyStatesetForeignTable stashHeaderstashMarshaller stashObjC_h stashObjC_mstashHSextendJumpTablegetForeignTablegetForeignLabels getHeadersgetMarshallerslookupMarshallergetHoistedObjC getHoistedHSreportErrorWithLangreportErrorAndFailreportErrorAndFail'showLangtryWithPlaceholderprettyQCHintannotatedShowQ haskellTypeOf foreignTypeOfstripAnnotation haskellType foreignType Data.MaybeNothingshowQ$fHintQ $fHintName headTyConNameheadTyConNameOrError splitAppTyforeignWrapperDataconptrOfForeignPtrWrapperGHC.PtrPtrunwrapForeignPtrWrapperdecomposeForeignPtrWrappertheType $fHintClass $fIsTypeName $fIsTypeQ $fIsTypeType CMarshallerHaskellMarshallerhaskellTypeToCTypehaskellTypeNameToCTypegenerateHaskellToCMarshallergenerateCToHaskellMarshallerhaskellToCTypeMap isCPtrTypegenerateHaskellToCMarshaller'generateCToHaskellMarshaller' cIntegralMap cFloatingMapghc-prim GHC.TypesIO:==>maybeErrorCtypeforExpDhaskellWrapperTypewrapperBodyTypegenerateCWrappercParamsgenerateHSCallForeign.C.TypesCWcharCUShort CUSecondsCULongCULLongCUIntPtrCUIntMaxCUIntCUCharCTimeCSize CSigAtomicCShort CSUSecondsCSCharCPtrdiffCLongCLLongCJmpBufCIntPtrCIntMaxCIntCFposCFloatCFileCDoubleCClockCChar