titan 0.1.0.0 → 1.0.0
raw patch · 7 files changed
+961/−28 lines, 7 filesdep +IfElsedep +cairodep +directorydep ~base
Dependencies added: IfElse, cairo, directory, filepath, glib, gtk, hlint, keera-hails-mvc-controller, keera-hails-mvc-environment-gtk, keera-hails-mvc-model-protectedmodel, keera-hails-mvc-solutions-gtk, keera-hails-mvc-view, keera-hails-mvc-view-gtk, keera-hails-reactive-gtk, keera-hails-reactive-polling, keera-hails-reactivevalues, mtl, network, network-bsd, process, regex-posix, template-haskell
Dependency ranges changed: base
Files
- ChangeLog.md +0/−5
- README.md +0/−0
- data/Interface.glade +711/−0
- src/Main.hs +7/−1
- tests/HaddockCoverage.hs +91/−0
- tests/hlint.hs +23/−0
- titan.cabal +129/−22
− ChangeLog.md
@@ -1,5 +0,0 @@-# Revision history for titan--## 0.1.0.0 -- YYYY-mm-dd--* First version. Released on an unsuspecting world.
− README.md
+ data/Interface.glade view
@@ -0,0 +1,711 @@+<?xml version="1.0" encoding="UTF-8"?>+<interface>+ <requires lib="gtk+" version="2.24"/>+ <!-- interface-naming-policy project-wide -->+ <object class="GtkWindow" id="mainWindow">+ <property name="width_request">800</property>+ <property name="height_request">500</property>+ <property name="can_focus">False</property>+ <property name="title" translatable="yes">Haskell Titan: The FRP Debugger</property>+ <child>+ <object class="GtkVBox" id="vbox1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <child>+ <object class="GtkToolbar" id="toolbar1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="toolbar_style">both</property>+ <child>+ <object class="GtkToolButton" id="toolBtnConnect">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Connect</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-connect</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnDisconnect">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Disconnect</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-disconnect</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnPlay">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Play</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-media-play</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnPause">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Pause</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-media-pause</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnStop">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Stop</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-media-stop</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnStep">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Step</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-go-forward</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnStepUntil">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Step+Until+Condition</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-goto-last</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnSkip">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Skip</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-redo</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnSkipBack">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Back</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-undo</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnRedo">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Redo</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-refresh</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnLoadTrace">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Load Trace</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-open</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnDeleteTrace">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Delete Trace</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-delete</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnSaveTrace">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Save trace</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-save</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnReplayTrace">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Replay trace</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-revert-to-saved</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnRefineTrace">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Refine Trace</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-sort-ascending</property>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="homogeneous">True</property>+ </packing>+ </child>+ </object>+ <packing>+ <property name="expand">False</property>+ <property name="fill">True</property>+ <property name="position">0</property>+ </packing>+ </child>+ <child>+ <object class="GtkFrame" id="frame2">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label_xalign">0</property>+ <property name="shadow_type">in</property>+ <child>+ <object class="GtkTable" id="table2">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="n_rows">3</property>+ <property name="n_columns">2</property>+ <child>+ <object class="GtkLabel" id="label14">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Finished</property>+ </object>+ <packing>+ <property name="top_attach">2</property>+ <property name="bottom_attach">3</property>+ </packing>+ </child>+ <child>+ <object class="GtkEntry" id="txtMaxTime">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ <property name="top_attach">1</property>+ <property name="bottom_attach">2</property>+ </packing>+ </child>+ <child>+ <object class="GtkEntry" id="txtFinished">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ <property name="top_attach">2</property>+ <property name="bottom_attach">3</property>+ </packing>+ </child>+ <child>+ <object class="GtkLabel" id="label16">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Current Time</property>+ </object>+ </child>+ <child>+ <object class="GtkEntry" id="txtGlobalTime">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ </packing>+ </child>+ <child>+ <object class="GtkLabel" id="label5">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Max time</property>+ </object>+ <packing>+ <property name="top_attach">1</property>+ <property name="bottom_attach">2</property>+ </packing>+ </child>+ </object>+ </child>+ <child type="label">+ <object class="GtkLabel" id="label1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Global Info</property>+ <property name="use_markup">True</property>+ </object>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">1</property>+ </packing>+ </child>+ <child>+ <object class="GtkFrame" id="frame4">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label_xalign">0</property>+ <property name="shadow_type">in</property>+ <child>+ <object class="GtkVBox" id="vbox2">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <child>+ <object class="GtkScrolledWindow" id="scrollFrameSelection">+ <property name="height_request">80</property>+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="hscrollbar_policy">automatic</property>+ <property name="vscrollbar_policy">automatic</property>+ <child>+ <placeholder/>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">0</property>+ </packing>+ </child>+ <child>+ <object class="GtkFrame" id="frame1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label_xalign">0</property>+ <property name="shadow_type">in</property>+ <child>+ <object class="GtkHBox" id="hbox2">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <child>+ <object class="GtkTable" id="table1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="n_rows">5</property>+ <property name="n_columns">2</property>+ <child>+ <object class="GtkLabel" id="label6">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Time delta</property>+ </object>+ <packing>+ <property name="top_attach">2</property>+ <property name="bottom_attach">3</property>+ </packing>+ </child>+ <child>+ <object class="GtkLabel" id="label7">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Input</property>+ </object>+ <packing>+ <property name="top_attach">3</property>+ <property name="bottom_attach">4</property>+ </packing>+ </child>+ <child>+ <object class="GtkLabel" id="label9">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Last input</property>+ </object>+ <packing>+ <property name="top_attach">4</property>+ <property name="bottom_attach">5</property>+ </packing>+ </child>+ <child>+ <object class="GtkEntry" id="txtFrameDTime">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ <property name="top_attach">2</property>+ <property name="bottom_attach">3</property>+ </packing>+ </child>+ <child>+ <object class="GtkEntry" id="txtFrameInput">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ <property name="top_attach">3</property>+ <property name="bottom_attach">4</property>+ </packing>+ </child>+ <child>+ <object class="GtkEntry" id="txtFrameLast">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ <property name="top_attach">4</property>+ <property name="bottom_attach">5</property>+ </packing>+ </child>+ <child>+ <object class="GtkLabel" id="label13">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Time</property>+ </object>+ <packing>+ <property name="top_attach">1</property>+ <property name="bottom_attach">2</property>+ </packing>+ </child>+ <child>+ <object class="GtkEntry" id="txtFrameTime">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ <property name="top_attach">1</property>+ <property name="bottom_attach">2</property>+ </packing>+ </child>+ <child>+ <object class="GtkLabel" id="label8">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Number</property>+ </object>+ </child>+ <child>+ <object class="GtkEntry" id="txtFrameNumber">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ <property name="invisible_char">•</property>+ <property name="invisible_char_set">True</property>+ <property name="primary_icon_activatable">False</property>+ <property name="secondary_icon_activatable">False</property>+ <property name="primary_icon_sensitive">True</property>+ <property name="secondary_icon_sensitive">True</property>+ </object>+ <packing>+ <property name="left_attach">1</property>+ <property name="right_attach">2</property>+ </packing>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">0</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolPalette" id="toolpalette1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="toolbar_style">both</property>+ <child>+ <object class="GtkToolItemGroup" id="toolitemgroup1">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Actions</property>+ <child>+ <object class="GtkToolButton" id="toolBtnDiscardFuture">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Discard Future</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-clear</property>+ </object>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnSaveTraceUpToFrame">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Save Trace Up to</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-save</property>+ </object>+ <packing>+ <property name="position">1</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnTravelToFrame">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Travel to</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-convert</property>+ </object>+ <packing>+ <property name="position">2</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnTeleportToFrame">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Teleport to</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-convert</property>+ </object>+ <packing>+ <property name="position">3</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnIOSenseFrame">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">IO Resense</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-media-record</property>+ </object>+ <packing>+ <property name="position">4</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnModifyInput">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Modify Input</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-edit</property>+ </object>+ <packing>+ <property name="position">5</property>+ </packing>+ </child>+ <child>+ <object class="GtkToolButton" id="toolBtnModifyTime">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="use_action_appearance">False</property>+ <property name="label" translatable="yes">Modify DTime</property>+ <property name="use_underline">True</property>+ <property name="stock_id">gtk-edit</property>+ </object>+ <packing>+ <property name="position">6</property>+ </packing>+ </child>+ </object>+ <packing>+ <property name="expand">False</property>+ </packing>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">1</property>+ </packing>+ </child>+ </object>+ </child>+ <child type="label">+ <object class="GtkLabel" id="label3">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Input sample:</property>+ <property name="use_markup">True</property>+ </object>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">1</property>+ </packing>+ </child>+ </object>+ </child>+ <child type="label">+ <object class="GtkLabel" id="label2">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Input Stream</property>+ <property name="use_markup">True</property>+ </object>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">2</property>+ </packing>+ </child>+ <child>+ <object class="GtkFrame" id="frame3">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label_xalign">0</property>+ <property name="shadow_type">in</property>+ <child>+ <object class="GtkTextView" id="txtDebug">+ <property name="visible">True</property>+ <property name="can_focus">True</property>+ </object>+ </child>+ <child type="label">+ <object class="GtkLabel" id="label12">+ <property name="visible">True</property>+ <property name="can_focus">False</property>+ <property name="label" translatable="yes">Debugging Log</property>+ <property name="use_markup">True</property>+ </object>+ </child>+ </object>+ <packing>+ <property name="expand">True</property>+ <property name="fill">True</property>+ <property name="position">3</property>+ </packing>+ </child>+ </object>+ </child>+ </object>+</interface>
src/Main.hs view
@@ -1,4 +1,10 @@+-- | This is the main program with which the graphical app is launched. module Main where +-- Internal imports+import Controller++-- |The app starts here. Here we simply call the controller, which+-- takes control from now on. main :: IO ()-main = putStrLn "Hello, Haskell!"+main = startController
+ tests/HaddockCoverage.hs view
@@ -0,0 +1,91 @@+-----------------------------------------------------------------------------+-- |+-- Module : Main (HaddockCoverage)+-- Copyright : (C) 2015 Ivan Perez+-- License : BSD-style (see the file LICENSE)+-- Maintainer : Ivan Perez <ivan.perez@keera.co.uk>+-- Stability : provisional+-- Portability : portable+--+-- Copyright notice: This file borrows code+-- https://hackage.haskell.org/package/lens-4.7/src/tests/doctests.hsc+-- which is itself licensed BSD-style as well.+--+-- Run haddock on a source tree and report if anything in any+-- module is not documented.+-----------------------------------------------------------------------------+module Main where++import Control.Applicative+import Control.Monad+import Data.List+import System.Directory+import System.Exit+import System.FilePath+import System.IO+import System.Process+import Text.Regex.Posix++main :: IO ()+main = do+ -- Find haskell modules+ -- TODO: Ideally cabal should do this (provide us with the+ -- list of modules). An alternative would be to use cabal haddock+ -- but that would need a --no-html argument or something like that.+ -- Alternatively, we could use cabal haddock with additional arguments.+ --+ -- See:+ -- https://github.com/keera-studios/haddock/commit/d5d752943c4e5c6c9ffcdde4dc136fcee967c495+ -- https://github.com/haskell/haddock/issues/309#issuecomment-150811929+ files <- getSources++ let haddockArgs = [ "--no-warnings", "--ignore-all-exports" ] ++ files+ let cabalArgs = [ "exec", "--", "haddock" ] ++ haddockArgs+ (code, out, _err) <- readProcessWithExitCode "cabal" cabalArgs ""++ -- Filter out coverage lines, and find those that denote undocumented+ -- modules.+ --+ -- TODO: is there a way to annotate a function as self-documenting,+ -- in the same way we do with ANN for hlint?+ let isIncompleteModule :: String -> Bool+ isIncompleteModule line = isCoverageLine line && not (line =~ "^ *100%")+ where isCoverageLine :: String -> Bool+ isCoverageLine line = line =~ "^ *[0-9]+%"++ let incompleteModules :: [String]+ incompleteModules = filter isIncompleteModule $ lines out++ -- Based on the result of haddock, report errors and exit.+ -- Note that, unline haddock, this script does not+ -- output anything to stdout. It uses stderr instead+ -- (as it should).+ case (code, incompleteModules) of+ (ExitSuccess , []) -> return ()+ -- (ExitFailure _, _) -> exitFailure+ (_ , _) -> do+ hPutStrLn stderr "The following modules are not fully documented:"+ mapM_ (hPutStrLn stderr) incompleteModules+ exitFailure++getSources :: IO [FilePath]+getSources = filter isHaskellFile <$> go "src"+ where+ go dir = do+ (dirs, files) <- getFilesAndDirectories dir+ (files ++) . concat <$> mapM go dirs++ isHaskellFile fp = (isSuffixOf ".hs" fp || isSuffixOf ".lhs" fp)+ && not (any (`isSuffixOf` fp) excludedFiles)++ excludedFiles = [ ]++getFilesAndDirectories :: FilePath -> IO ([FilePath], [FilePath])+getFilesAndDirectories dir = do+ c <- map (dir </>) . filter (`notElem` ["..", "."]) <$> getDirectoryContents dir+ (,) <$> filterM doesDirectoryExist c <*> filterM doesFileExist c++-- find-based implementation (not portable)+--+-- getSources :: IO [FilePath]+-- getSources = fmap lines $ readProcess "find" ["src/", "-iname", "*hs"] ""
+ tests/hlint.hs view
@@ -0,0 +1,23 @@+-----------------------------------------------------------------------------+-- |+-- Module : Main (hlint)+-- Copyright : (C) 2013 Edward Kmett+-- License : BSD-style (see the file LICENSE)+-- Maintainer : Edward Kmett <ekmett@gmail.com>+-- Stability : provisional+-- Portability : portable+--+-- This module runs HLint on the lens source tree.+-----------------------------------------------------------------------------+module Main where++import Control.Monad+import Language.Haskell.HLint+import System.Environment+import System.Exit++main :: IO ()+main = do+ args <- getArgs+ hints <- hlint $ ["src", "--cross", "--hint=tests/HLint.hs" ] ++ args+ unless (null hints) exitFailure
titan.cabal view
@@ -1,25 +1,132 @@--- Initial titan.cabal generated by cabal init. For further documentation,--- see http://haskell.org/cabal/users-guide/+cabal-version: >= 1.10+build-type: Simple -name: titan-version: 0.1.0.0-synopsis: Testing Infrastructure for Temporal AbstractioNs-description: Testing Infrastructure for Temporal AbstractioNs-homepage: http://keera.co.uk-license: GPL-3-license-file: LICENSE-author: Ivan Perez-maintainer: ivan.perez@keera.co.uk--- copyright: -category: Testing-build-type: Simple-extra-source-files: ChangeLog.md, README.md-cabal-version: >=1.10+name: titan+version: 1.0.0+author: Ivan Perez+maintainer: ivan.perez@keera.co.uk+homepage: http://github.com/keera-studios/haskell-titan+copyright:+ All Rights Reserved (c) 2018 - 2020 Keera Studios Ltd+ All Rights Reserved (c) 2015 - 2017 Ivan Perez Dominguez+license: GPL-3+license-file: LICENSE+category: Testing+synopsis: Testing Infrastructure for Temporal AbstractioNs - GUI to debug temporal programs+description:+ Debugging GUI that allows you to control the execution of a running FRP+ program.+ .+ TITAN (Testing Infrastructure for Temporal AbstractioNs) is a framework to+ test and debug FRP programs. It allows you to write temporal unit tests, check+ them, QuickCheck them, run FRP programs with a fine-tuned debugger, obtain+ information to replicate tests, and follow and control the execution of a+ FRP program from an interactive GUI.+ .+ This program provides a GUI to connect to a running application and control its+ execution. +data-files:+ data/*.glade++source-repository head+ type: git+ location: git://github.com/keera-studios/haskell-titan.git++-- You can disable the hlint test suite with -f-test-hlint+flag test-hlint+ default: False+ manual: True++-- You can disable the haddock coverage test suite with -f-test-doc-coverage+flag test-doc-coverage+ default: False+ manual: True++ executable titan- main-is: Main.hs- -- other-modules: - -- other-extensions: - build-depends: base >=4.8 && <4.9- hs-source-dirs: src- default-language: Haskell2010++ main-is:+ Main.hs++ build-depends:+ base >=4.7 && < 4.13+ , cairo+ , glib+ , gtk+ , IfElse+ , mtl+ , network+ , network-bsd+ , template-haskell++ , keera-hails-mvc-controller+ , keera-hails-mvc-environment-gtk+ , keera-hails-mvc-model-protectedmodel+ , keera-hails-mvc-solutions-gtk+ , keera-hails-mvc-view+ , keera-hails-mvc-view-gtk+ , keera-hails-reactive-gtk+ , keera-hails-reactive-polling+ , keera-hails-reactivevalues++ hs-source-dirs:+ src/++ default-language:+ Haskell2010++ ghc-options:+ -threaded -Wall -O2++-- Verify that the code is hlint-error free+test-suite hlint++ type:+ exitcode-stdio-1.0++ main-is:+ hlint.hs++ hs-source-dirs:+ tests++ default-language:+ Haskell2010++ if !flag(test-hlint)+ buildable:+ False+ else+ build-depends:+ base+ , hlint >= 1.7++-- Verify that the code is thoroughly documented+test-suite haddock-coverage++ type:+ exitcode-stdio-1.0++ main-is:+ HaddockCoverage.hs++ build-depends:+ base >= 4 && < 5+ , directory+ , filepath+ , process+ , regex-posix++ hs-source-dirs:+ tests++ default-language:+ Haskell2010++ ghc-options:+ -Wall++ if !flag(test-doc-coverage)+ buildable:+ False