0

This is probably a silly question, but I want to define a type like this:

type bla = Bla of (string, bla) Hashtbl

However, it gives me a parse error, no matter what I do. In essence, I want Bla to hold hashtable from string to bla again. What am I exactly doing wrong?

Pascal Cuoq
  • 79,187
  • 7
  • 161
  • 281
zpavlinovic
  • 1,507
  • 1
  • 17
  • 36

1 Answers1

2

Hashtbl is a module. The (non-functorial) type that it defines is ('a, 'b) Hashtbl.t:

# type bla = Bla of (string, bla) Hashtbl.t;;
type bla = Bla of (string, bla) Hashtbl.t
Jeffrey Scofield
  • 65,646
  • 2
  • 72
  • 108