3 ms·
maybe a type Test (c :: Constraint) = c => () is in order here ;) testTheObvious :: Test ((2 + 2) ~ 5) testTheObvious = ()
by whateveracct 5y ago
maybe a
type Test (c :: Constraint) = c => ()
is in order here ;)
testTheObvious :: Test ((2 + 2) ~ 5)
testTheObvious = ()
- tome 5y agoThat compiles though. You need to CPS the constraint as in my example above. This does the job: type Test (c :: Constraint) = forall a. (c => a) -> a testTheObvious :: Test ((2 + 2) ~ 5) testTheObvious = id