Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
justingrubbs committed May 29, 2024
1 parent d8ce891 commit da0487e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Binary file added pubs/TFPIE23/disco-tfpie23-12-26_09-51.xopp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Disco/Interpret/CESK.hs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ appConst k = \case
toMaybe = maybe (VInj L VUnit) (VInj R)
--------------------------------------------------
-- Randomness

ORandom -> arity3 $ \v1 v2 v3 ->
let (a,g') = R.randomR (vint v2,vint v3) (vgen v1)
in out $ VPair (intv a) (genv g')
Expand Down
3 changes: 1 addition & 2 deletions src/Disco/Typecheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,8 @@ typecheck Infer (TPrim prim) = do
----------------------------------------
-- Randomness

inferPrim PrimRandom = return $ TyGen :*: (TyN :*: TyN) :->: (TyN :*: TyGen)
inferPrim PrimRandom = return $ TyGen :*: TyN :*: TyN :->: (TyN :*: TyGen)
inferPrim PrimSeed = return $ TyN :->: TyGen

----------------------------------------
-- Arithmetic

Expand Down
5 changes: 1 addition & 4 deletions src/Disco/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,7 @@ prettyValue (_ :+: _) v =
prettyValue _ (VNum d r) = text $ case (d, denominator r == 1) of
(Decimal, False) -> prettyDecimal r
_ -> prettyRational r

-- Temporary placement:
prettyValue _ (VGen g) = text (show g)

prettyValue _ (VGen _) = prettyPlaceholder TyGen
prettyValue ty@(_ :->: _) _ = prettyPlaceholder ty
prettyValue (TySet ty) (VBag xs) = braces $ prettySequence ty "," (map fst xs)
prettyValue (TySet _) v =
Expand Down

0 comments on commit da0487e

Please sign in to comment.