Skip to content

Commit

Permalink
add Enum instance for Angle
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyrosenbluth committed Sep 20, 2014
1 parent dde9d02 commit 63e92b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Diagrams/Angle.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Angle
Expand Down Expand Up @@ -48,7 +49,7 @@ import Linear.Vector
-- | Angles can be expressed in a variety of units. Internally,
-- they are represented in radians.
newtype Angle n = Radians n
deriving (Read, Show, Eq, Ord, Functor)
deriving (Read, Show, Eq, Ord, Enum, Functor)

type instance N (Angle n) = n

Expand Down

1 comment on commit 63e92b1

@jeffreyrosenbluth
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually use this in the gallery

Please sign in to comment.