Created
October 29, 2016 12:26
-
-
Save owickstrom/0c0942ae275e7204f2a44292db486f44 to your computer and use it in GitHub Desktop.
PureScript type synonym problem with effect kind
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
Error: .../src/TypeSynonymsProblem.purs:14:1: | |
Could not match kind | |
* | |
with kind | |
# ! | |
while checking the kind of OnlyA Foo | |
in type synonym FooA |
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like the last four types to have kind
# ! -> * -> * -> *
, i.e. take some row of effects, and two types, and return a type.