-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathLib2.hs
More file actions
27 lines (21 loc) · 768 Bytes
/
Copy pathLib2.hs
File metadata and controls
27 lines (21 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
module Lib2
( parseStatement,
executeStatement,
ParsedStatement
)
where
import DataFrame (DataFrame)
import InMemoryTables (TableName)
type ErrorMessage = String
type Database = [(TableName, DataFrame)]
-- Keep the type, modify constructors
data ParsedStatement = ParsedStatement
-- Parses user input into an entity representing a parsed
-- statement
parseStatement :: String -> Either ErrorMessage ParsedStatement
parseStatement _ = Left "Not implemented: parseStatement"
-- Executes a parsed statemet. Produces a DataFrame. Uses
-- InMemoryTables.databases a source of data.
executeStatement :: ParsedStatement -> Either ErrorMessage DataFrame
executeStatement _ = Left "Not implemented: executeStatement"