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
{-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE ScopedTypeVariables #-} module PlatesGenerationTest where import Test.Framework import PlatesGeneration import qualified Data.Array.Repa as R import qualified HeightMap.Base as HB import qualified Data.Map.Strict as M import qualified Data.List as L import Geometry impo...
ftomassetti/hplatetectonics
test/PlatesGenerationTest.hs
apache-2.0
1,447
0
14
290
457
229
228
34
1
import Helpers.Factorials (binomial, factorial) import Data.List (permutations, genericLength, sort, (\\)) import qualified Data.MemoCombinators as Memo a332709T :: Integer -> Integer -> Integer a332709T n k | k < 3 = 0 | k > n = 0 | otherwise = sum $ map f [0..n-1] where f i = coefficient * sum (map g...
peterokagey/haskellOEIS
src/Sandbox/Richard/menage.hs
apache-2.0
3,806
0
17
854
1,689
897
792
81
3
{-# LANGUAGE Haskell2010 #-} module Simple (foo) where -- | This is foo. foo :: t foo = undefined
haskell/haddock
latex-test/src/Simple/Simple.hs
bsd-2-clause
99
0
4
20
21
14
7
4
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} module Objective.C.Selector ( -- * Selectors Selector(..) , isMapped -- * Arbitrary selectors , Sel(..) ) whe...
ekmett/objective-c
Objective/C/Selector.hs
bsd-3-clause
1,764
0
14
350
519
277
242
50
1
module Sexy.Functions.Bool ( fromBool , toBool , (&&) , (||) , not ) where import Sexy.Core fromBool :: (BoolC b, BoolC b') => b -> b' fromBool = bool true false toBool :: (BoolC b) => b -> Bool toBool = fromBool (&&) :: BoolC b => b -> b -> b x && y = bool y x x (||) :: BoolC b => b -> b -> b x || y...
DanBurton/sexy
src/Sexy/Functions/Bool.hs
bsd-3-clause
382
0
7
111
196
107
89
17
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} module...
dalaing/type-systems
src/Fragment/SystemFw/Rules/Type/Infer/SyntaxDirected.hs
bsd-3-clause
4,182
0
20
1,050
1,556
798
758
93
1
{-# LANGUAGE LambdaCase #-} module Transformations.CountVariableUse where import Data.Functor.Foldable as Foldable import Data.Set (Set) import Data.Map (Map) import qualified Data.Map as Map import Data.Monoid import qualified Data.Foldable import Transformations.Util import Grin.Grin countVariableUse :: Exp -> M...
andorp/grin
grin/src/Transformations/CountVariableUse.hs
bsd-3-clause
624
0
14
87
192
108
84
15
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module Main where import Control.Concurrent.MVar import Control.Concurrent.STM.TQueue ( newTQueueIO , readTQueue , writeTQueue ) import Control.Exception (SomeException) import Control.DeepSeq (NFData) i...
haskell-distributed/distributed-process-client-server
tests/TestPrioritisedProcess.hs
bsd-3-clause
25,244
3
26
7,188
6,493
3,320
3,173
468
2
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Web.RTBBidder.Protocol.Adx.BidRequest.Video.VideoProtocol (VideoProtocol(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import q...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Protocol/Adx/BidRequest/Video/VideoProtocol.hs
bsd-3-clause
4,969
0
11
902
1,185
657
528
106
1
module Diff.Compare where import Control.Applicative ((<$>), (<*>)) import Control.Monad (zipWithM) import Data.Function (on) import qualified Data.List as List import qualified Data.Map as Map import qualified Data.Set as Set import qualified Data.Text as Text import qualified Catalog import qualified Elm.Compiler.M...
laszlopandy/elm-package
src/Diff/Compare.hs
bsd-3-clause
9,455
0
16
2,635
3,039
1,611
1,428
255
12
module Web.Handler.HomePage (handleMonad) where import qualified Web.View.HomePage as HomePageView import qualified Service.Users import qualified Web.WebHandler handleMonad :: Web.WebHandler.HandlerMonad () handleMonad = do user <- Web.WebHandler.callService Service.Users.getUser Web.WebHandler.renderVi...
stevechy/HaskellCakeStore
Web/Handler/HomePage.hs
bsd-3-clause
372
0
9
58
91
52
39
10
1
{-# LANGUAGE OverloadedStrings #-} module Main where import ECC.Tester import ECC.Types import Data.Monoid import qualified ECC.Code.Unencoded as Unencoded import qualified ECC.Code.LDPC.Reference.Orig as OrigReference import qualified ECC.Code.LDPC.Reference.Sparse as Sparse import qualified ECC.Code.LDPC.Reference...
ku-fpg/ecc-ldpc
main/Main.hs
bsd-3-clause
1,930
0
21
237
370
256
114
32
1
module Data.Set.AsSet ( module Data.Set.AsSet ) where -- generated by https://github.com/rvion/ride/tree/master/jetpack-gen import qualified Data.Set as I -- set_delete :: forall a. Ord a => a -> Set a -> Set a set_delete = I.delete -- set_deleteAt :: forall a. Int -> Set a -> Set a set_deleteAt = I.deleteAt -...
rvion/ride
jetpack/src/Data/Set/AsSet.hs
bsd-3-clause
4,434
0
6
923
453
285
168
56
1
module Main where import Animations ( Behavior(AndThen)) import Animations.Pure ( Push(Wait), wait, waitForever, race, Pull, at, sample, Time(Time)) import Animations.Prelude ( unfold) import Linear ( (*^), (^+^), V2(V2)) import Data.These ( These(This,That,These)) import Control.Concurrent ( threadDel...
phischu/animations
src/BallExample.hs
bsd-3-clause
2,793
0
15
618
1,184
616
568
85
5
{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Language.Wart.Type....
sonyandy/wart
src/Language/Wart/Type/Graphic.hs
bsd-3-clause
3,647
0
13
746
1,447
774
673
-1
-1
module Network.Riak.HTTP ( put, tryPut, putWithRandomKey, putWithIndexes, get, tryGet, delete, tryDelete, lookupIndex, lookupIndexRange, tryClients, getListOfKeys, defaultClient, Types.host, Types.port, Client, Bucket, Key, IndexKey, IndexValue (..), IndexTag, module Network.Riak.HTTP.MapReduce ) wh...
ThoughtLeadr/Riak-Haskell-HTTP-Client
src/Network/Riak/HTTP.hs
bsd-3-clause
1,246
0
13
195
365
209
156
24
1
module GraphDraw.TestFgl where import Data.Graph.Inductive.Example import Data.Graph.Inductive.Graph import Data.Graph.Inductive import System.Random import Control.Monad import Data.List import Data.Maybe import System.IO.Unsafe import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine initGraph :: a -> ((Double,...
prash471/GraphDraw
GraphDraw/TestFgl.hs
bsd-3-clause
3,057
0
13
646
1,501
830
671
67
3
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.BeginEnd -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : provis...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/BeginEnd.hs
bsd-3-clause
6,344
9
11
720
532
343
189
-1
-1
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, TypeSynonymInstances #-} -- |This module provides a 'List' widget for rendering a list of -- arbitrary widgets. A 'List' shows a number of elements and -- highlights the currently-selected widget. It supports key events -- to navigate the list and will automatically...
KommuSoft/vty-ui
src/Graphics/Vty/Widgets/List.hs
bsd-3-clause
23,889
0
23
7,711
6,031
3,123
2,908
444
10
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module LambdaLudo ( Square , Step , Handle , Config(..) , Color(..) , EngineEvent(..) , runGame , RWS.get , RWS.put , RWS.modify , module LambdaLudo.EDSL , module SDL.Input.Keyboard.Codes ) where import LambdaLudo.EDSL import LambdaLudo.Ty...
tauli/LambdaLudo
src/LambdaLudo.hs
bsd-3-clause
6,761
0
17
1,650
3,049
1,554
1,495
181
3
module SimulationDSL.Data.ExpType ( ExpType(..) ) where data ExpType = ExpTypeScalar | ExpTypeVector deriving Eq instance Show ExpType where show ExpTypeScalar = "Scalar" show ExpTypeVector = "Vector"
takagi/SimulationDSL
SimulationDSL/SimulationDSL/Data/ExpType.hs
bsd-3-clause
256
0
6
81
53
31
22
7
0
-- | Needleman/Wunsch global alignment of two sequences module ADP.Tests.AlignmentExample where import ADP.Debug import ADP.Multi.All import ADP.Multi.Rewriting.All type Alignment_Algebra alphabet answer = ( (EPS,EPS) -> answer, -- nil alphabet -> answer -> an...
adp-multi/adp-multi
tests/ADP/Tests/AlignmentExample.hs
bsd-3-clause
2,438
0
28
750
1,072
599
473
64
3
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-| Module : Numeric.AERN.Basics.Interval.RefinementOrder Description : interval instances of refinement-ordered structures Copyright : (c) Michal Konecny, J...
michalkonecny/aern
aern-interval/src/Numeric/AERN/Basics/Interval/RefinementOrder.hs
bsd-3-clause
16,233
30
17
4,817
3,921
2,153
1,768
311
13
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE NoMonoPatBinds #-} module Example where import Data.Piso import Data.Piso.TH data Person = Person { name :: String , gender :: Gender , age :: Int , location :: Coords } deriving (Eq, Show) data Gender = Male | Female...
MedeaMelana/Piso
ExampleTH.hs
bsd-3-clause
711
0
10
156
262
148
114
23
1
import System.Time.Monotonic.Direct import Data.Word (Word32) import Data.Time.Clock (DiffTime) test :: DiffTime -> Word32 -> Word32 -> IO Bool test expected new old = return $ diffMSec32 new old == expected && diffMSec32 old new == -expected where diffMSec32 = systemClockDiffTime systemClo...
joeyadams/haskell-system-time-monotonic
testing/diffMSec32.hs
bsd-3-clause
740
0
10
189
261
125
136
20
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} import Control.Lens ((^.), (.~), (%~), (&), ix, over, mapping) import Control.Monad (forM, forM_, when, foldM, join, (>>)) import Control.Monad.IO.Class (liftI...
bjoeris/orbits-haskell-tensorflow
app/Main.hs
bsd-3-clause
3,407
0
22
808
1,051
591
460
-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.N...
rfranek/duckling
tests/Duckling/Numeral/FR/Tests.hs
bsd-3-clause
600
0
9
96
80
51
29
11
1
-- | Handler that allows looking up video's on YouTube {-# LANGUAGE OverloadedStrings #-} module NumberSix.Handlers.YouTube ( handler ) where -------------------------------------------------------------------------------- import Control.Applicative ((<$>)) import Control.Monad.Trans (li...
itkovian/number-six
src/NumberSix/Handlers/YouTube.hs
bsd-3-clause
1,755
0
17
409
340
187
153
29
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- -- The register liveness determinator -- -- (c) The University of Glasgow 2004-2013 -- --------------------...
sgillespie/ghc
compiler/nativeGen/RegAlloc/Liveness.hs
bsd-3-clause
37,132
0
22
13,677
7,717
3,944
3,773
628
6
{- Copyright 2015 Google Inc. All rights reserved. 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 a...
Ye-Yong-Chi/codeworld
codeworld-base/src/Data/Bool.hs
apache-2.0
733
0
4
136
23
17
6
4
0
{-# LANGUAGE DoRec #-} -- | Make sure this program runs without leaking memory import FRP.Sodium import Data.Maybe import Control.Applicative import Control.Exception import Control.Monad import Control.DeepSeq import System.Timeout verbose = False flam :: Event () -> Behavior Int -> Reactive (Behavior (Maybe Int)) f...
kevintvh/sodium
haskell/examples/tests/memory-test-8.hs
bsd-3-clause
2,260
0
24
1,016
549
274
275
38
2
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1996-1998 Printing of Core syntax -} {-# OPTIONS_GHC -fno-warn-orphans #-} module PprCore ( pprCoreExpr, pprParendExpr, pprCoreBinding, pprCoreBindings, pprCoreAlt, pprRules ) where import CoreSyn import Lite...
fmthoma/ghc
compiler/coreSyn/PprCore.hs
bsd-3-clause
18,693
0
20
5,649
5,185
2,594
2,591
336
7
{- (c) The University of Glasgow 2006-2008 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP, NondecreasingIndentation #-} -- | Module for constructing @ModIface@ values (interface files), -- writing them to disk and comparing two versions to see if -- recompilation is required. module MkI...
acowley/ghc
compiler/iface/MkIface.hs
bsd-3-clause
88,502
963
24
28,074
11,814
7,194
4,620
-1
-1
module Main where import Lib main :: IO () main = undefined
joranvar/StandupMaths-FourHasFourLetters
app/Main.hs
gpl-3.0
62
0
6
14
22
13
9
4
1
module Foo () where {-@ foo :: forall a <p :: x0:Int -> x1:a -> Prop>. (i:Int -> j : Int-> a<p (i+j)>) -> ii:Int -> jj:Int -> a <p (ii+jj)> @-} foo :: (Int -> Int -> a) -> Int -> Int -> a foo f i j = f i j
mightymoose/liquidhaskell
tests/pos/pargs1.hs
bsd-3-clause
258
0
8
105
53
29
24
3
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding -- Copyright : (c) The University of Glasgow, 2008-2009 -- License : see libraries/...
snoyberg/ghc
libraries/base/GHC/IO/Encoding.hs
bsd-3-clause
11,778
0
13
2,190
1,374
828
546
106
11
import Data.IORef main :: IO () main = do ref <- newIORef 10000 n <- readIORef ref print $ length $ [0::Int, 2 .. n]
ezyang/ghc
testsuite/tests/perf/should_run/T13001.hs
bsd-3-clause
124
0
8
32
64
32
32
6
1
import CabalMessage (message) import System.Exit import System.IO main = hPutStrLn stderr message >> exitFailure
mydaum/cabal
cabal-testsuite/PackageTests/Regression/T3932/Setup.hs
bsd-3-clause
114
0
6
15
33
18
15
4
1
{-# LANGUAGE CPP #-} ------------------------------------------------------------------------------- -- -- | Platform constants -- -- (c) The University of Glasgow 2013 -- ------------------------------------------------------------------------------- module PlatformConstants (PlatformConstants(..)) where #include "...
urbanslug/ghc
compiler/main/PlatformConstants.hs
bsd-3-clause
390
0
5
30
22
18
4
2
0
import System.IO main = do hGetBuffering stdin >>= print hGetBuffering stdout >>= print
ghc-android/ghc
testsuite/tests/ghc-e/should_run/T2228.hs
bsd-3-clause
92
0
8
17
31
14
17
4
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Data.Array.Accelerate.TypeLits.System.Random.MWC ( rndMatrixWith , rndVectorWith , module Distributions ...
epsilonhalbe/accelerate-typelits
src/Data/Array/Accelerate/TypeLits/System/Random/MWC.hs
isc
1,489
0
10
403
387
221
166
26
1
{-# LANGUAGE ForeignFunctionInterface #-} import Foreign import Foreign.C.Types foreign import ccall "math.h sin" c_sin :: CDouble -> CDouble fastsin :: Double -> Double fastsin x = realToFrac (c_sin (realToFrac x)) main = mapM_ (print . fastsin) [0/10, 1/10 .. 10/10]
zhangjiji/real-world-haskell
ch17/SimpleFFI.hs
mit
275
0
9
46
97
53
44
8
1
{-# LANGUAGE CPP #-} -- | Parser module for NBP3 module KD8ZRC.Flight.NBP3.Parser where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<$>)) #endif import qualified Data.ByteString.Char8 as BRC import Data.Char (digitToInt) import Data.Geo.Coordinate import Data.List (dropWhileEnd, foldl') import qualified...
noexc/mapview-noexc
src/KD8ZRC/Flight/NBP3/Parser.hs
mit
2,344
0
22
555
661
342
319
56
3
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Graphics.UI.FLTK.LowLevel.FL as FL import Graphics.UI.FLTK.LowLevel.FLTKHS main :: IO () main = do w1 <- doubleWindowNew (Size (Width 220) (Height 220)) Nothing (Just "clock") begin w1 c1 <- clockNew (toRectangle (0,0,220,220)) Nothing setRe...
deech/fltkhs-demos
src/Examples/clock.hs
mit
672
0
12
125
284
137
147
23
1
module StringCalculator.Split (split) where import Text.Regex.Posix import StringCalculator.Input import StringCalculator.Models.DelimitedInput split input = _split numbers delimiter [] where (DelimitedInput delimiter numbers) = refine input _split "" _ acc = acc _split input delimiter acc = _split ta...
jtrim/string-calculator-hs
src/StringCalculator/Split.hs
mit
554
0
8
105
179
100
79
-1
-1
import Data.ObjectName (genObjectNames) import Graphics.Rendering.OpenGL.GL.Texturing.Objects (textureBinding) import Graphics.Rendering.OpenGL.GL.Texturing.Specification (TextureTarget(..)) -- ... -- Generate 1 texture object [texObject] <- genObjectNames 1 -- Make it the "currently bound 2D texture" textureBinding...
spetz911/progames
_src/lab4.hs
mit
1,442
3
9
338
296
177
119
-1
-1
module Config where width = 640 :: Int height = 480 :: Int
mdietz94/haskellgame
src/Config.hs
mit
59
0
4
13
20
13
7
3
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies, ViewPatterns, MultiParamTypeClasses, FlexibleInstances #-} module Main where {- A demonstration of streaming response body. Note: Most browsers will NOT display the streaming contents as is. Try CURL to see the effect of streaming. "curl ...
ajnsit/wai-routes
examples/streaming-response/src/Main.hs
mit
1,363
0
14
249
267
140
127
30
1
module Sandbox.DataStructures.Tree (Tree(Node, EmptyTree), treeHeight) where data Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving (Show, Read, Eq) treeHeight :: (Tree a) -> Int treeHeight EmptyTree = 0 treeHeight (Node a left right) = 1 + max (treeHeight left) (treeHeight...
olkinn/my-haskell-sandbox
src/Sandbox/DataStructures/Tree.hs
mit
327
0
8
85
127
70
57
8
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} module PostgREST.Middleware where import Crypto.JWT import Data.Aeson (Value (..)) import qualified Data.HashMap.Strict as M import qualified Hasql.Transaction ...
ruslantalpa/postgrest
src/PostgREST/Middleware.hs
mit
2,688
0
18
763
653
357
296
50
4
{-# LANGUAGE DeriveDataTypeable #-} module Main where import Lib import System.Console.CmdArgs data MakeDictArgs = MakeDictArgs { url :: String } deriving (Show, Data, Typeable) makedictargs = MakeDictArgs { url = "https://downloads.haskell.org/~ghc/latest/docs/html/libraries/" &= args ...
yasukun/make-ac-dict-ghc
app/Main.hs
mit
513
0
16
124
167
86
81
15
1
module Helpers.TestWebServer ( module Helpers.RequestSpecHelpers , app , testAppConfig , with , withWebServer ) where import App (AppT, AppConfig (..), getAppConfig, runAppT) import Config.Environment (Environment (Test)) import Helpers.RequestSpecHelpers import LoadEnv import Network.Wai (Application) imp...
gust/feature-creature
auth-service/test/Helpers/TestWebServer.hs
mit
879
0
10
135
263
146
117
-1
-1
-- | Allow reading, merging and writing Erlang terms. module B9.Artifact.Content.ErlangPropList ( ErlangPropList (..), textToErlangAst, stringToErlangAst, ) where import B9.Artifact.Content import B9.Artifact.Content.AST import B9.Artifact.Content.ErlTerms import B9.Artifact.Content.StringTemplate import B...
sheyll/b9-vm-image-builder
src/lib/B9/Artifact/Content/ErlangPropList.hs
mit
4,619
9
24
1,144
1,446
766
680
91
1
{-# LANGUAGE NoMonomorphismRestriction, RelaxedPolyRec #-} module Atomo.Parser where import Atomo.Error import Atomo.Internals import Atomo.Primitive import Control.Monad import Control.Monad.Error import Control.Monad.Identity import Data.List (intercalate, nub, sort, sortBy, groupBy) import Data.Char (isAlpha, toL...
vito/atomo-old
Atomo/Parser.hs
mit
33,906
0
28
14,614
8,809
4,374
4,435
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module IHaskell.Display.Widgets.Int.IntText ( -- * The IntText Widget IntText -- * Constructor , mkIntText ) where -- To keep `cab...
gibiansky/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/IntText.hs
mit
2,048
0
15
502
396
221
175
46
1
module Util.StringBuffer(StringBuffer, newSB, appendSB, readSB) where import Data.IORef import Control.Monad data StringBuffer = StringBuffer (IORef [String]) newSB = liftM StringBuffer $ newIORef [] appendSB sb s = modifyIORef sb (s :) readSB = readIORef >=> return . concat
raimohanska/rump
src/Util/StringBuffer.hs
gpl-3.0
278
0
9
40
97
54
43
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module Protocol where import Prelude hiding (catch) import Data.Binary import Data.Binary.Get import Data.Binary.Put import System.IO.Unsafe import System.Random import Network.Socket hiding (send, sendTo, recv, recvFrom) import Network.Socket.ByteString import qualified Data.ByteS...
igraves/rabin-haskell
Protocol.hs
gpl-3.0
6,339
0
16
2,981
1,679
839
840
136
3
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -funbox-strict-fields #-} module Engine where import qualified Data.Vector.Storable as S import Graphics.Rendering.OpenGL.Raw import Graphics.Rendering.FTGL import Foreign.C import Foreign import Geometr...
mikeplus64/plissken
src/Engine.hs
gpl-3.0
4,475
0
13
1,079
1,228
605
623
137
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="ru-RU"> <title>Directory List v2.3 LC</title> <maps> <homeID>directorylistv2_3_lc</homeID> ...
secdec/zap-extensions
addOns/directorylistv2_3_lc/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs
apache-2.0
984
83
52
158
397
210
187
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Blockchain.Node.RestApi -- Copyright : (c) carbolymer -- License : Apache-2.0 -- -- Stability : experimental -- Portability : POSIX -- -- Defines REST API for the node -- ---------------------------------...
carbolymer/blockchain
blockchain-node/src/Blockchain/Node/RestApi.hs
apache-2.0
1,785
0
32
409
367
215
152
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE TupleSections #-} -- | Utility functions. module Data.DAWG.Gen.Util ( binarySearch , findLastLE , combine ) where import Control.Applicative ((<$>)) import Data.Bits (shiftR, xor) import Data.Vector.Unboxed (Unbox) import qualified Control.Monad.ST as ST import qualified Da...
kawu/dawg-ord
src/Data/DAWG/Gen/Util.hs
bsd-2-clause
1,871
0
18
506
468
254
214
37
3
-- |The parser for the C-Minus compiler. This converts the token -- stream produced by Compiler.Scanner into an abstract syntax tree. module Compiler.Parser(program) where import Monad import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Prim import Text.ParserCombinators.Parsec...
michaelmelanson/cminus-compiler
Compiler/Parser.hs
bsd-2-clause
7,189
0
18
3,547
1,360
657
703
122
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} module Utils.Vigilance.Client.Config ( Command(..) , Options(..) , ClientConfig(..) , ClientCtxT , def...
MichaelXavier/vigilance
src/Utils/Vigilance/Client/Config.hs
bsd-2-clause
2,048
0
8
656
414
247
167
45
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Evaluate where import Bound import Bound.Name import Control.Comonad import Control.Monad.Except import Core import Environment newtype Eval a = Eval (Except String a) deriving (Functor, Applicative, Monad, MonadError String) eval :: Env Eval (Term n) (Value Eval...
christiaanb/DepCore
src/Evaluate.hs
bsd-2-clause
1,492
0
13
434
860
422
438
42
2
module Drasil.NoPCM.Requirements (funcReqs, inputInitValsTable) where import Language.Drasil import Drasil.DocLang (mkInputPropsTable) import Utils.Drasil import Data.Drasil.Concepts.Documentation (funcReqDom, input_, value) import Data.Drasil.Quantities.Math (pi_) import Data.Drasil.Quantities.PhysicalProperties (m...
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/NoPCM/Requirements.hs
bsd-2-clause
2,116
0
14
256
511
294
217
34
1
-- | -- Module : Main -- Copyright : (c) Radek Micek 2010 -- License : BSD3 -- Stability : experimental -- -- Generates formulas representing pigeonhole principle. import Control.Applicative ((<$>)) import Data.Maybe import Data.List import System.Environment -- Total number of holes. type HolesCnt = Int type Cl...
radekm/simple-prop-prover
PHPGenerator.hs
bsd-3-clause
1,692
0
13
409
461
248
213
29
2
-- 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. ------------------...
rfranek/duckling
Duckling/Ranking/Classifiers/TR.hs
bsd-3-clause
825
0
6
105
66
47
19
8
1
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.Core.Floating -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Implementation of floating-point operations mapping to SMT-Lib2 fl...
josefs/sbv
Data/SBV/Core/Floating.hs
bsd-3-clause
22,869
0
22
6,592
5,798
2,916
2,882
296
3
{-# Language CPP, OverloadedStrings, GeneralizedNewtypeDeriving #-} module Haste.Binary.Get ( Get, getWord8, getWord16le, getWord32le, getInt8, getInt16le, getInt32le, getFloat32le, getFloat64le, getBytes, skip, runGet ) where import Data.Int import Data.Word import Haste.Prim import Haste.For...
joelburget/haste-compiler
libraries/haste-lib/src/Haste/Binary/Get.hs
bsd-3-clause
4,404
0
13
837
1,126
605
521
48
1
atom :: (Delta d) => d -> aam -> Atom -> M d aam (Val d aam) atom d aam (LitA l) = return $ lit d l atom d aam (Var x) = do e <- get $ E aam s <- get $ S d aam case mapLookup x e of Nothing -> mzero Just l -> setMSum $ mapLookup l s atom d aam (Prim o a) = do v <- atom d aam a mFromMaybe $ op d o v at...
davdar/quals
writeup-old/sections/04MonadicAAM/00MonadicStyle/01State/08Atom.hs
bsd-3-clause
388
0
11
127
251
117
134
14
2
module Compile (compile) where import qualified Data.Map as Map import Text.PrettyPrint (Doc) import qualified AST.Module as Module import qualified Parse.Helpers as Parse import qualified Parse.Parse as Parse import qualified Transform.AddDefaultImports as DefaultImports import qualified Transform.Check as Check imp...
avh4/elm-compiler
src/Compile.hs
bsd-3-clause
1,763
0
14
404
404
225
179
38
2
{-# LANGUAGE PatternGuards, FlexibleContexts, ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Text.CSL.Eval -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Andrea Rossato <andrea.rossato@unit...
jkr/pandoc-citeproc
src/Text/CSL/Eval.hs
bsd-3-clause
22,995
8
26
9,405
7,104
3,629
3,475
379
28
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} module Onedrive.Types.LocationFacet where import Control.Lens (makeLensesWith, camelCaseFields) import Data.Aeson (FromJSON(parseJSON), Value(Object), (.:)) data Locatio...
asvyazin/hs-onedrive
src/Onedrive/Types/LocationFacet.hs
bsd-3-clause
722
0
11
108
151
88
63
19
0
{-# LANGUAGE OverloadedStrings #-} module Fiber ( Path , Fiber (..) , equal , include ) where import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), object, (.:), (.=)) import Data.Aeson.Types (Parser) import Data.T...
yuttie/fibers
Fiber.hs
bsd-3-clause
1,449
0
14
572
418
227
191
41
1
module Clipboard ( copyToClipboard ) where import Prelude () import Prelude.MH import Control.Exception ( try ) import qualified Data.Text as T import System.Hclip ( setClipboard, ClipboardException(..) ) import Types copyToClipboard :: Text -> MH () copyToClip...
aisamanra/matterhorn
src/Clipboard.hs
bsd-3-clause
892
0
21
294
209
108
101
24
4
----------------------------------------------------------------------------- -- | -- Module : Control.Monad.State.Strict -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2001 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : li...
davnils/minijava-compiler
lib/mtl-2.1.3.1/Control/Monad/State/Strict.hs
bsd-3-clause
4,395
0
6
1,055
248
200
48
25
0
{-# language CPP #-} -- No documentation found for Chapter "OpenXR" module OpenXR ( module OpenXR.CStruct , module OpenXR.Core10 , module OpenXR.Extensions , module OpenXR.NamedType , module OpenXR.Version ) where import OpenXR.CStruct import O...
expipiplus1/vulkan
openxr/src/OpenXR.hs
bsd-3-clause
405
0
5
117
63
41
22
11
0
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module Feldspar.Software.Marshal where -- based on raw-feldspar/run/marshal import Feldspar.Frontend (Finite(...
markus-git/co-feldspar
src/Feldspar/Software/Marshal.hs
bsd-3-clause
6,182
0
15
1,370
2,162
1,112
1,050
135
2
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} module River.Source.Analysis.Scope ( Scope(..) , scopedProgram , scopedBlock , scopedStatement ) where import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Set (Set) import qualified Data.Set as Set ...
jystic/river
src/River/Source/Analysis/Scope.hs
bsd-3-clause
5,280
0
16
1,963
1,518
757
761
205
5
module Main where -- References: -- -- https://hackage.haskell.org/package/implicit-0.0.5/docs/Graphics-Implicit.html -- https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language import Graphics.Implicit import Graphics.Implicit.Definitions import Graphics.Implicit.Primiti...
silky/haskmas
src/Main.hs
bsd-3-clause
4,847
0
14
1,495
1,753
997
756
103
2
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} module Network.IRC.Bot.Commands where import Control.Applicative import Control.Monad import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.Data import Data.List (isPrefixOf) import Data.Monoid ((<>)) import Network (PortID(PortNumb...
eigengrau/haskell-ircbot
Network/IRC/Bot/Commands.hs
bsd-3-clause
2,873
0
13
696
916
479
437
76
2
module OtherStaff where import Data.List import Data.Char import Data.Array import Data.Scientific (fromRationalRepetend, formatScientific, FPFormat(..)) import Data.Ratio import Data.Function (on) import Numeric (showIntAtBase) -- $setup -- >>> import Control.Applicative -- >>> import Test.QuickCheck -- >>> newtype ...
niexshao/Exercises
src/OtherStaff.hs
bsd-3-clause
6,304
3
24
2,117
2,443
1,328
1,115
114
3
-- List -- List can contain only the same type [1,2,3,4] ++ [9,10,11,12] -- [1,2,3,4,9,10,11,12] "hello" ++ " " ++ "world" -- "hello world" -- NOTE: Haskell has to walk through the whole list on the left side of ++ [1, 2, 3, 4] !! 0 -- reference index 0 in the list 100 : [1, 2, 3, 4] -- add one item at the fir...
kyk0704/haskell-test
src/List.hs
bsd-3-clause
1,961
4
11
470
699
397
302
-1
-1
module Data.Rope ( -- * Size Rope , length -- :: Rope -> Int , null -- :: Rope -> Bool -- * Slicing , Breakable(..) , splitAt -- :: Int -> Rope -> (Rope, Rope) , take -- :: Int -> Rope -> Rope , drop -- :: Int -> Rope -> Rope -- * Walking -- ** construc...
ekmett/rope
Data/Rope.hs
bsd-3-clause
1,354
0
6
486
188
134
54
43
0
module Tree where data Tree a = Leaf | Node a (Tree a) (Tree a) map :: (a -> b) -> Tree a -> Tree b map f Leaf = Leaf map f (Node v l r) = Node (f v) (map f l) (map f r)
rodrigogribeiro/mptc
test/classless/Tree.hs
bsd-3-clause
172
0
8
49
118
61
57
5
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Pact.Types.RowData -- Copyright : (C) 2021 Stuart Popejoy -- License : BSD-style (see the file LICENSE) -- Maintainer : Stuart Popejoy <stuart@kadena.io> -...
kadena-io/pact
src/Pact/Types/RowData.hs
bsd-3-clause
5,376
0
16
1,327
1,600
806
794
-1
-1
z = (x, y) where x = [ 1, 2, 3 ] y = [ 1, 2, 3 ]
itchyny/vim-haskell-indent
test/list/list.in.hs
mit
49
2
5
19
49
26
23
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PatternGuards #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} -- QuasiQuoter module Yesod.Routes.Parse ( parseRoutes , parseRoutesFile , parseRoutesNoCheck , parseRoutesFileNoCheck , parseType , parseTypeTree , TypeTree (..) , dropBracket ...
geraldus/yesod
yesod-core/src/Yesod/Routes/Parse.hs
mit
10,561
0
20
2,900
3,671
1,922
1,749
234
8
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Rank2Types #-} module YesodCoreTest.Cache ( cacheTest , Widget , resourcesC ) where import Test.Hspec import Network.Wai import Network....
geraldus/yesod
yesod-core/test/YesodCoreTest/Cache.hs
mit
3,494
0
15
923
1,451
723
728
85
2
{-# LANGUAGE OverloadedStrings, FlexibleContexts, GADTs, ScopedTypeVariables #-} {-| Description: The main graph module. __Start here__. This module is reponsible for parsing the SVG files exported from Inkscape. It also currently acts as a main driver for the whole graph pipeline: 1. Parsing the raw SVG files 2. In...
alexbaluta/courseography
app/Svg/Parser.hs
gpl-3.0
13,673
0
18
4,149
3,053
1,589
1,464
263
5
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DeleteNetworkInterface.hs
mpl-2.0
3,987
0
11
760
447
271
176
64
1
---------------------------------------------------------------------------- -- | -- Module : MainModule -- Copyright : (c) Sergey Vinokurov 2018 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com ---------------------------------------------------------------------------- module ...
sergv/tags-server
test-data/0014module_imports_same_name_multiple_occurrences/MainModule.hs
bsd-3-clause
356
0
3
48
14
12
2
2
0
{-# LANGUAGE MagicHash, UnboxedTuples #-} -- | -- Module : Data.Primitive.Addr -- Copyright : (c) Roman Leshchinskiy 2009-2012 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Portability : non-portable -- -- Primitive operations on machine addresses -- module Data.Pri...
rleshchinskiy/primitive
Data/Primitive/Addr.hs
bsd-3-clause
3,370
0
10
813
716
397
319
48
1
{-| Module : Idris.REPL.Parser Description : Parser for the REPL commands. License : BSD3 Maintainer : The Idris Community. -} module Idris.REPL.Parser ( parseCmd , help , allHelp , setOptions ) where import Idris.AbsSyntax import Idris.Colours import Idris.Core.TT import Idris.Help import qualif...
ben-schulz/Idris-dev
src/Idris/REPL/Parser.hs
bsd-3-clause
21,206
0
21
5,562
6,694
3,459
3,235
435
3
----------------------------------------------------------------------------- -- | -- Module : Graphics.X11.Xlib -- Copyright : (c) Alastair Reid, 1999-2003 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : provisional -- Portability...
VIETCONG/X11
Graphics/X11/Xlib.hs
bsd-3-clause
3,542
12
5
567
330
243
87
32
0
-- | -- The Reader monad transformer. -- -- This is useful to keep a non-modifiable value -- in a context {-# LANGUAGE ConstraintKinds #-} module Foundation.Monad.Reader ( -- * MonadReader MonadReader(..) , -- * ReaderT ReaderT , runReaderT ) where import Basement.Compat.Base (($), (.), con...
vincenthz/hs-foundation
foundation/Foundation/Monad/Reader.hs
bsd-3-clause
2,372
0
14
646
843
438
405
-1
-1
module Sortier.Netz.Example where -- $Id$ import Sortier.Netz.Type bubble :: Int -> Netz bubble n = mkNetz $ do hi <- [ 2 .. n ] lo <- reverse [ 1 .. pred hi ] return ( lo, succ lo ) bad_example :: Int -> Netz bad_example n = mkNetz $ do hi <- [ 2 .. n ] lo <- reverse [ 1 , 3 .. pred hi ] ...
florianpilz/autotool
src/Sortier/Netz/Example.hs
gpl-2.0
344
0
11
106
153
80
73
12
1
module Stack.Options.ScriptParser where import Data.Monoid ((<>)) import Options.Applicative import Options.Applicative.Builder.Extra data ScriptOpts = ScriptOpts { soPackages :: ![String] , soFile :: !FilePath , soArgs :: ![String] , soCompile :: !ScriptExecute } deriving Sh...
mrkkrp/stack
src/Stack/Options/ScriptParser.hs
bsd-3-clause
1,068
0
14
282
237
127
110
37
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bits -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICE...
shlevy/ghc
libraries/base/Data/Bits.hs
bsd-3-clause
21,692
0
14
6,332
3,648
2,034
1,614
254
2
-- -- Copyright (c) 2011 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...
jean-edouard/manager
disksync/Tools/Misc.hs
gpl-2.0
3,722
0
13
1,034
934
497
437
72
3