Created
February 4, 2017 15:27
-
-
Save rjmholt/96d9e8fb8ede60b75c1b9a09e1955037 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 | |
MultiParamTypeClasses, | |
FunctionalDependencies, | |
FlexibleInstances, | |
TypeFamilies #-} | |
class Mul' a b where | |
type MulT a b | |
mul' :: a -> b -> MulT a b | |
instance Mul' a b => Mul' a [b] where | |
type MulT a [b] = [MulT a b] | |
mul' a = map (mul' a) | |
g b x y = if b then mul' x [y] else y | |
main :: IO () | |
main = return () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment