doc[core/expression]: constructor fields
This commit is contained in:
parent
fa8d508e84
commit
a38a20a546
1 changed files with 7 additions and 6 deletions
|
@ -29,11 +29,12 @@ import Test.QuickCheck qualified as Gen
|
||||||
type Expression :: (Type -> Type) -> Type
|
type Expression :: (Type -> Type) -> Type
|
||||||
type role Expression nominal
|
type role Expression nominal
|
||||||
data Expression f
|
data Expression f
|
||||||
= RawInt (f Integer)
|
= RawInt (f Integer) -- ^ e.g.: 42
|
||||||
| RawRational (f Rational)
|
| RawRational (f Rational) -- ^ e.g.: 0.3000000000002
|
||||||
| RawString (f Text)
|
| RawString (f Text) -- ^ raw text
|
||||||
| PatternMatch (f (NonEmpty (PatternMatchCase f)))
|
| PatternMatch (f (NonEmpty (PatternMatchCase f))) -- ^ cases
|
||||||
| Lambda (f VariableIdentifier) (f (Expression f))
|
| Lambda (f VariableIdentifier) (f (Expression f)) -- ^ argument name, calculation
|
||||||
|
| Apply (f (Expression f)) (f (Expression f)) -- ^ function, argument
|
||||||
|
|
||||||
-- to me, this looks incredibly dangerous, because of Show (f (Expression f)) => Show (Expression f)
|
-- to me, this looks incredibly dangerous, because of Show (f (Expression f)) => Show (Expression f)
|
||||||
-- let's hope UndecidableInstances won't have the compiler diverge
|
-- let's hope UndecidableInstances won't have the compiler diverge
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue