Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signature Stack =
- sig
- type a Stack
- val empty : a Stack
- val isEmpty : a Stack -> bool
- val cons : a * a Stack -> a Stack
- val head : a Stack -> a
- val tail : a Stack -> a Stack
- end
- structure List : Stack =
- struct
- type a Stack = a list
- val empty = []
- fun isEmpty s = null s
- fun cons (x,s) = x :: s
- fun head s = hd s
- fun tail s = tl s
- end
- ----
- Error: stack.sml 3.10.
- Syntax error: inserting AND.
- Error: stack.sml 15.3.
- Syntax error: replacing TYPE with FUN.
- Error: stack.sml 5.17.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 6.17.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 8.21.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 8.32.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 9.17.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 10.17.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 10.28.
- Type constructor Stack given 1 argument but wants 0.
- Error: stack.sml 15.20.
- Undefined variable list.
- Error: stack.sml 13.18.
- Type Stack in signature but not in structure.
- Error: stack.sml 13.18.
- Type a in signature but not in structure.
- Error: stack.sml 13.18.
- Variable type in structure disagrees with signature.
- variable: empty
- structure: [??? list]
- signature: [exn]
- Error: stack.sml 13.18.
- Variable type in structure disagrees with signature.
- variable: isEmpty
- structure: [??? list] -> _
- signature: [exn] -> _
- Error: stack.sml 13.18.
- Variable type in structure disagrees with signature.
- variable: tail
- structure: [??? list] -> [??? list]
- signature: [exn] -> [exn]
Advertisement
Add Comment
Please, Sign In to add comment