Skip to content

Commit

Permalink
Fix lsp serialization bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sodic committed Sep 23, 2024
1 parent fa7bed7 commit 77f92c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions waspc/src/Wasp/AppSpec/ExtImport.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}

Expand All @@ -9,6 +10,7 @@ module Wasp.AppSpec.ExtImport
where

import Data.Aeson (FromJSON (parseJSON), withObject, (.:))
import Data.Aeson.Types (ToJSON)
import Data.Data (Data)
import GHC.Generics (Generic)
import StrongPath (File', Path, Posix, Rel, parseRelFileP)
Expand All @@ -20,7 +22,7 @@ data ExtImport = ExtImport
-- | Path from which we are importing.
path :: ExtImportPath
}
deriving (Show, Eq, Data, Generic)
deriving (Show, Eq, Data)

instance FromJSON ExtImport where
parseJSON = withObject "ExtImport" $ \o -> do
Expand Down Expand Up @@ -49,7 +51,7 @@ data ExtImportName
ExtImportModule Identifier
| -- | Represents external imports like @import { Identifier } from "file.js"@
ExtImportField Identifier
deriving (Show, Eq, Data, Generic)
deriving (Show, Eq, Data, Generic, FromJSON, ToJSON)

importIdentifier :: ExtImport -> Identifier
importIdentifier (ExtImport importName _) = case importName of
Expand Down

0 comments on commit 77f92c3

Please sign in to comment.