[MLton] Bug in parseAndElaborate: unhandled exception: Subscript

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Sun, 11 Sep 2005 17:20:26 +0300


The latest MLton built from SVN sources has a bug in the parseAndElaborate
pass.

$ cat mlton-unhandled-subscript.sml
signature X =
   sig
      type x = unit
   end

structure X :> X =
   struct
      type 'a x = unit
   end

$ mlton -stop tc -verbose 2 mlton-unhandled-subscript.sml
MLton starting
MLton MLTONVERSION (built Sun Sep 11 16:54:21 2005 on grape)
  created this file on Sun Sep 11 17:15:07 2005.
Do not edit this file.
Flag settings:
   align: 4
   atMLtons: (mlton-unhandled-subscript, @MLton, --)
   chunk: chunk per function
   codegen: Native
   contifyIntoMain: false
   debug: false
   diag passes: []
   drop passes: []
   elaborate allowConstant (default): false
   elaborate allowConstant (enabled): true
   elaborate allowFFI (default): false
   elaborate allowFFI (enabled): true
   elaborate allowPrim (default): false
   elaborate allowPrim (enabled): true
   elaborate allowOverload (default): false
   elaborate allowOverload (enabled): true
   elaborate allowRebindEquals (default): false
   elaborate allowRebindEquals (enabled): true
   elaborate deadCode (default): false
   elaborate deadCode (enabled): true
   elaborate forceUsed (default): false
   elaborate forceUsed (enabled): true
   elaborate ffiStr (default):
   elaborate ffiStr (enabled): true
   elaborate nonexhaustiveExnMatch (default): default
   elaborate nonexhaustiveExnMatch (enabled): true
   elaborate nonexhaustiveMatch (default): warn
   elaborate nonexhaustiveMatch (enabled): true
   elaborate redundantMatch (default): warn
   elaborate redundantMatch (enabled): true
   elaborate sequenceNonUnit (default): ignore
   elaborate sequenceNonUnit (enabled): true
   elaborate warnUnused (default): false
   elaborate warnUnused (enabled): true
   elaborate only: false
   export header: None
   exn history: false
   gc check: Limit
   indentation: 3
   inline: NonRecursive {product = 320, small = 60}
   inlineIntoMain: true
   input file: mlton-unhandled-subscript
   keep Machine: false
   keep RSSA: false
   keep SSA: false
   keep SSA2: false
   keep dot: false
   keep passes: []
   extra_: false
   lib dir: /home/vk/work/sml/mlton/mlton/install/usr/lib/mlton
   lib target dir: /home/vk/work/sml/mlton/mlton/install/usr/lib/mlton/self
   loop passes: 1
   mark cards: true
   max function size: 10000
   mlb path maps: []
   native commented: 0
   native live stack: false
   native optimize: 1
   native move hoist: true
   native copy prop: true
   native copy prop cutoff: 1000
   native cutoff: 100
   native live transfer: 8
   native shuffle: true
   native ieee fp: false
   native split: Some 20000
   optimizationPassesSet: [<ssa2PassesSet>, <ssaPassesSet>, <sxmlPassesSet>, <xmlPassesSet>]
   polyvariance: Some {rounds = 2, small = 30, product = 300}
   prof passes: []
   profile: None
   profile branch: false
   profile C: []
   profile IL: ProfileSource
   profile include/exclude: [(Seq [Star [.], Or [Seq [Seq [[<], [b], [a], [s], [i], [s], [>]]]], Star [.]], false)]
   profile raise: false
   profile stack: false
   show basis: None
   show def-use: None
   show types: false
   ssaPassesSet: <ssaPassesSet>
   ssaPasses: [default]
   ssa2PassesSet: <ssa2PassesSet>
   ssa2Passes: [default]
   sxmlPassesSet: <sxmlPassesSet>
   sxmlPasses: [default]
   target: self
   target arch: X86
   target OS: Linux
   type check: false
   verbosity: Pass
   warn unrecognized annotation: true
   xmlPassesSet: <xmlPassesSet>
   xmlPasses: [default]
   zone cut depth: 100
   Type Check SML starting
      parseAndElaborate starting
      parseAndElaborate raised in 5.31 + 0.00 (0% GC)
   Type Check SML raised in 5.31 + 0.00 (0% GC)
MLton raised in 5.31 + 0.00 (0% GC)
unhandled exception: Subscript