# Ocaml record syntax (beginner question)

**URL:** <https://discuss.ocaml.org/t/ocaml-record-syntax-beginner-question/7015>\
**Category:** Learning\
**Created:** [December 24, 2020, 12:10pm UTC](https://discuss.ocaml.org/t/ocaml-record-syntax-beginner-question/7015 "2020-12-24T12:10:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexo79](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@alexo79](https://discuss.ocaml.org/u/alexo79)\
**Post date:** [December 24, 2020, 12:10pm UTC](https://discuss.ocaml.org/t/ocaml-record-syntax-beginner-question/7015/1 "2020-12-24T12:10:08Z")

</div>

Hello there,  
I am a Ocaml beginner coming from languages like C and Java and I have a question on a bit of  
Ocaml code that I found on [GitHub - mirage/ocaml-cohttp: An OCaml library for HTTP clients and servers using Lwt or Async](https://github.com/mirage/ocaml-cohttp) and which I don’t quite understand.  
I hope, this isn’t going to be too embarrassing.

I found this code example in section " Basic Server Tutorial":

let tcp\_config =  
{  
Conduit\_lwt.TCP.sockaddr = Unix.ADDR\_INET (Unix.inet\_addr\_loopback, 8000);  
capacity = 40;  
}  
in …

from my limited understanding, this looks like a definition of a variable of some record type.  
What confuses me is the part  
Conduit\_lwt.TCP.sockaddr = …  
This does not seem to be a field name of this record, but something else.  
Can anyone enlighten me, what this is about?  
I don’t necessarily want to know about the cohttp library, I’m just wondering how to parse this syntax.  
Thank you!

---

<div class="post-metadata">

**Author:** ![roddy](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/roddy/32/2261_2.png) [@roddy](https://discuss.ocaml.org/u/roddy)\
**Post date:** [December 24, 2020, 12:20pm UTC](https://discuss.ocaml.org/t/ocaml-record-syntax-beginner-question/7015/2 "2020-12-24T12:20:15Z")

</div>

It’s specifying that the record type comes from the module `Conduit_lwt.TCP`; see the “Reusing Field Names” section [here](https://dev.realworldocaml.org/records.html) for more.

---

<div class="post-metadata">

**Author:** ![alexo79](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@alexo79](https://discuss.ocaml.org/u/alexo79)\
**Post date:** [December 24, 2020, 12:35pm UTC](https://discuss.ocaml.org/t/ocaml-record-syntax-beginner-question/7015/3 "2020-12-24T12:35:58Z")

</div>

Thank you, that was it.
