This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Cell[T] = ref object | |
car: T | |
cdr: Cell[T] | |
type List[T, N] = distinct Cell[T] | |
proc makeNil[T]: List[T, range[0..0]] = nil | |
proc makeCons[T, N](car: T; cdr: List[T, N]): auto = | |
type N1 = range[0..high(N)+1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-e83b81d (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
package C.bits.mman is | |
pragma Preelaborate; | |
MAP_32BIT : constant := 64; | |
MAP_DENYWRITE : constant := 2048; | |
MAP_EXECUTABLE : constant := 4096; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-e83b81d (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (size : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-e83b81d (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (size : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type T1 = sig | |
type t (* any abstract type *) | |
val one: t | |
end;; | |
module M1: T1 = Int;; | |
type 'a repr = C1: M1.t repr (* GADT is needed *) | |
let one: string = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-611630a (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (a1 : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-18d0286 (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (a1 : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-18d0286 (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (a1 : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-18d0286 (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (a1 : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This file is translated by "headmaster" version 0.30-18d0286 (devel). | |
-- The original C header's license should be applied to this file. | |
-- All conditional-directives are expanded for the exclusive use of your | |
-- environment, it is not recommended to commit this file to any repository. | |
------------------------------------------------------------------------------- | |
with C.stddef; | |
package C.alloca is | |
pragma Preelaborate; | |
function alloca (a1 : stddef.size_t) return void_ptr; | |
pragma Import (C, alloca, "alloca"); |