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

SCM Repository

[smlnj] Diff of /sml/branches/arith64/system/smlnj/init/exn-info-hook.sml
ViewVC logotype

Diff of /sml/branches/arith64/system/smlnj/init/exn-info-hook.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4873, Thu Oct 4 21:39:53 2018 UTC revision 4874, Fri Oct 5 14:33:11 2018 UTC
# Line 1  Line 1 
1  (* (C) 1999 Lucent Technologies, Bell Laboratories *)  (* exn-info-hook.sml
2     *
3     * COPYRIGHT (c) 2018 The Fellowship of SML/NJ (http://www.smlnj.org)
4     * All rights reserved.
5     *)
6    
7  structure ExnInfoHook = struct  structure ExnInfoHook =
8      struct
9      val exnName : PrimTypes.exn -> PrimTypes.string =      val exnName : PrimTypes.exn -> PrimTypes.string =
10          InlineT.cast (fn (PrimTypes.ref s, _, _) => s)          InlineT.cast (fn (PrimTypes.ref s, _, _) => s)
11    
12      local      local
13          fun dummy (e: PrimTypes.exn) =          fun dummy (e: PrimTypes.exn) =
14              PreString.concat2              PreString.concat2
15                  (exnName e,                  (exnName e,
16                   " (more info unavailable: ExnInfoHook not initialized)")                   " (more info unavailable: ExnInfoHook not initialized)")
17      in      in
18    
19          val exnMessageHook = PrimTypes.ref dummy          val exnMessageHook = PrimTypes.ref dummy
20    
21          fun exnMessage e = InlineT.! exnMessageHook e          fun exnMessage e = InlineT.! exnMessageHook e
22      end  
23        end (* local *)
24    
25  end  end

Legend:
Removed from v.4873  
changed lines
  Added in v.4874

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