Last active
April 15, 2017 15:37
-
-
Save oleks/e2f7617eb171d462b43ca7ba4db28db0 to your computer and use it in GitHub Desktop.
Using dependent types in regular types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module A | |
import Data.Vect | |
data T = | |
MkT (Vect len Int) | |
eq' : Vect n Int -> Vect m Int -> Bool | |
eq' {n} {m} v w = n == m && (exactLength n v) == (exactLength n w) | |
Eq T where | |
(==) (MkT v) (MkT w) = eq' v w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment