Skip to content

Commit 207e3d3

Browse files
author
Yogansh Sharma
committed
Haskell debugging support
1 parent 80a13c5 commit 207e3d3

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

run

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,18 @@ run() {
214214
ruby "$FILE"
215215

216216
elif [[ ${FILE#*.} == hs ]]; then
217-
if [[ $COMPILE == true ]]; then
217+
if [[ $DEBUG == true ]]; then
218+
ghci "$FILE"
219+
elif [[ $COMPILE == true ]]; then
218220
ghc --make "$FILE"
219-
if [[ $PERSISTENT != true ]]; then
220-
rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}"
221-
fi
222221
else
223222
runghc "$FILE"
224223
fi
225224

225+
if [[ $PERSISTENT != true ]]; then
226+
rm "${FILE%%.*}.o" "${FILE%%.*}.hi" "${FILE%%.*}"
227+
fi
228+
226229
else
227230
_ERROR_UFTC_
228231
_EXIT_

0 commit comments

Comments
 (0)