Skip to content

Commit

Permalink
Merge latest trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Nov 18, 2024
2 parents c289e8b + d4ea9a2 commit 4b9e75f
Show file tree
Hide file tree
Showing 22 changed files with 2,725 additions and 2,278 deletions.
8 changes: 8 additions & 0 deletions lib/unison-prelude/src/Unison/Debug.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ data DebugFlag
| -- | Useful for adding temporary debugging statements during development.
-- Remove uses of Debug.Temp before merging to keep things clean for the next person :)
Temp
| -- | Debugging the interpreter
Interpreter
| -- | Shows Annotations when printing terms
Annotations
| -- | Debug endpoints of the local UI (or Share) server
Expand Down Expand Up @@ -65,6 +67,7 @@ debugFlags = case (unsafePerformIO (lookupEnv "UNISON_DEBUG")) of
"LSP" -> pure LSP
"TIMING" -> pure Timing
"TEMP" -> pure Temp
"INTERPRETER" -> pure Interpreter
"ANNOTATIONS" -> pure Annotations
"SERVER" -> pure Server
"PATTERN_COVERAGE" -> pure PatternCoverage
Expand Down Expand Up @@ -114,6 +117,10 @@ debugTemp :: Bool
debugTemp = Temp `Set.member` debugFlags
{-# NOINLINE debugTemp #-}

debugInterpreter :: Bool
debugInterpreter = Interpreter `Set.member` debugFlags
{-# NOINLINE debugInterpreter #-}

debugAnnotations :: Bool
debugAnnotations = Annotations `Set.member` debugFlags
{-# NOINLINE debugAnnotations #-}
Expand Down Expand Up @@ -187,6 +194,7 @@ shouldDebug = \case
LSP -> debugLSP
Timing -> debugTiming
Temp -> debugTemp
Interpreter -> debugInterpreter
Annotations -> debugAnnotations
Server -> debugServer
PatternCoverage -> debugPatternCoverage
Expand Down
2 changes: 1 addition & 1 deletion parser-typechecker/src/Unison/Codebase/Runtime.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data CompileOpts = COpts
}

defaultCompileOpts :: CompileOpts
defaultCompileOpts = COpts { profile = False }
defaultCompileOpts = COpts {profile = False}

data Runtime v = Runtime
{ terminate :: IO (),
Expand Down
5 changes: 4 additions & 1 deletion parser-typechecker/src/Unison/Util/EnumContainers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Unison.Util.EnumContainers
where

import Data.Bifunctor
import Data.Functor.Classes (Eq1, Ord1)
import Data.IntMap.Strict qualified as IM
import Data.IntSet qualified as IS
import Data.Word (Word16, Word64)
Expand Down Expand Up @@ -60,7 +61,9 @@ newtype EnumMap k a = EM (IM.IntMap a)
)
deriving newtype
( Monoid,
Semigroup
Semigroup,
Eq1,
Ord1
)

newtype EnumSet k = ES IS.IntSet
Expand Down
5 changes: 5 additions & 0 deletions unison-runtime/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ flags:
arraychecks:
manual: true
default: false
stackchecks:
manual: true
default: false

when:
- condition: flag(arraychecks)
cpp-options: -DARRAY_CHECK
- condition: flag(stackchecks)
cpp-options: -DSTACK_CHECK


library:
Expand Down
Loading

0 comments on commit 4b9e75f

Please sign in to comment.