I'm getting an error that Constraint
is not in scope, when I try to write a simple example,
{-# LANGUAGE UndecidableInstances,
MultiParamTypeClasses,
KindSignatures,
Rank2Types,
ConstraintKinds,
FlexibleInstances,
OverlappingInstances,
TypeFamilies #-}
type family A a :: Constraint
The error is,
> ghci test.hs
[1 of 1] Compiling Main ( test.hs, interpreted )
test.hs:10:20: Not in scope: type constructor or class `Constraint'
Failed, modules loaded: none.
Constraint synonyms seem to work as expected,
type ShowOrd a = (Ord a, Show a)
Thanks in advance.