This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utop# | |
module type T = sig | |
type t = .. | |
end;; | |
module type T = sig type t = .. end | |
utop # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nix-shell -p gcc8 --command 'echo $NIX_CFLAGS_COMPILE' | |
-isystem /nix/store/aj932q5vd2xzl67v3qs6hsg47lxmf0n2-libc++-5.0.2/include -isystem /nix/store/89gnz8abjwra67d8y6s6ysmjl6ji81ai-libc++abi-5.0.2/include -isystem /nix/store/yr2vwrbjgabcskp153nzsyl72ysbfc1g-compiler-rt-5.0.2-dev/include -F/nix/store/7x42k0scp8xscrf092jalvpns4cwnnj3-swift-corefoundation/Library/Frameworks -isystem /nix/store/aj932q5vd2xzl67v3qs6hsg47lxmf0n2-libc++-5.0.2/include -isystem /nix/store/89gnz8abjwra67d8y6s6ysmjl6ji81ai-libc++abi-5.0.2/include -isystem /nix/store/yr2vwrbjgabcskp153nzsyl72ysbfc1g-compiler-rt-5.0.2-dev/include -F/nix/store/7x42k0scp8xscrf092jalvpns4cwnnj3-swift-corefoundation/Library/Frameworks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(self: super: | |
let | |
# gcc = super.pkgs.gcc8; | |
# gcc8 = super.pkgs.gcc8.override { stdenv = super.stdenv; }; | |
stdenv = super.stdenvAdapters.overrideCC super.stdenv super.pkgs.gcc8; | |
in | |
{ | |
inherit stdenv; # gcc8 gcc; | |
# stdenv = super.overrideCC super.stdenv self.pkgs.gcc; | |
# gcc8 = super.gcc8.override { stdenv = super.stdenv; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utop # let (module M) = (module Caml.Map.Make(Int64) : Caml.Map.S) in let to_ : unit -> _ M.t = fun () -> failwith "und" in to_;; | |
Error: This expression has type unit -> 'a M.t | |
but an expression was expected of type 'b | |
The type constructor M.t would escape its scope | |
utop # let module M = Caml.Map.Make(Int64) in let to_ : unit -> _ M.t = fun () -> failwith "und" in to_;; | |
- : unit -> 'a Map.Make(Core_kernel__Int64).t = <fun> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let f (type k) : x:((module Caml.Map.S with type key = k) as 'a) -> y:'a -> z:k -> unit = fun ~x:(_) ~y:(_) ~z:(_) -> ();; | |
val f : | |
x:(module Core.Caml.Map.S with type key = 'a) -> | |
y:(module Core.Caml.Map.S with type key = 'a) -> z:'a -> unit = <fun> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type C = sig type 'a t = [>`C|`D] as 'a end | |
module type D = sig include C with type 'a t = [>`D] as 'a end | |
module rec C : C = C;; | |
module rec D : D = D;; | |
type c_t = (module C);; | |
type d_t = (module D);; | |
(fun (m : c_t) -> (m :> d_t)) (module C);; | |
- : d_t = <module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type S = sig | |
type t | |
val of_string : string -> t | |
val to_string : t -> string | |
end | |
let deser : 'a. (module S with type t = 'a) -> (_ -> 'a) * _ = fun m -> | |
let module M = (val m) in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utop # type t = unit -> (string, string, 'a) Map.t option constraint 'a = String.comparator_witness;; | |
type t = unit -> (string, string, String.comparator_witness) Map.t option | |
utop # let f : 'a. unit -> (string, string, 'a) Map.t option constraint 'a = String.comparator_witness = fun () -> failwith "hello";; | |
Error: Syntax error | |
utop # let f : unit -> (string, string, 'a) Map.t option constraint 'a = String.comparator_witness = fun () -> failwith "hello";; | |
Error: Syntax error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mypkg = mkDerivation rec { | |
name = "mypkg"; | |
version = "0.0.1"; | |
src = ./.; | |
# ... | |
outputs = [ "out" "custom" ]; | |
installPhase = '' | |
mkdir -p $out | |
do-some-install-to $out | |
mkdir -pv $custom/share |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from caml/custom.h:23:0, | |
from minor_gc.c:19: | |
minor_gc.c: In function 'alloc_shr_minor': | |
minor_gc.c:189:54: error: 'old_header' undeclared (first use in this function); did you mean 'Make_header'? | |
CAML_ALLOC_EFFECT_NONE, Profinfo_hd(old_header)); | |
^ | |
caml/mlvalues.h:120:40: note: in definition of macro 'Profinfo_hd' | |
#define Profinfo_hd(hd) (((mlsize_t) ((hd) >> PROFINFO_SHIFT)) & PROFINFO_MASK) | |
^~ | |
minor_gc.c:189:54: note: each undeclared identifier is reported only once for each function it appears in |