File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
liquidhaskell-boot/src/Language/Haskell/Liquid/Constraint Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -302,10 +302,15 @@ detectTypedHole :: CGEnv -> CoreExpr -> CG (Maybe (RealSrcSpan, Var))
302302detectTypedHole _ (App (Tick genTick (Var x)) _) | isVarHole x
303303 = return (Just (getSrcSpanFromTick, x))
304304 where
305- getSrcSpanFromTick = case genTick of
306- SourceNote src _ -> src
307- _ -> panic Nothing " Not a Source Note"
308- isVarHole = L. isInfixOf " hole" . F. symbolString . F. symbol
305+ getSrcSpanFromTick =
306+ case genTick of
307+ SourceNote src _ -> src
308+ _ -> panic Nothing " Not a Source Note"
309+ isStrHole s =
310+ case break (== ' .' ) s of
311+ (_, ' .' : rest) -> rest == " hole"
312+ _ -> False
313+ isVarHole = isStrHole . F. symbolString . F. symbol
309314detectTypedHole _ _ = return Nothing -- NOT A TYPED HOLE
310315--------------------------------------------------------------------------------
311316-- | Bidirectional Constraint Generation: CHECKING -----------------------------
You can’t perform that action at this time.
0 commit comments