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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-|
Module : Control.Monad.Bayes.Population
Description : Representation of distributions using multiple samples
Copyright : (c) Adam Scibior, 2016
License : MIT
Maintainer : ams240@cam.ac.uk
Stability : experimental
Portability : GHC
-}
module Control.Monad.Bayes.Population (
Population,
runPop... | ocramz/monad-bayes | src/Control/Monad/Bayes/Population.hs | mit | 6,753 | 0 | 15 | 1,307 | 1,736 | 897 | 839 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Main library for screwing around with OpenGL
module TestGL (module TestGL) where
import Control.Monad.IO.Class
import Control.Monad.Trans.Class... | taktoa/TestGL | library/TestGL.hs | mit | 5,648 | 0 | 14 | 1,546 | 1,311 | 706 | 605 | 135 | 3 |
import Network
import Network.Socket
import System.Exit
import System.IO
import Control.Monad
import Control.Exception
import Data.List
path = "GET /echo.php?message="
protocol = "HTTP/1.1\r\n"
headers = "Host: localhost\r\n" ++
"Connection: close\r\n" ++
"User-Agent: MyAwesomeUserAgent/1.0.... | IanConnolly/CS4032 | lab1/client.hs | mit | 1,344 | 6 | 14 | 332 | 364 | 165 | 199 | 40 | 2 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module ApplyInternal
(App(..)
,Wrap(..)
,TagC(..)
,TagD(..)
,TDef
,WrapDef(..)
,makeApplyInst
,wApply
,applyW
,wApplyW
,w... | rgleichman/smock | ApplyInternal.hs | mit | 2,475 | 0 | 12 | 745 | 1,255 | 665 | 590 | -1 | -1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable #-}
module Main where
import System.Environment
import qualified Language.Camle.Parser as P
import qualified Language.Camle.AstToIr as ATI
import qualified Language.Camle.JouetteBackend as JB
import Control.Applicative
import Text.Parsec
import ... | willprice/camle-compiler | src/CompilerMain.hs | mit | 1,229 | 0 | 10 | 296 | 305 | 167 | 138 | 29 | 1 |
-- This is about the same speed as subgrs04.hs, but it doesn't track generating
-- sets.
import Control.Monad (guard)
import Data.Maybe (mapMaybe)
import Data.IntSet (IntSet)
import qualified Data.IntSet as ISet
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Groups
import... | jwodder/groups | haskell/old/subgroups/subgrs05b.hs | mit | 829 | 6 | 13 | 148 | 320 | 163 | 157 | 20 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Parsing of Unification Grammars with a CFG backbone
-- Following http://cs.haifa.ac.il/~shuly/teaching/06/nlp/ug2.pdf
module NLP.UG.ParseCFG where
import Common
import NLP.AVM
import NLP.UG.GrammarCFG
import qualified Data.Char as C
import... | johnjcamilleri/hpsg | NLP/UG/ParseCFG.hs | mit | 6,037 | 0 | 19 | 1,816 | 1,603 | 845 | 758 | 113 | 5 |
-- Examples from Chapter two
-- http://learnyouahaskell.com/starting-out
doubleMe x = x + x
doubleUs x y = doubleMe x + doubleMe y
doubleSmallNumer x = if x > 100
then x
else doubleMe x
boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x]
length' xs = sum [1 | _ <- xs]
removeNonUppercase... | Sgoettschkes/learning | haskell/LearnYouAHaskell/02.hs | mit | 362 | 4 | 8 | 87 | 165 | 79 | 86 | 8 | 2 |
import Conduit
import Control.Monad (unless)
import Control.Monad (when)
import Control.Monad.Catch (MonadMask)
import qualified Copy.Conduit
import qualified Copy.StorableConduit
import qualified Copy.PeekPoke
import qualified Copy.Raw
i... | snoyberg/bytevector | bench/Copy.hs | mit | 1,967 | 0 | 17 | 636 | 527 | 273 | 254 | 49 | 1 |
-- |
-- Module : Befunge
-- Copyright : Joe Jevnik 2013
--
-- License : GPL-2
-- Maintainer : joejev@gmail.org
-- Stability : stable
-- Portability : GHC
--
-- A befunge interpreter.
{-# LANGUAGE CPP #-}
module Main where
import Befunge.Doublefunge (runDoublefunge)
import Befunge.Data
import Befunge.Op... | llllllllll/befunge | Befunge.hs | gpl-2.0 | 7,634 | 131 | 14 | 1,776 | 2,828 | 1,497 | 1,331 | -1 | -1 |
main = do
let a = "hell"
b = "yeah"
putStrLn $ a ++ " " ++ b
| softwaremechanic/Miscellaneous | Haskell/8.hs | gpl-2.0 | 71 | 0 | 9 | 28 | 35 | 17 | 18 | 4 | 1 |
{-# LANGUAGE CPP #-}
{-
Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
... | mduvall/gitit | Network/Gitit/Plugins.hs | gpl-2.0 | 3,316 | 0 | 20 | 780 | 480 | 250 | 230 | 16 | 1 |
-- Test the core operations
module Tests.Core where
import Yi.Core
import Yi.Window
import Yi.Editor
import Yi.Buffer
import Data.Char
import Data.List
import Data.Maybe
import System.Directory
import System.IO.Unsafe
import Control.Monad
import qualified Control.Exception
import Control.Concurrent
import GHC.Exc... | codemac/yi-editor | attic/testsuite/Tests/Core.hs | gpl-2.0 | 3,028 | 0 | 12 | 751 | 224 | 128 | 96 | -1 | -1 |
module Yesod.Auth.Shibboleth
(module Yesod.Auth.Shibboleth,
module Yesod.Auth.Shibboleth.Type
) where
import Control.Monad ((>>=), return, when)
import Control.Monad.Trans.Class (lift)
import Data.Bool (Bool (False), (||))
import Data.Char (toUpper)
import Data.Eq ((==), (/=))
import Data.Function (($), (.))
im... | marcellussiegburg/autotool | yesod/Yesod/Auth/Shibboleth.hs | gpl-2.0 | 3,158 | 0 | 15 | 488 | 936 | 507 | 429 | 59 | 2 |
module Irc.Listen
( listen
, motdHandler
) where
import Data.List.Split
import Control.Monad
import Control.Monad.Reader
import Network
import System.Exit
import System.IO
import Text.Printf
import App.Commands
import App.Data
import App.Functions
import Irc.Write
motdHandler :: Handle -> Net ()
motdHandler handle =... | flyingfisch/haskell-fischbot | Irc/Listen.hs | gpl-2.0 | 1,965 | 0 | 13 | 495 | 728 | 364 | 364 | 53 | 4 |
module Main where
import Util (palindrome)
import Data.List (sort)
main :: IO ()
main =
let
products = [x*y | x <- [100..999],
y <- [100..999]]
palindromeNum n = palindrome $ show n
palindromes = filter palindromeNum products
largest = last $ sort palindro... | liefswanson/projectEuler | app/p1/q4/Main.hs | gpl-2.0 | 353 | 0 | 12 | 123 | 121 | 64 | 57 | 12 | 1 |
module Handler.LibraryItemEdit where
import Import
-- | Display a Form to Edit a LibraryItem.
getLibraryItemEditR :: LibraryItemId -> Handler Html
getLibraryItemEditR libraryItemId = do
item <- runDB $ get404 libraryItemId
book <- runDB . getJust $ libraryItemBook item
... | prikhi/MyBookList | Handler/LibraryItemEdit.hs | gpl-3.0 | 1,446 | 0 | 16 | 426 | 337 | 162 | 175 | 25 | 2 |
(>=>) :: (a -> Writer b) -> (b -> Writer c) -> (a -> Writer c)
m1 >=> m2 = \x ->
let (y, s1) = m1 x
(z, s2) = m2 y
in (z, s1 ++ s2) | hmemcpy/milewski-ctfp-pdf | src/content/1.8/code/haskell/snippet17.hs | gpl-3.0 | 148 | 0 | 10 | 54 | 108 | 56 | 52 | 5 | 1 |
{-# OPTIONS_GHC -cpp -pgmP "cpphs --layout --hashes --cpp" #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE PackageImports #-}
{- |
Internal module providing access to some functionality of cpphs.
-}
--
-- Copyright (c) 2009-2022 Stefan Wehr - http:/... | skogsbaer/HTF | Test/Framework/Preprocessor.hs | lgpl-2.1 | 19,317 | 0 | 26 | 7,547 | 4,414 | 2,320 | 2,094 | 375 | 20 |
module GHC.Vacuum.ClosureType.V708 ( ClosureType(..) ) where
data ClosureType
= INVALID_OBJECT
| CONSTR
| CONSTR_1_0
| CONSTR_0_1
| CONSTR_2_0
| CONSTR_1_1
| CONSTR_0_2
| CONSTR_STATIC
| CONSTR_NOCAF_STATIC
| FUN
| FUN_1_0
| FUN_0_1
| FUN_2_0
| FUN_1_1
| FUN_0_2
| FUN_STATIC
| THUNK
... | thoughtpolice/vacuum | src/GHC/Vacuum/ClosureType/V708.hs | lgpl-3.0 | 4,310 | 0 | 9 | 1,030 | 1,247 | 658 | 589 | 191 | 0 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module FunctionTests
( functionTests
) where
import Casadi.DM ( DM )
import Casadi.MX ( MX )
import Casadi.SX ( SX )
import qualified Casadi.Function as C
import qualified Casadi.M... | ghorn/dynobud | dynobud/tests/FunctionTests.hs | lgpl-3.0 | 3,468 | 0 | 19 | 938 | 1,572 | 796 | 776 | 76 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE DeriveDataTypeable #-}
#if __GLASGOW_HASKELL__ >= 704
{-# LANGUAGE DeriveGeneric #-}
#endif
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.Interval.NonEmpty.Intern... | ekmett/intervals | src/Numeric/Interval/NonEmpty/Internal.hs | bsd-2-clause | 27,185 | 0 | 14 | 6,933 | 6,973 | 3,707 | 3,266 | 411 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE BangPatterns #-}
-- |
-- Module : Statistics.Correlation.Pearson
--
module Statistics.Correlation
( -- * Pearson correlation
pearson
, pearsonMatByRow
-- * Spearman correlation
, spearman
, spearmanMatByRow
) where
import qualified Dat... | mihaimaruseac/statistics | Statistics/Correlation.hs | bsd-2-clause | 1,934 | 0 | 10 | 450 | 408 | 235 | 173 | 43 | 1 |
{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
module Language.Haskell.Preprocess.Macros(compilerMacros,stdHdrs) where
import Prelude
import Data.FileEmbed
import Data.String.Here
import Control.Arrow
import qualified Data.ByteString as BS
import qualified Data.Map as M
import qu... | sourcegraph/preprocess-haskell | src/Language/Haskell/Preprocess/Macros.hs | bsd-3-clause | 766 | 0 | 9 | 135 | 141 | 88 | 53 | 14 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleInstances #-}
module Mapnik.Bindings.Projection (
projTransform
, CanTr... | albertov/hs-mapnik | bindings/src/Mapnik/Bindings/Projection.hs | bsd-3-clause | 2,734 | 0 | 11 | 531 | 585 | 328 | 257 | 53 | 1 |
import Criterion.Main
import Pipes
import Pipes.Vector
import qualified Data.Vector as VB
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Storable as VS
main :: IO ()
main = defaultMain
[ bench "VB.Vector Int" $ whnfIO (runEffect $ runToVectorP $ each [1..100000] >-> toVector :: IO (VB.Vect... | bgamari/pipes-vector | Benchmark.hs | bsd-3-clause | 571 | 0 | 13 | 100 | 208 | 112 | 96 | 11 | 1 |
--------------------------------------------------------------------------------
-- | The LLVM Type System.
--
module Llvm.Types where
#include "HsVersions.h"
import Data.Char
import Data.Int
import Data.List (intercalate)
import Numeric
import Constants
import FastString
import Unique
-- from NCG
import PprBase
... | ilyasergey/GHC-XAppFix | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | 30,209 | 0 | 19 | 7,312 | 4,757 | 2,624 | 2,133 | 435 | 4 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
{-# LANGUAGE Deri... | rfranek/duckling | Duckling/Email/Types.hs | bsd-3-clause | 988 | 0 | 8 | 157 | 168 | 100 | 68 | 21 | 0 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.StateVar
-- Copyright : (c) Sven Panne 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven_panne@yahoo.com
-- Stability : provisional... | OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/StateVar.hs | bsd-3-clause | 2,086 | 0 | 10 | 284 | 428 | 236 | 192 | 31 | 1 |
{-# LANGUAGE
QuasiQuotes
, TypeFamilies
, GeneralizedNewtypeDeriving
, TemplateHaskell
, OverloadedStrings
, GADTs
, FlexibleContexts #-}
module Market.Models.Fields where
import Database.Persist
import Database.Persist.Sql
import qualified Data.Text as T
data Direction = Buy | Sell
deriving (Show,... | s9gf4ult/market | Market/Models/Fields.hs | bsd-3-clause | 1,319 | 0 | 10 | 384 | 326 | 173 | 153 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Actions.SimpleDate
-- Description : An example external contrib module for XMonad.
-- Copyright : (c) Don Stewart 2007
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : dons@cse.unsw.edu.au
-- S... | xmonad/xmonad-contrib | XMonad/Actions/SimpleDate.hs | bsd-3-clause | 1,274 | 0 | 6 | 336 | 71 | 54 | 17 | 6 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.SGIX.Sprite
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--
-- T... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/SGIX/Sprite.hs | bsd-3-clause | 954 | 0 | 4 | 115 | 76 | 58 | 18 | 14 | 0 |
module AERN2.Poly.Power.Eval
where
import MixedTypesNumPrelude
import AERN2.Poly.Power.Type
import AERN2.Poly.Basics
import AERN2.MP.Ball
import AERN2.MP.Dyadic
import qualified Data.Map as Map
evalDirect :: (CanAddAsymmetric b c, b ~ AddType b c ,
Ring b, HasIntegers b, HasIntegers c)
=... | michalkonecny/aern2 | aern2-fun-univariate/src/AERN2/Poly/Power/Eval.hs | bsd-3-clause | 1,402 | 0 | 12 | 306 | 601 | 309 | 292 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Stack.Options
(Command(..)
,benchOptsParser
,buildOptsParser
,configOptsParser
,dockerOptsParser
,dockerCleanupOptsParser
,dotOptsParser
,execOptsParser
,evalOptsParser
,globalOptsParser
,initOptsParser
,newOptsParser
,logLev... | meiersi-11ce/stack | src/Stack/Options.hs | bsd-3-clause | 27,813 | 0 | 31 | 10,902 | 4,899 | 2,430 | 2,469 | 629 | 9 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TupleSections #-}
module Main where
import Data.Monoid
import Data.Maybe
import Options.Generic
import Sound.PortMidi
import Graphics.Gloss
import Graphics.Gloss.Interface.IO.Game
import Graphics.Gloss.Juicy (loa... | josejuan/midi-keyboard-player | app/Main.hs | bsd-3-clause | 7,720 | 0 | 17 | 2,504 | 2,160 | 1,111 | 1,049 | 146 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.InstallPlan
-- Copyright : (c) Duncan Coutts 2008
-- License : BSD-like
--
-- Maintainer : duncan@community.haskell.org
-- Stability : provisional
-- Portability : portable
--
-- Packag... | IreneKnapp/Faction | faction/Distribution/Client/InstallPlan.hs | bsd-3-clause | 20,722 | 0 | 16 | 4,525 | 3,540 | 1,914 | 1,626 | 303 | 6 |
{-# OPTIONS -O2 -fglasgow-exts #-}
module Units where
import System.IO
import qualified Data.Map as M
import Text.StringTemplate.Classes
import Text.StringTemplate.Instances
import Text.StringTemplate.Base
import Text.StringTemplate.Group
import Test.HUnit
import Control.Monad
import System.Environment
no_prop = toS... | factisresearch/HStringTemplate | tests/Units.hs | bsd-3-clause | 1,436 | 0 | 13 | 339 | 390 | 206 | 184 | 35 | 1 |
{-# LANGUAGE ForeignFunctionInterface, FlexibleContexts, TypeFamilies #-}
{-# LANGUAGE CPP #-}
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
module Numeric.Extras
( RealExtras(..)
) where
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 710
import C... | ekmett/numeric-extras | Numeric/Extras.hs | bsd-3-clause | 5,161 | 0 | 9 | 1,089 | 1,424 | 778 | 646 | 122 | 1 |
module Crawl.Backoff (
backoff
) where
import Control.Applicative
import qualified Reactive.Banana as R
backoff :: (m -> Bool) -> R.Event t (m, Int) -> R.Behavior t Int -> R.Behavior t Bool
backoff mf failures time = backoffPolicy <$> time <*> past_failures
where my_failures = fmap snd $ R.filterE (mf . fst) f... | rwbarton/rw | Crawl/Backoff.hs | bsd-3-clause | 578 | 0 | 11 | 122 | 214 | 116 | 98 | 10 | 1 |
{-# LANGUAGE ScopedTypeVariables,
TypeOperators #-}
{- 2012 Joel Svensson -}
module Test where
import qualified Intel.ArbbVM as VM
import qualified Intel.ArbbVM.Convenience as VM
import Intel.ArBB.Vector
import Intel.ArBB.Data.Int
import Intel.ArBB.Data.Boolean
import Intel.ArBB
import Intel.Ar... | svenssonjoel/EmbArBB | Test2.hs | bsd-3-clause | 5,200 | 0 | 13 | 1,705 | 1,786 | 886 | 900 | 130 | 1 |
{-#LANGUAGE OverloadedStrings#-}
module Lib
( bioParser
) where
import MergeFastq (mergePairedEndFq)
import ParseGtf (collapseGtf)
import ParseSam (tagSamWithGtf, samToMatrix)
import System.Environment
import qualified Safe as S
import qualified Data.ByteString.Char8 as B8 (putStrLn)
bioParser = do
... | Min-/BioParsers | src/Lib.hs | bsd-3-clause | 700 | 0 | 14 | 139 | 217 | 120 | 97 | 17 | 5 |
{-|
-}
module Database.OrgMode.Types where
import Data.Aeson
import Data.Default
import Data.Int (Int64)
import GHC.Generics
import Database.OrgMode.Internal.Types
import Database.OrgMode.Internal.Import
----------------------------------------------------... | rzetterberg/orgmode-sql | lib/Database/OrgMode/Types.hs | bsd-3-clause | 4,141 | 0 | 11 | 814 | 279 | 171 | 108 | 33 | 0 |
-- | This module provides the /With Certification/ processor.
-- Is used to certify the proof output of a (sub) strategy.
module Tct.Trs.Processor.WithCertification
( withCertificationDeclaration
, withCertification
, withCertification'
-- * arguments
, TotalProof (..)
) where
import qualified Tct.Core.Da... | ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Processor/WithCertification.hs | bsd-3-clause | 3,189 | 0 | 16 | 611 | 574 | 314 | 260 | -1 | -1 |
{-|
Description: Frames-per-second limiter based on SDL timer subsystem.
-}
module Graphics.UI.SDL.Utils.Framerate
( FPSLimit
, newFPSLimit
, fpsLimit
) where
import Control.Concurrent (threadDelay)
import Control.Monad.IO.ExClass
import Control.Applicative
import Data.IORef
import Graphi... | abbradar/MySDL | src/Graphics/UI/SDL/Utils/Framerate.hs | bsd-3-clause | 1,062 | 0 | 15 | 276 | 269 | 139 | 130 | 26 | 2 |
module ProverTest where
import Prover
import Axioms
import Formula
import FormulaTest
import Test.QuickCheck
import Test.QuickCheck
import Test.QuickCheck.Function
proverTests :: IO ()
proverTests = do
putStrLn "Running Robins Tests"
quickCheck prop_robinTests
putStrLn "Testing with negated Axiom1"
q... | jpotecki/LogicTableauChecker | test/ProverTest.hs | bsd-3-clause | 2,530 | 0 | 9 | 543 | 661 | 345 | 316 | 61 | 1 |
module Main where
import TestHttpChannelB
main = myMain
| armoredsoftware/protocol | tpm/mainline/shared/protocolprotocol/TestHttpChannelBMain.hs | bsd-3-clause | 59 | 0 | 4 | 11 | 12 | 8 | 4 | 3 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-}
{-# LANGUAGE Rank2Types #-}
{-# OPTIONS -Wall #-}
module Basic.Operations (
step, stepout, run, runout,
isInputEnd, isAcceptState,
reify
) where
import Basic.Types (Trans(..), Transout(..), EndCond(..), Here(..))
import Basic.Features ... | davidzhulijun/TAM | Basic/Operations.hs | bsd-3-clause | 1,887 | 0 | 12 | 304 | 784 | 437 | 347 | 35 | 2 |
{-# LANGUAGE TemplateHaskell #-}
module Lamdu.Sugar.Convert.Tag
( ref, replace, withoutContext
, taggedEntity
, taggedEntityWith
, TagResultInfo(..), trEntityId, trPick
, NameContext(..), ncMVarInfo, ncUuid
) where
import qualified Control.Lens as Lens
import Control.Monad.Once (Monad... | lamdu/lamdu | src/Lamdu/Sugar/Convert/Tag.hs | gpl-3.0 | 5,579 | 0 | 19 | 1,428 | 1,760 | 936 | 824 | -1 | -1 |
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE MonadComprehensions #-}
-- | This module contains testcases for monad comprehensions. We store them in a
-- separate module because they rely on RebindableSyntax and hidden
-- Prelude.
module Database.DSH.Tests.DSHComprehensions whe... | ulricha/dsh | src/Database/DSH/Tests/DSHComprehensions.hs | bsd-3-clause | 15,319 | 0 | 13 | 4,308 | 8,483 | 4,656 | 3,827 | 358 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
module AppConfig where
import GHC.Generics (Generic)
import qualified Data.Configurator as C
import qualified Data.Configurator.Types as C
import Data.Word
data AppConfig = AppConfig {
dbName :: String
, dbUser :: String
, dbP... | dbushenko/biblio | src/AppConfig.hs | bsd-3-clause | 1,419 | 0 | 15 | 489 | 381 | 199 | 182 | 35 | 1 |
{-# LANGUAGE CPP,MagicHash,ScopedTypeVariables,FlexibleInstances,RankNTypes,TypeSynonymInstances,MultiParamTypeClasses,BangPatterns #-}
-- | By Chris Kuklewicz, drawing heavily from binary and binary-strict,
-- but all the bugs are my own.
--
-- This file is under the usual BSD3 licence, copyright 2008.
--
-- Modified ... | flowbox-public/protocol-buffers | Text/ProtocolBuffers/Get.hs | apache-2.0 | 38,144 | 486 | 80 | 10,801 | 8,565 | 4,734 | 3,831 | -1 | -1 |
module Text.Jasmine
(
minify
, minifym
, minifyBb
, minifyFile
) where
--import Text.Jasmine.Parse
import Language.JavaScript.Parser (readJs, parse, JSNode(..))
import Text.Jasmine.Pretty
import qualified Blaze.ByteString.Builder as BB
import qualified Data.ByteString.Lazy as LB
import qualif... | snoyberg/hjsmin | Text/Jasmine.hs | bsd-3-clause | 1,524 | 0 | 10 | 305 | 462 | 248 | 214 | 38 | 2 |
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module T17267c where
-- Now rejected
class C a b where
op :: a -> b
c... | sdiehl/ghc | testsuite/tests/quantified-constraints/T17267c.hs | bsd-3-clause | 537 | 0 | 11 | 119 | 163 | 86 | 77 | -1 | -1 |
module RecursionIn1 where
--A top level definition can be duplicated.
--In this example: duplicate the definition 'fac' with new name 'anotherFac'
--Pay attention to the recursion.
fac :: Int -> Int
fac 0 = 1
fac 1 = 1
fac n = n * fac (n-1)
fib :: Int -> Int
fib 0 = 1
fib 1 = 1
fib n = (fib (n-1)) + (fib (n-2))
ma... | kmate/HaRe | old/testing/duplication/RecursionIn1.hs | bsd-3-clause | 351 | 0 | 9 | 82 | 137 | 73 | 64 | 11 | 1 |
{-# LANGUAGE ImplicitParams, RankNTypes #-}
{-# OPTIONS_GHC -dcore-lint #-}
module Main where
import GHC.Stack
f0 = putStrLn $ prettyCallStack ?loc
-- should be empty
f1 :: (?loc :: CallStack) => IO ()
f1 = putStrLn $ prettyCallStack ?loc
-- should show the location of f1's call-site
f3 :: ((?loc :: CallS... | sgillespie/ghc | testsuite/tests/typecheck/should_run/IPLocation.hs | bsd-3-clause | 1,131 | 0 | 11 | 309 | 371 | 197 | 174 | 22 | 1 |
{-# LANGUAGE KindSignatures #-}
module BindKindName where
type Foo (a :: DontExistKind) = a
| ghc-android/ghc | testsuite/tests/rename/should_fail/rnfail057.hs | bsd-3-clause | 94 | 0 | 5 | 16 | 18 | 13 | 5 | -1 | -1 |
-- !!! test super-dictionary grabification
--
main = putStr (show (is_one (1.2::Double)))
is_one :: RealFloat a => a -> Bool
is_one x = x == 1.0
| urbanslug/ghc | testsuite/tests/codeGen/should_run/cgrun024.hs | bsd-3-clause | 148 | 1 | 10 | 29 | 63 | 31 | 32 | 3 | 1 |
module Util (combinations
, deck
, allPossibleHands
) where
import Control.Arrow ((&&&))
import Control.Monad (filterM)
import Data.List (sort, group)
import Hand (Suit(..), Rank(..), Card, Hand(Hand), HandType, extractHandType)
combinations :: Int -> [a] -> [[a]]
combinations m x... | benperez/chinese-poker | src/Util.hs | mit | 893 | 0 | 12 | 234 | 364 | 211 | 153 | 20 | 1 |
module NgLint.Output.Common where
import NgLint.Messages
type Formatter = String -> [LintMessage] -> IO ()
| federicobond/nglint | src/NgLint/Output/Common.hs | mit | 109 | 0 | 8 | 16 | 34 | 20 | 14 | 3 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
-- The use of error here is as a placeholder only.
{-# OPTIONS_GHC -fno-warn-warnings-deprec... | barrucadu/nagi | lib/Imageboard/Web/Mod.hs | mit | 9,923 | 0 | 31 | 2,218 | 2,526 | 1,226 | 1,300 | 170 | 5 |
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid
import qualified Data.Text.Lazy as T
import Web.Scotty
import Web.Scotty.Fay
main :: IO ()
main = scotty 3000 $ do
serveFay $
-- If the first segment of the request path matches this, try to serve
-- Fay. Otherwise try the next route.
un... | hdgarrood/scotty-fay | example/Main.hs | mit | 712 | 0 | 17 | 226 | 110 | 58 | 52 | 19 | 1 |
module GHCJS.DOM.RTCDataChannel (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/RTCDataChannel.hs | mit | 44 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module HelloWorld.Types where
import Control.Monad.Except
import Data.IORef
import Text.Parsec.Error
type Env = IORef [(String, IORef HelloVal)]
type IOThrowsError = ExceptT HelloError IO
data HelloVal = Greeting String
instance Show HelloVal where
show (Greeting s) = "Hello, World!"
instance Eq (HelloVal) w... | wildlyinaccurate/hello-world | src/HelloWorld/Types.hs | mit | 1,684 | 0 | 8 | 503 | 439 | 228 | 211 | 36 | 1 |
hello_worlds n = putStrLn $ unlines $ take n (repeat "Hello World")
-- This part is related to the Input/Output and can be used as it is
-- Do not modify it
main = do
n <- readLn :: IO Int
hello_worlds n
| tsurai/hackerrank | functional-programming/introduction/hello-world-n-times.hs | mit | 211 | 0 | 8 | 50 | 54 | 26 | 28 | 4 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-
The responsibility of the diagnoser is to turn baked deployments into
diagnosed deployments. This is purely a read-only operation that looks
at the current state of the file system.
-}
module SuperUserSpark.Diagnose
( diagnoseFromArgs
, diagnoseAssignment
, d... | NorfairKing/super-user-spark | src/SuperUserSpark/Diagnose.hs | mit | 2,736 | 0 | 12 | 547 | 576 | 293 | 283 | 63 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ViewPatterns #-}
module Graphics.UI.Label
( createLabel
, text
, interpretation
, setBuddy
, Label() )
where
import Data.Text
i... | Noeda/userinterface | src/Graphics/UI/Label.hs | mit | 2,929 | 0 | 12 | 576 | 713 | 369 | 344 | 70 | 1 |
{-|
Common types and utilities for brainfuck programs, including a few
different implementations for the brainfuck data array.
-}
module Runtime where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Char (isAscii, showLitChar)
import qualified Data.Vector.Unboxed.Mutable as V
im... | gglouser/brainfree | src/Runtime.hs | mit | 5,250 | 0 | 13 | 1,154 | 1,410 | 741 | 669 | 75 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Handler.Service where
import Import hiding (head)
import Database.Persist
import Database.Persist.Sql
import SessionState
import Data.List (nub, head)
import qualified Database.Esqueleto as E
getServiceR :: Handler Html
getServiceR = do
services <- getByType (toSqlKey 1)
... | swamp-agr/carbuyer-advisor | Handler/Service.hs | mit | 3,030 | 0 | 16 | 672 | 1,091 | 567 | 524 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Description : Easy IPython kernels = Overview This module provides automation for writing
-- simple IPython kernels. In particular, it provides a record type that defines configurations and
-- a function that interprets a configuration as an action in some monad that can do IO.
... | wyager/IHaskell | ipython-kernel/src/IHaskell/IPython/EasyKernel.hs | mit | 10,998 | 0 | 20 | 3,124 | 1,805 | 952 | 853 | 147 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html
module Stratosphere.ResourceProperties.EC2NetworkInterfacePrivateIpA... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/EC2NetworkInterfacePrivateIpAddressSpecification.hs | mit | 2,725 | 0 | 13 | 222 | 267 | 153 | 114 | 29 | 1 |
{-# language OverloadedStrings #-}
module Scorer.Einsendung
( Einsendung (..), size
, Scorer.Einsendung.okay, Scorer.Einsendung.traditional
, Obfuscated (..)
, SE (..)
, slurp_deco -- datei-inhalt verarbeiten
)
where
{- so sehen die dinger aus: (3: VNR, 11: ANr)
Fri Nov 28 18:33:49 CET 2003 ( 2425 ) cgi-318 ( 318... | marcellussiegburg/autotool | db/src/Scorer/Einsendung.hs | gpl-2.0 | 7,879 | 38 | 16 | 2,689 | 1,950 | 1,032 | 918 | 157 | 3 |
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, LambdaCase #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Completion
-- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GPL
--
-- Maintainer : <maintainer@leksah.org>... | cocreature/leksah | src/IDE/Completion.hs | gpl-2.0 | 21,434 | 17 | 31 | 7,639 | 5,656 | 2,749 | 2,907 | 382 | 16 |
{-# LANGUAGE OverloadedStrings #-}
-- Copyright (C) 2009-2012 John Millikin <jmillikin@gmail.com>
--
-- 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 3 of the License, or
-- an... | tmishima/haskell-dbus | lib/DBus/Introspection.hs | gpl-3.0 | 11,103 | 84 | 20 | 2,073 | 3,883 | 1,981 | 1,902 | 322 | 6 |
{-# OPTIONS_GHC -Wall #-}
module Prover
( Formula (..)
, Mapping
, cnf
, dnf
, equivalent
, eval
, nnf
, satisfiable
, show
, tautology
, unsatisfiable
, variables
)
where
import Prelude hiding (lookup)
import Control.Mo... | robertseaton/fregerator | src/prover.hs | gpl-3.0 | 5,752 | 0 | 11 | 1,481 | 2,243 | 1,181 | 1,062 | 124 | 3 |
module Scanner (
scan
) where
import Token
import Data.Char
-- |Converts a digit into an interger
digit :: Char -> Int
digit '1' = 1
digit '2' = 2
digit '3' = 3
digit '4' = 4
digit '5' = 5
digit '6' = 6
digit '7' = 7
digit '8' = 8
digit '9' = 9
digit _ = 0
-- |Parses a string converting it into a number
num :: I... | marco-zanella/minilambda | src/Scanner.hs | gpl-3.0 | 1,637 | 0 | 12 | 432 | 840 | 433 | 407 | 52 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE FunctionalDependencies #-}
-- | This module provides a set of indexed type classes (IxFunctor, IxApplicative, IxMonad, etc..) that correspond to existing type classes (Functor, Applicative, Monad, etc..)
--
-- The intent of thi... | Ferdinand-vW/sessiontypes | src/Control/SessionTypes/Indexed.hs | gpl-3.0 | 3,970 | 0 | 12 | 929 | 1,099 | 599 | 500 | -1 | -1 |
module Meetup (Schedule(..), Weekday(..), meetupDay) where
import Data.Time
data Schedule = First | Second | Third | Fourth | Fifth | Last | Teenth
data Weekday = Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday
meetupDay :: Schedule -> Weekday -> Integer -> Int -> Day
meetupDay nth dow year mont... | ciderpunx/exercismo | src/Meetup.hs | gpl-3.0 | 1,492 | 0 | 11 | 391 | 400 | 215 | 185 | 31 | 8 |
module Handler.RestaurantPageSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getRestaurantPageR" $ do
error "Spec not implemented: getRestaurantPageR"
| Lionex/s16_mangohacks | MIAMIB/test/Handler/RestaurantPageSpec.hs | gpl-3.0 | 198 | 0 | 11 | 39 | 44 | 23 | 21 | 6 | 1 |
module Gabriel.Utils( formatProcessName
, readM
, openFile
, openFileM
, putArray
, getArray
) where
import qualified System.Posix.Syslog as L
import qualified System.IO as IO
{-
- The utils namesp... | udoprog/gabriel | Gabriel/Utils.hs | gpl-3.0 | 2,581 | 0 | 18 | 810 | 906 | 454 | 452 | 66 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.IAMCredentials.Types
-- Copyright : (c) 2015-2016 Bren... | brendanhay/gogol | gogol-iamcredentials/gen/Network/Google/IAMCredentials/Types.hs | mpl-2.0 | 2,352 | 0 | 7 | 490 | 210 | 146 | 64 | 53 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-ec2/gen/Network/AWS/EC2/AttachVolume.hs | mpl-2.0 | 7,839 | 0 | 17 | 1,723 | 1,015 | 610 | 405 | 104 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/Locations/Templates/Create.hs | mpl-2.0 | 6,371 | 0 | 20 | 1,466 | 874 | 510 | 364 | 134 | 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/Reservations/SetIAMPolicy.hs | mpl-2.0 | 4,383 | 0 | 18 | 1,031 | 549 | 326 | 223 | 88 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/Get.hs | mpl-2.0 | 4,987 | 0 | 15 | 1,088 | 700 | 410 | 290 | 103 | 1 |
module Betty.Signup.Sendmail
(
sendVerificationEmail
)
where
import ClassyPrelude.Yesod
import Network.Mail.Mime
import Yesod.Auth.Email
import Betty.Signup.MailText (verHeaders, verHtml, verText)
------------------------------------------------------------------------
sendVerificatio... | sajith/betty-web | Betty/Signup/Sendmail.hs | agpl-3.0 | 743 | 0 | 11 | 172 | 151 | 88 | 63 | 13 | 1 |
-- Copyright 2015 Google Inc. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License")--
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicabl... | polux/subsume | Main.hs | apache-2.0 | 917 | 0 | 12 | 163 | 119 | 65 | 54 | 11 | 2 |
data DataInt = D Int
deriving (Eq, Ord, Show)
newtype NewtypeInt = N Int
deriving (Eq, Ord, Show)
| EricYT/Haskell | src/real_haskell/chapter-6/Newtype.hs | apache-2.0 | 136 | 0 | 6 | 56 | 48 | 26 | 22 | 4 | 0 |
-- | Some example queries demonstrating the Narc interface.
module Database.Narc.ExampleEmbedded where
import Prelude hiding ((<), (==), (>=), (>), (<=), (/=), (+), (&&))
import Test.HUnit
import Database.Narc
import Database.Narc.Embed hiding ((./))
import Database.Narc.Embed.Ops
import Algebras
example1 = let t = ... | ezrakilty/narc | Database/Narc/ExampleEmbedded.hs | bsd-2-clause | 8,352 | 0 | 27 | 2,464 | 1,982 | 1,078 | 904 | 146 | 1 |
module Turtle.GlossInterface where
import GHC.Float
import qualified Graphics.Gloss as Gloss
import qualified Turtle.Objects as Turtle
point2Gloss :: Turtle.Point -> Gloss.Point
point2Gloss point = (double2Float (Turtle.xDimension point),
double2Float (Turtle.yDimension point))
line2Pic :: Turtle.Line -> Gloss... | zefciu/Turtle | src/Turtle/GlossInterface.hs | bsd-3-clause | 875 | 0 | 10 | 139 | 283 | 150 | 133 | 19 | 1 |
{-# LANGUAGE CPP, RecordWildCards #-}
-- |
-- Package configuration information: essentially the interface to Cabal, with
-- some utilities
--
-- (c) The University of Glasgow, 2004
--
module PackageConfig (
-- $package_naming
-- * UnitId
packageConfigId,
-- * The PackageConfig type: ... | GaloisInc/halvm-ghc | compiler/main/PackageConfig.hs | bsd-3-clause | 6,159 | 0 | 12 | 1,395 | 1,232 | 646 | 586 | 98 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Parse where
import Control.Applicative as A
import Control.Monad.State
import Data.Attoparsec.Text as P
import Data.Char (isLower, isAlpha, isSpace)
import Data.Text as T
import Data.List as L
import Debug.Trace (trace)
import Untyped
example :: Text
example = T.unlines [
... | joelburget/tapl | Untyped/parse.hs | bsd-3-clause | 3,485 | 0 | 15 | 874 | 934 | 474 | 460 | 77 | 2 |
{-|
Module : CFPFD1
Description : Constraint Functional Programming over Multiple Finite Domain
Copyright : (c) notae@me.com, 2014
License : BSD3
Maintainer : notae@me.com
Stability : experimental
Portability : POSIX
This module provides interfaces for constraint programming
over multiple finite domain i... | notae/haskell-exercise | cp/CFPFD1.hs | bsd-3-clause | 15,778 | 0 | 17 | 4,069 | 6,353 | 3,301 | 3,052 | 399 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
--
-- Scene
--
module Aya.Scene
( smooth
, iclip
, traceDepth
, xReso
, yReso
, xRegion
, yRegion
, eyepos
, etarget
, upper
, focus
, material0
, iAmb
, lights
, primitives
) where
import Data.Maybe
import NumericPrelude
import Aya.Algebra
import A... | eiji-a/aya | src/Aya/Scene-tetra_and_ball.hs | bsd-3-clause | 3,537 | 0 | 13 | 846 | 1,005 | 541 | 464 | 84 | 1 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -Wall #-}
-- | A vector based on Representable
module Tower.V where
import qualified Protolude as P
import Protolude
(($), (<$>), Functor(..), Show, Eq(..), take)
imp... | tonyday567/tower | src/Tower/V.hs | bsd-3-clause | 2,080 | 0 | 16 | 554 | 772 | 423 | 349 | -1 | -1 |
module Language.Haskell.GhcMod.Lint where
import Control.Applicative ((<$>))
import Control.Exception (handle, SomeException(..))
import Language.Haskell.GhcMod.Logger (checkErrorPrefix)
import Language.Haskell.GhcMod.Convert
import Language.Haskell.GhcMod.Types
import Language.Haskell.HLint (hlint)
-- | Checking syn... | darthdeus/ghc-mod-ng | Language/Haskell/GhcMod/Lint.hs | bsd-3-clause | 744 | 0 | 10 | 137 | 190 | 109 | 81 | 14 | 1 |
module Config.GetOpt
( Opts
, MkCfg
, optSpec
, noArgs
, contentDirDesc
, Err
)
where
import Data.Monoid ( mappend )
import Control.Monad ( liftM, ap, guard )
import Config.Types ( ActionSpec(..), preUsage, CommandResult(..)
, isHelpRequest )
import Config.Format ( wrap,... | j3h/doc-review | src/Config/GetOpt.hs | bsd-3-clause | 2,868 | 0 | 16 | 1,098 | 980 | 522 | 458 | 71 | 6 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
module Astro.Orbit.AnomalySpec where
import Test.Hspec
import Test.QuickCheck (property, (==>))
import Data.AEq
import TestUtil
import TestInstances
import Numeric.Units.Dimensional.Prelude
import Numeric.Units.Dimensional.LinearAlgebra
import qu... | bjornbm/astro-orbit | test/Astro/Orbit/AnomalySpec.hs | bsd-3-clause | 3,098 | 0 | 19 | 705 | 1,067 | 521 | 546 | 62 | 1 |
{-# LANGUAGE
OverloadedStrings
, ScopedTypeVariables
#-}
module Routes where
import Pages
import Pages.Home
import Pages.Contact
import Pages.NotFound
import Application.Types
import Templates.Master
import Web.Routes.Nested
import Network.HTTP.Types
routes :: RoutableT s e u ue ClarkT ()
routes = do
her... | athanclark/clark-mining-tech | src/Routes.hs | bsd-3-clause | 885 | 0 | 13 | 215 | 249 | 128 | 121 | 32 | 1 |
module Rubik.Cube where
import Data.Array as A
import Control.Applicative
import Rubik.Key as K
import Rubik.Turn as T
import Rubik.Axis as V
import Rubik.Sign as S
import Rubik.D3 as D3
data Side = F | U | R | D | L | B
deriving (Eq,Ord,Enum,Show,Ix)
sides :: [Side]
sides = [F .. B]
instance ... | andygill/rubik-solver | src/Rubik/Cube.hs | bsd-3-clause | 1,481 | 2 | 9 | 387 | 522 | 289 | 233 | 31 | 6 |
module Main where
import Language.Bang.Compiler (cliMain)
main :: IO ()
main = cliMain
| ajscholl/bang | cli/Main.hs | bsd-3-clause | 89 | 0 | 6 | 15 | 30 | 18 | 12 | 4 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.