Skip to content

Commit

Permalink
add tests for indentation of type family
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed May 15, 2017
1 parent 8b4d645 commit ddd1f4b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/datatype/type_family.in.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class X k => G k where
data GM k :: * -> *
a :: GM k v

instance X Int where
data GM Int v = GMI (Map.Map Int v)
a = GMI Map.empty

instance X Char where
data GM Char v = GMI (Map.Map Char v)
a = GMI Map.empty

class Y y where
type E e
z :: e

instance Y Int where
type E = Int
z = 0
19 changes: 19 additions & 0 deletions test/datatype/type_family.out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class X k => G k where
data GM k :: * -> *
a :: GM k v

instance X Int where
data GM Int v = GMI (Map.Map Int v)
a = GMI Map.empty

instance X Char where
data GM Char v = GMI (Map.Map Char v)
a = GMI Map.empty

class Y y where
type E e
z :: e

instance Y Int where
type E = Int
z = 0

0 comments on commit ddd1f4b

Please sign in to comment.