blob: 250e587a16932c96030efed04ef6e4d4de02c1af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE RecordWildCards, MonadComprehensions, TransformListComp, NamedFieldPuns #-}
module T3901 where
data Rec = Rec {a :: Int} deriving (Show)
recs1 = [a | Rec {a=a} <- [Rec 1], then group by a]
recs2 = [a | Rec {a} <- [Rec 1], then group by a]
recs3 = [a | Rec {..} <- [Rec 1], then group by a]
recs4 :: [[Int]]
recs4 = [a | Rec {..} <- [Rec 1], then group by a]
|