Example Haskell File

An example Haskell file. This defines a module which can be imported by other modules in project.

{-# LANGUAGE GADTs #-} 

module Chess where 



data Piece where 
    Bishop :: Piece
    Rook   :: Piece

isBishop :: Piece -> Bool
isBishop Bishop = True
isBishop _ = False

Comments