Skip to content

Commit b34eced

Browse files
committed
Type: Fix compilation error
1 parent d7c2db8 commit b34eced

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Act/Type.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ import Act.Error
4444
import Data.Type.Equality (TestEquality(..))
4545
import Data.Singletons
4646

47-
import Data.Aeson.Types (typeMismatch)
48-
4947

5048
type Err = Error String
5149

@@ -445,7 +443,7 @@ checkExprVType env e (FromVType typ) = TExp typ <$> checkExpr env typ e
445443

446444

447445
typeMismatchErr :: forall a b res. Pn -> SType a -> SType b -> Err res
448-
typeMismatchErr p t1 t2 = (throw (p, "Type " <> show t1 <> " should match type " <> show t2 <> "\n Env:\n" <> show env))
446+
typeMismatchErr p t1 t2 = (throw (p, "Type " <> show t1 <> " should match type " <> show t2))
449447

450448
-- | Check is the given expression can be typed with the given type\\
451449
checkExpr :: forall t a. Typeable t => Env -> SType a -> U.Expr -> Err (Exp a t)
@@ -532,7 +530,7 @@ inferExpr env@Env{calldata, constructors} e = case e of
532530
checkVar entry = case (eqT @t @Timed, eqT @t @Untimed) of
533531
(Just Refl, _) ->
534532
(\(vt@(FromVType typ), ref) -> TExp typ $ TEntry (getPosEntry entry) Pre SCalldata (Item typ vt ref)) <$> (validateEntry env SCalldata entry)
535-
(_, Just Refl) -> validateEntry env SCalldata entry `bindValidation` \(vt@(FromVType typ'), ref) ->
533+
(_, Just Refl) ->
536534
(\(vt@(FromVType typ), ref) -> TExp typ $ TEntry (getPosEntry entry) Neither SCalldata (Item typ vt ref)) <$> (validateEntry env SCalldata entry)
537535
(_,_) -> error "Internal error: Timing should be either Timed or Untimed"
538536

0 commit comments

Comments
 (0)