@@ -119,35 +119,35 @@ prim_fwrite h s
119119 = MkIO (\w => prim_io_return (prim__writeFile (world w) h s))
120120
121121--------- The C FFI
122−
123−data Raw : Type -> Type where
124− -- code generated can assume it's compiled just as 't'
125− MkRaw : (x : t) -> Raw t
126−
127−-- Tell erasure analysis not to erase the argument
128−%used MkRaw x
129−
130−-- Supported C integer types
131−data C_IntTypes : Type -> Type where
132− C_IntChar : C_IntTypes Char
133− C_IntNative : C_IntTypes Int
134− C_IntBits8 : C_IntTypes Bits8
135− C_IntBits16 : C_IntTypes Bits16
136− C_IntBits32 : C_IntTypes Bits32
137− C_IntBits64 : C_IntTypes Bits64
138−
139−-- Supported C foreign types
140−data C_Types : Type -> Type where
141− C_Str : C_Types String
142− C_Float : C_Types Float
143− C_Ptr : C_Types Ptr
144− C_MPtr : C_Types ManagedPtr
145− C_Unit : C_Types ()
146− C_Any : C_Types (Raw a)
147− C_IntT : C_IntTypes i -> C_Types i
148−
149−FFI_C : FFI
150−FFI_C = MkFFI C_Types String String
122+namespace FFI_C
123+ data Raw : Type -> Type where
124+ -- code generated can assume it's compiled just as 't'
125+ MkRaw : (x : t) -> Raw t
126+
127+ -- Tell erasure analysis not to erase the argument
128+ %used MkRaw x
129+
130+ -- Supported C integer types
131+ data C_IntTypes : Type -> Type where
132+ C_IntChar : C_IntTypes Char
133+ C_IntNative : C_IntTypes Int
134+ C_IntBits8 : C_IntTypes Bits8
135+ C_IntBits16 : C_IntTypes Bits16
136+ C_IntBits32 : C_IntTypes Bits32
137+ C_IntBits64 : C_IntTypes Bits64
138+
139+ -- Supported C foreign types
140+ data C_Types : Type -> Type where
141+ C_Str : C_Types String
142+ C_Float : C_Types Float
143+ C_Ptr : C_Types Ptr
144+ C_MPtr : C_Types ManagedPtr
145+ C_Unit : C_Types ()
146+ C_Any : C_Types (Raw a)
147+ C_IntT : C_IntTypes i -> C_Types i
148+
149+ FFI_C : FFI
150+ FFI_C = MkFFI C_Types String String
151151
152152IO : Type -> Type
153153IO = IO' FFI_C