summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck/should_compile/T15713.hs
blob: 96bfb9faac7c0d12de6f16ed46e7f453b4a1c527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE OverloadedStrings, LambdaCase #-}

module T15713 where

import Data.String

data Expr = App Expr Expr | Var String
  deriving (Eq)

instance IsString Expr where
  fromString = Var . fromString

go = \case
  App ( App ( App "refWithFile" identM ) filenameM) exceptionMayM -> Just 2
  App ( App "and" a ) b -> Just 3
  App ( App "or" a ) b -> Just 4
  _ -> Nothing