Skip to content

Instantly share code, notes, and snippets.

@louispan
Last active October 12, 2017 20:08
Show Gist options
  • Save louispan/43703f82965396ae0c4ccf0bf867202d to your computer and use it in GitHub Desktop.
Save louispan/43703f82965396ae0c4ccf0bf867202d to your computer and use it in GitHub Desktop.
{-# 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