shithub: MicroHs

ref: b4a7a0d4c04ad0fb96d0b279d35da2658d58a0e1
dir: /lib/Data/Constraint.hs/

View raw version
-- Copyright 2023 Lennart Augustsson
-- See LICENSE file for full license.
module Data.Constraint(module Data.Constraint) where
import Prelude()              -- do not import Prelude
import Primitives  -- for (->)
import Text.Show

-- A very, very minimal version of the constraints package

type Dict :: Constraint -> Type
data Dict c = c => Dict

instance forall c . Show (Dict c) where
  showsPrec _ Dict = showString "Dict"

withDict :: forall c r . Dict c -> (c => r) -> r
withDict Dict r = r