2 ms·
See https://blog.jle.im/entry/practical-dependent-types-in-haskell-2.html https://blog.jle.im/entry/practical-dependent-types-in-haske... where you get this fun
by unhammer 9y ago
See https://blog.jle.im/entry/practical-dependent-types-in-haskell-2.html https://blog.jle.im/entry/practical-dependent-types-in-haske... where you get this function definition: https://github.com/mstksg/inCode/blob/master/code-samples/dependent-haskell/NetworkTyped2.hs#L205-213 https://github.com/mstksg/inCode/blob/master/code-samples/de...
I liked this article: https://ren.zone/articles/safe-money https://ren.zone/articles/safe-money where they get e.g. an ExchangeRate "USD" "JPY" type from input that has a different type from ExchangeRate "EUR" "JPY" (and thus can't be used to convert euros, only US dollars).