Skip to content

Commit c28f209

Browse files
committed
Clean up after moving inference to use safer names
1 parent d91cc4d commit c28f209

File tree

9 files changed

+8
-2473
lines changed

9 files changed

+8
-2473
lines changed

.github/workflows/haskell-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, safe-names-dev ]
88

99
jobs:
1010
build:

dex.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ library dex-resources
4747
default-extensions: CPP
4848

4949
library
50-
exposed-modules: Env, Syntax, Type, Inference,
51-
Parser, Util, Imp, Imp.Builder, Imp.Optimize,
50+
exposed-modules: Env, Syntax, Type,
51+
Util, Imp, Imp.Builder, Imp.Optimize,
5252
PPrint, Algebra, Parallelize, Optimize, Serialize
5353
Builder, Cat,
5454
Simplify, TopLevel,

src/dex.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import PPrint
2525
import Serialize
2626
import Resources
2727
import TopLevel
28-
import Parser hiding (Parser)
2928
import Env (envNames)
3029
import Err
3130
import Export
@@ -114,7 +113,7 @@ dexCompletions (line, _) = do
114113
let (word, rest) = break (== ' ') line
115114
let startoflineKeywords = ["%bench \"", ":p", ":t", ":html", ":export"]
116115
let candidates = (if null rest then startoflineKeywords else []) ++
117-
keyWordStrs ++ varNames
116+
S.keyWordStrs ++ varNames
118117
let completions = map simpleCompletion $ filter (reverse word `isPrefixOf`) candidates
119118
return (rest, completions)
120119

src/lib/Autodiff.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ linearizeOp op = case op of
185185
ThrowException _ -> notImplemented
186186
SumToVariant _ -> notImplemented
187187
OutputStreamPtr -> emitDiscrete
188+
SynthesizeDict _ _ -> error "Unexpected SynthesizeDict op"
188189
where
189190
emitDiscrete = if isTrivialForAD (Op op)
190191
then LinA $ withZeroTangent <$> emitOp op
@@ -635,6 +636,7 @@ transposeOp op ct = case op of
635636
ToEnum _ _ -> notLinear
636637
ThrowException _ -> notLinear
637638
OutputStreamPtr -> notLinear
639+
SynthesizeDict _ _ -> notLinear
638640
where
639641
-- Both nonlinear operations and operations on discrete types, where linearity doesn't make sense
640642
notLinear = error $ "Can't transpose a non-linear operation: " ++ pprint op

0 commit comments

Comments
 (0)