Skip to content

Instantly share code, notes, and snippets.

@tel
Created October 19, 2014 21:34
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 tel/a9ae4d0c380538832ec1 to your computer and use it in GitHub Desktop.
Save tel/a9ae4d0c380538832ec1 to your computer and use it in GitHub Desktop.
Data constructor ‘SfSwitch’ cannot be GADT-like in its *kind* arguments
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE GADTs #-}
data Sv u where
E :: u -> Sv u
S :: u -> Sv u
data Sf (coupled :: Bool)
(f :: u -> *)
(a :: [Sv u])
(b :: [Sv u]) :: * where
SfSwitch
:: Sf cp f a (E e ': b) ->
(e -> Sf cp f a b) ->
Sf cp f a b
-- FailArz.hs:15:3: Data constructor ‘SfSwitch’ cannot be GADT-like in its *kind* arguments
-- SfSwitch :: forall (cp :: Bool)
-- (f :: * -> *)
-- (a :: [Sv *])
-- (b :: [Sv *])
-- e.
-- Sf cp f a ('E e : b) -> (e -> Sf cp f a b) -> Sf cp f a b
-- In the definition of data constructor ‘SfSwitch’
-- In the data declaration for ‘Sf’
-- Compilation failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment