File: Simple.hs

package info (click to toggle)
haskell-inspection-testing 0.5.0.3-1
  • links: PTS
  • area: main
  • in suites: forky, trixie
  • size: 208 kB
  • sloc: haskell: 2,003; makefile: 6
file content (16 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE TemplateHaskell #-}
module Simple (main) where

import Test.Inspection
import Data.Maybe

lhs, rhs :: (a -> b) -> Maybe a -> Bool
lhs f x = isNothing (fmap f x)

rhs f Nothing = True
rhs f (Just _) = False

inspect $ 'lhs === 'rhs

main :: IO ()
main = return ()