Skip to content

Commit 8874857

Browse files
committed
wip
1 parent 0e138e9 commit 8874857

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

src/Language/PureScript/Make/IdeCache.hs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,28 @@ sqliteInit outputDir = liftIO $ do
149149
createParentDirectory db
150150
conn <- SQLite.open db
151151
withRetry $ SQLite.execute_ conn "pragma journal_mode=wal"
152-
withRetry $ SQLite.execute_ conn "create table if not exists modules (module_name text primary key, comment text, extern blob, dec text, unique (module_name) on conflict replace)"
152+
withRetry $ SQLite.execute_ conn $ SQLite.Query $ Text.pack $ unlines
153+
[ "create table if not exists modules ("
154+
, " module_name text primary key,"
155+
, " comment text,"
156+
, " extern blob,"
157+
, " dec text,"
158+
, " unique (module_name) on conflict replace"
159+
, ")"
160+
]
153161
withRetry $ SQLite.execute_ conn "create table if not exists dependencies (id integer primary key, module_name text not null, dependency text not null, unique (module_name, dependency) on conflict ignore)"
154162

155163
withRetry $ SQLite.execute_ conn $ SQLite.Query $ Text.pack $ unlines
156-
[ "create table if not exists declarations"
157-
, "( module_name text"
158-
, ", name text not null"
159-
, ", namespace text"
160-
, ", rexported_from text"
161-
, ", span text"
162-
, ", declaration_type text"
163-
, ", type text"
164-
, ", docs text"
165-
, ", declaration text not null"
164+
[ "create table if not exists declarations ("
165+
, " module_name text,"
166+
, " name text not null,"
167+
, " namespace text,"
168+
, " rexported_from text,"
169+
, " span text,"
170+
, " declaration_type text,"
171+
, " type text,"
172+
, " docs text,"
173+
, " declaration text not null"
166174
, ")"
167175
]
168176

0 commit comments

Comments
 (0)