diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2025-11-27 21:30:17 +0100 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2025-11-27 21:30:17 +0100 |
| commit | 20f7d7be13cd7869b338f98d1ab3fd33e8bbfb3e (patch) | |
| tree | a21c90034a02cdeb7240563dbbab355e49622d0a /src/CHAD/APIv1.hs | |
| parent | ae634c056b500a568b2d89b7f8e225404a2c0c62 (diff) | |
WIP user-specified custom typesuser-types
The big roadblock encountered is that accumulation wants addition of
monoids to be elementwise float addition; this fundamentally clashes
with the concept of a user type with a custom zero and plus.
Diffstat (limited to 'src/CHAD/APIv1.hs')
| -rw-r--r-- | src/CHAD/APIv1.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CHAD/APIv1.hs b/src/CHAD/APIv1.hs index 73d1580..ef9b685 100644 --- a/src/CHAD/APIv1.hs +++ b/src/CHAD/APIv1.hs @@ -117,6 +117,7 @@ jvp term STI64 -> EVar ext (STScal STI64) (IS IZ) STBool -> EVar ext (STScal STBool) (IS IZ) ezipDN STAccum{} = error "jvp: Accumulators not supported in source program" + ezipDN STUser{} = error "User types not yet supported in forward AD" eunzipDN :: forall env t'. STy t' -> Ex (DN t' : env) (TPair t' (Tan t')) eunzipDN STNil = EPair ext (ENil ext) (ENil ext) @@ -153,6 +154,7 @@ jvp term STI64 -> EPair ext (EVar ext (STScal STI64) IZ) (ENil ext) STBool -> EPair ext (EVar ext (STScal STBool) IZ) (ENil ext) eunzipDN STAccum{} = error "jvp: Accumulators not supported in source program" + eunzipDN STUser{} = error "User types not yet supported in forward AD" -- | Interpret an expression in a given environment. interpret :: KnownEnv env => SList Value env -> Ex env t -> Rep t |
