Mercurial > urweb
annotate tests/open_functor.ur @ 1612:7bb8c560f23d
Announce sidedness errors with source locations
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 25 Nov 2011 11:08:51 -0500 |
parents | 71bafe66dbe1 |
children |
rev | line source |
---|---|
adamc@146 | 1 signature S = sig |
adamc@146 | 2 type t |
adamc@146 | 3 val x : t |
adamc@146 | 4 end |
adamc@146 | 5 |
adamc@146 | 6 functor F (M : S) : S where type t = M.t = struct |
adamc@146 | 7 type t = M.t |
adamc@146 | 8 val x = M.x |
adamc@146 | 9 end |
adamc@146 | 10 |
adamc@146 | 11 structure M = F(struct |
adamc@146 | 12 type t = int |
adamc@146 | 13 val x = 0 |
adamc@146 | 14 end) |
adamc@146 | 15 |
adamc@146 | 16 open M |