Skip to content

Instantly share code, notes, and snippets.

@stevenfontanella
Last active May 18, 2021 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenfontanella/cd6326cb29861d4478a9fb6e3f79a8d8 to your computer and use it in GitHub Desktop.
Save stevenfontanella/cd6326cb29861d4478a9fb6e3f79a8d8 to your computer and use it in GitHub Desktop.
{-# 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