-
Notifications
You must be signed in to change notification settings - Fork 1
/
ForeignCall.hs
53 lines (43 loc) · 1.03 KB
/
ForeignCall.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE TypeFamilies #-}
module ForeignCall where
import Dependencies
newtype ForeignCall = CCall CCallSpec
data Safety
= PlaySafe
| PlayInterruptible
| PlayRisky
data CExportSpec
= CExportStatic {- TTG-Todo
SourceText
-}
CLabelString
CCallConv
data CCallSpec
= CCallSpec CCallTarget
CCallConv
Safety
data CCallTarget
= StaticTarget {- TTG-Todo
SourceText
-}
CLabelString
(Maybe UnitId)
Bool
| DynamicTarget
data CCallConv = CCallConv | CApiConv | StdCallConv | PrimCallConv | JavaScriptCallConv
type CLabelString = FastString
data Header
= Header {- TTG-Todo
SourceText
-}
FastString
data CType
= CType {- TTG-Todo
SourceText
-}
(Maybe Header)
FastString
{- TTG-Todo
(SourceText,FastString)
-}