view interps/ghc/runghc @ 3677:da45c35866db

<kmc> printf \'#!/usr/bin/env python\\nimport sys\\nimport unicodedata\\n\\nprint unicodedata.lookup(sys.argv[1])\\n\' > bin/unicode && chmod +x bin/unicode
author HackBot
date Mon, 09 Sep 2013 22:55: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