Used in a Sentence

notadd

How to use notadd in a sentence. Live example sentences for notadd pulled from indexed public discussions.

Editorial note

Suppose we represented Add instead as: case class Add(exprs: NonEmptyList[Expr with NotAdd]) extends Expr case class Const(value: Int) extends Expr with NotAdd case class...

Examples9
Definitions0
Parts of speech1

Quick take

Suppose we represented Add instead as: case class Add(exprs: NonEmptyList[Expr with NotAdd]) extends Expr case class Const(value: Int) extends Expr with NotAdd case class...

Example sentences

1

Suppose we represented Add instead as: case class Add(exprs: NonEmptyList[Expr with NotAdd]) extends Expr case class Const(value: Int) extends Expr with NotAdd case class...

2

The type of the first operation would like more like this: notAddOp: Contains NotAdd a -> Expr a -> T a...

3

An inliner might break NotAdd, but why would it need to preserve it?

4

For example, if you had the NotAdd property as well as the NotMult property, you could write down the type for an operation that depends on just the NotAdd operation like this: val notAddOp: ([> `NotAdd] as 'a) expr -> 'a t...

5

Similarly again for the second, except with two witnesses: bothOp: Contains NotAdd a -> Contains NotMult a -> Expr a -> T a I haven't thought it completely through, but I'm almost certain that a combination of type classes and GCH extensions would allow you to turn those proof witness arguments into type class contexts.

6

Substituting an expression for a variable within a "NotAdd" addition may very well break the "NotAdd" property.

7

-> Expr 'NotAdd You could also use True and False instead of Add and IsAdd, or even type-level string literals as arbitrary symbols: data Expr:: Symbol -> * where Add:: [Expr "NotAdd"] -> Expr "IsAdd" Const:: Integer -> Expr "NotAdd"

Quote examples

1

Substituting an expression for a variable within a "NotAdd" addition may very well break the "NotAdd" property.

2

-> Expr 'NotAdd You could also use True and False instead of Add and IsAdd, or even type-level string literals as arbitrary symbols: data Expr:: Symbol -> * where Add:: [Expr "NotAdd"] -> Expr "IsAdd" Const:: Integer -> Expr "NotAdd"

Frequently asked questions

Short answers drawn from the clearest meanings and examples for this word.

How do you use notadd in a sentence?

Suppose we represented Add instead as: case class Add(exprs: NonEmptyList[Expr with NotAdd]) extends Expr case class Const(value: Int) extends Expr with NotAdd case class...