code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings #-}
module Data.Attoparsec.Text.Machine where
import Data.Attoparsec.Machine (processParserWith, streamParserWith)
import Data.Attoparsec.Text (Parser, parse, takeWhile)
import Data.Machine (ProcessT, asParts, auto, (<~))
import Data.Text (Text)
asLines :: Monad m => ProcessT m Text Te... | aloiscochard/sarsi | src/Data/Attoparsec/Text/Machine.hs | apache-2.0 | 756 | 0 | 12 | 120 | 275 | 149 | 126 | 14 | 2 |
-- |
-- Module : Test.QuickCheck.Util.Combinator
--
-- Copyright : (C) 2010-2012 Joachim Fasting
-- License : BSD-style (see COPYING)
-- Maintainer : Joachim Fasting <[email protected]>
--
-- Additional combinators for QuickCheck.
module Test.QuickCheck.Util.Combinator
( pairOf
, tripleOf
,... | joachifm/QuickCheck-util | Test/QuickCheck/Util/Combinator.hs | bsd-2-clause | 872 | 0 | 8 | 177 | 206 | 119 | 87 | 13 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
module YX.Shell
( findShell
, shellExePaths
, ExecuteShellException(..)
, module YX.Type.Shell
-- * Uti... | trskop/yx | src/YX/Shell.hs | bsd-3-clause | 2,371 | 0 | 16 | 551 | 601 | 340 | 261 | 64 | 4 |
{-# LANGUAGE FlexibleContexts #-}
module Opaleye.Manipulation (module Opaleye.Manipulation,
U.Unpackspec) where
import qualified Opaleye.Internal.Sql as Sql
import qualified Opaleye.Internal.Print as Print
import qualified Opaleye.RunQuery as RQ
import qualified Opaleye.Internal.RunQuery ... | danse/haskell-opaleye | src/Opaleye/Manipulation.hs | bsd-3-clause | 8,377 | 0 | 13 | 2,492 | 2,056 | 1,082 | 974 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Horbits.UI.Camera.Internal where
import Control.Lens
import Data.Fixed
import Data.List.NonEmpty as NE
import Linear
import Horbits.UI.Camera.Zoom
-- data type
data OrthoCamera a = OrthoCamera { _orthoCameraCenter ... | chwthewke/horbits | src/horbits/Horbits/UI/Camera/Internal.hs | bsd-3-clause | 4,533 | 0 | 13 | 1,161 | 1,648 | 833 | 815 | -1 | -1 |
module FP.Parser.SExp where
import FP.Prelude
import FP.Parser.Parser
import FP.Pretty
import qualified Prelude
data SNumber =
SNInteger β€
| SNDouble π»
deriving (Eq,Ord)
makePrettySum ''SNumber
data SLit =
SLNumber SNumber
| SLString π
deriving (Eq,Ord)
makePrettySum ''SLit
data SToken =
STL... | davdar/darailude | src/FP/Parser/SExp.hs | bsd-3-clause | 4,949 | 128 | 18 | 1,191 | 1,391 | 718 | 673 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, RecursiveDo, ScopedTypeVariables, FlexibleContexts, TypeFamilies, ConstraintKinds #-}
module Frontend.Properties.R53
(
r53Properties
) where
import Prelude hiding (mapM, mapM_, all, sequence)
import qualified Data.Map as Map
import Data.Monoid ((<>)... | Rizary/awspi | Lib/Frontend/Properties/R53.hs | bsd-3-clause | 4,264 | 29 | 55 | 1,299 | 1,198 | 643 | 555 | 94 | 7 |
{-# LANGUAGE FlexibleInstances #-}
module Eval (
runEval
) where
import Control.Monad.State
import Control.Monad.Writer (WriterT, runWriterT, tell)
import Data.List
import Data.Maybe
import qualified Data.Map as Map
import Text.PrettyPrint
import Pretty
import Syntax
-- Values
data Value
= VInt Integer
| VBo... | zanesterling/haskell-compiler | src/Eval.hs | bsd-3-clause | 1,951 | 0 | 14 | 516 | 858 | 433 | 425 | 64 | 5 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module HTIG.IRCServer.Core
( IRCState(..)
, IRCM
, runIRCM
, runIRCM'
, getConn
, getGlobal
, setGlobal
, modifyGlobal
, modifyGlobal'
, getLocal
, setLocal
, modifyLocal
, modifyLocal'
, liftIO
) where
import C... | nakamuray/htig | HTIG/IRCServer/Core.hs | bsd-3-clause | 2,338 | 0 | 13 | 666 | 965 | 504 | 461 | 66 | 1 |
{- |
Module : Skel
Description : Description
Copyright : 2014, Peter Harpending.
License : BSD3
Maintainer : Peter Harpending <[email protected]>
Stability : experimental
Portability : archlinux
-}
module Skel where
| pharpend/flogger | skel/Skel.hs | bsd-3-clause | 240 | 0 | 2 | 53 | 5 | 4 | 1 | 1 | 0 |
{-
Copyright (c) 2014-2015, Johan Nordlander, Jonas DuregΓ₯rd, MichaΕ PaΕka,
Patrik Jansson and Josef Svenningsson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistribu... | josefs/autosar | oldARSim/ARText.hs | bsd-3-clause | 16,113 | 0 | 10 | 6,857 | 2,216 | 1,295 | 921 | 261 | 0 |
import Control.Monad
import Control.Concurrent
import Control.Concurrent.STM
import System.Posix.IO
import GHC.Event
main_ :: IO ()
main_ = do
Just em <- getSystemEventManager
registerTimeout em 1000000 (print 888)
registerFd em (\k e -> getLine >>= print >> print k >> print e) stdInput evtRead
threadDelay 2000000... | YoshikuniJujo/xmpipe | test/testPolling.hs | bsd-3-clause | 643 | 4 | 15 | 116 | 262 | 123 | 139 | 23 | 1 |
{-# LANGUAGE TemplateHaskell, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeFamilies #-}
module WormLikeChain where
import Control.Applicative
import Control.Monad
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Generic
import qualified Data.Vector.Generic.Mutable
import Data... | bgamari/polymer-models | WormLikeChain.hs | bsd-3-clause | 6,303 | 1 | 16 | 1,718 | 2,147 | 1,150 | 997 | 126 | 5 |
{-# LANGUAGE TypeFamilies ,MultiParamTypeClasses,DeriveFunctor,DeriveFoldable,DeriveGeneric ,TypeOperators#-}
module Scaling.S1 where
import Space.Class
import Exponential.Class
import Data.Foldable
import Multiplicative.Class
import Data.FMonoid.Class
import Data.Distributive
import Data.Monoid
import Linear.V2
impor... | massudaw/mtk | Scaling/S1.hs | bsd-3-clause | 1,199 | 1 | 8 | 232 | 432 | 228 | 204 | 36 | 0 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Text.HeX.Standard.LaTeX (defaults) where
import Text.HeX
import Text.HeX.Standard.TeX (ctl, ch, grp)
import Text.HeX.Standard.Generic (getSectionNum)
defaults :: HeX ()
defaults = do
addParser [Inline] $ basicInline ch
addParser [Block] $ basicBlock t... | jgm/HeX | Text/HeX/Standard/LaTeX.hs | bsd-3-clause | 1,264 | 0 | 12 | 317 | 426 | 215 | 211 | 32 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Network.Linode.Internal where
import Control.Error
import Control.Exception (IOException, handle)
import Control.Lens ((&), (.~), (^?))
import Control.Monad.IO.Class (liftIO)
import ... | Helkafen/haskell-linode | src/Network/Linode/Internal.hs | bsd-3-clause | 2,388 | 0 | 17 | 623 | 632 | 334 | 298 | 42 | 3 |
import Tutorial.Chapter8.Bug (Sex(..), BugColour(..), buildBug)
import ALife.Creatur.Universe (store, mkSimpleUniverse)
import ALife.Creatur.Genetics.BRGCBool (put, runWriter,
runDiploidReader)
import Control.Monad.State.Lazy (evalStateT)
main :: IO ()
main = do
let u = mkSimpleUniverse "Chapter8" "chapter8"
... | mhwombat/creatur-examples | src/Tutorial/Chapter8/GeneratePopulation.hs | bsd-3-clause | 925 | 0 | 13 | 166 | 388 | 193 | 195 | 20 | 1 |
module Main where
import Control.Monad
import System.Exit (exitFailure)
import System.Environment
import L2.AbsL
import L2.ParL
import L2.ErrM
import Liveness.Liveness
main :: IO ()
main = do
args <- getArgs
when (length args /= 1) $ do
putStrLn "usage: filename"
exitFailure
ts <- liftM myL... | mhuesch/scheme_compiler | src/Liveness/Main.hs | bsd-3-clause | 585 | 0 | 12 | 167 | 188 | 89 | 99 | 22 | 2 |
module Matterhorn.Events.ChannelListOverlay
( onEventChannelListOverlay
, channelListOverlayKeybindings
, channelListOverlayKeyHandlers
)
where
import Prelude ()
import Matterhorn.Prelude
import qualified Graphics.Vty as Vty
import Matterhorn.Events.Keybindings
import ... | matterhorn-chat/matterhorn | src/Matterhorn/Events/ChannelListOverlay.hs | bsd-3-clause | 1,458 | 0 | 10 | 232 | 208 | 118 | 90 | 24 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import System.Environment
main = withArgs [ "-o", "test4.png", "-w", "400", "-h", "400" ] $ defaultMain $ ((text "ABCDEFGHabcdefgh" # fontSize 2 # translateX 8 <> rect 10 1 # lw 0.1) # translateX (-5)) <> rect 12... | diagrams/diagrams-test | misc/av-font.hs | bsd-3-clause | 332 | 0 | 15 | 51 | 120 | 63 | 57 | 5 | 1 |
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RecordWildCards #-}
module LDrive.Platforms where
-- ( testPlatformParser
-- , ColoredLEDs(..)
--... | sorki/odrive | src/LDrive/Platforms.hs | bsd-3-clause | 9,381 | 0 | 12 | 2,191 | 2,080 | 1,278 | 802 | 252 | 3 |
module Main
(
main
) where
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.Attoparsec.Char8 as P
import Data.Attoparsec.Lazy hiding (skipWhile,take)
import Data.List (intercalate,transpose)
import NanoUtils.Container (normalizeByMax)
import System.IO
main = do
xss <- parseFile
... | nanonaren/Reducer | Normalize.hs | bsd-3-clause | 706 | 0 | 14 | 116 | 225 | 124 | 101 | 20 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances,
PatternGuards #-}
module Idris.Core.Evaluate(normalise, normaliseTrace, normaliseC, normaliseAll,
rt_simplify, simplify, specialise, hnf, convEq, convEq',
Def(..), CaseInfo(..), CaseDefs(..),
Accessibili... | ctford/Idris-Elba-dev | src/Idris/Core/Evaluate.hs | bsd-3-clause | 40,466 | 5 | 29 | 15,550 | 14,165 | 7,242 | 6,923 | 727 | 75 |
{-# LANGUAGE FlexibleContexts #-}
-- | @futhark py@
module Futhark.CLI.Python (main) where
import Futhark.Actions (compilePythonAction)
import Futhark.Compiler.CLI
import Futhark.Passes
-- | Run @futhark py@
main :: String -> [String] -> IO ()
main = compilerMain
()
[]
"Compile sequential Python"
"Generate s... | diku-dk/futhark | src/Futhark/CLI/Python.hs | isc | 498 | 0 | 9 | 81 | 111 | 62 | 49 | 14 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
module Commands.Plugins.Spiros.Finite.Types where
import Commands.Plugins.Spiros.Extra.Types
import Commands.Plugins.Spiros.Edit.Types
import Numeric.Natural
data Finite
= Finite Natural Finite0
deriving (Show,Read,Eq,Ord,Generic,Data,NFData)
data Finite0
= Ed... | sboosali/commands-spiros | config/Commands/Plugins/Spiros/Finite/Types.hs | gpl-2.0 | 442 | 0 | 6 | 71 | 120 | 71 | 49 | 12 | 0 |
{-# LANGUAGE TemplateHaskell, LambdaCase, GeneralizedNewtypeDeriving, ViewPatterns #-}
module Commands.Plugins.Spiros.Types where
import Commands.Plugins.Spiros.Extra.Types
-- import qualified Commands.Servers.Servant as Server
-- import Commands.Backends.Workflow (WorkflowT,MonadWorkflow_,MonadThrow)
import ... | sboosali/commands-spiros | config/Commands/Plugins/Spiros/Types.hs | gpl-2.0 | 1,707 | 0 | 7 | 238 | 264 | 161 | 103 | 30 | 0 |
{-| Implementation of the primitives of instance allocation
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015 Google Inc.
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 so... | mbakke/ganeti | src/Ganeti/HTools/Cluster/AllocatePrimitives.hs | bsd-2-clause | 3,665 | 0 | 16 | 765 | 553 | 296 | 257 | 46 | 1 |
-- |
-- Module : Foundation.Tuple
-- License : BSD-style
-- Maintainer : Vincent Hanquez <[email protected]>
-- Stability : experimental
-- Portability : portable
--
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Foundation.Tuple
( Tuple2(..)
, Tuple3(..)
, Tuple4(..)
... | vincenthz/hs-foundation | foundation/Foundation/Tuple.hs | bsd-3-clause | 3,381 | 0 | 9 | 798 | 1,445 | 795 | 650 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module Version where
import Version.TH
import Data.Version (showVersion)
import qualified Paths_birch as P
version :: String
version = showVersion P.version ++ "-" ++ $(getCommitHash)
| hithroc/hsvkbot | src/Version.hs | bsd-3-clause | 218 | 0 | 8 | 29 | 53 | 32 | 21 | 7 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE GADTs #-}
module Llvm.Pass.RewriteUse where
import Control.Monad
import Data.Maybe
import Prelude hiding (succ)
import qualified Compiler.Hoopl as H
import Llvm.Data.Ir
import Llvm.Util.Monadic (maybeM)
import Debug.Trace
type MaybeChange a = a -> Maybe a
f2 :: (a -... | mlite/hLLVM | src/Llvm/Pass/RewriteUse.hs | bsd-3-clause | 10,153 | 0 | 15 | 4,105 | 3,936 | 1,958 | 1,978 | 159 | 13 |
--------------------------------------------------------------------
-- |
-- Module : Text.XML.Light.Cursor
-- Copyright : (c) Galois, Inc. 2008
-- License : BSD3
--
-- Maintainer: Iavor S. Diatchki <[email protected]>
-- Stability : provisional
-- Portability: portable
--
-- XML cursors for working XML content ... | amremam2004/vxmlizer | Text/XML/Light/Cursor.hs | bsd-3-clause | 10,568 | 0 | 18 | 2,858 | 2,799 | 1,526 | 1,273 | 196 | 3 |
module Usage.Usage where
import qualified Definition.Definition as D.D
test :: Int
test = D.D.s<caret>even + 1
| charleso/intellij-haskforce | tests/gold/codeInsight/QualifiedImportMultipleLevels_AsPartConsistsOfMultipleCons/Usage/Usage.hs | apache-2.0 | 115 | 0 | 8 | 20 | 41 | 25 | 16 | -1 | -1 |
{-
Copyright (C) 2012-2016 John MacFarlane <[email protected]>
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 program is ... | janschulz/pandoc | src/Text/Pandoc/Slides.hs | gpl-2.0 | 2,734 | 0 | 16 | 779 | 513 | 263 | 250 | 28 | 6 |
{-# OPTIONS_GHC -fwarn-safe #-}
-- | Basic test to see if Safe warning flags compile
-- Warn if module is inferred safe
-- In this test the warning _shouldn't_ fire
module SafeFlags23 where
import System.IO.Unsafe
f :: Int
f = 1
| sdiehl/ghc | testsuite/tests/safeHaskell/flags/SafeFlags24.hs | bsd-3-clause | 232 | 0 | 4 | 44 | 24 | 17 | 7 | 5 | 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="hr-HR">
<title>Directory List v2.3</title>
<maps>
<homeID>directorylistv2_3</homeID>
<m... | thc202/zap-extensions | addOns/directorylistv2_3/src/main/javahelp/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 978 | 78 | 66 | 157 | 412 | 209 | 203 | -1 | -1 |
{-
Parser.hs: Parser for the Flounder interface definition language
Part of Flounder: a strawman device definition DSL for Barrelfish
Copyright (c) 2009, ETH Zurich.
All rights reserved.
This file is distributed under the terms in the attached LICENSE file.
If you do not ... | joe9/barrelfish | tools/flounder/Parser.hs | mit | 9,137 | 5 | 23 | 4,498 | 2,035 | 1,031 | 1,004 | 163 | 4 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
module T15361 where
import Data.Kind
import Data.Type.Equality
-- Don't report (* ~ *) here
foo :: forall (a :: Type) (b :: Type) (c :: Type).
a :~~: b -> a :~~: c
foo HRefl = HRefl
data Chumbawam... | sdiehl/ghc | testsuite/tests/typecheck/should_fail/T15361.hs | bsd-3-clause | 495 | 0 | 7 | 102 | 138 | 81 | 57 | -1 | -1 |
import qualified Data.Vector as U
import Data.Bits
main = print . U.maximumBy (\x y -> GT) . U.map (*2) . U.map (`shiftL` 2) $ U.replicate (100000000 :: Int) (5::Int)
| hvr/vector | old-testsuite/microsuite/maximumBy.hs | bsd-3-clause | 168 | 0 | 11 | 30 | 89 | 51 | 38 | 3 | 1 |
import Data.Bits ((.&.))
flags :: Int -> Int
flags x
| x .&. 128 > 0 = 12
| otherwise = 13
{-# NOINLINE flags #-}
main :: IO ()
main = print (flags 255)
| ezyang/ghc | testsuite/tests/codeGen/should_run/T13425.hs | bsd-3-clause | 159 | 0 | 9 | 41 | 78 | 40 | 38 | 8 | 1 |
-- !!! Check the Read instance for Array
-- [Not strictly a 'deriving' issue]
module Main( main ) where
import Data.Array
bds :: ((Int,Int),(Int,Int))
bds = ((1,4),(2,5))
type MyArr = Array (Int,Int) Int
a :: MyArr
a = array bds [ ((i,j), i+j) | (i,j) <- range bds ]
main = do { putStrLn (show a) ;
let ... | olsner/ghc | testsuite/tests/deriving/should_run/drvrun009.hs | bsd-3-clause | 418 | 0 | 12 | 132 | 189 | 111 | 78 | 11 | 1 |
-- !!! Test seeking
import System.IO
main = do
h <- openFile "hSeek001.in" ReadMode
True <- hIsSeekable h
hSeek h SeekFromEnd (-1)
z <- hGetChar h
putStr (z:"\n")
hSeek h SeekFromEnd (-3)
x <- hGetChar h
putStr (x:"\n")
hSeek h RelativeSeek (-2)
w <- hGetChar h
putStr (w:"... | urbanslug/ghc | libraries/base/tests/IO/hSeek001.hs | bsd-3-clause | 614 | 0 | 9 | 189 | 295 | 131 | 164 | 26 | 1 |
module Main where
areaTriangleTrig a b c = c * height / 2
where
cosa = (b ^ 2 + c ^ 2 - a ^ 2) / (2 * b * c)
sina = sqrt (1 - cosa ^ 2)
height = b * sina
areaTriangleHeron a b c = result
where
result = sqrt (s * ... | fredmorcos/attic | snippets/haskell/triangle-area.hs | isc | 391 | 0 | 13 | 208 | 175 | 94 | 81 | 8 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
-- | This module provides facilities for obtaining the types of
-- various Futhark constructs. Typically, you will need to execute
-- these in a context where type information is a... | HIPERFIT/futhark | src/Futhark/IR/Prop/TypeOf.hs | isc | 5,812 | 0 | 11 | 1,166 | 1,717 | 884 | 833 | 126 | 1 |
{-# LANGUAGE JavaScriptFFI #-}
module Doppler.GHCJS.VirtualDOM.VDom (
VDom, requireVDom
) where
import GHCJS.Types (JSVal)
newtype VDom = VDom JSVal
foreign import javascript interruptible "require(['virtual-dom'], $c);"
requireVDom :: IO VDom
| oinuar/doppler | src/Doppler/GHCJS/VirtualDOM/VDom.hs | mit | 254 | 3 | 6 | 39 | 51 | 32 | 19 | -1 | -1 |
import Data.List
import Data.Text hiding (intercalate, map)
import System.Hclip
import Text.ParserCombinators.Parsec
-- | Strip, with Strings instead of Text for arguments
trim :: String -> String
trim = unpack . strip . pack
-- | A single cell of a matrix
b... | mystor/matrix-detex | MatrixDetex.hs | mit | 1,604 | 0 | 16 | 464 | 477 | 242 | 235 | 37 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE CPP #-}
module Test.Hspec.Wai.Internal (
WaiExpectation
, WaiSession(..)
, runWaiSession
, runWithState
, withApplication
, getApp
, getState
, formatHeader
) wh... | hspec/hspec-wai | src/Test/Hspec/Wai/Internal.hs | mit | 1,937 | 0 | 9 | 335 | 431 | 248 | 183 | 37 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.SQLTransactionErrorCallback
(newSQLTransactionErrorCallback,
newSQLTransactionErrorCallbackSync,
... | ghcjs/jsaddle-dom | src/JSDOM/Generated/SQLTransactionErrorCallback.hs | mit | 2,755 | 0 | 13 | 595 | 561 | 335 | 226 | 47 | 1 |
module Instructions where
import Text.ParserCombinators.Parsec
import Control.Applicative hiding (many, (<|>))
type Coordinate = (Integer, Integer)
type Region = (Coordinate, Coordinate)
data Instruction = Instruction Task Region
deriving (Show)
data Task = TurnOn | Toggle | TurnOff
de... | corajr/adventofcode2015 | 6/Instructions.hs | mit | 947 | 0 | 12 | 279 | 299 | 163 | 136 | 28 | 1 |
module Main where
import Lib
import Text.Printf
import Data.Time.Clock.POSIX
n = 4::Int
main :: IO ()
main = do
startTime <- getPOSIXTime
printf "Maximum product of %d values taken in a straight line from array 'values':\n\t%d"
n $ maxStraightProduct n
stopTime <- getPOSIXTime
printf "\t(%s sec)\n" $... | JohnL4/ProjectEuler | Haskell/Problem011/app/Main.hs | mit | 349 | 0 | 10 | 70 | 91 | 47 | 44 | 12 | 1 |
-- | This module describes the interface (as a data tyep) that some variant
-- should implement. See `Variant`.
--
{-# LANGUAGE OverloadedStrings #-}
module NetHack.Data.Variant
( Variant()
, monster
, allMonsterNames
, commandPrefix
, variant
, loadVariant )
where
import Control.Applicat... | UnNetHack/pinobot | lib/NetHack/Data/Variant.hs | mit | 1,915 | 0 | 15 | 653 | 375 | 211 | 164 | 45 | 2 |
module Euler.E9 where
euler9 :: Int -> Int
euler9 n = x*y*z
where
(x,y,z) = findTriple n
genTriples :: Int -> [(Int, Int, Int)]
genTriples n = [(x,y,z) | x <- [1..n], y <- [x..n], z <- [y..n], x+y+z == n]
isPythTriple :: (Int,Int,Int) -> Bool
isPythTriple (x,y,z) = or
[ x*x + y*y == z*z
, x*x + z*z == y*y
, y*y... | D4r1/project-euler | Euler/E9.hs | mit | 472 | 4 | 11 | 105 | 320 | 174 | 146 | 15 | 1 |
module SyntheticWeb.Client.Executor
( executeTask
) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.STM (atomically)
import Data.Time (NominalDiffTime)
import SyntheticWeb.Client.Http (get, post, put)
import SyntheticWeb.Client.TimedAction (timedAction)
import SyntheticWeb.Counter ( Byt... | kosmoskatten/synthetic-web | src/SyntheticWeb/Client/Executor.hs | mit | 3,191 | 0 | 12 | 769 | 791 | 405 | 386 | 70 | 1 |
module AI where
import Control.Monad
import Data.Array.MArray
import Data.Array.IO
import Data.Word
import System.Random
type Index = Int
type Value = Int
type Weight = Value
type Neurons = IOArray Index Value
type Synapses = [(Index, Index, Weight)] -- src, dst, weight
type Goals = [Index]
type Brain ... | nitrix/ai | src/AI.hs | mit | 1,853 | 0 | 13 | 445 | 650 | 344 | 306 | 45 | 1 |
import Data.List
isTriangular threeNumbers = x + y > z
where
[x, y, z] = sort threeNumbers
countTrue = length . filter id
parseInputLine = map (read :: String -> Integer) . words
main = do
input <- getContents
print . countTrue . map (isTriangular . parseInputLine) . lines $ input
| lzlarryli/advent_of_code_2016 | day3/part1.hs | mit | 297 | 0 | 12 | 66 | 117 | 60 | 57 | 8 | 1 |
module Y2017.M03.D16.Solution where
import Data.Maybe (fromMaybe)
import Data.Set (Set)
import qualified Data.Set as Set
-- below imports available from 1HaskellADay git respository
import Analytics.Theory.Number.Prime
import Y2017.M03.D15.Solution (uniqueValuesUpTo)
{--
So, yesterday, when we solved the Exercise ... | geophf/1HaskellADay | exercises/HAD/Y2017/M03/D16/Solution.hs | mit | 2,693 | 0 | 12 | 475 | 223 | 126 | 97 | 14 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.Ex.Commands.Edit
-- License : GPL-2
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : portable
--
-- Implements quit commands.
module Yi.Keymap.Vim.Ex.Command... | atsukotakahashi/wi | src/library/Yi/Keymap/Vim/Ex/Commands/Edit.hs | gpl-2.0 | 1,401 | 0 | 13 | 337 | 389 | 217 | 172 | 30 | 2 |
module Handler.Servers where
import Import
import Control.Exception (IOException, try)
import Default (server)
import Service.Interface (get_task_types)
import Types.TaskTree (TaskTree)
getServersR :: Handler Html
getServersR = postServersR
postServersR :: Handler Html
postServersR = do
((result, formWidget), for... | marcellussiegburg/autotool | yesod/Handler/Servers.hs | gpl-2.0 | 1,099 | 0 | 17 | 211 | 355 | 178 | 177 | 26 | 2 |
module MarchUp.SimpleText (module Data.Monoid, element, textual) where
import qualified MarchUp.Text as T
import Data.Monoid
import Data.Traversable
import Data.Foldable
import Control.Applicative
type Text = T.Text String
element :: Show a => a -> Text
element = T.Elem . show
textual = T.Text
instance Show Text ... | jyp/MarXup | MarXup/SimpleText.hs | gpl-2.0 | 386 | 0 | 8 | 64 | 121 | 68 | 53 | 12 | 1 |
module TAP (
planTests, planNoPlan, planSkipAll,
runTests, is, isnt, like, unlike, pass, fail, ok,
skip, skipUnless, toDo,
diag, bailOut
) where
import System.IO
import System.Exit
import Control.Monad.State
import Control.Exception
import Text.Regex.Posix
data TAPState = TAPState {
planSet :... | goozbach/bash-tap-functions | tap.hs | gpl-2.0 | 7,041 | 0 | 21 | 2,297 | 2,742 | 1,355 | 1,387 | 191 | 5 |
-- Copyright (C) 2008 JP Bernardy
-- | Utilities shared by various UIs
module Yi.UI.Utils where
import Yi.Buffer
import Yi.Prelude
import Prelude (Ordering(..))
import Yi.Window
import Control.Arrow (second)
import Data.Monoid
import Yi.Style
import Data.List (zip, repeat, span, dropWhile, length, zipWith, transpose, ... | codemac/yi-editor | src/Yi/UI/Utils.hs | gpl-2.0 | 4,612 | 0 | 14 | 1,058 | 1,677 | 890 | 787 | 76 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE DeriveDataTypeable #-}
----------------------------------------------------------------------------------
-- |
-- Module : Tct.Method.Bounds.Automata
-- Copyrigh... | mzini/TcT | source/Tct/Method/Bounds/Automata.hs | gpl-3.0 | 9,573 | 0 | 14 | 2,547 | 3,062 | 1,627 | 1,435 | 160 | 3 |
module Main where
import Control.Applicative
import Data.Char
import Data.List hiding (or)
import Prelude hiding (or)
import System.Environment
import System.Exit
import System.Random
import Test.QuickCheck hiding (sample)
import Test.QuickCheck.Gen hiding (sample)
data Regex = Charset String
| Or Regex Re... | jthornber/rxgen | Main.hs | gpl-3.0 | 3,030 | 0 | 15 | 927 | 1,352 | 678 | 674 | 82 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/Triggers/Create.hs | mpl-2.0 | 5,996 | 0 | 18 | 1,358 | 861 | 501 | 360 | 129 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-cloudtrail/gen/Network/AWS/CloudTrail/DescribeTrails.hs | mpl-2.0 | 3,895 | 0 | 10 | 803 | 546 | 327 | 219 | 62 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/AdvertiserGroups/Patch.hs | mpl-2.0 | 5,702 | 0 | 20 | 1,376 | 909 | 525 | 384 | 128 | 1 |
import qualified Data.List ( )
| lspitzner/brittany | data/Test151.hs | agpl-3.0 | 62 | 0 | 4 | 36 | 10 | 6 | 4 | 1 | 0 |
module Model.AssetRevision.Types
( AssetRevision(..)
) where
import Model.Asset.Types
data AssetRevision = AssetRevision
{ revisionAsset :: !Asset
, revisionOrig :: !Asset
}
-- makeAssetRevision :: Asset -> Asset -> AssetRevision
-- makeAssetRevision o a = AssetRevision a o
| databrary/databrary | src/Model/AssetRevision/Types.hs | agpl-3.0 | 288 | 0 | 9 | 50 | 47 | 30 | 17 | 10 | 0 |
{-# LANGUAGE LambdaCase #-}
-- | Parsers for 'MidiMessage' and its components, implemented as Attoparsec
-- parsers. See "Data.Attoparsec.ByteString" for how to run them. In most common
-- use cases, the 'decodeMidi' function in "Sound.MIDI" should suffice.
module Sound.MIDI.Parser where
import Control.Applicative
imp... | tsahyt/midi-simple | src/Sound/MIDI/Parser.hs | lgpl-3.0 | 5,229 | 0 | 14 | 1,378 | 1,426 | 724 | 702 | 126 | 11 |
import Control.Monad (replicateM)
import Data.List (genericIndex)
facs :: [Integer]
facs = 1 : map fac [1..]
where fac n = n * (genericIndex facs (n - 1))
factorial = genericIndex facs
teams :: Integer -> Integer -> Integer
teams _ 0 = 1
teams n k = div (factorial n) ((factorial k) * (factorial (n - k)))
runTest ... | itsbruce/hackerrank | func/memo/differentWays.hs | unlicense | 541 | 0 | 12 | 135 | 266 | 133 | 133 | 18 | 1 |
{-# LANGUAGE Haskell2010 #-}
module Deprecated where
-- | Docs for something deprecated
deprecated :: Int
deprecated = 1
{-# DEPRECATED deprecated "Don't use this" #-}
| haskell/haddock | latex-test/src/Deprecated/Deprecated.hs | bsd-2-clause | 170 | 0 | 4 | 28 | 17 | 12 | 5 | 5 | 1 |
-- http://www.codewars.com/kata/54d6abf84a35017d30000b26
module Data.Complex.Gaussian.Prime where
import Data.Complex.Gaussian (Gaussian (..), norm)
isGaussianPrime :: Gaussian -> Bool
isGaussianPrime z@(Gaussian x y)
= n==2
|| n`mod`4==1 && isPrime n
|| y==0 && abs x `mod` 4==3 && isPrime (abs x)
|| x==0 &&... | Bodigrim/katas | src/haskell/B-Gaussian-primes.hs | bsd-2-clause | 516 | 0 | 21 | 117 | 251 | 136 | 115 | 11 | 1 |
{-# LANGUAGE Haskell2010 #-}
module Operators where
(+++) :: [a] -> [a] -> [a]
a +++ b = a ++ b ++ a
($$$) :: [a] -> [a] -> [a]
a $$$ b = b +++ a
(***) :: [a] -> [a] -> [a]
(***) a [] = a
(***) a (_:b) = a +++ (a *** b)
(*/\*) :: [[a]] -> [a] -> [a]
a */\* b = concatMap (*** b) a
(**/\**) :: [[a]] -> [[a]] -> [[a... | haskell/haddock | hypsrc-test/src/Operators.hs | bsd-2-clause | 431 | 0 | 9 | 118 | 318 | 184 | 134 | 15 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Rank2Types #-}
{-# LAN... | Hodapp87/ivory | ivory/src/Ivory/Language/Proc.hs | bsd-3-clause | 11,895 | 0 | 14 | 2,669 | 3,028 | 1,640 | 1,388 | 173 | 2 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE LambdaCase #-}
module Development.Cake3.Ext.UrWeb whe... | grwlf/cake3 | src/Development/Cake3/Ext/UrWeb1.hs | bsd-3-clause | 24,818 | 10 | 27 | 6,434 | 9,181 | 4,625 | 4,556 | 601 | 12 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections ... | mietek/stack | src/Stack/Build.hs | bsd-3-clause | 12,655 | 0 | 15 | 4,506 | 899 | 486 | 413 | 91 | 2 |
{-# OPTIONS -Wall #-}
-- The pec embedded compiler
-- Copyright 2011-2012, Brett Letner
module Pec.LLVM (dModule) where
import Control.Concurrent
import Data.Char
import Data.Generics.Uniplate.Data
import Data.List
import Data.Maybe
import Development.Shake.FilePath
import Grm.Prims
import Language.LLVM.Abs
import N... | stevezhee/pec | Pec/LLVM.hs | bsd-3-clause | 12,321 | 0 | 19 | 3,601 | 6,063 | 3,081 | 2,982 | 352 | 12 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.PackedPixels
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <[email protected]>
-- Stability : stable
-- Portability... | haskell-opengl/OpenGLRaw | src/Graphics/GL/EXT/PackedPixels.hs | bsd-3-clause | 816 | 0 | 5 | 107 | 67 | 48 | 19 | 11 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
#if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ < 710
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Control.Comonad.Density
-- Copyright :... | xuwei-k/kan-extensions | src/Control/Comonad/Density.hs | bsd-3-clause | 3,776 | 0 | 13 | 674 | 776 | 421 | 355 | 56 | 1 |
{-# LANGUAGE TemplateHaskell #-}
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
--
module Application where
------------------------------------------------------------------------------
impo... | HaskellCNOrg/snap-web | src/Application.hs | bsd-3-clause | 1,347 | 0 | 11 | 293 | 202 | 118 | 84 | 24 | 0 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnExpr]{Renaming of expressions}
Basically dependency analysis.
Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In
general, all of these functions return a renamed thing, and a set of
free variables.
-}
{-# LANGUAGE CPP #-}
{-# LA... | mcschroeder/ghc | compiler/rename/RnExpr.hs | bsd-3-clause | 78,620 | 107 | 22 | 22,682 | 19,916 | 10,578 | 9,338 | 1,161 | 15 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoStrict #-}
{-# LANGUAGE TupleSections #-}
module Data.IP.Builder
( -- * 'P.BoundedPrim' 'B.Builder's for general, IPv4 and IPv6 addresses.
ipBuilder
, ipv4B... | kazu-yamamoto/iproute | Data/IP/Builder.hs | bsd-3-clause | 10,407 | 0 | 25 | 3,457 | 2,719 | 1,511 | 1,208 | 184 | 22 |
{-# LANGUAGE ScopedTypeVariables #-}
-- | This module is unstable; functions are not guaranteed to be the same or even to exist in future versions
--
-- It is intended primarily for use by this library itself.
module Data.Bitmap.Util
( tablespoon
, subStr
, padByte
) where
import Control.Exception
imp... | bairyn/bitmaps | src/Data/Bitmap/Util.hs | bsd-3-clause | 1,643 | 0 | 10 | 365 | 342 | 199 | 143 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Views.Common.SEO where
import Control.Monad
import qualified Data.Text as T
import Data.Text.Lazy(Text)
import Data.String (fromString)
import qualified Text.Printf as PF
import Network.URI
import Text.Blaze.Html5((!))
import qualified Text.Blaze.Html5 as H
import qualified ... | DavidAlphaFox/sblog | src/Views/Common/SEO.hs | bsd-3-clause | 1,437 | 0 | 11 | 235 | 469 | 252 | 217 | 40 | 1 |
{-# LANGUAGE Safe, TypeFamilies #-}
module Data.Logic.Atom (
Atom, atom, unit
) where
import Control.Monad.Predicate
import Data.Logic.Term
import Data.Logic.Var
-- |A constant term.
newtype Atom a s = Atom a
instance Eq a => Term (Atom a) where
type Collapse (Atom a) = a
collapse (Atom x) = return x
... | YellPika/tlogic | src/Data/Logic/Atom.hs | bsd-3-clause | 539 | 0 | 9 | 127 | 212 | 115 | 97 | 16 | 1 |
{-|
Module : AERN2.Utils.Bench
Description : utilities for benchmarks
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : [email protected]
Stability : experimental
Portability : portable
-}
module AERN2.Utils.Bench
(
listFromGen
)
where
-- import Test.Qu... | michalkonecny/aern2 | aern2-mp/src/AERN2/Utils/Bench.hs | bsd-3-clause | 718 | 0 | 12 | 195 | 135 | 76 | 59 | 14 | 1 |
-- | The type of cave kinds. Every level in the game is an instantiated
-- cave kind.
module Game.LambdaHack.Content.CaveKind
( pattern DEFAULT_RANDOM
, CaveKind(..), InitSleep(..), makeData
#ifdef EXPOSE_INTERNAL
-- * Internal operations
, validateSingle, validateAll, mandatoryGroups
#endif
) where
import... | LambdaHack/LambdaHack | definition-src/Game/LambdaHack/Content/CaveKind.hs | bsd-3-clause | 7,660 | 0 | 34 | 2,054 | 1,349 | 778 | 571 | -1 | -1 |
-- |
-- Module : Data.Semiring.Properties
-- Copyright : Sebastian Fischer <mailto:[email protected]>
-- License : BSD3
--
-- This library provides properties for the 'Semiring' type class that
-- can be checked using libraries like QuickCheck or SmallCheck.
--
module Data.Semiring.Properties (
module D... | sebfisch/haskell-regexp | src/Data/Semiring/Properties.hs | bsd-3-clause | 1,632 | 0 | 9 | 468 | 509 | 273 | 236 | 23 | 1 |
module Test.Cache(main) where
import Development.Shake
import Development.Shake.FilePath
import System.Directory
import Data.Char
import Test.Type
main = testBuild test $ do
vowels <- newCache $ \file -> do
src <- readFile' file
liftIO $ appendFile "trace.txt" "1"
pure $ length $ filter ... | ndmitchell/shake | src/Test/Cache.hs | bsd-3-clause | 2,096 | 0 | 14 | 484 | 607 | 275 | 332 | 59 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
-- |
-- Module: $HEADER$
-- Description: TODO
-... | FPBrno/dht-dks | src/Data/DHT/DKS/Type/Message/UpdateSuccessorAck.hs | bsd-3-clause | 1,039 | 0 | 9 | 167 | 175 | 113 | 62 | 29 | 0 |
--
-- A very simple example application using System.MIDI.
-- It's a basic MIDI monitor: prints all the incoming messages.
--
module Main where
--------------------------------------------------------------------------------
import Control.Monad
import Control.Concurrent
import System.MIDI
import System.MIDI.Utili... | chpatrick/hmidi | examples/monitor.hs | bsd-3-clause | 976 | 0 | 10 | 171 | 174 | 82 | 92 | 20 | 1 |
-- {-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
-- {-# LANGUAGE MultiParamTypeClasses #-}
-- {-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE RecordWildCards #-}
-- {-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- {-# LANGUAGE MultiWayIf #-}
-- {-# LANGUAGE OverloadedStrings #-}
-- {-# LANGU... | reuleaux/pire | src/Pire/Refactor/Refactor.hs | bsd-3-clause | 34,059 | 18 | 17 | 7,871 | 5,777 | 3,125 | 2,652 | 246 | 9 |
module PatBind1 where
main :: Int
main = sum xs
x :: Int
xs :: [Int]
(x:xs) = [1, 2, 3]
y :: Int
ys :: [Int]
(y:ys) = [4, 5]
| roberth/uu-helium | test/correct/PatBind1.hs | gpl-3.0 | 130 | 0 | 6 | 36 | 84 | 50 | 34 | 9 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
... | dorchard/camfort | src/Language/Fortran/Model/Op/Meta/Core.hs | apache-2.0 | 1,113 | 0 | 3 | 360 | 33 | 31 | 2 | 13 | 0 |
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeOperators, GADTs, EmptyDataDecls, PatternGuards #-}
module Reflex.Dynamic.TH (qDyn, unqDyn, mkDyn) where
import Reflex.Dynamic
import Language.Haskell.TH
import qualified Language.Haskell.TH.Syntax as TH
import Language.Haskell.TH.Quote
import Data.Data
import Co... | k0001/reflex | src/Reflex/Dynamic/TH.hs | bsd-3-clause | 3,156 | 0 | 20 | 744 | 912 | 481 | 431 | -1 | -1 |
-- Command-line based Flapjax compiler. Run without any options for usage
-- information.
module Main where
import Control.Monad
import qualified Data.List as L
import System.Exit
import System.IO
import System.Console.GetOpt
import System.Environment hiding (withArgs)
import System.Directory
import BrownPLT.Html (re... | ducis/flapjax-fixed | flapjax/trunk/compiler/src/Fxc.hs | bsd-3-clause | 4,654 | 0 | 19 | 859 | 1,497 | 776 | 721 | 125 | 5 |
{-# LANGUAGE CPP #-}
-- |
-- Module : Network.TLS.Backend
-- License : BSD-style
-- Maintainer : Vincent Hanquez <[email protected]>
-- Stability : experimental
-- Portability : unknown
--
-- A Backend represents a unified way to do IO on different
-- types without burdening our calling API with multiple
--... | beni55/hs-tls | core/Network/TLS/Backend.hs | bsd-3-clause | 3,057 | 0 | 19 | 864 | 759 | 414 | 345 | 21 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Yesod.WebSockets
( -- * Core API
WebSocketsT
, webSockets
, webSocketsWith
, webSocketsOptions
, webSocketsOptionsWith
, receiveData
, receiveDataE
, receiveDataMessageE
, sendPing
, sendPi... | psibi/yesod | yesod-websockets/Yesod/WebSockets.hs | mit | 8,878 | 0 | 24 | 2,203 | 1,785 | 964 | 821 | 168 | 2 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Faktor.Param where
-- $Id$
import Autolib.Reader
import Autolib.ToDoc
import Data.Typeable
import Autolib.Set
data Param =
Param { von :: Int
, bis :: Int
, anzahl :: Int
}
deriving ( Typeable )
p :: Param
p = Param { von = 100
... | florianpilz/autotool | src/Faktor/Param.hs | gpl-2.0 | 506 | 4 | 9 | 120 | 149 | 88 | 61 | 18 | 1 |
module Layout00014 where
instance Indexed (Pull sh a) where
Pull ixf _ ! i = ixf i
| charleso/intellij-haskforce | tests/gold/parser/Layout00014.hs | apache-2.0 | 88 | 0 | 7 | 22 | 39 | 19 | 20 | 3 | 0 |
{-# LANGUAGE RecordWildCards, GADTs #-}
module CmmLayoutStack (
cmmLayoutStack, setInfoTableStackMap
) where
import StgCmmUtils ( callerSaveVolatileRegs ) -- XXX layering violation
import StgCmmForeign ( saveThreadState, loadThreadState ) -- XXX layering violation
import BasicTypes
import Cmm
import ... | lukexi/ghc-7.8-arm64 | compiler/cmm/CmmLayoutStack.hs | bsd-3-clause | 42,050 | 1 | 25 | 12,506 | 7,182 | 3,847 | 3,335 | 497 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.