Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
pp:2026:l11 [2026/05/20 23:04]
ldaniel adaugat kind pe langa info
pp:2026:l11 [2026/05/20 23:32] (current)
ldaniel add link to types lab
Line 42: Line 42:
 By looking at the Applicative:​ By looking at the Applicative:​
 <code haskell> <code haskell>
->:info Applicative+>:kind Applicative
 type Applicative :: (* -> *) -> Constraint type Applicative :: (* -> *) -> Constraint
 +
 +>:info Applicative
 class Functor f => Applicative f where class Functor f => Applicative f where
   pure :: a -> f a   pure :: a -> f a
Line 72: Line 74:
  
 ===== 11.1. Tasks ===== ===== 11.1. Tasks =====
 +[[https://​ocw.cs.pub.ro/​ppcarte/​doku.php?​id=pp:​2024:​l10 | Types in Haskell Lab]]
  
 For the following exercises: Define the data structure and instances for Eq, Show, Functor, Applicative (in 2 ways from scratch and based on Monad) and Monad (in 2 ways from scratch and based on Applicative) for the following: For the following exercises: Define the data structure and instances for Eq, Show, Functor, Applicative (in 2 ways from scratch and based on Monad) and Monad (in 2 ways from scratch and based on Applicative) for the following: