Skip to content

Instantly share code, notes, and snippets.

@Leonidas-from-XIV
Last active March 7, 2019 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leonidas-from-XIV/7dcf27739d3c9da7da41e6d1c7e5876d to your computer and use it in GitHub Desktop.
Save Leonidas-from-XIV/7dcf27739d3c9da7da41e6d1c7e5876d to your computer and use it in GitHub Desktop.
dune vs jbuilder
File "lib_helpers/kafka_producer.ml", line 1:
Error: The implementation lib_helpers/kafka_producer.ml
does not match the interface lib_helpers/.kafka_helpers.objs/byte/kafka_helpers__Kafka_producer.cmi:
Values do not match:
val stream_to : ('a, unit) sink -> 'a iterable -> unit
is not included in
val stream_to : ('a, 'b) sink -> 'a iterable -> 'b
File "lib_helpers/kafka_producer.mli", line 9, characters 0-48:
Expected declaration
File "lib_helpers/kafka_producer.ml", line 4, characters 4-13:
Actual declaration
type ('a,'b) sink = unit -> ('a -> unit) * (unit -> 'b)
type 'a iterable = ('a -> unit) -> unit
let stream_to : ('a, 'b) sink -> 'a iterable -> 'b = fun open_sink iterable ->
let (push,close) = open_sink () in
try iterable push ; close ()
with error -> close (); raise error
type ('a,'b) sink = unit -> ('a -> unit) * (unit -> 'b)
type 'a iterable = ('a -> unit) -> unit
val stream_to: ('a,'b) sink -> 'a iterable -> 'b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment