Skip to content

Commit c6c0e00

Browse files
committed
silence the plugin
1 parent 1b20d1f commit c6c0e00

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

src/Linear/Logic/Functor.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{-# language UndecidableSuperClasses #-}
3131
{-# language ImportQualifiedPost #-}
3232
{-# language Trustworthy #-}
33-
{-# options_ghc -fplugin Linear.Logic.Plugin #-} -- TODO use this to kill Prep constraints
33+
-- {-# options_ghc -fplugin Linear.Logic.Plugin #-} -- TODO use this to kill Prep constraints
3434

3535
-- {-# options_ghc -Wno-unused-imports #-}
3636

@@ -142,8 +142,10 @@ instance Category (FUN 'One) where
142142
-- | Here we have the ability to provide more refutations, because we can walk
143143
-- all the way back to my arrows. This is internal to my logic.
144144
class (forall a b. (Prop' a, Prop' b) => Prop' (p a b)) => NiceCategory p where
145+
-- o :: p b c ⊸ p a b ⊸ p a c
145146
o :: (Lol l, Lol l', Prop a, Prop b, Prop c) => l (p b c) (l' (p a b) (p a c))
146147

148+
147149
instance Category () where
148150
id = Lol \case L -> \x -> x; R -> \x -> x
149151
f . g = Lol \case

src/Linear/Logic/Internal.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Prep a => Prop' a where
6363
-- @
6464
(!=) :: a %1 -> Not a %1 -> r
6565

66-
-- avoids UndecidableSuperClasses:w
66+
-- avoids UndecidableSuperClasses
6767
type Prop a = (Prop' a, Prop' (Not a))
6868

6969
-- | The unit for multiplicative conjunction, \(\texttt{()}\)
@@ -379,6 +379,14 @@ instance Prep a => Prop' (WhyNot a) where
379379
f != Ur a = because f a
380380
{-# inline (!=) #-}
381381

382+
-- |
383+
-- @
384+
-- data DSum f g where
385+
-- (:=>) :: !(f a) -> g a -> DSum f g
386+
387+
-- DSum (Y a b) Identity ~ Either a b
388+
-- DWith (Y a b) Identity ~ a & b
389+
-- @
382390
newtype DWith f g = DWith (forall x. f x %1 -> g x)
383391

384392
dwith :: (forall x. f x %1 -> g x) %1 -> DWith f g

src/Linear/Logic/Plugin.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ solveLogic () givens _deriveds wanteds = do
102102
, Just (n2, [x]) <- splitTyConApp_maybe nx, hasKey n2 notKey
103103
-> do
104104
wantedEvidence <- newWanted (ctLoc ct) $ mkTyConApp eqPrimTyCon [liftedTypeKind,liftedTypeKind,x,y]
105-
io $ putStrLn $ "not-not: " ++ pp nnx ++ " ~ " ++ pp y ++ " if " ++ pp x ++ " ~ " ++ pp y
105+
-- io $ putStrLn $ "not-not: " ++ pp nnx ++ " ~ " ++ pp y ++ " if " ++ pp x ++ " ~ " ++ pp y
106106
pure ([(evByFiat "not-not" nnx y, ct)],[mkNonCanonical wantedEvidence])
107107
EqPred NomEq y nnx
108108
| Just (n1, [nx]) <- splitTyConApp_maybe nnx, hasKey n1 notKey
109109
, Just (n2, [x]) <- splitTyConApp_maybe nx, hasKey n2 notKey
110110
-> do
111111
wantedEvidence <- newWanted (ctLoc ct) $ mkTyConApp eqPrimTyCon [liftedTypeKind,liftedTypeKind,x,y]
112-
io $ putStrLn $ "not-not: " ++ pp y ++ " ~ " ++ pp nnx ++ " if " ++ pp x ++ " ~ " ++ pp y
112+
-- io $ putStrLn $ "not-not: " ++ pp y ++ " ~ " ++ pp nnx ++ " if " ++ pp x ++ " ~ " ++ pp y
113113
pure ([(evByFiat "not-not" nnx y, ct)],[mkNonCanonical wantedEvidence])
114114
EqPred NomEq nx y
115115
| Just (n1, [x]) <- splitTyConApp_maybe nx, hasKey n1 notKey
@@ -131,7 +131,7 @@ solveLogic () givens _deriveds wanteds = do
131131
(ctLoc ct)
132132
(mkTyConApp eqPrimTyCon [liftedTypeKind,liftedTypeKind,nnx,x])
133133
(runEvExpr $ evByFiat "not-not-ish" nnx x)
134-
io $ putStrLn $ "not-notish: " ++ pp nnx ++ " ~# " ++ pp x
134+
-- io $ putStrLn $ "not-notish: " ++ pp nnx ++ " ~# " ++ pp x
135135
pure ([],[mkNonCanonical givenEvidence])
136136
EqPred n x y -> do
137137
-- io $ putStrLn $ "I think " ++ pp n ++ " " ++ pp x ++ pp y ++ " is none of my business"
@@ -141,7 +141,7 @@ solveLogic () givens _deriveds wanteds = do
141141
, Just (n1, [nx]) <- splitTyConApp_maybe nnx, hasKey n1 notKey
142142
, Just (n2, [x]) <- splitTyConApp_maybe nx, hasKey n2 notKey
143143
-> do
144-
io $ putStrLn $ "Ooh ooh ooh: " ++ show (pp c, pp x, pp y)
144+
-- io $ putStrLn $ "Ooh ooh ooh: " ++ show (pp c, pp x, pp y)
145145
wantedEvidence <- newWanted (ctLoc ct) $ mkTyConApp eqPrimTyCon [liftedTypeKind,liftedTypeKind,x,y]
146146

147147

0 commit comments

Comments
 (0)