mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-26 10:35:04 +03:00
10 lines
366 B
Haskell
10 lines
366 B
Haskell
module Util.Prisma where
|
|
|
|
import Data.Either (fromRight)
|
|
import qualified Data.Text as T
|
|
import qualified Wasp.Psl.Ast.Schema as Psl.Schema
|
|
import qualified Wasp.Psl.Parser.Schema as Psl.Schema.Parser
|
|
|
|
getPrismaSchema :: T.Text -> Psl.Schema.Schema
|
|
getPrismaSchema = fromRight (error "Failed to parse Prisma schema") . Psl.Schema.Parser.parsePrismaSchema . T.unpack
|