Last active
October 12, 2017 20:08
-
-
Save louispan/43703f82965396ae0c4ccf0bf867202d 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 UndecidableSuperClasses #-} | |
-- https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html?highlight=undecidablesuperclasses#ghc-flag--XUndecidableSuperClasses | |
-- from https://hackage.haskell.org/package/constraint-manip-0.1.0.0/docs/src/Control.ConstraintManip.html | |
-- To emulate a type function, but partially appliable | |
type MyC a b = (a ~ b) | |
-- Do | |
class (a ~ b) => MyC a b | |
instance (a ~ b) => MyC a b | |
-- Then the type of | |
MyC Int :: Type -> Constraint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment