File: 245_functorExn.sml

package info (click to toggle)
smlsharp 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 123,732 kB
  • sloc: ansic: 16,725; sh: 4,347; makefile: 2,191; java: 742; haskell: 493; ruby: 305; cpp: 284; pascal: 256; ml: 255; lisp: 141; asm: 97; sql: 74
file content (29 lines) | stat: -rw-r--r-- 809 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(*
2012-11-9 ohori
This cause a BUG excetion.
[BUG] composeExn: tag not found

The excetion defined in the fuctor F (245_functorExn3.smi)
is treated as an internal excetion when functor application 
is used in the interface file.
The name evaluator creates the following
  val() a(v0) = raise A.Foo(e1)
  245_functorExn3.sml:1.1-1.19 Warning:
    (type inference 065) dummy type variable(s) are introduced due to value
    restriction in: a
  [BUG] composeExn: tag not found
where e1 is an internal exception id.

If we replace 
  structure A = F(B)
with the following declaration, then compiler works fine.
  structure A = 
  struct
    exception Foo
  end
The name evaluator generates the following:
  extern exception A.Foo : d()exn(t12) (NONEQ)
  val() a(v0) = raise A.Foo

*)
val a = (raise A.Foo) : int