File: GADTRecords.hs

package info (click to toggle)
haskell-ghc-exactprint 1.7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,044 kB
  • sloc: haskell: 32,076; makefile: 7
file content (20 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE GADTs #-}
module GADTRecords (H1(..)) where

-- | h1
data H1 a b where
  C1 :: H1 a b
  C2 :: Ord a => [a] -> H1 a a
  C3 :: { field :: Int -- ^ hello docs
        } -> H1 Int Int
  C4 :: { field2 :: a -- ^ hello2 docs
        } -> H1 Int a

  FwdDataflowAnalysis :: (Eq f, Monad m) => { analysisTop :: f
                                            , analysisMeet :: f -> f -> f
                                            , analysisTransfer :: f -> Instruction -> m f
                                            , analysisFwdEdgeTransfer :: Maybe (f -> Instruction -> m [(BasicBlock, f)])
                                            } -> DataflowAnalysis m f

data GADT :: * -> * where
      Ctor :: { gadtField :: A } -> GADT A