Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/branches/arith64/system/smlnj/init/print-hook.sml
ViewVC logotype

View of /sml/branches/arith64/system/smlnj/init/print-hook.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4874 - (download) (annotate)
Fri Oct 5 14:33:11 2018 UTC (10 months, 2 weeks ago) by jhr
File size: 438 byte(s)
  merge in edits from trunk
(* print-hook.sml
 *
 * COPYRIGHT (c) 2018 The Fellowship of SML/NJ (http://www.smlnj.org)
 * All rights reserved.
 *
 * Hook for the top-level `print` function.
 *)

structure PrintHook =
  struct

    local
    (* to have something to initialize prHook with... *)
      fun discard (s: PrimTypes.string) = ()
    in
    val prHook = PrimTypes.ref discard (* very crude *)
    fun print s = InlineT.! prHook s
    end (* local *)

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0