blob: 6df19b7b62151e921690ddc5c9e791de5367dbd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{-# OPTIONS_GHC -dcore-lint #-}
{-# OPTIONS_GHC -fplugin RewritePlugin #-}
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE DataKinds, ScopedTypeVariables, TypeFamilies #-}
module TcPlugin_Rewrite where
import Data.Kind
( Type )
import Definitions
( Add, Nat(..) )
foo :: forall (proxy :: Nat -> Type) (n :: Nat)
. ( Add Zero n ~ n )
=> proxy n -> ()
foo _ = ()
bar :: forall (proxy :: Nat -> Type) (n :: Nat)
. proxy n -> ()
bar n = foo n
|