Package net.hydromatic.morel.ast
Class Core.ConPat
java.lang.Object
net.hydromatic.morel.ast.AstNode
net.hydromatic.morel.ast.Core.BaseNode
net.hydromatic.morel.ast.Core.Pat
net.hydromatic.morel.ast.Core.ConPat
- Enclosing class:
Core
Type constructor pattern with an argument.
For example, in "fun nvl NIL = 0 | OPTION x = x",
"OPTION x" is a type constructor pattern that binds "x";
and "NIL" is a type constructor pattern whose pat is null.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.voidAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.Creates a copy of thisConPatwith given contents, orthisif the contents are the same.(package private) AstWriter
-
Field Details
-
tyCon
-
pat
-
-
Constructor Details
-
ConPat
Mostly-private constructor.Exposed so that "op ::" (cons) can supply a different
Opvalue. The "list" datatype is not represented the same as other datatypes, and the separate "op" value allows us to deconstruct it in a different way. -
ConPat
-
-
Method Details
-
unparse
-
accept
Description copied from class:AstNodeAccepts a shuttle, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result. -
accept
Description copied from class:AstNodeAccepts a visitor, calling theShuttle.visit(net.hydromatic.morel.ast.Ast.Literal)method appropriate to the type of this node, and returning the result.- Overrides:
acceptin classCore.BaseNode
-
copy
Creates a copy of thisConPatwith given contents, orthisif the contents are the same.
-