1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-13 03:34:12 +03:00
ormolu/data/examples/declaration/instance/data-family-instances-out.hs

32 lines
498 B
Haskell
Raw Normal View History

{-# LANGUAGE GADTSyntax #-}
{-# LANGUAGE TypeFamilies #-}
data instance Foo Int = FooInt Int
data instance Foo [Int]
= IntListFoo
( Int
, Int
)
( Double
, Double
)
newtype instance Foo [Double]
= DoubleListFoo
{ unDoubleListFoo :: Double
}
data instance Bar Double a
= DoubleBar
Double
(Bar a)
data instance Bar Int a where
SameBar
:: Bar Int
Int
CloseBar :: Bar Int Double
OtherBar
:: Bar Int
a