3 ms·
If I understand correctly, and I might be wrong, `Typeable` and `Data.Dynamic` require dedicated support from GHC, and couldn't possibly be implemented entirely
by catnaroek 11y ago
If I understand correctly, and I might be wrong, `Typeable` and `Data.Dynamic` require dedicated support from GHC, and couldn't possibly be implemented entirely as user libraries. This makes them core language features in my book. So the language specified in the Haskell Report isn't dynamically typed, but the GHC Haskell dialect is dynamically typed.
- dllthomas 11y agoAh, yes, report vs ghc is sometimes a very important distinction. Your assessment sounds correct.
- tome 11y agoI believe the situation is that Dynamic only requires Typeable, and Typeable only requires unsafeCoerce plus the trust that bad instances are never created.
- catnaroek 11y ago> unsafeCoerce GHC-specific implementation detail. > the trust that bad instances are never created The only way I can trust it is if the compiler enforces it, at which point it isn't “just a library feature”.