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 QuasiQuotes, BangPatterns, ScopedTypeVariables, TemplateHaskell, OverloadedStrings #-} {- The compactor does link-time optimization. It is much simpler than the Optimizer, no fancy dataflow analysis here. Optimizations: - rewrite all variables s...
forked-upstream-packages-for-ghcjs/ghcjs
ghcjs/src/Gen2/Compactor.hs
mit
19,377
0
20
6,009
6,527
3,324
3,203
346
12
module ImpreciseMatch ( ) where import ClassyPrelude data DiaMark = Grave | Acute | Circumflex | Tilde | Macron | Overline | Breve | DotAbove | Diaeresis | HookAbove | RingAbove | DoubleAcute | Caron | VerticalLineAbove | DoubleVerticalLineAbove | DoubleGrave | Candrabindu | InvertedBreve | TurnedCommaAbo...
aelve/Jane
CharProp.hs
mit
483
1
8
89
105
69
36
-1
-1
module Oden.Identifier ( Identifier(..), IdentifierValidationError, errorMessage, createLegalIdentifier, asString ) where import Data.Char newtype Identifier = Identifier String deriving (Show, Eq, Ord) data IdentifierValidationError = Empty | IllegalStart Char ...
AlbinTheander/oden
src/Oden/Identifier.hs
mit
1,161
0
10
286
311
162
149
29
2
{-# LANGUAGE OverloadedStrings, NoMonomorphismRestriction, FlexibleContexts, MultiParamTypeClasses, ScopedTypeVariables, DeriveDataTypeable, DeriveGeneric #-} module EZCouch.Model.View where import Prelude () import ClassyPrelude import GHC.Generics import EZCouch.Entity import Data.Aeson data View = View { map :: Te...
nikita-volkov/ez-couch
src/EZCouch/Model/View.hs
mit
655
0
12
115
179
98
81
16
0
{-# LANGUAGE CPP #-} module Main ( main -- :: IO () ) where import Criterion.Main import Crypto.Sign.Ed25519 import Data.Maybe (fromJust) import Control.DeepSeq import qualified Data.ByteString as B -------------------------------------------------------------------------------- #if !MIN_VERSION_bytes...
thoughtpolice/hs-ed25519
benchmarks/bench.hs
mit
1,370
0
12
306
294
158
136
24
1
{-# LANGUAGE TemplateHaskell #-} module Joebot.Plugins.Steam.Types where import qualified Data.Text as T import qualified Data.Map as M import Control.Lens import Control.Monad.State data User = User { _sid :: T.Text , _pname :: T.Text , _pstate :: Int , _game :: Maybe T.Text } makeLenses '...
joeschmo/joebot2
src/Joebot/Plugins/Steam/Types.hs
mit
494
0
10
112
145
86
59
18
0
module Example.Data.Student ( Student(..) , StudentId(..) , StudentName(..) ) where import Data.Int (Int32) import Data.Text (Text) import Example.Data.Major (MajorId) data Student key = Student { studentId :: key , studentName :: StudentName , studentMajor :: MajorId } deriving (Show, Eq) newtype S...
flipstone/orville
orville-postgresql/sample-project/Example/Data/Student.hs
mit
483
0
8
94
152
96
56
18
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} module GenericRLPTest where import Control.Mo...
iostat/relapse
test/GenericRLPTest.hs
mit
6,759
0
15
2,089
1,417
741
676
131
1
module Prepare.Tanach.IndexModel where import Data.Text (Text) import Prepare.Tanach.TeiHeaderModel (TeiHeader) data Chapter = Chapter { chapterNumber :: Integer , chapterVerseCount :: Integer } deriving (Show) data Name = Name { nameName :: Text , nameAbbrev :: Text , nameNumber :: Maybe Text , name...
ancientlanguage/haskell-analysis
prepare/src/Prepare/Tanach/IndexModel.hs
mit
611
0
9
132
176
108
68
23
0
{-# LANGUAGE RecordWildCards #-} module ResourceDiscovery where import SoOSiM import ResourceDiscovery.Types import ResourceDiscovery.Utils resourceDiscovery :: RDState -> ComponentInput -> SimM RDState -- Get a new state, needed for initialization resourceDiscovery _ (ComponentMsg senderId content) | Just ...
christiaanb/SoOSiM
examples/Twente/ResourceDiscovery.hs
mit
4,671
0
24
1,232
1,419
686
733
99
11
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Network.BitFunctor2.Platform.Storage where import Control.Monad.State import Control.Monad.Reader import Control.Monad.Except import qualified Network.BitFunctor.Identifiable as Id import Network.BitFunctor.Crypto.Hash (Hash, Id) import Network.BitFunctor2.Platform....
BitFunctor/bitfunctor
src/Network/BitFunctor2/Platform/Storage.hs
mit
961
1
11
165
175
107
68
21
0
{-# LANGUAGE RankNTypes #-} module Main where import qualified Data.Conduit.List as CL import qualified Data.Conduit.Binary as CB import Control.Monad.State import Control.Monad.Trans.Resource import Data.ByteString.Char8 (ByteString, empty, pack, unpack) import Data.Conduit import System.IO (stdin) -- Primary ref...
stormont/conduit-examples
examples/conduit-101-01/Main.hs
mit
7,093
0
21
1,541
1,793
830
963
245
3
module Exercise where data Graph = Graph{nodes :: [Node], edges :: [Edge]} type Node = Int type Edge = (Int, Int)
tcoenraad/functioneel-programmeren
2014/opg4a.hs
mit
115
0
9
22
49
32
17
4
0
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation , makeLogWare -- * for DevelMain , getApplicationRepl , shutdownApp -- * for GHCI , hand...
quantum-dan/HasKnowledge
Application.hs
mit
7,958
0
16
2,032
1,235
665
570
-1
-1
{-# htermination (readDecMyInt :: (List Char) -> (List (Tup2 MyInt (List Char)))) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Char = Char MyInt ; data Integer = Integer MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/readDec_1.hs
mit
7,374
0
125
1,563
4,061
2,105
1,956
149
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module HgSpec (spec) where import Test.Hspec import Test.HUnit import Data.Time.LocalTime import Data.Time.Calendar import Hg import Str import TestUtil spec :: Spec spec = testUsualCommit testUsualCommit :: Spec testUsualCommit = it "parses usual commits" $ do ...
emmanueltouzery/cigale-timesheet
tests/HgSpec.hs
mit
1,144
0
15
315
157
91
66
19
1
{- | Module : <File name or $Header$ to be replaced automatically> Description : <optional short text displayed on contents page> Copyright : (c) <Authors or Affiliations> License : <license> Maintainer : <email> Stability : unstable | experimental | provisional | stable | frozen Portability : por...
slogsdon/url
src/Main.hs
mit
1,177
0
14
395
141
82
59
13
1
module Frontend.Alpha (alpha) where import Control.Applicative import Control.Monad.Reader import Data.List import Data.Maybe import Data.Map (Map) import qualified Data.Map as M import Data.Bifunctor import Frontend.AST import Internal -- Alpha Transform alpha :: AlphaEnv -> AnnExpr -> Fresh AnnExpr alpha env = ru...
alpicola/mel
src/Frontend/Alpha.hs
mit
2,453
0
11
493
1,097
548
549
66
2
import LList -- 1 : implement your own Eq typeclass class Eq_ a where (===) :: a -> a -> Bool x === y = not $ x /== y (/==) :: a -> a -> Bool x /== y = not $ x === y data BSTree k v = Empty | Node k v (BSTree k v) (BSTree k v) instance (Eq k, Eq v) => Eq_ (BSTree k v) where Empty === Empty = Tru...
t00n/ProjectEuler
TP5.hs
epl-1.0
1,700
0
10
585
839
441
398
-1
-1
-- Implicit CAD. Copyright (C) 2012, Christopher Olah (chris@colah.ca) -- Released under the GNU GPL, see LICENSE module Graphics.Implicit.Export.Render.HandlePolylines (cleanLoopsFromSegs) where import Graphics.Implicit.Definitions cleanLoopsFromSegs :: [Polyline] -> [Polyline] cleanLoopsFromSegs = map reducePo...
silky/ImplicitCAD
Graphics/Implicit/Export/Render/HandlePolylines.hs
gpl-2.0
3,454
0
17
806
715
400
315
29
5
module PresentationGen.Render ( htmlSlides, pandocToSlides ) where import Data.List import Data.Maybe import Data.String import Data.Monoid import Control.Monad import Text.Blaze import Text.Blaze.Html5 ( Html, toHtml, (!), toValue ) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attri...
jbracker/presentation-gen
src/PresentationGen/Render.hs
gpl-2.0
9,567
0
22
2,407
2,763
1,360
1,403
222
12
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Flow.Action where import Autolib.TES.Identifier import Autolib.Symbol import Autolib.ToDoc import Autolib.Reader import Autolib.Size import Autolib.Hash -- | used in the alphabet for the automaton data Action = Execute Identifier | Halt derivi...
Erdwolf/autotool-bonn
src/Flow/Action.hs
gpl-2.0
565
0
10
120
156
86
70
19
0
{- ********************************************************************** Whitespace - A language with no visible syntax. Copyright (C) 2003 Edwin Brady (e.c.brady@durham.ac.uk) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
haroldl/whitespace-nd
main.hs
gpl-2.0
1,372
2
10
298
111
57
54
16
2
{-# LANGUAGE DeriveDataTypeable, TypeSynonymInstances #-} {- Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu> 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 ...
beni55/texmath
src/Text/TeXMath/Types.hs
gpl-2.0
7,289
0
10
2,336
821
530
291
83
1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 3 of the Lice...
karamellpelle/grid
designer/source/Game/Data/Shape.hs
gpl-3.0
1,028
0
12
218
131
78
53
16
1
module Data.Rhythm.FeedBack.Show (toFile, showFile, showValue) where import Data.Rhythm.FeedBack import qualified Data.EventList.Relative.TimeBody as RTB import qualified Data.EventList.Absolute.TimeBody as ATB import Data.Rhythm.Time import Data.Rhythm.Event toFile :: FilePath -> File Ticks Ticks -> IO () toFile fp ...
mtolly/rhythm
src/Data/Rhythm/FeedBack/Show.hs
gpl-3.0
1,894
0
17
387
806
415
391
43
7
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE StandaloneDeriving #-} module Config where import Data.Data import Data.Default import System.Log.Logger (Priority(..)) data Config = Config { logPriority :: Priority , movementUpdateFrequency :: Double , regenerationUpdateFrequency :: Double , arenaWidth :...
dflemstr/ship
Config.hs
gpl-3.0
1,690
0
8
412
382
248
134
64
0
{-# LANGUAGE OverloadedStrings #-} import SequenceFormats.FreqSum (FreqSumEntry(..), FreqSumHeader(..), readFreqSumStdIn, printFreqSumStdOut) import Control.Error (runScript, tryJust) import Data.List.Split (splitOn) import Data.Monoid ((<>)) import Data.Text (pack) import Data.Version (showVersion) import quali...
stschiff/rarecoal-tools
src-selectInFreqSum/selectInFreqSum.hs
gpl-3.0
1,774
0
14
339
547
297
250
35
1
module Types ( Note(..) , NoteId , NoteSignature(..) , noteIdToText , ApplicationResult(..) , Verbosity(..) ) where import Data.Aeson import Data.Aeson.Types import Data.Text (Text) import Data.Time.Clock (UTCTime) import Data.Time.Format im...
bdesham/pinboard-notes-backup
src/Types.hs
gpl-3.0
2,162
0
17
767
465
268
197
47
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-| Export the StoneEdge Import XML for an Order. -} import Control.Monad (forM) import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger (runNoLoggingT) import Data.Maybe (mapMaybe) import Data.Monoid ((<>)) import Data.Time (utcToLocalTime, ...
Southern-Exposure-Seed-Exchange/southernexposure.com
server/scripts/ExportStoneEdgeXML.hs
gpl-3.0
3,293
0
21
784
975
506
469
67
2
{-# LANGUAGE ViewPatterns #-} module Utils.Mutation where import Prelude hiding (null) import Data.Maybe import Data.ByteString.Lazy import Control.DeepSeq import Control.Monad import System.Random (randomIO) import Test.QuickCheck.Random (mkQCGen) import Test.QuickCheck.Gen import Test.QuickFuzz.Gen.FormatInfo im...
CIFASIS/QuickFuzz
app/Utils/Mutation.hs
gpl-3.0
2,101
0
18
657
541
283
258
49
5
module HEP.Jet.FastJet.Class.ClusterSequenceWithArea where
wavewave/HFastJet
oldsrc/HEP/Jet/FastJet/Class/ClusterSequenceWithArea.hs
lgpl-2.1
60
0
3
4
9
7
2
1
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeSynonymInstances #-} {- Copyright [2014] Tim Dysinger 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 ...
dysinger/khartes
Main.hs
apache-2.0
3,062
0
10
570
788
392
396
48
1
{-| Data.Text instances for cereal. Provides instances for Text and lazy Text -} module Data.Serialize.Text () where import qualified Data.Text as T import qualified Data.Text.Lazy as LT import qualified Data.Text.Encoding as TE import qualified Data.Text.Lazy.Encoding as TLE import Data.Serialize import Cont...
ulikoehler/cereal-text
Data/Serialize/Text.hs
apache-2.0
538
0
7
99
128
81
47
13
0
module PowerDivisibility.A254767 (a254767) where import PowerDivisibility.A048798 (a048798) import Data.Maybe (fromJust) import Data.List (find) a254767 :: Integer -> Integer a254767 n = k * fromJust (find (\j -> n < k * j) cubes) where k = a048798 n cubes = map (^3) [1..]
peterokagey/haskellOEIS
src/PowerDivisibility/A254767.hs
apache-2.0
279
0
12
48
116
65
51
8
1
-- | Tiny DSL for finding a path from the current path. {-# LANGUAGE LambdaCase, PackageImports #-} module System.Directory.PathFinder where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Class import Control.Monad.Trans.Maybe import Control.Monad.Trans.State import Data.List import "lis...
gelisam/hawk
src/System/Directory/PathFinder.hs
apache-2.0
1,662
0
11
310
544
277
267
44
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGridLayout_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine generated - do...
uduki/hsQt
Qtc/Gui/QGridLayout_h.hs
bsd-2-clause
69,572
0
18
15,999
23,029
10,985
12,044
-1
-1
{-# LANGUAGE Haskell2010 #-} module Bug647 where class Bug647 a where f :: a -- ^ doc for arg1 -> a -- ^ doc for arg2 -> a -- ^ doc for arg3
haskell/haddock
html-test/src/Bug647.hs
bsd-2-clause
148
4
8
40
34
20
14
6
0
{-# OPTIONS -fno-warn-orphans -fno-warn-name-shadowing #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Make the dispatcher. module HL.Dispatch () where import HL.Controller.Community im...
bitemyapp/commercialhaskell.com
src/HL/Dispatch.hs
bsd-3-clause
553
0
5
57
71
47
24
16
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Gelatin.GL.Shader ( -- * Loading shaders loadShaders, loadBezShader, loadGeomShader, loadMaskShader, loadProjectedPolylineShader, loadShader, -- * Shader types ShaderProgram, Shader(..), ShaderDef(..),...
cies/gelatin
gelatin-gl/src/Gelatin/GL/Shader.hs
bsd-3-clause
13,528
0
21
3,885
2,960
1,557
1,403
275
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ExistentialQuantification #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Ivory.Language.Area where import Ivory.Language.Proxy import Ivory.Language.Type import qualified Ivory.Language.Syntax as I import G...
Hodapp87/ivory
ivory/src/Ivory/Language/Area.hs
bsd-3-clause
1,129
0
12
214
270
152
118
25
0
-- !!! Testing IOError (part 2) -- These should both raise the same error - not IOErrors! a1 = ["a" !! 1] a2 = writeFile "foo" (["a"] !! 1)
FranklinChen/Hugs
tests/rts/ioerror2.hs
bsd-3-clause
141
0
8
30
35
20
15
2
1
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE OverloadedStrings #-} {-| Module : Relvar.Pretty.BoxesText Description : Text rendering and output to stdout. Copyright : (c) Janthelme, 2016 License : BDS3 Maintainer : janthelme@gmail.com Stability : experimental Portability : POSIX Set of convenience functions...
JAnthelme/relation-tool
src/Relvar/Pretty/BoxesText.hs
bsd-3-clause
14,586
0
14
3,841
3,612
1,949
1,663
-1
-1
-- This is taken from GHC.List in GHC HEAD, 2014-05-09 {-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, MagicHash, RankNTypes, CPP #-} module ListImpls.FusingFoldl #include "exports" where import Prelude (Maybe(..), Bool(..), Int(..), (.), otherwise, (&&), (||), String, error, id) import GHC.Exts (Int(..), Int#, ...
nomeata/list-fusion-lab
ListImpls/FusingFoldl.hs
bsd-3-clause
12,278
0
12
4,406
3,759
2,047
1,712
257
3
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UndecidableInstances #-} module Finance.Exchange.Balance ( Balance ) where -- import Contro...
schernichkin/exchange
src/Finance/Exchange/Balance.hs
bsd-3-clause
2,909
0
11
697
230
128
102
15
0
----------------------------------------------------------------------------- -- | -- Module : Network.HTTP.Stream -- Copyright : (c) Warrick Gray 2002, Bjorn Bringert 2003-2005, 2007 Robin Bate Boerop -- License : BSD -- -- Maintainer : Sigbjorn Finne <sigbjorn.finne@gmail.com> -- Stability : exper...
astro/HTTPbis
Network/HTTP/Stream.hs
bsd-3-clause
10,346
22
29
3,359
1,779
909
870
131
10
module Language.Modelica.Parser.Modification where import Language.Modelica.Syntax.Modelica import Language.Modelica.Parser.Parser (Parser) import Language.Modelica.Parser.Lexer import Language.Modelica.Parser.Basic import Language.Modelica.Parser.Expression import Language.Modelica.Parser.Utility (eitherOr, either...
xie-dongping/modelicaparser
src/Language/Modelica/Parser/Modification.hs
bsd-3-clause
3,801
0
10
457
824
442
382
92
1
{-# OPTIONS_GHC -cpp -XExistentialQuantification -XDeriveDataTypeable -XOverloadedStrings #-} -------------------------------------------------------------------- -- | -- Module : MediaWiki.API -- Description : A Haskell MediaWiki API binding -- Copyright : (c) Sigbjorn Finne, 2008 -- License : BSD3 -- -- Ma...
DanielG/haskell-mediawiki
MediaWiki/API.hs
bsd-3-clause
6,075
24
23
1,312
1,842
950
892
-1
-1
module Opaleye.TF.Scope where data Scope = Z | S Scope
ocharles/opaleye-tf
src/Opaleye/TF/Scope.hs
bsd-3-clause
56
0
6
11
19
12
7
2
0
{-| Module: Data.Astro.Effects.Nutation Description: Calculation effects of nutation Copyright: Alexander Ignatyev, 2016 Calculation effects of nutation. -} module Data.Astro.Effects.Nutation ( nutationLongitude , nutationObliquity ) where import qualified Data.Astro.Utils as U import Data.Astro.Types (DecimalD...
Alexander-Ignatyev/astro
src/Data/Astro/Effects/Nutation.hs
bsd-3-clause
1,644
0
13
312
409
221
188
32
1
module GameStage.Player ( Player (..) , player , update , render , hit , gameOver , shoot ) where import Graphics.Rendering.OpenGL (GLfloat) import Data.Complex import GameStage.GameObject import KeyBind import qualified Class.Sprite as SP import Internal.Texture import qualified GameStage.Bullet as B ...
c000/PaperPuppet
src/GameStage/Player.hs
bsd-3-clause
3,095
0
15
1,309
1,120
594
526
96
4
-- An abstract data type for performing multiple linear regression, -- using Repa as the backend for matrix operations. module Regression.Repa ( model_features, model_outputs, model_weights, model_predictions, model_rss, feature_mean, create_model, create_features, create_weights, ...
markrgrant/regression
src/Regression/Repa.hs
bsd-3-clause
7,104
0
15
1,681
1,979
1,076
903
121
2
{-# LANGUAGE BangPatterns, CPP, ScopedTypeVariables #-} module Happstack.Server.Internal.Listen(listen, listen',listenOn,listenOnIPv4) where import Happstack.Server.Internal.Types (Conf(..), Request, Response) import Happstack.Server.Internal.Handler (request) import Happstack.Server.Internal.Socket ...
Happstack/happstack-server
src/Happstack/Server/Internal/Listen.hs
bsd-3-clause
5,097
0
16
1,299
1,316
686
630
92
3
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE Typ...
takei-shg/Magpie
Model.hs
bsd-3-clause
3,497
0
9
886
747
404
343
66
0
{-# LANGUAGE TupleSections #-} module Data.Tuples where import Control.Applicative import Data.Foldable import Data.Traversable -- 3-tuples fst3 :: (a, b, c) -> a fst3 (x, _, _) = x snd3 :: (a, b, c) -> b snd3 (_, y, _) = y trd3 :: (a, b, c) -> c trd3 (_, _, z) = z instance Functor ((,,) a b) where fmap f (a, b...
sebastiaanvisser/fixpoints
src/Data/Tuples.hs
bsd-3-clause
479
0
8
114
264
154
110
17
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE UnicodeSyntax #-} module File.Create ( tCreateDevice , tCreateLink ) where import qualified Data.ByteString.Char8 as B import System.Fuse import Data.Maybe (catMaybes) import System.Posix.Types (FileMode, D...
marklar/TagFS
src/File/Create.hs
bsd-3-clause
3,739
0
16
1,104
691
359
332
70
3
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.MessageFeedback -- Description : An alternative @sendMessage@. -- Copyright : (c) -- Quentin Moser <moserq@gmail.com> -- 2018 Yclept Nemo -- License : BSD3 -- -- Maintainer ...
xmonad/xmonad-contrib
XMonad/Actions/MessageFeedback.hs
bsd-3-clause
12,093
0
19
1,884
1,478
849
629
99
2
{-| Comment storage in SQLite -} module State.SQLite ( new ) where import Network.URI ( URI, parseRelativeReference ) import Data.Maybe ( listToMaybe, maybeToList ) import Data.List ( intercalate ) import System.IO ( hPutStrLn, stderr ) import qualified Data.Text.Encoding as E import qualified Data.Text as T i...
j3h/doc-review
src/State/SQLite.hs
bsd-3-clause
11,846
0
20
4,115
2,923
1,497
1,426
206
4
{-# LANGUAGE CPP #-} module Gap ( supportedExtensions , getSrcSpan , getSrcFile , renderMsg , setCtx , fOptions , toStringBuffer , liftIO , extensionToString #if __GLASGOW_HASKELL__ >= 702 #else , module Pretty #endif ) where import Control.Applicative hiding (empty) import Control.Monad impor...
johntyree/ghc-mod
Gap.hs
bsd-3-clause
3,646
0
12
611
570
328
242
51
1
module Control.Isomorphism.Partial.Iso ( Iso, unsafeMakeIso, unsafeMakeIso', unsafeMakeNamedIso, unsafeMakeNamedIsoL , unsafeMakeNamedIsoR, unsafeMakeNamedIsoLR, isoRL, isoLR, isoName , isoShowSL, isoShowSR, isoShowL, isoShowR , isoFailedErrorMessageL, isoFailedErrorMessageR ) where data Iso a b = Iso { ...
skogsbaer/roundtrip
src/Control/Isomorphism/Partial/Iso.hs
bsd-3-clause
3,564
0
12
1,475
1,033
558
475
68
2
module Ast where type Prog = [Sent] data IsRec = Rec | NonRec deriving (Show, Eq) data Sent = Def IsRec Idt [Idt] Expr | Sent Expr deriving (Show, Eq) data Expr = Let IsRec Idt [Idt] Expr Expr | Fun Idt Expr | If Expr Expr Expr | LChar Char | LString String | LList [Expr] | LIdt Idt | Pipe Exp...
wass80/CoCaml
src/Ast.hs
bsd-3-clause
1,183
0
8
263
244
142
102
27
1
module Data.Git.Index ( ) where import Control.Applicative import Data.Git.Ref {- <INDEX_HEADER> : "DIRC" <INDEX_FILE_VERSION> <INDEX_ENTRY_COUNT> ; -} data IndexHeader = IndexHeader Word32 Word32 deriving (Show,Eq) parseBe32 = be32 <$> A.take 4 parseBe16 = be16 <$> A.take 2 parseRef = fromBina...
NicolasDP/hit
Data/Git/Index.hs
bsd-3-clause
2,734
0
10
711
339
174
165
-1
-1
{-# LANGUAGE RebindableSyntax #-} -- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) -- A fixed deserialization buffer provider can only provided a fixed number of bytes to a -- deserialization action. Requesting more bytes than in the buffer should fail. -- -- This might act...
coreyoconnor/bind-marshal
test/verify_desaction_dynamic_fixed_buffer_fail.hs
bsd-3-clause
2,090
0
17
415
378
201
177
-1
-1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.O...
rfranek/duckling
tests/Duckling/Ordinal/IT/Tests.hs
bsd-3-clause
600
0
9
96
80
51
29
11
1
{-# LANGUAGE DuplicateRecordFields #-} module Gli.Cli where import qualified Data.Map.Strict as M import Data.Maybe import qualified Data.Text as T import qualified Data.Yaml as Y import Gli.Gitlab import Gli.Setup import Gli.Types import Optio...
goromlagche/gli
src/gli/cli.hs
bsd-3-clause
2,503
0
20
929
618
313
305
61
3
-- Caeser cipher example from chapter 5 of Programming in Haskell, -- Graham Hutton, Cambridge University Press, 2016. import Data.Char -- Encoding and decoding let2int :: Char -> Int let2int c = ord c - ord 'a' int2let :: Int -> Char int2let n = chr (ord 'a' + n) shift :: Int -> Char -> Char shift n c | isLower c...
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/cipher.hs
gpl-3.0
1,548
0
11
435
744
398
346
35
1
{-# LANGUAGE DeriveDataTypeable #-} module Graphics.ImageMagick.MagickCore.Exception ( MagickWandException(..) -- * support for ImageMagick Exceptions , ExceptionCarrier(..) , ExceptionSeverity , ExceptionType ) where import Control.Exception.Base import Data.Typeable import G...
flowbox-public/imagemagick
Graphics/ImageMagick/MagickCore/Exception.hs
apache-2.0
770
0
8
136
144
84
60
16
0
module Util where import Test.Inspection import Test.HUnit.Base mkHUnitTest :: Result -> Test mkHUnitTest r = TestCase $ case r of Success _s -> return () Failure s -> assertFailure s
kcsongor/generic-lens
generic-optics/test/Util.hs
bsd-3-clause
197
0
10
43
66
34
32
8
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="ru-RU"> <title>Server-Sent Events | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/sse/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
991
80
67
160
439
221
218
-1
-1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-2012 Note [Unarisation] ~~~~~~~~~~~~~~~~~~ The idea of this pass is to translate away *all* unboxed-tuple binders. So for example: f (x :: (# Int, Bool #)) = f x + f (# 1, True #) ==> f (x1 :: Int) (x2 :: Bool) = f x1 x2 + f 1 True It is important that we do...
oldmanmike/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
6,552
0
13
1,387
1,921
993
928
111
3
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} import Control.CP.FD.Example main = example_sat_main_single_expr model model :: ExampleModel ModelInt model n = exists $ \col -> do size col @= n loopall (0,(n-1)) $ \i -> do let v0 = col ! i v1 = col ! ((i+1) `mod` n) v2 = col !...
neothemachine/monadiccp
examples/Ring.hs
bsd-3-clause
408
0
20
112
193
102
91
14
1
{-# LANGUAGE RelaxedPolyRec #-} -- needed for inlinesBetween on GHC < 7 {-# LANGUAGE ScopedTypeVariables #-} {- Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu> 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 S...
poxu/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
73,665
0
28
20,522
21,691
10,721
10,970
1,625
7
{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE PolyKinds, RankNTypes #-} module SAKS_016 where import Data.Kind (Type) type T :: forall k. k -> forall j. j -> Type data T (x :: hk) (y :: hj)
sdiehl/ghc
testsuite/tests/saks/should_compile/saks016.hs
bsd-3-clause
202
0
8
38
57
37
20
-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="ms-MY"> <title>Revisit | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loca...
thc202/zap-extensions
addOns/revisit/src/main/javahelp/org/zaproxy/zap/extension/revisit/resources/help_ms_MY/helpset_ms_MY.hs
apache-2.0
968
78
66
158
411
208
203
-1
-1
-- | This is designed to be used as -- -- > qualified import Yesod.Core.Unsafe as Unsafe -- -- This serves as a reminder that the functions are unsafe to use in many situations. module Yesod.Core.Unsafe (runFakeHandler, fakeHandlerGetLogger) where import Yesod.Core.Internal.Run (runFakeHandler) import Yesod.Core.Type...
ygale/yesod
yesod-core/Yesod/Core/Unsafe.hs
mit
824
0
10
161
169
101
68
12
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} module T12133 where import GHC.Classes (IP(....
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T12133.hs
bsd-3-clause
2,244
0
10
621
256
155
101
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Idris.TypeSearch ( searchByType, searchPred, defaultScoreFunction ) where import Control.Applicative (Applicative (..), (<$>), (<*>), (<|>)) import Control.Arrow (first, second, (&&&), (***)) import Control.Monad (when, guard) import Data.List (find, partition, (\\)) imp...
mrmonday/Idris-dev
src/Idris/TypeSearch.hs
bsd-3-clause
22,922
0
20
5,429
8,529
4,582
3,947
409
22
module ShouldSucceed where type H = (Int,Bool)
siddhanathan/ghc
testsuite/tests/typecheck/should_compile/tc028.hs
bsd-3-clause
48
0
5
8
16
11
5
2
0
-- !!! Newtypes -- This one made ghc 5.01 (after newtype squashing) fall over -- by generating Core code that contained a pattern match on -- the InPE data constructor (which doesn't exist) module Main where data Expr e = One e | Many [e] newtype PExpr a = InPE (Expr (PExpr a), Int) one :: Int -> PExpr e -> PExpr...
urbanslug/ghc
testsuite/tests/typecheck/should_run/tcrun014.hs
bsd-3-clause
531
0
14
118
222
120
102
10
1
module Verba.Formatting where label :: String -> String label str = "\o33[2;49;37m" ++ str ++ "\o33[0m" success :: String -> String success str = "\o33[0;32m" ++ str ++ "\o33[0m" warning :: String -> String warning str = "\o33[0;33m" ++ str ++ "\o33[0m"
Jefffrey/Verba
src/Verba/Formatting.hs
mit
257
0
6
45
81
43
38
7
1
import qualified Data.ByteString.Lazy.Char8 as BS main :: IO () main = do contents <- BS.getContents -- all IO in one go BS.putStr contents
feliposz/spoj-solutions
haskell/bstest.hs
mit
146
0
8
29
44
24
20
5
1
{-# LANGUAGE OverloadedStrings #-} module BenchNames where import qualified Data.ByteString.Lazy as BS import Data.Aeson import Control.Applicative import Control.Monad import qualified Data.Map as M import qualified Data.Text as T import Data.List import Paths import JsonUtils import ReportTypes import qualified Ben...
nomeata/gipeda
src/BenchNames.hs
mit
1,077
0
20
333
327
185
142
31
1
module Ethereum.RLP(module X) where import Ethereum.RLP.Item as X import Ethereum.RLP.Convert as X
bkirwi/ethereum-haskell
src/Ethereum/RLP.hs
mit
100
0
4
13
28
20
8
3
0
module Latro.ILGen where import Control.Monad.Writer import Data.Char (toLower) import Latro.Ast import Latro.Compiler import Latro.Semant ilGenClause :: Show a => CaseClause a UniqId -> ILWriter ILCase a ilGenClause (CaseClause p patE bodyE) = do bodyE' <- ilGen bodyE return $ ILCase p (ilGenPat patE) bodyE' ...
Zoetermeer/latro
src/Latro/ILGen.hs
mit
5,618
0
12
1,411
2,340
1,103
1,237
159
15
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.RTCTrackEvent (newRTCTrackEvent, getReceiver, getTrack, getStreams, getTransceiver, RTCTrackEvent(..), gT...
ghcjs/jsaddle-dom
src/JSDOM/Generated/RTCTrackEvent.hs
mit
2,573
0
10
347
585
350
235
39
1
module Numeric.Limp.Solvers.Cbc ( Error(..) , solve ) where import qualified Numeric.Limp.Canon as C import Numeric.Limp.Program import Numeric.Limp.Rep import qualified Numeric.Limp.Solvers.Cbc.Solve as S import Numeric.Limp.Solvers.Cbc.Error solve :: (Ord z, Ord r) => Program z r IntDouble -> Either Err...
amosr/limp-cbc
src/Numeric/Limp/Solvers/Cbc.hs
mit
401
0
10
73
135
80
55
12
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} import Data.Aeson import Control.Applicative import qualified Data.ByteString.Lazy as B import GHC.Generics data Person = Person { name :: String , email :: String , created_at :: String ...
slon1024/haskell_read_data
Json.hs
mit
688
0
12
206
185
98
87
20
2
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Elm.Decoder ( toElmDecoderRef , toElmDecoderRefWith , toElmDecoderSource , toElmDecoderSourceWith ) where import Con...
InfernalKnight/elm-export
src/Elm/Decoder.hs
epl-1.0
4,727
0
23
1,380
1,368
675
693
108
1
{-# LANGUAGE TemplateHaskell #-} module Control.Semester.Typ where import Control.Types import Autolib.Reader import Autolib.ToDoc import Data.Typeable -- | das sollte exactly das sein, was auch in DB-tabelle steht data Semester = Semester { enr :: ENr , unr :: UNr -- jedes Semester ist einer Schule...
florianpilz/autotool
src/Control/Semester/Typ.hs
gpl-2.0
616
4
9
155
121
75
46
15
0
module Tema_7_Spec (main, spec) where import Tema_7 import Test.Hspec import Prelude hiding (id, foldr, foldl, (.)) import Test.QuickCheck import Data.Char main :: IO () main = hspec spec spec :: Spec spec = do describe "dosVeces" $ do it "e1" $ dosVeces (*3) 2 `shouldBe` 18 it "e2" $ ...
jaalonso/I1M-Cod-Temas
test/Tema_7_Spec.hs
gpl-2.0
2,355
0
14
680
1,230
684
546
80
1
{-# LANGUAGE DeriveDataTypeable #-} module Syntax.Syntax where import Data.Generics (Data, Typeable) data Graph = Chain Graph Graph | Fork Graph Graph | Loop Graph | Terminal String | Symbol String | Empty deriving (Eq, Data, Typeable) type ...
Erdwolf/autotool-bonn
src/Syntax/Syntax.hs
gpl-2.0
402
0
6
131
87
53
34
11
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE U...
Ferdinand-vW/sessiontypes
src/Control/SessionTypes/MonadSession.hs
gpl-3.0
6,438
0
16
1,518
2,365
1,252
1,113
90
1
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} module LiName.Config ( getConf, loadConfigFile ) where import LiName.Options import LiName.Types import Control.Applicative ((<$>)) import Control.Exception import Control.Lens import Data.Default (def) import Data.Text (pack, Text) import qualified Data....
anekos/liname-hs
src/LiName/Config.hs
gpl-3.0
2,275
0
14
500
674
363
311
59
2
module Functions.InfixOpParser (infixParser ) where import Functions.InfixOperations import Functions.FunctionMaps --Infix Operation Block Check infFMKeyList :: [String] infFMKeyList = getFMKeys infixFunctionMap infFMValList :: [ (Double->Double->Double) ] infFMValList = getFMVals infixFunctionMap --Parentheses...
LeoMingo/RPNMathParser
Functions/InfixOpParser.hs
gpl-3.0
776
0
9
247
180
95
85
14
1
module Tests.TemplateHaskell where import QFeldspar.MyPrelude import Language.Haskell.TH.Syntax add :: Word32 -> Word32 -> Word32 add = (+) dbl :: Q (TExp (Word32 -> Word32)) dbl = [||\ x -> add x x ||] compose :: Q (TExp ((tb -> tc) -> (ta -> tb) -> ta -> tc)) compose = [|| \ x2 -> \ x1 -> \ x0 -> x2 (x1 ...
shayan-najd/QFeldspar
Tests/TemplateHaskell.hs
gpl-3.0
399
6
14
96
201
112
89
-1
-1
{-| Module : Alpaca.MaMa.Machine Description : Alpaca Machine Maintainer : sascha.rechenberger@uni-ulm.de Stability : stable Portability : portable Copyright : (c) Sascha Rechenberger, 2014 License : GPL-3 This file is part of Alpaca. Alpaca is free software: you can redistribute it and/or mo...
SRechenberger/Alpaca
src/Alpaca/MaMa/Machine.hs
gpl-3.0
17,316
0
43
7,378
5,265
2,639
2,626
279
32
module Main where import Mudblood.Screen.Vty import Mudblood import MGExperimental import System.Environment main :: IO () main = do args <- getArgs userpath <- initUserPath [] profpath <- case args of [profile] -> initUserPath ["mg", profile] _ -> initUserPath ["mg"] execScree...
talanis85/mudblood
main/Main-MG-Experimental-Vty.hs
gpl-3.0
401
0
12
92
126
65
61
13
2
{- | Module : Main Description : The Tank game Copyright : (c) Frédéric BISSON, 2015 License : GPL-3 Maintainer : zigazou@free.fr Stability : experimental Portability : POSIX The Tank game is a simple game where 2 tanks fight each other on a playfield. They can fire missiles, drop mines in order to destr...
Zigazou/Tank
src/Main.hs
gpl-3.0
1,733
0
17
480
406
221
185
32
3
module Relations.RelationHelper where import Domains.Domain import Domains.DomainHelper import Domains.Dimensionable import Domains.DomainElement import FuzzySets.FuzzySet import FuzzySets.CalculatedFuzzySet import Relations.Relation import ...
mrlovre/super-memory
Pro2/src/Relations/RelationHelper.hs
gpl-3.0
2,508
0
19
625
923
474
449
-1
-1
module Lambda.Eval ( evalTree ) where import Lambda.Symbols import Lambda.Ast import Lambda.Reducer import Text.Parsec data Action = Action Int LambdaTerm Reduction instance Show Action where show (Action n l r) = show n ++ ": " ++ show l ++ " " ++ show r ++ "\n" tupleToAction :: (LambdaTerm, Reduction) -> Acti...
KuroAku/lambda
src/Lambda/Eval.hs
gpl-3.0
1,605
0
12
325
531
269
262
38
2