Skip to content

Commit

Permalink
Haskell98 plus typesigs for GHC-7.0.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbm committed Apr 23, 2011
1 parent 006de5f commit af1b7f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PosVel.lhs
Expand Up @@ -2,6 +2,7 @@
The convention in this module is that a @C@ denotes cartesian coordinates and an @S@ denotes spherical coordinates.

> {-# OPTIONS_GHC -fglasgow-exts #-}
> {-# LANGUAGE Haskell98 #-}

> module PosVel where

Expand Down Expand Up @@ -55,14 +56,20 @@ Spherical position.

> zenith :: SPos a -> Zenith a
> zenith = vElemAt pos1
> colatitude :: SPos a -> Zenith a
> colatitude = zenith
> polarAngle :: SPos a -> Zenith a
> polarAngle = zenith
> latitude :: Floating a => SPos a -> Angle a
> latitude s = pi / _2 - colatitude s
> declination :: Floating a => SPos a -> Angle a
> declination = latitude

> rightAscension :: SPos a -> RightAscension a
> rightAscension = vElemAt pos2
> longitude :: SPos a -> RightAscension a
> longitude = rightAscension
> hourAngle :: SPos a -> RightAscension a
> hourAngle = rightAscension


Expand Down

0 comments on commit af1b7f6

Please sign in to comment.