-
-
Save Peaker/132f63f3df262b973df2 to your computer and use it in GitHub Desktop.
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
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
class Indexable a where | |
instance c ~ Char => Indexable (String, Int, c) where | |
instance Indexable ([(String, a)], String, a) where | |
test1 :: Indexable (a,b,c) => a -> b -> c | |
test1 x y = undefined | |
t1 = test1 "hi" (3 :: Int) | |
main = return () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment