From 7e27a0a7eada373780a9757fd89f70d4d911d69a Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 22 Mar 2024 01:13:34 +0100 Subject: [haskell] refactoring --- haskell/src/SpaceTraders/Model/Waypoint.hs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'haskell/src/SpaceTraders/Model/Waypoint.hs') diff --git a/haskell/src/SpaceTraders/Model/Waypoint.hs b/haskell/src/SpaceTraders/Model/Waypoint.hs index d80dc7a..9f0776c 100644 --- a/haskell/src/SpaceTraders/Model/Waypoint.hs +++ b/haskell/src/SpaceTraders/Model/Waypoint.hs @@ -1,20 +1,19 @@ -{-# LANGUAGE DeriveAnyClass #-} -{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module SpaceTraders.Model.Waypoint ( Waypoint(..) ) where -import Data.Aeson -import qualified Data.Text as T -import GHC.Generics +import Data.Aeson +import qualified Data.Text as T +import GHC.Generics -data Waypoint = Waypoint { orbits :: Maybe T.Text - , symbol :: T.Text +data Waypoint = Waypoint { orbits :: Maybe T.Text + , symbol :: T.Text , waypointType :: T.Text - , x :: Int - , y :: Int + , x :: Int + , y :: Int } deriving (Generic, Show) instance FromJSON Waypoint where parseJSON = withObject "Waypoint" $ \o -> -- cgit v1.2.3