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 PatternGuards #-}
-- | Simply-typed Curry-style (nominal) lambda-calculus
-- with integers and zero-comparison
-- Type inference, of the type and of the environment, aka
-- conditional typechecking
-- This code does not in general infer polymorphic bindings as this is akin
-- to higher-order unification.
... | suhailshergill/liboleg | Language/TEval/TInfTEnv.hs | bsd-3-clause | 10,129 | 0 | 24 | 2,805 | 3,574 | 1,923 | 1,651 | 180 | 6 |
module Main where
import Day22 as D22
main :: IO ()
main = D22.run
| ulyssesp/AoC | app/Main.hs | bsd-3-clause | 69 | 0 | 6 | 16 | 26 | 16 | 10 | 4 | 1 |
module SPARC.Imm (
-- immediate values
Imm(..),
strImmLit,
litToImm
)
where
import GhcPrelude
import GHC.Cmm
import GHC.Cmm.CLabel
import Outputable
-- | An immediate value.
-- Not all of these are directly representable by the machine.
-- Things like ImmLit are slurped ou... | sdiehl/ghc | compiler/nativeGen/SPARC/Imm.hs | bsd-3-clause | 1,625 | 0 | 12 | 611 | 297 | 161 | 136 | 35 | 7 |
-----------------------------------------------------------------------------
{- |
Graphics.Gnewplot.Exec allows you to plot values of types that implement PlotWithGnuplot in
various ways (to a file or on disk).
Example:
@
import Graphics.Gnewplot.Instances
import Graphics.Gnewplot.Exec
someData :: [(Double,Double... | glutamate/gnewplot | Graphics/Gnewplot/Exec.hs | bsd-3-clause | 9,720 | 0 | 17 | 2,580 | 1,768 | 866 | 902 | 164 | 3 |
{-# LANGUAGE NPlusKPatterns #-}
module Code26 where
type Node = Int
type Graph = Node -> (Node,Node)
left, right :: Graph -> Node -> Node
left = (fst .)
right = (snd .)
setl, setr :: Graph -> Node -> Node -> Graph
setl g x y = \ z -> if x == z then (y,right g x) else g z
setr g x y = \ z -> if x == z then (lef... | sampou-org/pfad | Code/Code26.hs | bsd-3-clause | 2,932 | 0 | 10 | 913 | 1,734 | 911 | 823 | 58 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
module Text.XmlHtml.HTML.Render where
import Blaze.ByteString.Builder
import Control.Applicative
import Data.Maybe
import Data.Monoid
import qualified Text.Parsec as P
import Text.XmlHtml.Common
imp... | silkapp/xmlhtml | src/Text/XmlHtml/HTML/Render.hs | bsd-3-clause | 5,731 | 0 | 16 | 1,778 | 1,636 | 865 | 771 | 111 | 3 |
module System.Shana.Type where
import Control.Arrow
import Control.Category
import Prelude hiding ((.), id)
import Control.Monad ((>=>))
newtype Shana a b = Shana { runShana :: a -> IO [b] }
instance Category Shana where
id = Shana $ return . return
Shana g . Shana f = Shana $ f >=> mapM g >=> return . concat
... | nfjinjing/shana | src/System/Shana/Type.hs | bsd-3-clause | 475 | 0 | 13 | 114 | 210 | 114 | 96 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Serials.Route.UserSignup where
import Prelude hiding (id)
import Control.Applicative
import Control.Monad.Trans.Either
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader
import Crypto.BCrypt (hashPasswordUsingPolicy, HashingPoli... | bitemyapp/serials | server/Serials/Route/UserSignup.hs | mit | 5,746 | 0 | 21 | 1,192 | 1,796 | 925 | 871 | 150 | 3 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
module Repro
where
import Generics.SOP
recover :: forall a xs.
(Code a ~ '[x... | deepfire/mood | doc/ghc-repro-16095-2.hs | agpl-3.0 | 595 | 0 | 16 | 187 | 147 | 80 | 67 | 21 | 1 |
-- Test for trac #1042
import Control.Exception
import Data.Int
import Prelude hiding (catch)
main :: IO ()
main = do print ((minBound :: Int) `div` (-1)) `myCatch` print
print ((minBound :: Int8) `div` (-1)) `myCatch` print
print ((minBound :: Int16) `div` (-1)) `myCatch` print
prin... | kfish/const-math-ghc-plugin | tests/ghc-7.6/numrun013.hs | bsd-3-clause | 506 | 0 | 12 | 122 | 230 | 133 | 97 | 11 | 1 |
module Language.Haskell.Interpreter.Unsafe (
unsafeSetGhcOption, unsafeRunInterpreterWithArgs
)
where
import Control.Monad.Trans
import Control.Monad.Catch
import Hint.Base
import Hint.Configuration
import Hint.InterpreterT
-- | Set a GHC option for the current session,
-- eg. @unsafeSetGhcOption \"-XNoMonomo... | konn/hint-forked | src/Language/Haskell/Interpreter/Unsafe.hs | bsd-3-clause | 1,076 | 0 | 10 | 241 | 137 | 81 | 56 | 14 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- Run:
-- ./Bench -u all.csv
-- runghc PlotResults.hs all.csv
module Main where
import Text.CSV
import System.Process
import qualified Data.Map as Map
import System.IO
import System.FilePath
import Data.List
import System.Directory
import System.Environment
import Control.Except... | judah/vector-fftw | tests/timing/PlotResults.hs | bsd-3-clause | 2,606 | 0 | 18 | 908 | 784 | 399 | 385 | 66 | 1 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2014 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
module Cryptol.Transform.Specialize
where
import Cryptol.TypeCheck.AST
import Cryptol.TypeCheck.TypeMap
import Cryptol.TypeC... | TomMD/cryptol | src/Cryptol/Transform/Specialize.hs | bsd-3-clause | 9,538 | 0 | 28 | 2,752 | 3,054 | 1,513 | 1,541 | 207 | 33 |
{-# LANGUAGE CPP #-}
module Eta.Main.FileCleanup
( TempFileLifetime(..)
, cleanTempDirs, cleanTempFiles, cleanCurrentModuleTempFiles
, addFilesToClean, changeTempFilesLifetime
, newTempName, newTempLibName
, withSystemTempDirectory, withTempDirectory
) where
import Eta.Main.DynFlags
import Eta.Main.ErrUti... | rahulmutt/ghcvm | compiler/Eta/Main/FileCleanup.hs | bsd-3-clause | 11,215 | 0 | 18 | 2,861 | 2,204 | 1,141 | 1,063 | 193 | 5 |
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveFunctor #-}
module Rpc ( Rpc, rpc, module Rpc.Core ) where
import Control.Applicative
import Control.Monad.Error
import Control.Monad.Trans
import qualified Control.Exception as E
import Rpc.Core
import Error
import Tools.FreezeIOM
newtype Rpc a = Rpc (RpcM ApiError a)
... | jean-edouard/manager | api/Rpc.hs | gpl-2.0 | 484 | 0 | 8 | 67 | 140 | 81 | 59 | 12 | 1 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.BlendingFactor
-- Copyright : (c) Sven Panne 2002-2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stab... | hesiod/OpenGL | src/Graphics/Rendering/OpenGL/GL/BlendingFactor.hs | bsd-3-clause | 2,554 | 0 | 9 | 436 | 452 | 240 | 212 | 56 | 15 |
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
module Main where
import GHC.Exts
import Data.Type.Equality
type family F x :: Constraint
type instance F Int = (?x :: String)
data Box where MkBox :: (?x :: String) =... | sdiehl/ghc | testsuite/tests/typecheck/should_run/T17104.hs | bsd-3-clause | 585 | 0 | 13 | 142 | 194 | 109 | 85 | -1 | -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="id-ID">
<title>Directory List v1.0</title>
<maps>
<homeID>directorylistv1</homeID>
<map... | kingthorin/zap-extensions | addOns/directorylistv1/src/main/javahelp/help_id_ID/helpset_id_ID.hs | apache-2.0 | 976 | 78 | 66 | 157 | 412 | 209 | 203 | -1 | -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="zh-CN">
<title>Reveal | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref loca... | msrader/zap-extensions | src/org/zaproxy/zap/extension/reveal/resources/help_zh_CN/helpset_zh_CN.hs | apache-2.0 | 968 | 82 | 65 | 159 | 411 | 208 | 203 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
module B where
import A
foo:: [aquoter|Int|] -> [aquoter|String|]
foo = show
| shlevy/ghc | testsuite/tests/quasiquotation/T13863/B.hs | bsd-3-clause | 108 | 0 | 5 | 18 | 30 | 22 | 8 | 5 | 1 |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | jcgruenhage/dendrite | vendor/src/github.com/apache/thrift/lib/hs/src/Thrift/Protocol/Compact.hs | apache-2.0 | 10,701 | 0 | 19 | 2,432 | 3,338 | 1,738 | 1,600 | 235 | 14 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.Sugar
-- Copyright : (c) Phil Freeman 2013
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |
-- Desugaring passes
--
... | michaelficarra/purescript | src/Language/PureScript/Sugar.hs | mit | 2,512 | 0 | 15 | 348 | 347 | 230 | 117 | 34 | 1 |
module Main where
import qualified Data.List as List
import Control.Arrow ((>>>))
import PositionalParser (prepare, consume, finish)
-- Using Currying for customizing
-- each field size
consumeFirst = consume 5
consumeSecond = consume 6
consumeThird = consume 6
-- Composing the parsing function.
-- The (>>>) operato... | hbobenicio/haskell-examples | positional-parser/Main.hs | mit | 864 | 0 | 11 | 153 | 152 | 86 | 66 | 13 | 1 |
{-# LANGUAGE JavaScriptFFI #-}
-- | A wrapper over the Electron debugging API, as documented
-- <https://electron.atom.io/docs/api/debugger here>.
--
-- Up-to-date documentation on the Chrome DevTools Protocol can be seen
-- <https://chromedevtools.github.io/devtools-protocol here>.
module GHCJS.Electron.Debugge... | taktoa/ghcjs-electron | src/GHCJS/Electron/Debugger.hs | mit | 2,590 | 16 | 10 | 777 | 251 | 152 | 99 | 30 | 0 |
import System.Process
import System.Directory
import Data.Function
import Data.List
import Data.Maybe
maybemizaInput (-1) = Nothing
maybemizaInput x = Just x
chamarNVezes :: Integer -> Integer -> IO [Maybe Integer]
chamarNVezes n input =
if n == 0 then
return []
else
do
output <- readProcess "/home/vitor/hw... | VitorCBSB/hw-verilog | statistics.hs | mit | 2,019 | 18 | 16 | 325 | 725 | 360 | 365 | 48 | 2 |
module PropLogic(Var, Prop(..), parse) where
import Parsing (Parser(..), symbol, identifier, (+++))
type Var = String
data Prop = Atom Var
| Not Prop
| Imply Prop Prop
| Or Prop Prop
| And Prop Prop
| Iff Prop Prop
deriving (Eq)
instance Show Prop where
... | JoeLoser/CS4450-Principles-of-Programming | homeworks/hw4/PropLogic.hs | mit | 2,147 | 0 | 10 | 886 | 748 | 362 | 386 | 63 | 2 |
-- |
-- Module: Math.NumberTheory.Moduli.Singleton
-- Copyright: (c) 2019 Andrew Lelechenko
-- Licence: MIT
-- Maintainer: Andrew Lelechenko <andrew.lelechenko@gmail.com>
--
-- Singleton data types.
--
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric ... | cartazio/arithmoi | Math/NumberTheory/Moduli/Singleton.hs | mit | 10,187 | 0 | 14 | 2,134 | 2,603 | 1,406 | 1,197 | 187 | 7 |
{-# LANGUAGE OverloadedStrings, TypeFamilies, Rank2Types, DeriveDataTypeable #-}
module HotDB.Core.Node (
Node(..)
, Document(..)
, lookupPath
, adjustPath
) where
import Prelude hiding (lookup)
import Data.Bits (shift, xor)
import Data.Foldable (toList)
import Data.Int (Int64)
import qualified Data.Map as M
import... | jjwchoy/hotdb | src/HotDB/Core/Node.hs | mit | 4,212 | 0 | 16 | 1,067 | 1,690 | 875 | 815 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NamedFieldPuns #-}
{-
Copyright (C) 2012-2017 Kacper Bak, Michal Antkiewicz <http://gsd.uwaterloo.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Soft... | juodaspaulius/clafer | src/Language/Clafer/Intermediate/ResolverInheritance.hs | mit | 16,098 | 1 | 21 | 3,673 | 4,138 | 2,134 | 2,004 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent
import Import
import Model
import Model.Server
import SchoolOfHaskell.Scheduler.API
import View (renderControls, renderEditor)
-- | Main function of the School of Haskell client.
main :: IO ()
main = do
-- Get the code elements.
els <- getElementsByClas... | fpco/schoolofhaskell | soh-client/src/Main.hs | mit | 1,624 | 0 | 16 | 306 | 350 | 175 | 175 | 31 | 2 |
{-# LANGUAGE FlexibleInstances, CPP, PatternGuards #-}
-- | Lower level building blocks for custom code generation.
module Language.Haskell.GHC.Simple.Impl (
Ghc, PkgKey,
liftIO,
toSimplifiedStg,
toModMetadata,
modulePkgKey, pkgKeyString
) where
-- GHC scaffolding
import BinIface
import GHC hidin... | valderman/ghc-simple | src/Language/Haskell/GHC/Simple/Impl.hs | mit | 3,522 | 0 | 16 | 617 | 582 | 325 | 257 | 59 | 1 |
module Main where
import Graphics.Vty
import Control.Monad.State
import Editor
import UI
-- | Run an editor.
runEditor :: IO ()
runEditor = do
v <- liftIO iv
es <- liftIO $ mkIdealEditorState v
evalStateT loop es where
loop = do v <- liftIO iv
s <- get
liftIO $ drawEditor s v
... | awbraunstein/emonad | src/Main.hs | mit | 530 | 0 | 11 | 186 | 181 | 88 | 93 | 20 | 2 |
module Euler007 (euler7) where
import Data.Numbers.Primes
euler7 :: Int
euler7 = primes !! 10000
| TrustNoOne/Euler | haskell/src/Euler007.hs | mit | 101 | 0 | 5 | 18 | 29 | 18 | 11 | 4 | 1 |
{-# LANGUAGE MagicHash #-}
module EmptyCanvasApp where
import Prelude hiding (show)
import Java
import Java.Array
import JavaFX.Types
import JavaFX.Methods
data {-# CLASS "org.eta.EmptyCanvasApp extends javafx.application.Application" #-}
EmptyCanvasApp = EmptyCanvasApp (Object# EmptyCanvasApp)
-- @Override
-- pu... | filippovitale/eta-playground | javafx-empty-canvas/src/EmptyCanvasApp.hs | mit | 847 | 1 | 11 | 132 | 151 | 83 | 68 | -1 | -1 |
module Test.Properties.UniqhashMachines where
import Data.Machine
import Text.UniqhashMachines
prop_detectChanges :: Bool
prop_detectChanges = expected == result
where
expected = [1,1,2]
result = run $ source [(1 :: Int,'a'),(1,'a'),(1,'b'),(1,'b'),(2,'a'),(1,'b'),(2,'a')] ~> emitChanges
| sordina/uniqhash | Test/Properties/UniqhashMachines.hs | mit | 299 | 0 | 11 | 39 | 129 | 81 | 48 | 7 | 1 |
-- | Instances for Proposition.hs. This is code that is not trustworthy enough to
-- be in the kernel, and we limit our use of automatic Deriving in Proposition.hs to
-- just Eq. Exercise for the reader: if Theorem automatically derived Traversable,
-- how would this make the logic unsound?
module Instances where
imp... | Chattered/proplcf | Instances.hs | mit | 2,419 | 0 | 10 | 700 | 989 | 499 | 490 | 67 | 0 |
module Graphics.Cogh.Element
( module Export
, Position
, Size
, Scale
, Origin
, Element
, position
, size
, scale
, origin
, rotation
, depth
, action
, emptyElement
, rectangle
, group
, image
) where
import Graphics.Cogh.Color as Export
import Graphics.Cogh.Render as Export (Tex... | ivokosir/cogh | src/Graphics/Cogh/Element.hs | mit | 1,014 | 0 | 10 | 199 | 300 | 173 | 127 | 36 | 1 |
{-# LANGUAGE BangPatterns, FlexibleInstances #-}
module Stage.Sources
(addSources)
where
import Model
import FieldElt
import Data.Array.Repa as R
import Data.Array.Repa.Unsafe as R
import Data.Vector.Unboxed (Unbox)
-- | Addition of forces stage for simulation
addSources
:: (FieldElt ... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss-examples/raster/Fluid/src-repa/Stage/Sources.hs | mit | 2,005 | 0 | 12 | 641 | 474 | 251 | 223 | -1 | -1 |
{-# htermination (compareMyBool :: MyBool -> MyBool -> Ordering) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Ordering = LT | EQ | GT ;
compare0 x y MyTrue = GT;
otherwise :: MyBool;
otherwise = MyTrue;
compare1 x y MyTrue = LT;
compare1 x y MyFalse =... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/compare_2.hs | mit | 942 | 0 | 8 | 191 | 319 | 174 | 145 | 24 | 1 |
module Graphics.Shader.Program (
ShaderState(..), Shader,
emptyAttribs, mkShaderAttrib, mkShaderAttrib2,
mkVertexShader,
mkFragmentShader,
) where
--------------------------------------------------------------------------------
import Control.Monad.State
import Graphics.Shader.Internal.Statement
import Graphi... | Mokosha/shaders | Graphics/Shader/Program.hs | mit | 2,365 | 0 | 16 | 453 | 678 | 382 | 296 | 51 | 2 |
-- clay-custom.hs
-- This is an example of adding custom values using the other type class or
-- fallback operator `-:` to explicitly specify values
-- http://www.shakthimaan.com/posts/2016/01/27/haskell-web-programming/news.html
{-# LANGUAGE OverloadedStrings #-}
import Clay
main :: IO ()
main = putCss $
body ?
... | katychuang/getting-started-with-haskell | tutorials/clay/clay-custom.hs | mit | 390 | 0 | 10 | 73 | 51 | 27 | 24 | 7 | 1 |
------------------------------------------------------------------------------
import System.IO
import XMonad
import XMonad.Layout.Gaps
import XMonad.Layout.NoBorders
import XMonad.Layout.ResizableTile
import XMonad.Layout.SimpleFloat
import XMonad.L... | jhm/dotfiles | xmonad/.xmonad/xmonad.hs | mit | 4,563 | 2 | 11 | 983 | 737 | 430 | 307 | 72 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-serversideencryptionbydefault.html
module Stratosphere.ResourceProperties.S3BucketServerSideEncrypt... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/S3BucketServerSideEncryptionByDefault.hs | mit | 2,435 | 0 | 13 | 213 | 266 | 152 | 114 | 28 | 1 |
module Language.Lambda.Examples.NatSpec where
import Test.Hspec
import Language.Lambda.HspecUtils
spec :: Spec
spec = describe "Nat" $ do
-- Nat is the definition of natural numbers. More precisely, Nat
-- is the set of nonnegative integers. We represent nats using
-- Church Encodings:
--
-- 0: \f x. x
... | sgillespie/lambda-calculus | test/Language/Lambda/Examples/NatSpec.hs | mit | 3,082 | 0 | 13 | 1,038 | 323 | 181 | 142 | 46 | 1 |
data Person = Person Bool deriving (Show)
printPerson :: Person -> IO ()
printPerson person = putStrLn (show person)
| Numberartificial/workflow | haskell-first-principles/haskell-from-first-principles-master/06/06.14.01-does-it-typecheck1.hs | mit | 117 | 0 | 7 | 19 | 48 | 24 | 24 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Estuary.Help.Saludos where
import Reflex
import Reflex.Dom
import Data.Text
import GHCJS.DOM.EventM
import Estuary.Widgets.Reflex
import Estuary.Widgets.Reflex
--render multiple sub-help files
saludosHelpFile :: MonadWidget t m => m ()
saludosHelpFile = divClass "languageHelp... | d0kt0r0/estuary | client/src/Estuary/Help/Saludos.hs | gpl-3.0 | 1,733 | 0 | 11 | 255 | 391 | 186 | 205 | 41 | 1 |
module Ast where
data Program = Program [ClassDecl]
data ClassDecl = Class
{ className :: Id
, classSuper :: Id
, classVars :: [(VarKind, VarDecl)]
, classMethods :: [MethodDecl]
} deriving (Show, Eq)
-- Check naming of fields
data MethodDecl = Method
{ retType :: ExpType... | WraithM/HJavaInterp | src/Ast.hs | gpl-3.0 | 1,543 | 0 | 10 | 502 | 452 | 273 | 179 | 66 | 0 |
module Token where
openBracket = '['
closeBracket = ']'
greater = '>'
lesser = '<'
plus = '+'
minus = '-'
dot = '.'
comma = ','
| agremm/bfint | src/Token.hs | gpl-3.0 | 172 | 0 | 4 | 71 | 44 | 27 | 17 | 9 | 1 |
-- Print out the nth prime, where n is the 1st argument
module Main where
import NaiveSieve (primes)
import System (getArgs)
printNthPrime :: Int -> IO ()
printNthPrime n = print (n, primes !! (n - 1))
main = do
args <- getArgs
printNthPrime $ read $ head args
| dkensinger/haskell | haskell-primes/NaiveSieveTest.hs | gpl-3.0 | 274 | 0 | 9 | 62 | 89 | 48 | 41 | 8 | 1 |
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll
--------------------------------------------------------------------------------
main :: IO ()
main = hakyll $ do
match "images/**" $ d... | mcgirr/mikemcgirr-com | site.hs | gpl-3.0 | 3,422 | 0 | 21 | 1,180 | 644 | 285 | 359 | 83 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS -fno-warn-missing-signatures #-}
module Editor.Config where
import qualified Graphics.DrawingCombinators as Draw
import qualified Graphics.UI.Bottle.EventMap as E
import qualified Graphics.UI.Bottle.Widgets.FocusDelegator as FocusDelegator
mk = E.KeyEventType
n... | nimia/bottle | codeedit/Editor/Config.hs | gpl-3.0 | 2,432 | 0 | 9 | 446 | 726 | 397 | 329 | 58 | 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 | source/Game/Grid/GridWorld/Turn.hs | gpl-3.0 | 5,302 | 0 | 24 | 1,769 | 1,254 | 684 | 570 | 161 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.Sheets
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla Publi... | rueshyna/gogol | gogol-sheets/gen/Network/Google/Sheets.hs | mpl-2.0 | 26,580 | 0 | 14 | 6,639 | 2,960 | 2,081 | 879 | 809 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/AchievementConfigurations/Insert.hs | mpl-2.0 | 5,774 | 0 | 19 | 1,310 | 786 | 457 | 329 | 120 | 1 |
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Copyright 2016, Julia Longtin (julial@turinglace.com)
-- Released under the GNU AGPLV3+, see LICENSE
-- Allow our DiscreteAproxable class to handle multiple parameters.
{-# LANGUAGE MultiParamTypeClasses #-}
-- For the instance declaration of D... | krakrjak/ImplicitCAD | Graphics/Implicit/Export/DiscreteAproxable.hs | agpl-3.0 | 5,789 | 2 | 18 | 1,752 | 1,607 | 915 | 692 | 78 | 1 |
module Freekick.Libsoccer.TournamentInstance
where
import Freekick.Libsoccer.Tournament
import Freekick.Libsoccer.Stage
import Freekick.Libsoccer.Club
import Freekick.Libsoccer.Match
import Libaddutil.Primitives
import Data.Maybe
import Data.List
data TournamentInstance =
TournamentInstance { name :: ... | anttisalonen/freekick | haskell/libfreekick/Freekick/Libsoccer/TournamentInstance.hs | agpl-3.0 | 9,599 | 0 | 15 | 2,060 | 3,082 | 1,623 | 1,459 | 169 | 3 |
import Test.Hspec
-- Dummy implementation for testing
slow_sqrs_sum :: [Int] -> Int
slow_sqrs_sum a = foldr (+) 0 (map (^2) a)
slow_sum_sqr :: [Int] -> Int
slow_sum_sqr a = (sum a) ^ 2
slow_sum_sqr_diff :: [Int] -> Int
slow_sum_sqr_diff a = (slow_sum_sqr a) - (slow_sqrs_sum a)
-- Fast emplementation using math
-- W... | orbitgray/ProjectEuler | haskell/006.hs | lgpl-3.0 | 2,004 | 0 | 16 | 510 | 609 | 319 | 290 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Time.Calendar.Laohuangli where
import qualified Data.Text as T
import Text.Printf
import Data.Time
import Data.Time.Calendar.WeekDate
import qualified Data.Set as Set
data Laohuangli =
Laohuangli { today :: (Integer, Int, Int, DayOfWeek)
, goo... | fishtreesugar/laohuangli-hs | src/Data/Time/Calendar/Laohuangli.hs | bsd-3-clause | 10,618 | 0 | 16 | 1,897 | 2,949 | 1,682 | 1,267 | 165 | 7 |
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE MultiParamTypeClass... | agocorona/MFlow | nick.hs | bsd-3-clause | 1,467 | 0 | 12 | 351 | 362 | 197 | 165 | 49 | 1 |
{-# OPTIONS_GHC -W #-}
module Type.Solve (solve) where
import Control.Monad
import Control.Monad.State
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Traversable as Traversable
import qualified Data.UnionFind.IO as UF
import Type.Type
import Type.Unify
import qualified Type.E... | deadfoxygrandpa/Elm | compiler/Type/Solve.hs | bsd-3-clause | 7,577 | 0 | 30 | 2,427 | 1,997 | 962 | 1,035 | 143 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Display where
import Control.Concurrent.STM
import Network.Wai.Handler.Warp
import Network.Wai
import Network.HTTP.Types
import qualified Data.ByteString.Lazy.Char8 as LBS
display :: TVar String -> IO ()
display statusLine = do
run 4444 (myApp statusLine)
myApp :: TVar S... | josuf107/xioqbot | src/Display.hs | bsd-3-clause | 1,686 | 0 | 15 | 612 | 257 | 133 | 124 | 20 | 3 |
module GUI.BookmarkView (
BookmarkView,
bookmarkViewNew,
BookmarkViewActions(..),
bookmarkViewGet,
bookmarkViewAdd,
bookmarkViewRemove,
bookmarkViewClear,
bookmarkViewSetLabel,
) where
import GHC.RTS.Events (Timestamp)
import Graphics.UI.Gtk
import Numeric
-------------------------... | ml9951/ThreadScope | GUI/BookmarkView.hs | bsd-3-clause | 4,385 | 0 | 18 | 843 | 970 | 472 | 498 | -1 | -1 |
digitsOfSum :: (Foldable t1, Integral t) => t -> t1 String -> Integer
digitsOfSum n a = go sum
where go x
| x < 10^n = x
| otherwise = go (quot x 10)
sum = foldl (\a b -> a + (read b :: Integer)) 0 a
main :: IO ()
main = do
f <- readFile "013.txt"
print $ digitsOfSum 10 (lines f)
| JacksonGariety/euler.hs | 013.hs | bsd-3-clause | 316 | 0 | 12 | 101 | 167 | 81 | 86 | 10 | 1 |
module Exceptions where
import System.Environment
import Control.Exception
willIFail :: Integer -> IO (Either ArithException ())
willIFail denom = try $ print $ div 5 denom
onlyReportError :: Show e => IO (Either e a) -> IO ()
onlyReportError action = do
result <- action
case result of
... | vasily-kirichenko/haskell-book | src/ErrorHandling/Exceptions.hs | bsd-3-clause | 821 | 0 | 11 | 198 | 323 | 159 | 164 | 26 | 2 |
module Main where
import Control.Monad
import Data.Aeson
import qualified Data.ByteString.Lazy as BS
import Data.Either
import qualified Data.Map as Map
import Data.Maybe
import Data.Yaml
import Test.Hspec
import Text.Garnett.Definition
import ... | jkarni/Garnett | tests/Tests.hs | bsd-3-clause | 1,679 | 0 | 15 | 564 | 263 | 139 | 124 | 31 | 2 |
module Data.IORef.Logic
( IORef
, newIORef
, readIORef
, writeIORef
, modifyIORef
, modifyIORef'
) where
import Control.Monad.IO.Logic
import Control.Monad.ST.Logic.Internal
type IORef s = Ref s IO
newIORef :: a -> LogicIO s (IORef s a)
newIORef = newRef
{-# INLINE ne... | sonyandy/logicst | src/Data/IORef/Logic.hs | bsd-3-clause | 723 | 0 | 8 | 173 | 214 | 120 | 94 | 25 | 1 |
module Common.List (
rotate
, minus
, intersect
, nub'
, unique
, maximumBy'
, minimumBy'
, maximum'
, minimum'
) where
import Data.List (foldl1', group)
import qualified Data.Set as S
{-# INLINABLE rotate #-}
{-# INLINABLE minus #-}
{-# INLINABLE intersect #-}
{-# INLINABLE nub' #-}
{-# INLINABLE unique ... | foreverbell/project-euler-solutions | lib/Common/List.hs | bsd-3-clause | 1,669 | 0 | 9 | 410 | 703 | 387 | 316 | 48 | 3 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Typ... | vapourismo/pg-store | src/Database/PostgreSQL/Store/Generics.hs | bsd-3-clause | 9,387 | 260 | 10 | 2,000 | 2,597 | 1,421 | 1,176 | 150 | 1 |
module TestPositiveP(test_group) where
import qualified Wigner.Symbols as S
import qualified Wigner.DefineExpression as D
import qualified Wigner.Transformations as T
import Wigner.Expression
import Wigner.Complex
import Wigner.Texable
import Wigner.Deltas
import Data.Ratio
import qualified Data.Map as M
import Test... | fjarri/wigner | test/TestPositiveP.hs | bsd-3-clause | 2,055 | 0 | 25 | 388 | 791 | 425 | 366 | 52 | 1 |
-- |
-- Many time structures such as 'Score' allows for rests between notes. Generally rests
-- are simply treated as blank space, and thus have no duration. Sometimes it is useful
-- to represent rests explicitly, so this module provides an alias for 'pure' 'Nothing' that
-- can be used to that end.
--
-- To remove r... | music-suite/music-score | src/Music/Time/Rest.hs | bsd-3-clause | 730 | 0 | 8 | 158 | 66 | 43 | 23 | 6 | 1 |
{-# OPTIONS_GHC -Wall -fno-warn-hi-shadowing -fno-warn-unused-do-bind -fno-warn-name-shadowing #-}
module REPL where
import Control.Monad
import System.Environment (getArgs)
import System.IO
import Eval
--import Env
import Types
import Parser
import Prim
import Control.Monad.IO.Class (liftIO)
import System.Console.H... | osa1/toylisp | src/REPL.hs | bsd-3-clause | 2,031 | 0 | 15 | 503 | 611 | 304 | 307 | 49 | 4 |
-- | Simulates the @isJavaIdentifierStart@ Java method. <http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isJavaIdentifierStart%28int%29>
module Language.Java.Character.IsJavaIdentifierStart
(
IsJavaIdentifierStart(..)
) where
import Data.Char
import Data.Word
import Data.Set.Diet(Diet)
import quali... | tonymorris/java-character | src/Language/Java/Character/IsJavaIdentifierStart.hs | bsd-3-clause | 9,935 | 0 | 10 | 4,357 | 2,916 | 1,817 | 1,099 | 385 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfMoney.SV.Corpus
( corpus
) where
import Data.Str... | facebookincubator/duckling | Duckling/AmountOfMoney/SV/Corpus.hs | bsd-3-clause | 2,181 | 0 | 9 | 956 | 429 | 246 | 183 | 63 | 1 |
------------------------------------------------------------------------------
-- | This module provides config info for globally assumed/known url & names
module Config.Locations
-- export all
where
------------------------------------------------------------------------------
-- import Data.SafeCopy
--... | atzedijkstra/blog-server | src/Config/Locations.hs | bsd-3-clause | 990 | 0 | 8 | 111 | 80 | 52 | 28 | 8 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# OPTIONS_GHC -fno-warn-partial-type-signatures #-}
module Haskell.Ide.IdeBackend
(idebackendDescriptor
) where
import Control.Concurrent
import ... | JPMoresmau/haskell-ide-engine | hie-ide-backend/Haskell/Ide/IdeBackend.hs | bsd-3-clause | 7,323 | 0 | 22 | 2,390 | 1,551 | 813 | 738 | 153 | 4 |
module Foo.Used(used) where
used = ()
| ndmitchell/weeder | test/foo/src/Foo/Used.hs | bsd-3-clause | 40 | 0 | 5 | 8 | 18 | 11 | 7 | 2 | 1 |
-- | This module modifies material in Renzo Carbonara\'s <http://hackage.haskell.org/package/pipes-zlib pipes-zlib> package.
module Streaming.Zip (
-- * Streams
decompress
, decompress'
, compress
, gunzip
, gunzip'
, gzip
-- * Compression levels
, CompressionLevel
, defa... | michaelt/streaming-utils | Streaming/Zip.hs | bsd-3-clause | 5,912 | 0 | 19 | 1,446 | 1,278 | 654 | 624 | 122 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable, ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies, ConstraintKinds #-}
module Development.Shake.Internal.Rules.Oracle(
addOracle, addOracleCache, addOracleHash,
askOracle, askOracles
) where
import Development.Shake.Internal.Core.Types
import De... | ndmitchell/shake | src/Development/Shake/Internal/Rules/Oracle.hs | bsd-3-clause | 7,623 | 0 | 23 | 1,755 | 1,241 | 675 | 566 | -1 | -1 |
module WordNumber where
import Data.List (intercalate)
digitToWord :: Int -> String
digitToWord n = ["zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
... | dmvianna/morse | src/WordNumber.hs | bsd-3-clause | 651 | 0 | 11 | 328 | 190 | 100 | 90 | 20 | 1 |
module Data.JSON.Schema.Generator.Types
( Schema (..)
, SchemaChoice (..)
, scString
, scInteger
, scNumber
, scBoolean
) where
import Data.Text (Text)
--------------------------------------------------------------------------------
-- | A schema for a JSON value.
--
data Schema =
S... | yuga/jsonschema-gen | src/Data/JSON/Schema/Generator/Types.hs | bsd-3-clause | 4,285 | 0 | 11 | 1,513 | 799 | 482 | 317 | 196 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Crypto.AES
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Test suite for Data.SBV.Examples.Crypto.AES
------------------------... | Copilot-Language/sbv-for-copilot | SBVUnitTest/TestSuite/Crypto/AES.hs | bsd-3-clause | 1,435 | 0 | 14 | 384 | 296 | 160 | 136 | 19 | 1 |
module Handler.AdminSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getAdminR" $ do
error "Spec not implemented: getAdminR"
| haBuu/tfs-website | test/Handler/AdminSpec.hs | mit | 171 | 0 | 11 | 39 | 44 | 23 | 21 | 6 | 1 |
{- |
Module : ./Temporal/ModalCaslToCtl.hs
Copyright : (c) Klaus Hartke, Uni Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
-}
module ModalCaslToCtl where
import Control.Monad as Monad
import Data.Maybe... | spechub/Hets | Temporal/ModalCaslToCtl.hs | gpl-2.0 | 2,971 | 0 | 13 | 503 | 1,335 | 677 | 658 | 45 | 1 |
{-| Implementation of the Ganeti configuration database.
-}
{-
Copyright (C) 2011, 2012 Google 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 opt... | dblia/nosql-ganeti | src/Ganeti/Config.hs | gpl-2.0 | 10,847 | 0 | 20 | 2,391 | 2,315 | 1,219 | 1,096 | 185 | 4 |
module EnumFromTo7 where
main :: [Int]
main = list
where
list :: [Int]
list = [60,62..50]
| roberth/uu-helium | test/correct/EnumFromTo7.hs | gpl-3.0 | 101 | 0 | 7 | 27 | 40 | 25 | 15 | 5 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module Abstract.Category.Limit (Complete(..), Cocomplete(..)) where
import Data.Proxy
import Abstract.Category
import Data.List.NonEmpty (NonEmpty (..))
-- | Type class for morphisms whose category is Complete.
--... | rodrigo-machado/verigraph | src/library/Abstract/Category/Limit.hs | gpl-3.0 | 4,509 | 0 | 14 | 1,141 | 1,162 | 625 | 537 | 76 | 0 |
{-# LANGUAGE QuasiQuotes #-}
module Pos.Util.Swagger where
import Universum
import Data.Swagger
import NeatInterpolation (text)
import Servant.Server (Handler, Server)
import Servant.Swagger.UI.Core (SwaggerSchemaUI',
swaggerSchemaUIServerImpl)
i... | input-output-hk/cardano-sl | lib/src/Pos/Util/Swagger.hs | apache-2.0 | 1,345 | 0 | 9 | 335 | 128 | 77 | 51 | 16 | 1 |
{-
(c) The University of Glasgow 2006-2012
(c) The GRASP Project, Glasgow University, 1992-2002
Various types used during typechecking, please see TcRnMonad as well for
operations on these types. You probably want to import it, instead of this
module.
All the monads exported here are built on top of the same IOEnv m... | rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcRnTypes.hs | bsd-3-clause | 96,947 | 0 | 16 | 28,646 | 11,394 | 6,570 | 4,824 | 915 | 2 |
-----------------------------------------------------------------------------
--
-- Code generator utilities; mostly monadic
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module CgUtils (
addIdReps,
cgLit,
emitData... | mcmaniac/ghc | compiler/codeGen/CgUtils.hs | bsd-3-clause | 38,355 | 0 | 22 | 10,231 | 7,639 | 4,043 | 3,596 | 522 | 10 |
module Distribution.Client.Mirror.Repo.Types (
SourceRepo(..)
, TargetRepo(..)
, targetCachedIndexPath
) where
-- stdlib
import Network.URI (URI)
import System.FilePath
-- hackage-security
import qualified Hackage.Security.Client as Sec
import qualified Hackage.Security.Client.Repository.... | agrafix/hackage-server | Distribution/Client/Mirror/Repo/Types.hs | bsd-3-clause | 1,427 | 0 | 10 | 357 | 205 | 136 | 69 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Tests for the :buffer ex command in the Vim keymap
--
module Vim.EditorManipulations.BufferExCommand (tests) where
import qualified Data.List.NonEmpty as NE
import Generic.TestUtils
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit
imp... | noughtmare/yi | yi-keymap-vim/tests/Vim/EditorManipulations/BufferExCommand.hs | gpl-2.0 | 6,349 | 0 | 19 | 2,254 | 1,289 | 630 | 659 | 108 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/AttachGroupPolicy.hs | mpl-2.0 | 3,572 | 0 | 9 | 760 | 397 | 244 | 153 | 52 | 1 |
-- Module : Network.AWS.CognitoIdentity
-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public License, v. 2.0.
-- A copy of the MPL can be found in the LICENSE file or
-- ... | kim/amazonka | amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity.hs | mpl-2.0 | 3,397 | 0 | 5 | 417 | 300 | 225 | 75 | 37 | 0 |
--------------------------------------------------------------------------------
--
-- Module : Time
-- Copyright : (c) 2009 Trevor L. McDonell
-- License : BSD
--
-- Simple timing benchmarks
--
--------------------------------------------------------------------------------
module Time where
import System.CPUTi... | mwu-tow/cuda | examples/common/src/Time.hs | bsd-3-clause | 1,180 | 0 | 9 | 268 | 298 | 166 | 132 | 27 | 1 |
module Parse.Helpers where
import Prelude hiding (until)
import Control.Applicative ((<$>),(<*>),(<*))
import Control.Monad (guard, join)
import Control.Monad.State (State)
import Data.Char (isUpper)
import qualified Data.Map as Map
import qualified Language.GLSL.Parser as GLP
import qualified Language.GLSL.Syntax as ... | JoeyEremondi/elm-summer-opt | src/Parse/Helpers.hs | bsd-3-clause | 14,468 | 81 | 22 | 4,159 | 4,668 | 2,400 | 2,268 | 426 | 14 |
{-# LANGUAGE ScopedTypeVariables #-}
module PackageTests.Freeze.Check
( tests
) where
import PackageTests.PackageTester
import Test.Tasty
import Test.Tasty.HUnit
import qualified Control.Exception.Extensible as E
import Data.List (intercalate, isInfixOf)
import System.Directory (doesFileExist, removeF... | corngood/cabal | cabal-install/tests/PackageTests/Freeze/Check.hs | bsd-3-clause | 4,311 | 0 | 14 | 1,223 | 972 | 480 | 492 | 91 | 2 |
module KMeansHelper where
import Prelude hiding (zipWith)
import Data.List (sort, span, minimumBy)
import Data.Function (on)
import Data.Ord (comparing)
import Language.Haskell.Liquid.Prelude (liquidAssert, liquidError)
-- | Fixed-Length Lists
{-@ type List a N = {v : [a] | (len v) = N} @-}
-- | N Dimensional Poi... | mightymoose/liquidhaskell | include/KMeansHelper.hs | bsd-3-clause | 2,694 | 0 | 9 | 566 | 490 | 273 | 217 | 22 | 1 |
module GTL.Data.MarkovDecisionProcess where
import GTL.Data.Dynamic (DynamicXA)
import GTL.Data.Utility (UtilityXA, Discount)
data MDP x a = MDP { dynamic :: DynamicXA x a
, utility :: UtilityXA x a
, discount :: Discount }
| dudebout/game-theoretic-learning | GTL/Data/MarkovDecisionProcess.hs | isc | 266 | 0 | 9 | 75 | 71 | 44 | 27 | 6 | 0 |
module Y2015.D03Spec (spec) where
import Y2015
import Test.Hspec
spec :: Spec
spec = parallel $ do
describe "Day 3" $ do
describe "santaRun" $ do
it "should deliver to 2 houses" $
santaRun ">" `shouldBe` 2
it "should deliver to 4 houses in a square" $
... | tylerjl/adventofcode | test/Y2015/D03Spec.hs | mit | 794 | 0 | 16 | 295 | 177 | 86 | 91 | 20 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Data.Xlsx.Parser where
import Prelude hiding (sequence)
import Control.Applicative
import Control.Monad.IO.Class
import Control.Monad (join)
import Data.Char (ord)
import Data.List
import Data.Maybe
im... | f-me/xlsx-parser | src/Data/Xlsx/Parser.hs | mit | 5,867 | 0 | 17 | 1,356 | 1,868 | 990 | 878 | 136 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.