SH_Overlap8.hs 452 Bytes
Newer Older
1 2 3 4
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances #-}

-- | Overlapping instances, but with a single parameter type-class and no
5
-- orphans. So `SH_Overlap8` decided to explicitly depend on `SH_Overlap8_A`
6 7 8 9 10 11 12 13 14 15 16 17 18
-- since that's where the type-class `C` with function `f` is defined.
--
-- Question: Safe or Unsafe? Safe
module SH_Overlap8 where

import safe SH_Overlap8_A

instance C [a] where
  f _ = "[a]"

test :: String
test = f ([1,2,3,4] :: [Int])