Skip to content
Snippets Groups Projects
Commit 24607274 authored by Cesar Roux Dit Buisson's avatar Cesar Roux Dit Buisson
Browse files

Add test for abstract type support

parent 89e2d86a
No related branches found
No related tags found
No related merge requests found
open Abstracttype
let test = create_container 10
let f = get_value test
\ No newline at end of file
type container =
| Alpha [@f value] of int
| Beta [@f]
let empty = Beta
let create_container value = Alpha value
let get_value cont = match cont with
| Alpha x -> x
| _ -> 0
\ No newline at end of file
type container
val empty : container
val create_container : int -> container
val get_value : container -> int
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment