Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module type Session_base = sig
- type t
- type a
- val mk_base : a -> t
- end;;
- module Protocol_base : Session_base = struct
- type t = protocol_base_formula
- type a = string
- let mk_base sender receiver formula = {...}
- end;;
- module Make_Session (Base: Session_base) = struct
- type t = Base.t
- type session =
- | SSeq of ...
- | SBase of t
- let mk_base f d e = SBase (Base.mk_base f d e)
- end;;
- module Protocol = Make_Session(Protocol_base);;
- Call site: Session.Protocol.mk_base first second c
- where first is a string
- Error:
- This expression has type string but an expression was expected of type
- Session.Protocol_base.a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement