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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
main = do
putStrLn "Hello, what's your name?"
name <- getLine
putStrLn ("Hey " ++ name ++ ", you rock!")
| ku00/h-book | src/WhatsYourName.hs | bsd-3-clause | 117 | 0 | 10 | 32 | 36 | 16 | 20 | 4 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section{Code output phase}
-}
{-# LANGUAGE CPP #-}
module CodeOutput( codeOutput, outputForeignStubs ) where
#include "HsVersions.h"
import AsmCodeGen ( nativeCodeGen )
import LlvmCodeGen ( llvmCodeGen )
import UniqSupply ( mkSplitUniqSupply )
i... | ghc-android/ghc | compiler/main/CodeOutput.hs | bsd-3-clause | 9,182 | 1 | 19 | 3,241 | 1,428 | 721 | 707 | 145 | 7 |
{-# LANGUAGE TypeFamilies #-}
module T5306b where
data family F a
data instance F Int = FInt
| urbanslug/ghc | testsuite/tests/rename/should_compile/T5306b.hs | bsd-3-clause | 99 | 0 | 5 | 23 | 22 | 14 | 8 | 4 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Cook.BuildFile
( BuildFileId(..), BuildFile(..), BuildBase(..), DockerCommand(..), TxRef
, buildFileIdAddParent
, dockerCmdToText
, parseBuildFile
... | factisresearch/dockercook | src/lib/Cook/BuildFile.hs | mit | 18,051 | 215 | 22 | 5,999 | 4,696 | 2,462 | 2,234 | 388 | 27 |
module Simulator(run) where
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Control.Exception
import Data.Array
import Data.Bits
import Data.Int
import System.IO
import Syntax
import MifParser
type Simulator = StateT SIMPLE IO
initialSimple :: [Instruction] -> String -> IO SIMPLE
in... | yu-i9/HaSS | src/Simulator.hs | mit | 5,965 | 12 | 38 | 1,954 | 2,494 | 1,253 | 1,241 | -1 | -1 |
module Target.Config
( isSpecial
, isConfig
, load
, merge
, vars
, values
, setValue
, option
, setOption
, set
, debug
, setDebug
, style
, metadata
, resources
, latex
, parseBool
) where
import Control.Monad
import Control.Monad.Trans
import Co... | Soares/Bookbuilder | src/Target/Config.hs | mit | 4,675 | 6 | 15 | 977 | 1,432 | 749 | 683 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Arrows #-}
module Main wher... | MaxDaten/yage-examples | src/YageMaterialPreview.hs | mit | 8,101 | 9 | 19 | 2,544 | 1,960 | 1,020 | 940 | -1 | -1 |
module Language.Dash.Asm.DataAssembler (
encodeConstTable
-- These two are only exposed for debugging TODO move them to another module?
, atomizeConstTable
, AtomicConstant(..)
) where
import Control.Arrow ((&&&))
import Control.Monad.Except (ExceptT (..), runExceptT,
... | arne-schroppe/dash | src/Language/Dash/Asm/DataAssembler.hs | mit | 10,880 | 0 | 16 | 2,617 | 2,743 | 1,375 | 1,368 | 221 | 10 |
module Compiler.Rum.Interpreter.Rummer where
import Control.Applicative (liftA2, empty)
import Control.Monad.State (get, gets, lift, liftIO, modify, MonadState)
import qualified Data.HashMap.Strict as HM (fromList, lookup)
import Data.IORef
import Compiler.Rum.Inter... | vrom911/Compiler | src/Compiler/Rum/Interpreter/Rummer.hs | mit | 5,188 | 0 | 17 | 1,416 | 2,060 | 1,009 | 1,051 | -1 | -1 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
module Memoization (
Double()
) where
-- See: http://stackoverflow.com/a/2217374/704831
import Data.MemoTrie
import Data.Binary
import qualified Data.ByteString.Lazy as BS
mangle :: Double -> [Int]
mangle = map fromIntegral . BS.unpack . encode
u... | sharkdp/zehntausend | src/Memoization.hs | mit | 568 | 0 | 10 | 109 | 167 | 93 | 74 | 18 | 1 |
{- This module was generated from data in the Kate syntax
highlighting file curry.xml, version 0.3, by Björn Peemöller (bjp@informatik.uni-kiel.de) -}
module Text.Highlighting.Kate.Syntax.Curry
(highlight, parseExpression, syntaxName, syntaxExtensions)
where
import Text.Highlighting.Kate.Types
import Text... | ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Curry.hs | gpl-2.0 | 15,701 | 0 | 37 | 2,087 | 3,776 | 1,997 | 1,779 | 243 | 18 |
import Maybe(x)
| Helium4Haskell/helium | test/parser/ImportListError.hs | gpl-3.0 | 16 | 0 | 5 | 2 | 9 | 5 | 4 | 1 | 0 |
module Y2015.R1A.C where
import Data.List
import Data.Maybe
import Data.String.Utils
import Debug.Trace
solve :: Problem -> Solution
parse :: [String] -> [Problem]
data Solution = Solution [Int]
deriving (Eq)
instance Show Solution
where show (Solution x) = '\n' : unlines (map show x)
da... | joranvar/GoogleCodeJam | Y2015/R1A/C.hs | gpl-3.0 | 710 | 0 | 16 | 186 | 300 | 160 | 140 | 19 | 1 |
-- ~/.xmonad/xmonad.hs - full xmonad configuration
import XMonad
import qualified XMonad.Config as DefConfig (def)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout
import XMonad.Layout.NoBorders ( noBorders, smartBorders )
import XMonad.Hooks.SetWMName
import XMonad.Util.Run(spawnPip... | grochmal/rc | xmonad/xmonad.hs | gpl-3.0 | 2,995 | 0 | 15 | 1,057 | 559 | 329 | 230 | 61 | 1 |
{-# language TypeFamilies, ScopedTypeVariables, MultiParamTypeClasses #-}
{-# language FlexibleInstances, UndecidableInstances #-}
module Data.Array.Accelerate.Sparse.COOElem where
import Foreign.Storable (Storable(..))
import Foreign.Ptr
-- import qualified Data.Vector.Storable as VS
import qualified Data.Array.Acce... | ocramz/sparse-linear-algebra | accelerate/src/Data/Array/Accelerate/Sparse/COOElem.hs | gpl-3.0 | 3,071 | 0 | 14 | 692 | 1,432 | 777 | 655 | -1 | -1 |
-----------------------------------------------------------------------------
--
-- Module : Data.DICOM.Object
-- Copyright : Copyright (c) DICOM Grid 2015
-- License : GPL-3
--
-- Maintainer : paf31@cantab.net
-- Stability : experimental
-- Portability :
--
-- | Types and smart constructors for DICO... | dicomgrid/dicom-haskell-library | src/Data/DICOM/Object.hs | gpl-3.0 | 10,089 | 0 | 21 | 2,428 | 3,283 | 1,679 | 1,604 | 282 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudprivatecatalogproducer/gen/Network/Google/Resource/CloudPrivateCatalogProducer/Catalogs/Undelete.hs | mpl-2.0 | 5,260 | 0 | 16 | 1,234 | 776 | 452 | 324 | 115 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/List.hs | mpl-2.0 | 6,171 | 0 | 20 | 1,434 | 872 | 510 | 362 | 125 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/Insert.hs | mpl-2.0 | 2,556 | 0 | 13 | 597 | 308 | 189 | 119 | 48 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Clients/Get.hs | mpl-2.0 | 5,403 | 0 | 18 | 1,236 | 818 | 473 | 345 | 119 | 1 |
-- Example of an international dialog box.
import Graphics.UI.Gtk
import Data.Char
import qualified Data.Text as T
import Control.Exception
import Control.Applicative
import Data.Text (Text)
main :: IO ()
main = do
initGUI
dia <- dialogNew
dialogAddButton dia stockYes ResponseYes
dialogAddButton dia stockNo R... | juhp/gtk2hs | gtk/demo/unicode/Arabic.hs | lgpl-3.0 | 1,340 | 0 | 12 | 230 | 425 | 215 | 210 | 37 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
module CommonMain where
import Print
import Trie
import Data.List(intersperse)
import System.Environment(getArgs, getEnv)
import GeneralIO
import System.IO
import Dictionary
import Frontend
import Data.Char
import ErrM
-- import Monad
import Control.Exception (catch, IOException)
... | johnjcamilleri/maltese-functional-morphology | lib-1.1/CommonMain.hs | lgpl-3.0 | 6,389 | 132 | 16 | 2,142 | 1,806 | 912 | 894 | 144 | 24 |
-- Flatten a list
-- http://www.haskell.org/haskellwiki/99_questions/Solutions/7
-- http://stackoverflow.com/questions/5994051/is-there-a-function-to-flatten-a-nested-list-of-elements
-- http://alumni.media.mit.edu/~tpminka/PLE/haskell/haskell-sol.html
module Problem07 where
flatten :: [a] -> [b]
flatten [] = []
... | jstolarek/sandbox | haskell/99.problems/Problem07.hs | unlicense | 386 | 0 | 6 | 47 | 37 | 24 | 13 | 3 | 1 |
module FreePalace.Messages.PalaceProtocol.ObfuscateSpec (spec) where
import qualified Data.ByteString.Lazy as LazyByteString
import Test.Hspec
import FreePalace.Messages.PalaceProtocol.Obfuscate
spec :: Spec
spec = do
describe "obfuscationKeys" $ do
it "contains the right bytes" $ do
let expectedBytes = ... | psfblair/freepalace | spec/FreePalace/Messages/PalaceProtocol/ObfuscateSpec.hs | apache-2.0 | 6,232 | 0 | 17 | 1,694 | 2,236 | 1,419 | 817 | 88 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
-- * Relating initial and final representations
module TTIF where
import TTF as F hiding (main) -- The final embedding
-- * Initial embedding of our language, in HOAS
-- * (superset of the running example in Xi, Chen and Chen (POPL2003))
-- In the la... | egaburov/funstuff | Haskell/tytag/codes3/TTIF.hs | apache-2.0 | 7,773 | 2 | 24 | 2,051 | 2,284 | 1,170 | 1,114 | 134 | 2 |
{-# LANGUAGE BangPatterns #-}
{-| External data loader.
This module holds the external data loading, and thus is the only one
depending (via the specialized Text\/Rapi\/Luxi modules) on the actual
libraries implementing the low-level protocols.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
All rights rese... | apyrgio/snf-ganeti | src/Ganeti/HTools/ExtLoader.hs | bsd-2-clause | 11,383 | 0 | 18 | 2,763 | 2,679 | 1,379 | 1,300 | 218 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE RankNTypes #-}
module Scr... | michaeljklein/CPlug | test/Scratch.hs | bsd-3-clause | 2,289 | 0 | 12 | 616 | 510 | 277 | 233 | 40 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Main where
import qualified Data.Map as M
import Control.Monad.State
import CHR2.AST.Untyped
import CHR2.Parser
import CHR2.Compile
import CHR2.Target.PostgreSQL
import GHC.Environment
makeSql :: String -> IO ()
makeSql n = do
e@Env{..} <- execStateT (do {parse fn; initEnv}) ... | awto/chr2sql | CHR2.hs | bsd-3-clause | 457 | 0 | 12 | 84 | 159 | 87 | 72 | 18 | 1 |
{-| Both the GHC and GHCJS implementations of `Dhall.Import.Manager.Manager`
export a `Dhall.Import.Manager.Manager` type suitable for use within the
"Dhall.Import" module
For the GHC implementation the `Dhall.Import.Manager.Manager` type is a real
`Network.HTTP.Client.Manager` from the @http-client@ p... | Gabriel439/Haskell-Dhall-Library | dhall/ghcjs-src/Dhall/Import/Manager.hs | bsd-3-clause | 1,001 | 0 | 6 | 182 | 44 | 27 | 17 | 7 | 1 |
{-|
Module : Pentago.Data.Matrix
Description : Basic square matrix/array operations
Basic square matrix/array operations
-}
module Pentago.Data.Matrix(
Symmetry
, horizontalSymmetry
, verticalSymmetry
, transposeSymmetry
, rotate90Symmetry
, rotate180Symmetry
, rotate270Symmetry
, boundSymmetry
, Ma... | gregorias/Pentago | src/Pentago/Data/Matrix.hs | bsd-3-clause | 4,241 | 0 | 10 | 847 | 1,505 | 834 | 671 | 88 | 2 |
import Math.NumberTheory.Primes.Testing
import Data.List
import Debug.Trace
val :: Maybe t -> t
val (Just x) = x
spiralPrimes :: Num a => t -> a
spiralPrimes n = lengths !! (val . findIndex (\(a,b) -> a/b < 0.1) $ (drop 2 ratios))
where ratios = scanl (\(a,b) c -> (if isPrime c then a+1 else a, b+1)) (0,1) $ diagon... | JacksonGariety/euler.hs | 058.hs | bsd-3-clause | 508 | 0 | 14 | 113 | 276 | 150 | 126 | 12 | 2 |
module Main where
import qualified Data.Map.Strict as Map
import Data.Char
import Control.Applicative
import Codec.Picture
import Graphics.Rasterific
import Graphics.Rasterific.Texture
data LSystem symbol = LSystem (Map.Map symbol [symbol])
deriving (Show)
getRules :: LSystem sym -> Map.Map sym [sym]
getRules (LSy... | qwertzdarth/lsys | src/Main.hs | bsd-3-clause | 2,364 | 0 | 10 | 630 | 634 | 350 | 284 | 61 | 2 |
module Domains.Euclidean where
--import Prelude hiding (return)
import Domains.Additive
-- Accessor-like functions for the rtn argument of divide
_quo :: t -> t -> t
_quo q r = q
_rem :: t -> t -> t
_rem q r = r
infixl 7 /! -- divide or fail
(/!) :: Euclidean a => a -> a -> a
(/!) = divideOrFail
class (Show a, E... | pmilne/algebra | src/Domains/Euclidean.hs | bsd-3-clause | 1,212 | 0 | 16 | 498 | 400 | 215 | 185 | 30 | 1 |
{-# LANGUAGE LambdaCase #-}
module Ling.Fwd
( fwdP
, fwdProc
, fwdProc'
, expandFwd
) where
import Prelude hiding (pred)
import Ling.Norm
import Ling.Prelude
import Ling.Proc
import Ling.Session.Core
type MkFwd a = (Session -> Session) -> UsedNames -> a -> [Channel] -> Proc
fwdSplit :: ([Proc] -> Proc) -> ... | np/ling | Ling/Fwd.hs | bsd-3-clause | 2,664 | 0 | 14 | 712 | 1,039 | 536 | 503 | 58 | 3 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 709
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Monad.Trans.Except
-- Copyright : (C) 2013 Ross Paterson
-- License : BSD-style (see the file LICENSE)
--
--... | DavidAlphaFox/ghc | libraries/transformers/Control/Monad/Trans/Except.hs | bsd-3-clause | 7,768 | 0 | 21 | 1,883 | 2,291 | 1,201 | 1,090 | 130 | 2 |
{-# LANGUAGE BangPatterns, CPP, PatternGuards #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
module Data.HashMap.Strict
(
HashMap
, toList
, fromListWith
) where
import Data.Bits ((.&.), (.|.))
import qualified Data.List as L
import Data.Hashable (Hashable)
import Prelud... | pacak/cuddly-bassoon | unordered-containers-0.2.8.0/Data/HashMap/Strict.hs | bsd-3-clause | 4,441 | 0 | 16 | 1,594 | 1,991 | 993 | 998 | 100 | 6 |
import Test.Hspec
import Test.QuickCheck
import Control.Exception
import Data.ByteString.Lazy.Char8
import qualified UnitTests as UT
import qualified IntegrationTests as IT
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Integration" IT.spec
describe "Unit" UT.spec
| sphaso/firebase-haskell-client | test/Spec.hs | bsd-3-clause | 302 | 0 | 8 | 57 | 83 | 47 | 36 | 12 | 1 |
{-# LANGUAGE DeriveGeneric, DeriveDataTypeable #-}
-- | Types used while planning how to build everything in a project.
--
-- Primarily this is the 'ElaboratedInstallPlan'.
--
module Distribution.Client.ProjectPlanning.Types (
SolverInstallPlan,
-- * Elaborated install plan types
ElaboratedInstallPlan,
... | gbaz/cabal | cabal-install/Distribution/Client/ProjectPlanning/Types.hs | bsd-3-clause | 14,636 | 0 | 11 | 3,838 | 1,536 | 968 | 568 | 185 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.ES31Compatibility
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portab... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/ES31Compatibility.hs | bsd-3-clause | 728 | 0 | 5 | 101 | 57 | 43 | 14 | 9 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Text.PrettyPrint.ListLike (
UString, AString
) where
import Control.DeepSeq ( NFData )
impor... | ddssff/pretty-listlike | src/Text/PrettyPrint/ListLike.hs | bsd-3-clause | 1,048 | 0 | 7 | 189 | 203 | 119 | 84 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Create new a new project directory populated with a basic working
-- pr... | MichielDerhaeg/stack | src/Stack/New.hs | bsd-3-clause | 17,638 | 1 | 23 | 5,399 | 3,983 | 2,002 | 1,981 | 400 | 5 |
module Data.Classifier.NaiveBayes
( NaiveBayes
, fromClassifier
, remove
, test
, probabilities ) where
import Data.Binary
import Data.Classifier
import Data.Counter (Counter(..))
import Data.List
import Data.Map.Strict (Map)
import Data.Monoid
import Data.Ord
import Data.Ratio ((%))
import qualified Data.Co... | intolerable/naive-bayes | src/Data/Classifier/NaiveBayes.hs | bsd-3-clause | 2,441 | 0 | 18 | 566 | 1,040 | 547 | 493 | -1 | -1 |
module Exercises105 where
-- 1. a) has an error; b and c both return the same result
-- 2. foldl (flip (*)) 1 [1,2,3,4,5]
{-
(((((1 * 1) * 2) * 3) * 4) * 5)
((((1 * 2) * 3) * 4) * 5)
(((2 * 3) * 4) * 5)
((6 * 4) * 5)
(24 * 5)
120
-}
-- 3. One difference between foldl and foldr is: c) foldr, but not foldl, associates... | pdmurray/haskell-book-ex | src/ch10/Exercises10.5.hs | bsd-3-clause | 761 | 0 | 2 | 166 | 11 | 10 | 1 | 1 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
import Control.DeepSeq
import... | schernichkin/snakes | bench/Main.hs | bsd-3-clause | 3,730 | 0 | 19 | 895 | 1,511 | 794 | 717 | 78 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module CrossCodegen where
{-
A special cross-compilation mode for hsc2hs, which generates a .hs
file without needing to run the executables that the C compiler
outputs.
Instead, it uses the output of compilations only -- specifically,
whether compilatio... | DavidAlphaFox/ghc | utils/hsc2hs/CrossCodegen.hs | bsd-3-clause | 27,155 | 0 | 24 | 7,399 | 7,207 | 3,665 | 3,542 | 423 | 14 |
{-# LANGUAGE GADTs, RankNTypes, ConstraintKinds, TypeOperators, FlexibleInstances #-}
module Numeric.Trainee.Params (
Parametric,
Params(..), NoParams(..),
onParams, liftParams,
onParams2, liftParams2,
castParams
) where
import Prelude.Unicode
import Control.DeepSeq
import Data.Function (fix)
import Data.List ... | mvoidex/trainee | src/Numeric/Trainee/Params.hs | bsd-3-clause | 7,154 | 24 | 13 | 1,498 | 3,137 | 1,621 | 1,516 | -1 | -1 |
module Main where
import Game.GoreAndAsh
import Logger.API
-- | Application monad that is used for implementation of game API
type AppMonad = LoggerT Spider GMSpider
-- The application should be generic in the host monad that is used
app :: LoggerMonad t m => m ()
app = do
msgE <- inputMessage
outputMessage $ fm... | Teaspot-Studio/gore-and-ash | examples/Logger.hs | bsd-3-clause | 420 | 0 | 11 | 84 | 115 | 61 | 54 | 10 | 1 |
{-# LANGUAGE DefaultSignatures,
TypeOperators,
ScopedTypeVariables,
DefaultSignatures,
FlexibleContexts,
FlexibleInstances,
OverloadedStrings,
TupleSections,
MagicHash,
CPP,
JavaScriptFFI,
... | ghcjs/ghcjs-base | GHCJS/Marshal.hs | mit | 12,526 | 39 | 26 | 3,188 | 3,541 | 1,898 | 1,643 | 284 | 6 |
{-|
@since 2.9.0
Module: module Database.Persist.Sql.Raw.QQ
Description: QuasiQuoters for performing raw sql queries
This module exports convenient QuasiQuoters to perform raw SQL queries.
All QuasiQuoters follow the same pattern and are analogous to the similar named
functions exported from 'Database.Persist.Sql.Raw... | paul-rouse/persistent | persistent-qq/src/Database/Persist/Sql/Raw/QQ.hs | mit | 8,834 | 0 | 17 | 2,136 | 2,242 | 1,239 | 1,003 | 153 | 8 |
module Test.Chell.Types
( Test
, test
, testName
, TestOptions
, defaultTestOptions
, testOptionSeed
, testOptionTimeout
, TestResult(TestPassed, TestSkipped, TestFailed, TestAborted)
, Failure
, failure
, failureLocation
, failureMessage
, Location
, location
, locationFile
, locationModule
, ... | shlevy/chell | lib/Test/Chell/Types.hs | mit | 8,963 | 190 | 9 | 1,786 | 1,596 | 942 | 654 | 124 | 4 |
module Main where
import CPS.Syntax
import CPS.FromGHC
import GHC.Data as G
import GHC.Var as G
import GHC.Kind as G
import GHC.Type as G
import GHC.Syntax as G
import GHC.Primitives
import Name
import Utilities
import qualified Data.Set as S
import qualified Data.Map as M
functionExample :: G.Term
functionExampl... | beni55/cps-core | Main.hs | bsd-3-clause | 4,683 | 4 | 24 | 1,251 | 1,901 | 1,059 | 842 | 66 | 2 |
import Data.Compact
import Data.Compact.Internal
import qualified Data.Map as Map
main = do
let m = Map.fromList [(x,show x) | x <- [1..(10000::Integer)]]
c <- compactWithSharing m
print (length (show (getCompact c)))
c <- compact m
print (length (show (getCompact c)))
| olsner/ghc | libraries/compact/tests/compact_largemap.hs | bsd-3-clause | 281 | 0 | 15 | 51 | 138 | 70 | 68 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/ResetCacheParameterGroup.hs | mpl-2.0 | 5,559 | 3 | 10 | 1,035 | 579 | 350 | 229 | 72 | 1 |
--
-- Copyright (c) 2012 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 | xec/Parse.hs | gpl-2.0 | 3,814 | 0 | 16 | 927 | 1,232 | 597 | 635 | 99 | 18 |
{-# LANGUAGE JavaScriptFFI, OverloadedStrings, ScopedTypeVariables #-}
module Main where
import Data.Char
import Data.IORef
import Data.Monoid
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Exception
import Control.Monad
import GHCJS.Foreign
import GHCJS.Foreign.Callback
import GHCJS.Types
... | ryantrinkle/ghcjs | test/ffi/callback.hs | mit | 5,012 | 24 | 17 | 1,243 | 1,794 | 872 | 922 | 120 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, TemplateHaskell, DeriveFunctor, DeriveFoldable, DeriveTraversable, DeriveDataTypeable,
PatternGuards #-}
module Lamdu.Data.Expression.Infer
( Inferred(..), rExpression
, Loaded, load, loadIndependent
, inferLoaded, addRules
, derefExpr, derefNode
, IsRestr... | schell/lamdu | Lamdu/Data/Expression/Infer.hs | gpl-3.0 | 19,800 | 0 | 22 | 4,207 | 5,668 | 2,964 | 2,704 | -1 | -1 |
{-|
Module : IRTS.JavaScript.PrimOp
Description : The JavaScript primitive operations.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE OverloadedStrings, PatternGuards, StandaloneDeriving #-}
module IRTS.JavaScript.PrimOp
( PrimF
, PrimDec
, JsPrimTy(..)
, primDB
, jsPrimCoerce
... | kojiromike/Idris-dev | src/IRTS/JavaScript/PrimOp.hs | bsd-3-clause | 14,816 | 0 | 14 | 2,849 | 6,026 | 2,960 | 3,066 | 228 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude
, ExistentialQuantification
, MagicHash
, RecordWildCards
, PatternSynonyms
#-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC... | tolysz/prepare-ghcjs | spec-lts8/base/GHC/Exception.hs | bsd-3-clause | 8,674 | 2 | 13 | 1,520 | 1,012 | 558 | 454 | 97 | 2 |
#!/usr/bin/env stack
-- stack --resolver lts-9.21 script
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}... | gbwey/persistent | .github/reproductionTemplates/sqlite.hs | mit | 929 | 0 | 11 | 237 | 120 | 67 | 53 | 19 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module CostCentreState ( CostCentreState, newCostCentreState
, CostCentreIndex, unCostCentreIndex, getCCIndex
) where
import GhcPrelude
import FastString
import FastStringEnv
import Data.Data
... | sdiehl/ghc | compiler/profiling/CostCentreState.hs | bsd-3-clause | 1,152 | 0 | 9 | 234 | 195 | 114 | 81 | 22 | 1 |
-- GSoC 2015 - Haskell bindings for OpenCog.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
-- | Simple example on inserting and removing many atoms in a new AtomSpace.
import OpenCog.AtomSpace (TruthVal(..),Atom(..),AtomSpace,
runOnNewAtomSpace,get,insert,remove,
... | inflector/atomspace | examples/haskell/example_multiple_atoms.hs | agpl-3.0 | 1,057 | 0 | 14 | 365 | 287 | 148 | 139 | 23 | 1 |
module Main where
import Language.Haskell.TH.Syntax
t1 = case mkName "^.." of
Name (OccName ".") (NameQ (ModName "^")) -> error "bug0"
Name (OccName "^..") NameS -> return ()
t2 = case mkName "Control.Lens.^.." of
Name (OccName ".") (NameQ (ModName "Control.Lens.^")) -> error "bug... | green-haskell/ghc | testsuite/tests/th/T8633.hs | bsd-3-clause | 623 | 0 | 12 | 153 | 265 | 129 | 136 | 14 | 2 |
y :: Int
y = y + 1
-- Machine-sized integers
i :: Int
i = -78
printBounds = (minBound :: Int, maxBound :: Int)
-- Arbitrary-precision integers
n :: Integer
n = 1234567890987654321987340982334987349872349874534
reallyBig :: Integer
reallyBig = 2^(2^(2^(2^2)))
numDigits :: Int
numDigits = length (show reallyBig)
--... | v0lkan/learning-haskell | session-005/001.back-to-the-future.hs | mit | 3,325 | 0 | 11 | 785 | 1,198 | 666 | 532 | 90 | 1 |
module Main where
import Homework.Week07.Assignment
import Homework.Week07.Editor
import Homework.Week07.StringBuffer
main :: IO ()
main = runEditor editor $ unlines
[ "This buffer is for notes you don't want to save, and for"
, "evaluation of steam valve coefficients."
, "To load a differe... | laser/cis-194-spring-2017 | src/Homework/Week07/StringBufEditor.hs | mit | 409 | 0 | 7 | 104 | 59 | 35 | 24 | 10 | 1 |
module Main where
import System.IO
import Text.Show.Pretty (ppShow)
import Data.CapnProto.Schema (readSchema)
import Data.CapnProto.Schema.Generator (generateCode)
main :: IO ()
main = do
schema <- readSchema stdin
{- putStrLn . ppShow $ schema... | cstrahan/hs-capnp | capnpc-hs/Main.hs | mit | 373 | 0 | 8 | 122 | 87 | 48 | 39 | 10 | 1 |
import XMonad
import XMonad.Actions.CycleWS
import XMonad.Actions.GridSelect
import XMonad.Actions.NoBorders
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.Dishes
import XMonad.Layout.LimitWindows
import XMonad.Layout.Grid
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorks... | Delapouite/dotfiles | link/.xmonad/xmonad.azerty.hs | mit | 10,522 | 0 | 13 | 2,993 | 1,901 | 1,155 | 746 | 140 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverlappingInstances #-}
module Text.XML.Generic where
import Data.Word
import Data... | jhedev/xml-conduit-generics | src/Text/XML/Generic.hs | mit | 2,376 | 0 | 16 | 589 | 861 | 463 | 398 | 57 | 0 |
--myMaybe.hs
module MyMaybe where
safeHead :: [a] -> Maybe a
safeHead [] = Nothing
safeHead (x:_) = Just x | deciduously/Haskell-First-Principles-Exercises | 2-Defining and combining/9-Lists/code/myMaybe.hs | mit | 107 | 0 | 7 | 19 | 48 | 26 | 22 | 4 | 1 |
module Module.Capnp.Pointer (ptrTests) where
import Data.Bits
import Data.Int
import Data.Word
import Test.Hspec
import Test.QuickCheck
import Capnp.Pointer
instance Arbitrary EltSpec where
arbitrary = oneof [ EltNormal <$> arbitrary <*> arbitraryU29
, EltComposite <$> arbitraryI29
... | zenhack/haskell-capnp | tests/Module/Capnp/Pointer.hs | mit | 2,729 | 0 | 16 | 1,202 | 443 | 247 | 196 | 52 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module SuperUserSpark.Parser.TestUtils where
import TestImport hiding (succeeds)
import Data.Either (isRight)
import SuperUserSpark.Parser.Internal
import Text.Parsec
import Text.Parsec.String
shouldSucceed
:: (Show a, Eq a)
=> Parser a -> String -> IO ()
shouldSucceed parse... | NorfairKing/super-user-spark | test/SuperUserSpark/Parser/TestUtils.hs | mit | 1,621 | 0 | 10 | 298 | 552 | 284 | 268 | 40 | 2 |
module Hablog.Routes
( routes
) where
import Control.Monad.Reader (runReaderT)
import Hablog.Admin.Pages.Login (loginRequired)
import Hablog.Data (Page)
import Hablog.Data.RequestState (RequestState(..))
import Hablog.Data.Sitemap
import Happstack.Server (Response, ServerPartT)
import Web.Rout... | garrettpauls/Hablog | src/Hablog/Routes.hs | mit | 1,038 | 0 | 15 | 280 | 287 | 162 | 125 | 25 | 9 |
module STMGraphs.Heterogenous.DynKey where
import STMGraphs.Prelude
-- |
-- A dynamic value usable as a key in a hash map.
data DynKey =
forall a. (Eq a) => DynKey !Int !TypeRep !a
instance Hashable DynKey where
hashWithSalt s = hashWithSalt s . hash
hash (DynKey h _ _) = h
instance Eq DynKey where
DynKey ... | nikita-volkov/stm-graphs | library/STMGraphs/Heterogenous/DynKey.hs | mit | 485 | 0 | 8 | 112 | 190 | 96 | 94 | -1 | -1 |
{-# Language MultiParamTypeClasses, FlexibleInstances, TypeFamilies #-}
module Control.CCA.Apply where
class (F f a ~ r, G a r ~ f) => Apply f a r where
type F f a
type G a r
apply:: f -> a -> r
instance Apply f () f where
type F f () = f
type G () f = f
apply = const
instance (Apply y z r, F y z ~ r, G ... | farre/ccat | src/Control/CCA/Apply.hs | mit | 459 | 0 | 8 | 137 | 264 | 142 | 122 | 14 | 0 |
-- Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:
--
-- 1634 = 1^4 + 6^4 + 3^4 + 4^4
-- 8208 = 8^4 + 2^4 + 0^4 + 8^4
-- 9474 = 9^4 + 4^4 + 7^4 + 4^4
-- As 1 = 1^4 is not a sum it is not included.
--
-- The sum of these numbers is 1634 + 8208 + 9474 = 19316.
-... | daniel-beard/projecteulerhaskell | Problems/p30.hs | mit | 733 | 0 | 15 | 171 | 141 | 77 | 64 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
-- | Example 'Source' based on 'directory-layout'
module Control.Biegunka.Source.Layout
( Layout
, layout
) where
import Control.Applicative (empty)
import Control.Lens
import System.FilePath (takeDirectory, takeFileName)
import System.Directory.Layout (Layout, dir, make)
import Contr... | biegunka/biegunka | src/Control/Biegunka/Source/Layout.hs | mit | 953 | 0 | 17 | 227 | 221 | 125 | 96 | 26 | 1 |
{-# OPTIONS -funbox-strict-fields #-}
module Cmm.Op where
import Data.Binary
import Util.Gen
import Text.ParserCombinators.ReadP as P
import Text.Read.Lex
{-
Basic operations. These are chosen to be roughly equivalent to c-- operations,
but can be effectively used to generate C or assembly code as well.
An operatio... | dec9ue/jhc_copygc | src/Cmm/Op.hs | gpl-2.0 | 11,506 | 0 | 13 | 3,226 | 3,374 | 1,740 | 1,634 | 317 | 16 |
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, OverlappingInstances, DeriveDataTypeable, StandaloneDeriving, TypeSynonymInstances, TupleSections, FlexibleInstances, NoMonomorphismRestriction #-}
module AVLBaumBonn.Central where
import qualified TextConfig
import Challenger.Partial (Verify(..), Partial(..))
imp... | Erdwolf/autotool-bonn | src/AVLBaumBonn/Central.hs | gpl-2.0 | 8,059 | 0 | 17 | 2,742 | 2,030 | 1,056 | 974 | 162 | 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/StepDT.hs | gpl-3.0 | 1,014 | 0 | 11 | 218 | 126 | 79 | 47 | 10 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE TemplateHaskell, StandaloneDeriving, DeriveDataTypeable #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module Db.AcidTypes where
import BaseImport
import Data.SafeCopy
import Audit.ContentHistory
import Audit.EditAction
import Audit.ObjectHistory
import Audit.... | c0c0n3/audidoza | app/Db/AcidTypes.hs | gpl-3.0 | 978 | 0 | 11 | 167 | 226 | 116 | 110 | 24 | 0 |
-- | Processing export files
{-# LANGUAGE LambdaCase #-}
module Lamdu.Data.Export.JSON.Process (process) where
import Control.Lens.Operators
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Encode.Pretty as AesonPretty
import qualified Data.ByteString.Lazy as BSL
import qualified Lamdu.Data.... | da-x/lamdu | Lamdu/Data/Export/JSON/Process.hs | gpl-3.0 | 829 | 0 | 12 | 181 | 230 | 132 | 98 | 20 | 2 |
import Graphics.Gloss
import Graphics.Gloss.Interface.IO.Game
import Graphics.Gloss.Game
import Graphics.Gloss.Data.Point
import Data.Fixed
import Data.List(elemIndex)
import Data.Maybe
import Control.Monad
import World
import Constants
import Castle
import Game
import GUI
main = do
let
window = InWindo... | Marthog/ld33 | Main.hs | gpl-3.0 | 3,535 | 0 | 14 | 875 | 1,284 | 658 | 626 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/Pipelines/Run.hs | mpl-2.0 | 6,034 | 0 | 16 | 1,282 | 728 | 434 | 294 | 102 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/DeprecateDomain.hs | mpl-2.0 | 4,138 | 0 | 9 | 838 | 364 | 229 | 135 | 47 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Model.Item(Item, Slug, backlinks, getItem, getItems, postItem) where
import Control.Monad (liftM)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Either (EitherT, left)
import D... | bitraten/bitrest | src/Model/Item.hs | agpl-3.0 | 3,069 | 0 | 12 | 1,245 | 724 | 398 | 326 | 55 | 2 |
module Lupo.ConnectionPool
( ConnectionPool (..)
, withConnection
, makeConnectionPool
) where
import qualified Control.Concurrent.Chan as CC
import Control.Monad.CatchIO
import Control.Monad.Trans
import Lupo.Import
data ConnectionPool conn = ConnectionPool
{ checkoutConnection :: IO conn
, checkinConne... | keitax/lupo | src/Lupo/ConnectionPool.hs | lgpl-3.0 | 956 | 0 | 13 | 197 | 269 | 142 | 127 | 25 | 1 |
-- | Simplify doctests by pretty-printing results.
module VersionFile.Parser.Test where
-- | Print the result if there is one.
-- >>> testV id $ return 4
-- 4
testV :: Show s => (a -> s) -> Maybe a -> IO ()
testV _ Nothing = putStrLn "Nothing"
testV show' (Just x) = print (show' x)
-- | Print each result on a separa... | gelisam/cabal-rangefinder | src/VersionFile/Parser/Test.hs | unlicense | 519 | 0 | 9 | 113 | 168 | 88 | 80 | 7 | 1 |
import Control.Concurrent
import Control.Monad
import Data.Char
import Data.Either
import Data.Ratio
import Data.Word
import System.BSD.Sysctl
import System.Directory
import System.Environment
import System.Exit
import System.Posix.Signals
import System.Process
import System.IO
import System.IO.Error
import System.Info... | nakal/xmonad-conf | lib/SysInfoBar.hs | bsd-2-clause | 9,172 | 0 | 17 | 2,982 | 2,521 | 1,286 | 1,235 | 199 | 3 |
{-
Copyright (c) 2012 John P. Feltz <jfeltz@gmail.com>
License: BSD-Style, See LICENSE
-}
--Tweaked from parsec-extra-1.0.2
--License BSD3
--Original Author: Arie Peterson,
module Text.Parsec.Extra
( eol
, digit
, natural
, integer
, whitespace
) where
import Control.Applicative (Applicativ... | jfeltz/tasty-integrate | ide-format/Text/Parsec/Extra.hs | bsd-2-clause | 1,569 | 0 | 12 | 344 | 386 | 223 | 163 | 23 | 1 |
{-|
Description: base types
= navigating the types modules
there are a bunch of type-defining modules here; hopefully you can find what you want
== "Web.Respond.Types.Path"
this module defines 'PathConsumer' and several functions for working with that type
== "Web.Respond.Types.Response"
defines the types 'Responde... | raptros/respond | src/Web/Respond/Types.hs | bsd-3-clause | 1,535 | 0 | 5 | 290 | 70 | 51 | 19 | 9 | 0 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-
Copyright (C) 2004-2008 John Goerzen <jgoerzen@complete.org>
Copyright (C) 2015 David Farrell <shokku.ra@gmail.com>
-}
{-|
Module : Polar.ConfigFile.Types
Copyright : Copyright (C) 2004-2008 John Goerzen, 20... | polar-engine/polar-configfile | src/Polar/ConfigFile/Types.hs | bsd-3-clause | 3,911 | 0 | 13 | 1,089 | 364 | 234 | 130 | 37 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Jira2Sheet.Auth where
import Control.Exception (SomeException (..))
import Control.Monad.Except (MonadError (..))
import qualified Data.Text as Text
im... | berdario/jira2sheet | src/Jira2Sheet/Auth.hs | bsd-3-clause | 2,924 | 0 | 15 | 710 | 686 | 379 | 307 | 46 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Generics.EMGM.Representation
-- Copyright : (c) 2008, 2009 Universiteit Utrecht
-- License : BSD3
--
-- Maintainer : generics@haskell.org
-- Stability : experimental
-- Portability : non-portable
--
-- Sum... | spl/emgm | src/Generics/EMGM/Representation.hs | bsd-3-clause | 5,518 | 0 | 10 | 1,129 | 572 | 381 | 191 | 70 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.IO
import Text.Printf
import Control.Monad
import qualified Data.List as L
import qualified STHLib
data Flag
= Count
| Mean
| Stddev
| Stderr
| Sum
| Var
| Min
| ... | jespino/sth | sth.hs | bsd-3-clause | 5,515 | 17 | 12 | 1,320 | 2,077 | 1,062 | 1,015 | 123 | 4 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types... | reflex-frp/reflex-dom | reflex-dom-core/src/Reflex/Dom/Prerender.hs | bsd-3-clause | 12,464 | 0 | 28 | 2,525 | 3,856 | 1,957 | 1,899 | -1 | -1 |
import Distribution.Simple
main = defaultMain
{-
import Distribution.Simple (defaultMainWithHooks)
import Distribution.Simple.UUAGC (uuagcLibUserHook)
import UU.UUAGC (uuagc)
main :: IO ()
main = defaultMainWithHooks (uuagcLibUserHook uuagc)
-}
| atzedijkstra/delimiter-separated | Setup.hs | bsd-3-clause | 247 | 0 | 4 | 27 | 12 | 7 | 5 | 2 | 1 |
{-# LANGUAGE CPP, NamedFieldPuns, RecordWildCards, ViewPatterns #-}
-- | cabal-install CLI command: freeze
--
module Distribution.Client.CmdFreeze (
freezeCommand,
freezeAction,
) where
import Distribution.Client.ProjectOrchestration
import Distribution.Client.ProjectPlanning
import Distribution.Client.Proj... | themoritz/cabal | cabal-install/Distribution/Client/CmdFreeze.hs | bsd-3-clause | 9,943 | 0 | 29 | 2,370 | 1,443 | 812 | 631 | 163 | 4 |
{-# LANGUAGE OverloadedStrings
, TupleSections
, RecordWildCards
, FlexibleContexts
, PatternGuards
, FlexibleInstances #-}
module System.TaskL.JSON where
import Control.Applicative
import Control.Monad
import Data.ByteString (ByteStr... | solidsnack/taskl | System/TaskL/JSON.hs | bsd-3-clause | 5,582 | 0 | 15 | 1,585 | 2,114 | 1,096 | 1,018 | 123 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
module Main
( main
)
where
import AutoApply
import qualified Codec.Picture as JP
import quali... | expipiplus1/vulkan | examples/offscreen/Main.hs | bsd-3-clause | 29,433 | 0 | 20 | 10,930 | 4,508 | 2,544 | 1,964 | -1 | -1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
module Data.Arib.PSI.Internal.Common where
import ... | philopon/arib | src/Data/Arib/PSI/Internal/Common.hs | bsd-3-clause | 3,330 | 0 | 20 | 823 | 920 | 485 | 435 | 86 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import Data.Attoparsec.Text
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import HEP.Parser.LHCOAnalysis.Parse
main = do
str <- TIO.readFile "test.lhco"
let str' = str
let r = parseOnly lhco str'
case r of
Left err -> print err
... | wavewave/LHCOAnalysis | test/newtest.hs | bsd-3-clause | 353 | 0 | 12 | 84 | 109 | 57 | 52 | 12 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.