packages feed

ghc-exactprint-0.5.3.1: tests/examples/ghc80/T3078.hs

{-# LANGUAGE PatternGuards #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}

module T3078 where

data T = A Int | B Int

funny :: T -> Int
funny t = n
    where
      n | A x <- t = x
        | B x <- t = x