-
-
Save stevenfontanella/cd6326cb29861d4478a9fb6e3f79a8d8 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 #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE InstanceSigs #-} | |
class Flop a b c where | |
flop :: (a -> b -> c) -> b -> a -> c | |
instance Flop a b c where | |
flop = flip | |
instance Flop a (b -> c) d where | |
-- I want this but it's not the same | |
-- flop :: (a -> b -> c -> d) -> b -> c -> a -> d | |
flop :: (a -> (b -> c) -> d) -> (b -> c) -> a -> d | |
flop = undefined | |
main = do | |
pure () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment