From d3c559655599970d7e438701f6d780e49491c9d5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 4 Mar 2019 19:55:49 -0500 Subject: [PATCH] src/RealFunction.hs: ignore orphan instance warnings. I'm pretty sure I don't want to make RealFunction a newtype, although I haven't tested the performance impact. But I definitely don't want to see these warnings. Use a pragma thingy to ignore them. --- src/RealFunction.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/RealFunction.hs b/src/RealFunction.hs index 307a0f0..37babf6 100644 --- a/src/RealFunction.hs +++ b/src/RealFunction.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -Wno-orphans #-} {-# LANGUAGE FlexibleInstances #-} module RealFunction ( @@ -6,7 +7,9 @@ module RealFunction ( fexp ) where - +-- Presumably this is faster without a newtype wrapper, and that's why +-- we're about to define a bunch of orphan instances below. Note the +-- GHC pragma thingy at the top of this file to ignore those warnings. type RealFunction a = (a -> Double) -- 2.43.2