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
module DefaultParser(run) where import Transform import Language.Haskell.Interpreter as I parse :: String -> String parse = toStringList.encloseWithQuotes.lines listToString = tail.unwords.map ("\n"++) run :: String -> String -> IO () run functionStr processedArgs = do result <- runInterpreter $ setImports...
iostreamer-X/FuncShell
src/DefaultParser.hs
mit
516
0
12
102
176
93
83
13
2
import HashTablesPerformance hiding (main) main = writeLargeFile 100000
zmoazeni/testing-hashtable-performance
GenerateFiles.hs
mit
73
0
5
9
18
10
8
2
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Orville.PostgreSQL.Internal.Expr.LimitExpr ( LimitExpr, limitExpr, ) where import qualified Orville.PostgreSQL.Internal.RawSql as RawSql import qualified Orville.PostgreSQL.Internal.SqlValue as SqlValue newtype LimitExpr = LimitExpr RawSql.RawSql derivin...
flipstone/orville
orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/LimitExpr.hs
mit
494
0
9
67
101
62
39
13
1
module Arithmetic.Model where import Control.Applicative import Text.Trifecta data Term = TmTrue | TmFalse | TmIf Term Term Term | TmZero | TmSucc Term | TmPred Term | TmIsZero Term deriving (Eq, Show) isNumeric :: Term -> Bool isNumeric TmZero = True isNumeric (TmSucc t) = isNumeric t isNumeric _ ...
raduom/tapl
src/Arithmetic/Model.hs
mit
1,003
0
9
233
454
219
235
41
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepscalingpolicyconfiguration.html module Stratosphere.ResourceProperti...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ApplicationAutoScalingScalingPolicyStepScalingPolicyConfiguration.hs
mit
6,192
0
12
351
540
309
231
43
1
{-# LANGUAGE OverloadedStrings #-} module Style where import Errors.Style import Player.Board.Style import Common.CommonClasses import Common.CssClass import Clay import Data.ByteString.Lazy hiding (repeat, ByteString) import Data.ByteString (ByteString) import Data.Text.Lazy.Encoding import Prelude hiding (div, rep...
martin-kolinek/some-board-game
src/Style.hs
mit
845
0
12
133
221
113
108
27
1
module SodCurses.SodCurses where import SodCurses.Canvas import Control.Concurrent import Control.Monad import FRP.Sodium import UI.HSCurses.Curses import UI.HSCurses.CursesHelper -- | Takes a function that takes a event that fires on each tick and one which fires on events -- and produces a tuple of a behaviour of ...
edwardwas/sod-curses
src/lib/SodCurses/SodCurses.hs
mit
1,812
0
15
403
521
253
268
40
1
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.Entity (js_getPublicId, getPublicId, js_getSystemId, getSystemId, js_getNotationName, getNotationName, Entity, castToEntity, gTypeEntity) where import Prelude ((.), (==), (>>=), retur...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/Entity.hs
mit
2,292
18
11
327
601
354
247
38
1
trimInit :: [a] -> Int -> [a] trimInit [] _ = [] trimInit l@(h:t) p | p == 0 = l | otherwise = trimInit t (p - 1) {- Pack consecutive duplicates of list elements into sublists. -} packConsecutives :: (Eq a) => [a] -> [[a]] packConsecutives [] = [] packConsecutives [x] = [[x]] packConsecutives l@(h:t...
andrewaguiar/s99-haskell
p09.hs
mit
494
0
10
159
213
114
99
10
1
{-# LANGUAGE Arrows, GADTs, FlexibleContexts #-} module Automata.Combinators where import Automata.Types import Automata.Helpers import Data.Set (Set) import qualified Data.Map.Strict as M import qualified Data.Set as S import Control.Arrow import Data.Maybe import Data.List (foldl') makeDFA :: (ArrowChoice arrow, Or...
terrelln/automata
src/Automata/Combinators.hs
mit
3,464
3
19
1,056
1,342
695
647
59
3
import qualified Data.Map as M import Control.Applicative import Control.Monad.Trans.Class import Data.Maybe import System.Directory import Control.Exception import qualified System.FilePath as FP import Data.Version import Control.Monad import qualified Text.PrettyPrint.Leijen as P import Text.PrettyPrint.Leijen ((</...
nstoddard/unitcalc
Main.hs
mit
3,149
0
28
930
993
486
507
-1
-1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE OverloadedStrings #-} module ZoomHub.API.Types.NonRESTfulResponse ( NonRESTfulResponse, mkNonRESTful200, mkNonRESTful301, mkNonRESTful400, mkNonRESTful404, mkNonRESTful503, ) where import Data.Aeson (ToJSON, object, toJSON, (.=)) import q...
zoomhub/zoomhub
src/ZoomHub/API/Types/NonRESTfulResponse.hs
mit
2,403
0
11
544
549
317
232
73
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Text.Greek.Mounce.Euphony where import Text.Greek.Grammar import Text.Greek.Mounce.Phonology import Text.Greek.Mounce.Quote mounceEuphony :: [Cited Euphony] mounceEuphony = [mounce § "2.2c" $ Euphony "ι followed by long α, η, ω subscripts" ...
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Mounce/Euphony.hs
mit
2,542
0
7
901
346
211
135
38
1
{-# LANGUAGE NoImplicitPrelude #-} module BaseCompat ( module X ) where import Intro as X import Control.Applicative as X import Control.Arrow as X hiding (first, second) import Control.Category as X import Control.Concurrent as X import Control.Exception as X import Control.Exception.Base as X import Control.Monad...
minad/intro
test/BaseCompat.hs
mit
2,684
0
6
396
822
587
235
77
0
module Lackey.Internal.Header where newtype Header = Header String deriving (Eq, Ord, Read, Show)
bitemyapp/lackey
library/Lackey/Internal/Header.hs
mit
103
0
6
18
34
20
14
3
0
{-# LANGUAGE OverloadedStrings #-} module Poi.Migrations.Utils where import Control.Exception import Data.Char (toLower) import Data.List (findIndex, foldl', sortOn) import qualified Data.Map.Strict as DM import Data.Maybe (mapMaybe) import Data.Monoid import qualifie...
pranaysashank/poi
poi-bin/src/Poi/Migrations/Utils.hs
mit
7,991
0
19
2,753
2,374
1,241
1,133
175
6
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified Data.ByteString.Lazy as BSL import qualified Data.Text as DT import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TLE import qualified TemplateGen.Hash as H import qualified TemplateGen.PageContext as PC import q...
seahug/seattlehaskell-org-static
src/templategen/Main.hs
mit
3,638
0
16
663
829
463
366
69
1
-- | This module provides an API for interacting with -- stack-ide over the websocket interface provided by soh-runner. -- -- This API wraps up the different patterns of sending requests and -- expecting responses, such that the code which uses it mostly does -- not need to worry about violating any protocol invariants...
fpco/schoolofhaskell
soh-client/src/Model/Protocol.hs
mit
10,290
0
25
2,269
1,808
928
880
-1
-1
{-# LANGUAGE ViewPatterns #-} module Cafe.ChefTodoList ( chefTodoListMain ) where import Control.Monad (forM_, unless) import Control.Monad.Logger (runNoLoggingT) import Data.List (foldl') import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe (catMaybes, mapMaybe) import Data.Monoid ((<>)) impo...
jdreaver/eventful
examples/cafe/src/Cafe/ChefTodoList.hs
mit
2,655
0
19
400
784
402
382
58
1
import System.Environment import qualified Data.ByteString.Lazy as B import qualified Data.ByteString as S main = do (copyFrom:copyTo:_) <- getArgs copy copyFrom copyTo copy :: FilePath -> FilePath -> IO () copy copyFrom copyTo = do contents <- B.readFile copyFrom B.writeFile copyTo contents -- (tempName...
RAFIRAF/HASKELL
IO/copy.hs
mit
449
0
10
78
108
58
50
10
1
{-| Copyright: (c) Guilherme Azzi, 2014 License: MIT Maintainer: ggazzi@inf.ufrgs.br Stability: experimental Provides combinators for changing the drawing position. Dzen's drawing behavior for the title bar is as follows. At any time, there is a current (x,y) position. Whenever something is drawn, the x position is a...
ggazzi/hzen
src/Reactive/Banana/Dzen/Unsafe/Position.hs
mit
2,310
0
15
454
427
226
201
28
1
{-# LANGUAGE MultiParamTypeClasses #-} import qualified Data.List as L import Control.Applicative colwidth = 20 linechar = '-' colchar = '|' minutesperline = 30 -- TODO: refine these type classes to set up the structure for printing a task class (Timeable t, Functor tt) => Taskable tt t p d where showTask :: (tt t ...
theNerd247/yadphs
src/T.hs
gpl-2.0
3,855
11
13
824
1,386
747
639
-1
-1
module Main where import Data.Maybe (isNothing) import Data.Tree (Tree(..)) import Data.List (nub) import Test.Tasty (TestTree, defaultMain, testGroup) import Test.Tasty.HUnit ((@=?), testCase) import Test.Tasty.QuickCheck ((==>), Property, testProperty) import Utils (addTrees, intersectTrees, itemPred, removeTrees) ...
bbshortcut/Palace
test/tests.hs
gpl-3.0
4,297
0
17
1,719
1,407
726
681
-1
-1
{-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Texture.ODF ( ODF ( odfIntensity , odfGrid , odfGridSize , odfGridStep , odfTree , odfSymm , odfKernelWidth ) , buildEmptyODF , resetODF , addPoints , addPointsWithConst , in...
lostbean/sledge
src/Texture/ODF.hs
gpl-3.0
2,696
0
12
604
841
465
376
79
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Update.hs
mpl-2.0
4,258
0
16
964
505
297
208
81
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Logs/Delete.hs
mpl-2.0
5,619
0
15
1,162
713
423
290
102
1
-- eidolon -- A simple gallery in Haskell and Yesod -- Copyright (C) 2015 Amedeo Molnár -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published -- by the Free Software Foundation, either version 3 of the License, or -- ...
Mic92/eidolon
Helper.hs
agpl-3.0
6,907
0
24
1,741
2,021
1,071
950
-1
-1
-- | Configuration for the code generator. module Data.GI.CodeGen.Config ( Config(..) , CodeGenFlags(..) ) where import Data.Text (Text) import Data.GI.CodeGen.Overrides (Overrides) -- | Flags controlling different aspects of the code generator. data CodeGenFlags = CodeGenFlags { -- | Whether to gener...
hamishmack/haskell-gi
lib/Data/GI/CodeGen/Config.hs
lgpl-2.1
978
0
9
259
124
83
41
16
0
{-# LANGUAGE Haskell2010 #-} {-| Copyright: Foo, Bar, Baz The module description -} -- The module header can start with newlines. They are not taken into account for the indentation level module Bug280 where x = ""
haskell/haddock
html-test/src/Bug280.hs
bsd-2-clause
239
0
4
61
12
9
3
3
1
-- | A Simple section just adds absolute and relative influences -- on a score, which is presumed to get full credit if no dings -- are given. -- -- Expects the section header to specify the section maximum -- -- Accepts a number or number-followed-by-%-sign for its ding arg. module Grade.Score.Simple (sectySimple) whe...
nwf/grade
lib/Grade/Score/Simple.hs
bsd-2-clause
2,014
0
17
647
723
387
336
37
4
module WaveSim (module WaveSim.Types, module WaveSim.WaveSim, module WaveSim.Graphics) where import WaveSim.Types import WaveSim.WaveSim import WaveSim.Graphics
jethomas/WaveSim
src/WaveSim.hs
bsd-3-clause
173
0
5
27
39
25
14
7
0
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Foldable (fold, foldMap) import Data.Monoid import Prelude hiding (unlines) import System.Environment import System.IO import Data.List.Split import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.ByteString.Builder as L main :: IO () ma...
maoe/ghc-heap-prof
bin/ghp.hs
bsd-3-clause
797
0
12
125
257
139
118
21
1
import Data.List import Data.Char solve :: String -> Int solve input = length triangleWord where words' = filter (\s -> (length s) >= 2) (groupBy (\a b -> ((a == ',') == (b == ','))) input) words = sort $ map (tail . init) words' wordValue s = sum $ map (\c -> ord c - ord 'A' + 1) s ...
foreverbell/project-euler-solutions
src/42.hs
bsd-3-clause
524
0
15
148
253
137
116
10
1
{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-orphans -Wwarn #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module Stack.StoreSpec where imp...
MichielDerhaeg/stack
src/test/Stack/StoreSpec.hs
bsd-3-clause
3,054
0
14
869
794
446
348
60
3
{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} {- | Module : Verifier.SAW.SCTypeCheck Copyright : Galois, Inc. 2012-2015 ...
GaloisInc/saw-script
saw-core/src/Verifier/SAW/SCTypeCheck.hs
bsd-3-clause
30,117
0
18
6,998
7,373
3,742
3,631
494
26
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Socket (watchFile) where import Control.Concurrent (forkIO, threadDelay) import Control.Exception (SomeException, catch) import qualified Data.ByteString.Char8 as BS import qualified Network.WebSockets as WS import qualified System.FSNotify.Devel as N...
wakatime/wakatime
tests/samples/codefiles/haskell.hs
bsd-3-clause
665
0
13
118
154
88
66
16
1
module PeerTrader.Strategy.Schedule (updateDailyInvested) where import Control.Concurrent.STM import Control.Monad.IO.Class (liftIO) import Control.Monad.Reader (asks) import Data.Traversable as T import Database.Groundhog import ...
WraithM/peertrader-backend
src/PeerTrader/Strategy/Schedule.hs
bsd-3-clause
1,081
0
10
286
254
139
115
23
1
{-# LANGUAGE TupleSections #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.Exception (handle, catch, SomeException, ErrorCall(..)) import Control.Monad.Trans.State import Control.Monad.Trans.Maybe import Data.Function (on, (&)) import Data.List import Data.Li...
harendra-kumar/asyncly
benchmark/Chart.hs
bsd-3-clause
13,152
0
20
4,203
3,080
1,610
1,470
282
10
-------------------------------------------------------------------------------- -- | -- Module : Network.OpenID.Assocation.Map -- Copyright : (c) Trevor Elliott, 2008 -- License : BSD3 -- -- Maintainer : Trevor Elliott <trevor@geekgateway.com> -- Stability : -- Portability : -- module Network.OpenID.As...
substack/hsopenid
src/Network/OpenID/Association/Map.hs
bsd-3-clause
1,219
0
12
208
323
186
137
18
1
module BibTex ( Bibliography , Reference(..) , Field , bibliography ) where import Text.ParserCombinators.Parsec import Control.Monad (liftM) -- Our main data structure data Reference = Reference { getType :: Type , getName :: Name , getFields :: [Field] } deriving Show type...
palaga/HsBible
BibTex.hs
bsd-3-clause
1,948
0
11
578
597
312
285
62
1
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Emit where import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.Global as G import qualified LLVM.General.AST.Constant as C import qualified LLVM.General.AST.Float as F import...
talw/crisp-compiler
src/Emit.hs
bsd-3-clause
15,099
0
19
2,822
4,341
2,164
2,177
323
2
{-# LANGUAGE ParallelListComp, TupleSections, MultiWayIf, ViewPatterns, LambdaCase, BangPatterns, CPP #-} -- | -- Module : Language.SequentCore.Translate -- Description : Core \<-\> Sequent Core -- Maintainer : maurerl@cs.uoregon.edu -- Stability : experimental -- -- Translation between Sequent C...
pdownen/sequent-core
src/Language/SequentCore/Translate.hs
bsd-3-clause
48,887
151
19
12,925
12,342
6,399
5,943
755
12
{-# LANGUAGE InstanceSigs #-} module PFDS.Sec9.Ex11 where import PFDS.Commons.Heap (Heap(..)) data Tree a = Node a [Tree a] deriving Show data Digit a = Zero | Ones [Tree a] | Two (Tree a) (Tree a) deriving Show newtype BHeap a = BH [Digit a] deriving Show instance Heap BHeap where empty :: Ord a => BHeap a empt...
matonix/pfds
src/PFDS/Sec9/Ex11.hs
bsd-3-clause
1,992
0
10
487
1,159
587
572
46
2
module MyQuickCheck where import Game import ChessBoard import Elements import Test.QuickCheck instance Arbitrary Player where arbitrary = oneof [return WhitePl, return BlackPl] prop_invertPlayer x = (inverse $ inverse x) == x prop_insideBoard = forAll (choose ( 1, 8)) $ \ x -> forAll (choose ( 1, 8)) $ \ y -> ...
leskiw77/Checkers
test/MyQuickCheck.hs
bsd-3-clause
434
0
11
96
147
78
69
13
1
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Wyas.Parser ( readExpr , parseExpr ) where import Wyas.Types import Wyas.Parser.Primitives import Wyas.Error import Text.ParserCombinators.Parsec hiding (spaces) import Control.Monad (liftM) import Control.Monad.Error (throwError) import Data.Vector (fr...
grtlr/wyas
src/Wyas/Parser.hs
bsd-3-clause
1,872
0
16
594
541
261
280
57
2
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# OPTIONS -Wall #-} module RegisterMachine.Models.CM2 ( mach ) where import Basic.Types import Basic.MemoryImpl (ListMem, fillMem, Address(..)) import Basic.Features import RegisterMachine.State import Regist...
davidzhulijun/TAM
RegisterMachine/Models/CM2.hs
bsd-3-clause
1,106
0
9
228
468
244
224
28
1
module Idris.Directives where import Idris.AbsSyntax import Idris.ASTUtils import Idris.Imports import Idris.Core.Evaluate import Idris.Core.TT import Util.DynamicLinker -- | Run the action corresponding to a directive directiveAction :: Directive -> Idris () directiveAction (DLib cgn lib) = do addLib cgn lib ...
bkoropoff/Idris-dev
src/Idris/Directives.hs
bsd-3-clause
2,714
0
14
1,120
750
358
392
45
3
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} module GHC.Environment (getFullArgs) where import GHC.Base import GHC.Pack import Java import Java.StringBase getFullArgs :: IO [String] getFullArgs = do jargs <- getFullArgs' return (map fromJString (fromJava jargs)) foreign i...
rahulmutt/ghcvm
libraries/base/GHC/Environment.hs
bsd-3-clause
428
3
12
60
91
51
40
-1
-1
-- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE RankNTypes #-} module T3692 where type Foo a b = () -> (Bar a => a) class Bar a where {} foo :: Foo a b foo = id (undefined :: Foo p q)
rahulmutt/ghcvm
tests/suite/typecheck/compile/T3692.hs
bsd-3-clause
208
0
8
45
70
40
30
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "System/Log/FastLogger/Date.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Formatting time is slow. -- This package provides mechanisms to cache formatted date. module System.Log.Fast...
phischu/fragnix
tests/packages/scotty/System.Log.FastLogger.Date.hs
bsd-3-clause
1,863
0
9
333
218
134
84
27
1
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE ExistentialQuantification, DeriveDataTypeable #-} -- | -- Module : Scion.Types -- Copyright : (c) Thomas Schilling 2008 -- License : BSD-style -- -- Maintainer : nominolo@gmail.com -- Stability : experimental -- Portability : portable -- -- Types used throughout...
CristhianMotoche/scion
lib/Scion/Types.hs
bsd-3-clause
10,154
13
15
2,055
2,098
1,134
964
184
2
module Paper.Haskell where import Data.Ix import Data.Char import Data.List import System.Directory import System.FilePath import Paper.Util.FileData import Paper.Haskell.Fragment import Paper.Haskell.Check haskell obj files = do let incFile = directory files </> "Include.hs" b <- doesFileExist incFile ...
saep/neil
src/Paper/Haskell.hs
bsd-3-clause
1,203
0
12
320
418
221
197
28
2
import Language.KansasLava -- define a circuit halfAdder a b = (sum,carry) where sum = xor2 a b carry = and2 a b fullAdder a b cin = (sum,cout) where (s1,c1) = probe "ha1" halfAdder a b -- probe an entire function (sum,c2) = halfAdder cin s1 cout = xor2 c1 (probe "c2" c2) -- probe a s...
andygill/kansas-lava
examples/Probes.hs
bsd-3-clause
3,182
2
14
1,008
397
211
186
24
1
module Pair () where {-@ LIQUID "--no-termination" @-} import Language.Haskell.Liquid.Prelude incr z = (x, [x + 1]) where x = choose z incr z = (x, [x + 1]) where x = choose z chk (x, [y]) = liquidAssertB (x < y) prop = chk $ incr n where n = choose 0 incr2 x = (True, 9, x, 'o', x+1) chk2 (_,...
ssaavedra/liquidhaskell
tests/pos/pair00.hs
bsd-3-clause
517
0
8
142
292
164
128
17
1
<?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="fr-FR"> <title>Groovy Support</title> <maps> <homeID>top</homeID> <mapref location="map...
thc202/zap-extensions
addOns/groovy/src/main/javahelp/org/zaproxy/zap/extension/groovy/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
959
89
29
156
389
209
180
-1
-1
<?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="sr-CS"> <title>Browser View | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref...
kingthorin/zap-extensions
addOns/browserView/src/main/javahelp/org/zaproxy/zap/extension/browserView/resources/help_sr_CS/helpset_sr_CS.hs
apache-2.0
973
87
29
159
396
212
184
-1
-1
{-# OPTIONS -fglasgow-exts #-} -- This only typechecks if forall-hoisting works ok when -- importing from an interface file. The type of Twins.gzipWithQ -- is this: -- type GenericQ r = forall a. Data a => a -> r -- gzipWithQ :: GenericQ (GenericQ r) -> GenericQ (GenericQ [r]) -- It's kept this way in the interfa...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/uncat/tc191.hs
mit
939
0
10
210
130
74
56
10
1
{- Poly: limited polynomial arithmetic Part of Mackerel: a strawman device definition DSL for Barrelfish Copyright (c) 2007, 2008, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writing...
daleooo/barrelfish
tools/mackerel/Poly.hs
mit
840
0
11
192
252
144
108
12
1
{-# LANGUAGE Safe #-} {-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} -- | Here we used typeable to produce an illegal value -- Now using SAFE though so will fail module Main where import Data.OldTypeable import BadImport03_A deriving instance Typeable Nat data NInt = NInt Int deriving Show instance Typea...
lukexi/ghc
testsuite/tests/safeHaskell/unsafeLibs/BadImport03.hs
bsd-3-clause
615
0
13
161
181
92
89
18
1
module ShaderLoader where import Graphics.GL import Control.Monad import Control.Monad.Trans import Foreign import Foreign.C.String import qualified Data.ByteString as BS import qualified Data.Text.Encoding as Text import qualified Data.Text.IO as Text overPtr :: (MonadIO m, Storable a) => (Ptr a -> IO b) -> m a o...
lukexi/oculus-mini
test/ShaderLoader.hs
mit
4,327
0
24
1,494
945
467
478
85
9
module Input ( AppInput , parseWinInput , mousePos , lbp , lbpPos , lbDown , rbp , rbpPos , rbDown , keyPress , keyPressed , quitEvent , module SDL.Input.Keyboard.Codes ) where import Data.Maybe import FRP.Yampa import Linear (V2(..)) import Linear....
Rydgel/flappy-haskell
src/Input.hs
mit
4,074
0
14
1,056
1,029
568
461
81
5
module Kriek.Backend.ES6 where import Kriek.Data -- compile :: Analysis -> JSExpression -- compile (Analysis scope context op) = case op of -- Do as ->
kalouantonis/kriek
src/hs/Kriek/Backend/ES6.hs
mit
157
0
4
30
15
11
4
2
0
-- Perlin implementation lifted from Glome https://wiki.haskell.org/Glome {-# LANGUAGE BangPatterns #-} module GlomePerlin where import Data.Array.IArray type Flt = Double -- | 3d type represented as a record of unboxed floats. data Vec = Vec !Flt !Flt !Flt deriving Show vec :: Flt -> Flt -> Flt -> Vec vec !x !...
rickerbh/GenerativeArtHaskell
GenerativeArt.hsproj/GlomePerlin.hs
mit
2,140
0
18
711
1,315
691
624
72
3
-- https://wiki.haskell.org/Haskell_in_5_steps {- fac n = if n == 0 then 1 else n * fac (n-1) -} fac 0 = 1 fac n = n * fac (n-1) main=print (fac 42) -- 括号不可避
SnowOnion/GrahamHaskellPractice
Haskell_in_5_steps.hs
mit
183
2
8
49
50
26
24
3
1
module StringMingling where tupleToString :: (char,char) -> [char] tupleToString (a, b) = [a,b] mingle :: String -> String -> String mingle string1 string2 = concat $ map tupleToString $ zip string1 string2 {- main :: IO () main = do string1 <- getLine string2 <- getLine put...
Sobieck00/practice
hr/nonvisualstudio/haskell/functionalprogramming/recursion/stringmingling/Solution.hs
mit
356
0
7
99
82
46
36
8
1
{-# htermination minusFM :: FiniteMap () b1 -> FiniteMap () b2 -> FiniteMap () b1 #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_minusFM_2.hs
mit
103
0
3
18
5
3
2
1
0
module Cascade.Parse.Comment (parseComment) where import Cascade.Data.Parse (State(..), Result(..), Token(Token), expect, readToken) import Cascade.Data.Ast (Item(Comment)) commentStart = "/*" commentEnd = "*/" parseComment :: State -> (Result Item) parseComment state = case (expect state commentStart) of ...
bash/cascade
src/Cascade/Parse/Comment.hs
mit
895
0
13
200
339
188
151
21
2
module Main where import Web.Scotty import Database.PostgreSQL.Simple (connectPostgreSQL) import Oinc.API.Server main = do conn <- connectPostgreSQL "dbname='oinc_haskell_dev' user='postgres'" runServer 3000 conn
DeTeam/bitoinc-haskell-server
src/Main.hs
mit
219
0
8
27
49
27
22
7
1
--Script para gerar o início de um arquivo .ppm module RaytracerEtapa4_1113331018 where --Cria um um tipo Cor que é formado por uma tupla de inteiro e um outro tipo coordenada que é uma tupla de Double --e deriva da classe Show a forma de imprimir --O data nada mais é que um guarda chuva de construtores de objetos ...
lipemorais/haskellando
RaytracerEtapa4_1113331018.hs
mit
4,424
0
13
1,181
1,162
636
526
37
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-documentationpart-location.html module Stratosphere.ResourceProperties.ApiGatewayDocumentationPart...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ApiGatewayDocumentationPartLocation.hs
mit
3,903
0
12
349
537
304
233
42
1
{- | Module : $Header$ Description : data types for consistency aka conservativity Copyright : (c) Christian Maeder, DFKI GmbH 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable Data types for conservativity -} mod...
nevrenato/HetsAlloy
Common/Consistency.hs
gpl-2.0
1,669
0
16
335
234
132
102
32
7
-- -- riot/Riot/Editor.hs -- -- Copyright (c) Tuomo Valkonen 2004-2005. -- -- 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 v...
opqdonut/riot
Riot/Editor.hs
gpl-2.0
1,759
0
14
490
473
246
227
43
3
{-# LANGUAGE CPP, OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : Main -- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GPL -- -- Maintainer : maintainer@leksah.org -- Stability : provisional -- Portab...
JPMoresmau/leksah-server
tests/TestTool.hs
gpl-2.0
9,606
0
16
3,017
2,206
1,138
1,068
196
10
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Bitmaps -- Copyright : (c) Sven Panne 2002-2009 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : stable ...
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/Bitmaps.hs
gpl-2.0
1,026
0
10
135
158
96
62
10
1
{-# LANGUAGE ConstraintKinds #-} module Language.Jasmin.Transformation.VCGen where import Language.Jasmin.Syntax import Utils import Language.Jasmin.TypeChecker.TyInfo import Language.Jasmin.Transformation.Simplify import Language.Position import Language.Location import Control.Monad import Control.Monad.IO.Class im...
hpacheco/jasminv
src/Language/Jasmin/Transformation/VCGen.hs
gpl-3.0
2,883
0
19
562
1,093
539
554
55
3
module Masque.Objects.Bool where import Masque.Monte import Masque.Objects.Builtin -- | Pass a message to a Bool. callBool :: Bool -> String -> [Obj] -> [(Obj, Obj)] -> Monte Obj -- Unary. callBool b "not" [] _ = wrapBool $ not b -- Binary. callBool b "and" [other] _ = do x <- unwrapBool other wrapBool $ b &&...
monte-language/masque
Masque/Objects/Bool.hs
gpl-3.0
674
0
10
167
282
145
137
19
2
// We’ve already seen that a composition of functors is a functor — we can easily convince ourselves // that the same is true of bifunctors. // Given two morphisms, we simply lift one with one functor and the other with the other functor. // We then lift the resulting pair of lifted morphisms with the bifunctor. // W...
sujeet4github/MyLangUtils
CategoryTheory_BartoszMilewsky/PI_08_Functoriality/BiComp.hs
gpl-3.0
2,149
64
4
506
257
230
27
4
0
{-# LANGUAGE NoMonomorphismRestriction,BangPatterns,FlexibleContexts #-} ----------------------------------------------------------------------------- -- | -- Module : -- Copyright : (c) 2013 Boyun Tang -- License : BSD-style -- Maintainer : tangboyun@hotmail.com -- Stability : experimental -- Portability : ghc -- -- ...
tangboyun/miranda
src/MiRanda/Diagram.hs
gpl-3.0
10,504
0
23
4,541
3,057
1,593
1,464
236
9
module SimulateTests ( propToBitsFromBitsId ) where import Simulate import Test.QuickCheck propToBitsFromBitsId :: Positive Integer -> Bool propToBitsFromBitsId (Positive x) = x == bitsToInt (intToBits x)
aparent/jcc
tests/SimulateTests.hs
gpl-3.0
209
0
8
29
56
30
26
7
1
{-# LANGUAGE TemplateHaskell #-} ------------------------------------------------------------------------------ -- | This module defines our application's state type and an alias for its -- handler monad. module Application where ------------------------------------------------------------------------------ import Co...
japesinator/eve-api
src/Application.hs
mpl-2.0
625
0
9
64
63
38
25
9
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/DeobfuscationFiles/Upload.hs
mpl-2.0
7,004
0
33
1,941
797
446
351
133
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/RevokeSecurityGroupIngress.hs
mpl-2.0
8,511
0
10
1,961
992
597
395
104
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.ConsumerSurveys.Types.Sum -- Copyright : (c) 2015-2016...
brendanhay/gogol
gogol-consumersurveys/gen/Network/Google/ConsumerSurveys/Types/Sum.hs
mpl-2.0
619
0
5
101
35
29
6
8
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-swf/gen/Network/AWS/SWF/RespondDecisionTaskCompleted.hs
mpl-2.0
5,489
0
10
1,034
499
307
192
60
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-analytics/gen/Network/Google/Resource/Analytics/Management/WebPropertyUserLinks/Delete.hs
mpl-2.0
4,358
0
17
958
469
279
190
82
1
doubleMe x = x + x doubleUs x y = x * 2 + y * 2 doubleUs2 x y = doubleMe x + doubleMe y doubleSmalls x = if x > 100 then x else x * 2 doubleSmalls' x = (if x > 100 then x else x * 2) + 20 conanO'Brien = "It's a-me, Conan O'Brien!" length' xs = sum [1 | _ <- xs] --removeNonUpperCase :: [Char] -> [Char] --equiva...
alexliew/learn_you_a_haskell
1_starting_out.hs
unlicense
583
0
8
133
227
120
107
11
2
module Codez where data CharSpec = C Char | CRange Char Char | CSet [Char] type Alphabet = [CharSpec] type CodePoint = Either Char Int parse :: Alphabet -> String -> [CodePoint] parse a s = map (parseChar a) s parseChar :: Alphabet -> Char -> CodePoint parseChar a c = case maybeIndexOf a c of...
pdbartlett/misc-stuff
haskell/codez/Codez.hs
apache-2.0
521
0
8
145
177
94
83
15
2
ans (b:r:g:c:s:t:_) = let n = t - (b+r+g+c+s) - (s) - (b*5) - (r*3) in 100 - (3*(b+r+g+c+s+n)) - (2*(b*5+r*3)) + (15*(b*5+r*3)) + (15*b) + (15*r) + (7*g) + (2*c) main = do c <- getContents let i = takeWhile (/= [0,0,0,0,0,0]) $ map (map read) $ map words $ lines c :: [[Int]] o = map ans i mapM_ pri...
a143753/AOJ
0229.hs
apache-2.0
326
0
21
85
329
173
156
8
1
-- Copyright 2016 TensorFlow authors. -- -- Licensed 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 agree...
jcberentsen/haskell
tensorflow/src/TensorFlow/Nodes.hs
apache-2.0
5,642
0
16
1,284
1,603
847
756
90
2
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} ---------------------------------------------------------------------------- -- | -- Module : Web.Skroutz.Model.Base.Manufacturer -- Copyright : (c) 2016 Remous-Aris K...
ariskou/skroutz-haskell-api
src/Web/Skroutz/Model/Base/Manufacturer.hs
apache-2.0
1,203
0
9
280
152
96
56
17
0
add :: (Num a) => a -> a -> a add x y = x + y
jplahn/haskell-book
examples/ghci/add.hs
apache-2.0
46
0
7
17
37
19
18
2
1
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} module Handler.Root ( getRootR, postRootR, ) where import Ywitter import Control.Applicative import Control.Monad import Data.Maybe import qualified Data.Text as T import Data.Time getRootR :: Handler RepHtml getRootR = do mu <- maybeAuth ...
tanakh/Ywitter
Handler/Root.hs
bsd-2-clause
1,463
0
20
397
510
244
266
44
4
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} {-# LANGUAGE ConstraintKinds, PolyKinds, ScopedTypeVariables, DataKinds #-} module Control.Coeffect where import GHC.Exts ( Constraint ) {- Coeffect parameterised comonad Also called "indexed comonads". For more details see "Coeffects: Unified static analysis o...
dorchard/effect-monad
src/Control/Coeffect.hs
bsd-2-clause
1,552
0
12
361
353
202
151
17
0
{-# LANGUAGE RecordWildCards #-} import Graphics.GL import qualified Graphics.UI.GLFW as GLFW import Control.Monad import Data.Bits import Foreign import Linear import Cube import Data.Time import Halive.Utils import Mesh impor...
lukexi/wboit
test/TestWBOIT.hs
bsd-2-clause
3,928
0
22
1,147
873
441
432
69
1
module Test.HClTest ( module X ) where import Test.HClTest.Monad as X (Config(), HClTest()) import Test.HClTest.Monad as X hiding (timeoutFactor, Config, HClTest) import Test.HClTest.Program as X import Test.HClTest.Setup as X import Test.HClTest.Trace as X
bennofs/hcltest
src/Test/HClTest.hs
bsd-3-clause
274
0
6
49
78
55
23
7
0
module Main where import Codec.Picture import Codec.Picture.Types import qualified Data.ByteString.Lazy as L import qualified Data.Vector as V import Day25 import Graphics.Rasterific main :: IO () main = do -- p1v <- visualizePartOne -- p2v <- visualizePartTwo --...
z0isch/advent-of-code
app/Main.hs
bsd-3-clause
910
0
12
199
195
108
87
13
1
module JDec.Class.Raw.VerificationTypeInfo ( VerificationTypeInfo( TopVariableInfo, IntegerVariableInfo, FloatVariableInfo, LongVariableInfo, DoubleVariableInfo, NullVariableInfo, UninitializedThisVariableInfo, ObjectVariableInfo, UninitializedVariableInfo), objectVariableConstantPoolIndex, uninitializedVariableOffset ...
rel-eng/jdec
src/JDec/Class/Raw/VerificationTypeInfo.hs
bsd-3-clause
2,841
0
8
424
113
84
29
28
0
module Sword.Gui where import Control.Monad (when) import UI.HSCurses.Curses import UI.HSCurses.CursesHelper import qualified Data.Map as Map import Prelude hiding (Either(..)) import Sword.Utils import Sword.World import Sword.Hero import Sword.ViewPorter initGui :: IO (ViewPort) initGui = do initCurses echo Fa...
kmerz/the_sword
src/Sword/Gui.hs
bsd-3-clause
2,475
3
13
544
1,107
550
557
75
10
module Handler.User.Permissions ( Permissions (..) , reqPermissions , optPermissions , Permission (..) , editor , commenter , reqPermission ) where import Import import Data.Text as T import Yesod.Auth data Permissions = Permissions { canComment :: Bool , ...
pxqr/bitidx
Handler/User/Permissions.hs
bsd-3-clause
1,224
0
8
250
322
179
143
33
2
{-# LANGUAGE FlexibleInstances, GADTs, GeneralizedNewtypeDeriving, DeriveDataTypeable, MultiParamTypeClasses, ScopedTypeVariables, LambdaCase, InstanceSigs, FlexibleContexts #-} module Web.Chione ( -- * main things clean -- * key directory names , build_dir , html_dir ...
ku-fpg/chione
Web/Chione.hs
bsd-3-clause
32,867
350
20
13,095
7,137
3,829
3,308
-1
-1