Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@owickstrom
Created October 29, 2016 12:26
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 owickstrom/0c0942ae275e7204f2a44292db486f44 to your computer and use it in GitHub Desktop.
Save owickstrom/0c0942ae275e7204f2a44292db486f44 to your computer and use it in GitHub Desktop.
PureScript type synonym problem with effect kind
Error: .../src/TypeSynonymsProblem.purs:14:1:
Could not match kind
*
with kind
# !
while checking the kind of OnlyA Foo
in type synonym FooA
module TypeSynonymsProblem where
import Prelude
import Control.Monad.Eff (Eff)
import Data.Either (Either)
import Data.Tuple (Tuple(Tuple))
type Foo e a a' b b' = Eff e (Tuple a b) -> Eff e (Tuple a' b')
type Bar e a a' b b' = Eff e (Either a b) -> Eff e (Either a' b')
type OnlyA f e a a' = forall b. f e a a' b b -- no b' transformation
type OnlyB f e b b' = forall a. f e a a b b -- no a' transformation
type FooA = OnlyA Foo
type FooB = OnlyB Foo
type BarA = OnlyA Bar
type BarB = OnlyB Bar
@owickstrom
Copy link
Author

I'd like the last four types to have kind # ! -> * -> * -> *, i.e. take some row of effects, and two types, and return a type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment