view interps/ghc/runghc @ 11680:eb4d7573ecd3 draft

<oerjan> mkx bin/nur//if grep -q \\ <<<"$1"; then "${1%% *}" "${1#* }"; else "$1"; fi
author HackEso <hackeso@esolangs.org>
date Sat, 22 Dec 2018 02:00:53 +0000
parents 859f9b4339e6
children
line wrap: on
line source

#!/bin/bash
src=$(cat $1)
if ! ghc -e "$src" 2> /dev/null
then
    /opt/ghc/bin/runhaskell <<< $src
fi