mkLocation :: Real a => a -> Location
mkLocation l
  | l < 0 || l >= 1 = error "mkLocation: location must be in [0..1)"
  | otherwise = Location $ toRational l
mkLocation :: Real a => a -> Location
mkLocation l
  | l < 0 || l >= 1 = error "mkLocation: location must be in [0..1)"
  | otherwise = Location $ toRational l
mkLocation l
  | l < 0 || l >= 1 = error "mkLocation: location must be in [0..1)"
  | otherwise = Location $ toRational l