Commit 2f453414 authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot

Add a test for Trac #13951

It no longer gives a warning.
parent 60b03ade
Pipeline #3385 passed with stages
in 277 minutes and 39 seconds
{-# LANGUAGE PolyKinds, GADTs, Rank2Types, ScopedTypeVariables, Trustworthy #-}
module Control.Monad.Skeleton.Internal where
data Cat k a b where
Empty :: Cat k a a
Leaf :: k a b -> Cat k a b
Tree :: Cat k a b -> Cat k b c -> Cat k a c
viewL :: forall k a b r. Cat k a b
-> ((a ~ b) => r)
-> (forall x. k a x -> Cat k x b -> r)
-> r
viewL Empty e _ = e
viewL (Leaf k) _ r = k `r` Empty
viewL (Tree a b) e r = go a b where
go :: Cat k a x -> Cat k x b -> r
go Empty t = viewL t e r
go (Leaf k) t = r k t
go (Tree c d) t = go c (Tree d t)
......@@ -669,3 +669,4 @@ test('T16188', normal, compile, [''])
test('T16204a', normal, compile, [''])
test('T16204b', normal, compile, [''])
test('T16225', normal, compile, [''])
test('T13951', normal, compile, [''])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment