--- The unit type.
module Stdlib.Data.Unit;

import Stdlib.Data.Unit.Base open public;
import Stdlib.Data.Bool.Base open;
import Stdlib.Data.String.Base open;

import Stdlib.Trait.Eq open;
import Stdlib.Trait.Ord open;
import Stdlib.Trait.Show open;
import Stdlib.Trait.Foldable open;

deriving instance
eqUnitI : Eq Unit;

deriving instance
ordUnitI : Ord Unit;

instance
showUnitI : Show Unit :=
  mkShow@{
    show (_ : Unit) : String := "unit";
  };

{-# specialize: true, inline: case #-}
instance
foldableUnitI : Foldable Unit Unit :=
  mkFoldable@{
    {-# inline: true #-}
    rfor
      {Acc : Type}
      (fun : Acc -> Unit -> Acc)
      (initialValue : Acc)
      (_ : Unit)
      : Acc := fun initialValue unit;
    {-# inline: true #-}
    for
      {Acc : Type}
      (fun : Acc -> Unit -> Acc)
      (initialValue : Acc)
      (_ : Unit)
      : Acc := fun initialValue unit;
  };