Skip to content

Commit

Permalink
Use the Show instance from Data.NumInstances for functions
Browse files Browse the repository at this point in the history
rather than defining one locally.

The local definition conflicts in some cases, and prevents compiling.
  • Loading branch information
bergey committed Feb 10, 2013
1 parent eeb5752 commit 2e9b23a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions Graphics/Implicit/Definitions.hs
Expand Up @@ -10,7 +10,8 @@ module Graphics.Implicit.Definitions where
import Data.IORef (IORef, newIORef, readIORef)
import System.IO.Unsafe (unsafePerformIO)
import Data.VectorSpace
import Control.Applicative
import Control.Applicative
import Data.NumInstances

-- Let's make things a bit nicer.
-- Following math notation ℝ, ℝ², ℝ³...
Expand Down Expand Up @@ -158,11 +159,6 @@ type Rectilinear2 = [Box2]
-- | Rectilinear 2D set
type Rectilinear3 = [Box3]

-- | Make ALL the functions Showable!
-- This is very handy when testing functions in interactive mode...
instance Show (a -> b) where
show f = "<function>"

-- | Now for something that makes me a bad person...
-- I promise I'll use it for good, not evil!
-- I don't want to reparse the program arguments
Expand Down
3 changes: 2 additions & 1 deletion implicit.cabal
Expand Up @@ -34,7 +34,8 @@ Library
blaze-markup,
blaze-svg,
storable-endian,
JuicyPixels
JuicyPixels,
NumInstances

ghc-options:
-O2 -optc-O3
Expand Down

0 comments on commit 2e9b23a

Please sign in to comment.