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/pre-perv.sml
ViewVC logotype

View of /sml/branches/arith64/system/smlnj/init/pre-perv.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4874 - (download) (annotate)
Fri Oct 5 14:33:11 2018 UTC (10 months, 1 week ago) by jhr
File size: 581 byte(s)
  merge in edits from trunk
(* pre-perv.sml
 *
 * COPYRIGHT (c) 2018 The Fellowship of SML/NJ (http://www.smlnj.org)
 * All rights reserved.
 *)

structure PrePervasive =
  struct

    exception Span

    open Order

    datatype option = datatype Assembly.option

    exception Option

    fun getOpt (SOME x, y) = x
      | getOpt (NONE, y) = y

    fun isSome (SOME _) = PrimTypes.true
      | isSome NONE = PrimTypes.false

    fun valOf (SOME x) = x
      | valOf NONE = raise Option

    val op = : ''a * ''a -> PrimTypes.bool = InlineT.=
    val op <> : ''a * ''a -> PrimTypes.bool = InlineT.<>

  end

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