From c3720be53244cd1e700255a68f33d22a97714292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20B=C3=A4renz?= Date: Thu, 29 Aug 2024 10:38:13 +0200 Subject: [PATCH] WIP inspection test to ensure correct optimization --- rhine/inspection/Main.hs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 rhine/inspection/Main.hs diff --git a/rhine/inspection/Main.hs b/rhine/inspection/Main.hs new file mode 100644 index 00000000..755167da --- /dev/null +++ b/rhine/inspection/Main.hs @@ -0,0 +1,34 @@ +{-# LANGUAGE TemplateHaskell #-} + +-- base +import Data.Functor.Identity + +-- inspection-testing +import Test.Inspection + +-- automaton +import Data.Stream +import Data.Automaton + +-- rhine +import FRP.Rhine + +-- two :: (Applicative m) => StreamT m Int +-- two = pure 2 + +twoApplicative :: (Applicative m) => StreamT m Int +twoApplicative = (*) <$> pure 1 <*> pure 2 + +id1 :: ClSF Identity cl Int Int +id1 = clId + +idid :: ClSF Identity cl Int Int +idid = clId >>> clId + +-- inspect $ 'two === 'twoApplicative +-- inspect $ 'idid === 'id1 +inspect $ 'idid `hasNoType` 'JointState +-- inspect $ 'two `hasNoType` 'JointState +-- inspect $ 'twoApplicative `hasNoType` 'JointState -- Report upstream bug, right now this passes + +main = return ()