From dbb641b1534f7b3a24d5b6f4479b91f1fd681c54 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 4 Mar 2019 23:32:54 -0500 Subject: [PATCH] src/{Cube,Tetrahedron}.hs: disable incomplete pattern warnings via pragmas. These two modules have incomplete pattern matches by design, for performance reasons. --- src/Cube.hs | 5 +++++ src/Tetrahedron.hs | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/Cube.hs b/src/Cube.hs index 8596b11..552b141 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -1,3 +1,8 @@ +-- The "tetrahedron" function pattern matches on the integers zero +-- through twenty-three, but doesn't handle the "otherwise" case, for +-- performance reasons. +{-# OPTIONS_GHC -Wno-incomplete-patterns #-} + module Cube ( Cube(..), cube_properties, diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index 4bc8658..09b042d 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -1,3 +1,7 @@ +-- The local "coefficient" function defined within the "c" function +-- pattern matches on a bunch of integers, but doesn't handle the +-- "otherwise" case for performance reasons. +{-# OPTIONS_GHC -Wno-incomplete-patterns #-} {-# LANGUAGE BangPatterns #-} module Tetrahedron ( -- 2.43.2