Commit f4d9a748 authored by Camil Staps's avatar Camil Staps 🍃

Merge branch 'toString-void' into 'master'

add toString instance for ()

See merge request !297
parents 41d12990 49d50793
Pipeline #32633 passed with stage
in 1 minute and 55 seconds
......@@ -61,6 +61,7 @@ instance Bifunctor ((,,) x)
instance Bifunctor ((,,,) x y)
instance Bifunctor ((,,,,) x y z)
instance toString ()
instance toString (a, b) | toString a & toString b
instance toString (a, b, c) | toString a & toString b & toString c
instance toString (a, b, c, d) | toString a & toString b & toString c & toString d
......
......@@ -137,6 +137,10 @@ instance Bifunctor ((,,,,) x y z)
where
bifmap f g t = let (x, y, z, a, b) = t in (x, y, z, f a, g b)
instance toString ()
where
toString _ = "()"
instance toString (a, b) | toString a & toString b
where
toString (a, b) = 'Text'.concat ["(", toString a, ", ", toString b, ")"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment