-{-# OPTIONS_GHC -XModalTypes -fflatten -funsafe-skolemize -dcore-lint #-}
+{-# OPTIONS_GHC -XModalTypes -fflatten -funsafe-skolemize -dcore-lint -XScopedTypeVariables #-}
module Demo (demo) where
--demo con mer = <[ ~~mer ~~(con (2::Int)) ~~(con (12::Int)) ]>
demo const mult =
- <[ let four = ~~mult four ~~(const 4)
+ <[ \(y::Int) ->
+ let four = ~~mult four ~~(const 4)
-- twelve = {- {- ~~mult four -} ~~(const 12) -} four
in four
]>
forall a c .
(Int -> <[a]>@c) ->
<[a -> a -> a]>@c ->
- <[a]>@c
+ <[Int -> a]>@c
{-
demo const mult =
import GHC.HetMet.GArrow
import Demo
-{-
-demo' ::
- (Int -> PGArrow g (GArrowUnit g) (GArrowTensor g (GArrowUnit g) Int) ) ->
- ( PGArrow g (GArrowTensor g (GArrowTensor g Int Int) (GArrowUnit g)) Int) ->
- (PGArrow g (GArrowUnit g) (GArrowTensor g (GArrowUnit g) Int) )
-demo' = demo
--}
-
-main = tikz $ \const merge -> demo const merge
+main = tikz demo
}
-tikz ::
+tikz :: forall c .
(forall g .
(Int -> PGArrow g (GArrowUnit g) Int) ->
- (forall b . PGArrow g (GArrowTensor g b b) b) ->
- PGArrow g b c)
+ (PGArrow g (GArrowTensor g c c) c) ->
+ PGArrow g c c)
-> IO ()
tikz x = tikz' $ optimize $ unG (x (\c -> PGArrowD { unG = GAS_const c }) (PGArrowD { unG = GAS_merge }))