This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Control.Monad | |
import System.Environment | |
main = do | |
args <- getArgs | |
if null args | |
then mainCli | |
else mainArgs args |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE MultiParamTypeClasses #-} | |
module Main where | |
import Control.Monad | |
import System.IO | |
import System.IO.Temp | |
import Database.HDBC | |
import Database.HDBC.Sqlite3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_module(library(regex)). | |
% https://www.haskell.org/onlinereport/haskell2010/haskellch10.html | |
%module → module modid [exports] where body | |
% | body | |
expr --> ["module", modid, "where", body]. | |
modid --> [MODID, {modid(MODID)}]. | |
modid(MODID) :- condid(MODID). | |
conid(CONID) :- regex('([A-Z][A-Za-z0-9\']*)', [], CONID, []). | |
body(BODY) :- true. |