Skip to content

Commit

Permalink
Fixed type error via giving an explicit type to the erroring function
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephBond committed Sep 22, 2023
1 parent 5a78a4d commit a6be320
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/Util/BMA.purs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ step3 dim starred primed coveredRows coveredCols matrix =
step4 dim starred primed coveredRows coveredCols matrix

-- Unsure what this is going to do in reference implementation
step4 :: Int -> Array (Int × Int) -> Array (Int × Int) -> Array Int -> Array Int -> Matrix IntInf -> Array (Int × Int)
step4 dim starred primed coveredRows coveredCols matrix =
let rowsNC = complement dim coveredRows
colsNC = complement dim coveredCols
Expand All @@ -215,7 +216,7 @@ step4 dim starred primed coveredRows coveredCols matrix =
Just ij@(i × _) -> let newPrim = cons ij primed in
case find (\(p × _) -> p == i) starred of
Nothing -> step5 ij
Just (_ × q) -> step4 dim starred (insert i coveredRows) (remove q coveredCols)
Just (_ × q) -> step4 dim starred newPrim (insert i coveredRows) (remove q coveredCols) matrix

remove :: forall a. Eq a => a -> Array a -> Array a
remove elem arr =
Expand Down

0 comments on commit a6be320

Please sign in to comment.