The lambdas must flow. If I break, you can: 1. Restart: M-x haskell-process-restart 2. Configure logging: C-h v haskell-process-log (useful for debugging) 3. General config: M-x customize-mode 4. Hide these tips: C-h v haskell-process-show-debug-tips Changed directory: /home/hugo/Academic/Teaching/2022.2/TCPF/Aulas/ λ> x = Par 1 2 λ> y = Par 1 3 λ> x Par 1 2 λ> y Par 1 3 λ> x == y False λ> pi_a x 1 λ> :i (,) type (,) :: * -> * -> * data (,) a b = (,) a b -- Defined in ‘GHC.Tuple’ instance Monoid a => Applicative ((,) a) -- Defined in ‘GHC.Base’ instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’ instance Functor ((,) a) -- Defined in ‘GHC.Base’ instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’ instance (Monoid a, Monoid b) => Monoid (a, b) -- Defined in ‘GHC.Base’ instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’ instance (Semigroup a, Semigroup b) => Semigroup (a, b) -- Defined in ‘GHC.Base’ instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’ instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’ instance Foldable ((,) a) -- Defined in ‘Data.Foldable’ instance Traversable ((,) a) -- Defined in ‘Data.Traversable’ instance (Bounded a, Bounded b) => Bounded (a, b) -- Defined in ‘GHC.Enum’ λ> :t fst fst :: (a, b) -> a λ> :t snd snd :: (a, b) -> b λ> (1,3) < (2,2) True λ> x' = Par' {pi'_a = 1, pi'_b = 2} λ> x' Par' {pi'_a = 1, pi'_b = 2} λ> :t Par' Par' :: a -> b -> Prod' a b λ> :t pi'_a pi'_a :: Prod' a b -> a λ> :t pi'_b pi'_b :: Prod' a b -> b λ> x :37:1: error: Variable not in scope: x λ> x' Par' {pi'_a = 1, pi'_b = 2} λ> pi'_a x' 1 λ>