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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- Test -fdefer-type-errors
-- Should compile and run
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module Main where
t5624 :: IO ()
t5624 = putStr "Hello World" >> putStr ','
a :: Int
a = 'p'
data B = B
b :: B -> Bool
b x = x == x
data C a where
C1 :: C Int
... | sdiehl/ghc | testsuite/tests/typecheck/should_run/Defer01.hs | bsd-3-clause | 770 | 0 | 9 | 207 | 319 | 173 | 146 | 33 | 1 |
{-# LANGUAGE TypeFamilies, TypeFamilyDependencies #-}
module T13651 where
type family F r s = f | f -> r s
type instance F (Bar h (Foo r)) (Bar h (Foo s)) = Bar h (Bar r s)
data Bar s b
data Foo a
foo :: (F cr cu ~ Bar h (Bar r u),
F cu cs ~ Bar (Foo h) (Bar u s))
=> Bar h (Bar r u) -> Bar (Foo h) (Bar ... | shlevy/ghc | testsuite/tests/typecheck/should_compile/T13651a.hs | bsd-3-clause | 447 | 0 | 11 | 128 | 210 | 113 | 97 | -1 | -1 |
{-# LANGUAGE PatternGuards #-}
module Distribution.Server.Features.BuildReports.Backup (
dumpBackup,
restoreBackup,
buildReportsToExport,
packageReportsToExport
) where
import Distribution.Server.Features.BuildReports.BuildReport (BuildReport)
import qualified Distribution.Server.Features.BuildReport... | ocharles/hackage-server | Distribution/Server/Features/BuildReports/Backup.hs | bsd-3-clause | 5,017 | 0 | 18 | 819 | 1,311 | 700 | 611 | 80 | 3 |
{-# LANGUAGE TypeFamilies #-}
module ShouldFail where
data family C9 a b :: *
data instance C9 Int Int = C9IntInt
data instance C9 [a] Int = C9ListInt
data instance C9 [Int] [a] = C9ListList2
-- must fail: conflicting
data instance C9 [a] [Int] = C9ListList
| ghc-android/ghc | testsuite/tests/indexed-types/should_fail/SimpleFail11d.hs | bsd-3-clause | 264 | 0 | 6 | 52 | 86 | 50 | 36 | 7 | 0 |
-- The type sig for 'test' is illegal in H98 because of the
-- partial application of the type sig.
-- But with the LiberalTypeSynonyms extension enabled it
-- should be OK because when you expand the type synonyms
-- it's just Int->Int
-- c.f should_compile/tc155.hs
module ShouldFail where
type Thing m = m ()
type C... | urbanslug/ghc | testsuite/tests/typecheck/should_fail/tcfail107.hs | bsd-3-clause | 393 | 0 | 8 | 76 | 62 | 38 | 24 | 5 | 1 |
module Expr where
import Text.Printf (printf)
data EOpType = EOpAdd | EOpSub deriving Show
data Expr
= ExprInteger Integer
| ExprRef String
| ExprOp EOpType Expr Expr
instance Show Expr where
show (ExprInteger n) = printf "0x%02x=%d" n n
resolved :: Expr -> Bool
resolved (ExprInteger _) = True
resolved _ =... | nyaxt/dmix | nkmd/as/Expr.hs | mit | 327 | 0 | 8 | 66 | 110 | 60 | 50 | 12 | 1 |
module Y2018.M06.D18.Solution where
{--
Yesterday we wrote a SQL DELETE statement, but, NOT SO FAST! Yesterday
we discovered duplicates in the data set, ... but are there 'non-duplicates'?
Let's find out today.
--}
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (fromJust)
-- below imports ... | geophf/1HaskellADay | exercises/HAD/Y2018/M06/D18/Solution.hs | mit | 2,854 | 0 | 16 | 526 | 357 | 206 | 151 | 21 | 1 |
-- | Check for overlapping routes.
module Yesod.Routes.Overlap
( findOverlaps
, findOverlapNames
, Overlap (..)
) where
import Yesod.Routes.TH.Types
import Data.List (intercalate)
data Overlap t = Overlap
{ overlapParents :: [String] -> [String] -- ^ parent resource trees
, overlap1 :: Resourc... | piyush-kurur/yesod | yesod-routes/Yesod/Routes/Overlap.hs | mit | 3,358 | 0 | 13 | 821 | 798 | 424 | 374 | 47 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Palette.BrewerSet
-- Copyright : (c) 2013 Jeffrey Rosenbluth
-- License : BSD-style (see LICENSE)
-- Maintainer : jeffrey.rosenbluth@gmail.com
--
-- Sets of between 3 and 12 colors.
-- This product includes co... | NickAger/LearningHaskell | haskellForMacMiscPlayground/Diagrams with Sunflower.hsproj/BrewerSet.hs | mit | 32,387 | 0 | 9 | 3,872 | 9,190 | 5,787 | 3,403 | 318 | 1 |
-- This file is covered by an MIT license. See 'LICENSE' for details.
-- Author: Bertram Felgenhauer
module Util.Relation (
Rel,
member,
empty,
insert,
union,
difference,
pred,
succ,
null,
restrict,
fromList,
toList,
) where
import Prelude hiding (pred, succ, elem, null... | haskell-rewriting/confluence-tool | src/Util/Relation.hs | mit | 2,094 | 0 | 16 | 581 | 1,067 | 558 | 509 | 49 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Nauva.CSS.Types where
import Data.Aeson (ToJSON(..), FromJSON(..))
import qualified Data.Aeson as A
import Data.Map... | wereHamster/nauva | pkg/hs/nauva-css/src/Nauva/CSS/Types.hs | mit | 10,534 | 7 | 31 | 2,271 | 2,449 | 1,330 | 1,119 | 173 | 6 |
-----------------------------------------------------------------------------
--
-- Module : DecisionTrees.TreeBranching.Debug
-- Copyright :
-- License : MIT
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
-----------------------------------------------------------------------------
modu... | fehu/min-dat--decision-trees | src/DecisionTrees/TreeBranching/Debug.hs | mit | 1,026 | 0 | 14 | 235 | 140 | 92 | 48 | -1 | -1 |
module TexParser (
Kind
, Eval
, functionDispatch
, Record
, parseDocument
, toTex
, texHeader
, onlyExternalize
) where
import Text.ParserCombinators.Parsec
-- a data type that specifies the kind of operation on contents of a tex command
data Operation = Environment String | Command1 Stri... | dino-r/casttex | src/TexParser.hs | mit | 10,169 | 0 | 18 | 2,131 | 2,220 | 1,150 | 1,070 | 140 | 1 |
-- Haskell uses normal order evaluation
test x y = if x == 0
then 0
else y
-- Newton's Square Root Method
squareRoot x = squareIter x 1
where squareIter num guess = if goodEnough guess
then guess
else squareIter num (imporvedG... | gitrookie/functionalcode | code/Haskell/sicp/chap1/first.hs | mit | 4,075 | 0 | 13 | 1,656 | 1,474 | 742 | 732 | 76 | 3 |
{-# LANGUAGE UnicodeSyntax #-}
module F91 where
import Data.Peano ( PeanoNat )
f91 ∷ PeanoNat → PeanoNat
f91 n = if n > 100 then n - 10 else f91 (f91 (n + 11))
| asr/fotc | notes/FOT/FOTC/Program/McCarthy91/F91.hs | mit | 167 | 0 | 10 | 37 | 64 | 36 | 28 | 5 | 2 |
{- |
Module : Control.Monad.Levels.Writer.Strict
Description : Strict writer monad
Copyright : (c) Ivan Lazar Miljenovic
License : MIT
Maintainer : Ivan.Miljenovic@gmail.com
-}
module Control.Monad.Levels.Writer.Strict
( writer
, tell
, HasWriter
, listen
, CanListen
, ListenF... | ivan-m/monad-levels | Control/Monad/Levels/Writer/Strict.hs | mit | 485 | 0 | 6 | 111 | 73 | 51 | 22 | 14 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- |
-- Module: BigE.Types
-- Copyright: (c) 2017 Patrik Sandahl
-- Licence: MIT
-- Maintainer: Patrik Sandahl <patrik.sandahl@gmail.com>
-- Stability: experimental
-- Portability: portable
module BigE.Types
( ToGLenum (..)
, ToGLint (.... | psandahl/big-engine | src/BigE/Types.hs | mit | 4,462 | 0 | 11 | 1,013 | 1,005 | 562 | 443 | 120 | 0 |
-- Problems/Problem029Spec.hs
module Problems.Problem029Spec (main, spec) where
import Test.Hspec
import Problems.Problem029
main :: IO()
main = hspec spec
spec :: Spec
spec = describe "Problem 29" $
it "Should evaluate to 9183" $
p29 `shouldBe` 9183
| Sgoettschkes/learning | haskell/ProjectEuler/tests/Problems/Problem029Spec.hs | mit | 266 | 0 | 8 | 51 | 73 | 41 | 32 | 9 | 1 |
--produces statistics on the probes grouped by core sequence
--for each core, reports the number of probes, mean intensity, median intensity, min intensity,
--max intensity, and standard deviation of the intensity for probes with that core
--usage: flankstats core=core_size < extracted microarray alldata file
--autho... | tbepler/PBM-Analysis | flankstats.hs | mit | 3,600 | 12 | 14 | 622 | 1,389 | 757 | 632 | 63 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Network.Freddy (
connect,
disconnect,
Connection,
respondTo,
tapInto,
deliverWithResponse,
deliver,
cancelConsumer,
Consumer,
Delivery (..),
Error (..)
) where
import Control.Concurrent (forkIO)
import qualified Network.AMQP as AMQP
import Data.Text (Text... | salemove/freddy-hs | src/Network/Freddy.hs | mit | 10,672 | 1 | 14 | 1,905 | 2,305 | 1,190 | 1,115 | 176 | 3 |
{-# LANGUAGE BangPatterns #-}
module Integrators where
import Physics
import Numeric.Units.Dimensional.Prelude as D
import Numeric.Units.Dimensional.NonSI
import qualified Prelude
import Graphics.Rendering.OpenGL as GL
import BodyGravityForces
import DataStructures as DS
import Data.List as List
import Data.Sequence a... | Stratege/NBody-Simulation | integrators.hs | mit | 3,277 | 33 | 18 | 599 | 737 | 438 | 299 | 39 | 1 |
data Color = WHITE | BLACK | PURPLE | RED | GREEN | ORANGE
cutWire :: Color -> [Color] -> Bool
cutWire _ [] = False
cutWire WHITE (WHITE:xs) = True
cutWire WHITE (BLACK:xs) = True
cutWire BLACK (WHITE:xs) = True
cutWire BLACK (GREEN:xs) = True
cutWire BLACK (ORANGE:xs) = True
cutWire PURPLE (PURPLE:xs) = True
cutWire ... | dariosilva/dailyProgrammer | easy/293/main.hs | mit | 1,113 | 0 | 11 | 208 | 592 | 316 | 276 | 32 | 1 |
module Main (main) where
import CabalFull (projectName)
main :: IO ()
main = putStrLn ("Benchmarks for " ++ projectName)
| vrom911/hs-init | summoner-cli/examples/cabal-full/benchmark/Main.hs | mit | 124 | 0 | 7 | 22 | 42 | 24 | 18 | 4 | 1 |
module Draw where
import Graphics.UI.GLUT
import Colors
import Util
drawNGon :: ColorFG -> Position -> GLint -> GLint -> GLfloat -> IO ()
drawNGon c (Position x_ y_) n_ d_ phi = do
let [x, y, d, n] = map fromIntegral [x_, y_, d_, n_] :: [GLfloat]
color c
renderPrimitive Poly... | mrlovre/LMTetrys | src/Draw.hs | gpl-2.0 | 536 | 0 | 17 | 185 | 249 | 133 | 116 | 13 | 1 |
module E.CPR(Val(..), cprAnalyzeDs, cprAnalyzeProgram) where
import Control.Monad.Writer(Writer(..),runWriter,tell,Monoid(..))
import Data.Binary
import Data.Monoid()
import Data.Typeable
import qualified Data.Map as Map
import Cmm.Number
import DataConstructors
import Doc.DocLike
import E.E
import E.Program
import G... | dec9ue/jhc_copygc | src/E/CPR.hs | gpl-2.0 | 5,200 | 0 | 19 | 1,452 | 2,481 | 1,292 | 1,189 | -1 | -1 |
module ModelLoader where
import Sg
import Prelude hiding (catch)
import Foreign
import Foreign.Marshal.Alloc
import Graphics.Formats.Assimp hiding(Clamp)
import Graphics.Rendering.OpenGL.GL hiding (Diffuse)
import Data.Array.Storable
import Data.Array.MArray
import Data.Array.IArray hiding (indices)
import qualified ... | haraldsteinlechner/lambdaWolf | src/ModelLoader.hs | gpl-3.0 | 7,140 | 0 | 15 | 1,741 | 2,180 | 1,065 | 1,115 | -1 | -1 |
-- Haskell Practical 1 Code
-- James Cowgill
import Data.Char
-- Convert string to integer
s2n :: String -> Int
s2n = (foldl1 f).(map digitToInt)
where f a b = a * 10 + b
-- Drop leading whitespace from a string
dropLeadingWhitespace :: String -> String
dropLeadingWhitespace = dropWhile isSpace
-- Expression t... | jcowgill/cs-work | syac/compilers/Prac1/Prac1.hs | gpl-3.0 | 3,349 | 1 | 10 | 877 | 1,478 | 751 | 727 | 80 | 1 |
{-# OPTIONS_GHC -Wall -O0 #-}
module Main where
import Vis
import Linear
import Control.Lens
import Data.Function (on)
import Data.List ( sortBy )
import System.Environment
import qualified Data.Map.Strict as M
import qualified Data.Tree as T
import Control.Monad ( guard )
main :: IO ()
main = do
argv <- getAr... | jwaldmann/visumatrix | Main.hs | gpl-3.0 | 6,606 | 0 | 18 | 1,970 | 2,797 | 1,453 | 1,344 | 155 | 12 |
-- | Simple wrapper for Nussinov78. We take at most 10 backtracking results --
-- unlimited backtracking would produce an exponential amount of backtracking
-- results. The ambiguity is part of the original algorithm!
module Main where
import Text.Printf
import System.Environment
-- import BioInf.Nussinov78
import ... | choener/Nussinov78 | Nussinov78.hs | gpl-3.0 | 978 | 0 | 16 | 255 | 212 | 107 | 105 | 17 | 2 |
module HsPredictor.Parse.CSV where
-- standard
import Control.Monad (replicateM)
import Control.Monad.Error (fail, liftIO, throwError)
import Data.List (sort)
-- 3rd party
import Text.ParserCombinators.Parsec (Parser, char, count, di... | jacekm-git/HsPredictor | library/HsPredictor/Parse/CSV.hs | gpl-3.0 | 2,529 | 0 | 12 | 755 | 799 | 403 | 396 | 70 | 2 |
{-# LANGUAGE FlexibleInstances #-}
module Database.Design.Ampersand.Classes.ConceptStructure (ConceptStructure(..)) where
import Database.Design.Ampersand.Core.AbstractSyntaxTree
import Database.Design.Ampersand.Basics
import Data.List
import Data.Maybe
import Database.Design.Ampersand.ADL1.Expression(primitives... | DanielSchiavini/ampersand | src/Database/Design/Ampersand/Classes/ConceptStructure.hs | gpl-3.0 | 8,369 | 0 | 15 | 2,402 | 2,351 | 1,215 | 1,136 | 159 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Graph where
import GHC.TypeLits
--
import Data.Array
import Data.Graph (Graph)
import Data.Hashable
import Data.Maybe (mapMaybe)
import Data.List (sortBy )
--
import Data.P... | wavewave/qft | old/lib/Graph.hs | gpl-3.0 | 2,833 | 0 | 15 | 778 | 1,126 | 589 | 537 | 60 | 1 |
-- Module por synthesizing inspections
-- from tokens, keywords and operators
module Language.Mulang.Analyzer.Synthesizer (
encodeUsageInspection,
encodeDeclarationInspection,
decodeIsInspection,
decodeUsageInspection,
decodeDeclarationInspection,
generateInspectionEncodingRules,
generateOperatorEncodingR... | mumuki/mulang | src/Language/Mulang/Analyzer/Synthesizer.hs | gpl-3.0 | 2,504 | 0 | 11 | 371 | 569 | 325 | 244 | 43 | 3 |
module Paths_Wreathed_in_Iron (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -... | iMurfyD/Wreathed_in_Iron | dist/build/autogen/Paths_Wreathed_in_Iron.hs | gpl-3.0 | 1,662 | 0 | 10 | 182 | 371 | 213 | 158 | 28 | 1 |
{-# LANGUAGE CPP, PackageImports #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
module Foreign.StablePtr
( -- * Stable references to Haskell values
StablePtr -- abstract
, newStablePtr -- :: a -> IO (StablePtr a)
, deRefStablePtr -- :: StablePtr a -... | jwiegley/ghc-release | libraries/haskell2010/Foreign/StablePtr.hs | gpl-3.0 | 1,182 | 0 | 4 | 290 | 60 | 49 | 11 | 10 | 0 |
{-|
Module : Devel.Watch
Description : Watch for changes in the current working direcory.
Copyright : (c)
License : GPL-3
Maintainer : njagi@urbanslug.com
Stability : experimental
Portability : POSIX
Actually checks only for modified files.
Added or removed files don't trigger new builds.
-}
{-# LANGUAGE... | bitemyapp/wai-devel | src/Devel/Watch.hs | gpl-3.0 | 2,927 | 0 | 18 | 729 | 612 | 307 | 305 | 41 | 2 |
{-# Language TemplateHaskell #-}
module Infsabot.Base.Tests (
baseChecks
) where
import Infsabot.Base.Logic
import Data.Maybe
import Data.Function(on)
import Infsabot.Tools.Interface
import Codec.Picture (PixelRGB8(PixelRGB8))
import Data.DeriveTH(derive, makeArbitrary)
import Test.QuickCheck hiding (shuffle)... | kavigupta/Infsabot | Infsabot/Base/Tests.hs | gpl-3.0 | 1,225 | 0 | 15 | 248 | 479 | 266 | 213 | 29 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/FhirStores/Patch.hs | mpl-2.0 | 6,609 | 0 | 17 | 1,377 | 860 | 502 | 358 | 132 | 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/Folders/Sinks/Delete.hs | mpl-2.0 | 5,033 | 0 | 15 | 1,090 | 706 | 416 | 290 | 102 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Permissions/Get.hs | mpl-2.0 | 4,867 | 0 | 17 | 1,132 | 622 | 369 | 253 | 101 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/DiskTypes/AggregatedList.hs | mpl-2.0 | 8,222 | 0 | 20 | 1,763 | 842 | 503 | 339 | 123 | 1 |
module Plugin where
resource = "error"
| Changaco/haskell-plugins | testsuite/pdynload/numclass/Plugin.hs | lgpl-2.1 | 40 | 0 | 4 | 7 | 9 | 6 | 3 | 2 | 1 |
{-
Created : 2014 Dec 01 (Mon) 19:11:55 by Harold Carr.
Last Modified : 2014 Dec 01 (Mon) 19:37:21 by Harold Carr.
-}
import Test.HUnit as T
import Test.HUnit.Util as U
-- HOMEWORK 11
------------------------------------------------------------------------------
-- EXERCISE 6
fibs = 0... | haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2014-10-edx-delft-fp101x-intro-to-fp-erik-meijer/hw11.hs | unlicense | 1,539 | 16 | 10 | 360 | 566 | 274 | 292 | 36 | 1 |
module Lst where
import Prelude hiding (takeWhile)
import qualified Text.Show.Pretty as Pretty
import Text.Parsec.Combinator
import Text.Parsec.Prim hiding ((<|>))
import Control.Applicative hiding (many)
import Modifications
import Common
-- custom lst types
import Lst.Skill(SkillDefinition)
import Lst.Language(Lang... | gamelost/pcgen-rules | src/Lst.hs | apache-2.0 | 3,852 | 0 | 12 | 582 | 1,026 | 546 | 480 | 74 | 1 |
import System.FilePath (replaceExtension)
import System.Directory (doesFileExist, renameDirectory, renameFile)
| EricYT/Haskell | src/real_haskell/chapter-8/useful.hs | apache-2.0 | 111 | 0 | 5 | 8 | 27 | 16 | 11 | 2 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module YesodDsl.Generator.EsqueletoInstances (esqueletoInstances) where
import YesodDsl.AST
import qualified Data.Text as T
import Text.Shakespeare.Text hiding (toText)
import Data.List
import YesodDsl.Generator.Esqu... | tlaitinen/yesod-dsl | YesodDsl/Generator/EsqueletoInstances.hs | bsd-2-clause | 1,608 | 0 | 12 | 516 | 459 | 239 | 220 | 35 | 4 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Lib.JtagRW
( UsbBlasterState
, withUSBBlaster
, virAddrWrite, virAddrRead, virAddrOff
, virWrite, vdrWrite, vdrWriteRead
, toBits, fromBits
, flush
, readInput
, printState
) where
import Protolude ... | tau-tao/FPGAIPFilter | src/Lib/JtagRW.hs | bsd-3-clause | 8,981 | 0 | 19 | 2,776 | 2,568 | 1,354 | 1,214 | 207 | 4 |
{-# LANGUAGE OverloadedStrings, CPP #-}
#if defined(RELOCATE)
{-# LANGUAGE TemplateHaskell #-}
#endif
-- | This module provides some functions to generate HTML reports for
-- a Module and its inferred annotations. This module handles the
-- extraction of source code (from tarballs/zip files) and mapping
-- Functions t... | travitch/foreign-inference | src/Foreign/Inference/Report.hs | bsd-3-clause | 4,994 | 0 | 12 | 937 | 789 | 436 | 353 | 70 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
module Juno.Consensus.Handle.RequestVoteResponse
(handle)
where
import Control.Lens
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Writer.Strict
import Data.Map as Map
import Data.Set a... | haroldcarr/juno | src/Juno/Consensus/Handle/RequestVoteResponse.hs | bsd-3-clause | 3,994 | 3 | 17 | 869 | 1,108 | 558 | 550 | 100 | 5 |
{-# LANGUAGE FlexibleInstances
, MultiParamTypeClasses
, TypeFamilies
, Rank2Types
, BangPatterns
#-}
-- |
-- Module : Data.Vector
-- Copyright : (c) Roman Leshchinskiy 2008-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
... | rleshchinskiy/vector | Data/Vector.hs | bsd-3-clause | 43,687 | 0 | 13 | 9,514 | 9,119 | 5,127 | 3,992 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Benchmarks.RegExp where
import Data.Data
import Data.Typeable
(<==>) :: Bool -> Bool -> Bool
a <==> b = a == b
-- ---------------------
data Nat = Zer
| Suc Nat
deriving (Eq, Show, Data, Typeable)
sub :: Nat -> Nat -> Nat
sub x y =
case y of
Zer -> x
Suc y... | UoYCS-plasma/LazySmallCheck2012 | suite/performance/Benchmarks/RegExp.hs | bsd-3-clause | 2,184 | 0 | 14 | 632 | 1,069 | 552 | 517 | 72 | 8 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[SimplUtils]{The simplifier utilities}
-}
{-# LANGUAGE CPP #-}
module SimplUtils (
-- Rebuilding
mkLam, mkCase, prepareAlts, tryEtaExpandRhs,
-- Inlining,
preInlineUnconditionally, postInlineUnconditionally,
activ... | olsner/ghc | compiler/simplCore/SimplUtils.hs | bsd-3-clause | 82,750 | 0 | 18 | 25,480 | 8,625 | 4,608 | 4,017 | -1 | -1 |
module Control.Semigroup where
class Semigroup s where
(<>) ::
s
-> s
-> s
| tonymorris/lens-proposal | src/Control/Semigroup.hs | bsd-3-clause | 90 | 0 | 8 | 29 | 30 | 17 | 13 | 6 | 0 |
-- Copyright (c) 2016 Eric McCorkle. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/iridium | src/IR/Common/Transfer.hs | bsd-3-clause | 9,896 | 4 | 19 | 2,819 | 2,668 | 1,430 | 1,238 | 175 | 2 |
-- | This module contains fuctions and templates for building up and breaking
-- down packed bit structures. It's something like Erlang's bit-syntax (or,
-- actually, more like Python's struct module).
--
-- This code uses Data.ByteString which is included in GHC 6.5 and you can
-- get it for 6.4 at <http://www... | joecrayne/hs-bitsyntax | Data/BitSyntax.hs | bsd-3-clause | 18,156 | 0 | 19 | 5,527 | 4,002 | 2,207 | 1,795 | -1 | -1 |
--------------------------------------------------------------------------------
-- | Interval-based implementation of preview polling
{-# LANGUAGE CPP #-}
module Hakyll.Preview.Poll
( previewPoll
) where
--------------------------------------------------------------------------------
import Control... | bergmark/hakyll | src/Hakyll/Preview/Poll.hs | bsd-3-clause | 1,653 | 0 | 14 | 434 | 247 | 136 | 111 | 25 | 3 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
module HypeStat.Valve where
import Data.Hashable
i... | KenetJervet/hypestat | src/HypeStat/Valve.hs | bsd-3-clause | 2,260 | 0 | 11 | 585 | 964 | 509 | 455 | 48 | 2 |
{-# LANGUAGE OverloadedStrings, RecursiveDo, ScopedTypeVariables, FlexibleContexts, TypeFamilies, ConstraintKinds #-}
module Frontend.Properties.RDS
(
rdsProperties
) where
import Prelude hiding (mapM, mapM_, all, sequence)
import qualified Data.Map as Map
import Data.Monoid ((<>))
... | Rizary/awspi | Lib/Frontend/Properties/RDS.hs | bsd-3-clause | 3,692 | 6 | 28 | 1,111 | 1,201 | 594 | 607 | 95 | 18 |
module Lava.IOBuffering where
import System.IO
( hSetBuffering
, stdout
, BufferMode(..)
)
noBuffering :: IO ()
noBuffering = hSetBuffering stdout NoBuffering
| dfordivam/lava | Lava/IOBuffering.hs | bsd-3-clause | 169 | 0 | 6 | 31 | 46 | 27 | 19 | 7 | 1 |
{-# LANGUAGE UndecidableInstances, ConstraintKinds, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-}
module Control.Monad.Incremental.Internal.Adapton.Display where
import Control.Monad.Incremental.Display
import Control.Monad.Incremental
import Control.Monad.Incremental.Internal.Adapton.Types
import Co... | cornell-pl/HsAdapton | src/Control/Monad/Incremental/Internal/Adapton/Display.hs | bsd-3-clause | 3,750 | 4 | 17 | 725 | 1,484 | 764 | 720 | 51 | 0 |
module Text.DivideCSVSpec (main, spec) where
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "someFunction" $ do
it "should work fine" $ do
True `shouldBe` False
| smurphy8/divide-csv | test/Text/DivideCSVSpec.hs | bsd-3-clause | 211 | 0 | 13 | 49 | 76 | 40 | 36 | 9 | 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.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Temperature.TR.Corpus
( corpus ) where
import Prelude
impo... | facebookincubator/duckling | Duckling/Temperature/TR/Corpus.hs | bsd-3-clause | 1,495 | 0 | 11 | 535 | 232 | 141 | 91 | 39 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE TypeOperators #-}
module Control.Eff.Fresh where
import Control.Eff
import Control.Concurrent.S... | mitchellwrosen/effects-a-la-carte | src/Control/Eff/Fresh.hs | bsd-3-clause | 928 | 0 | 13 | 249 | 328 | 172 | 156 | -1 | -1 |
module CalculatorKata.Day4Spec (spec) where
import Test.Hspec
import CalculatorKata.Day4 (calculate)
spec :: Spec
spec = do
it "calculates one digit"
(calculate "4" == 4.0)
it "calculates many digits"
(calculate "345" == 345.0)
it "calculates addition"... | Alex-Diez/haskell-tdd-kata | old-katas/test/CalculatorKata/Day4Spec.hs | bsd-3-clause | 610 | 0 | 11 | 202 | 160 | 78 | 82 | 17 | 1 |
module Main where
import System.FilePath ((</>))
import qualified System.Directory
import qualified Test.DocTest
main :: IO ()
main = do
pwd <- System.Directory.getCurrentDirectory
prefix <- System.Directory.makeAbsolute pwd
let src = prefix </> "src"
Test.DocTest.doctest [ "--fast", "-i" <> src, sr... | Gabriel439/Haskell-Dhall-Library | dhall-toml/doctest/Main.hs | bsd-3-clause | 325 | 0 | 10 | 61 | 101 | 56 | 45 | 10 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
module Language.Haskell.Generate.Monad
( Generate(..), ExpG
, runGenerate, newName
, returnE
, useValue, us... | bennofs/haskell-generate | src/Language/Haskell/Generate/Monad.hs | bsd-3-clause | 9,406 | 0 | 17 | 1,911 | 2,467 | 1,295 | 1,172 | 135 | 1 |
module Paths_asda (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException -> IO a) -> I... | huggaida/haskell-game | .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/autogen/Paths_asda.hs | bsd-3-clause | 1,631 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
{-
- Hacq (c) 2013 NEC Laboratories America, Inc. All rights reserved.
-
- This file is part of Hacq.
- Hacq is distributed under the 3-clause BSD license.
- See the LICENSE file for more details.
-}
{-# LANGUAGE RankNTypes #-}
module Control.Monad.Quantum.Counter (module Control.Monad.Quantum.Class, module Co... | ti1024/hacq | src/Control/Monad/Quantum/Counter.hs | bsd-3-clause | 1,454 | 0 | 12 | 215 | 371 | 213 | 158 | 21 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Main where
import AI
import Analysis
import Game
import Types
import Match
import System.Console.CmdArgs
import System.IO
import Text.Printf
data PlayMode = LosingMoves | BestMove | Play | Perft ... | sphynx/hamisado | Hamisado.hs | bsd-3-clause | 2,742 | 0 | 18 | 736 | 689 | 356 | 333 | 72 | 9 |
module PFDS.Sec8.Ex2 where
data RotationState a =
Idle
| Reversing Int [a] [a] [a] [a]
| Appending Int [a] [a]
| Done [a]
deriving (Show)
data Queue a = Q Int [a] (RotationState a) Int [a]
deriving (Show)
exec :: RotationState a -> RotationState a
exec (Reversing ok (x:f) f' (y:r) r') = Re... | matonix/pfds | src/PFDS/Sec8/Ex2.hs | bsd-3-clause | 1,756 | 0 | 10 | 457 | 1,009 | 512 | 497 | 45 | 2 |
module Craft.Ant where
type Ants = Int
anteater :: Int -> Int
anteater x = x+1
aardvark = anteater
| Numberartificial/workflow | snipets/src/Craft/Chapter15/Ant.hs | mit | 103 | 0 | 5 | 23 | 38 | 22 | 16 | 5 | 1 |
module CLI where
import Options.Applicative
--------------------------------------------------------------------------------
-- | Represents arguments that can be passed to the CLI.
data CLIOpts = CLIOpts { configPath :: Maybe FilePath
, envPath :: Maybe FilePath
}
----... | filib/codeclimate-shellcheck | app/CLI.hs | gpl-3.0 | 1,097 | 0 | 12 | 257 | 149 | 79 | 70 | 16 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
import qualified SDL.GLFW as GLFW
import Graphics.GL
import Data.Bits
import Control.Monad
import Linear
import SetupGLFW
import Graphics.GL.Pal
import Cube
-------------------------------------------------------------
-- A test to make sure font re... | lukexi/gl-pal | test/TestReshader.hs | bsd-3-clause | 1,250 | 0 | 18 | 340 | 335 | 175 | 160 | 31 | 1 |
{-# OPTIONS -cpp #-}
-- OPTIONS required for ghc-6.4.x compat, and must appear first
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp #-}
-- #hide
module Distribution.Compat.TempFile (
openTempFile,
openBinaryTempFile,
openNewBinaryFile,
createTempDirectory,
) whe... | IreneKnapp/Faction | libfaction/Distribution/Compat/TempFile.hs | bsd-3-clause | 7,096 | 1 | 16 | 1,913 | 1,087 | 586 | 501 | 75 | 5 |
{-# LANGUAGE Haskell2010, OverloadedStrings #-}
{-# LINE 1 "Network/Wai/Middleware/Rewrite.hs" #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE CPP #-}
module Network.Wai.Middleware... | phischu/fragnix | tests/packages/scotty/Network.Wai.Middleware.Rewrite.hs | bsd-3-clause | 12,413 | 0 | 14 | 2,325 | 1,058 | 654 | 404 | 70 | 1 |
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
-- | Parameter parsing/template haskell code.
module DataAnalysis.Application.Params where
import Contr... | teuffy/min-var-ci | src/DataAnalysis/Application/Params.hs | mit | 4,419 | 0 | 20 | 1,509 | 1,543 | 779 | 764 | 112 | 4 |
{-# LANGUAGE ExistentialQuantification, PatternSynonyms, PolyKinds, TypeOperators #-}
-- | Testing some pattern synonyms
module PatternSyns where
-- | FooType doc
data FooType x = FooCtor x
-- | Pattern synonym for 'Foo' x
pattern Foo x = FooCtor x
-- | Pattern synonym for 'Bar' x
pattern Bar x = FooCtor (Foo x)
-... | Fuuzetsu/haddock | html-test/src/PatternSyns.hs | bsd-2-clause | 822 | 0 | 8 | 158 | 178 | 95 | 83 | 12 | 0 |
{-# LANGUAGE CPP, LambdaCase, BangPatterns, MagicHash, TupleSections, ScopedTypeVariables #-}
{-# OPTIONS_GHC -w #-} -- Suppress warnings for unimplemented methods
------------- WARNING ---------------------
--
-- This program is utterly bogus. It takes a value of type ()
-- and unsafe-coerces it to a function, and a... | sdiehl/ghc | testsuite/tests/stranal/should_compile/T9208.hs | bsd-3-clause | 3,510 | 0 | 15 | 854 | 995 | 534 | 461 | 67 | 4 |
{-# OPTIONS_JHC -fno-prelude -fffi #-}
-- just a few basic operations on integers to jumpstart things
module Jhc.Int(Int(),Int_(),increment,decrement,plus,minus,times,quotient,remainder,zero,one,boxInt,unboxInt) where
import Jhc.Type.Word(Int(),Int_())
foreign import primitive increment :: Int -> Int
foreign i... | m-alvarez/jhc | lib/jhc/Jhc/Int.hs | mit | 883 | 5 | 7 | 174 | 260 | 150 | 110 | -1 | -1 |
import Test.QuickCheck
import System.IO.Unsafe
import Control.Concurrent.Chan
import Control.Concurrent
import Control.Monad
data Action = NewChan | ReadChan | WriteChan Int | IsEmptyChan | ReturnInt Int
| ReturnBool Bool
deriving (Eq,Show)
main = do
t <- myThreadId
forkIO (threadDelay 1000000 >> k... | ezyang/ghc | libraries/base/tests/Concurrent/Chan001.hs | bsd-3-clause | 3,113 | 0 | 14 | 893 | 1,332 | 703 | 629 | 78 | 6 |
import Control.Concurrent
import Control.Exception
main = do
m <- newEmptyMVar
t <- forkIO (mask_ $ takeMVar m)
threadDelay 100000
throwTo t (ErrorCall "I'm Interruptible")
threadDelay 100000
putMVar m () -- to avoid t being garbage collected
| urbanslug/ghc | testsuite/tests/concurrent/should_run/conc020.hs | bsd-3-clause | 257 | 0 | 11 | 50 | 80 | 36 | 44 | 9 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
module Haarss.View (viewModel) where
import Control.Lens
import Data.Char (chr)
import Data.Foldable (toList)
import Data.Maybe (fromMaybe)
import Data.Seq... | stevana/haarss | src/Haarss/View.hs | isc | 8,948 | 0 | 20 | 3,411 | 3,006 | 1,550 | 1,456 | -1 | -1 |
module Util.Numeric where
import Util.Display
import qualified Util.Unicode as U
subscriptNumber :: Integer -> String
subscriptNumber x = map U.subscriptDigit $ x `digitsInBase` 10
superscriptNumber :: Integer -> String
superscriptNumber x = map U.superscriptDigit $ x `digitsInBase` 10
showBinary :: Integral a => a... | sgord512/Utilities | Util/Numeric.hs | mit | 1,823 | 0 | 11 | 414 | 726 | 381 | 345 | 41 | 2 |
-- | Common handler functions.
module Handler.Common where
import Data.FileEmbed (embedFile)
import Import
-- These handlers embed files in the executable at compile time to avoid a
-- runtime dependency, and for efficiency.
getFaviconR :: Handler TypedContent
getFaviconR = do
cacheSeconds $ 60 * 60 * 24 * 30 -- c... | Tehnix/campaigns | Handler/Common.hs | mit | 577 | 0 | 11 | 113 | 113 | 58 | 55 | 11 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Monad (unless)
import Criterion.Main
import Data.Monoid (Endo(..))
import Data.Vinyl
import Data.Vinyl.Synta... | VinylRecords/Vinyl | benchmarks/AccessorsBench.hs | mit | 7,024 | 0 | 20 | 2,362 | 2,361 | 1,214 | 1,147 | 192 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
#ifndef NO_OVERLAP
{-# LANGUAGE OverlappingInstances #-}
#endif
module Database.Persist.Sql.Class
( RawSql (..)
, Pers... | jcristovao/persistent | persistent/Database/Persist/Sql/Class.hs | mit | 10,236 | 0 | 17 | 2,629 | 3,652 | 2,069 | 1,583 | -1 | -1 |
------------------------------------------------------------------------------
-- |
-- Module : Handler.Personal
-- Copyright : (C) 2016 Samuli Thomasson
-- License : %% (see the file LICENSE)
-- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi>
-- Stability : experimental
-- Por... | SimSaladin/hajong | hajong-site/Handler/Personal.hs | mit | 908 | 0 | 12 | 181 | 130 | 70 | 60 | -1 | -1 |
module CovenantEyes.Api.Types.Endpoints
( BasicAuthCreds(..)
, ApiCredsFor(..)
, ApiRoot(..), mkApiRoot
, Secure
, NonSecure
) where
import CovenantEyes.Api.Internal.Prelude
import qualified Data.ByteString.Char8 as B
data BasicAuthCreds = BasicAuthCreds
{ basicAuthUser :: !ByteString
,... | 3noch/covenanteyes-api-hs | src/CovenantEyes/Api/Types/Endpoints.hs | mit | 981 | 0 | 9 | 243 | 281 | 160 | 121 | -1 | -1 |
module Haggcat.Types
( module Haggcat.Types
, module Haggcat.JSON.Institution
) where
import qualified Data.ByteString as BS
import Haggcat.JSON.Institution (Institution)
type IssuerId = BS.ByteString
type ConsumerKey = BS.ByteString
type ConsumerSecret = BS.ByteString
type CustomerId = BS... | carymrobbins/haggcat | src/Haggcat/Types.hs | mit | 395 | 0 | 5 | 73 | 86 | 56 | 30 | 11 | 0 |
module JagMaHaLeva where
import Haskore
import AutoComp
-- note updaters for mappings
fd d n = n d v
vol n = n v
v = [Volume(80)]
lmap f l = line (map f l)
bar1 = lmap vol [ds 4 qn, ds 4 den, ds 4 sn, ds 4 qn, as 3 qn]
bar2 = lmap vol [g 4 qn, g 4 den, g 4 sn, g 4 qn, ds 4 qn]
bar3 = lmap vo... | Zolomon/edan40-functional-music | jagmahaleva.hs | mit | 1,562 | 0 | 14 | 354 | 984 | 529 | 455 | 21 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( getApplicationDev
, appMain
, develMain
, taskMain
, makeFoundation
, withEnv
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger ... | thoughtbot/carnival | Application.hs | mit | 7,840 | 0 | 16 | 1,980 | 1,310 | 698 | 612 | -1 | -1 |
module Handler.Home where
import Import
import Util.Handler (title)
import Widget.Languages (languagesWidget)
import Data.Function ((&))
import qualified Util.Handler as Handler
import qualified Glot.Language as Language
getHomeR :: Handler Html
getHomeR = do
defaultLayout $ do
App{..} <- getYesod
... | prasmussen/glot-www | Handler/Home.hs | mit | 743 | 0 | 12 | 176 | 195 | 104 | 91 | -1 | -1 |
module Dataset.Backend.Scatter
( dataset
) where
import Dataset.Internal.Types
-- | The dataset for a histogram is not terribly interesting, it's basically
-- just a list.
dataset :: Dataset Point
dataset = Dataset
{ _insert = (:)
, _removeEnd = id
, _dataset = []
, _toList = id
, _... | SilverSylvester/cplot | src/Dataset/Backend/Scatter.hs | mit | 381 | 0 | 7 | 104 | 81 | 51 | 30 | 11 | 1 |
import XMonad
main = xmonad defaultConfig
{ terminal = "urxvt"
, modMask = mod4Mask
, borderWidth = 3
}
| agilecreativity/dotfiles | xmonad/xmonad.hs | mit | 128 | 0 | 7 | 43 | 32 | 19 | 13 | 5 | 1 |
module JSON.Prettify(toString, prettyJSON) where
import JSON.Type
toString :: JValue -> String
toString (JObject obj) = showListLike ('{','}') obj $ \(key, value) ->'"':key ++ "\":" ++ toString value
toString (JArray array) = showListLike ('[',']') array toString
toString (JString string) = show string
toString (JBoo... | zsedem/haskell-playground | json-parser/src/JSON/Prettify.hs | mit | 1,858 | 0 | 13 | 476 | 721 | 370 | 351 | 40 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-instancemarketoptions-spotoptions.html
module Stratosphere.ResourceProp... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2LaunchTemplateSpotOptions.hs | mit | 3,107 | 0 | 12 | 253 | 355 | 202 | 153 | 32 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : Expression
-- Copyright :
-- License : AllRightsReserved
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- |
--
---------------------------------------------------------... | uvNikita/SyntacticAnalyzer | src/Expression.hs | mit | 7,554 | 0 | 14 | 2,059 | 2,877 | 1,497 | 1,380 | 158 | 3 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Safe where
import Foreign.C.Types
fibonacci :: Int -> Int
fibonacci n = fibs !! n
where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
-- wrapper code - I think it might be possible to autogenerate this?
fibonacci_hs :: CInt -> CInt
fibonacci_hs = fromIntegral .... | ssteinbach/calling_haskell_from_c | Safe.hs | mit | 398 | 0 | 10 | 79 | 99 | 56 | 43 | 9 | 1 |
{-# LANGUAGE DeriveAnyClass, DeriveGeneric, OverloadedStrings #-}
{- |
Module : System.JBI.Commands.Nix
Description : Nix tooling support
Copyright : (c) Ivan Lazar Miljenovic
License : MIT
Maintainer : Ivan.Miljenovic@gmail.com
-}
module System.JBI.Commands.Nix where
import System.JBI.... | ivan-m/jbi | lib/System/JBI/Commands/Nix.hs | mit | 1,499 | 0 | 13 | 327 | 289 | 160 | 129 | -1 | -1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell, TypeFamilies #-}
module Main where
import System.Environment
import Control.Concurrent
import Control.Monad
import Yesod
import Yesod.Core
data ImpulseManagerRoutes = ImpulseManagerRoutes{
impulseManagerStatus :: MVar Int
}
mkYesod "ImpulseManagerRoutes" [parseRo... | smurphy8/tach | apps/tach-manager-impulse/src/Main.hs | mit | 937 | 0 | 10 | 154 | 240 | 121 | 119 | 29 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.