Skip to content

Linear lint error in linear-generics

The following module, taken from linear-generics, fails Core Lint because of a linearity error in the desugarer output:

{-# LANGUAGE LinearTypes, GADTSyntax #-}

module LinearL where

import GHC.Types (Multiplicity (..))
import Data.Kind (Type)

data T :: Multiplicity -> Type where
  MkT :: () %m-> T m

unMkT :: T m %n-> ()
unMkT (MkT x) = x

Fix incoming.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information