-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
It'd be convenient to have implicits as constructor arguments so that we could write
type showable = Show : {S: SHOW} * S.t -> showable;;
let f (Show ({M}, x)) = show xIt's currently possible to achieve something similar with first-class modules in a few cases:
type showable = Show : (module SHOW with type t = 'a) * 'a -> showable
let f (Show ((module M), x)) = let implicit module M = M in show xbut this technique doesn't work for higher-kinded examples, besides being rather cumbersome.
Metadata
Metadata
Assignees
Labels
No labels