code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings #-}
module YaLedger.Output.ASCII where
import Data.List
import Data.String
import YaLedger.Output.Formatted
import YaLedger.Output.Tables
data ASCII = ASCII
deriving (Eq, Show)
align :: Int -> Align -> FormattedText -> FormattedText
align w ALeft str
| textLength str >= w = takeTe... | portnov/yaledger | YaLedger/Output/ASCII.hs | bsd-3-clause | 4,421 | 0 | 19 | 1,182 | 2,004 | 1,014 | 990 | 113 | 4 |
{-# LANGUAGE
MultiWayIf,
RecordWildCards,
ScopedTypeVariables,
TemplateHaskell,
NoImplicitPrelude
#-}
module Schedule
(
Schedule,
PartialSchedule(..),
schPastGames,
schPlayerCount,
schCurrent,
schBest,
schIterationsTotal,
schIterationsLeft,
randomSchedule,
advancePartialSchedule,
p... | neongreen/hat | src/Schedule.hs | bsd-3-clause | 11,878 | 0 | 20 | 2,056 | 9,422 | 6,049 | 3,373 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{- |
Module : Verifier.SAW.Cryptol.Prelude
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintainer : huffman@galois.com
Stability : experimental
Portability : non-portable (language extensions)
-}
module Verifier.SAW.Cryptol.PreludeM
( Module
, module Verifier.S... | GaloisInc/saw-script | cryptol-saw-core/src/Verifier/SAW/Cryptol/PreludeM.hs | bsd-3-clause | 532 | 0 | 7 | 76 | 52 | 33 | 19 | 9 | 0 |
module QueryArrow.ElasticSearch.Record where
import Data.Aeson (parseJSON, toJSON, FromJSON, ToJSON, Value)
import Data.Map.Strict (Map, union, delete)
import Data.Text (Text)
import Control.Applicative ((<$>))
newtype ESRecord = ESRecord (Map Text Value) deriving Show
instance FromJSON ESRecord where
parseJSON ... | xu-hao/QueryArrow | QueryArrow-db-elastic/src/QueryArrow/ElasticSearch/Record.hs | bsd-3-clause | 656 | 0 | 8 | 99 | 227 | 126 | 101 | 14 | 1 |
module Matterhorn.Draw.ReactionEmojiListOverlay
( drawReactionEmojiListOverlay
)
where
import Prelude ()
import Matterhorn.Prelude
import Brick
import Brick.Widgets.List ( listSelectedFocusedAttr )
import qualified Data.Text as T
import Matterhorn.Draw.ListOverla... | matterhorn-chat/matterhorn | src/Matterhorn/Draw/ReactionEmojiListOverlay.hs | bsd-3-clause | 1,436 | 0 | 14 | 554 | 297 | 161 | 136 | -1 | -1 |
module SimpleModule.EvaluatorSuite
( tests
) where
import Data.List (stripPrefix)
import SimpleModule.Data
import SimpleModule.Evaluator
import SimpleModule.Parser (expression)
import Test.HUnit
tests :: Test
tests = TestList
[ testEq "Eval const" (E... | li-zhirui/EoplLangs | test/SimpleModule/EvaluatorSuite.hs | bsd-3-clause | 4,254 | 0 | 12 | 1,649 | 713 | 379 | 334 | 115 | 3 |
{-# OPTIONS_GHC -w #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
-- | A module where tuple classes and instances are created up to 16-tuple using 'makeTupleRefs'.
-- The number of classes and instances can be changed by hiding import from this m... | nboldi/references | Control/Reference/TupleInstances.hs | bsd-3-clause | 492 | 0 | 7 | 67 | 34 | 22 | 12 | 6 | 0 |
module Main (main) where
import Prelude ()
import Prelude.Compat
import Criterion.Main
import qualified Typed.Generic as Generic
import qualified Typed.Manual as Manual
import qualified Typed.TH as TH
main :: IO ()
main = defaultMain [
Generic.benchmarks
, Manual.benchmarks
, TH.benchmarks
, Generic.decode... | sol/aeson | benchmarks/Typed.hs | bsd-3-clause | 387 | 0 | 7 | 65 | 97 | 61 | 36 | 15 | 1 |
module Examples.Language.MicroKanren where
import Language.MicroKanren
import Numeric.Natural
q5 :: Goal Natural
q5 = callFresh $ \q -> Variable q === Term 5
aAndB :: Goal Natural
aAndB = conj (callFresh $ \a -> Variable a === Term 7)
(callFresh $ \b -> disj (Variable b === Term 5)
... | joneshf/MicroKanren | examples/Examples/Language/MicroKanren.hs | bsd-3-clause | 1,172 | 0 | 18 | 322 | 519 | 253 | 266 | 34 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Exception.IOChoice.TH
import Control.Exception
(|||>) :: IO a -> IO a -> IO a
(|||>) = $(newIOChoice [''ErrorCall, ''ArithException])
main :: IO ()
main = do
a0 <- evaluate (1 `div` 0)
|||> return 3
putStrLn $ "Should be 3: " ++ show a0
a1 <- ... | kazu-yamamoto/io-choice | examples/derive-test.hs | bsd-3-clause | 669 | 0 | 11 | 140 | 213 | 105 | 108 | 20 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.N2O (
b2t,t2b,
send,
call,
assign,
Network.N2O.runServer,
broadcast
) where
import Control.Exception
import Control.Concurrent
import Control.Monad
import Data.BERT
import Data.Binary
import Data.Text.Encoding
import Network.N2O.PubSub
import q... | 5HT/n2o.hs | src/Network/N2O.hs | isc | 2,712 | 0 | 13 | 591 | 819 | 403 | 416 | 68 | 3 |
{- |
Module : ./CASL/CCC/TermFormula.hs
Description : auxiliary functions on terms and formulas
Copyright : (c) Mingyi Liu, Till Mossakowski, Uni Bremen 2004-2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
Auxili... | spechub/Hets | CASL/CCC/TermFormula.hs | gpl-2.0 | 11,837 | 0 | 24 | 3,141 | 4,599 | 2,324 | 2,275 | 252 | 10 |
module PMC10 where
main :: Int
main = length (filter even [1..1000])
| roberth/uu-helium | test/correct/PMC10.hs | gpl-3.0 | 70 | 0 | 8 | 13 | 30 | 17 | 13 | 3 | 1 |
{-# LANGUAGE CPP #-}
-- |
-- Module: Data.Aeson
-- Copyright: (c) 2011, 2012 Bryan O'Sullivan
-- (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
-- Stability: experimental
-- Portability: portable
--
-- Types and functions for working efficient... | moonKimura/aeson-0.6.2.1 | Data/Aeson.hs | bsd-3-clause | 12,627 | 0 | 7 | 2,566 | 782 | 586 | 196 | 63 | 1 |
{-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns, RankNTypes #-}
#if __GLASGOW_HASKELL__ == 700
-- This is needed as a workaround for an old bug in GHC 7.0.1 (Trac #4498)
{-# LANGUAGE MonoPatBinds #-}
#endif
#if __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Unsafe #-}
#endif
{-# OPTIONS_HADDOCK not-home #-}
-- | Copyright... | CloudI/CloudI | src/api/haskell/external/bytestring-0.10.10.0/Data/ByteString/Builder/Internal.hs | mit | 43,928 | 0 | 21 | 10,675 | 5,530 | 3,073 | 2,457 | 445 | 3 |
module Main where
import Test.MiniUnitTest
main :: IO ()
main = tests
| bagl/takusen-oracle | Test/Main.hs | bsd-3-clause | 80 | 0 | 6 | 21 | 24 | 14 | 10 | 4 | 1 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
{-| Binary instances for the core datatypes -}
module Idris.Core.Binary where
import Control.Applicative ((<*>), (<$>))
import Control.Monad (liftM2)
import Control.DeepSeq (($!!))
import Data.Binary
import Data.Vector.Binary
import qualified Data.Text as T
import quali... | Enamex/Idris-dev | src/Idris/Core/Binary.hs | bsd-3-clause | 25,367 | 0 | 19 | 15,090 | 7,394 | 3,271 | 4,123 | 618 | 0 |
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
module DB where
import Data.SafeCopy
import Servant.Server.Auth.Token.Acid.Schema as A
-- | Application global state for acid-state
data DB = DB {
dbAuth :: A.Model -- ^ Storage for Auth state
, dbCustom :: () -- ^ Demo of custom state
}
-- | Generation of inita... | ivan-m/servant-auth-token | example/acid/src/DB.hs | bsd-3-clause | 594 | 0 | 9 | 117 | 150 | 87 | 63 | -1 | -1 |
{-# LANGUAGE DoRec #-}
-- | Make sure this program runs without leaking memory
import FRP.Sodium
import Control.Applicative
import Control.Exception
import System.Timeout
data Source = Source { unSource :: Reactive (Behaviour (Int, Int), Event Source) }
verbose = False
main = do
(et, pushT) <- sync $ newEvent
... | kevintvh/sodium | haskell/examples/tests/memory-test-2.hs | bsd-3-clause | 1,162 | 0 | 26 | 391 | 428 | 217 | 211 | 31 | 3 |
module PLpatt.Tools where
import PLpatt.Sign
import PLpatt.AS_BASIC_PLpatt
import qualified MMT.Tools as Generic
import Data.Maybe
bool_from_pt :: Generic.Tree -> Maybe Bool'
bool_from_pt x = case x of
(Generic.Application n Nothing args )
| n == "equiv" && length args == 2 ->
Just (Equiv (fromJust (b... | keithodulaigh/Hets | PLpatt/Tools.hs | gpl-2.0 | 1,961 | 0 | 19 | 505 | 820 | 404 | 416 | 43 | 5 |
{-# LANGUAGE BangPatterns #-}
import System.Directory
import System.FilePath
import Control.Concurrent.Async
import System.Environment
import Data.List hiding (find)
import Control.Exception (finally)
import Data.Maybe (isJust)
import Control.Concurrent.MVar
import Data.IORef
import GHC.Conc (getNumCapabilities)
-- <<... | prt2121/haskell-practice | parconc/findpar2.hs | apache-2.0 | 2,127 | 0 | 17 | 689 | 828 | 421 | 407 | 64 | 4 |
module PackageTests.PreProcess.Check (suite) where
import PackageTests.PackageTester
(PackageSpec(..), SuiteConfig, assertBuildSucceeded, cabal_build)
import System.FilePath
import Test.Tasty.HUnit
suite :: SuiteConfig -> Assertion
suite config = do
let spec = PackageSpec
{ directory = "PackageTes... | enolan/cabal | Cabal/tests/PackageTests/PreProcess/Check.hs | bsd-3-clause | 527 | 0 | 12 | 116 | 120 | 69 | 51 | 13 | 1 |
{-# LANGUAGE PolyKinds, GADTs #-}
module T7328 where
data Proxy a
class Foo a where
foo :: a ~ f i => Proxy (Foo f)
| ghc-android/ghc | testsuite/tests/polykinds/T7328.hs | bsd-3-clause | 123 | 0 | 10 | 32 | 44 | 23 | 21 | -1 | -1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, CPP, GADTs, TypeFamilies, OverloadedStrings, FlexibleContexts, EmptyDataDecls, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses #-}
module PersistUniqueTest where
import Init
-- mpsGeneric = False is due to a bug or at least lack of a feature in mkKeyType... | psibi/persistent | persistent-test/src/PersistUniqueTest.hs | mit | 1,271 | 0 | 10 | 267 | 149 | 82 | 67 | 17 | 1 |
{-# LANGUAGE ScopedTypeVariables, Rank2Types #-}
--
-- (c) The University of Glasgow 2002-2006
--
-- Serialized values
module GHCJS.Prim.TH.Serialized ( Serialized
, fromSerialized
, toSerialized
, serializeWithData
... | forked-upstream-packages-for-ghcjs/ghcjs | ghcjs-prim/src/GHCJS/Prim/TH/Serialized.hs | mit | 7,315 | 0 | 18 | 1,873 | 2,385 | 1,267 | 1,118 | 112 | 5 |
{-# LANGUAGE StandaloneDeriving, UndecidableInstances #-}
module Data.Term.Types where
import Data.Binding
import Data.Name
import Data.Typing
import qualified Data.Map as Map
import qualified Data.Set as Set
type Result a = Either String a
type Context term = Map.Map Name term
type Inferer term = Context term -> R... | antitypical/Surface | src/Data/Term/Types.hs | mit | 1,752 | 0 | 11 | 305 | 697 | 354 | 343 | -1 | -1 |
-- Conduit
-- ref: https://wiki.haskell.org/Conduit
-- conduit-lib: https://www.schoolofhaskell.com/user/snoyberg/library-documentation/conduit-overview
{-
Streaming data library
Collection of libraries that share the same underlying data structures
Alternative to lazy I/O
Promises: dete... | Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Conduit.hs | mit | 1,278 | 0 | 10 | 300 | 85 | 50 | 35 | 10 | 1 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | fpco/schoolofhaskell.com | src/Settings.hs | mit | 1,468 | 0 | 8 | 286 | 148 | 96 | 52 | 22 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | Strings normalized according to Normalization Form Compatibility
-- Decomposition.
module Data.Text.Normal.NFKD (
Normal,
fromText, toText
) where
import Control.Arrow (first)
import Control.DeepSeq
import Data.Data
import Data.Monoid
import Data.String
import Data.Tex... | pikajude/text-normal | src/Data/Text/Normal/NFKD.hs | mit | 1,226 | 0 | 12 | 276 | 317 | 170 | 147 | 30 | 3 |
{-# LANGUAGE DataKinds, FlexibleContexts, TypeOperators #-}
module Geometry where
import Control.Applicative
import Data.Foldable (fold, foldMap)
import Data.Vinyl
import Graphics.GLUtil
import Graphics.Rendering.OpenGL hiding (normal, normalize, light, Normal, Color)
import Linear
import Graphics.VinylGL
import System... | spetz911/progames | vinyl-gl-master/examples/src/Geometry.hs | mit | 4,209 | 0 | 16 | 1,262 | 1,486 | 776 | 710 | 87 | 1 |
module Classifier (
Classifier(..),
Metadata(..),
StoredClassifier(..),
buildClassifier,
classifySequence,
classifySequenceMulti,
classifySequenceAll,
leafOTU) where
import Data.Tree
import qualified Data.Map.Strict as M
import qualified Data.List as L
import Data.Binary (Binary, put, g... | tjunier/mlgsc | src/Classifier.hs | mit | 10,879 | 0 | 13 | 2,716 | 2,541 | 1,331 | 1,210 | 170 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
-- | SWF Decider logic.
--
module Network.AWS.Wolf.Decide
( decide
, decideMain
) where
import Data.Aeson
import Data.Time
import Data.UUID
import Data.UUID.V4
import Network.AWS.SWF
import Network.AWS.Wolf.... | swift-nav/wolf | src/Network/AWS/Wolf/Decide.hs | mit | 4,107 | 0 | 20 | 931 | 1,201 | 588 | 613 | -1 | -1 |
-- Copyright (c) 2011 Alexander Poluektov (alexander.poluektov@gmail.com)
--
-- Use, modification and distribution are subject to the MIT license
-- (See accompanyung file MIT-LICENSE)
import Distribution.Simple
main = defaultMain
| apoluektov/domino | Setup.hs | mit | 232 | 0 | 4 | 30 | 15 | 10 | 5 | 2 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE CPP #-}
module GenTM5Data (
instantiateDoc
) where
import Data.Aeson
import Data.Aeson.TH
import Data.Text (Text)
import qualified Data.Text as T
import Data.HashMap.Strict (HashMap)
import qualified ... | range12/there-is-no-B-side | tools/generators/GuestEncoder/GenTM5Data.hs | mit | 15,569 | 23 | 26 | 4,508 | 3,704 | 1,961 | 1,743 | -1 | -1 |
{-|
Module : Collapse
Description : Collapses all multi-clause functions into single-body ones
-}
module Latro.Collapse where
import Control.Monad.Except
import Latro.Ast
import Latro.Compiler
import Latro.Errors
collectFunDefs :: RawId -> [RawAst Exp] -> ([RawAst FunDef], [RawAst Exp])
collectFunDefs _ [] = ([... | Zoetermeer/latro | src/Latro/Collapse.hs | mit | 3,533 | 0 | 13 | 718 | 1,443 | 698 | 745 | 84 | 2 |
-- Copyright (C) 2013 Jorge Aparicio
import Data.Maybe (mapMaybe)
main :: IO()
main
= print
. head
. filter isPalindrome
. mapMaybe fst
$ iterate next (Nothing, nums)
where nums = [[x * y | y <- [x,x-1..start]] | x <- [end,end-1..start]]
start = 100 :: Int
end = 999
next :: Integral... | japaric/eulermark | problems/0/0/4/004.hs | mit | 669 | 0 | 12 | 168 | 409 | 224 | 185 | 21 | 1 |
-- SYNTAX TEST "source.haskell"
module Intro where
-- <- keyword.other
-- ^^^^^ support.other.module
-- ^^^^^ keyword.other
-- ^^^^^^^^^^^^^^^ meta.declaration.module
import Language.Haskell.Liquid.Prelude (liquidAssert)
-- ^^^^^^^^^^^^ meta.declaration.exports enti... | atom-haskell/language-haskell | spec/fixture/liquidhaskell.hs | mit | 3,345 | 0 | 10 | 968 | 512 | 291 | 221 | 41 | 1 |
class YesNo a where
yesno :: a -> Bool
instance YesNo Int where
yesno 0 = False
yesno _ = True
instance YesNo [a] where
yesno [] = False
yesno _ = True
instance YesNo Bool where
yesno = id
instance YesNo (Maybe a) where
yesno Nothing = False
yesno (Just _) = True
yesnoIf :: (YesNo... | NickAger/LearningHaskell | CIS194/typeclassexperiments.hs | mit | 576 | 0 | 8 | 158 | 176 | 93 | 83 | 16 | 2 |
-- matricula 1 a00368770
-- matricula 2 a01273613
-- Problema 1 promedio de alumnos
-- funcion que regresa el promedio de los alumnos
promedio :: Integer -> [(Integer, [Char], [Double])] -> [(Integer, [Double])]
promedio _ [] = [( "", [0.0])] -- caso base
-- obtener el promedio
promedio mat1 ((mat2, _, parcialista) :... | JorgeRubio96/LenguajesdeProgramacion | a00368770_a01273613_ejercicio13.hs | mit | 1,058 | 8 | 9 | 191 | 272 | 157 | 115 | 12 | 2 |
-- A letra grega λ ́e substitu ́ıda pela contrabarra “\”;
-- O ponto “.” ́e substitu ́ıdo por ->.
-- Por exemplo, λx.x 2 ́e notado, em Haskell como: \x->x^2 ou, ainda, \x->x*x.
quad = \x->x*x
expr = \x->x^2+2*x+3
raiz = \x->(sqrt x)
map (f x = x*x) [1..10] -- <interactive>:1:9: parse error on input ‘=’
map (\x-... | tonussi/freezing-dubstep | pratica-03/Intro.hs | mit | 783 | 11 | 9 | 168 | 399 | 225 | 174 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-} -- allows "forall t. Moment t"
import Network.Socket
import System.IO
import System.Exit
import Control.Concurrent
import Control.Monad
import Data.Maybe
import Data.Word
import qualified Data.Map.Strict as Map
import Graphics.UI.Gtk as Gtk hiding (Event)
import Graphics.UI.Gtk.Bu... | dbanerjee1979/dirc | Dirc.hs | mit | 7,122 | 0 | 23 | 2,461 | 2,158 | 1,064 | 1,094 | 125 | 22 |
{-
see Chapter 17 of the Haskell 2010 Language Report
-}
module Data.Complex where
| evilcandybag/JSHC | hslib/Data/Complex.hs | mit | 86 | 0 | 3 | 16 | 7 | 5 | 2 | 1 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Network.JsonRpc.Server
import System.IO (BufferMode (LineBuffering), hSetBuffering, stdout)
import qualified Data.ByteString.Lazy.Char8 as B
import Data.List (intercalate)
import Data.Maybe (fromMaybe)
import Control.Monad (forM_, when)
import Control... | grayjay/json-rpc-server | demo/Demo.hs | mit | 1,690 | 0 | 14 | 398 | 560 | 297 | 263 | 38 | 1 |
sommeDeXaY x y = if x > y
then 0
else x + sommeDeXaY (x+1) y
somme :: [Int] -> Int
somme [] = 0
somme (x:xs) = x + somme xs
last' :: [a] -> a
last' xs = head (reverse xs)
init' :: [a] -> [a]
init' xs = reverse (tail (reverse xs))
-- Function !!
(!!!) :: [a] -> Int -> a
(!!!) [] n = error "Index too large"
(!!!) (... | Debaerdm/L3-MIAGE | Programmation Fonctionnel/TP/TP1/sommeDeXaY.hs | mit | 594 | 0 | 9 | 151 | 366 | 199 | 167 | 22 | 2 |
module IdealGas
( idealgas, idealgas_of_veff, n, kT, of_effective_potential )
where
import Expression
nQ :: Expression RealSpace
nQ = (mass*kT/2/pi)**1.5
where mass = var "mH2O" "m_{H_2O}" (18.01528 * gpermol) -- uses molecular weight of water
gpermol = var "gpermol" "\\frac{\\textrm{g}}{\\tex... | droundy/deft | src/haskell/IdealGas.hs | gpl-2.0 | 918 | 1 | 14 | 187 | 333 | 174 | 159 | 20 | 1 |
--
-- Copyright (c) 2014 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | cjp256/manager | xenmgr/Vm/Actions.hs | gpl-2.0 | 74,303 | 4 | 27 | 21,289 | 19,940 | 9,794 | 10,146 | 1,438 | 6 |
module EmuProcessor where
import Numeric (showHex, readHex)
import qualified Graphics.UI.SDL as SDL
import Data.Bits (Bits, shiftL, shiftR, xor, (.&.), (.|.), testBit)
import Data.Word (Word8, Word16)
import Data.Maybe (fromMaybe)
import System.Random (randomIO)
import Data.List(genericTake, genericDrop)
import qualifi... | mgbarotto/Chip8 | EmuProcessor.hs | gpl-3.0 | 16,183 | 0 | 28 | 4,311 | 6,851 | 3,556 | 3,295 | 275 | 38 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import Import
import Text.Blaze.Svg11 ((!), mkPath, l, m)
import qualified Text.Blaze.Svg11 as S
import qualified Text.Blaze.Svg11.Attributes as A
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. Al... | jwaldmann/turtle | web/Handler/Home.hs | gpl-3.0 | 1,558 | 0 | 13 | 380 | 391 | 202 | 189 | 39 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-cloudmonitoring/gen/Network/Google/Resource/CloudMonitoring/TimeseriesDescriptors/List.hs | mpl-2.0 | 9,713 | 0 | 23 | 2,382 | 1,164 | 686 | 478 | 166 | 1 |
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Copyright (C) 2014 2015 2016, Julia Longtin (julial@turinglace.com)
-- Released under the GNU AGPLV3+, see LICENSE
-- FIXME: why are these required?
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-}
-- An executor, which parses openscad co... | krakrjak/ImplicitCAD | Graphics/Implicit/ExtOpenScad.hs | agpl-3.0 | 2,230 | 0 | 19 | 409 | 543 | 324 | 219 | 30 | 2 |
module Lycopene.ApplicationSpec (spec) where
import Test.Hspec
import Test.QuickCheck
import Lycopene.SpecTool
import qualified Lycopene.Core as Core
spec :: Spec
spec = do
before localEngine $ do
describe "Event" $ do
it "create a project" $ \engine -> do
cr... | utky/lycopene | tests/Lycopene/ApplicationSpec.hs | apache-2.0 | 1,633 | 0 | 22 | 442 | 503 | 244 | 259 | 31 | 1 |
-- |Constraints that specify a control flow analysis for Javascript.
module Ovid.Constraints
( initialize
, stmt
, expr
, AnnotatedStatement
, AnnotatedExpression
, ParentNodeT
, JsCFAState(..)
, CFAOpts (..)
) where
-- #define CONSERVATIVE_MODE
-- #define DEBUG_XHR
-- #define DEBUG_BUILTINS
-- #de... | brownplt/ovid | src/Ovid/Constraints.hs | bsd-2-clause | 44,770 | 2 | 36 | 11,756 | 13,293 | 6,615 | 6,678 | -1 | -1 |
-- vim: sw=2: ts=2: set expandtab:
{-# LANGUAGE CPP, TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
OverlappingInstances,
IncoherentInstances,
OverloadedStrings,
GADTs,
NoMonomorphismRes... | kyagrd/micronax | src/Unify.hs | bsd-2-clause | 5,110 | 0 | 17 | 1,548 | 1,323 | 688 | 635 | 88 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-| Implementation of the Ganeti confd server functionality.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistribution... | apyrgio/snf-ganeti | src/Ganeti/Monitoring/Server.hs | bsd-2-clause | 9,228 | 0 | 14 | 1,834 | 1,874 | 957 | 917 | 165 | 3 |
{-
This is a module for reading and parsing *.csv files.
-}
module DataBuilder
( getData
, filterDataContainer
, getMatrixFromDataContainer
, getMatrixFromNumContainer
, NumContainer(..)
, Header
, DataContainer
)where
import Data.Char
import Data.List.Split
import System.IO
import ... | kanes115/Regressions | src/DataBuilder.hs | bsd-3-clause | 4,048 | 0 | 15 | 1,215 | 1,065 | 569 | 496 | 69 | 3 |
{-
- Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved.
-
- This file is part of Hacq.
- Hacq is distributed under the 3-clause BSD license.
- See the LICENSE file for more details.
-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-... | ti1024/hacq | src/Control/Monad/Quantum/ApproxSequence/Class.hs | bsd-3-clause | 1,776 | 1 | 15 | 327 | 362 | 193 | 169 | 25 | 2 |
{-# language CPP #-}
-- | = Name
--
-- VK_NV_framebuffer_mixed_samples - device extension
--
-- == VK_NV_framebuffer_mixed_samples
--
-- [__Name String__]
-- @VK_NV_framebuffer_mixed_samples@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 153
--
-- [__Revision__]
-... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_NV_framebuffer_mixed_samples.hs | bsd-3-clause | 20,822 | 1 | 22 | 3,770 | 2,461 | 1,492 | 969 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
module Network.Mail.Locutoria.Cli.Keymap where
import Control.Lens hiding (lens)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Default (Default, def)
import Graphics.Vty.Input (Key(..), Modifier(..))
import Network.Mai... | hallettj/locutoria | Network/Mail/Locutoria/Cli/Keymap.hs | bsd-3-clause | 2,183 | 0 | 10 | 510 | 764 | 436 | 328 | 51 | 8 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
-- |
-- Module : Text.Syntax.Poly.Combinators
-- Copyright : 2010-11 University of Marburg, 2012 Kei Hibino
-- License : BSD3
--
-- Maintainer : ex8k.hibino@gmail.com
-- Stability : experimental
-- Portability : unknown
--
-- This module contains com... | schernichkin/haskell-invertible-syntax-poly | src/Text/Syntax/Poly/Combinators.hs | bsd-3-clause | 6,253 | 0 | 11 | 1,320 | 1,596 | 857 | 739 | 86 | 1 |
{-
(c) The AQUA Project, Glasgow University, 1994-1998
\section[TysPrim]{Wired-in knowledge about primitive types}
-}
{-# LANGUAGE CPP #-}
-- | This module defines TyCons that can't be expressed in Haskell.
-- They are all, therefore, wired-in TyCons. C.f module TysWiredIn
module TysPrim(
mkPrimTyConName... | mettekou/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | 41,385 | 0 | 17 | 10,358 | 4,301 | 2,429 | 1,872 | 421 | 25 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Config
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
-- Utilities for handl... | plumlife/cabal | cabal-install/Distribution/Client/Config.hs | bsd-3-clause | 38,871 | 0 | 25 | 10,490 | 8,118 | 4,369 | 3,749 | 703 | 9 |
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-name-shadowing#-}
-- This code is written by Pedro Vasconcelos for his implementation of
-- Tzaar game: HsTzaar. I'm reproducing it here just to be able to
-- compare the performance of his implementation with my own.
--
-- Thanks to Pedro ... | sphynx/hamisado | AI/Algorithms/Tzaar.hs | bsd-3-clause | 4,094 | 0 | 16 | 1,167 | 1,303 | 667 | 636 | 84 | 2 |
{-# LANGUAGE ConstraintKinds, TypeFamilies #-}
{- |
App module defines types used by the Spock framework.
-}
module Guide.App
where
-- hvect
import Data.HVect
-- Spock
import Web.Spock
import Guide.Types.User (User)
import Guide.Types.Session (GuideData)
import Guide.ServerStuff (ServerState)
-- | Type of connect... | aelve/hslibs | src/Guide/App.hs | bsd-3-clause | 1,314 | 0 | 9 | 244 | 315 | 186 | 129 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module ServerSpec
(spec) where
import Test.Hspec
import Server
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "reqUri" $ do
it "is Nothing for an invalid HTTP GET request" $ do
reqUri "FOO" `shouldBe` Nothing
it "is Nothing for a... | tripped/hlog | test/ServerSpec.hs | bsd-3-clause | 1,412 | 0 | 14 | 417 | 277 | 130 | 147 | 31 | 1 |
module Scheme.Eval
( eval, readEvalPrint, readEvalPrint', readEvalLines, readEvalLines'
, primitiveEnv, primitives) where
import Control.Monad
import Data.Maybe
import Data.IORef
import Control.Monad.Error
import Scheme.Types
import System.IO
import Scheme.Parser
import Scheme.Eval.DynamicTypes
import Scheme.E... | hucal/SCMinHS | Scheme/Eval.hs | bsd-3-clause | 7,024 | 0 | 21 | 1,783 | 2,621 | 1,339 | 1,282 | -1 | -1 |
module Test.Juggernaut.Api where
import Juggernaut.Api
main :: IO ()
main = putStrLn "hello"
| markhibberd/juggernaut | tests/Test/Juggernaut/Api.hs | bsd-3-clause | 95 | 0 | 6 | 15 | 30 | 17 | 13 | 4 | 1 |
-- Both these functions should successfully simplify
-- using the combine-identical-alternatives optimisation
module T7360 where
import Data.OldList as L
data Foo = Foo1 | Foo2 | Foo3 !Int
fun1 :: Foo -> ()
{-# NOINLINE fun1 #-}
fun1 x = case x of
Foo1 -> ()
Foo2 -> ()
... | jstolarek/ghc | testsuite/tests/simplCore/should_compile/T7360.hs | bsd-3-clause | 515 | 0 | 10 | 185 | 135 | 74 | 61 | 15 | 3 |
module Data.TTask.Command.Update
( updateTaskStatus
, updateStoryStatus
, updateSprintStatus
) where
import Control.Lens
import Data.TTask.Types
------
-- Update status
updateTaskStatus :: Id -> TStatusRecord -> Project -> Project
updateTaskStatus i r pj
= pj&task i%~ (\t -> t { _taskStatus = r `TStatu... | tokiwoousaka/ttask | src/Data/TTask/Command/Update.hs | bsd-3-clause | 686 | 0 | 11 | 127 | 227 | 127 | 100 | 15 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE... | juanpaucar/hadron | src/Hadron/Controller.hs | bsd-3-clause | 44,398 | 8 | 24 | 12,561 | 9,692 | 5,077 | 4,615 | -1 | -1 |
module Tests
( levelTest
, bassVolumeTest
, bassTimingTest
) where
import Euterpea
import Elements
-- | A short piece of music for testing that each of the instruments is set up
-- correctly, and that the levels are adjusted. Each instrument is played
-- indivudally for a few bars, and then several r... | mzero/PlainChanges2 | src/Tests.hs | bsd-3-clause | 4,269 | 0 | 18 | 1,042 | 1,355 | 752 | 603 | 58 | 1 |
{-|
This module provides a function for computing the topological sort
of a directed acyclic graph.
-}
module TopologicalSort
(
topologicalSort
) where
import Prelude hiding (replicate)
import Data.Vector.Unboxed.Mutable
import Control.Monad.RWS
import Control.Monad
import Control.Lens
import Co... | alexisVallet/ag44-graph-algorithms | TopologicalSort.hs | bsd-3-clause | 1,957 | 0 | 14 | 365 | 426 | 226 | 200 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RecordWildCards #-}
module Auth... | zohl/servant-auth-hmac | example/server/AuthAPI.hs | bsd-3-clause | 3,178 | 0 | 16 | 646 | 904 | 517 | 387 | 84 | 2 |
-- | UPDATE operations on HD wallets
module Cardano.Wallet.Kernel.DB.HdWallet.Update (
updateHdRoot
, updateHdRootPassword
, updateHdAccountName
) where
import Universum
import Cardano.Wallet.Kernel.DB.HdWallet
import Cardano.Wallet.Kernel.DB.Util.AcidState
import UTx... | input-output-hk/pos-haskell-prototype | wallet/src/Cardano/Wallet/Kernel/DB/HdWallet/Update.hs | mit | 1,433 | 0 | 11 | 337 | 223 | 119 | 104 | 27 | 1 |
import Control.Arrow
import Distribution.PackageDescription
import Distribution.Simple hiding (Module)
import Distribution.Simple.LocalBuildInfo
import Language.Preprocessor.Cpphs
import System.FilePath
import Text.XkbCommon.ParseDefines
import Module
import Utils
sourceLoc :: FilePath
sourceLoc = "./"
main :: IO (... | tulcod/haskell-xkbcommon | Setup.hs | mit | 1,350 | 0 | 14 | 402 | 351 | 183 | 168 | 33 | 2 |
module Program.Array.Expression where
import Program.Array.Operator
import Autolib.TES.Identifier
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Size
import Autolib.Util.Zufall
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr hiding ( Operator )
import Data.Typeable
-- | ... | florianpilz/autotool | src/Program/Array/Expression.hs | gpl-2.0 | 2,232 | 10 | 14 | 670 | 706 | 362 | 344 | 58 | 1 |
{- |
Module : ./Temporal/NuSmv.hs
Copyright : (c) Klaus Hartke, Uni Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
-}
module NuSmv (basicExpr, program) where
import Control.Monad (liftM, liftM2)
import ... | spechub/Hets | Temporal/NuSmv.hs | gpl-2.0 | 26,407 | 0 | 19 | 11,221 | 6,578 | 3,308 | 3,270 | 476 | 15 |
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, TypeFamilies,
TypeSynonymInstances, FlexibleInstances, GADTs, RankNTypes,
UndecidableInstances, TypeOperators #-}
-- | This module provides types and functions for creating and manipulating
-- control signals (ready and ack) associated with protocols. The 'Ack' s... | andygill/kansas-lava | Language/KansasLava/Protocols/Types.hs | bsd-3-clause | 2,962 | 4 | 10 | 623 | 563 | 305 | 258 | 45 | 1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- Building info tables.
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmLayout (
mkArgDescr,
emitCall, emit... | spacekitteh/smcghc | compiler/codeGen/StgCmmLayout.hs | bsd-3-clause | 19,947 | 0 | 22 | 5,530 | 3,551 | 1,903 | 1,648 | 275 | 25 |
{-# LANGUAGE CPP,MagicHash,ScopedTypeVariables,FlexibleInstances,RankNTypes,TypeSynonymInstances,MultiParamTypeClasses,BangPatterns #-}
-- | By Chris Kuklewicz, drawing heavily from binary and binary-strict,
-- but all the bugs are my own.
--
-- This file is under the usual BSD3 licence, copyright 2008.
--
-- Modified ... | timjb/protocol-buffers | Text/ProtocolBuffers/Get.hs | apache-2.0 | 38,206 | 0 | 93 | 10,811 | 9,097 | 4,834 | 4,263 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : System.Taffybar.Widget.CPUMonitor
-- Copyright : (c) José A. Romero L.
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : José A. Romero L. <escherdragon@gmail.com>
-- Stability : unstable
-- Portabilit... | teleshoes/taffybar | src/System/Taffybar/Widget/CPUMonitor.hs | bsd-3-clause | 1,649 | 0 | 12 | 282 | 263 | 148 | 115 | 23 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module SearchRepos where
import qualified Github.Search as Github
import qualified Github.Data as Github
import Control.Monad (forM,forM_)
import Data.Maybe (fromMaybe)
import Data.List (intercalate)
import System.Environment (getArgs)
import Text.Printf (printf)
import Data.Time.Clo... | adarqui/github | samples/Search/SearchRepos.hs | bsd-3-clause | 2,058 | 0 | 18 | 549 | 633 | 337 | 296 | 48 | 3 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- Code generation for foreign calls.
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmForeign (
cgForeignCall, loadThreadS... | frantisekfarka/ghc-dsi | compiler/codeGen/StgCmmForeign.hs | bsd-3-clause | 15,782 | 0 | 20 | 4,329 | 2,774 | 1,435 | 1,339 | 230 | 6 |
module Testsuite.Utils.Test (
Test, ($?), ($$?), TestS(..), summarise, TestM, execTestM, liftIO, runTest
) where
import Test.QuickCheck
import Test.QuickCheck.Batch
import System.IO ( hFlush, stdout )
data Test = Test String Property
| Group String [Test]
($?) :: Testable a => String -> a -> Test
... | dolio/vector | old-testsuite/Testsuite/Utils/Test.hs | bsd-3-clause | 3,761 | 0 | 15 | 1,492 | 1,287 | 683 | 604 | 89 | 2 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="fa-IR">
<title>Selenium add-on</title>
<maps>
<homeID>top</homeID>
<mapref location="m... | msrader/zap-extensions | src/org/zaproxy/zap/extension/selenium/resources/help_fa_IR/helpset_fa_IR.hs | apache-2.0 | 961 | 79 | 67 | 157 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE MagicHash, UnboxedTuples #-}
import GHC.Exts
newtype Eval a = Eval {runEval :: State# RealWorld -> (# State# RealWorld, a #)}
-- inline sequence :: [Eval a] -> Eval [a]
well_sequenced :: [Eval a] -> Eval [a]
well_sequenced = foldr cons nil where
cons e es = Eval $ \s -> case runEval e s of
... | urbanslug/ghc | testsuite/tests/codeGen/should_run/T10414.hs | bsd-3-clause | 1,526 | 0 | 18 | 473 | 481 | 257 | 224 | 25 | 2 |
module Fast2haskell (
Complex_type, Array_type, Assoc_type, Descr_type,
abortstr, delay, fix, force, iff, iffrev, seQ,
pair, strcmp,
entier,
land_i, lnot_i, lor_i, lshift_i, rshift_i,
descr,
destr_update, indassoc, lowbound, tabu... | ghc-android/ghc | testsuite/tests/programs/fast2haskell/Fast2haskell.hs | bsd-3-clause | 2,658 | 6 | 9 | 1,456 | 698 | 413 | 285 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
module Cmm.ActivityAnalysis
( ActivityStorage(..)
, activityAnalysis
) where
import Cmm.DirectedGraph
import Cmm.Backend
(MachineInstr(..), MachineFunction(..), MachinePrg(..))
import Cmm.LabelGenerator (Temp())
import Cmm.ControlFlowGraph (createControlFlowGraph, Unique(..... | cirquit/hjc | src/Cmm/ActivityAnalysis.hs | mit | 2,790 | 0 | 17 | 758 | 672 | 380 | 292 | 54 | 2 |
{-# OPTIONS_GHC -Wall -fno-warn-unused-top-binds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Okasaki.Stack (
StackF(..)
, S... | jtobin/okasaki | lib/Okasaki/Stack.hs | mit | 2,028 | 0 | 15 | 552 | 817 | 422 | 395 | 79 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
... | zenhack/haskell-capnp | lib/Capnp/Rpc/Server.hs | mit | 5,431 | 0 | 16 | 1,266 | 808 | 455 | 353 | -1 | -1 |
{- | Values implemented named terms with explicit substitutions.
-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeSynonymInstances, MultiParamTypeClasses,
OverlappingInstances, IncoherentInstances, UndecidableInstances,
PatternGuards, TupleSections #-}
module NamedExplSubst where
import Prelude hidin... | andreasabel/helf | src/NamedExplSubst.hs | mit | 7,012 | 0 | 20 | 2,285 | 2,561 | 1,277 | 1,284 | 143 | 10 |
import Control.Monad
import Control.Applicative
solve ev od = solve' ev od
where
solve' :: String -> String -> String
solve' [] [] = []
solve' (x:xs) [] = [x]
solve' (x:xs) (y:ys) = x : y : solve' xs ys
main :: IO ()
main = do
ev <- getLine
od <- getLine
putStrLn $ solve ev od
| pogin503/vbautil | atcoder/beg058/beg058b.hs | mit | 304 | 0 | 9 | 84 | 157 | 79 | 78 | 12 | 3 |
{-# LANGUAGE TypeOperators, FlexibleInstances, FlexibleContexts #-}
module Data.Functor.Classes.Show.Generic
( Show1(..)
, genericLiftShowsPrec
, genericLiftShowList
, gliftShowsPrec
, gliftShowList
) where
import Data.Functor.Classes
import GHC.Generics
import Text.Show
-- | Generically-derivable lifting of the 'Sho... | tclem/lilo | src/Data/Functor/Classes/Show/Generic.hs | mit | 2,930 | 0 | 11 | 549 | 1,021 | 525 | 496 | 43 | 1 |
module SimpleArgvParser (pairArguments) where
import Prelude hiding (map)
import qualified Data.Map.Strict as Map
strIsOption :: String -> Bool
strIsOption (a:b:_) = (a == '-') && (b == '-')
strIsOption _ = False
-- TODO: use either here
pairArguments :: [String] -> Maybe (Map.Map String String)
pairArguments args =... | davidfontenot/haskell-hashtag-viewer | src/SimpleArgvParser.hs | mit | 550 | 0 | 11 | 116 | 220 | 119 | 101 | 12 | 4 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Client where
import Control.Applicative
import Control.Monad
import Control.Monad.Catch (MonadThrow)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Mona... | wayofthepie/tc-rest-client | src/Client.hs | mit | 839 | 0 | 5 | 83 | 121 | 84 | 37 | 17 | 0 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
{-# OPTIONS_GHC -fno-warn-implicit-prelude #-}
module Paths_list_ops (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
imp... | c19/Exercism-Haskell | list-ops/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/autogen/Paths_list_ops.hs | mit | 2,371 | 0 | 10 | 239 | 410 | 238 | 172 | 33 | 1 |
module Web.YahooPortfolioManager.App
( module Web.YahooPortfolioManager.Foundation
, module Web.YahooPortfolioManager.Dispatch
, module Web.YahooPortfolioManager.Handlers
) where
import Web.YahooPortfolioManager.Foundation
import Web.YahooPortfolioManager.Dispatch ()
import Web.YahooPortfolioManager.Ha... | lhoghu/intranet | Web/YahooPortfolioManager/App.hs | mit | 327 | 0 | 5 | 37 | 51 | 35 | 16 | 7 | 0 |
--
-- If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.
--
-- If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used?
--
-- NOTE: Do not count spaces or hyphens. For exam... | stu-smith/project-euler-haskell | Euler-017.hs | mit | 1,563 | 0 | 12 | 495 | 426 | 246 | 180 | 21 | 4 |
module Properties where
main :: IO ()
main = return ()
| nickspinale/wmonad | tests/Properties.hs | mit | 56 | 0 | 6 | 12 | 24 | 13 | 11 | 3 | 1 |
{-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-}
module Graph.Cross where
import Graph.Util
import Autolib.Graph.Basic
import Autolib.Dot
import Autolib.Util.Splits
import Autolib.Hash
import Autolib.FiniteMap
import Autolib.Boxing.Position
import Inter.Types
import... | Erdwolf/autotool-bonn | src/Graph/Cross.hs | gpl-2.0 | 6,797 | 42 | 18 | 2,130 | 2,408 | 1,280 | 1,128 | 162 | 2 |
module Main where
import Prelude hiding (readFile)
import Numerical
import Vec3 hiding (normalize)
import Scene
import Speaker
import Impulse
import Control.Applicative
import System.Environment
import Data.List (transpose)
import Pipes
import Pipes.Parse
import qualified Pipes.ByteString as P
import System.IO hidin... | reuk/rayverb | flattener/Flattener.hs | gpl-2.0 | 3,961 | 0 | 15 | 939 | 1,413 | 717 | 696 | 104 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.