Project Inquiry

Implement Prelude.not

Challenge
{-# LANGUAGE NoImplicitPrelude #-}

module Main where

import           Prelude hiding (not)

main :: IO ()
main = putStrLn $ if test then "SUCCESS" else "FAILURE"

test :: Bool
test = not True == False && not False == True

-- TODO
not :: Bool -> Bool
not = undefined
Solution
{-# LANGUAGE NoImplicitPrelude #-}

module Main where

import           Prelude hiding (not)

main :: IO ()
main = putStrLn $ if test then "SUCCESS" else "FAILURE"

test :: Bool
test = not True == False && not False == True

-- DONE
not :: Bool -> Bool
not True  = False
not False = True