Is there a library-less implementation of DSA available to read? Is there a pedagogical library-less implementation of DSA available to read?  (Not ECDSA.)

Obviously BigInteger and hash functions may be from libraries, but I want to read the implementation of all of the calculations involved in signing a message and verifying a signature, using whatever BigInteger operations are appropriate for the language.

Ideally it will treat keys as numbers, and not interact with DER/PEM file formats in any way.

Java, Python, Javascript, Haskell, or even C would be great.

Any recommendations?
Not great answers but something:

If you just want the mathematical computations, indepedent of implementation, Wikipedia has a good explanation, and the standard is definitive.

Java JCE source is open. The repository is git (which I don't have set up); Oracle(Sun) JDK distribution has src.zip but exclude the JCE part; JRE distribution has no source at all. openjdk-src package for CentOS/RedHat does include JCE, and I'd assume/expect at least some other Unixes but maybe not Windows the same. The JCE facade/provider/engine framework somewhat complicates the code for all providers, including DSA.

Java BouncyCastle (http://www.bouncycastle.org) source is open. Their build recipe is too complicated for me, but can be avoided by downloading the jar(s) and the source and telling your debugger to link them; I use Eclipse and just set the source property for the library. BC includes both a provider implementation, with the same complication as the Oracle one, but also a "lightweight" API, where you just call an implementation directly; org.bouncycastle.crypto.signers.DSASigner is the one you want here. That's what I'd use if I wanted to debug something in Java.

OpenSSL C (http://www.openssl.org) source is open. Beyond a standard C toolchain (compiler, preprocessor if separate, assembler if separate, linker, lib/archive, etc, and debugger) build requires only perl (builtin to nearly all Unix, and easily available for Windows); a separate assembler can be needed for an optimized build, but for pedagogical you don't need optimized. Although linked enough you need to build the whole thing, for execution the code is quite well modularized and you can easily write a small program that just calls the DSA_* and BN_* (bignum) modules to do a few DSA operations. However, C code must explicitly deal with error handling and memory management that is (mostly) implicit in Java, and OpenSSL C code for older modules is not exactly the clearest possible. OpenSSL also makes it easy to add file handling when and only when you want.

Note that the numbers involved in DSA, even using the long-obsolete 512-bit minimum of original FIPS186, will be much too large to deal with or check or recognize manually, so you can step through code and see that it does something that works, but won't actually learn any more about what it does than the formulas in the spec told you to start with.